diff --git a/.gitattributes b/.gitattributes index dfe0770424..ac1e451d56 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,7 @@ # Auto detect text files and perform LF normalization * text=auto + +# Checkout NPM package files with forced LF lineendings +# to prevent git conflicts when running npm commands +package.json text eol=lf +package-lock.json text eol=lf diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a769c20dfc..7f3c8671de 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,7 @@ +# This file is generated. +# Add yourself to the "Definitions by:" list instead. +# See https://github.com/DefinitelyTyped/DefinitelyTyped#edit-an-existing-package + /types/abbrev/ @BendingBender /types/abs/ @AyaMorisawa /types/absolute/ @AyaMorisawa @@ -37,7 +41,7 @@ /types/adm-zip/ @jvilk @abner /types/adone/ @s0m3on3 @maxveres /types/aframe/ @devpaul @bertoritger -/types/agenda/ @meirgottlieb +/types/agenda/ @meirgottlieb @princjef /types/aggregate-error/ @BendingBender /types/alertify/ @jjeffery /types/alexa-sdk/ @petebeegle @hoo29 @pascalwhoop @blforce @rk-7 @alexmalcoci @@ -47,13 +51,17 @@ /types/alt/ @Shearerbeard /types/amazon-product-api/ @MattiLehtinen @alien35 /types/amcharts/ @ldrick +/types/amp/ @jewbre +/types/amp-message/ @jewbre +/types/amphtml-validator/ @kevincharm /types/amplify/ @joeriks /types/amplify-deferred/ @joeriks @laurentiustamate94 /types/amplitude-js/ @Asido /types/amqp/ @seikho @jonnysparkplugs /types/amqp-rpc/ @wokim -/types/amqplib/ @mnahkies @abreits @nfantone +/types/amqplib/ @mnahkies @abreits @nfantone @zelein /types/analytics-node/ @fongandrew @thomasthiebaud +/types/anchor-js/ @xt0rted /types/angular/ @diegovilar @thorn0 @calebstdenis @leonard-thieu /types/angular-agility/ @rolandzwaga /types/angular-animate/ @michelsalib @adidahiya @rasch @codyschaaf @@ -65,6 +73,7 @@ /types/angular-cookie/ @borislavjivkov /types/angular-cookies/ @diegovilar @aciccarello /types/angular-deferred-bootstrap/ @Ritzlgrmft +/types/angular-desktop-notification/ @Dona278 /types/angular-dialog-service/ @wcomartin /types/angular-dynamic-locale/ @stephenlautier /types/angular-environment/ @terrawheat @@ -110,7 +119,6 @@ /types/angular-toastr/ @nkovacic @trodi /types/angular-toasty/ @muenchdo /types/angular-tooltips/ @leonard-thieu -/types/angular-touchspin/ @nkovacic /types/angular-translate/ @michelsalib /types/angular-ui-bootstrap/ @xt0rted @ry8806 /types/angular-ui-router/ @michelsalib @matiishyn @mikehaas763 @@ -164,6 +172,7 @@ /types/array-find-index/ @samverschueren /types/array-foreach/ @skysteve /types/array-uniq/ @DanielRosenwasser +/types/array-unique/ @CSLTech /types/arrify/ @wanganjun /types/artillery/ @kmccoan-allocadia /types/asana/ @tkqubo @@ -179,11 +188,11 @@ /types/async-cache/ @BendingBender /types/async-lock/ @elisee @afharo @rhymmor /types/async-polling/ @Goldsmith42 -/types/async-retry/ @albertywu +/types/async-retry/ @albertywu @MeLlamoPablo /types/async.nexttick/ @pyrho /types/asynciterator/ @rubensworks /types/atlaskit__button/ @dijimsta -/types/atmosphere.js/ @toedter @Mory1879 +/types/atmosphere.js/ @toedter @Mory1879 @Scipion /types/atom/ @GlenCFL @smhxx @lierdakil /types/atom-keymap/ @GlenCFL /types/atom-mocha-test-runner/ @GlenCFL @@ -204,7 +213,7 @@ /types/autosuggest-highlight/ @senukartur /types/awesomplete/ @webbiesdk @bmdixon @tbekolay /types/aws-iot-device-sdk/ @niik @mlamp -/types/aws-lambda/ @skarum @tobyhede @buggy @y13i @wwwy3y3 @OrthoDex @MichaelMarner @daniel-cottone @kostya-misura @coderbyheart @palmithor @daniloraisi @simonbuchan @Haydabase +/types/aws-lambda/ @skarum @tobyhede @buggy @y13i @wwwy3y3 @OrthoDex @MichaelMarner @daniel-cottone @kostya-misura @coderbyheart @palmithor @daniloraisi @simonbuchan @Haydabase @repl-chris /types/aws-serverless-express/ @threesquared @jcaffey @mattmeye @albertovasquez /types/aws4/ @ajcrites /types/axel/ @ruslan-molodyko @@ -221,6 +230,7 @@ /types/babel-traverse/ @yortus @marvinhagemeister /types/babel-types/ @yortus @baxtersa @marvinhagemeister @bcherny /types/babel-webpack-plugin/ @j-f1 +/types/babel__code-frame/ @mohsen1 @ForbesLindesay /types/babelify/ @TeamworkGuy2 @marvinhagemeister /types/babylon/ @yortus @marvinhagemeister /types/babylon-walk/ @czbuchi @@ -231,7 +241,7 @@ /types/backbone-relational/ @eirikhm /types/backbone.layoutmanager/ @hejiang2000 /types/backbone.localstorage/ @lgrignon -/types/backbone.marionette/ @zhamid @nvivo @sventschui +/types/backbone.marionette/ @zhamid @nvivo @sventschui @razorness /types/backbone.paginator/ @Nyamazing /types/backbone.radio/ @alphaleonis /types/backgrid/ @jlujan @@ -245,6 +255,7 @@ /types/base-x/ @chrootsu /types/base16/ @alechill /types/base64-js/ @pe8ter +/types/base64-url/ @urish /types/base64topdf/ @lucasriondel /types/bases/ @harikv /types/bash-glob/ @mrmlnc @@ -255,6 +266,7 @@ /types/bcryptjs/ @RafaelKr /types/beats/ @urish /types/bech32/ @micksatana +/types/bell/ @SimonSchick /types/bem-cn/ @selkinvitaly /types/better-curry/ @pocesar /types/better-sqlite3/ @Morfent @matrumz @@ -269,7 +281,6 @@ /types/binary-parser/ @riggs @dolanmiu /types/bind-ponyfill/ @skysteve /types/bindings/ @unindented -/types/bingmaps/ @rbrundritt /types/bintrees/ @CjS77 /types/bip21/ @stefanhuber /types/bip38/ @micksatana @@ -300,11 +311,12 @@ /types/bonjour/ @quentin-ol @octo-sniffle /types/bookshelf/ @arcticwaters @vesse /types/boom/v3/ @rogatty -/types/boom/v4/ @rogatty @AJamesPhillips @jineshshah36 -/types/boom/ @rogatty @AJamesPhillips @jineshshah36 @TimonVS +/types/boom/v4/ @rogatty @AJamesPhillips @jineshshah36 @danielmachado +/types/boom/ @rogatty @AJamesPhillips @jineshshah36 @TimonVS @danielmachado /types/bootbox/ @vbortone @konpikwastaken @kanup @icereed @trodi @stannynuytkens @renjfk /types/bootpag/ @rdeneau -/types/bootstrap/ @borisyankov +/types/bootstrap/v3/ @borisyankov +/types/bootstrap/ @denisname /types/bootstrap-3-typeahead/ @AndersonFriaca /types/bootstrap-datepicker/ @borisyankov /types/bootstrap-fileinput/ @CheCoxshall @@ -322,6 +334,7 @@ /types/bootstrap.timepicker/ @derikwhittaker @heatherbooker /types/bootstrap.v3.datetimepicker/v3/ @bayitajesi /types/bootstrap.v3.datetimepicker/ @katonap +/types/bootstrap3-dialog/ @nakupanda @cnboland /types/bounce.js/ @cherrry /types/box2d/ @jbaldwin /types/brace-expansion/ @BendingBender @@ -348,7 +361,7 @@ /types/bufferstream/ @Bartvds /types/builtin-modules/ @ajafff /types/bull/v2/ @bgrieder @JProgrammer -/types/bull/ @bgrieder @JProgrammer @marshall007 @weeco @blaugold +/types/bull/ @bgrieder @JProgrammer @marshall007 @weeco @blaugold @iamolegga /types/bump-regex/ @silkentrance /types/bunnymq/ @cyrilschumacher /types/bunyan/ @amikhalev @@ -363,8 +376,8 @@ /types/bwip-js/ @MugeSo /types/byline/ @reppners /types/bytebuffer/ @cappellin -/types/bytes/ @danny8002 -/types/c3/ @mcliment @gerinjacob @denyo @dmitryshindin +/types/bytes/ @danny8002 @believer +/types/c3/ @mcliment @gerinjacob @denyo @dmitryshindin @timn /types/cache-manager/ @GausSim /types/cal-heatmap/ @RetroChrisB /types/callsite/ @newclear @@ -385,8 +398,7 @@ /types/caseless/ @downace @mastermatt /types/cash/ @akvlko /types/casperjs/ @jedmao @urielch -/types/cassandra-driver/ @Svjard -/types/catalog/ @grossbart @wereHamster +/types/cassandra-driver/ @Svjard @pc-jedi /types/catbox/v7/ @jasonswearingen @AJamesPhillips /types/catbox/ @jasonswearingen @AJamesPhillips @saboya /types/cbor/ @pushplay @@ -409,7 +421,7 @@ /types/chai-subset/ @delta62 @AGBrown /types/chai-webdriverio/ @sherlock1982 /types/chai-xml/ @jedigo -/types/chance/ @cbowdon @brikou +/types/chance/ @cbowdon @brikou @cafesanu /types/change-emitter/ @iskandersierra /types/charm/ @Xananax /types/charset/ @cspotcode @@ -429,6 +441,7 @@ /types/chroma-js/v0/ @invliD /types/chroma-js/ @invliD @mpacholec /types/chrome/ @matthewkimber @otiai10 @couven92 @rreverser @sreimer15 +/types/circuit-breaker-js/ @DeTeam /types/circular-json/ @jpevarnek /types/ckeditor/ @wittwert /types/clamp-js/ @Hikariii @@ -439,6 +452,9 @@ /types/clean-stack/ @BendingBender /types/clean-webpack-plugin/ @j-f1 /types/clear-require/ @dan-j +/types/clearbladejs-client/ @ClearBlade +/types/clearbladejs-node/ @ClearBlade +/types/clearbladejs-server/ @ClearBlade /types/cleave.js/ @clentfort @jasongi-at-sportsbet @sashashakun /types/cli/ @kayahr /types/cli-color/ @ChaosinaCan @@ -475,7 +491,6 @@ /types/color-namer/ @in19farkt /types/color-string/ @BendingBender @danmarshall /types/colorbrewer/ @mtraynham -/types/colors/ @Bartvds @staeke /types/com.darktalker.cordova.screenshot/ @akarienta /types/combine-source-map/ @TeamworkGuy2 /types/combined-stream/ @felixge @tlaziuk @@ -483,6 +498,7 @@ /types/cometd/ @derekcicerone /types/command-line-args/ @CzBuCHi /types/command-line-commands/ @CzBuCHi +/types/command-line-usage/ @Dvorsky /types/commangular/ @hiraash /types/comment-json/ @Jason3S /types/common-tags/ @zuzusik @tzupengwang @@ -492,7 +508,7 @@ /types/component-emitter/ @psnider /types/compose-function/ @denis-sokolov /types/compressible/ @BendingBender -/types/compression/ @santialbo +/types/compression/ @santialbo @rburgt /types/compression-webpack-plugin/ @dublicator /types/compute-stdev/ @mrmlnc /types/concat-stream/ @jmarianer @@ -502,6 +518,7 @@ /types/confidence/ @jppellerin /types/config/ @RWander @forrestbice @jndonald3 @albertovasquez /types/configstore/ @ArcticLight +/types/configurable/ @jewbre /types/confit/ @ethanresnick /types/connect/ @SomaticIT /types/connect-busboy/ @pinguet62 @@ -559,6 +576,7 @@ /types/cordova_app_version_plugin/ @larrybahr /types/cordovarduino/ @hendrikmaus /types/core-js/ @rbuckton @mfdeveloper +/types/cosmiconfig/ @ozum /types/cote/ @makepost /types/couchbase/ @maouida /types/countdown/ @gjuchault @@ -579,7 +597,7 @@ /types/createjs-lib/ @evilangelist @gyohk /types/credential/ @phuvo /types/credit-card-type/ @LKay -/types/cron/ @horiuchi +/types/cron/ @horiuchi @winup /types/cropperjs/ @stepancar /types/croppie/ @connor4312 @dklmuc @sarunint /types/cross-spawn/ @Alorel @@ -598,6 +616,7 @@ /types/csurf/ @horiuchi /types/csv-parse/ @davidm77 @obi-jan-kenobi /types/csv-stringify/ @rogierschouten @arjenvanderende +/types/csv2json/ @dex4er /types/csvrow/ @codeanimal /types/csvtojson/ @EricByers @wcarson /types/cucumber/v1/ @abraaoalves @jan-molak @isoung @BendingBender @@ -665,8 +684,11 @@ /types/dat.gui/ @gyohk @sonic3d @rroylance /types/data-driven/ @mrhen /types/datadog-metrics/ @pushplay +/types/datadog-tracer/ @dineshsaravanan /types/datatables.net/ @Silver-Connection @omidkrad @pragmatrix @CNBoland +/types/datatables.net-autofill/ @andy-maca /types/datatables.net-buttons/ @Silver-Connection @SammyG4Free @jimhartford +/types/datatables.net-colreorder/ @andy-maca /types/datatables.net-fixedheader/ @szechyjs @Silver-Connection /types/datatables.net-rowgroup/ @maixiu /types/datatables.net-rowreorder/ @baywet @@ -697,14 +719,14 @@ /types/deep-freeze/ @Bartvds @aluanhaddad /types/deep-freeze-es6/ @mattbishop /types/deep-freeze-strict/ @mhegazy -/types/deepmerge/ @marvinscharle @syy1125 +/types/deepmerge/ @marvinscharle @syy1125 @AppLover69 /types/defaults/ @IbtihelCHNAB /types/defer-promise/ @niklasf /types/define-lazy-prop/ @BendingBender /types/defined/ @BendingBender /types/deku/ @pocka /types/del/v2/ @AyaMorisawa -/types/del/ @AyaMorisawa @BendingBender +/types/del/ @AyaMorisawa @BendingBender @bitjson /types/delaunator/ @DenisCarriere /types/delay/ @BendingBender /types/denodeify/ @joaomoreno @@ -729,11 +751,13 @@ /types/dhtmlxscheduler/ @mkozhukh /types/di-lite/ @dcrusader /types/diacritics/ @otociulis -/types/diff/ @vvakame +/types/diff/ @vvakame @szdc /types/diff2html/ @rtfpessoa /types/dir-resolve/ @andy-ms /types/discontinuous-range/ @OiCMudkips +/types/dispatchr/ @Ragg- /types/disposable-email-domains/ @geoffreak +/types/dnssd/ @angelmerino /types/doccookies/ @jonegerton /types/dockerode/ @seikho @nlaplante @isac322 @lazarusx @meisenzahl @thegecko /types/docopt/ @giggio @@ -758,14 +782,15 @@ /types/dotenv/v2/ @jussikinnula @borekb @enaeseth /types/dotenv/ @jussikinnula @borekb @enaeseth /types/dotenv-safe/ @krenor +/types/dotenv-webpack/ @karol-majewski /types/dotfile-regex/ @mrmlnc /types/dottie/ @domarmstrong /types/double-ended-queue/ @dsagal /types/doublearray/ @mzsm -/types/doubleclick-gpt/ @johngeorgewright +/types/doubleclick-gpt/ @johngeorgewright @steven-joyce /types/download/ @nicojs /types/downloadjs/ @cwmoo740 -/types/draft-js/ @dmitryrogozhny @eelco @ghotiphud @schwers @michael-yx-wu @willisplummer @smvilar +/types/draft-js/ @dmitryrogozhny @eelco @ghotiphud @schwers @michael-yx-wu @willisplummer @smvilar @sulf /types/drag-timetable/ @chinkan /types/draggabilly/ @jaydubu /types/dragster/ @zskovacs @@ -784,11 +809,11 @@ /types/dvtng-jss/ @Ptival /types/dw-bxslider-4/ @namerci /types/dwt/v12/ @yushulx -/types/dwt/ @yushulx @jbh +/types/dwt/ @yushulx @jbh @lincoln2018 @Tom-Dynamsoft /types/dygraphs/ @danvk /types/dymo-label-framework/ @thijskuipers /types/dynatable/ @francoismassart -/types/dynogels/ @SpartanLabs +/types/dynogels/ @SpartanLabs @ramondeklein @stephentuso /types/each/ @misak113 /types/earcut/ @NaridaL /types/easeljs/ @evilangelist @@ -811,7 +836,7 @@ /types/ejs/ @benliddicott /types/ejs-locals/ @jt000 /types/ejson/ @shantanubhadoria -/types/elasticsearch/ @CasperSkydt @bfsmith @ddunkin @pushplay @mlamp @ahmadferdous @SimonSchick +/types/elasticsearch/ @CasperSkydt @bfsmith @ddunkin @pushplay @mlamp @ahmadferdous @SimonSchick @brabster @deerawan /types/electron-config/ @mrfunkycold @unindented /types/electron-debug/ @unindented /types/electron-devtools-installer/ @gamesmaxed @@ -833,7 +858,7 @@ /types/elm/ @thSoft /types/email-templates/ @cyrilschumacher @gurisko @blankstar85 /types/ember/v1/ @jedmao -/types/ember/ @jedmao @bttf @dwickern @chriskrycho @theroncross @mfeckie +/types/ember/ @jedmao @bttf @dwickern @chriskrycho @theroncross @mfeckie @alexlafroscia /types/ember-data/ @dwickern @mike-north @chriskrycho /types/ember-feature-flags/ @tansongyang /types/ember-mocha/ @dwickern @@ -852,6 +877,7 @@ /types/engine.io-client/ @KentarouTakeda /types/enhanced-resolve/ @e-cloud @onigoetz /types/enigma.js/ @konne +/types/enquire.js/ @screendriver /types/ent/ @rogierschouten /types/entities/ @aliceklipper /types/env-to-object/ @MugeSo @@ -873,6 +899,7 @@ /types/es6-weak-map/ @pine /types/escape-html/ @elisee /types/escape-latex/ @olsio +/types/escape-regexp/ @jewbre /types/escape-string-regexp/ @kruncher @faergeek /types/escodegen/ @simondel /types/eslint/ @pmdartus @j-f1 @@ -888,33 +915,40 @@ /types/estraverse/ @sanex3339 /types/estree/ @RReverser /types/etag/ @BendingBender +/types/ethereumjs-util/ @cortopy /types/ethjs-signer/ @doppio /types/eureka-js-client/ @Schnillz /types/evaporate/ @kookster @chrisrhoden /types/event-emitter/ @LKay +/types/event-emitter-es6/ @ahstro /types/event-kit/ @GlenCFL /types/event-loop-lag/ @rogierschouten /types/event-stream/ @flcdrg /types/event-to-promise/ @flying-sheep /types/events/ @yasupeke +/types/eventsource/ @scottleedavis /types/evernote/ @corps +/types/excel-style-dataformatter/ @SanderDeWaal1992 /types/exceljs/ @rogierschouten @alitaheri /types/execa/ @douglasduteil @BendingBender @borekb @mickdekkers +/types/exenv/ @christianchown /types/exit/ @Bartvds /types/exit-hook/ @BendingBender /types/exorcist/ @TeamworkGuy2 /types/expect/ @jmreidy @merrywhether +/types/expect-puppeteer/ @JoshuaKGoldberg /types/expect.js/ @teppeis /types/expectations/ @vvakame /types/expo/v23/ @KonstantinKai /types/expo/v24/ @KonstantinKai @martynaskadisa @janaagaard75 @ssanchezmarc @fhelwanger -/types/expo/ @KonstantinKai @martynaskadisa @janaagaard75 @ssanchezmarc @fhelwanger +/types/expo/ @KonstantinKai @martynaskadisa @janaagaard75 @ssanchezmarc @fhelwanger @umidbekkarimov /types/expo__vector-icons/ @incleaf /types/express/ @borisyankov /types/express-brute/ @cyrilschumacher /types/express-brute-memcached/ @cyrilschumacher /types/express-brute-mongo/ @cyrilschumacher /types/express-brute-redis/ @scottharwell +/types/express-bunyan-logger/ @shreyjain1994 /types/express-busboy/ @pinguet62 /types/express-cluster/ @nenadalm /types/express-debug/ @federicobond @@ -922,12 +956,13 @@ /types/express-ejs-layouts/ @erikma /types/express-enforces-ssl/ @kevinstubbs /types/express-fileupload/ @Naktibalda +/types/express-flash/ @iMobs /types/express-flash-2/ @mathsalmi /types/express-flash-notification/ @Mister4Eyes /types/express-formidable/ @tdolsen @evanshortiss -/types/express-graphql/ @isman-usoh @nitintutlani @hubel @zya +/types/express-graphql/ @isman-usoh @nitintutlani @hubel @zya @mlamp @firede /types/express-handlebars/ @stpettersens @yhaskell -/types/express-jwt/ @wokim @kacepe @Sl1MBoy +/types/express-jwt/ @wokim @kacepe @Sl1MBoy @milan-mimra /types/express-less/ @xieyubo /types/express-minify/ @borislavjivkov /types/express-mongo-sanitize/ @ericbyers @@ -952,8 +987,10 @@ /types/extract-text-webpack-plugin/ @flying-sheep @katyo /types/extract-zip/ @mizunashi-mana /types/eyes/ @brynbellomy +/types/ez-plus/ @AndersonFriaca /types/f1/ @neolwc -/types/fabric/ @oklemencic @joewashear007 @mrand01 @NotWoods +/types/fabric/ @oklemencic @joewashear007 @mrand01 @NotWoods @bmartinson +/types/facebook-instant-games/ @menushka /types/facebook-js-sdk/ @amritk /types/facebook-pixel/ @noctishsu /types/faker/v3/ @Kuniwak @@ -974,6 +1011,7 @@ /types/fastclick/ @shinnn /types/favico.js/ @drowse314-dev-ymat /types/fb/ @JoshStrobl +/types/fb-watchman/ @whtsky /types/fbemitter/ @kmxz /types/featherlight/ @xStrom /types/feathersjs__authentication/ @AbraaoAlves @j2L4e @@ -984,7 +1022,7 @@ /types/feathersjs__authentication-oauth2/ @j2L4e /types/feathersjs__configuration/ @j2L4e /types/feathersjs__errors/ @j2L4e -/types/feathersjs__express/ @j2L4e +/types/feathersjs__express/ @j2L4e @DadUndead /types/feathersjs__feathers/ @j2L4e @AbraaoAlves /types/feathersjs__primus/ @j2L4e /types/feathersjs__primus-client/ @j2L4e @@ -995,7 +1033,7 @@ /types/feedme/ @codeanimal /types/feedparser/ @cortopy /types/fetch-jsonp/ @tkrotoff -/types/fetch-mock/ @asvetliakov @tamird @merrywhether @chrissinclair +/types/fetch-mock/ @asvetliakov @tamird @merrywhether @chrissinclair @matttennison @quentinbouygues /types/fetch.io/ @newraina /types/ffi/ @loyd /types/ffmpeg-static/ @iamstevetran @@ -1038,10 +1076,11 @@ /types/flux/ @stkb @GiedriusGrabauskas /types/fluxxor/ @mrk21 /types/fm-websync/ @markusmauch +/types/fnv-lite/ @marcind /types/fontfaceobserver/ @RandScullard /types/fontoxml/ @rolandzwaga /types/forever-agent/ @yavanosta -/types/forever-monitor/ @shuntksh +/types/forever-monitor/ @shuntksh @wrboyce /types/forge-di/ @adamcarr /types/form-data/ @soywiz @leonyu @BendingBender /types/form-serializer/ @flqw @@ -1060,7 +1099,8 @@ /types/freeport/ @atd-schubert /types/fresh/ @BendingBender /types/friendly-errors-webpack-plugin/ @bahlo -/types/frisby/ @johnny4753 +/types/frisby/v0/ @johnny4753 +/types/frisby/ @cwoodland @johnny4753 /types/from/ @Bartvds /types/from2/ @BendingBender /types/fromjs/ @glenndierckx @@ -1233,8 +1273,9 @@ /types/gaussian/ @scttcper /types/geetest/ @plantain-00 /types/gen-readlines/ @CodeAnimal +/types/generate-changelog/ @ffflorian /types/generic-functions/ @stpettersens -/types/generic-pool/ @jerray +/types/generic-pool/ @jerray @wrboyce /types/gently/ @bonnici /types/geodesy/ @DenisCarriere @HandyG52 @excelulous /types/geojson/ @cobster @atd-schubert @JeffJacobson @@ -1257,6 +1298,7 @@ /types/git-config/ @stpettersens /types/git-remote-origin-url/ @janslow /types/github-username-regex/ @BehindTheMath +/types/gitlab/ @yanqing6628780 @Arylo /types/gl-matrix/ @mattijskneppers @tatchx @nbabanov @auzmartist @surtr-isaz /types/gldatepicker/ @qcz /types/glidejs/ @milanjaros @@ -1270,6 +1312,7 @@ /types/globalize-compiler/ @iclanton /types/globby/ @douglasduteil @ikatyang /types/globule/ @durad +/types/glue/ @garfty /types/gm/ @ChaosinaCan @maartenvanvliet /types/go/ @NorthwoodsSoftware /types/google-adwords-scripts/ @jafaircl @@ -1297,9 +1340,10 @@ /types/graceful-fs/ @Bartvds @BendingBender /types/graham_scan/ @hberntsen /types/graphite-udp/ @EricByers -/types/graphql/ @TonyPythoneer @calebmer @intellix @firede @kepennar @freiksenet @IvanGoncharov @DxCx @rportugal @tgriesser @dyst5422 @adnsio +/types/graphql/ @TonyPythoneer @calebmer @intellix @firede @kepennar @freiksenet @IvanGoncharov @DxCx @rportugal @tgriesser @dyst5422 @adnsio @divyenduz /types/graphql-date/ @enaeseth /types/graphql-iso-date/ @jwaldrip +/types/graphql-list-fields/ @filipows /types/graphql-relay/ @arvitaly @nitintutlani @Grelinfo /types/graphql-resolve-batch/ @nayni /types/graphql-type-json/ @schfkt @@ -1396,7 +1440,8 @@ /types/hapi/v16/ @jasonswearingen @AJamesPhillips /types/hapi/ @BorntraegerMarc @rafaelsouzaf @jhsimms /types/hapi-auth-basic/ @AJamesPhillips @saboya -/types/hapi-auth-jwt2/ @warrenseymour +/types/hapi-auth-jwt2/v7/ @warrenseymour +/types/hapi-auth-jwt2/ @warrenseymour @SimonSchick /types/hapi-decorators/ @kenhowardpdx /types/har-format/ @micmro /types/hard-rejection/ @BendingBender @@ -1448,6 +1493,7 @@ /types/html-minifier/ @tkrotoff @rikuayanokozy /types/html-pdf/ @westy92 /types/html-to-text/ @erykwarren +/types/html-void-elements/ @rhysd /types/html-webpack-plugin/ @deevus @bumbleblym @tlaziuk /types/html-webpack-template/ @bumbleblym /types/html2canvas/ @rwhepburn @tan9 @@ -1521,7 +1567,7 @@ /types/iniparser/ @chrootsu /types/inline-css/ @philipisapain /types/inline-style-prefixer/ @ahz @dpetrezselyova -/types/inquirer/ @tkQubo @ppathan @jouderianjr +/types/inquirer/ @tkQubo @ppathan @jouderianjr @bang88 @bitjson @synarque @jrockwood /types/insert-module-globals/ @leonard-thieu /types/insight/ @vvakame /types/integer/ @Morfent @@ -1551,7 +1597,9 @@ /types/is-archive/ @mhegazy /types/is-array/ @pine /types/is-binary-path/ @DanielRosenwasser +/types/is-color/ @VitorLuizC /types/is-compressed/ @mhegazy +/types/is-empty/ @termosa /types/is-finite/ @mhegazy /types/is-glob/ @mrmlnc /types/is-hotkey/ @petester42 @@ -1579,7 +1627,7 @@ /types/iso-3166-2/ @sicilica /types/iso8601-localizer/ @avielfedida /types/isomorphic-fetch/ @toddlucas -/types/isotope-layout/ @avidenic +/types/isotope-layout/ @avidenic @malinushj /types/istanbul/ @tkrotoff /types/istanbul-lib-coverage/ @jason0x43 /types/istanbul-lib-hook/ @jason0x43 @@ -1590,6 +1638,7 @@ /types/istanbul-reports/ @jason0x43 /types/ityped/ @DanielRosenwasser /types/ix.js/ @Igorbek +/types/jackrabbit/ @elvisvoer /types/jade/ @panuhorsmalahti /types/jalaali-js/ @alitaheri /types/japanese-holidays/ @syamatoo @@ -1617,14 +1666,17 @@ /types/jdataview/ @RReverser /types/jdenticon/ @mtr /types/jest/v16/ @NoHomey @jwbay -/types/jest/ @NoHomey @jwbay @asvetliakov @alexjoverm @epicallan @ikatyang @wsmd @JamieMason @douglasduteil @AhnpGit +/types/jest/ @NoHomey @jwbay @asvetliakov @alexjoverm @epicallan @ikatyang @wsmd @JamieMason @douglasduteil @AhnpGit @joshuakgoldberg @bradleyayers /types/jest-diff/ @myabc /types/jest-docblock/ @ikatyang +/types/jest-environment-puppeteer/ @joshuakgoldberg /types/jest-get-type/ @myabc +/types/jest-image-snapshot/ @dawnmist /types/jest-in-case/ @geovanisouza92 /types/jest-json-schema/ @deadNightTiger /types/jest-matcher-utils/ @myabc /types/jest-matchers/ @joscha +/types/jest-specific-snapshot/ @dawnmist /types/jest-validate/ @ikatyang /types/jfs/ @tlaziuk /types/jjv/ @Nemo157 @@ -1633,7 +1685,7 @@ /types/johnny-five/ @nakakura @ujvzolee @workshop2 /types/joi/v6/ @Bartvds @laurence-myers @cglantschnig @DavidBR-SW /types/joi/v10/ @Bartvds @laurence-myers @cglantschnig @DavidBR-SW @GaelMagnan @ralekna @schfkt @rokoroku -/types/joi/ @Bartvds @laurence-myers @cglantschnig @DavidBR-SW @GaelMagnan @ralekna @schfkt @rokoroku @dankraus @wanganjun +/types/joi/ @Bartvds @laurence-myers @cglantschnig @DavidBR-SW @GaelMagnan @ralekna @schfkt @rokoroku @dankraus @wanganjun @rafaelkallis /types/joigoose/ @boothwhack /types/josa/ @vichyssoise /types/jpeg-js/ @DanielRosenwasser @@ -1648,8 +1700,10 @@ /types/jquery-awesome-cursor/ @zskovacs /types/jquery-backstretch/ @dkulyk /types/jquery-countdown/ @AndersonFriaca +/types/jquery-countto/ @AndersonFriaca /types/jquery-cropbox/ @PerKastman /types/jquery-deparam/ @patsissons +/types/jquery-drawer/ @pine /types/jquery-easy-loading/ @delphinus35 /types/jquery-editable-select/ @baywet /types/jquery-fullscreen/ @bgrieder @@ -1676,10 +1730,12 @@ /types/jquery-urlparam/ @stpettersens /types/jquery-validation-unobtrusive/ @EnableSoftware /types/jquery.address/ @martinduparc @mardaneus86 +/types/jquery.appear/ @AndersonFriaca /types/jquery.are-you-sure/ @jonegerton /types/jquery.autosize/ @kingdango /types/jquery.bbq/ @sunetos /types/jquery.bootstrap.wizard/ @niemyjski @dennisahlin +/types/jquery.browser/ @AndersonFriaca /types/jquery.cleditor/ @pushplay /types/jquery.clientsidelogging/ @diullei /types/jquery.color/ @derekcicerone @@ -1709,6 +1765,7 @@ /types/jquery.notifybar/ @zaneli /types/jquery.noty/ @kingdango @thelfensdrfer /types/jquery.payment/ @ejsmith @johnrutherford +/types/jquery.pin/ @AndersonFriaca /types/jquery.pjax/ @lijunle /types/jquery.placeholder/ @majorsilence @EnableSoftware /types/jquery.pnotify/ @DavidSichau @FUNExtreme @@ -1752,10 +1809,12 @@ /types/js-fixtures/ @kazimanzurrashid /types/js-git/ @Bartvds /types/js-md5/ @mwmccarthy +/types/js-money/ @kanatkubash /types/js-quantities/ @wrummler /types/js-schema/ @marcinporebski @roblabat /types/js-search/ @guoyunhe /types/js-sha512/ @nicojs +/types/js-string-escape/ @viralpickaxe /types/js-to-java/ @skyitachi /types/js-url/ @pine613 /types/js-yaml/ @Bartvds @sclausen @@ -1780,13 +1839,15 @@ /types/json-pointer/ @Bartvds /types/json-query/ @mtraynham /types/json-rpc-ws/ @npenin @mlamp -/types/json-schema/ @bcherny @cyrilletuzi +/types/json-schema/ @bcherny @cyrilletuzi @lucianbuzzo /types/json-socket/ @svi3c /types/json-stable-stringify/ @mhfrantz /types/json-stringify-safe/ @BendingBender +/types/json2csv/ @juanjoDiaz /types/json2md/ @MartynasZilinskas /types/jsonata/ @nick121212 /types/jsoneditor/ @alejo90 +/types/jsoneditor-for-react/ @joshuakgoldberg /types/jsoneditoronline/ @vbortone /types/jsonfile/ @dbowring /types/jsonminify/ @no23reason @@ -1797,17 +1858,22 @@ /types/jsonstream/ @Bartvds /types/jsontoxml/ @benstevens48 /types/jsonwebtoken/ @SomaticIT @danielheim @brikou +/types/jsonwebtoken-promisified @aneilbaboo /types/jspdf/ @amberjs /types/jsqrcode/ @lordazzi /types/jsrender/ @zakki /types/jsreport-core/ @taoqf +/types/jsreport-html-to-xlsx/ @me +/types/jsreport-jsrender/ @taoqf +/types/jsreport-phantom-pdf/ @taoqf +/types/jsreport-xlsx/ @taoqf /types/jsrp/ @harryshipton -/types/jss/ @appsforartists @kof +/types/jss/ @appsforartists @kof @pelotom /types/jssha/ @randombk @SrTobi /types/jstimezonedetect/ @olamothe /types/jstorage/ @dflor003 /types/jstree/ @adaskothebeast -/types/jsts/ @StephaneAlie +/types/jsts/ @StephaneAlie @jrocha /types/jsuite/ @darrenhillconsulting /types/jsuri/ @coldacid @flqw /types/jsurl/ @agorshkov23 @@ -1818,11 +1884,12 @@ /types/jui-core/ @easylogic /types/jui-grid/ @easylogic /types/jweixin/ @taoqf @gomydodo -/types/jwplayer/ @martinduparc @kutomer @philippguertler +/types/jwplayer/ @martinduparc @kutomer @philippguertler @danielmcgraw /types/jws/ @JustinBeckwith /types/jwt-client/ @timoteoponce /types/jwt-decode/v1/ @QuatroDevOfficial /types/jwt-decode/ @GiedriusGrabauskas @madsmadsen +/types/jwt-express/ @nickp10 /types/jwt-simple/ @kenfdev @GaelMagnan /types/kafka-node/ @dansitu @bkim54 @sfrooster @amiram /types/karma/ @tkrotoff @43081j @@ -1831,6 +1898,7 @@ /types/karma-coverage/ @tkrotoff /types/karma-fixture/ @evictor /types/karma-jasmine/ @michelsalib +/types/karma-viewport/ @karak /types/karma-webpack/ @mtraynham /types/katex/ @mrand01 /types/kcors/ @Xstoudi @izayoiko @@ -1844,12 +1912,13 @@ /types/keypress.js/ @rcchen /types/keysym/ @harryshipton /types/keytar/ @miniak @shiftkey @juturu +/types/keyv/ @Arylo /types/kik-browser/ @joelday /types/klaw/v1/ @mceachen /types/klaw/ @mceachen /types/klaw-sync/ @shiftkey /types/kms-json/ @sunnyone -/types/knex/ @tkQubo @baronfel @MeLlamoPablo @mastermatt @micksatana +/types/knex/ @tkQubo @baronfel @MeLlamoPablo @mastermatt @micksatana @shreyjain1994 /types/knex-postgis/ @vesse /types/knockback/ @borisyankov /types/knockout/ @borisyankov @Igorbek @moonpyk @EnableSoftware @BenjaminEckardt @ffMathy @@ -1914,7 +1983,7 @@ /types/kramed/ @tonicblue /types/kss/ @giladgray /types/kue/ @drudge @amiram @pc-jedi -/types/kurento-utils/ @nenadalm +/types/kurento-utils/ @nenadalm @riggs /types/kuromoji/ @mzsm @kgtkr /types/lab/ @prashaantt /types/ladda/ @dflor003 @leemicw @@ -1973,6 +2042,7 @@ /types/line-by-line/ @etomsen /types/line-reader/ @stpettersens /types/linkify-it/ @praxxis +/types/listr/ @durad /types/lls/ @borislavjivkov /types/load-json-file/ @SamVerschueren /types/loader-runner/ @e-cloud @@ -2311,6 +2381,7 @@ /types/mailcheck/ @pocesar /types/maildev/ @cyrilschumacher @zbarbuto /types/mailgen/ @vothanhkiet @jordanfarrer +/types/mailgun-js/ @sampsonjoliver /types/mailparser/ @psnider /types/main-bower-files/ @k-kagurazaka /types/make-dir/ @ikatyang @BendingBender @@ -2323,7 +2394,7 @@ /types/mapnik/ @ipv4sec /types/mapsjs/ @davismj /types/mariasql/ @bennett000 -/types/mark.js/ @renjfk +/types/mark.js/ @renjfk @RomanGotsiy /types/markdown-it/ @rapropos /types/markdown-it-anchor/ @seryl /types/markdown-it-container/ @hronex @@ -2375,12 +2446,13 @@ /types/media-typer/ @BendingBender /types/medium-editor/ @keika299 /types/mem/ @SamVerschueren +/types/mem-fs/ @MyFoodBag /types/memcached/ @KentarouTakeda /types/memoizee/ @juanpicado /types/memory-cache/ @jedigo @thieman /types/memory-fs/ @e-cloud /types/memwatch-next/ @cyrilschumacher -/types/meow/ @KnisterPeter @praxxis +/types/meow/ @KnisterPeter @praxxis @bitjson /types/merge-descriptors/ @danny8002 /types/merge-stream/ @k-kagurazaka @daniel-zazula /types/merge2/ @tkrotoff @smac89 @@ -2396,7 +2468,7 @@ /types/meteor-persistent-session/ @vangorra /types/meteor-prime8consulting-oauth2/ @vangorra /types/meteor-publish-composite/ @vangorra -/types/meteor-roles/ @vangorra +/types/meteor-roles/ @vangorra @mattmm3d /types/method-override/ @santialbo /types/methods/ @cprecioso /types/metric-suffix/ @davidm77 @@ -2416,10 +2488,11 @@ /types/mime-types/ @Perlmint /types/mimos/ @AJamesPhillips /types/mina/ @lhk @mattanja @kant2002 +/types/mini-css-extract-plugin/ @JounQin /types/minimatch/ @vvakame @shantmarouti /types/minimist/ @Bartvds @Necroskillz @kamranayub /types/minimist-options/ @ikatyang -/types/minio/ @barinbritva +/types/minio/ @barinbritva @castorw /types/minipass/ @BendingBender /types/mirrorx/ @aaronphy /types/mithril/ @spacejack @andraaspar @isiahmeadows @@ -2430,7 +2503,7 @@ /types/mkdirp/ @Bartvds @mrmlnc /types/mkpath/ @optical /types/mobx-apollo/ @pselden -/types/mocha/ @kazimanzurrashid @otiai10 @jt000 @enlight +/types/mocha/ @kazimanzurrashid @otiai10 @jt000 @enlight @cspotcode /types/mocha-each/ @magnostherobot /types/mocha-phantomjs/ @ErikSchierboom /types/mocha-steps/ @Arylo @@ -2456,9 +2529,9 @@ /types/moment-timezone/ @michelsalib @alanblins /types/mongo-sanitize/ @CedricCazin /types/mongodb/v2/ @CaselIT @alanmarcell @kikar @bitjson @dante-101 @mcortesi -/types/mongodb/ @CaselIT @alanmarcell @kikar @bitjson @dante-101 @mcortesi +/types/mongodb/ @CaselIT @alanmarcell @kikar @bitjson @dante-101 @mcortesi @EnricoPicci @AJCStriker @julien-c /types/mongoose/v4/ @simonxca @horiuchi @sindrenm @lukasz-zak -/types/mongoose/ @simonxca @horiuchi @sindrenm @lukasz-zak @Alorel @jendrikw @ethanresnick +/types/mongoose/ @horiuchi @sindrenm @lukasz-zak @Alorel @jendrikw @ethanresnick @vologab /types/mongoose-auto-increment/ @AyaMorisawa /types/mongoose-deep-populate/ @AyaMorisawa /types/mongoose-geojson-schema/ @bondz @@ -2469,6 +2542,7 @@ /types/mongoose-sequence/ @linusbrolin /types/mongoose-simple-random/ @rsxdalv /types/mongoose-unique-validator/ @stevehipwell +/types/mongorito/ @pinguet62 /types/moo/ @deltaidea @MofX /types/moonjs/ @DanielRosenwasser /types/morgan/ @staticfunction @pscanf @@ -2487,6 +2561,7 @@ /types/msportalfx-test/ @julioct /types/mssql/ @jaminfarr @buzinas @mrrichar @elhaard @pkeuter /types/mu2/ @jedigo +/types/muicss/ @samuelneff /types/multer/ @jt000 @DavidBR-SW @mxl @hyunseob /types/multer-gridfs-storage/v1/ @devconcept /types/multer-gridfs-storage/ @devconcept @@ -2502,9 +2577,10 @@ /types/musicmetadata/ @Xstoudi /types/mustache/ @markashleybell /types/mv/ @nenadalm -/types/mysql/ @wjohnsto @kacepe @kpping +/types/mysql/ @wjohnsto @kacepe @kpping @jdmunro /types/mz/ @ThomasHickman /types/n3/ @phreed +/types/named-regexp-groups/ @jewbre /types/nano/ @timjacobi @vincekovacs /types/nanoajax/ @nathancahill /types/nanoid/ @bash @@ -2515,9 +2591,10 @@ /types/natsort/ @mgroenhoff /types/natural/ @dmoonfire /types/natural-sort/ @a-morales +/types/navermaps/ @ckboyjiy /types/navigation/ @grahammendick /types/navigation-react/ @grahammendick -/types/navigo/ @aersamkull @dancespiele +/types/navigo/ @aersamkull @dancespiele @deini /types/nblas/ @erikgerrits /types/nconf/ @jedigo @jmthibault /types/ncp/ @bartvds @@ -2559,16 +2636,17 @@ /types/ngstorage/ @kubiq /types/ngtoaster/ @btesser /types/ngwysiwyg/ @patrick-mackay -/types/nightmare/ @horiuchi @samyang-au +/types/nightmare/ @horiuchi @samyang-au @Bleser92 /types/nightwatch/ @rkavalap @schlesiger -/types/noble/ @swook @wind-rider @shantanubhadoria @lukel99 @bioball @keton +/types/nivo-slider/ @AndersonFriaca +/types/noble/ @swook @wind-rider @shantanubhadoria @lukel99 @bioball @keton @thegecko /types/nock/ @bonnici @horiuchi @afharo @mastermatt @damour /types/nodal/ @charrondev /types/node/v4/ @eps1lon /types/node/v6/ @WilcoBakker @inlined @eps1lon @Alorel /types/node/v7/ @parambirs @tellnes @WilcoBakker @eps1lon -/types/node/v8/ @parambirs @tellnes @WilcoBakker @octo-sniffle @smac89 @Flarna @mwiktorczyk @wwwy3y3 @DeividasBakanas @kjin @alvis @OliverJAsh @eps1lon @Hannes-Magnusson-CK @jkomyno @hoo29 -/types/node/ @parambirs @tellnes @WilcoBakker @octo-sniffle @smac89 @Flarna @mwiktorczyk @wwwy3y3 @DeividasBakanas @kjin @alvis @OliverJAsh @eps1lon @Hannes-Magnusson-CK @jkomyno @ajafff @hoo29 +/types/node/v8/ @parambirs @tellnes @WilcoBakker @octo-sniffle @smac89 @Flarna @mwiktorczyk @wwwy3y3 @DeividasBakanas @kjin @alvis @OliverJAsh @eps1lon @Hannes-Magnusson-CK @jkomyno @hoo29 @n-e +/types/node/ @parambirs @tellnes @WilcoBakker @octo-sniffle @smac89 @Flarna @mwiktorczyk @wwwy3y3 @DeividasBakanas @kjin @alvis @OliverJAsh @eps1lon @Hannes-Magnusson-CK @jkomyno @ajafff @hoo29 @n-e /types/node-7z/ @erkie /types/node-array-ext/ @Beng89 /types/node-cache/ @chrootsu @dthunell @useltmann @@ -2585,7 +2663,7 @@ /types/node-gcm/ @horiuchi /types/node-geocoder/ @rosek86 /types/node-getopt/ @kcauchy -/types/node-hid/ @mhegazy @ert78gb +/types/node-hid/ @mhegazy @ert78gb @thegecko /types/node-horseman/ @apratheek /types/node-hue-api/ @fjmorel /types/node-int64/ @x3cion @kevin-greene-ck @@ -2596,9 +2674,10 @@ /types/node-notifier/ @tkQubo /types/node-polyglot/ @timjk /types/node-powershell/ @rodrigoff +/types/node-pushnotifications/ @menushka /types/node-ral/ @ssddi456 /types/node-red/ @andersea -/types/node-rsa/ @alitaheri +/types/node-rsa/ @alitaheri @xm /types/node-schedule/ @cyrilschumacher @flowpl /types/node-slack/ @tkQubo /types/node-snap7/ @heilingbrunner @@ -2614,6 +2693,7 @@ /types/node-xmpp-core/ @PJakcson /types/node-zookeeper-client/ @plantain-00 @jessezhang91 /types/node_redis/ @borisyankov +/types/nodecredstash/ @migstopheles /types/nodegit/ @dolanmiu /types/nodemailer/v3/ @rogierschouten /types/nodemailer/ @rogierschouten @dex4er @@ -2687,7 +2767,8 @@ /types/onoff/ @marcel-ernst /types/open/ @Bartvds /types/opener/ @tikurahul -/types/openfin/ @chrisbarker +/types/openfin/v17/ @chrisbarker +/types/openfin/ @chrisbarker @rdepena /types/openjscad/ @danmarshall /types/openlayers/v2/ @bolhovsky /types/openlayers/v3/ @osechet @matthiasdailey-ccri @@ -2758,11 +2839,12 @@ /types/papaparse/ @torpedro @rainshen49 @jfloff @johnnyreilly /types/paper/ @clark-stevenson @Xakaloz /types/paralleljs/ @jbaldwin +/types/parcel-env/ @fathyb /types/parent-package-json/ @sgmccli /types/parity-pmd/ @leovujanic @jewbre /types/parity-pmr/ @leovujanic /types/parity-poe/ @leovujanic -/types/parse/ @dpoetzsch @jaeggerr @flavionegrao @wesleygrimes +/types/parse/ @dpoetzsch @jaeggerr @flavionegrao @wesleygrimes @owsas /types/parse-git-config/ @leonard-thieu /types/parse-glob/ @glen-84 /types/parse-json/ @mrmlnc @@ -2803,6 +2885,7 @@ /types/path-exists/v1/ @shiwano /types/path-exists/ @shiwano @BendingBender /types/path-is-absolute/ @mhegazy +/types/path-is-inside/ @aomarks /types/pathfinding/ @BNedry /types/pathjs/ @lokeshpeta /types/pathwatcher/ @GlenCFL @@ -2864,8 +2947,9 @@ /types/platform/ @JakeH /types/playcanvas/ @Neoflash1979 /types/playerframework/ @ricardosabino +/types/playmusic/ @nickp10 /types/pleasejs/ @nakakura -/types/plotly.js/ @chrisgervang @martinduparc @frederikaalund @taoqf @Dadstart +/types/plotly.js/ @chrisgervang @martinduparc @frederikaalund @taoqf @Dadstart @szechyjs /types/plugapi/ @BNedry /types/plugin-error/ @rogierschouten /types/plupload/ @patrickbussmann @@ -2882,6 +2966,7 @@ /types/popcorn/ @grapswiz /types/portscanner/ @douglasduteil /types/postal/ @lokeshpeta @myitcv +/types/postman-collection/ @kbuzby /types/postmark/ @benbayard /types/pouch-redux-middleware/ @charrondev /types/pouchdb/ @AGBrown @geppy @fredgalvao @@ -2913,6 +2998,7 @@ /types/pretty-ms/ @BendingBender /types/printf/ @AluisioASG /types/priorityqueuejs/ @geoffreak +/types/prismic-dom/ @nickw444 /types/prismjs/ @eriklieben @andrewiggins @mmiszy /types/private-ip/ @coderslagoon /types/procfs-stats/ @cyrilschumacher @@ -2970,11 +3056,11 @@ /types/puppeteer/ @marvinhagemeister @cdeutsch @jwbay /types/pure-render-decorator/ @seansfkelley /types/purl/ @danfma -/types/pusher-js/ @tkqubo +/types/pusher-js/ @tkqubo @cainlevy /types/pvutils/ @microshine /types/python-shell/ @dolanmiu @WORMSS /types/q/v0/ @bnemetchek @johnnyreilly -/types/q/ @bnemetchek @AndrewGaspar @johnnyreilly @mboudreau +/types/q/ @bnemetchek @AndrewGaspar @johnnyreilly @mboudreau @TeamworkGuy2 /types/q-io/ @Bartvds /types/q-retry/ @vilic /types/qhistory/ @Kovensky @@ -2997,7 +3083,7 @@ /types/rabbit.js/ @wokim /types/radium/ @alexgorbatchev @nupplaphil @asvetliakov @mihe /types/radius/ @codeanimal -/types/ramda/ @donnut @mdekrey @mrdziuban @sbking @afharo @teves-castro @1M0reBug @hojberg @charlespwd @samsonkeung @angeloocana @raynerd @googol @moshensky @ethanresnick +/types/ramda/ @donnut @mdekrey @mrdziuban @sbking @afharo @teves-castro @1M0reBug @hojberg @charlespwd @samsonkeung @angeloocana @raynerd @googol @moshensky @ethanresnick @leighman /types/random-js/ @pistacchio /types/random-number/ @OpenByteDev /types/random-seed/ @endel @@ -3019,7 +3105,7 @@ /types/raspi-soft-pwm/ @nebrius /types/ratelimiter/ @AyaMorisawa /types/raty/ @terrawheat -/types/raven/ @scttcper @1999 +/types/raven/ @scttcper @1999 @shreyjain1994 /types/raven-for-redux/ @chiubaka /types/raygun4js/ @xt0rted @BenjaminHarding /types/rbac-a/ @tlaziuk @@ -3031,16 +3117,17 @@ /types/rdf-data-model/ @rubensworks /types/rdf-js/ @rubensworks /types/react/v15/ @bbenezech @pzavolinsky @digiguru @ericanderson @morcerf @tkrotoff @DovydasNavickas @onigoetz -/types/react/ @johnnyreilly @bbenezech @pzavolinsky @digiguru @ericanderson @morcerf @tkrotoff @DovydasNavickas @onigoetz @richseviora @theruther4d +/types/react/ @johnnyreilly @bbenezech @pzavolinsky @digiguru @ericanderson @morcerf @tkrotoff @DovydasNavickas @onigoetz @theruther4d @guilhermehubner @joshuakgoldberg @jrakotoharisoa /types/react-alert/ @ssyrell /types/react-alice-carousel/ @endigo /types/react-app/ @prakarshpandey /types/react-aria-menubutton/ @forabi @crohlfs /types/react-autosuggest/ @nicolas-schmitt @pjo256 @robessog @tbayne @cdeutsch @rosskevin -/types/react-beautiful-dnd/ @varHarrie @bradleyayers +/types/react-avatar-editor/ @diogocorrea @gabsprates +/types/react-beautiful-dnd/ @varHarrie @bradleyayers @paustint /types/react-big-calendar/ @piotrwitek @paustint @pikpok /types/react-body-classname/ @mhegazy -/types/react-bootstrap/ @walkerburgin @vsiao @danilojrr @Batbold-Gansukh @octatone @chengsieuly @mretolaza @katbusch @vitosamson @LKay @aaronbeall +/types/react-bootstrap/ @walkerburgin @vsiao @danilojrr @Batbold-Gansukh @octatone @chengsieuly @mretolaza @katbusch @vitosamson @LKay @aaronbeall @jrakotoharisoa /types/react-bootstrap-date-picker/ @LKay @ssi-hu-antal-bodnar /types/react-bootstrap-daterangepicker/ @ianks /types/react-bootstrap-table/v2/ @flaub @alelode @UJosue10 @@ -3098,7 +3185,7 @@ /types/react-flexr/ @pushplay /types/react-fontawesome/ @timurrustamov @dublicator @vincaslt @gavingregory /types/react-form/v1/ @cameron-mcateer -/types/react-form/ @cameron-mcateer +/types/react-form/ @cameron-mcateer @TiuSh /types/react-foundation/ @danielearwicker /types/react-geosuggest/ @brmenchl /types/react-google-recaptcha/ @KoalaHuman @@ -3121,6 +3208,7 @@ /types/react-image-gallery/ @adamwpc /types/react-imageloader/ @stephenjelfs /types/react-infinite/ @rhysd +/types/react-infinite-calendar/ @christianchown /types/react-infinite-scroller/ @Lapanti @psrebniak /types/react-input-calendar/ @stepancar /types/react-input-mask/ @apare @@ -3136,8 +3224,10 @@ /types/react-lazyload/ @m0a /types/react-leaflet/ @danzel @davschne @yuit /types/react-list/ @buptyyf @tomshen -/types/react-loadable/ @Kovensky @odensc @ianks @tlaziuk +/types/react-loadable/ @Kovensky @odensc @ianks @tlaziuk @iMobs /types/react-loader/ @artfuldev +/types/react-mailchimp-subscribe/ @osdiab +/types/react-map-gl/ @rimig /types/react-maskedinput/ @LKay @lavoaster @CarlosBonetti /types/react-mce/ @morphologue /types/react-mdl/ @bradzacher @@ -3147,19 +3237,23 @@ /types/react-monaco-editor/ @jnetterf /types/react-motion/ @stepancar @asvetliakov @dimitarnestorov /types/react-motion-slider/ @asvetliakov -/types/react-native/ @alloy @huhuanming @iRoachie @timwangdev @kamal @nelyousfi -/types/react-native-collapsible/ @iRoachie +/types/react-native/ @alloy @huhuanming @iRoachie @timwangdev @kamal @nelyousfi @alexdunne @swissmanu @bm-software +/types/react-native-android-taskdescription/ @christianchown +/types/react-native-auth0/ @ascariandrea +/types/react-native-collapsible/ @iRoachie @umidbekkarimov /types/react-native-communications/ @huhuanming @PaitoAnderson /types/react-native-datepicker/ @jacobbaskin /types/react-native-doc-viewer/ @iRoachie /types/react-native-document-picker/ @plantain-00 /types/react-native-drawer/ @jnbt /types/react-native-drawer-layout/ @jmfirth +/types/react-native-elevated-view/ @fhelwanger /types/react-native-fabric/ @josephroque /types/react-native-fbsdk/ @ifiokjr /types/react-native-fetch-blob/ @MNBuyskih /types/react-native-fs/ @pocesar @josephroque /types/react-native-google-signin/ @j-fro +/types/react-native-i18n/ @VincentLanglet /types/react-native-keep-awake/ @huhuanming /types/react-native-linear-gradient/ @j-fro /types/react-native-loading-spinner-overlay/ @fhelwanger @@ -3170,23 +3264,29 @@ /types/react-native-modalbox/ @iRoachie /types/react-native-navigation/ @egorshulga /types/react-native-orientation/ @MoLow +/types/react-native-permissions/ @vincentlanglet +/types/react-native-photo-view/ @christianchown /types/react-native-popup-dialog/ @PaitoAnderson @connectdotz /types/react-native-push-notification/ @PaitoAnderson @tomSawkins /types/react-native-qrcode/ @plantain-00 /types/react-native-safari-view/ @mrand01 /types/react-native-scrollable-tab-view/ @CaiHuan @egorshulga /types/react-native-sensor-manager/ @SahinVardar -/types/react-native-snap-carousel/ @jnbt @j-fro +/types/react-native-snap-carousel/ @jnbt @j-fro @gazaret /types/react-native-sortable-grid/ @j-fro /types/react-native-sortable-list/ @sivolobov +/types/react-native-sqlite-storage/ @dryganets +/types/react-native-star-rating/ @iRoachie /types/react-native-svg-uri/ @iRoachie /types/react-native-swiper/ @CaiHuan @huhuanming @mhcgrq /types/react-native-tab-navigator/ @iRoachie /types/react-native-tab-view/ @kaoDev -/types/react-native-touch-id/ @huhuanming +/types/react-native-text-input-mask/ @RodrigoAWeber +/types/react-native-touch-id/ @huhuanming @gazaret /types/react-native-vector-icons/ @iRoachie @timwangdev -/types/react-native-video/ @huhuanming @abrahambotros -/types/react-navigation/ @huhuanming @mhcgrq @fangpenlin @abrahambotros @petejkim @iRoachie @phanalpha @charlesfamu @timwangdev @bang88 @svbutko @levito @robertohuertasm @YourGamesBeOver +/types/react-native-version-number/ @VincentLanglet +/types/react-native-video/ @huhuanming +/types/react-navigation/ @huhuanming @mhcgrq @fangpenlin @petejkim @iRoachie @phanalpha @charlesfamu @timwangdev @bang88 @svbutko @levito @robertohuertasm @YourGamesBeOver @ArmandoAssuncao @cliedeman /types/react-notification-system/ @GiedriusGrabauskas @DeividasBakanas @LKay @sztobar /types/react-notification-system-redux/ @LKay /types/react-numeric-input/ @heatherbooker @@ -3195,6 +3295,7 @@ /types/react-onsenui/ @salim7 @jemmyw /types/react-overlays/ @aaronbeall @vitosamson /types/react-paginate/ @deevus @wouterhardeman @pegel03 @archy-bold +/types/react-places-autocomplete/ @guilhermehubner /types/react-pointable/ @istefo @mdibyo /types/react-portal/ @shuntksh /types/react-props-decorators/ @tkqubo @@ -3204,25 +3305,27 @@ /types/react-redux-i18n/ @clementdevos /types/react-redux-toastr/ @Smiche @artyomsv @kulmajaba /types/react-relay/ @graphcool @voxmatt @alloy @npirotte +/types/react-resize-detector/ @matthew-matvei /types/react-resolver/ @forabi /types/react-responsive/v1/ @asvetliakov /types/react-responsive/ @asvetliakov @alechill @xaviergonz +/types/react-rnd/ @Ragg- /types/react-router/v2/ @sergey-buturlakin @mrk21 @vasek17 @ngbrown @awendland @KostyaEsmukov /types/react-router/v3/ @sergey-buturlakin @mrk21 @vasek17 @ngbrown @awendland @KostyaEsmukov @johnnyreilly @LKay @DovydasNavickas @ssorallen -/types/react-router/ @sergey-buturlakin @mrk21 @vasek17 @ngbrown @awendland @KostyaEsmukov @johnnyreilly @LKay @DovydasNavickas @tkrotoff @huy-nguyen @grmiade @DaIgeb @egorshulga @neuoy +/types/react-router/ @sergey-buturlakin @mrk21 @vasek17 @ngbrown @awendland @KostyaEsmukov @johnnyreilly @LKay @DovydasNavickas @tkrotoff @huy-nguyen @grmiade @DaIgeb @egorshulga @neuoy @rraina /types/react-router-bootstrap/ @vlesierse @LKay @olmobrutall /types/react-router-config/ @lith-light-g -/types/react-router-dom/ @tkrotoff @huy-nguyen -/types/react-router-native/ @ezintz +/types/react-router-dom/ @tkrotoff @huy-nguyen @p-jackson +/types/react-router-native/ @ezintz @fhelwanger /types/react-router-navigation/ @kaoDev /types/react-router-navigation-core/ @kaoDev /types/react-router-redux/v3/ @isman-usoh @noah79 @rosendi /types/react-router-redux/v4/ @isman-usoh @noah79 @rosendi @LKay @DovydasNavickas -/types/react-router-redux/ @huy-nguyen @8398a7 +/types/react-router-redux/ @huy-nguyen @8398a7 @mykolas /types/react-s-alert/ @mitsuruog /types/react-scroll/ @sudoplz @GiedriusGrabauskas /types/react-scrollbar/ @stephenjelfs -/types/react-select/ @Hesquibet @giladgray @iebaker @skirsdeda @vujevits @devrelm @MartynasZilinskas @onatm @ninjaferret @tehbi4 @misantronic +/types/react-select/ @Hesquibet @giladgray @iebaker @skirsdeda @vujevits @devrelm @MartynasZilinskas @onatm @ninjaferret @tehbi4 @misantronic @darkartur /types/react-side-effect/ @remojansen /types/react-sidebar/ @jeroenvervaeke /types/react-sketchapp/ @ricokahler @DomiR @@ -3234,7 +3337,8 @@ /types/react-spinkit/v1/ @tkqubo @mleko @pelotom /types/react-spinkit/ @tkqubo @mleko @pelotom @zzanol /types/react-sticky/ @curtisw0 -/types/react-stripe-elements/ @dan-j @santiagodoldan @sonnysangha +/types/react-stripe-elements/ @dan-j @santiagodoldan @sonnysangha @9y5 @thchia +/types/react-svg/ @viccrubs /types/react-svg-pan-zoom/ @huy-nguyen /types/react-swf/ @stepancar /types/react-swipe/ @DeividasBakanas @@ -3265,8 +3369,9 @@ /types/react-twitter-auth/ @paulfasola /types/react-user-tour/ @ccancellieri /types/react-virtual-keyboard/ @bsurai -/types/react-virtualized/ @kaoDev @guntherjh @wasd171 @szabolcsx @kraenhansen +/types/react-virtualized/ @kaoDev @guntherjh @wasd171 @szabolcsx @kraenhansen @Stevearzh @mgoszcz2 /types/react-virtualized-select/ @seansfkelley +/types/react-webcam/ @squat /types/react-weui/ @tairan /types/react-widgets/ @rogierschouten @sanyatuning @frodehansen2 @r3nya /types/react-widgets-moment/ @dawnmist @@ -3274,7 +3379,7 @@ /types/reactable/ @spielc /types/reactcss/ @chrisgervang @LKay /types/reactstrap/v4/ @alihammad @mfal @danilobjr @fabiopaiva -/types/reactstrap/ @alihammad @mfal @danilobjr @fabiopaiva @FaithForHumans @KurtPreston @kraenhansen @timc13 +/types/reactstrap/ @alihammad @mfal @danilobjr @fabiopaiva @FaithForHumans @KurtPreston @timc13 /types/read/ @timjk /types/read-chunk/ @crispybee /types/read-package-tree/ @mgroenhoff @@ -3286,12 +3391,13 @@ /types/readline-transform/ @dex4er /types/reapop/ @Barrokgl /types/recase/ @18steps -/types/recharts/ @mthmulders @rapmue @royxue @ZheyangSong @richbai90 -/types/recompose/ @iskandersierra @mrapogee @clayne11 +/types/recharts/ @mthmulders @rapmue @royxue @ZheyangSong @richbai90 @caspeco-dan +/types/recluster/ @dex4er +/types/recompose/ @iskandersierra @mrapogee @clayne11 @Pajn /types/reconnectingwebsocket/ @nguarracino /types/recursive-readdir/v1/ @elisee /types/recursive-readdir/ @elisee @MicahZoltu -/types/redis/ @soywiz @CodeAnimal @MugeSo @UppaJung @Rokt33r @43081j +/types/redis/ @soywiz @CodeAnimal @MugeSo @UppaJung @Rokt33r @43081j @barnski /types/redis-errors/ @43081j /types/redis-mock/ @BendingBender /types/redis-rate-limiter/ @westy92 @@ -3315,7 +3421,7 @@ /types/redux-first-router-link/ @janb87 /types/redux-form/v4/ @aikoven /types/redux-form/v6/ @carsonf @aikoven @LKay @bancek -/types/redux-form/ @carsonf @aikoven @LKay @bancek @alsiola @tehbi4 +/types/redux-form/ @carsonf @aikoven @LKay @bancek @alsiola @tehbi4 @huwmartin /types/redux-immutable/ @oizie @sebald @gavingregory /types/redux-immutable-state-invariant/ @remojansen @highflying /types/redux-infinite-scroll/ @silkyfray @@ -3338,6 +3444,7 @@ /types/redux-storage/ @asvetliakov /types/redux-storage-engine-jsurl/ @screendriver /types/redux-storage-engine-localstorage/ @screendriver +/types/redux-test-utils/ @huwmartin /types/redux-ui/ @andyshuxin /types/ref/ @loyd /types/ref-array/ @loyd @@ -3380,7 +3487,7 @@ /types/restler/ @cyrilschumacher /types/restling/ @loghorn /types/resumablejs/ @DanielMcAssey -/types/rethinkdb/ @alexgorbatchev +/types/rethinkdb/ @alexgorbatchev @AdrianFarmadin /types/retry/ @krenor /types/retry-as-promised/ @Raigen /types/rev-hash/ @ikatyang @@ -3396,14 +3503,16 @@ /types/riot/ @Stubb0rn /types/riot-api-nodejs/ @zafixlrp /types/riot-games-api/ @xstoudi +/types/riot-route/ @karak /types/riotcontrol/ @chrootsu /types/riotjs/ @vvakame /types/rison/ @impworks /types/rivets/ @TrevorDev @matjanos /types/roads/ @dancespiele +/types/roads-server/ @dancespiele /types/rollup-plugin-json/ @asmockler /types/ronomon__crypto-async/ @BendingBender -/types/rosie/ @abner @subvertallchris +/types/rosie/ @abner @subvertallchris @abukurov /types/roslib/ @Pro @skycoop @dgorobopec /types/rot-js/ @atiaxi /types/route-parser/ @ianks @bobbuehler @@ -3411,7 +3520,6 @@ /types/royalslider/ @csrakowski /types/rpio/ @DominikPalo @Pencl /types/rrc/ @DeividasBakanas -/types/rrule/ @waratuman /types/rsmq/ @MugeSo /types/rsmq-worker/ @MugeSo /types/rss/ @secondwtq @@ -3448,7 +3556,7 @@ /types/saml20/ @HackerUndKoch /types/samlp/ @horiuchi /types/sammy/ @borisyankov @oising -/types/sanctuary/ @davidchambers @cortopy +/types/sanctuary/ @davidchambers @cortopy @piq9117 /types/sandboxed-module/ @svi3c /types/sane/ @BendingBender /types/sanitize-filename/ @Nemo157 @@ -3472,8 +3580,10 @@ /types/scryptsy/ @micksatana /types/seamless/ @danmana /types/seamless-immutable/ @alex3165 @xsburg @geirsagberg +/types/seededshuffle/ @urish /types/seedrandom/ @kernhanda /types/segment-analytics/ @fongandrew +/types/select2/v3/ @borisyankov /types/select2/ @borisyankov /types/selectables/ @renjfk /types/selectize/ @adidahiya @naBausch @@ -3506,9 +3616,9 @@ /types/semver-diff/ @chrismbarr /types/sencha_touch/ @brian428 /types/send/ @MikeJerred -/types/seneca/ @psnider +/types/seneca/ @psnider @kevynb /types/sequelize/v3/ @samuelneff @codeanimal @drinchev @morpheusxaut @torhal -/types/sequelize/ @samuelneff @codeanimal @drinchev @babolivier @kukoo1 @oktapodia @morpheusxaut @TitaneBoy @zjy01 @nidzov @Raigen @todd +/types/sequelize/ @samuelneff @codeanimal @drinchev @babolivier @kukoo1 @oktapodia @morpheusxaut @TitaneBoy @zjy01 @nidzov @Raigen @todd @nrschultz /types/sequelize-fixtures/ @cschwarz /types/sequencify/ @npenin /types/sequester/ @Strate @@ -3522,12 +3632,13 @@ /types/session-file-store/ @blendsdk @rokt33r /types/set-cookie-parser/ @nickp10 /types/set-value/ @DanielRosenwasser +/types/settings/ @shreyjain1994 /types/sha1/ @arcdev1 /types/shallowequal/ @seansfkelley /types/shapefile/ @DenisCarriere /types/sharedworker/ @nakakura /types/sharepoint/ @gandjustas @andrei-markeev @baywet @teroarvola @dennispg -/types/sharp/ @lith-light-g +/types/sharp/ @lith-light-g @wooseopkim /types/sheetify/ @toddself /types/shell-escape/ @nenadalm /types/shell-quote/ @jason0x43 @@ -3539,7 +3650,7 @@ /types/shortid/ @stpettersens @despairblue /types/shot/ @AJamesPhillips /types/should-sinon/ @Arylo -/types/showdown/ @cbowdon @tan9 +/types/showdown/ @cbowdon @tan9 @arielsaldana /types/shrink-ray/ @forabi /types/siema/ @Irmiz @0x6368656174 @samnau /types/siesta/ @bquarmby @@ -3556,6 +3667,7 @@ /types/simple-oauth2/ @mad-mike /types/simple-peer/ @tlaziuk /types/simple-url-cache/ @a-lucas +/types/simple-websocket/ @dex4er /types/simple-xml/ @notVitaliy /types/simplebar/v1/ @gregonnet @leonard-thieu /types/simplebar/ @gregonnet @leonard-thieu @@ -3566,7 +3678,7 @@ /types/sinon/ @mrbigdog2u @rationull @lumaxis @nicojs @43081j /types/sinon-as-promised/ @igrayson /types/sinon-chai/ @kazimanzurrashid @jedmao -/types/sinon-chrome/ @pimterry @crimx +/types/sinon-chrome/ @pimterry @crimx @kobanyan /types/sinon-express-mock/ @jpchip @tlaziuk /types/sinon-mongoose/ @stevehipwell /types/sinon-stub-promise/ @vintem @tstackhouse @@ -3614,6 +3726,7 @@ /types/sort-array/ @mrmlnc /types/sortablejs/ @Maw-Fox /types/soundmanager2/ @elton2048 +/types/soupbintcp/ @jewbre /types/source-list-map/ @e-cloud /types/source-map-support/ @Bartvds @jason0x43 /types/space-pen/ @vvakame @@ -3637,8 +3750,9 @@ /types/spotify-web-playback-sdk/ @Festify @mraerino @NeoLegends /types/sprintf/ @soywiz @BendingBender /types/sprintf-js/ @jasonswearingen @BendingBender +/types/sql-bricks/ @adn05 @paleo /types/sql.js/ @Hozuki -/types/sqlite3/ @nmalaguti @dpyro +/types/sqlite3/ @nmalaguti @dpyro @BehindTheMath /types/sqlstring/ @marvinhagemeister /types/squirejs/ @bradleyayers /types/srp/ @Patman64 @@ -3660,7 +3774,11 @@ /types/statuses/ @tkrotoff @BendingBender /types/std-mocks/ @jdxcode /types/steam/ @kant2002 +/types/steam-client/ @Slessi +/types/steam-totp/ @phenomax +/types/steamid/ @Slessi /types/steed/ @Paul-Isache +/types/stellar-sdk/ @carl-foster @tristonj /types/stemmer/ @will-ockmore /types/sticky-cluster/ @paustint /types/stompjs/ @jimic @Dr4k4n @@ -3681,9 +3799,11 @@ /types/stream-series/ @k-kagurazaka /types/stream-to-array/v0/ @Bartvds /types/stream-to-array/ @Bartvds @BendingBender +/types/stream-to-promise/ @Alorel /types/streaming-json-stringify/ @BendingBender /types/streamjs/ @erosb /types/strftime/ @cyrilschumacher +/types/strict-uri-encode/ @hoishin /types/string/ @basp /types/string-hash/ @ethanrubio /types/string-similarity/ @ragtime @@ -3693,11 +3813,12 @@ /types/strip-ansi/ @mhegazy /types/strip-bom/ @mhegazy /types/strip-json-comments/ @dmoonfire -/types/stripe/ @wjohnsto @codeanimal @sampsonjoliver @LinusU @brannon @kkamperschroer @starhoshi +/types/stripe/ @wjohnsto @codeanimal @sampsonjoliver @LinusU @brannon @kkamperschroer @starhoshi @bruun /types/stripe-checkout/ @cgwrench /types/stripe-v2/ @ejsmith @amritk @adamcmiel @jleider @galuszkak /types/stripe-v3/ @ejsmith @amritk @adamcmiel @jleider @galuszkak /types/strong-cluster-control/ @shuntksh +/types/strong-error-handler/ @blankstar85 /types/strong-log-transformer/ @azasypkin /types/strophe/ @DavidKDeutsch /types/structured-source/ @azu @@ -3709,7 +3830,7 @@ /types/succinct/ @EnableSoftware /types/sudo-block/ @BendingBender /types/suitescript/ @darrenhillconsulting -/types/sumo-logger/ @forabi +/types/sumo-logger/ @forabi @clementallen /types/superagent/v2/ @varju @NicoZelaya @mxl /types/superagent/ @NicoZelaya @mxl @paplorinc @shreyjain1994 /types/superagent-no-cache/ @mxl @@ -3729,6 +3850,7 @@ /types/swag/ @shiwano /types/swagger-express-middleware/ @alexandreroba /types/swagger-express-mw/ @micmro +/types/swagger-express-validator/ @pinguet62 /types/swagger-hapi/ @micmro /types/swagger-jsdoc/ @drGrove /types/swagger-node-runner/ @micmro @@ -3755,6 +3877,7 @@ /types/tabris-plugin-firebase/ @eclipsesource /types/tabtab/ @vojtechhabarta /types/tabulator/ @euginio +/types/tapable/v0/ @e-cloud /types/tapable/ @e-cloud /types/tape/ @Bartvds @sodatea @DennisSchwartz @mikehenrty /types/tar/ @SomaticIT @connor4312 @@ -3775,6 +3898,7 @@ /types/text-buffer/ @GlenCFL /types/text-encoding/ @pine613 /types/text-encoding-utf-8/ @trxcllnt +/types/textarea-caret/ @shiftkey /types/three/ @gyohk @florentpoujol @SereznoKot @omni360 @ivoisbelongtous @piranha771 @qszhusightp @nakakura @s093294 @Pro @efokschaner @PsychoSTS @dhritzkiv @apurvaojas /types/thrift/ @kamek-pf @kevin-greene-ck @jessezhang91 /types/throng/ @cyrilschumacher @tatethurston @@ -3792,10 +3916,11 @@ /types/timer-machine/ @dolanmiu /types/timezone-js/ @bonnici /types/tinder/ @pingec +/types/tiny-slider-react/ @screendriver /types/tinycolor2/ @M-Zuber @geertjansen @nvh /types/tinycopy/ @vvatanabe /types/tinymce/ @martinduparc @ipoul @nicohartto -/types/titanium/ @cyounkins +/types/titanium/ @appcelerator @janvennemann /types/title/ @fa7ad /types/tldjs/ @geoffreak /types/tmp/ @optical @Perlmint @@ -3806,7 +3931,7 @@ /types/toastr/ @borisyankov /types/tocktimer/ @evanshortiss /types/tooltipster/ @stephenlautier @pjmagee @VorobeY1326 @leonard-thieu @janhi @joeskeen -/types/topojson/ @ricardo-mello @chenzhutian +/types/topojson/ @ricardo-mello @chenzhutian @denisname /types/torrent-stream/ @xstoudi /types/touch/ @mizunashi-mana @BendingBender /types/touch-events/ @kevinb7 @@ -3815,13 +3940,14 @@ /types/tracking/ @pimterry /types/transducers-js/ @colinkahn @dphilipson @NaridaL /types/transducers.js/ @dphilipson -/types/trash/ @matthew-matvei +/types/trash/ @matthew-matvei @hoishin /types/traverse/ @newclear /types/traverson/ @marcinporebski /types/trayballoon/ @korve /types/tress/ @sindilevich /types/trim/ @skysteve /types/trunk8/ @niemyjski +/types/tryer/ @bengry /types/tspromise/ @soywiz /types/tunnel/ @BendingBender /types/tus-js-client/ @kevhiggins @@ -3847,9 +3973,11 @@ /types/typescript-deferred/ @DirtyHairy /types/tz-format/ @samverschueren /types/ua-parser-js/ @superduper @legendecas @MeLlamoPablo -/types/uglify-js/ @tkrotoff +/types/uglify-js/v2/ @tkrotoff +/types/uglify-js/ @alan-agius4 @tkrotoff /types/uglifycss/ @blendsdk -/types/ui-grid/ @btesser @joeskeen +/types/uglifyjs-webpack-plugin/ @vajkayrene +/types/ui-grid/ @btesser @joeskeen @pbojanczyk /types/ui-router-extras/ @mputters @marcel-k @LaserUnicorns /types/ui-select/ @nkovacic /types/uid-safe/ @geoffreak @@ -3858,7 +3986,7 @@ /types/ultra-strftime/ @dex4er /types/umbraco/ @DeCareSystemsIreland /types/umd/ @TeamworkGuy2 -/types/umzug/ @drinchev @mlamp +/types/umzug/ @drinchev @mlamp @trodi /types/underscore/ @borisyankov @jbaldwin @ccurrens @clottman /types/underscore-ko/ @MagicMau /types/underscore.string/ @rygine @@ -3878,7 +4006,7 @@ /types/unzip/ @coding2012 /types/unzipper/ @s73obrien /types/update-notifier/v1/ @vvakame @nchen63 -/types/update-notifier/ @vvakame @nchen63 +/types/update-notifier/ @vvakame @nchen63 @bitjson /types/upng-js/ @plantain-00 /types/uppercamelcase/ @plantain-00 /types/urbanairship-cordova/ @Justin-Credible @@ -3909,13 +4037,13 @@ /types/uuid-1345/ @mugeso /types/uuid-js/ @mhegazy /types/uuid-validate/ @HiromiShikata -/types/uws/ @plantain-00 +/types/uws/ @plantain-00 @orblazer /types/valdr/ @ilbertz /types/valdr-message/ @ilbertz /types/valerie/ @conficient /types/vali-date/ @SamVerschueren /types/valid-url/ @stevehipwell -/types/validator/ @tgfjt @chrootsu @IOAyman @louy @kacepe @deptno +/types/validator/ @tgfjt @chrootsu @IOAyman @louy @kacepe @deptno @builtinnya /types/validatorjs/ @LKay @danmana /types/vanilla-modal/ @samnau /types/vanilla-tilt/ @BrunnerLivio @@ -3963,6 +4091,7 @@ /types/w2ui/ @Ptival /types/w3c-generic-sensor/ @kenchris /types/w3c-image-capture/ @cosium +/types/w3c-permissions/ @jberube /types/w3c-screen-orientation/ @kenchris /types/w3c-web-usb/ @larsgk /types/waitme/ @totpero @@ -3987,12 +4116,14 @@ /types/webcl/ @NCARalph /types/webcomponents.js/ @adidahiya /types/webcrypto/ @iislucas -/types/webdriverio/ @nmalaguti @timbru31 @fsmedberg-tc @tanvirislam06 +/types/webdriverio/ @nmalaguti @timbru31 @fsmedberg-tc @tanvirislam06 @phil-lgr /types/webfontloader/ @doskallemaskin /types/webgl-ext/ @zenmumbler /types/webgl2/ @nkemnitz +/types/webidl2/ @saschanaz /types/webmidi/ @lostfictions -/types/webpack/ @tkqubo @bumbleblym @bcherny @tommytroylin @mohsen1 @jcreamer898 @ahmed-taj @alan-agius4 @elliottsj @jason0x43 +/types/webpack/v3/ @tkqubo @bumbleblym @bcherny @tommytroylin @mohsen1 @jcreamer898 @ahmed-taj @alan-agius4 @elliottsj @jason0x43 +/types/webpack/ @tkqubo @bumbleblym @bcherny @tommytroylin @mohsen1 @jcreamer898 @ahmed-taj @alan-agius4 @elliottsj @jason0x43 @dennispg /types/webpack-bundle-analyzer/ @kryops /types/webpack-chain/ @eirikurn @psachs21 /types/webpack-chunk-hash/ @mtraynham @@ -4017,12 +4148,14 @@ /types/webspeechapi/ @saschanaz /types/websql/ @TeamworkGuy2 /types/webtorrent/ @niieani @tlaziuk -/types/webvr-api/ @lostfictions +/types/webvr-api/ @efokschaner /types/week/ @sindrenm /types/weighted/ @ccitro -/types/weixin-app/ @taoqf +/types/weixin-app/ @taoqf @AlexStacker /types/wellknown/ @yairtawil +/types/whatwg-mimetype/ @petejohanson /types/whatwg-streams/ @saschanaz +/types/whatwg-url/ @aomarks /types/wheel/ @BTOdell /types/when/ @derekcicerone @Nemo157 /types/which/ @vvakame @cspotcode @@ -4039,19 +4172,22 @@ /types/winrt-uwp/ @saschanaz @taylor224 /types/winston/ @bonnici @codeanimal @DABH /types/winston-dynamodb/ @nickiannone +/types/winston-syslog/ @cjbarth /types/wiring-pi/ @NoHomey /types/wnumb/ @acoreyj /types/wonder.js/ @yyc-git /types/word-list-json/ @dovidm /types/wordcloud/ @joeskeen /types/words-to-numbers/ @James-Frowen +/types/wpapi/ @guoyunhe +/types/wrap-ansi/v2/ @kayahr /types/wrap-ansi/ @kayahr /types/wreck/ @marcinporebski /types/wrench/ @soywiz /types/write-file-atomic/ @BendingBender /types/write-json-file/ @DenisCarriere /types/write-pkg/ @azasypkin -/types/ws/ @loyd @elithrar @mlamp @TitaneBoy +/types/ws/ @loyd @elithrar @mlamp @TitaneBoy @orblazer /types/wtfnode/ @dex4er /types/wu/ @phiresky /types/wx-js-sdk-dt/ @agasbzj @@ -4086,6 +4222,7 @@ /types/yargs/ @poelstra @mizunashi-mana @pushplay @jeffkenney @JimiC /types/yauzl/ @ffflorian /types/yayson/ @Codesleuth +/types/yazl/ @taoqf /types/ydn-db/ @yathit @gabrielmaldi /types/yeoman-generator/ @armorik83 @janslow @ikatyang /types/yeoman-test/ @ikatyang diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4217471f9d..b1a1039f82 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,6 +2,7 @@ Please fill in this template. - [ ] Use a meaningful title for the pull request. Include the name of the package modified. - [ ] Test the change in your own code. (Compile and run.) +- [ ] Add or edit tests to reflect the change. (Run with `npm test`.) - [ ] Follow the advice from the [readme](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#make-a-pull-request). - [ ] Avoid [common mistakes](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#common-mistakes). - [ ] Run `npm run lint package-name` (or `tsc` if no `tslint.json` is present). @@ -9,7 +10,7 @@ Please fill in this template. Select one of these and delete the others: If adding a new definition: -- [ ] The package does not provide its own types, and you can not add them. +- [ ] The package does not already provide its own types, or cannot have its `.d.ts` files generated via `--declaration` - [ ] If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package. - [ ] Create it with `dts-gen --dt`, not by basing it on an existing project. - [ ] `tslint.json` should be present, and `tsconfig.json` should have `noImplicitAny`, `noImplicitThis`, `strictNullChecks`, and `strictFunctionTypes` set to `true`. diff --git a/README.md b/README.md index cc59284394..7c58fe8901 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ If it doesn't, you can do so yourself in the comment associated with the PR. #### Create a new package -If you are the library author, or can make a pull request to the library, [bundle types](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) instead of publishing to DefinitelyTyped. +If you are the library author and your package is written in TypeScript, [bundle the autogenerated declaration files](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) in your package instead of publishing to DefinitelyTyped. If you are adding typings for an NPM package, create a directory with the same name. If the package you are adding typings for is not on NPM, make sure the name you choose for it does not conflict with the name of a package on NPM. @@ -239,7 +239,8 @@ If types are part of a web standard, they should be contributed to [TSJS-lib-gen #### A package uses `export =`, but I prefer to use default imports. Can I change `export =` to `export default`? -If default imports work in your environment, consider turning on the [`--allowSyntheticDefaultImports`](http://www.typescriptlang.org/docs/handbook/compiler-options.html) compiler option. +If you are using TypeScript 2.7 or later, use `--esModuleInterop` in your project. +Otherwise, if default imports work in your environment (e.g. Webpack, SystemJS, esm), consider turning on the [`--allowSyntheticDefaultImports`](http://www.typescriptlang.org/docs/handbook/compiler-options.html) compiler option. Do not change the type definition if it is accurate. For an NPM package, `export =` is accurate if `node -p 'require("foo")'` is the export, and `export default` is accurate if `node -p 'require("foo").default'` is the export. diff --git a/notNeededPackages.json b/notNeededPackages.json index a3423d479c..2b9e1fcde0 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -174,6 +174,12 @@ "sourceRepoURL": "https://github.com/MikeMcl/bignumber.js/", "asOfVersion": "5.0.0" }, + { + "libraryName": "bingmaps", + "typingsPackageName": "bingmaps", + "sourceRepoURL": "https://github.com/Microsoft/Bing-Maps-V8-TypeScript-Definitions", + "asOfVersion": "2.0.15" + }, { "libraryName": "botvs", "typingsPackageName": "botvs", @@ -204,6 +210,12 @@ "sourceRepoURL": "https://github.com/blakeembrey/camel-case", "asOfVersion": "1.2.1" }, + { + "libraryName": "catalog", + "typingsPackageName": "catalog", + "sourceRepoURL": "https://github.com/interactivethings/catalog", + "asOfVersion": "3.5.0" + }, { "libraryName": "chalk", "typingsPackageName": "chalk", @@ -228,6 +240,12 @@ "sourceRepoURL": "https://github.com/saltyrtc/chunked-dc-js", "asOfVersion": "0.2.2" }, + { + "libraryName": "colors.js (colors)", + "typingsPackageName": "colors", + "sourceRepoURL": "https://github.com/Marak/colors.js", + "asOfVersion": "1.2.1" + }, { "libraryName": "commander", "typingsPackageName": "commander", @@ -1134,6 +1152,12 @@ "sourceRepoURL": "https://github.com/react-ga/react-ga", "asOfVersion": "2.3.0" }, + { + "libraryName": "react-native-collapsible", + "typingsPackageName": "react-native-collapsible", + "sourceRepoURL": "https://github.com/oblador/react-native-collapsible", + "asOfVersion": "0.11.0" + }, { "libraryName": "react-native-elements", "typingsPackageName": "react-native-elements", @@ -1260,6 +1284,12 @@ "sourceRepoURL": "https://github.com/router5/router5", "asOfVersion": "5.0.0" }, + { + "libraryName": "rrule", + "typingsPackageName": "rrule", + "sourceRepoURL": "https://github.com/jakubroztocil/rrule", + "asOfVersion": "2.2.9" + }, { "libraryName": "rvo2", "typingsPackageName": "rvo2", diff --git a/types/ace/index.d.ts b/types/ace/index.d.ts index 822c394a32..1f7dd9752b 100644 --- a/types/ace/index.d.ts +++ b/types/ace/index.d.ts @@ -52,6 +52,10 @@ declare namespace AceAjax { export interface TokenInfo { value: string; + + index?: number; + + start?: number; } export interface Position { @@ -575,7 +579,7 @@ declare namespace AceAjax { * @param row The row number to retrieve from * @param column The column number to retrieve from **/ - getTokenAt(row: number, column: number): TokenInfo; + getTokenAt(row: number, column: number): TokenInfo|null; /** * Sets the undo manager. diff --git a/types/actions-on-google/assistant-app.d.ts b/types/actions-on-google/assistant-app.d.ts index d835915259..76a206122c 100644 --- a/types/actions-on-google/assistant-app.d.ts +++ b/types/actions-on-google/assistant-app.d.ts @@ -1,6 +1,7 @@ import * as express from 'express'; -import { BasicCard, Carousel, ImageDisplays, List, OptionItem, RichResponse } from './response-builder'; +import { BasicCard, BrowseCarousel, BrowseItem, Carousel, ImageDisplays, List, MediaObject, + MediaResponse, MediaValues, OptionItem, RichResponse, SimpleResponse } from './response-builder'; import { ActionPaymentTransactionConfig, Cart, GooglePaymentTransactionConfig, LineItem, Location, Order, OrderUpdate, TransactionDecision, TransactionValues } from './transactions'; @@ -30,6 +31,8 @@ export enum StandardIntents { DELIVERY_ADDRESS, /** App fires TRANSACTION_DECISION intent when action asks for transaction decision. */ TRANSACTION_DECISION, + /** App fires PLACE intent when action asks for place. */ + PLACE, /** App fires CONFIRMATION intent when requesting affirmation from user. */ CONFIRMATION, /** App fires DATETIME intent when requesting date/time from user. */ @@ -45,7 +48,11 @@ export enum StandardIntents { /** App fires REGISTER_UPDATE intent when requesting user to register for proactive updates. */ REGISTER_UPDATE, /** App receives CONFIGURE_UPDATES intent to indicate a REGISTER_UPDATE intent should be sent. */ - CONFIGURE_UPDATES + CONFIGURE_UPDATES, + /** App fires LINK intent to request user to open to link. */ + LINK, + /** App receives MEDIA_STATUS intent when the MediaResponse status is updated from user. */ + MEDIA_STATUS } /** @@ -101,6 +108,10 @@ export enum BuiltInArgNames { * Transactions decision argument. */ TRANSACTION_DECISION_VALUE, + /** + * Place value argument. + */ + PLACE, /** * Confirmation argument. */ @@ -126,7 +137,11 @@ export enum BuiltInArgNames { */ NEW_SURFACE, /** Update registration value argument. */ - REGISTER_UPDATE + REGISTER_UPDATE, + /** Link request result argument. */ + LINK, + /** MediaStatus value argument. */ + MEDIA_STATUS } /** @@ -173,6 +188,14 @@ export enum SurfaceCapabilities { * The ability to output on a screen */ SCREEN_OUTPUT, + /** + * The ability to output a MediaResponse + */ + MEDIA_RESPONSE_AUDIO, + /** + * The ability to open a web URL + */ + WEB_BROWSER } /** @@ -223,6 +246,18 @@ export enum SignInStatus { ERROR } +/** + * SKU (Stock Keeping Units) types for Play Package Entitlements. + */ +export enum EntitlementSkuTypes { + /** In app purchase */ + IN_APP, + /** In app subscription */ + SUBSCRIPTION, + /** Paid app. */ + APP +} + /** * Possible update trigger time context frequencies. */ @@ -259,10 +294,15 @@ export interface UserName { familyName: string; } +export interface LocationCoordinates { + latitude: number; + longitude: number; +} + /** - * User's permissioned device location. + * Location information. */ -export interface DeviceLocation { +export interface Location { /** Coordinates: {latitude, longitude}. Requested with SupportedPermissions.DEVICE_PRECISE_LOCATION. */ coordinates: Coordinates; /** Full, formatted street address. Requested with SupportedPermissions.DEVICE_PRECISE_LOCATION. */ @@ -273,6 +313,22 @@ export interface DeviceLocation { city: string; } +/** + * User's permissioned device location. + */ +export type DeviceLocation = Location; + +/** + * Place information. + */ +export interface Place extends Location { + /** + * Used with Places API to fetch details of a place. + * See {@link https://developers.google.com/places/web-service/place-id} + */ + placeId: string; +} + /** * Coordinates containing latitude and longitude */ @@ -309,6 +365,33 @@ export interface User { userStorage: string; } +/** + * Google Play Android App Package Entitlements. + */ +export interface PackageEntitlement { + /** Name of the Android app package. */ + packageName: string; + /** List of entitlements for a given app. */ + entitlements: Entitlement[]; +} + +/** + * A user's digital entitlement. + */ +export interface Entitlement { + /** Product SKU. Matches getSku() in Google Play InApp Billing API. */ + sku: string; + /** The type of SKU. One of EntitlementSkuType. */ + skuType: string; + /** For in app purchases/subscriptions, relevant details. */ + inAppDetails: { + /** JSON data of the in app purchase. */ + inAppPurchaseData: object; + /** Matches IN_APP_DATA_SIGNATURE from getPurchases() method in Play InApp Billing API. */ + inAppDataSignature: object; + }; +} + /** * Actions on Google Surface. */ @@ -437,6 +520,16 @@ export class AssistantApp { */ readonly Transactions: typeof TransactionValues; + /** + * Values related to supporting {@link Media}. + */ + readonly Media: typeof MediaValues; + + /** + * SKU (Stock Keeping Units) types for Play Package Entitlements. + */ + readonly EntitlementSkuTypes: typeof EntitlementSkuTypes; + /** * Possible update trigger time context frequencies. */ @@ -923,6 +1016,80 @@ export class AssistantApp { */ askForDeliveryAddress(reason: string, dialogState?: object): express.Response | null; + /** + * Asks user to provide a geo-located place, possibly using contextual information, + * like a store near the user's location or a contact's address. + * + * Developer provides custom text prompts to tailor the request handled by Google. + * + * @example + * // For DialogflowApp: + * + * // Dialogflow Actions + * const Actions = { + * WELCOME: 'input.welcome', + * PLACE: 'get.place' // Create Dialogflow Action with actions_intent_PLACE event + * }; + * + * const app = new DialogflowApp({request, response}); + * + * function handleWelcome (app) { + * const requestPrompt = 'Where do you want to get picked up?'; + * const permissionContext = 'To find a place to pick you up'; + * app.askForPlace(requestPrompt, permissionContext); + * } + * + * function handlePlace (app) { + * const place = app.getPlace(); + * if (place) { + * app.tell(`Ah, I see. You want to get picked up at ${place.address}`); + * } else { + * app.tell(`Sorry, I couldn't find where you want to get picked up`); + * } + * } + * + * const actionMap = new Map(); + * actionMap.set(Actions.WELCOME, handleWelcome); + * actionMap.set(Actions.PLACE, handlePlace); + * app.handleRequest(actionMap); + * + * // For ActionsSdkApp: + * const app = new ActionsSdkApp({ request, response }); + * + * function handleWelcome (app) { + * const requestPrompt = 'Where do you want to get picked up?'; + * const permissionContext = 'To find a place to pick you up'; + * app.askForPlace(requestPrompt, permissionContext); + * } + * + * function handlePlace (app) { + * const place = app.getPlace(); + * if (place) { + * app.tell(`Ah, I see. You want to get picked up at ${place.address}`); + * } else { + * app.tell(`Sorry, I couldn't find where you want to get picked up`); + * } + * } + * + * const actionsMap = new Map(); + * actionsMap.set(app.StandardIntents.MAIN, handleWelcome); + * actionsMap.set(app.StandardIntents.PLACE, handlePlace); + * app.handleRequest(actionsMap); + * + * @param requestPrompt This is the initial response by location sub-dialog. + * For example: "Where do you want to get picked up?" + * @param permissionContext This is the context for seeking permissions. + * For example: "To find a place to pick you up" + * Prompt to user: "*To find a place to pick you up*, I just need to check your location. + * Can I get that from Google?". + * @param dialogState JSON object the app uses to hold dialog state that + * will be circulated back by Assistant. + * @return HTTP response. + * @actionssdk + * @dialogflow + */ + askForPlace(requestPrompt: string, permissionContext: string, dialogState?: object): express.Response | null; + /** * Asks user for a confirmation. * @@ -1131,6 +1298,72 @@ export class AssistantApp { */ askToRegisterDailyUpdate(intent: string, intentArguments: IntentArgument[], dialogState?: object): express.Response | null; + /** + * Requests the user to transfer to a linked out Android app intent. Using this feature + * requires verifying the linked app in the (Actions console)[console.actions.google.com]. + * + * @example + * // For DialogflowApp: + * + * // Dialogflow Actions + * const WELCOME_ACTION = 'input.welcome'; + * const HANDLE_LINK = 'handle.link'; // Create Dialogflow Action with actions_intent_LINK event + * + * const app = new DialogflowApp({ request, response }); + * + * console.log('Request headers: ' + JSON.stringify(request.headers)); + * console.log('Request body: ' + JSON.stringify(request.body)); + * + * function requestLink (app) { + * app.askToDeepLink('Great! Looks like we can do that in the app.', 'Google', + * 'example://gizmos', 'com.example.gizmos', 'handle this for you'); + * } + * + * function handleLink (app) { + * const linkStatus = app.getLinkStatus(); + * app.tell('Okay maybe we can take care of that another time.'); + * } + * + * const actionMap = new Map(); + * actionMap.set(WELCOME_ACTION, requestLink); + * actionMap.set(HANDLE_LINK, handleLink); + * app.handleRequest(actionMap); + * + * // For ActionsSdkApp + * const app = new ActionsSdkApp({ request, response }); + * + * console.log('Request headers: ' + JSON.stringify(request.headers)); + * console.log('Request body: ' + JSON.stringify(request.body)); + * + * function requestLink (app) { + * app.askToDeepLink('Great! Looks like we can do that in the app.', 'Google', + * 'example://gizmos', 'com.example.gizmos', 'handle this for you.'); + * } + * + * function handleLink (app) { + * const linkStatus = app.getLinkStatus(); + * app.tell('Okay maybe we can take care of that another time.'); + * } + * + * const actionMap = new Map(); + * actionMap.set(app.StandardIntents.MAIN, requestLink); + * actionMap.set(app.StandardIntents.LINK, handleLink); + * app.handleRequest(actionMap); + * + * @param prompt A simple response to prepend to the link request. + * @param destinationName The name of the link destination. + * @param url URL of Android deep link. + * @param packageName Android app package name to which to link. + * @param reason The reason to transfer the user. This may be appended to a + * Google-specified prompt. + * @param dialogState JSON object the app uses to hold dialog state that + * will be circulated back by Assistant. Used in {@link ActionsSdkApp}. + * @return HTTP response. + * @dialogflow + * @actionssdk + */ + askToDeepLink(prompt: string | SimpleResponse | null, destinationName: string, url: string, packageName: string, reason?: string | null, dialogState?: object): express.Response | null; + /** * Gets the {@link User} object. * The user object contains information about the user, including @@ -1209,6 +1442,20 @@ export class AssistantApp { */ getLastSeen(): Date | null; + /** + * Get the the list of all digital goods that your user purchased from + * your published Android apps. To enable this feature, see the instructions + * in the (documentation)[https://developers.google.com/actions/identity/digital-goods]. + * + * @example + * const app = new DialogflowApp({request, response}); + * const packageEntitlements = app.getPackageEntitlements(); + * + * @return The list of digital goods purchased by the user in + * any verified Android app package. Null if no Package Entitlements present in the request. + */ + getPackageEntitlements(): PackageEntitlement[] | null; + /** * If granted permission to device's location in previous intent, returns device's * location (see {@link AssistantApp#askForPermissions|askForPermissions}). @@ -1273,6 +1520,15 @@ export class AssistantApp { */ getTransactionDecision(): TransactionDecision; + /** + * Gets the user provided place. Use after askForPlace. + * + * @return Place information given by the user. Null if no place given. + * @dialogflow + * @actionssdk + */ + getPlace(): Place | null; + /** * Gets confirmation decision. Use after askForConfirmation. * @@ -1304,6 +1560,31 @@ export class AssistantApp { */ getSignInStatus(): string; + /** + * Get status of MEDIA_STATUS intent. + * + * @example + * const app = new DialogflowApp({request: request, response: response}); + * + * function mediaStatusIntent (app) { + * const status = app.getMediaStatus(); + * if (status === app.Media.Status.FINISHED) { + * app.tell('Oh, I see you are done playing the media!'); + * } else { + * app.tell(`I don't understand the current media status: ${status}`); + * } + * } + * + * const actionMap = new Map(); + * actionMap.set(app.StandardIntents.MEDIA_STATUS, mediaStatusIntent); + * app.handleRequest(actionMap); + * + * @return Result of media status intent. + * @dialogflow + * @actionssdk + */ + getMediaStatus(): MediaValues.Status | null; + /** * Returns true if user device has a given surface capability. * @@ -1464,6 +1745,16 @@ export class AssistantApp { */ isUpdateRegistered(): boolean; + /** + * Returns the status of a link request. Used with + * {@link AssistantApp#askToDeepLink} + * + * @return The status code of the request to link. + * @dialogflow + * @actionssdk + */ + getLinkStatus(): number; + // --------------------------------------------------------------------------- // Response Builders // --------------------------------------------------------------------------- @@ -1500,6 +1791,13 @@ export class AssistantApp { */ buildCarousel(): Carousel; + /** + * Constructs a Browse Carousel with chainable property setters. + * + * @return Constructed Browse Carousel. + */ + buildBrowseCarousel(): BrowseCarousel; + /** * Constructs OptionItem with chainable property setters. * @@ -1512,6 +1810,15 @@ export class AssistantApp { */ buildOptionItem(key?: string, synonyms?: string | string[]): OptionItem; + /** + * Constructs BrowseItem for the Browse Carousel with chainable property setters. + * + * @param title The displayed title of the Browse Carousel card. + * @param url The URL linked to by clicking the card. + * @return Constructed BrowseItem. + */ + buildBrowseItem(title?: string, url?: string): BrowseItem; + // --------------------------------------------------------------------------- // Transaction Builders // --------------------------------------------------------------------------- @@ -1552,4 +1859,24 @@ export class AssistantApp { * @return Constructed OrderUpdate. */ buildOrderUpdate(orderId: string, isGoogleOrderId: boolean): OrderUpdate; + + // --------------------------------------------------------------------------- + // Media Builders + // --------------------------------------------------------------------------- + + /** + * Constructs Media Response with chainable property setters. + * + * @return Constructed Media Response. + */ + buildMediaResponse(): MediaResponse; + + /** + * Constructs MediaObject with chainable property setters. + * + * @param name Name of media file. + * @param contentUrl Location of media file. + * @return Constructed MediaObject. + */ + buildMediaObject(name: string, contentUrl: string): MediaObject; } diff --git a/types/actions-on-google/index.d.ts b/types/actions-on-google/index.d.ts index 937943e1f0..943554586f 100644 --- a/types/actions-on-google/index.d.ts +++ b/types/actions-on-google/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for actions-on-google 1.8 +// Type definitions for actions-on-google 1.10 // Project: https://github.com/actions-on-google/actions-on-google-nodejs // Definitions by: Joel Hegg // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/types/actions-on-google/response-builder.d.ts b/types/actions-on-google/response-builder.d.ts index 227d102958..9844fe45c1 100644 --- a/types/actions-on-google/response-builder.d.ts +++ b/types/actions-on-google/response-builder.d.ts @@ -27,6 +27,53 @@ export enum ImageDisplays { CROPPED } +/** + * Values related to supporting media. + */ +export namespace MediaValues { + /** + * Type of the media within a MediaResponse. + */ + enum Type { + /** + * Unspecified. + */ + MEDIA_TYPE_UNSPECIFIED, + /** + * Audio stream. + */ + AUDIO + } + + /** + * List of media control status' returned. + */ + enum Status { + /** + * Unspecified. + */ + UNSPECIFIED, + /** + * Finished. + */ + FINISHED + } + + /** + * List of possible item types. + */ + enum ImageType { + /** + * Icon. + */ + ICON, + /** + * Large image. + */ + LARGE + } +} + /** * Simple Response type. */ @@ -155,6 +202,22 @@ export class RichResponse { */ addBasicCard(basicCard: BasicCard): RichResponse; + /** + * Adds media to this response. + * + * @param mediaResponse MediaResponse to include in response. + * @return Returns current constructed RichResponse. + */ + addMediaResponse(mediaResponse: MediaResponse): RichResponse; + + /** + * Adds a Browse Carousel to list of items. + * + * @param browseCarousel Browse Carousel to present to user + * @return Returns current constructed RichResponse. + */ + addBrowseCarousel(browseCarousel: string | BrowseCarousel): RichResponse; + /** * Adds a single suggestion or list of suggestions to list of items. * @@ -325,6 +388,43 @@ export class List { addItems(optionItems: OptionItem | OptionItem[]): List; } +/** + * Class for initializing and constructing BrowseCarousel with chainable interface. + */ +export class BrowseCarousel { + /** + * Constructor for BrowseCarousel. Accepts optional BrowseCarousel to + * clone or list of items to copy. + * + * @param carousel Either a carousel to clone + * or an array of BrowseItem to initialize a new carousel + */ + constructor(carousel?: BrowseCarousel | BrowseItem[]); + + /** + * List of 2-20 items to show in this carousel. Required. + */ + items: BrowseItem[]; + + /** + * Adds a single item or list of items to the carousel. + * + * @param browseItems BrowseItems to add. + * @return Returns current constructed BrowseCarousel. + */ + addItems(browseItems: BrowseItem | BrowseItem[]): BrowseCarousel; + + /** + * Sets the display options for the images in this carousel. + * Use one of the image display constants. If none is chosen, + * ImageDisplays.DEFAULT will be enforced. + * + * @param option The option for displaying the image. + * @return Returns current constructed BrowseCarousel. + */ + setImageDisplay(option: ImageDisplays): BrowseCarousel; +} + /** * Class for initializing and constructing Carousel with chainable interface. */ @@ -350,6 +450,120 @@ export class Carousel { * @return Returns current constructed Carousel. */ addItems(optionItems: OptionItem | OptionItem[]): Carousel; + + /** + * Sets the display options for the images in this carousel. + * Use one of the image display constants. If none is chosen, + * ImageDisplays.DEFAULT will be enforced. + * + * @param option The option for displaying the image. + * @return Returns current constructed Carousel. + */ + setImageDisplay(option: ImageDisplays): Carousel; +} + +/** + * Class for initializing and constructing Option Items with chainable interface. + */ +export class BrowseItem { + /** + * Constructor for BrowseItem. Accepts a title and URL for the Browse Item + * card. + * + * @param title The title of the Browse Item card. + * @param url The URL of the link opened by clicking the Browse Item card. + */ + constructor(title?: string, url?: string); + + /** + * Title of the browse item. Required. + */ + title: string; + + /** + * Description text of the item. Optional. + */ + description?: string; + + /** + * Footer text of the item. Optional. + */ + footer?: string; + + /** + * Image to show on item. Optional. + */ + image?: Image; + + /** + * Url to that clicking the card opens. Optional. + */ + openUrlAction?: object; + + /** + * @return Returns the possible valid values for URL type hints + */ + urlTypeHints(): object; + + /** + * Sets the title for this Browse Item. + * + * @param title Title to show on item. + * @return Returns current constructed BrowseItem. + */ + setTitle(title: string): BrowseItem; + + /** + * Sets the description for this Browse Item. + * + * @param description Description to show on item. + * @return Returns current constructed BrowseItem. + */ + setDescription(description: string): BrowseItem; + + /** + * Sets the footer for this Browse Item. + * + * @param footerText text to show on item. + * @return Returns current constructed BrowseItem. + */ + setFooter(footerText: string): BrowseItem; + + /** + * Sets the image for this Browse Item. + * + * @param url Image source URL. + * @param accessibilityText Text to replace for image for accessibility. + * @param width Width of the image. + * @param height Height of the image. + * @return Returns current constructed BrowseItem. + */ + setImage(url: string, accessibilityText: string, width?: number, height?: number): BrowseItem; + + /** + * Sets the Open URL action - which includes the url and possibly the typeHint + * + * @param url Image source URL. + * @param urlTypeHint One of the typeHints enumerated by this.urlTypeHints() + * @return Returns the current constructed BrowseItem + */ + setOpenUrlAction(url: string, urlTypeHint?: string): BrowseItem; + + /** + * Sets the URL target of the BrowseItem card + * + * @param url Image source URL. + * @return Returns the current constructed BrowseItem + */ + setUrl(url: string): BrowseItem; + + /** + * Sets the URL type hint for the BrowseItem card + * + * @param urlTypeHint One of the typeHints enumerated by this.urlTypeHints() + * @return Returns the current constructed BrowseItem + */ + setUrlTypeHint(urlTypeHint: string): BrowseItem; } /** @@ -430,6 +644,90 @@ export class OptionItem { addSynonyms(synonyms: string | string[]): OptionItem; } +/** + * Class for initializing and constructing MediaResponse with chainable interface. + */ +export class MediaResponse { + /** + * Constructor for MediaResponse. + * @param mediaType Type of the media which defaults to MediaValues.Type.AUDIO + */ + constructor(mediaType: MediaValues.Type); + + /** + * Array of MediaObject held in the MediaResponse. + */ + mediaObjects: MediaObject[]; + + /** + * Type of the media within this MediaResponse + */ + mediaType: MediaValues.Type; + + /** + * Adds a single media file or list of media files to the cart. + * + * @param items Single or Array of MediaObject to add. + * @return Returns current constructed MediaResponse. + */ + addMediaObjects(items: MediaObject | MediaObject[]): MediaResponse; +} + +/** + * Class for initializing and constructing MediaObject with chainable interface. + */ +export class MediaObject { + /** + * Constructor for MediaObject. + * + * @param name Name of the MediaObject. + * @param contentUrl URL of the MediaObject. + */ + constructor(name: string, contentUrl: string); + + /** + * Name of the MediaObject. + */ + name: string; + + /** + * MediaObject URL. + */ + contentUrl: string; + + /** + * Description of the MediaObject. + */ + description?: string; + + /** + * Large image. + */ + largeImage?: Image; + + /** + * Icon image. + */ + icon?: Image; + + /** + * Set the description of the item. + * + * @param description Description of the item. + * @return Returns current constructed MediaObject. + */ + setDescription(description: string): MediaObject; + + /** + * Sets the image for this item. + * + * @param url Image source URL. + * @param type Type of image (LARGE or ICON). + * @return Returns current constructed MediaObject. + */ + setImage(url: string, type: MediaValues.ImageType): MediaObject; +} + /** * Check if given text contains SSML. * @param text Text to check. diff --git a/types/activex-access/index.d.ts b/types/activex-access/index.d.ts index 0fd93502f8..2529538cad 100644 --- a/types/activex-access/index.d.ts +++ b/types/activex-access/index.d.ts @@ -2,7 +2,7 @@ // Project: https://msdn.microsoft.com/en-us/library/dn142571.aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 +// TypeScript Version: 2.6 /// /// diff --git a/types/activex-adodb/activex-adodb-tests.ts b/types/activex-adodb/activex-adodb-tests.ts index f409b888d3..347e1d9c9f 100644 --- a/types/activex-adodb/activex-adodb-tests.ts +++ b/types/activex-adodb/activex-adodb-tests.ts @@ -1,57 +1,426 @@ -let obj0 = new ActiveXObject('ADODB.Command'); +// Note -- running these tests under cscript requires some ES5 polyfills -let obj1 = new ActiveXObject('ADODB.Connection'); +const collectionToArray = (col: { Item(key: any): T }): T[] => { + const results: T[] = []; + const enumerator = new Enumerator(col); + enumerator.moveFirst(); + while (!enumerator.atEnd()) { + results.push(enumerator.item()); + enumerator.moveNext(); + } + return results; +}; -let obj2 = new ActiveXObject('ADODB.Parameter'); - -let obj3 = new ActiveXObject('ADODB.Record'); - -let obj4 = new ActiveXObject('ADODB.Recordset'); - -let obj5 = new ActiveXObject('ADODB.Stream'); - -// open connection to an Excel file -let pathToExcelFile = 'C:\\path\\to\\excel\\file.xlsx'; -let conn = new ActiveXObject('ADODB.Connection'); -conn.Provider = 'Microsoft.ACE.OLEDB.12.0'; -conn.ConnectionString = `Data Source="${pathToExcelFile}";Extended Properties="Excel 12.0;HDR=Yes"`; -conn.Open(); - -// create a Command to access the data -let cmd = new ActiveXObject('ADODB.Command'); -cmd.ActiveConnection = conn; -cmd.CommandText = 'SELECT DISTINCT LastName, CityName FROM [Sheet1$]'; -// get a Recordset -let rs = cmd.Execute(); -// build a string from the Recordset -let s = rs.GetString(ADODB.StringFormatEnum.adClipString, -1, '\t', '\n', '(NULL)'); -rs.Close(); -WScript.Echo(s); - -// create a disconnected recordset -- https://support.microsoft.com/en-us/help/184397/how-to-create-ado-disconnected-recordsets-in-vba-c-java -(() => { - conn = new ActiveXObject('ADODB.Connection'); - conn.Open(); // pass connection details here - - rs = new ActiveXObject('ADODB.Recordset'); - rs.CursorLocation = ADODB.CursorLocationEnum.adUseClient; - rs.Open('SELECT * FROM Table1', conn, ADODB.CursorTypeEnum.adOpenForwardOnly, ADODB.LockTypeEnum.adLockBatchOptimistic); - rs.ActiveConnection = null; - - const v = rs.Fields.Item(0).Value; - conn.Close(); -})(); - -// helper function const toSafeArray = (...items: T[]): SafeArray => { const dict = new ActiveXObject('Scripting.Dictionary'); items.forEach((x, index) => dict.Add(index, x)); return dict.Items() as SafeArray; }; +const toConnectionString = (o: { [index: string]: any }) => { + o.Provider = o.Provider || 'sqloledb'; + o['Data Source'] = o['Data Source'] || 'Server'; + o['Integrated Security'] = o['Integrated Security'] || 'SSPI'; + + const parts: string[] = []; + for (const key in o) { + let val = o[key]; + if (typeof val === 'string') { val = `'${val}'`; } + parts.push(`${key}=${val}`); + } + return parts.join(';'); +}; + +const printLine = () => WScript.Echo(new Array(26).join('-')); + +{ + // open connection to an Excel file + const pathToExcelFile = 'C:\\path\\to\\excel\\file.xlsx'; + const conn = new ActiveXObject('ADODB.Connection'); + conn.ConnectionString = toConnectionString({ + Provider: 'Microsoft.ACE.OLEDB.12.0', + 'Data Source': pathToExcelFile, + 'Extended Properties': "Excel 12.0;HDR=Yes" + }); + conn.Open(); + + // create a Command to access the data + const cmd = new ActiveXObject('ADODB.Command'); + cmd.ActiveConnection = conn; + cmd.CommandText = 'SELECT DISTINCT LastName, CityName FROM [Sheet1$]'; + // get a Recordset + const rs = cmd.Execute() as ADODB.Recordset; + // build a string from the Recordset + const s = rs.GetString(ADODB.StringFormatEnum.adClipString, -1, '\t', '\n', '(NULL)'); + rs.Close(); + WScript.Echo(s); +} + +// create a disconnected recordset -- https://support.microsoft.com/en-us/help/184397/how-to-create-ado-disconnected-recordsets-in-vba-c-java +{ + const conn = new ActiveXObject('ADODB.Connection'); + conn.Open(); // pass connection details here + + const rs = new ActiveXObject('ADODB.Recordset'); + rs.CursorLocation = ADODB.CursorLocationEnum.adUseClient; + rs.Open('SELECT * FROM Table1', conn, ADODB.CursorTypeEnum.adOpenForwardOnly, ADODB.LockTypeEnum.adLockBatchOptimistic); + rs.ActiveConnection = null; + + const v = rs(0).Value; + conn.Close(); +} + // update with SafeArray -(() => { +{ + const rs = new ActiveXObject('ADODB.Recordset'); + rs.Open(); // missing connection details here const fields = toSafeArray('FirstName', 'LastName', 'DOB'); const values = toSafeArray('Plony', 'Almony', new Date(1980, 1, 1).getVarDate()); rs.Update(fields, values); -})(); + rs.Close(); +} + +const withConnection = (initialCatalog: string, fn: (conn: ADODB.Connection) => void) => { + let conn: ADODB.Connection | null = new ActiveXObject('ADODB.Connection'); + const connectionString = toConnectionString({ + 'Initial Catalog': initialCatalog + }); + try { + conn.Open(connectionString); + fn(conn); + } catch (e) { + WScript.Echo(e.message); + } finally { + if (conn.State === ADODB.ObjectStateEnum.adStateOpen) { + conn.Close(); + } + conn = null; + } +}; + +const withRs = (catalogOrConnection: string | ADODB.Connection, tableOrCommand: string | ADODB.Command, fn: (rs: ADODB.Recordset) => void, + type: ADODB.CursorTypeEnum = ADODB.CursorTypeEnum.adOpenUnspecified, + location: ADODB.CursorLocationEnum = ADODB.CursorLocationEnum.adUseNone, + lockType: ADODB.LockTypeEnum = ADODB.LockTypeEnum.adLockOptimistic +) => { + let connection = catalogOrConnection; + if (typeof connection === 'string') { + // expand catalog to full connection string + connection = toConnectionString({ + 'Initial Catalog': connection + }); + } + + let rs: ADODB.Recordset | null = null; + try { + if (typeof tableOrCommand === 'string') { + rs = new ActiveXObject('ADODB.Recordset'); + rs.CursorLocation = location; + rs.LockType = lockType; + rs.Open(tableOrCommand, connection, type, lockType, ADODB.CommandTypeEnum.adCmdTable); + } else { + tableOrCommand.ActiveConnection = connection; + rs = tableOrCommand.Execute() as ADODB.Recordset; + } + fn(rs); + } catch (e) { + WScript.Echo(e.message); + } finally { + if (rs && rs.State === ADODB.ObjectStateEnum.adStateOpen) { + rs.Close(); + } + rs = null; + } +}; + +const withEmployees = (fn: (rs: ADODB.Recordset) => void, type: ADODB.CursorTypeEnum) => + withRs('Northwind', 'Employees', fn, type, ADODB.CursorLocationEnum.adUseClient); + +// https://msdn.microsoft.com/en-us/library/jj249882.aspx +{ + withConnection('Northwind', conn => { + withEmployees(rs => { + const FName = 'first name'; + const LName = 'last name'; + + rs.AddNew(); + rs('FirstName').Value = FName; + rs('LastName').Value = LName; + rs.Update(); + WScript.Echo('New record added.'); + }, ADODB.CursorTypeEnum.adOpenKeyset); + }); +} + +// https://msdn.microsoft.com/en-us/library/jj249434.aspx +{ + withConnection('Northwind', conn => { + withEmployees(rs => { + // Set PageSize to five to display names and hire dates of five employees at a time + rs.PageSize = 5; + const pageCount = rs.PageCount; + + WScript.Echo(`There are ${pageCount} pages, each containing ${rs.PageSize} or fewer records`.trim()); + + for (let i = 1; i <= pageCount; i++) { + rs.AbsolutePage = i; + + for (let iRecord = 1; iRecord <= rs.PageSize; iRecord++) { + // First column in row contains page number on + // first record of each page. Otherwise, the column + // contains a non-breaking space. + const page = iRecord === 1 ? `Page ${i} of ${rs.PageCount}` : ''; + + // First and last name are in first column. + const name = `${rs('FirstName')} ${rs('LastName')}`; + + // Hire date in second column. + const hireDate = new Date(rs('HireDate').Value as VarDate).toString(); + + // Write the row + WScript.Echo([page, name, hireDate].join('\t')); + + // Get next record. + rs.MoveNext(); + + if (rs.EOF) { break; } + } + } + }, ADODB.CursorTypeEnum.adOpenStatic); + }); +} + +// https://msdn.microsoft.com/en-us/library/jj250117.aspx +{ + withConnection('Northwind', conn => { + withEmployees(rs => { + WScript.Echo(['AbsolutePosition', 'Name', 'Hire Date'].join('\t')); + + while (!rs.EOF) { + // First column in row contains AbsolutePosition value. + const recordCount = `${rs.AbsolutePosition} of ${rs.RecordCount}`; + + // First and last name are in first column. + const name = `${rs('FirstName')} ${rs('LastName')}`; + + // Hire date in second column. + const hireDate = new Date(rs('HireDate').Value as VarDate).toString(); + + WScript.Echo([recordCount, name, hireDate].join('\t')); + } + }, ADODB.CursorTypeEnum.adOpenStatic); + }); +} + +// https://msdn.microsoft.com/en-us/library/jj249824.aspx +{ + withConnection('Northwind', conn => { + WScript.Echo('Enter city name, and press ENTER:'); + const cityName = WScript.StdIn.ReadLine(); + + const cmdContact = new ActiveXObject('ADODB.Command'); + cmdContact.CommandText = 'SELECT ContactName FROM Customers WHERE City = ?'; + cmdContact.ActiveConnection = conn; + + // create parameter and insert variable value + const param = cmdContact.CreateParameter('CityName', ADODB.DataTypeEnum.adChar, ADODB.ParameterDirectionEnum.adParamInput, 30, cityName); + cmdContact.Parameters.Append(param); + + let rsContact: ADODB.Recordset | null = null; + try { + // Open a recordset using the command object + rsContact = cmdContact.Execute() as ADODB.Recordset; + + while (!rsContact.EOF) { + WScript.Echo(rsContact('ContactName')); + rsContact.MoveNext(); + } + } catch (e) { + WScript.Echo(e.message); + } finally { + if (rsContact && rsContact.State === ADODB.ObjectStateEnum.adStateOpen) { + rsContact.Close(); + } + } + }); +} + +// https://msdn.microsoft.com/en-us/library/jj249056.aspx +// https://msdn.microsoft.com/en-us/library/jj249494.aspx +{ + WScript.Echo('Enter royalty value, and press ENTER:'); + const iRoyalty = parseInt(WScript.StdIn.ReadLine(), 10); + if (iRoyalty > -1) { + withConnection('pubs', conn => { + const cmdByRoyalty = new ActiveXObject('ADODB.Command'); + cmdByRoyalty.CommandText = 'byroyalty'; + cmdByRoyalty.CommandType = ADODB.CommandTypeEnum.adCmdStoredProc; + cmdByRoyalty.CommandTimeout = 15; + + // The stored procedure called above is as follows: + /* + CREATE PROCEDURE byroyalty + @percentage int + AS + SELECT au_id from titleauthor + WHERE titleauthor.royaltyper = @percentage + GO + */ + + const prmByRoyalty = new ActiveXObject('ADODB.Parameter'); + prmByRoyalty.Type = ADODB.DataTypeEnum.adInteger; + prmByRoyalty.Size = 3; + prmByRoyalty.Direction = ADODB.ParameterDirectionEnum.adParamInput; + prmByRoyalty.Value = iRoyalty; + cmdByRoyalty.Parameters.Append(prmByRoyalty); + + // open byRoyalty recordset via Command + withRs(conn, cmdByRoyalty, rsByRoyalty => { + // open authors recordset directly + withRs(conn, 'Authors', rsAuthor => { + while (!rsByRoyalty.EOF) { + // set filter + rsAuthor.Filter = `au_id='${rsByRoyalty('au_id')}'`; + + // write author name + WScript.Echo(`${rsAuthor('au_fname')} ${rsAuthor('au_lname')}`); + } + + // get next record + rsByRoyalty.MoveNext(); + }); + }); + }); + } +} + +// https://msdn.microsoft.com/en-us/library/jj250032.aspx +{ + withRs('Northwind', 'Suppliers', rsSuppliers => { + WScript.Echo(['Field Value', 'Defined Size', 'Actual Size'].join('\t')); + while (!rsSuppliers.EOF) { + const fld = rsSuppliers('CompanyName'); + WScript.Echo([fld.Value, fld.DefinedSize, fld.ActualSize].join('\t')); + } + rsSuppliers.MoveNext(); + }); +} + +// https://msdn.microsoft.com/en-us/library/jj249928.aspx +{ + withRs('Northwind', 'Customers', rs => { + const loop20 = () => { + const start = new Date().getTime(); + + // loop through the recordset 20 times + for (let i = 0; i < 20; i++) { + rs.MoveFirst(); + while (!rs.EOF) { + // do something with the record + const strTemp = rs('CompanyName').Value as string; + rs.MoveNext(); + } + } + + const end = new Date().getTime(); + return end - start; + }; + + const noCache = loop20(); + + // cache records in groups of 30 + rs.MoveFirst(); + rs.CacheSize = 30; + + const cache = loop20(); + + WScript.Echo(`No cache: ${noCache}; with cache: ${cache}`); + }, ADODB.CursorTypeEnum.adOpenUnspecified, ADODB.CursorLocationEnum.adUseClient); +} + +// https://msdn.microsoft.com/en-us/library/jj249157.aspx +{ + const printAuthorRecordset = (caption: string, rs: ADODB.Recordset) => { + printLine(); + WScript.Echo(`**${caption}**`); + while (!rs.EOF) { + // write current row's data + const name = `${rs('au_fname')} ${rs('au_lname')}`; + WScript.Echo(name); + + // get next record + rs.MoveNext; + } + }; + + WScript.Echo('Enter last name of author to find (e.g., Ringer) and then press ENTER:'); + const lastName = WScript.StdIn.ReadLine() || ''; + if (lastName.length > 0) { + withConnection('pubs', conn => { + // command object parameters + const cmdAuthor = new ActiveXObject('ADODB.Command'); + cmdAuthor.CommandText = 'SELECT * FROM Authors WHERE au_name = ?'; + const lastNameParameter = cmdAuthor.CreateParameter('Last Name', ADODB.DataTypeEnum.adChar, ADODB.ParameterDirectionEnum.adParamInput, 20, lastName); + cmdAuthor.Parameters.Append(lastNameParameter); + cmdAuthor.ActiveConnection = conn; + + // recordset from command.execute + const rsAuthor = cmdAuthor.Execute() as ADODB.Recordset; + + // recordset from connection.execute + const rsAuthor2 = conn.Execute('SELECT * FROM Authors') as ADODB.Recordset; + + const errs = collectionToArray(conn.Errors); + if (errs.length > 0) { + for (const err of errs) { + WScript.Echo(err); + } + } + conn.Errors.Clear(); + + printAuthorRecordset('Command.Execute results', rsAuthor); + printAuthorRecordset('Connection.Execute results', rsAuthor2); + }); + } +} + +// https://msdn.microsoft.com/en-us/library/jj249466.aspx +{ + withConnection('Northwind', conn => { + const sql = 'SELECT * FROM Customers'; + withRs(conn, sql, rs => { + rs.MoveFirst(); + if (rs.RecordCount === 0) { + WScript.Echo(`No records matched for '${sql}'`); + return; + } + + // print headings for each field name + WScript.Echo(collectionToArray(rs.Fields).map(fld => fld.Name).join('\t')); + + // JScript doesn't support multi-dimensional arrays + // so we'll convert the returned array to a single + // dimensional JScript array and then display the data. + const safeArray = rs.GetRows(); + const data = new VBArray(safeArray).toArray(); + + const fieldCount = rs.Fields.Count; + + data.forEach((cellValue, index) => { + const currentField = index % fieldCount; + + // don't print tab character for first and last columns + if (currentField > 0 && currentField < fieldCount - 1) { + WScript.StdOut.Write('\t'); + } + + const displayValue = cellValue === null ? '-null-' : cellValue; + if (currentField === fieldCount - 1) { + WScript.StdOut.WriteLine(displayValue); + } else { + WScript.StdOut.Write(displayValue); + } + }); + }, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.CursorLocationEnum.adUseClient, ADODB.LockTypeEnum.adLockOptimistic); + }); +} diff --git a/types/activex-adodb/index.d.ts b/types/activex-adodb/index.d.ts index 43f43f5bd5..1879891b2d 100644 --- a/types/activex-adodb/index.d.ts +++ b/types/activex-adodb/index.d.ts @@ -2,7 +2,7 @@ // Project: https://msdn.microsoft.com/en-us/library/jj249010.aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 declare namespace ADODB { const enum ADCPROP_ASYNCTHREADPRIORITY_ENUM { @@ -594,10 +594,19 @@ declare namespace ADODB { adXactSyncPhaseOne = 1048576, } + class Bookmark { + private 'ADODB.Bookmark_typekey': Bookmark; + private constructor(); + } + class Command { private 'ADODB.Command_typekey': Command; private constructor(); - ActiveConnection: Connection; + + /** + * Sets or returns a String value that contains a definition for a connection if the connection is closed, or a Variant containing the current Connection object if the connection is open. Default is a null object reference. + */ + ActiveConnection: string | Connection | null; Cancel(): void; CommandStream: any; CommandText: string; @@ -605,28 +614,40 @@ declare namespace ADODB { CommandType: CommandTypeEnum; /** - * @param string [Name=''] - * @param ADODB.DataTypeEnum [Type=0] - * @param ADODB.ParameterDirectionEnum [Direction=1] - * @param number [Size=0] + * @param Name [Name=''] + * @param Type [Type=0] + * @param Direction [Direction=1] + * @param Size [Size=0] */ CreateParameter(Name?: string, Type?: DataTypeEnum, Direction?: ParameterDirectionEnum, Size?: number, Value?: any): Parameter; Dialect: string; - /** @param number [Options=-1] */ - Execute(RecordsAffected?: number, Parameters?: SafeArray, Options?: number): Recordset; + /** + * @param Options [Options=-1] + * + * The **RecordsAffected** parameter is meant to take a variable to be modified by reference, which is not supported by Javascript + * + * The return value is as follows: + * + * * If the **adExecuteNoRecords** option is passed in, the method will return `null`. Otherwise: + * * If the command specifies a row-returning query, then the method will return a new read-only, forward-only **Recordset** object with the results. + * * If the command isn't intended to return results (e.g. an `UPDATE` statement), a closed empty **Recordset** will be returned. + */ + Execute(RecordsAffected?: undefined, Parameters?: SafeArray, Options?: number): Recordset | null; Name: string; NamedParameters: boolean; readonly Parameters: Parameters; Prepared: boolean; readonly Properties: Properties; - readonly State: number; + readonly State: ObjectStateEnum; } class Connection { private 'ADODB.Connection_typekey': Connection; private constructor(); - Attributes: number; + + /** Sum of one or more of the values in the **XactAttributeEnum** enum */ + Attributes: XactAttributeEnum; BeginTrans(): number; Cancel(): void; Close(): void; @@ -638,23 +659,45 @@ declare namespace ADODB { DefaultDatabase: string; readonly Errors: Errors; - /** @param number [Options=-1] */ - Execute(CommandText: string, RecordsAffected: any, Options?: number): Recordset; + /** + * @param Options [Options=-1] + * + * The **RecordsAffected** parameter is meant to take a variable to be modified by reference, which is not supported by Javascript + * + * The return value is as follows: + * + * * If the **adExecuteNoRecords** option is passed in, the method will return `null`. Otherwise: + * * If **CommandText** specifies a row-returning query, then the method will return a new read-only, forward-only **Recordset** object with the results + * * If **CommandText** isn't intended to return results (e.g. an `UPDATE` statement), a closed empty **Recordset** will be returned. + */ + Execute(CommandText: string, RecordsAffected?: undefined, Options?: CommandTypeEnum | ExecuteOptionEnum): Recordset | null; IsolationLevel: IsolationLevelEnum; Mode: ConnectModeEnum; /** - * @param string [ConnectionString=''] - * @param string [UserID=''] - * @param string [Password=''] - * @param number [Options=-1] + * @param ConnectionString [ConnectionString=''] + * @param UserID [UserID=''] + * @param Password [Password=''] + * @param Options [Options=-1] */ Open(ConnectionString?: string, UserID?: string, Password?: string, Options?: number): void; - OpenSchema(Schema: SchemaEnum, Restrictions?: any, SchemaID?: any): Recordset; + + /** + * Returns a Recordset object that contains schema information + * @param Schema Type of schema query to run + * @param Restrictions A SafeArray of query constraints; depends on the [type of the schema query](https://msdn.microsoft.com/en-us/library/jj249359.aspx) + */ + OpenSchema(Schema: SchemaEnum, Restrictions?: SafeArray): Recordset; + + /** + * Returns a Recordset object that contains schema information, for a provider-specific schema query type + * @param SchemaID The GUID for a provider-schema query not defined by the OLE DB specification. + */ + OpenSchema(Schema: SchemaEnum.adSchemaProviderSpecific, Restrictions: SafeArray, SchemaID: string): Recordset; readonly Properties: Properties; Provider: string; RollbackTrans(): void; - readonly State: number; + readonly State: ObjectStateEnum; readonly Version: string; } @@ -670,13 +713,12 @@ declare namespace ADODB { readonly SQLState: string; } - class Errors { - private 'ADODB.Errors_typekey': Errors; - private constructor(); + interface Errors { Clear(): void; readonly Count: number; Item(Index: any): Error; Refresh(): void; + (Index: any): Error; } class Field { @@ -684,7 +726,9 @@ declare namespace ADODB { private constructor(); readonly ActualSize: number; AppendChunk(Data: any): void; - Attributes: number; + + /** Sum of one or more of the values in the **FieldAttributeEnum** enum */ + Attributes: FieldAttributeEnum; DataFormat: any; DefinedSize: number; GetChunk(Length: number): any; @@ -699,37 +743,37 @@ declare namespace ADODB { Value: any; } - class Fields { - private 'ADODB.Fields_typekey': Fields; - private constructor(); - + interface Fields { /** - * @param number [DefinedSize=0] - * @param ADODB.FieldAttributeEnum [Attrib=-1] + * @param DefinedSize [DefinedSize=0] + * @param Attrib [Attrib=-1] */ _Append(Name: string, Type: DataTypeEnum, DefinedSize?: number, Attrib?: FieldAttributeEnum): void; /** - * @param number [DefinedSize=0] - * @param ADODB.FieldAttributeEnum [Attrib=-1] + * @param DefinedSize [DefinedSize=0] + * @param Attrib [Attrib=-1] */ Append(Name: string, Type: DataTypeEnum, DefinedSize?: number, Attrib?: FieldAttributeEnum, FieldValue?: any): void; CancelUpdate(): void; readonly Count: number; - Delete(Index: any): void; - Item(Index: any): Field; + Delete(Index: string | number): void; + Item(Index: string | number): Field; Refresh(): void; - /** @param ADODB.ResyncEnum [ResyncValues=2] */ + /** @param ResyncValues [ResyncValues=2] */ Resync(ResyncValues?: ResyncEnum): void; Update(): void; + (Index: string | number): Field; } class Parameter { private 'ADODB.Parameter_typekey': Parameter; private constructor(); AppendChunk(Val: any): void; - Attributes: number; + + /** Sum of one or more of the values in the **ParameterAttributesEnum** enum */ + Attributes: ParameterAttributesEnum; Direction: ParameterDirectionEnum; Name: string; NumericScale: number; @@ -740,28 +784,28 @@ declare namespace ADODB { Value: any; } - class Parameters { - private 'ADODB.Parameters_typekey': Parameters; - private constructor(); + interface Parameters { Append(Object: any): void; readonly Count: number; - Delete(Index: any): void; - Item(Index: any): Parameter; + Delete(Index: string | number): void; + Item(Index: string | number): Parameter; Refresh(): void; + (Index: string | number): Parameter; } - class Properties { - private 'ADODB.Properties_typekey': Properties; - private constructor(); + interface Properties { readonly Count: number; - Item(Index: any): Property; + Item(Index: string | number): Property; Refresh(): void; + (Index: string | number): Property; } class Property { private 'ADODB.Property_typekey': Property; private constructor(); - Attributes: number; + + /** Sum of one or more of the values in the **PropertyAttributesEnum** enum */ + Attributes: PropertyAttributesEnum; readonly Name: string; readonly Type: DataTypeEnum; Value: any; @@ -770,23 +814,27 @@ declare namespace ADODB { class Record { private 'ADODB.Record_typekey': Record; private constructor(); - ActiveConnection: any; + + /** + * Sets or returns a String value that contains a definition for a connection if the connection is closed, or a Variant containing the current Connection object if the connection is open. Default is a null object reference. + */ + ActiveConnection: string | Connection | null; Cancel(): void; Close(): void; /** - * @param string [Source=''] - * @param string [Destination=''] - * @param string [UserName=''] - * @param string [Password=''] - * @param ADODB.CopyRecordOptionsEnum [Options=-1] - * @param boolean [Async=false] + * @param Source [Source=''] + * @param Destination [Destination=''] + * @param UserName [UserName=''] + * @param Password [Password=''] + * @param Options [Options=-1] + * @param Async [Async=false] */ CopyRecord(Source?: string, Destination?: string, UserName?: string, Password?: string, Options?: CopyRecordOptionsEnum, Async?: boolean): string; /** - * @param string [Source=''] - * @param boolean [Async=false] + * @param Source [Source=''] + * @param Async [Async=false] */ DeleteRecord(Source?: string, Async?: boolean): void; readonly Fields: Fields; @@ -794,137 +842,174 @@ declare namespace ADODB { Mode: ConnectModeEnum; /** - * @param string [Source=''] - * @param string [Destination=''] - * @param string [UserName=''] - * @param string [Password=''] - * @param ADODB.MoveRecordOptionsEnum [Options=-1] - * @param boolean [Async=false] + * @param Source [Source=''] + * @param Destination [Destination=''] + * @param UserName [UserName=''] + * @param Password [Password=''] + * @param Options [Options=-1] + * @param Async [Async=false] */ MoveRecord(Source?: string, Destination?: string, UserName?: string, Password?: string, Options?: MoveRecordOptionsEnum, Async?: boolean): string; /** - * @param ADODB.ConnectModeEnum [Mode=0] - * @param ADODB.RecordCreateOptionsEnum [CreateOptions=-1] - * @param ADODB.RecordOpenOptionsEnum [Options=-1] - * @param string [UserName=''] - * @param string [Password=''] + * Source may be: + * * A URL. If the protocol for the URL is http, then the Internet Provider will be invoked by default. If the URL points to a node that contains an executable script (such as an .ASP page), then a Record containing the source rather than the executed contents is opened by default. Use the Options argument to modify this behavior. + * * A Record object. A Record object opened from another Record will clone the original Record object. + * * A Command object. The opened Record object represents the single row returned by executing the Command. If the results contain more than a single row, the contents of the first row are placed in the record and an error may be added to the Errors collection. + * * A SQL SELECT statement. The opened Record object represents the single row returned by executing the contents of the string. If the results contain more than a single row, the contents of the first row are placed in the record and an error may be added to the Errors collection. + * * A table name. + * + * @param Mode [Mode=0] + * @param CreateOptions [CreateOptions=-1] + * @param Options [Options=-1] + * @param UserName [UserName=''] + * @param Password [Password=''] */ - Open(Source: any, ActiveConnection: any, Mode?: ConnectModeEnum, CreateOptions?: RecordCreateOptionsEnum, Options?: RecordOpenOptionsEnum, UserName?: string, Password?: string): void; + Open(Source?: string | Record | Recordset | Command, ActiveConnection?: string | Connection, Mode?: ConnectModeEnum, CreateOptions?: RecordCreateOptionsEnum, Options?: RecordOpenOptionsEnum, UserName?: string, Password?: string): void; readonly ParentURL: string; readonly Properties: Properties; readonly RecordType: RecordTypeEnum; - Source: any; + Source: string | Recordset | Command; readonly State: ObjectStateEnum; } - class Recordset { - private 'ADODB.Recordset_typekey': Recordset; - private constructor(); + interface Recordset { _xClone(): Recordset; - /** @param ADODB.AffectEnum [AffectRecords=3] */ + /** @param AffectRecords [AffectRecords=3] */ _xResync(AffectRecords?: AffectEnum): void; /** - * @param string [FileName=''] - * @param ADODB.PersistFormatEnum [PersistFormat=0] + * @param FileName [FileName=''] + * @param PersistFormat [PersistFormat=0] */ _xSave(FileName?: string, PersistFormat?: PersistFormatEnum): void; AbsolutePage: PositionEnum; AbsolutePosition: PositionEnum; - readonly ActiveCommand: any; - ActiveConnection: any; - AddNew(FieldList?: any, Values?: any): void; + readonly ActiveCommand?: Command; + + /** + * Sets or returns a String value that contains a definition for a connection if the connection is closed, or a Variant containing the current Connection object if the connection is open. Default is a null object reference. + */ + ActiveConnection: string | Connection | null; + AddNew(): void; + AddNew(Fields: SafeArray, Values: SafeArray): void; + AddNew(Field: string, Value: any): void; readonly BOF: boolean; - Bookmark: any; + Bookmark: Bookmark; CacheSize: number; Cancel(): void; - /** @param ADODB.AffectEnum [AffectRecords=3] */ + /** @param AffectRecords [AffectRecords=3] */ CancelBatch(AffectRecords?: AffectEnum): void; CancelUpdate(): void; - /** @param ADODB.LockTypeEnum [LockType=-1] */ + /** @param LockType [LockType=-1] */ Clone(LockType?: LockTypeEnum): Recordset; Close(): void; Collect(Index: any): any; - CompareBookmarks(Bookmark1: any, Bookmark2: any): CompareEnum; + CompareBookmarks(Bookmark1: Bookmark, Bookmark2: Bookmark): CompareEnum; CursorLocation: CursorLocationEnum; CursorType: CursorTypeEnum; DataMember: string; DataSource: any; - /** @param ADODB.AffectEnum [AffectRecords=1] */ + /** @param AffectRecords [AffectRecords=1] */ Delete(AffectRecords?: AffectEnum): void; readonly EditMode: EditModeEnum; readonly EOF: boolean; readonly Fields: Fields; - Filter: any; /** - * @param number [SkipRecords=0] - * @param ADODB.SearchDirectionEnum [SearchDirection=1] + * Sets or returns one of the following: + * * Criteria string — a string made up of one or more individual clauses concatenated with AND or OR operators. + * * Array of bookmarks — an array of unique bookmark values that point to records in the Recordset object. + * * A FilterGroupEnum value */ - Find(Criteria: string, SkipRecords?: number, SearchDirection?: SearchDirectionEnum, Start?: any): void; - - /** @param number [Rows=-1] */ - GetRows(Rows?: number, Start?: any, Fields?: any): any; + Filter: string | SafeArray | FilterGroupEnum; /** - * @param ADODB.StringFormatEnum [StringFormat=2] - * @param number [NumRows=-1] - * @param string [ColumnDelimeter=''] - * @param string [RowDelimeter=''] - * @param string [NullExpr=''] + * @param SkipRecords [SkipRecords=0] + * @param SearchDirection [SearchDirection=1] + */ + Find(Criteria: string, SkipRecords?: number, SearchDirection?: SearchDirectionEnum, Start?: Bookmark): void; + + /** @param Rows [Rows=-1] */ + GetRows(Rows?: number, Start?: string | Bookmark | BookmarkEnum, Fields?: string | SafeArray): SafeArray; + + /** + * @param StringFormat [StringFormat=2] + * @param NumRows [NumRows=-1] + * @param ColumnDelimeter [ColumnDelimeter=''] + * @param RowDelimeter [RowDelimeter=''] + * @param NullExpr [NullExpr=''] */ GetString(StringFormat?: StringFormatEnum, NumRows?: number, ColumnDelimeter?: string, RowDelimeter?: string, NullExpr?: string): string; Index: string; LockType: LockTypeEnum; MarshalOptions: MarshalOptionsEnum; MaxRecords: number; - Move(NumRecords: number, Start?: any): void; + Move(NumRecords: number, Start?: string | Bookmark | BookmarkEnum): void; MoveFirst(): void; MoveLast(): void; MoveNext(): void; MovePrevious(): void; - NextRecordset(RecordsAffected?: any): Recordset; + + /** Since Javascript doesn't support byref parameters, the RecordsAffected parameter cannot be used */ + NextRecordset(): Recordset; /** - * @param ADODB.CursorTypeEnum [CursorType=-1] - * @param ADODB.LockTypeEnum [LockType=-1] - * @param number [Options=-1] + * @param CursorType [CursorType=-1] + * @param LockType [LockType=-1] + * @param Options [Options=-1] */ - Open(Source: any, ActiveConnection: any, CursorType?: CursorTypeEnum, LockType?: LockTypeEnum, Options?: number): void; + Open(Source: Command, ActiveConnection: null, CursorType?: CursorTypeEnum, LockType?: LockTypeEnum, Options?: CommandTypeEnum | ExecuteOptionEnum): void; + Open(Source?: Stream): void; + + /** + * @param CursorType [CursorType=-1] + * @param LockType [LockType=-1] + * @param Options [Options=-1] + */ + Open(Source: string, ActiveConnection: string | Connection, CursorType?: CursorTypeEnum, LockType?: LockTypeEnum, Options?: CommandTypeEnum | ExecuteOptionEnum): void; readonly PageCount: number; PageSize: number; readonly Properties: Properties; readonly RecordCount: number; - /** @param number [Options=-1] */ + /** @param Options [Options=-1] */ Requery(Options?: number): void; /** - * @param ADODB.AffectEnum [AffectRecords=3] - * @param ADODB.ResyncEnum [ResyncValues=2] + * @param AffectRecords [AffectRecords=3] + * @param ResyncValues [ResyncValues=2] */ Resync(AffectRecords?: AffectEnum, ResyncValues?: ResyncEnum): void; - /** @param ADODB.PersistFormatEnum [PersistFormat=0] */ - Save(Destination: any, PersistFormat?: PersistFormatEnum): void; + /** @param PersistFormat [PersistFormat=0] */ + Save(Destination: string | Stream, PersistFormat?: PersistFormatEnum): void; - /** @param ADODB.SeekEnum [SeekOption=1] */ + /** + * @param SeekOption [SeekOption=1] + * + * For a single-column index, pass in a single value to seek in the column of the index + * + * For a multi-column index, pass in a SafeArray containing the multiple values to seek in the columns of the index. + */ Seek(KeyValues: any, SeekOption?: SeekEnum): void; Sort: string; - Source: any; - readonly State: number; + Source: string | Command; + readonly State: ObjectStateEnum; readonly Status: number; StayInSync: boolean; Supports(CursorOptions: CursorOptionEnum): boolean; - Update(Fields?: string | SafeArray, Values?: any): void; + Update(): void; + Update(Fields: SafeArray, Values: SafeArray): void; + Update(Field: string, Value: any): void; - /** @param ADODB.AffectEnum [AffectRecords=3] */ + /** @param AffectRecords [AffectRecords=3] */ UpdateBatch(AffectRecords?: AffectEnum): void; + (FieldIndex: string | number): Field; } class Stream { @@ -934,7 +1019,7 @@ declare namespace ADODB { Charset: string; Close(): void; - /** @param number [CharNumber=-1] */ + /** @param CharNumber [CharNumber=-1] */ CopyTo(DestStream: Stream, CharNumber?: number): void; readonly EOS: boolean; Flush(): void; @@ -943,21 +1028,21 @@ declare namespace ADODB { Mode: ConnectModeEnum; /** - * @param ADODB.ConnectModeEnum [Mode=0] - * @param ADODB.StreamOpenOptionsEnum [Options=-1] - * @param string [UserName=''] - * @param string [Password=''] + * @param Mode [Mode=0] + * @param Options [Options=-1] + * @param UserName [UserName=''] + * @param Password [Password=''] */ - Open(Source: any, Mode?: ConnectModeEnum, Options?: StreamOpenOptionsEnum, UserName?: string, Password?: string): void; + Open(Source?: string | Record, Mode?: ConnectModeEnum, Options?: StreamOpenOptionsEnum, UserName?: string, Password?: string): void; Position: number; - /** @param number [NumBytes=-1] */ + /** @param NumBytes [NumBytes=-1] */ Read(NumBytes?: number): any; - /** @param number [NumChars=-1] */ + /** @param NumChars [NumChars=-1] */ ReadText(NumChars?: number): string; - /** @param ADODB.SaveOptionsEnum [Options=1] */ + /** @param Options [Options=1] */ SaveToFile(FileName: string, Options?: SaveOptionsEnum): void; SetEOS(): void; readonly Size: number; @@ -966,7 +1051,7 @@ declare namespace ADODB { Type: StreamTypeEnum; Write(Buffer: any): void; - /** @param ADODB.StreamWriteEnum [Options=0] */ + /** @param Options [Options=0] */ WriteText(Data: string, Options?: StreamWriteEnum): void; } @@ -1009,60 +1094,23 @@ declare namespace ADODB { } interface ActiveXObject { - on( - obj: ADODB.Connection, event: 'BeginTransComplete', argNames: ['TransactionLevel', 'pError', 'adStatus', 'pConnection'], handler: ( - this: ADODB.Connection, parameter: { - readonly TransactionLevel: number, readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pConnection: ADODB.Connection}) => void): void; - on( - obj: ADODB.Connection, event: 'CommitTransComplete' | 'ConnectComplete' | 'InfoMessage' | 'RollbackTransComplete', argNames: ['pError', 'adStatus', 'pConnection'], - handler: (this: ADODB.Connection, parameter: {readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pConnection: ADODB.Connection}) => void): void; - on( - obj: ADODB.Connection, event: 'Disconnect', argNames: ['adStatus', 'pConnection'], handler: ( - this: ADODB.Connection, parameter: {adStatus: ADODB.EventStatusEnum, readonly pConnection: ADODB.Connection}) => void): void; - on( - obj: ADODB.Connection, event: 'ExecuteComplete', argNames: ADODB.EventHelperTypes.Connection_ExecuteComplete_ArgNames, handler: ( - this: ADODB.Connection, parameter: ADODB.EventHelperTypes.Connection_ExecuteComplete_Parameter) => void): void; - on( - obj: ADODB.Connection, event: 'WillConnect', argNames: ADODB.EventHelperTypes.Connection_WillConnect_ArgNames, handler: ( - this: ADODB.Connection, parameter: ADODB.EventHelperTypes.Connection_WillConnect_Parameter) => void): void; - on( - obj: ADODB.Connection, event: 'WillExecute', argNames: ADODB.EventHelperTypes.Connection_WillExecute_ArgNames, handler: ( - this: ADODB.Connection, parameter: ADODB.EventHelperTypes.Connection_WillExecute_Parameter) => void): void; - on( - obj: ADODB.Recordset, event: 'EndOfRecordset', argNames: ['fMoreData', 'adStatus', 'pRecordset'], handler: ( - this: ADODB.Recordset, parameter: {fMoreData: boolean, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; - on( - obj: ADODB.Recordset, event: 'FetchComplete', argNames: ['pError', 'adStatus', 'pRecordset'], handler: ( - this: ADODB.Recordset, parameter: {readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; - on( - obj: ADODB.Recordset, event: 'FetchProgress', argNames: ['Progress', 'MaxProgress', 'adStatus', 'pRecordset'], handler: ( - this: ADODB.Recordset, parameter: {readonly Progress: number, readonly MaxProgress: number, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; - on( - obj: ADODB.Recordset, event: 'FieldChangeComplete', argNames: ['cFields', 'Fields', 'pError', 'adStatus', 'pRecordset'], handler: ( - this: ADODB.Recordset, parameter: { - readonly cFields: number, readonly Fields: any, readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; - on( - obj: ADODB.Recordset, event: 'MoveComplete' | 'RecordsetChangeComplete', argNames: ['adReason', 'pError', 'adStatus', 'pRecordset'], - handler: ( - this: ADODB.Recordset, parameter: { - readonly adReason: ADODB.EventReasonEnum, readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; - on( - obj: ADODB.Recordset, event: 'RecordChangeComplete', argNames: ['adReason', 'cRecords', 'pError', 'adStatus', 'pRecordset'], handler: ( - this: ADODB.Recordset, parameter: { - readonly adReason: ADODB.EventReasonEnum, readonly cRecords: number, readonly pError: ADODB.Error, - adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; - on( - obj: ADODB.Recordset, event: 'WillChangeField', argNames: ['cFields', 'Fields', 'adStatus', 'pRecordset'], handler: ( - this: ADODB.Recordset, parameter: {readonly cFields: number, readonly Fields: any, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; - on( - obj: ADODB.Recordset, event: 'WillChangeRecord', argNames: ['adReason', 'cRecords', 'adStatus', 'pRecordset'], handler: ( - this: ADODB.Recordset, parameter: { - readonly adReason: ADODB.EventReasonEnum, readonly cRecords: number, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; - on( - obj: ADODB.Recordset, event: 'WillChangeRecordset' | 'WillMove', argNames: ['adReason', 'adStatus', 'pRecordset'], handler: ( - this: ADODB.Recordset, parameter: {readonly adReason: ADODB.EventReasonEnum, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; - set(obj: ADODB.Recordset, propertyName: 'Collect', parameterTypes: [any], newValue: any): void; new(progid: K): ActiveXObjectNameMap[K]; + on(obj: ADODB.Connection, event: 'BeginTransComplete', argNames: ['TransactionLevel', 'pError', 'adStatus', 'pConnection'], handler: (this: ADODB.Connection, parameter: {readonly TransactionLevel: number, readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Connection, event: 'CommitTransComplete' | 'ConnectComplete' | 'InfoMessage' | 'RollbackTransComplete', argNames: ['pError', 'adStatus', 'pConnection'], handler: (this: ADODB.Connection, parameter: {readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Connection, event: 'Disconnect', argNames: ['adStatus', 'pConnection'], handler: (this: ADODB.Connection, parameter: {adStatus: ADODB.EventStatusEnum, readonly pConnection: ADODB.Connection}) => void): void; + on(obj: ADODB.Connection, event: 'ExecuteComplete', argNames: ADODB.EventHelperTypes.Connection_ExecuteComplete_ArgNames, handler: (this: ADODB.Connection, parameter: ADODB.EventHelperTypes.Connection_ExecuteComplete_Parameter) => void): void; + on(obj: ADODB.Connection, event: 'WillConnect', argNames: ADODB.EventHelperTypes.Connection_WillConnect_ArgNames, handler: (this: ADODB.Connection, parameter: ADODB.EventHelperTypes.Connection_WillConnect_Parameter) => void): void; + on(obj: ADODB.Connection, event: 'WillExecute', argNames: ADODB.EventHelperTypes.Connection_WillExecute_ArgNames, handler: (this: ADODB.Connection, parameter: ADODB.EventHelperTypes.Connection_WillExecute_Parameter) => void): void; + on(obj: ADODB.Recordset, event: 'EndOfRecordset', argNames: ['fMoreData', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {fMoreData: boolean, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'FetchComplete', argNames: ['pError', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'FetchProgress', argNames: ['Progress', 'MaxProgress', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {readonly Progress: number, readonly MaxProgress: number, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'FieldChangeComplete', argNames: ['cFields', 'Fields', 'pError', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {readonly cFields: number, readonly Fields: any, readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'MoveComplete' | 'RecordsetChangeComplete', argNames: ['adReason', 'pError', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {readonly adReason: ADODB.EventReasonEnum, readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'RecordChangeComplete', argNames: ['adReason', 'cRecords', 'pError', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {readonly adReason: ADODB.EventReasonEnum, readonly cRecords: number, readonly pError: ADODB.Error, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'WillChangeField', argNames: ['cFields', 'Fields', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {readonly cFields: number, readonly Fields: any, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'WillChangeRecord', argNames: ['adReason', 'cRecords', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {readonly adReason: ADODB.EventReasonEnum, readonly cRecords: number, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; + on(obj: ADODB.Recordset, event: 'WillChangeRecordset' | 'WillMove', argNames: ['adReason', 'adStatus', 'pRecordset'], handler: (this: ADODB.Recordset, parameter: {readonly adReason: ADODB.EventReasonEnum, adStatus: ADODB.EventStatusEnum, readonly pRecordset: ADODB.Recordset}) => void): void; + set(obj: ADODB.Recordset, propertyName: 'Collect', parameterTypes: [any], newValue: any): void; } interface ActiveXObjectNameMap { @@ -1073,14 +1121,3 @@ interface ActiveXObjectNameMap { 'ADODB.Recordset': ADODB.Recordset; 'ADODB.Stream': ADODB.Stream; } - -interface EnumeratorConstructor { - new(col: ADODB.Errors): Enumerator; - new(col: ADODB.Fields): Enumerator; - new(col: ADODB.Parameters): Enumerator; - new(col: ADODB.Properties): Enumerator; -} - -interface SafeArray { - _brand: SafeArray; -} diff --git a/types/activex-adodb/tslint.json b/types/activex-adodb/tslint.json index 3224b40b8b..7b89accc6d 100644 --- a/types/activex-adodb/tslint.json +++ b/types/activex-adodb/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { - "no-const-enum": false + "no-const-enum": false, + "max-line-length": false } } diff --git a/types/activex-adox/activex-adox-tests.ts b/types/activex-adox/activex-adox-tests.ts new file mode 100644 index 0000000000..1b6ec21d1f --- /dev/null +++ b/types/activex-adox/activex-adox-tests.ts @@ -0,0 +1,1204 @@ +const collectionToArray = (col: { Item(key: any): T }): T[] => { + const results: T[] = []; + const enumerator = new Enumerator(col); + enumerator.moveFirst(); + while (!enumerator.atEnd()) { + results.push(enumerator.item()); + enumerator.moveNext(); + } + return results; +}; + +const toConnectionString = (o: { [index: string]: any }) => { + o.Provider = o.Provider || 'sqloledb'; + o['Data Source'] = o['Data Source'] || 'Server'; + o['Integrated Security'] = o['Integrated Security'] || 'SSPI'; + + const parts: string[] = []; + for (const key in o) { + let val = o[key]; + if (typeof val === 'string') { val = `'${val}'`; } + parts.push(`${key}=${val}`); + } + return parts.join(';'); +}; + +const connectionString = toConnectionString({ + Provider: 'Microsoft.Jet.OLEDB.4.0', + 'Data Source': 'c:\\Program Files\\Microsoft Office\\Office\\Samples\\Northwind.mdb' +}); +const connectionStringWithSys = toConnectionString({ + Provider: 'Microsoft.Jet.OLEDB.4.0', + 'Data Source': 'c:\\Program Files\\Microsoft Office\\Office\\Samples\\Northwind.mdb', + 'jet oledb:system database': 'c:\\Program Files\\Microsoft Office\\Office\\system.mdw' +}); + +const adPermObjTable = ADOX.ObjectTypeEnum.adPermObjTable; +const adRightFull = ADOX.RightsEnum.adRightFull; + +const adInteger = ADODB.DataTypeEnum.adInteger; +const adVarWChar = ADODB.DataTypeEnum.adVarWChar; +const adVarChar = ADODB.DataTypeEnum.adVarChar; + +const adOpenKeyset = ADODB.CursorTypeEnum.adOpenKeyset; +const adLockOptimistic = ADODB.LockTypeEnum.adLockOptimistic; + +const tryClose = (obj: { State: ADODB.ObjectStateEnum, Close(): void } | null) => { + // TODO State could also be a combination of multiple values in this enum + if (obj && obj.State === ADODB.ObjectStateEnum.adStateOpen) { + obj.Close(); + } + return null; +}; + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/columns-and-tables-append-methods-name-property-example-vb +{ + let cat: ADOX.Catalog | null = null; + let tbl: ADOX.Table | null = null; + try { + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + tbl = new ActiveXObject('ADOX.Table'); + tbl.Name = 'MyTable'; + tbl.Columns.Append('Column1', adInteger); + tbl.Columns.Append('Column2', adInteger); + tbl.Columns.Append('Column3', adVarChar, 50); + cat.Tables.Append(tbl); + WScript.Echo('Table "MyTables" is added.'); + + cat.Tables.Delete(tbl.Name); + WScript.Echo('Table "MyTable" is deleted'); + + cat.ActiveConnection = null; + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { + cat.ActiveConnection = null; + } + cat = null; + tbl = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/connection-close-method-table-type-property-example-vb +{ + let conn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null = null; + try { + conn = new ActiveXObject('ADODB.Connection'); + conn.Open(connectionString); + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = conn; + const tbl = cat.Tables(0); + WScript.Echo(tbl.Type); // Cache tbl.Type info + cat.ActiveConnection = null; // tbl is orphaned + + // The following two lines will succeed only if the information was cached + WScript.Echo(tbl.Type); + WScript.Echo(tbl.Columns(0).DefinedSize); + } catch (error) { + WScript.Echo(error); + } finally { + // Clean up + if (cat) { cat.ActiveConnection = null; } + cat = null; + conn = tryClose(conn); + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/create-method-example-vb +{ + let cat: ADOX.Catalog | null = null; + try { + cat = new ActiveXObject('ADOX.Catalog'); + cat.Create("Provider='Microsoft.Jet.OLEDB.4.0';Data Source='new.mdb'"); + } catch (error) { + WScript.Echo(error); + } finally { + cat = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/getobjectowner-and-setobjectowner-methods-example-vb +{ + const cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionStringWithSys; + + // Print the original owner of Categories + const strOwner = cat.GetObjectOwner('Categories', adPermObjTable); + WScript.Echo(`Ower of Categories: ${strOwner}`); + + // Set the owner of Categories to Accounting + cat.SetObjectOwner('Categories', adPermObjTable, 'Accounting'); + + for (const tblLoop of collectionToArray(cat.Tables)) { + WScript.Echo(` +Table: ${tblLoop.Name} +Owner: ${cat.GetObjectOwner(tblLoop.Name, adPermObjTable)} + `.trim()); + } + + // Restore the original owner of Categories + cat.SetObjectOwner('Categories', adPermObjTable, strOwner); +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/getpermissions-and-setpermissions-methods-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null = null; + try { + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Provider = 'Microsoft.Jet.OLEDB.4.0'; + cnn.Open("Data Source='Northwind.mdb';jet oledb:system database='system.mdw'"); + + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + const displayPermissions = (title: string) => + WScript.Echo(`${title}: ${cat!.Users('admin').GetPermissions('Orders', adPermObjTable)}`); + + // Retrieve original permissions + const perm = cat.Users('admin').GetPermissions('Orders', adPermObjTable); + WScript.Echo(`Permissions: ${perm}`); + + // Revoke all permissions + cat.Users('admin').SetPermissions('Orders', adPermObjTable, ADOX.ActionEnum.adAccessRevoke, adRightFull); + displayPermissions('Revoked permissions'); + + // Give the Admin user full rights on the orders object + cat.Users('admin').SetPermissions('Orders', adPermObjTable, ADOX.ActionEnum.adAccessSet, adRightFull); + displayPermissions('Full permissions'); + + // Restore original permissions + cat.Users('admin').SetPermissions('Orders', adPermObjTable, ADOX.ActionEnum.adAccessSet, perm); + displayPermissions('Final permissions'); + } catch (error) { + WScript.Echo(error); + } finally { + cat = null; + cnn = tryClose(cnn); + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/groups-and-users-append-changepassword-methods-example-vb +{ + let cat: ADOX.Catalog | null = null; + let usrNew: ADOX.User | null = null; + let usrLoop: ADOX.User | null; + let grpLoop: ADOX.Group | null; + let user: ADOX.User | null; + let group: ADOX.Group | null; + try { + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionStringWithSys; + + // Create and append a new group with a string + cat.Groups.Append('Accounting'); + + // Create and append a new user with an object + usrNew = new ActiveXObject('ADOX.User'); + usrNew.Name = 'Pat Smith'; + usrNew.ChangePassword('', 'Password1'); + cat.Users.Append(usrNew); + + // Make the user Pat Smith a member of the + // Accounting group by creating and adding the + // appropriate Group object to the user's Groups + // collection. The same is accomplished if a User + // object representing Pat Smith is created and + // appended to the Accounting group Users collection + usrNew.Groups.Append('Accounting'); + + // Enumerate all User objects in the catalog's Users collection. + for (usrLoop of collectionToArray(cat.Users)) { + WScript.Echo(`${usrLoop.Name} belongs to the following groups:`); + + // Enumerate all Group objects in each User object's Groups collection + const groups = collectionToArray(usrLoop.Groups); + if (groups.length !== 0) { + for (group of groups) { + WScript.Echo(`\t\t${group.Name}`); + } + } else { + WScript.Echo('\t[None]'); + } + } + + // Enumerate all Group objects in the default workspace's Groups collection + for (grpLoop of collectionToArray(cat.Groups)) { + WScript.Echo(`${grpLoop.Name} has as its members:`); + + // Enumerate all User objects in each Group object's User collection + const users = collectionToArray(grpLoop.Users); + if (users.length !== 0) { + for (user of users) { + WScript.Echo(`\t\t${user.Name}`); + } + } else { + WScript.Echo('\t[None]'); + } + } + + // Delete new User and Group objects because this is only a demonstration + cat.Users.Delete('Pat Smith'); + cat.Groups.Delete('Accounting'); + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { cat.ActiveConnection = null; } + cat = null; + usrNew = null; + usrLoop = null; + grpLoop = null; + user = null; + group = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/indexes-append-method-example-vb +{ + let cat: ADOX.Catalog | null = null; + let tbl: ADOX.Table | null = null; + let idx: ADOX.Index | null = null; + try { + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + // Define the table and append it to the catalog + tbl = new ActiveXObject('ADOX.Table'); + tbl.Name = 'MyTable'; + tbl.Columns.Append('Column1', adInteger); + tbl.Columns.Append('Column2', adInteger); + tbl.Columns.Append('Column3', adVarChar, 50); + cat.Tables.Append(tbl); + WScript.Echo('Table "MyTables" is added.'); + + // Define a multi-column index + idx = new ActiveXObject('ADOX.Index'); + idx.Name = 'multicolidx'; + idx.Columns.Append('Column1'); + idx.Columns.Append('Column2'); + + // Append the index to the table + tbl.Indexes.Append(idx); + WScript.Echo('The index is appended to table "MyTable".'); + + // Delete the table as this is a demonstration + cat.Tables.Delete(tbl.Name); + WScript.Echo('Table "MyTable" is deleeted.'); + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { cat.ActiveConnection = null; } + cat = null; + tbl = null; + idx = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/keys-append-method-key-type-relatedcolumn-relatedtable-example-vb +{ + let cat: ADOX.Catalog | null = null; + let kyForeign: ADOX.Key | null = null; + try { + // Connect to the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + // Define the foreign key + kyForeign = new ActiveXObject('ADOX.Key'); + kyForeign.Name = 'CustOrder'; + kyForeign.Type = ADOX.KeyTypeEnum.adKeyForeign; + kyForeign.RelatedTable = 'Customers'; + kyForeign.Columns.Append('CustomerId'); + kyForeign.Columns('CustomerId').RelatedColumn = 'CustomerID'; + kyForeign.UpdateRule = ADOX.RuleEnum.adRICascade; + + // Append the foreign key to the keys collection + cat.Tables('Orders').Keys.Append(kyForeign); + + // Delete the key to demonstrate the Detele method + cat.Tables('Orders').Keys.Delete(kyForeign.Name); + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { cat.ActiveConnection = null; } + cat = null; + kyForeign = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/procedures-append-method-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cmd: ADODB.Command | null = null; + let cat: ADOX.Catalog | null = null; + try { + // Open the Connection + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + + // Create the parameterized command (Microsoft Jet specific) + cmd = new ActiveXObject('ADODB.Command'); + cmd.ActiveConnection = cnn; + cmd.CommandText = ` + PARAMETERS [CustId] TEXT; + SELECT * FROM Customers WHERE CustomerId = [CustId] + `; + + // Open the Catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + // Create the new Procedure + cat.Procedures.Append('CustomerById', cmd); + } catch (error) { + WScript.Echo(error); + } finally { + cat = null; + cmd = null; + cnn = tryClose(cnn); + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/procedures-delete-method-example-vb +{ + let cat: ADOX.Catalog | null = null; + try { + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + // Delete the procedure + cat.Procedures.Delete('CustomerById'); + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { cat.ActiveConnection = null; } + cat = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/procedures-refresh-method-example-vb +{ + let cat: ADOX.Catalog | null = null; + try { + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + // Refresh the Procedures collection + cat.Procedures.Refresh(); + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { cat.ActiveConnection = null; } + cat = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/views-append-method-example-vb +{ + let cat: ADOX.Catalog | null = null; + let cmd: ADODB.Command | null = null; + try { + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + // Create the command representing the view. + cmd = new ActiveXObject('ADODB.Command'); + cmd.CommandText = 'SELECT * FROM Customers'; + + // Create the new View + cat.Views.Append('All Customers', cmd); + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { cat.ActiveConnection = null; } + cat = null; + cmd = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/views-delete-method-example-vb +{ + let cat: ADOX.Catalog | null = null; + try { + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + // Delete the View + cat.Views.Delete('All Customers'); + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { cat.ActiveConnection = null; } + cat = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/views-refresh-method-example-vb +{ + let cat: ADOX.Catalog | null = null; + try { + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + // Refresh the Views collection + cat.Views.Refresh(); + } catch (error) { + WScript.Echo(error); + } finally { + cat = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/attributes-property-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null = null; + let tblEmp: ADOX.Table | null = null; + let colTemp: ADOX.Column | null = null; + let rstEmployees: ADODB.Recordset | null = null; + try { + // Connect the catalog + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + tblEmp = cat.Tables('Employees'); + + // Create a new Field object and append it to the Field collection of the Employees table + colTemp = new ActiveXObject('ADOX.Column'); + colTemp.Name = 'FaxPhone'; + colTemp.Type = adVarWChar; + colTemp.DefinedSize = 24; + colTemp.Attributes = ADOX.ColumnAttributesEnum.adColNullable; + tblEmp.Columns.Append(colTemp.Name, ADODB.DataTypeEnum.adWChar, 24); + + // Open the Employees table for updating as a Recordset + rstEmployees = new ActiveXObject('ADODB.Recordset'); + rstEmployees.Open('Employees', cnn, adOpenKeyset, adLockOptimistic, ADODB.CommandTypeEnum.adCmdTable); + + // Get user input + WScript.Echo(` +Enter fax number for ${rstEmployees('FirstName')} ${rstEmployees('LastName')}. +[? - unknown, X - has no fax] + `.trim()); + const strInput = WScript.StdIn.ReadLine().toUpperCase().trim(); + if (strInput) { + let newValue: string | null; + if (strInput === '?') { + newValue = null; + } else if (strInput === 'X') { + newValue = ''; + } else { + newValue = strInput; + } + rstEmployees('FaxPhone').Value = newValue; + rstEmployees.Update(); + + // Print report + const faxValue = rstEmployees('FaxPhone').Value; + let faxDisplayString: string; + if (faxValue === null) { + faxDisplayString = '[Unkown]'; + } else if (faxValue === '') { + faxDisplayString = '[Has no fax]'; + } else { + faxDisplayString = faxValue; + } + WScript.Echo(` +Name\t\tFax number +${rstEmployees('FirstName')} ${rstEmployees('LastName')}\t\t${faxDisplayString} + `.trim()); + } + } catch (error) { + WScript.Echo(error); + } finally { + rstEmployees = tryClose(rstEmployees); + if (tblEmp) { + tblEmp.Columns.Delete(colTemp!.Name); + } + cnn = tryClose(cnn); + cat = null; + colTemp = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/catalog-activeconnection-property-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null = null; + try { + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + WScript.Echo(cat.Tables(0).Type); + } catch (error) { + WScript.Echo(error); + } finally { + cat = null; + cnn = tryClose(cnn); + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/clustered-property-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null = null; + let tblLoop: ADOX.Table | null; + let idxLoop: ADOX.Index | null; + try { + // Connect to the catalog + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + // Enumerate the tables + for (tblLoop of collectionToArray(cat.Tables)) { + // Enumerate the indexes + for (idxLoop of collectionToArray(tblLoop.Indexes)) { + WScript.Echo(`${tblLoop.Name} ${idxLoop.Name} ${idxLoop.Clustered}`); + } + } + } catch (error) { + WScript.Echo(error); + } finally { + cat = null; + cnn = tryClose(cnn); + tblLoop = null; + idxLoop = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/command-and-commandtext-properties-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null = null; + let cmd: ADODB.Command | null = null; + try { + // Open the connection + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + // Get the command + cmd = new ActiveXObject('ADODB.Command'); + cmd = cat.Procedures('CustomerById').Command; + + // Update the CommandText + cmd.CommandText = ` + SELECT CustomerID, CompanyName ContactName + FROM Customers + WHERE CustomerId = [CustId] + `.trim(); + + // Update the procedure + cat.Procedures('CustomerById').Command = cmd; + } catch (error) { + WScript.Echo(error); + } finally { + cnn = tryClose(cnn); + cat = null; + cmd = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/parameters-collection-command-property-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null = null; + let cmd: ADODB.Command | null = null; + let prm: ADODB.Parameter | null; + try { + // Open the connection + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + // Get the command + cmd = cat.Procedures('CustomerById').Command; + + // Retreive Parameter information + cmd.Parameters.Refresh(); + for (prm of collectionToArray(cmd.Parameters)) { + WScript.Echo(`${prm.Name}: ${prm.Type}`); + } + } catch (error) { + WScript.Echo(error); + } finally { + cat = null; + cmd = null; + cnn = tryClose(cnn); + prm = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/views-collection-commandtext-property-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null = null; + let cmd: ADODB.Command | null = null; + try { + // Open the connection + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + // Get the command + cmd = cat.Views('AllCustomers').Command; + + // Update the CommandText of the command + cmd.CommandText = 'SELECT CustomerId, CompanyName, ContactName FROM Customers'; + + // Update the view + cat.Views('AllCustomers').Command = cmd; + } catch (error) { + WScript.Echo(error); + } finally { + cat = null; + cmd = null; + cnn = tryClose(cnn); + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/datecreated-and-datemodified-properties-example-vb +{ + const dateOutput = (caption: string, tbl: ADOX.Table) => { + // Print DateCreated and DateModified information about specified Table object + WScript.Echo(caption); + WScript.Echo(`\tTable: ${tbl.Name}`); + WScript.Echo(`\t\t${new Date(tbl.DateCreated).toString()}`); + WScript.Echo(`\t\t${new Date(tbl.DateModified).toString()}`); + WScript.Echo(''); + }; + + let cat: ADOX.Catalog | null = null; + try { + // Connect to the catalog. + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + const tblEmployees = cat.Tables('Employees'); + + // Print current information about the Employees table + dateOutput('Current properties', tblEmployees); + + // Create and append column to the Employees table. + tblEmployees.Columns.Append('NewColumn', adInteger); + cat.Tables.Refresh(); + + // Print new information about the Employees table. + dateOutput('After creating a new column', tblEmployees); + + // Delete new column because this is a demonstration + tblEmployees.Columns.Delete('NewColumn'); + + // Create and append new Table object to the Northwind database + const tblNewTable = new ActiveXObject('ADOX.Table'); + tblNewTable.Name = 'NewTable'; + tblNewTable.Columns.Append('NewColumn', adInteger); + cat.Tables.Append(tblNewTable); + cat.Tables.Refresh(); + + // Print information about the new Table object + dateOutput('After creating a new table', cat.Tables('NewTable')); + + // Delete new Table object because this is a demonstration + cat.Tables.Delete(tblNewTable.Name); + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { cat.ActiveConnection = null; } + cat = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/definedsize-property-example-vb +{ + let rstEmployees: ADODB.Recordset | null = null; + let catNorthwind: ADOX.Catalog | null; + let colFirstname: ADOX.Column | null; + let colNewFirstName: ADOX.Column | null; + try { + // Open a Recordset for the Employees table. + rstEmployees = new ActiveXObject('ADODB.Recordset'); + rstEmployees.Open('Employees', connectionString, adOpenKeyset, undefined, ADODB.CommandTypeEnum.adCmdTable); + + // Open a Catalog for the Northwind database, using same connection as rstEmployees + catNorthwind = new ActiveXObject('ADOX.Catalog'); + catNorthwind.ActiveConnection = rstEmployees.ActiveConnection; + + // Loop through the recordset displaying the contents of the FirstName field, the field's defined size, + // and its actual size. Also store FirstName values in aryFirstName array. + rstEmployees.MoveFirst(); + WScript.Echo(''); + WScript.Echo('Original Defined Size and Actual Size'); + const firstnames: string[] = []; + for (let i = 0; !rstEmployees.EOF; i++) { + const firstField = rstEmployees('FirstName'); + const [firstname, lastname] = [firstField.Value as string, rstEmployees('LastName').Value as string]; + WScript.Echo(`Employee name: ${firstname} ${lastname}`); + WScript.Echo(`\tFirstName Defined size: ${firstField.DefinedSize}`); + WScript.Echo(`\tFirstName Actual size: ${firstField.ActualSize}`); + firstnames[i] = firstname; // we don't check for null, because null is better than undefined when putting the first names back + rstEmployees.MoveNext(); + } + rstEmployees.Close(); + + // Redefine the DefinedSize of FirstName in the catalog + colFirstname = catNorthwind.Tables('Employees').Columns('FirstName'); + colNewFirstName = new ActiveXObject('ADOX.Column'); + colNewFirstName.Name = colFirstname.Name; + colNewFirstName.Type = colFirstname.Type; + colNewFirstName.DefinedSize = colFirstname.DefinedSize + 1; + + // Append new FirstName column to catalog + catNorthwind.Tables('Employees').Columns.Delete(colFirstname.Name); + catNorthwind.Tables('Employees').Columns.Append(colNewFirstName); + + // Open Employee table in Recordset for updating + rstEmployees.Open('Employees', catNorthwind.ActiveConnection!, adOpenKeyset, adLockOptimistic, ADODB.CommandTypeEnum.adCmdTable); + + // Loop through the recordset displaying the contents of the FirstName field, the field's defined size, + // and its actual size. Also restore FirstName values from aryFirstName. + rstEmployees.MoveFirst(); + WScript.Echo(''); + WScript.Echo('Original Defined Size and Actual Size'); + for (let i = 0; !rstEmployees.EOF; i++) { + const firstField = rstEmployees('FirstName'); + firstField.Value = firstnames[i]; + WScript.Echo(`Employee name: ${firstField.Value} ${rstEmployees('LastName').Value}`); + WScript.Echo(`\tFirstName Defined size: ${firstField.DefinedSize}`); + WScript.Echo(`\tFirstName Actual size: ${firstField.ActualSize}`); + rstEmployees.MoveNext(); + } + rstEmployees.Close(); + + // Restore original FirstName column to catalog + catNorthwind.Tables('Employees').Columns.Delete(colNewFirstName.Name); + catNorthwind.Tables('Employees').Columns.Append(colFirstname); + + // Restore original FirstName values to Employees table + rstEmployees.Open('Employees', catNorthwind.ActiveConnection!, adOpenKeyset, adLockOptimistic, ADODB.CommandTypeEnum.adCmdTable); + rstEmployees.MoveFirst(); + for (let i = 0; !rstEmployees.EOF; i++) { + rstEmployees('FirstName').Value = firstnames[i]; + rstEmployees.MoveNext(); + } + rstEmployees.Close(); + } catch (error) { + WScript.Echo(error); + } finally { + catNorthwind = null; + colNewFirstName = null; + colFirstname = null; + rstEmployees = tryClose(rstEmployees); + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/deleterule-property-example-vb +{ + let cat: ADOX.Catalog | null = null; + let tblNew: ADOX.Table | null; + let kyPrimary: ADOX.Key | null; + try { + // Connect the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + // Name new table + tblNew = new ActiveXObject('ADOX.Table'); + tblNew.Name = 'NewTable'; + + // Append a numeric and a text field to new table. + tblNew.Columns.Append('NumField', adInteger, 20); + tblNew.Columns.Append('TextField', adVarChar, 20); + + // Append the new table + cat.Tables.Append(tblNew); + + // Define the Primary key + kyPrimary = new ActiveXObject('ADOX.Key'); + kyPrimary.Name = 'NumField'; + kyPrimary.Type = ADOX.KeyTypeEnum.adKeyPrimary; + kyPrimary.RelatedTable = 'Customers'; + kyPrimary.Columns.Append('NumField'); + kyPrimary.Columns('NumField').RelatedColumn = 'CustomerId'; + kyPrimary.DeleteRule = ADOX.RuleEnum.adRICascade; + + // Append the primary key + cat.Tables('NewTable').Keys.Append(kyPrimary); + WScript.Echo('The primary key is appended.'); + + // Delete the table as this is a demonstration. + cat.Tables.Delete(tblNew.Name); + WScript.Echo('The primary key is deleted.'); + } catch (error) { + WScript.Echo(error); + } finally { + if (cat) { cat.ActiveConnection = null; } + cat = null; + kyPrimary = null; + tblNew = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/indexnulls-property-example-vb +{ + // Connect the catalog. + const cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + + let catNorthwind: ADOX.Catalog | null = new ActiveXObject('ADOX.Catalog'); + catNorthwind.ActiveConnection = cnn; + + // Append Country column to new index + const idxNew = new ActiveXObject('ADOX.Index'); + idxNew.Columns.Append('Country'); + idxNew.Name = 'NewIndex'; + + // Set IndexNulls based on user selection + WScript.Echo('Allow nulls Y/N (Y to allow, N to ignore)?'); + const input = WScript.StdIn.ReadLine().toUpperCase(); + switch (input) { + case 'Y': + idxNew.IndexNulls = ADOX.AllowNullsEnum.adIndexNullsAllow; + break; + case 'N': + idxNew.IndexNulls = ADOX.AllowNullsEnum.adIndexNullsIgnore; + break; + } + + // Append new index to Employees table + catNorthwind.Tables('Employees').Indexes.Append(idxNew); + + const rstEmployees = new ActiveXObject('ADODB.Recordset'); + rstEmployees.Index = idxNew.Name; + rstEmployees.Open('Employees', cnn, adOpenKeyset, adLockOptimistic, ADODB.CommandTypeEnum.adCmdTableDirect); + + // Add a new record to the Employees table. + rstEmployees.AddNew(); + rstEmployees('FirstName').Value = 'Gary'; + rstEmployees('LastName').Value = 'Haarsager'; + rstEmployees.Update(); + + // Bookmark the newly added record + const bookmark = rstEmployees.Bookmark; + + // Use the new index to set the order of the records. + rstEmployees.MoveFirst(); + + WScript.Echo(`Index = ${rstEmployees.Index}, IndexNulls = ${idxNew.IndexNulls}`); + WScript.Echo('\tCountry - Name'); + + // Enumerate the Recordset. The value of the IndexNulls property will determine if the newly added record appears in the output. + while (!rstEmployees.EOF) { + const country = rstEmployees('Country').Value as string | null || '[NULL]'; + WScript.Echo(`\t${country} - ${rstEmployees('FirstName').Value} ${rstEmployees('LastName').Value}`); + rstEmployees.MoveNext(); + } + + // Delete new record because this is a demonstration. + rstEmployees.Bookmark = bookmark; + rstEmployees.Delete(); + + rstEmployees.Close(); + + catNorthwind.Tables('Employees').Indexes.Delete(idxNew.Name); + catNorthwind = null; +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/adox-code-example-numericscale-and-precision-properties-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null; + let colLoop: ADOX.Column | null; + try { + // Connect the catalog. + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + // Retrieve the Order Details table + const tblOD = cat.Tables('Order Details'); + + // Display numeric scale and precision of small integer fields. + for (colLoop of collectionToArray(tblOD.Columns)) { + if (colLoop.Type === ADODB.DataTypeEnum.adSmallInt) { + WScript.Echo(` +Column: ${colLoop.Name} +Numeric scale: ${colLoop.NumericScale} +Precision: ${colLoop.Precision} + `.trim()); + } + } + } catch (error) { + WScript.Echo(error); + } finally { + cat = null; + cnn = tryClose(cnn); + colLoop = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/parentcatalog-property-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null; + let tbl: ADOX.Table | null; + try { + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + tbl = new ActiveXObject('ADOX.Table'); + tbl.Name = 'MyContacts'; + tbl.ParentCatalog = cat; + + // Create fields and append them to the new Table object. + tbl.Columns.Append('ContactId', adInteger); + tbl.Columns.Append('CustomerID', adVarWChar); + tbl.Columns.Append('FirstName', adVarWChar); + tbl.Columns.Append('LastName', adVarWChar); + tbl.Columns.Append('Phone', adVarWChar, 20); + tbl.Columns.Append('Notes', ADODB.DataTypeEnum.adLongVarWChar); + + // Make the ContactId column an auto incrementing column + tbl.Columns('ContactId').Properties('AutoIncrement').Value = true; + + cat.Tables.Append(tbl); + WScript.Echo(`Table 'MyContacts' is added.`); + + // Delete the table as this is a demonstration. + cat.Tables.Delete(tbl.Name); + WScript.Echo(`Table 'MyContacts' is deleted.`); + } catch (error) { + WScript.Echo(error); + } finally { + cnn = tryClose(cnn); + cat = null; + tbl = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/primarykey-and-unique-properties-example-vb +{ + let catNorthwind: ADOX.Catalog | null = null; + let tblNew: ADOX.Table | null; + let idxNew: ADOX.Index | null; + let idxLoop: ADOX.Index | null; + try { + // Connect the catalog + catNorthwind = new ActiveXObject('ADOX.Catalog'); + catNorthwind.ActiveConnection = connectionString; + + // Name new table + tblNew = new ActiveXObject('ADOX.Table'); + tblNew.Name = 'NewTable'; + + // Append a numeric and a text field to new table. + tblNew.Columns.Append('NumField', adInteger, 20); + tblNew.Columns.Append('TextField', adVarWChar, 20); + + // Append new Primary Key index on NumField column to new table + idxNew = new ActiveXObject('ADOX.Index'); + idxNew.Name = 'NumIndex'; + idxNew.Columns.Append('NumField'); + idxNew.PrimaryKey = true; + idxNew.Unique = true; + tblNew.Indexes.Append(idxNew); + + // Append an index on Textfield to new table.. + // Note the different technique: Specifying index and column name as parameters of the Append method + tblNew.Indexes.Append('TextIndex', 'TextField'); + + // Append the new table + catNorthwind.Tables.Append(tblNew); + + WScript.Echo(`${tblNew.Indexes.Count} indexes in '${tblNew.Name}' table`); + + // Enumerate Indexes collection. + for (idxLoop of collectionToArray(tblNew.Indexes)) { + WScript.Echo(` +Index ${idxLoop.Name} + Primary key = ${idxLoop.PrimaryKey} + Unique = ${idxLoop.Unique} + Columns = ${collectionToArray(idxLoop.Columns).map(colLoop => colLoop.Name).join(', ')} + `.trim()); + } + + // Delete new table as this is a demonstration. + catNorthwind.Tables.Delete(tblNew.Name); + } catch (error) { + WScript.Echo(error); + } finally { + if (catNorthwind) { catNorthwind.ActiveConnection = null; } + catNorthwind = null; + tblNew = null; + idxNew = null; + idxLoop = null; + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/sortorder-property-example-vb +{ + let cnn: ADODB.Connection | null = null; + let catNorthwind: ADOX.Catalog | null; + let idxAscending: ADOX.Index | null; + let rstEmployees: ADODB.Recordset | null = null; + let idxDescending: ADOX.Index | null; + + try { + // Connect to the catalog. + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + catNorthwind = new ActiveXObject('ADOX.Catalog'); + catNorthwind.ActiveConnection = cnn; + + const enumerateRecordset = (indexName: string) => { + rstEmployees = new ActiveXObject('ADODB.Recordset'); + rstEmployees.Index = indexName; + rstEmployees.Open('Employees', cnn!, adOpenKeyset, adLockOptimistic, ADODB.CommandTypeEnum.adCmdTableDirect); + + rstEmployees.MoveFirst(); + WScript.Echo(`Index = ${rstEmployees.Index}`); + WScript.Echo('\tCountry - Name'); + + // Enumerate the Recordset. The value of the IndexNulls property will determine if the newly added record appears in the output. + while (!rstEmployees.EOF) { + WScript.Echo(`\t${rstEmployees('Country').Value} - ${rstEmployees('FirstName').Value} ${rstEmployees('LastName').Value}`); + rstEmployees.MoveNext(); + } + + rstEmployees.Close(); + }; + + // Append Country column to new index. + idxAscending = new ActiveXObject('ADOX.Index'); + idxAscending.Columns.Append('Country'); + idxAscending.Columns('Country').SortOrder = ADOX.SortOrderEnum.adSortAscending; + idxAscending.Name = 'Ascending'; + idxAscending.IndexNulls = ADOX.AllowNullsEnum.adIndexNullsAllow; + + // Append new index to Employees table. + catNorthwind.Tables('Employees').Indexes.Append(idxAscending); + + enumerateRecordset(idxAscending.Name); + + // Append Country column to new index. + idxDescending = new ActiveXObject('ADOX.Index'); + idxDescending.Columns.Append('Country'); + idxDescending.Columns('Country').SortOrder = ADOX.SortOrderEnum.adSortDescending; + idxDescending.Name = 'Descending'; + idxDescending.IndexNulls = ADOX.AllowNullsEnum.adIndexNullsAllow; + + // Append descending index to Employees table. + catNorthwind.Tables('Employees').Indexes.Append(idxDescending); + + enumerateRecordset(idxDescending.Name); + + // Delete new indexes because this is a demonstration. + catNorthwind.Tables('Employees').Indexes.Delete(idxAscending.Name); + catNorthwind.Tables('Employees').Indexes.Delete(idxDescending.Name); + } catch (error) { + WScript.Echo(error); + } finally { + cnn = tryClose(cnn); + catNorthwind = null; + idxAscending = null; + idxDescending = null; + rstEmployees = tryClose(rstEmployees); + } +} + +// https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/views-and-fields-collections-example-vb +{ + let cnn: ADODB.Connection | null = null; + let cat: ADOX.Catalog | null; + let rst: ADODB.Recordset | null = null; + let fld: ADODB.Field | null; + try { + // Open the Connection + cnn = new ActiveXObject('ADODB.Connection'); + cnn.Open(connectionString); + + // Open the catalog + cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = cnn; + + // Set the Source for the Recordset + rst = new ActiveXObject('ADODB.Recordset'); + rst.Source = cat.Views('AllCustomers').Command; + + // Retrieve Field information + rst.Fields.Refresh(); + + for (fld of collectionToArray(rst.Fields)) { + WScript.Echo(`${fld.Name}.${fld.Type}`); + } + } catch (error) { + WScript.Echo(error); + } finally { + cnn = tryClose(cnn); + cat = null; + rst = tryClose(rst); + fld = null; + } +} + +const flatten = (arr: T[][], result: T[] = []) => { + for (let i = 0, length = arr.length; i < length; i++) { + const value: T | any[] = arr[i]; // any in this context is because the array might have an arbitrary depth + if (Array.isArray(value)) { + flatten(value, result); + } else { + result.push(value); + } + } + return result; +}; + +// List indexes with multiple columns +{ + interface TableIndex { + tbl: ADOX.Table; + idx: ADOX.Index; + } + + const cat = new ActiveXObject('ADOX.Catalog'); + cat.ActiveConnection = connectionString; + + let multicolumnIndexes = flatten( + collectionToArray(cat.Tables).map(tbl => + collectionToArray(tbl.Indexes).map(idx => + ({ tbl, idx }) + ) + ) + ).filter(x => x.idx.Columns.Count > 1); + for (const x of multicolumnIndexes) { + const columns = collectionToArray(x.idx.Columns).map(col => col.Name).join(', '); + WScript.Echo(`${x.tbl.Name}.${x.idx.Name} -- ${columns}`); + } + multicolumnIndexes = []; +} diff --git a/types/activex-adox/index.d.ts b/types/activex-adox/index.d.ts new file mode 100644 index 0000000000..8960dd0a31 --- /dev/null +++ b/types/activex-adox/index.d.ts @@ -0,0 +1,335 @@ +// Type definitions for Microsoft ADO Extensions 6.0 for DDL and Security - ADOX 6.0 +// Project: https://docs.microsoft.com/en-us/sql/ado/reference/adox-api/adox-object-model +// Definitions by: Zev Spitz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/// + +declare namespace ADOX { + const enum ActionEnum { + adAccessDeny = 3, + adAccessGrant = 1, + adAccessRevoke = 4, + adAccessSet = 2, + } + + const enum AllowNullsEnum { + adIndexNullsAllow = 0, + adIndexNullsDisallow = 1, + adIndexNullsIgnore = 2, + adIndexNullsIgnoreAny = 4, + } + + const enum ColumnAttributesEnum { + adColFixed = 1, + adColNullable = 2, + } + + const enum InheritTypeEnum { + adInheritBoth = 3, + adInheritContainers = 2, + adInheritNone = 0, + adInheritNoPropogate = 4, + adInheritObjects = 1, + } + + const enum KeyTypeEnum { + adKeyForeign = 2, + adKeyPrimary = 1, + adKeyUnique = 3, + } + + const enum ObjectTypeEnum { + adPermObjColumn = 2, + adPermObjDatabase = 3, + adPermObjProcedure = 4, + adPermObjProviderSpecific = -1, + adPermObjTable = 1, + adPermObjView = 5, + } + + const enum RightsEnum { + adRightCreate = 16384, + adRightDelete = 65536, + adRightDrop = 256, + adRightExclusive = 512, + adRightExecute = 536870912, + adRightFull = 268435456, + adRightInsert = 32768, + adRightMaximumAllowed = 33554432, + adRightNone = 0, + adRightRead = -2147483648, + adRightReadDesign = 1024, + adRightReadPermissions = 131072, + adRightReference = 8192, + adRightUpdate = 1073741824, + adRightWithGrant = 4096, + adRightWriteDesign = 2048, + adRightWriteOwner = 524288, + adRightWritePermissions = 262144, + } + + const enum RuleEnum { + adRICascade = 1, + adRINone = 0, + adRISetDefault = 3, + adRISetNull = 2, + } + + const enum SortOrderEnum { + adSortAscending = 1, + adSortDescending = 2, + } + + class Catalog { + private constructor(); + private 'ADOX.Catalog_typekey': Catalog; + + /** Can be set to a Connection object or a string. Returns the active Connection object, or `null` */ + ActiveConnection: string | ADODB.Connection | null; + + /** + * The **Create** method creates and opens a new ADO Connection to the data source specified in _ConnectString_. If successful, the new **Connection** object is assigned to the **ActiveConnection** property. + * + * An error will occur if the provider does not support creating new catalogs. + * + * @param ConnectString Connection string + */ + Create(ConnectString: string): void; + + /** + * @param ObjectTypeId Specifies the GUID for a provider object type not defined by the OLE DB specification + */ + GetObjectOwner(ObjectName: string, ObjectType: ObjectTypeEnum.adPermObjProviderSpecific, ObjectTypeId: any): string; + GetObjectOwner(ObjectName: string, ObjectType: ObjectTypeEnum): string; + readonly Groups: Groups; + readonly Procedures: Procedures; + + /** + * @param UserName Specifies the name of the **User** or **Group** to own the object + * @param ObjectTypeId Specifies the GUID for a provider object type that is not defined by the OLE DB specification + */ + SetObjectOwner(ObjectName: string, ObjectType: ObjectTypeEnum.adPermObjProviderSpecific, UserName: string, ObjectTypeId: any): void; + SetObjectOwner(ObjectName: string, ObjectType: ObjectTypeEnum, UserName: string): void; + readonly Tables: Tables; + readonly Users: Users; + readonly Views: Views; + } + + class Column { + private constructor(); + private 'ADOX.Column_typekey': Column; + Attributes: ColumnAttributesEnum; + DefinedSize: number; + Name: string; + NumericScale: number; + ParentCatalog: Catalog; + Precision: number; + readonly Properties: ADODB.Properties; + RelatedColumn: string; + SortOrder: SortOrderEnum; + Type: ADODB.DataTypeEnum; + } + + interface Columns { + /** + * @param Type [Type=202] + * @param DefinedSize [DefinedSize=0] + */ + Append(Item: Column | string, Type?: ADODB.DataTypeEnum, DefinedSize?: number): void; + readonly Count: number; + Delete(Item: string | number): void; + Item(Item: string | number): Column; + Refresh(): void; + (Item: string | number): Column; + } + + class Group { + private constructor(); + private 'ADOX.Group_typekey': Group; + + /** + * @param Name Specifies the name of the object for which to set permissions. Pass `null` if you want to get the permissions for the object container. + * @param ObjectTypeId Specifies the GUID for a provider object type not defined by the OLE DB specification. + */ + GetPermissions(Name: string | null, ObjectType: ObjectTypeEnum.adPermObjProviderSpecific, ObjectTypeId: any): RightsEnum; + GetPermissions(Name: string | null, ObjectType: ObjectTypeEnum): RightsEnum; + Name: string; + ParentCatalog: Catalog; + readonly Properties: ADODB.Properties; + + /** + * @param Rights A bitmask of one or more of the **RightsEnum** constants, that indicates the rights to set. + * @param Inherit [Inherit=0] + * @param ObjectTypeId Specifies the GUID for a provider object type not defined by the OLE DB specification. + */ + SetPermissions(Name: string, ObjectType: ObjectTypeEnum.adPermObjProviderSpecific, Action: ActionEnum, Rights: RightsEnum, Inherit: InheritTypeEnum, ObjectTypeId: any): void; + SetPermissions(Name: string, ObjectType: ObjectTypeEnum, Action: ActionEnum, Rights: RightsEnum, Inherit?: InheritTypeEnum): void; + readonly Users: Users; + } + + interface Groups { + Append(Item: Group | string): void; + readonly Count: number; + Delete(Item: string | number): void; + Item(Item: string | number): Group; + Refresh(): void; + (Item: string | number): Group; + } + + class Index { + private constructor(); + private 'ADOX.Index_typekey': Index; + Clustered: boolean; + readonly Columns: Columns; + IndexNulls: AllowNullsEnum; + Name: string; + PrimaryKey: boolean; + readonly Properties: ADODB.Properties; + Unique: boolean; + } + + // tslint:disable-next-line:interface-name + interface Indexes { + Append(Item: Index | string, Columns?: string | SafeArray): void; // is this actually two overloads, one with [Index] and one with [string,string | SafeArray]? + readonly Count: number; + Delete(Item: string | number): void; + Item(Item: string | number): Index; + Refresh(): void; + (Item: string | number): Index; + } + + class Key { + private constructor(); + private 'ADOX.Key_typekey': Key; + readonly Columns: Columns; + DeleteRule: RuleEnum; + Name: string; + RelatedTable: string; + Type: KeyTypeEnum; + UpdateRule: RuleEnum; + } + + interface Keys { + /** + * @param Type [Type=1] + * @param RelatedTable [RelatedTable=''] + * @param RelatedColumn [RelatedColumn=''] + */ + Append(Item: Key | string, Type?: KeyTypeEnum, Column?: string | SafeArray, RelatedTable?: string, RelatedColumn?: string): void; + readonly Count: number; + Delete(Item: string | number): void; + Item(Item: string | number): Key; + Refresh(): void; + (Item: string | number): Key; + } + + class Procedure { + private constructor(); + private 'ADOX.Procedure_typekey': Procedure; + Command: ADODB.Command; + readonly DateCreated: VarDate | null; + readonly DateModified: VarDate | null; + readonly Name: string; + } + + interface Procedures { + Append(Name: string, Command: ADODB.Command): void; + readonly Count: number; + Delete(Item: string | number): void; + Item(Item: string | number): Procedure; + Refresh(): void; + (Item: string | number): Procedure; + } + + class Table { + private constructor(); + private 'ADOX.Table_typekey': Table; + readonly Columns: Columns; + readonly DateCreated: VarDate; + readonly DateModified: VarDate; + readonly Indexes: Indexes; + readonly Keys: Keys; + Name: string; + ParentCatalog: Catalog; + readonly Properties: ADODB.Properties; + readonly Type: string; + } + + interface Tables { + Append(Item: Table | string): void; + readonly Count: number; + Delete(Item: string | number): void; + Item(Item: string | number): Table; + Refresh(): void; + (Item: string | number): Table; + } + + class User { + private constructor(); + private 'ADOX.User_typekey': User; + ChangePassword(OldPassword: string, NewPassword: string): void; + + /** + * @param Name Specifies the name of the object for which to set permissions. Pass `null` if you want to get the permissions for the object container. + * @param ObjectTypeId Specifies the GUID for a provider object type not defined by the OLE DB specification. + */ + GetPermissions(Name: string | null, ObjectType: ObjectTypeEnum.adPermObjProviderSpecific, ObjectTypeId: any): RightsEnum; + GetPermissions(Name: string | null, ObjectType: ObjectTypeEnum): RightsEnum; + readonly Groups: Groups; + Name: string; + ParentCatalog: Catalog; + readonly Properties: ADODB.Properties; + + /** + * @param Rights A bitmask of one or more of the **RightsEnum** constants, that indicates the rights to set. + * @param Inherit [Inherit=0] + * @param ObjectTypeId Specifies the GUID for a provider object type not defined by the OLE DB specification. + */ + SetPermissions(Name: string, ObjectType: ObjectTypeEnum.adPermObjProviderSpecific, Action: ActionEnum, Rights: RightsEnum, Inherit: InheritTypeEnum, ObjectTypeId: any): void; + SetPermissions(Name: string, ObjectType: ObjectTypeEnum, Action: ActionEnum, Rights: RightsEnum, Inherit?: InheritTypeEnum): void; + } + + interface Users { + /** @param Password [Password=''] */ + Append(Item: User | string, Password?: string): void; + readonly Count: number; + Delete(Item: string | number): void; + Item(Item: string | number): User; + Refresh(): void; + (Item: string | number): User; + } + + class View { + private constructor(); + private 'ADOX.View_typekey': View; + Command: ADODB.Command; + readonly DateCreated: VarDate; + readonly DateModified: VarDate; + readonly Name: string; + } + + interface Views { + Append(Name: string, Command: ADODB.Command): void; + readonly Count: number; + Delete(Item: string | number): void; + Item(Item: string | number): View; + Refresh(): void; + (Item: string | number): View; + } +} + +interface ActiveXObject { + new(progid: K): ActiveXObjectNameMap[K]; +} + +interface ActiveXObjectNameMap { + 'ADOX.Catalog': ADOX.Catalog; + 'ADOX.Column': ADOX.Column; + 'ADOX.Group': ADOX.Group; + 'ADOX.Index': ADOX.Index; + 'ADOX.Key': ADOX.Key; + 'ADOX.Table': ADOX.Table; + 'ADOX.User': ADOX.User; +} diff --git a/types/activex-adox/package.json b/types/activex-adox/package.json new file mode 100644 index 0000000000..d9b1031263 --- /dev/null +++ b/types/activex-adox/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "activex-helpers": "*" + } +} \ No newline at end of file diff --git a/types/activex-adox/tsconfig.json b/types/activex-adox/tsconfig.json new file mode 100644 index 0000000000..7aaa955db5 --- /dev/null +++ b/types/activex-adox/tsconfig.json @@ -0,0 +1,22 @@ + +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es5", "scripthost"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "activex-adox-tests.ts" + ] +} \ No newline at end of file diff --git a/types/activex-adox/tslint.json b/types/activex-adox/tslint.json new file mode 100644 index 0000000000..b06c06beef --- /dev/null +++ b/types/activex-adox/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "no-const-enum": false, + "max-line-length": false + } +} \ No newline at end of file diff --git a/types/activex-infopath/index.d.ts b/types/activex-infopath/index.d.ts index 1aa8cba2f9..c00c67e197 100644 --- a/types/activex-infopath/index.d.ts +++ b/types/activex-infopath/index.d.ts @@ -2,7 +2,7 @@ // Project: https://msdn.microsoft.com/en-us/library/jj602751.aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.6 /// /// diff --git a/types/activex-wia/activex-wia-tests.ts b/types/activex-wia/activex-wia-tests.ts index c33385af14..8fc7dcfd2e 100644 --- a/types/activex-wia/activex-wia-tests.ts +++ b/types/activex-wia/activex-wia-tests.ts @@ -11,6 +11,9 @@ const collectionToArray = (col: { Item(key: any): T }): T[] => { return results; }; +WScript.Echo('Hello, world'); +WScript.Quit(); + // source -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms630826(v=vs.85).aspx { const cd = new ActiveXObject('WIA.CommonDialog'); @@ -51,7 +54,7 @@ const collectionToArray = (col: { Item(key: any): T }): T[] => { { const dev = cd.ShowSelectDevice(); if (dev) { - collectionToArray(dev.Properties).forEach(p => { + for (const p of collectionToArray(dev.Properties)) { let s = `${p.Name} (${p.PropertyID}) = `; if (p.IsVector) { s += '[vector of data]'; @@ -84,7 +87,7 @@ const collectionToArray = (col: { Item(key: any): T }): T[] => { } WScript.Echo(s); - }); + } } } @@ -112,7 +115,7 @@ const collectionToArray = (col: { Item(key: any): T }): T[] => { { const img = cd.ShowAcquireImage(); if (img) { - collectionToArray(img.Properties).forEach(p => { + for (const p of collectionToArray(img.Properties)) { let contents = ''; if (p.IsVector) { contents = '[vector data not emitted]'; @@ -124,7 +127,7 @@ const collectionToArray = (col: { Item(key: any): T }): T[] => { contents = p.Value; } WScript.Echo(`${p.Name} (${p.PropertyID}) = ${contents}`); - }); + } } } @@ -133,12 +136,12 @@ const collectionToArray = (col: { Item(key: any): T }): T[] => { const dev = cd.ShowSelectDevice(); if (dev) { const actionEvent = WIA.WiaEventFlag.ActionEvent; - collectionToArray(dev.Events).forEach(e => { + for (const e of collectionToArray(dev.Events)) { const msg = (e.Type & actionEvent) === actionEvent ? `${e.Name} is an Action event` : `${e.Name} is not an Action event`; WScript.Echo(msg); - }); + } } } @@ -208,14 +211,14 @@ Frame count = ${img.FrameCount}} // Create an imageprocess object and enumerate filters { const ip = new ActiveXObject('WIA.ImageProcess'); - collectionToArray(ip.FilterInfos).forEach(fi => { + for (const fi of collectionToArray(ip.FilterInfos)) { const s = [ fi.Name, new Array(51).join('='), fi.Description ].join('\n'); WScript.Echo(s); - }); + } } // Create an imageprocess object and create one of each available filter @@ -269,11 +272,11 @@ Frame count = ${img.FrameCount}} WScript.Echo(s); }; - collectionToArray(ip.FilterInfos).forEach(fi => { + for (const fi of collectionToArray(ip.FilterInfos)) { ip.Filters.Add(fi.FilterID); listProperties(ip.Filters(1)); ip.Filters.Remove(1); - }); + } } // List the supported transfer formats @@ -308,14 +311,14 @@ Frame count = ${img.FrameCount}} { const dev = cd.ShowSelectDevice(); if (dev) { - collectionToArray(dev.Items).forEach(item => { + for (const item of collectionToArray(dev.Items)) { let s: string = item.Properties("Item Name").Value; if (item.Properties.Exists("Item Time Stamp")) { const v: WIA.Vector = item.Properties("Item Time Stamp").Value; if (v.Count === 8) { s += ` (${v.Date})`; } } WScript.Echo(s); - }); + } } } @@ -340,16 +343,16 @@ Frame count = ${img.FrameCount}} } // List all available devices by name and deviceid - collectionToArray(dm.DeviceInfos).forEach(di => { + for (const di of collectionToArray(dm.DeviceInfos)) { const name: string = di.Properties("Name").Value; WScript.Echo(`${name} (${di.DeviceID})`); - }); + } // Display all the properties for the selected device { const dev = cd.ShowSelectDevice(); if (dev) { - collectionToArray(dev.Properties).forEach(p => { + for (const p of collectionToArray(dev.Properties)) { const name = `${p.Name} (${p.PropertyID})`; let contents: string; if (p.IsVector) { @@ -360,7 +363,7 @@ Frame count = ${img.FrameCount}} contents = p.Value; } WScript.Echo(`${name} = ${contents}`); - }); + } } } @@ -430,7 +433,7 @@ Frame count = ${img.FrameCount}} if (args[0] === 'connect') { const deviceID = args[1].substr(12); const device = dm.DeviceInfos(deviceID).Connect(); - collectionToArray(device.Items).forEach(item => { + for (const item of collectionToArray(device.Items)) { const img = item.Transfer(); img.SaveFile(`C:\\${item.Properties('Item Name').Value}.${img.FileExtension}`); @@ -445,7 +448,7 @@ Frame count = ${img.FrameCount}} WScript.Echo(error); } } - }); + } WScript.Quit(); } break; diff --git a/types/adal-angular/adal-angular-tests.ts b/types/adal-angular/adal-angular-tests.ts index 272591d56e..81293de159 100644 --- a/types/adal-angular/adal-angular-tests.ts +++ b/types/adal-angular/adal-angular-tests.ts @@ -1,10 +1,6 @@ -import AuthenticationContext, { - AuthenticationContextOptions, - TokenCallback, - UserCallback -} from "adal-angular"; +import AuthenticationContext = require("adal-angular"); -const onLogin: TokenCallback = (errorDescription, idToken, error) => { +const onLogin: AuthenticationContext.TokenCallback = (errorDescription, idToken, error) => { if (error) { console.error(errorDescription, error); return; @@ -14,7 +10,7 @@ const onLogin: TokenCallback = (errorDescription, idToken, error) => { } }; -const onToken: TokenCallback = (errorDesc, token, error) => { +const onToken: AuthenticationContext.TokenCallback = (errorDesc, token, error) => { if (error) { console.error(error); return; @@ -22,7 +18,7 @@ const onToken: TokenCallback = (errorDesc, token, error) => { console.log('Making request with token:', token); }; -const onUser: UserCallback = (error, user) => { +const onUser: AuthenticationContext.UserCallback = (error, user) => { if (error) { console.error(error); return; @@ -57,7 +53,7 @@ const acquireAnAccessToken = () => { ); }; -const config: AuthenticationContextOptions = { +const config: AuthenticationContext.Options = { clientId: "7cee0f68-5051-41f6-9e45-80463d21d65d", redirectUri: "http://localhost:16969/", instance: "https://login.microsoftonline.com/", @@ -70,6 +66,7 @@ const config: AuthenticationContextOptions = { }; const authenticationContext = new AuthenticationContext(config); +window.Logging.level = authenticationContext.CONSTANTS.LOGGING_LEVEL.ERROR; if (authenticationContext.isCallback(window.location.hash)) { authenticationContext.handleWindowCallback(); @@ -79,6 +76,11 @@ if (authenticationContext.isCallback(window.location.hash)) { acquireAnAccessToken(); } +const injectedContext = AuthenticationContext.inject({ + clientId: "7cee0f68-5051-41f6-9e45-80463d21d65d", +}); +injectedContext.handleWindowCallback(); + setTimeout(() => { authenticationContext.logOut(); }, 60000); diff --git a/types/adal-angular/index.d.ts b/types/adal-angular/index.d.ts index 00dc813ee8..ea4963b6d2 100644 --- a/types/adal-angular/index.d.ts +++ b/types/adal-angular/index.d.ts @@ -1,142 +1,28 @@ // Type definitions for adal-angular 1.0 // Project: https://github.com/AzureAD/azure-activedirectory-library-for-js#readme // Definitions by: Daniel Perez Alvarez +// Anthony Ciccarello // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export enum LoggingLevel { - ERROR = 0, - WARNING = 1, - INFO = 2, - VERBOSE = 3 -} +// In module contexts the class constructor function is the exported object +export = AuthenticationContext; -export type RequestType = "LOGIN" | "RENEW_TOKEN" | "UNKNOWN"; +// This class is defined globally in not in a module context +declare class AuthenticationContext { + instance: string; + config: AuthenticationContext.Options; + callback: AuthenticationContext.TokenCallback; + popUp: boolean; + isAngular: boolean; -export type ResponseType = "id_token token" | "token"; + /** + * Enum for request type + */ + REQUEST_TYPE: AuthenticationContext.RequestType; + RESPONSE_TYPE: AuthenticationContext.ResponseType; + CONSTANTS: AuthenticationContext.Constants; -export interface RequestInfo { - /** - * Object comprising of fields such as id_token/error, session_state, state, e.t.c. - */ - parameters: any; - /** - * Request type. - */ - requestType: RequestType; - /** - * Whether state is valid. - */ - stateMatch: boolean; - /** - * Unique guid used to match the response with the request. - */ - stateResponse: string; - /** - * Whether `requestType` contains `id_token`, `access_token` or error. - */ - valid: boolean; -} - -export interface UserInfo { - /** - * Username assigned from UPN or email. - */ - userName: string; - /** - * Properties parsed from `id_token`. - */ - profile: any; -} - -export type TokenCallback = ( - errorDesc: string | null, - token: string, - error: any -) => void; - -export type UserCallback = (errorDesc: string | null, user: UserInfo) => void; - -export interface AuthenticationContextOptions { - /** - * Client ID assigned to your app by Azure Active Directory. - */ - clientId: string; - /** - * Endpoint at which you expect to receive tokens.Defaults to `window.location.href`. - */ - redirectUri: string; - /** - * Azure Active Directory instance. Defaults to `https://login.microsoftonline.com/`. - */ - instance?: string; - /** - * Your target tenant. Defaults to `common`. - */ - tenant?: string; - /** - * Query parameters to add to the authentication request. - */ - extraQueryParameter?: string; - /** - * Unique identifier used to map the request with the response. Defaults to RFC4122 version 4 guid (128 bits). - */ - correlationId?: string; - /** - * User defined function of handling the navigation to Azure AD authorization endpoint in case of login. - */ - displayCall?: (url: string) => void; - /** - * Set this to true to enable login in a popup winodow instead of a full redirect. Defaults to `false`. - */ - popUp?: boolean; - /** - * Set this to the resource to request on login. Defaults to `clientId`. - */ - loginResource?: string; - /** - * Set this to redirect the user to a custom login page. - */ - localLoginUrl?: string; - /** - * Redirects to start page after login. Defaults to `true`. - */ - navigateToLoginRequestUrl?: boolean; - /** - * Set this to redirect the user to a custom logout page. - */ - logOutUri?: string; - /** - * Redirects the user to postLogoutRedirectUri after logout. Defaults to `redirectUri`. - */ - postLogoutRedirectUri?: string; - /** - * Sets browser storage to either 'localStorage' or sessionStorage'. Defaults to `sessionStorage`. - */ - cacheLocation?: "localStorage" | "sessionStorage"; - /** - * Array of keywords or URIs. Adal will attach a token to outgoing requests that have these keywords or URIs. - */ - endpoints?: { [resource: string]: string }; - /** - * Array of keywords or URIs. Adal will not attach a token to outgoing requests that have these keywords or URIs. - */ - anonymousEndpoints?: string[]; - /** - * If the cached token is about to be expired in the expireOffsetSeconds (in seconds), Adal will renew the token instead of using the cached token. Defaults to 300 seconds. - */ - expireOffsetSeconds?: number; - /** - * The number of milliseconds of inactivity before a token renewal response from AAD should be considered timed out. Defaults to 6 seconds. - */ - loadFrameTimeout?: number; - /** - * Callback to be invoked when a token is acquired. - */ - callback?: TokenCallback; -} - -export default class AuthenticationContext { - constructor(options: AuthenticationContextOptions); + constructor(options: AuthenticationContext.Options); /** * Initiates the login process by redirecting the user to Azure AD authorization endpoint. */ @@ -153,7 +39,7 @@ export default class AuthenticationContext { /** * If user object exists, returns it. Else creates a new user object by decoding `id_token` from the cache. */ - getCachedUser(): UserInfo; + getCachedUser(): AuthenticationContext.UserInfo; /** * Adds the passed callback to the array of callbacks for the specified resource. * @param resource A URI that identifies the resource for which the token is requested. @@ -163,14 +49,14 @@ export default class AuthenticationContext { registerCallback( expectedState: string, resource: string, - callback: TokenCallback + callback: AuthenticationContext.TokenCallback ): void; /** * Acquires token from the cache if it is not expired. Otherwise sends request to AAD to obtain a new token. * @param resource Resource URI identifying the target resource. * @param callback The callback provided by the caller. It will be called with token or error. */ - acquireToken(resource: string, callback: TokenCallback): void; + acquireToken(resource: string, callback: AuthenticationContext.TokenCallback): void; /** * Acquires token (interactive flow using a popup window) by sending request to AAD to obtain a new token. * @param resource Resource URI identifying the target resource. @@ -182,7 +68,7 @@ export default class AuthenticationContext { resource: string, extraQueryParameters: string | null | undefined, claims: string | null | undefined, - callback: TokenCallback + callback: AuthenticationContext.TokenCallback ): void; /** * Acquires token (interactive flow using a redirect) by sending request to AAD to obtain a new token. In this case the callback passed in the authentication request constructor will be called. @@ -217,7 +103,7 @@ export default class AuthenticationContext { * Calls the passed in callback with the user object or error message related to the user. * @param callback The callback provided by the caller. It will be called with user or error. */ - getUser(callback: UserCallback): void; + getUser(callback: AuthenticationContext.UserCallback): void; /** * Checks if the URL fragment contains access token, id token or error description. * @param hash Hash passed from redirect page. @@ -230,11 +116,11 @@ export default class AuthenticationContext { /** * Creates a request info object from the URL fragment and returns it. */ - getRequestInfo(hash: string): RequestInfo; + getRequestInfo(hash: string): AuthenticationContext.RequestInfo; /** * Saves token or error received in the response from AAD in the cache. In case of `id_token`, it also creates the user object. */ - saveTokenFromHash(requestInfo: RequestInfo): void; + saveTokenFromHash(requestInfo: AuthenticationContext.RequestInfo): void; /** * Gets resource for given endpoint if mapping is provided with config. * @param endpoint Resource URI identifying the target resource. @@ -252,7 +138,7 @@ export default class AuthenticationContext { * @param message Message to log. * @param error Error to log. */ - log(level: LoggingLevel, message: string, error: any): void; + log(level: AuthenticationContext.LoggingLevel, message: string, error: any): void; /** * Logs messages when logging level is set to 0. * @param message Message to log. @@ -274,4 +160,221 @@ export default class AuthenticationContext { * @param message Message to log. */ verbose(message: string): void; + + /** + * Logs Pii messages when Logging Level is set to 0 and window.piiLoggingEnabled is set to true. + * @param message Message to log. + * @param error Error to log. + */ + errorPii(message: string, error: any): void; + + /** + * Logs Pii messages when Logging Level is set to 1 and window.piiLoggingEnabled is set to true. + * @param message Message to log. + */ + warnPii(message: string): void; + + /** + * Logs messages when Logging Level is set to 2 and window.piiLoggingEnabled is set to true. + * @param message Message to log. + */ + infoPii(message: string): void; + + /** + * Logs messages when Logging Level is set to 3 and window.piiLoggingEnabled is set to true. + * @param message Message to log. + */ + verbosePii(message: string): void; +} + +declare namespace AuthenticationContext { + function inject(config: Options): AuthenticationContext; + + type LoggingLevel = 0 | 1 | 2 | 3; + + type RequestType = "LOGIN" | "RENEW_TOKEN" | "UNKNOWN"; + + type ResponseType = "id_token token" | "token"; + + interface RequestInfo { + /** + * Object comprising of fields such as id_token/error, session_state, state, e.t.c. + */ + parameters: any; + /** + * Request type. + */ + requestType: RequestType; + /** + * Whether state is valid. + */ + stateMatch: boolean; + /** + * Unique guid used to match the response with the request. + */ + stateResponse: string; + /** + * Whether `requestType` contains `id_token`, `access_token` or error. + */ + valid: boolean; + } + + interface UserInfo { + /** + * Username assigned from UPN or email. + */ + userName: string; + /** + * Properties parsed from `id_token`. + */ + profile: any; + } + + type TokenCallback = ( + errorDesc: string | null, + token: string | null, + error: any + ) => void; + + type UserCallback = (errorDesc: string | null, user: UserInfo | null) => void; + + /** + * Configuration options for Authentication Context + */ + interface Options { + /** + * Client ID assigned to your app by Azure Active Directory. + */ + clientId: string; + /** + * Endpoint at which you expect to receive tokens.Defaults to `window.location.href`. + */ + redirectUri?: string; + /** + * Azure Active Directory instance. Defaults to `https://login.microsoftonline.com/`. + */ + instance?: string; + /** + * Your target tenant. Defaults to `common`. + */ + tenant?: string; + /** + * Query parameters to add to the authentication request. + */ + extraQueryParameter?: string; + /** + * Unique identifier used to map the request with the response. Defaults to RFC4122 version 4 guid (128 bits). + */ + correlationId?: string; + /** + * User defined function of handling the navigation to Azure AD authorization endpoint in case of login. + */ + displayCall?: (url: string) => void; + /** + * Set this to true to enable login in a popup winodow instead of a full redirect. Defaults to `false`. + */ + popUp?: boolean; + /** + * Set this to the resource to request on login. Defaults to `clientId`. + */ + loginResource?: string; + /** + * Set this to redirect the user to a custom login page. + */ + localLoginUrl?: string; + /** + * Redirects to start page after login. Defaults to `true`. + */ + navigateToLoginRequestUrl?: boolean; + /** + * Set this to redirect the user to a custom logout page. + */ + logOutUri?: string; + /** + * Redirects the user to postLogoutRedirectUri after logout. Defaults to `redirectUri`. + */ + postLogoutRedirectUri?: string; + /** + * Sets browser storage to either 'localStorage' or sessionStorage'. Defaults to `sessionStorage`. + */ + cacheLocation?: "localStorage" | "sessionStorage"; + /** + * Array of keywords or URIs. Adal will attach a token to outgoing requests that have these keywords or URIs. + */ + endpoints?: { [resource: string]: string }; + /** + * Array of keywords or URIs. Adal will not attach a token to outgoing requests that have these keywords or URIs. + */ + anonymousEndpoints?: string[]; + /** + * If the cached token is about to be expired in the expireOffsetSeconds (in seconds), Adal will renew the token instead of using the cached token. Defaults to 300 seconds. + */ + expireOffsetSeconds?: number; + /** + * The number of milliseconds of inactivity before a token renewal response from AAD should be considered timed out. Defaults to 6 seconds. + */ + loadFrameTimeout?: number; + /** + * Callback to be invoked when a token is acquired. + */ + callback?: TokenCallback; + } + + interface LoggingConfig { + level: LoggingLevel; + log: (message: string) => void; + piiLoggingEnabled: boolean; + } + + /** + * Enum for storage constants + */ + interface Constants { + ACCESS_TOKEN: 'access_token'; + EXPIRES_IN: 'expires_in'; + ID_TOKEN: 'id_token'; + ERROR_DESCRIPTION: 'error_description'; + SESSION_STATE: 'session_state'; + STORAGE: { + TOKEN_KEYS: 'adal.token.keys'; + ACCESS_TOKEN_KEY: 'adal.access.token.key'; + EXPIRATION_KEY: 'adal.expiration.key'; + STATE_LOGIN: 'adal.state.login'; + STATE_RENEW: 'adal.state.renew'; + NONCE_IDTOKEN: 'adal.nonce.idtoken'; + SESSION_STATE: 'adal.session.state'; + USERNAME: 'adal.username'; + IDTOKEN: 'adal.idtoken'; + ERROR: 'adal.error'; + ERROR_DESCRIPTION: 'adal.error.description'; + LOGIN_REQUEST: 'adal.login.request'; + LOGIN_ERROR: 'adal.login.error'; + RENEW_STATUS: 'adal.token.renew.status'; + }; + RESOURCE_DELIMETER: '|'; + LOADFRAME_TIMEOUT: '6000'; + TOKEN_RENEW_STATUS_CANCELED: 'Canceled'; + TOKEN_RENEW_STATUS_COMPLETED: 'Completed'; + TOKEN_RENEW_STATUS_IN_PROGRESS: 'In Progress'; + LOGGING_LEVEL: { + ERROR: 0; + WARN: 1; + INFO: 2; + VERBOSE: 3; + }; + LEVEL_STRING_MAP: { + 0: 'ERROR:'; + 1: 'WARNING:'; + 2: 'INFO:'; + 3: 'VERBOSE:'; + }; + POPUP_WIDTH: 483; + POPUP_HEIGHT: 600; + } +} + +declare global { + interface Window { + Logging: AuthenticationContext.LoggingConfig; + } } diff --git a/types/adal-angular/tsconfig.json b/types/adal-angular/tsconfig.json index 9052e3fc04..f297baa423 100644 --- a/types/adal-angular/tsconfig.json +++ b/types/adal-angular/tsconfig.json @@ -15,10 +15,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", "adal-angular-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/adone/adone.d.ts b/types/adone/adone.d.ts index 91ebc4db7c..6322bf6efc 100644 --- a/types/adone/adone.d.ts +++ b/types/adone/adone.d.ts @@ -1,4 +1,7 @@ /// +/// +/// +/// declare namespace adone { const _null: symbol; @@ -104,4 +107,10 @@ declare namespace adone { export const expect: assertion.I.ExpectFunction; export const std: typeof nodestd; + + export const lodash: _.LoDashStatic; + + export const benchmark: typeof tbenchmark; + + export const async: typeof tasync; } diff --git a/types/adone/async.d.ts b/types/adone/async.d.ts new file mode 100644 index 0000000000..4cd3d421da --- /dev/null +++ b/types/adone/async.d.ts @@ -0,0 +1,3 @@ +export * from "async"; + +export as namespace tasync; diff --git a/types/adone/benchmark.d.ts b/types/adone/benchmark.d.ts new file mode 100644 index 0000000000..042e1ae62c --- /dev/null +++ b/types/adone/benchmark.d.ts @@ -0,0 +1,5 @@ +import Benchmark = require("benchmark"); + +export { Benchmark }; + +export as namespace tbenchmark; diff --git a/types/adone/glosses/collections/byte_array.d.ts b/types/adone/glosses/collections/byte_array.d.ts index 1dc3080fb3..e6f145ce38 100644 --- a/types/adone/glosses/collections/byte_array.d.ts +++ b/types/adone/glosses/collections/byte_array.d.ts @@ -103,6 +103,13 @@ declare namespace adone.collection { */ readUInt16BE(offset?: number): number; + /** + * Reads a 24bit unsigned be integer + * + * @param offset Offset to read from + */ + readUInt24BE(offset?: number): number; + /** * Reads a 32bit signed le integer * @@ -260,6 +267,13 @@ declare namespace adone.collection { */ writeUInt16BE(value: number, offset?: number): this; + /** + * Writes a 24bit unsigned be integer + * + * @param offset Offset to write at + */ + writeUInt24BE(value: number, offset?: number): this; + /** * Writes a 32bit signed le integer * diff --git a/types/adone/glosses/collections/fast_lru.d.ts b/types/adone/glosses/collections/fast_lru.d.ts index e991322bc0..3418f60ffa 100644 --- a/types/adone/glosses/collections/fast_lru.d.ts +++ b/types/adone/glosses/collections/fast_lru.d.ts @@ -4,13 +4,18 @@ declare namespace adone.collection { */ class FastLRU { /** - * @param size Cache size, unlimited by default + * @param size */ - constructor(size?: number, options?: { + constructor(options?: { + /** + * Cache size, unlimited by default + */ + maxSize?: number; + /** * Function that is called when a value is deleted */ - dispose?(key: K, value: V): void + dispose?(key: K, value: V): void; }); /** diff --git a/types/adone/glosses/collections/index.d.ts b/types/adone/glosses/collections/index.d.ts index 234ffe85f4..ab4e744d1a 100644 --- a/types/adone/glosses/collections/index.d.ts +++ b/types/adone/glosses/collections/index.d.ts @@ -16,7 +16,7 @@ /// /// /// -/// +/// declare namespace adone { /** diff --git a/types/adone/glosses/collections/lru.d.ts b/types/adone/glosses/collections/lru.d.ts index 7d41e32cd5..730845ae16 100644 --- a/types/adone/glosses/collections/lru.d.ts +++ b/types/adone/glosses/collections/lru.d.ts @@ -6,7 +6,7 @@ declare namespace adone.collection { * The maximum size of the cache, checked by applying the length function to all values in the cache. * Default is Infinity */ - max?: number; + maxSize?: number; /** * Maximum age in ms. Items are not pro-actively pruned out as they age, @@ -85,11 +85,6 @@ declare namespace adone.collection { * Represent an LRU cache */ class LRU { - /** - * Creates an LRU cache of the given size - */ - constructor(max: number); - /** * Creates an LRU cache with the given options */ @@ -98,7 +93,7 @@ declare namespace adone.collection { /** * The length of the cache, setter resizes the cache */ - max: number; + maxSize: number; /** * stale setting diff --git a/types/adone/glosses/collections/ns_cache.d.ts b/types/adone/glosses/collections/ns_cache.d.ts index 5630c295d3..1c6e88702f 100644 --- a/types/adone/glosses/collections/ns_cache.d.ts +++ b/types/adone/glosses/collections/ns_cache.d.ts @@ -1,6 +1,6 @@ declare namespace adone.collection { class NSCache { - constructor(size: number, namespaces: string[]); + constructor(maxSize: number, namespaces: string[]); resize(newSize: number): void; diff --git a/types/adone/glosses/collections/timedout_map.d.ts b/types/adone/glosses/collections/time_map.d.ts similarity index 93% rename from types/adone/glosses/collections/timedout_map.d.ts rename to types/adone/glosses/collections/time_map.d.ts index fedcf79fa2..ae5d23e62b 100644 --- a/types/adone/glosses/collections/timedout_map.d.ts +++ b/types/adone/glosses/collections/time_map.d.ts @@ -2,7 +2,7 @@ declare namespace adone.collection { /** * Represents a Map that keeps keys only for a specified interval of time */ - class TimedoutMap extends Map { + class TimeMap extends Map { /** * @param timeout maximum age of the keys, 1000 by default * @param callback callback that is called with each key when the timeout is passed diff --git a/types/adone/glosses/fs.d.ts b/types/adone/glosses/fs.d.ts index 7517764faf..2afc6ec8f7 100644 --- a/types/adone/glosses/fs.d.ts +++ b/types/adone/glosses/fs.d.ts @@ -1158,37 +1158,35 @@ declare namespace adone { */ function watch(paths: string | string[], options?: I.Watcher.ConstructorOptions): Watcher; - namespace is { - /** - * Returns true if the given path refers to a file - */ - function file(path: string): Promise; + /** + * Returns true if the given path refers to a file + */ + function isFile(path: string): Promise; - /** - * Returns true if the given path refers to a file - */ - function fileSync(path: string): boolean; + /** + * Returns true if the given path refers to a file + */ + function isFileSync(path: string): boolean; - /** - * Returns true if the given path refers to a direcotry - */ - function directory(path: string): Promise; + /** + * Returns true if the given path refers to a direcotry + */ + function isDirectory(path: string): Promise; - /** - * Returns true if the given path refers to a direcotry - */ - function directorySync(path: string): boolean; + /** + * Returns true if the given path refers to a direcotry + */ + function isDirectorySync(path: string): boolean; - /** - * Returns true if the given path refers to an executable file - */ - function executable(path: string): Promise; + /** + * Returns true if the given path refers to an executable file + */ + function isExecutable(path: string): Promise; - /** - * Returns true if the given path refers to an executable file - */ - function executableSync(path: string): boolean; - } + /** + * Returns true if the given path refers to an executable file + */ + function isExecutableSync(path: string): boolean; namespace I.Which { interface Options { @@ -1920,5 +1918,19 @@ declare namespace adone { * Creates a new TailWatcher instance with the given arguments */ function watchTail(filename: string, options?: I.TailWatcher.ConstructorOptions): TailWatcher; + + namespace I { + interface WriteFileAtomicOptions { + chown?: { + gid?: number; + uid?: number; + }; + encoding?: string | null; + fsync?: boolean; + mode?: number; + } + } + + function writeFileAtomic(filename: string, data: Buffer | string | Uint8Array, options?: I.WriteFileAtomicOptions): Promise; } } diff --git a/types/adone/glosses/is.d.ts b/types/adone/glosses/is.d.ts index 20d898ca7b..011b906234 100644 --- a/types/adone/glosses/is.d.ts +++ b/types/adone/glosses/is.d.ts @@ -490,12 +490,17 @@ declare namespace adone { /** * Checks whether the given string is an IPv4 address */ - export function ip4(str: string): boolean; + export function ip4(str: string, options?: adone.regex.I.IP.Options): boolean; /** * Checks whether the given string is an IPv6 address */ - export function ip6(str: string): boolean; + export function ip6(str: string, options?: adone.regex.I.IP.Options): boolean; + + /** + * Checks whether the given string is IPv4 or IPv6 address + */ + export function ip(str: string, options?: adone.regex.I.IP.Options): boolean; /** * Checks whether the given object is an array buffer @@ -628,21 +633,6 @@ declare namespace adone { requireTld?: boolean }): obj is string; - /** - * Checks whether the given object is a valid IPv4 address - */ - export function ip(obj: any, version: 4): boolean; - - /** - * Checks whether the given object is a valid IPv6 address - */ - export function ip(obj: any, version: 6): boolean; - - /** - * Checks whether the given object in a valid IPv4 or IPv6 address - */ - export function ip(obj: any): boolean; - /** * Checks whether the given object is a valid UUIDv1 identifier */ @@ -676,5 +666,14 @@ declare namespace adone { export function emitter(obj: any): obj is event.Emitter; export function asyncEmitter(obj: any): obj is event.AsyncEmitter; + + export const openbsd: boolean; + + export const aix: boolean; + + /** + * Checks whether the given object is adone.multi.address.Multiaddr + */ + export function multiAddress(obj: any): boolean; // TODO: obj is adone.multi.address.Multiaddr } } diff --git a/types/adone/glosses/math/bignumber.d.ts b/types/adone/glosses/math/bignumber.d.ts new file mode 100644 index 0000000000..f746ebfe02 --- /dev/null +++ b/types/adone/glosses/math/bignumber.d.ts @@ -0,0 +1,227 @@ +declare namespace adone.math { + namespace I.BigNumber { + interface BufferConvertOptions { + endian?: 1 | -1 | "big" | "little"; + size?: "auto" | number; + } + } + + /** + * Represents a number of arbitrary precision + */ + class BigNumber { + /** + * Creates a BigNumber from the given value, the base is 10 + */ + constructor(n: number | string | BigNumber); + + /** + * Creates a BigNumber from the given string and base + */ + constructor(n: string, base: number); + + /** + * Converts the number to a string in the given base + */ + toString(base?: number): string; + + /** + * Converts the bignum into a Number. + * If the bignum is too big you'll lose precision or you'll get ±Infinity. + */ + toNumber(): number; + + /** + * Returns a new Buffer with the data from the bignum. + */ + toBuffer(opts?: I.BigNumber.BufferConvertOptions): Buffer; + + /** + * Returns a new bignum containing the instance value plus n + */ + add(n: number | string | BigNumber): BigNumber; + + /** + * Return a new bignum containing the instance value minus n + */ + sub(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum containing the instance value multiplied by n + */ + mul(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum containing the instance value integrally divided by n + */ + div(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum with the absolute value of the instance + */ + abs(): BigNumber; + + /** + * Returns a new bignum with the negative of the instance value + */ + neg(): BigNumber; + + /** + * Compares the instance value to n. + * + * Returns a positive integer if > n, a negative integer if < n, and 0 if == n + */ + cmp(n: number | string | BigNumber): number; + + /** + * Checks whether the instance value is greater than n (> n). + */ + gt(n: number | string | BigNumber): boolean; + + /** + * Checks whether the instance value is greater than or equal to n (>= n). + */ + ge(n: number | string | BigNumber): boolean; + + /** + * Checks whether the instance value is equal to n (== n). + */ + eq(n: number | string | BigNumber): boolean; + + /** + * Checks whether the instance value is less than n (< n). + */ + lt(n: number | string | BigNumber): boolean; + + /** + * Checks whether the instance value is less than or equal to n (<= n). + */ + le(n: number | string | BigNumber): boolean; + + /** + * Returns a new bignum with the instance value bitwise AND (&)-ed with n. + */ + and(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum with the instance value bitwise inclusive-OR (|)-ed with n. + */ + or(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum with the instance value bitwise exclusive-OR (^)-ed with n. + */ + xor(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum with the instance value modulo n. + */ + mod(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum with the instance value raised to the nth power. + */ + pow(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum with the instance value raised to the nth power modulo m. + */ + powm(n: number | string | BigNumber, m: number | string | BigNumber): BigNumber; + + /** + * Computes the multiplicative inverse modulo m. + */ + invertm(m: number | string | BigNumber): BigNumber; + + /** + * Returns a random number from 0 to this -1 + */ + rand(): BigNumber; + + /** + * Returns a random number from this to upperBound - 1 + */ + rand(upperBound: number | string | BigNumber): BigNumber; + + /** + * Checks whether the bignum is: + * + * - certainly prime (true) + * + * - probably prime ('maybe') + * + * - certainly composite (false) + */ + probPrime(): boolean | "maybe"; + + /** + * Returns the next prime number after this bignum + */ + nextPrime(): BigNumber; + + /** + * Returns a new bignum that is the square root. This truncates. + */ + sqrt(): BigNumber; + + /** + * Returns a new bignum that is the nth root. This truncates. + */ + root(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum that is the 2^n multiple. Equivalent of the << operator. + */ + shiftLeft(n: number | string | BigNumber): BigNumber; + + /** + * Returns a new bignum of the value integer divided by 2^n. Equivalent of the >> operator. + */ + shiftRight(n: number | string | BigNumber): BigNumber; + + /** + * Returns the greatest common divisor of the current bignum with n as a new bignum. + */ + gcd(n: number | string | BigNumber): BigNumber; + + /** + * Returns the Jacobi symbol (or Legendre symbol if n is prime) of the current bignum (= a) over n. + * Note that n must be odd and >= 3. 0 <= a < n. + * Returns -1 or 1 + */ + jacobi(n: number | string | BigNumber): number; + + /** + * Returns the number of bits used to represent the current bignum + */ + bitLength(): number; + + /** + * Checks whether the bit at the given index is set + */ + isBitSet(n: number): boolean; + + /** + * Generates a probable prime number of length bits. + * + * @param bits the number of bits + * @param safe If true, it will be a "safe" prime of the form p=2p'+1 where p' is also prime. Default: true + */ + static prime(bits: number, safe?: boolean): BigNumber; + + /** + * Creates a new bignum from a Buffer. + */ + static fromBuffer(buf: Buffer, opts?: I.BigNumber.BufferConvertOptions): BigNumber; + + /** + * One + */ + static ONE: BigNumber; + + /** + * Zero + */ + static ZERO: BigNumber; + } +} diff --git a/types/adone/glosses/math/bitset.d.ts b/types/adone/glosses/math/bitset.d.ts new file mode 100644 index 0000000000..a6bbd36989 --- /dev/null +++ b/types/adone/glosses/math/bitset.d.ts @@ -0,0 +1,225 @@ +declare namespace adone.math { + /** + * Represents a set of bits + */ + class BitSet { + /** + * Creates a new bitset of n bits + */ + constructor(n: number); + + /** + * Creates a new bitset from a dehydrated bitset + */ + constructor(key: string); + + /** + * Checks whether a bit at a specific index is set + */ + get(idx: number): boolean; + + /** + * Sets a single bit. + * Returns true if set was successfull + */ + set(idx: number): boolean; + + /** + * Sets a range of bits. + * Returns true if set was successfull + */ + setRange(from: number, to: number): boolean; + + /** + * Unsets a single bit. + * Returns true if unset was successfull + */ + unset(idx: number): boolean; + + /** + * Unsets a range of bits. + * Returns true if unset was successfull + */ + unsetRange(from: number, to: number): boolean; + + /** + * Toggles a single bit + */ + toggle(idx: number): boolean; + + /** + * Toggles a range of bits + */ + toggleRange(from: number, to: number): boolean; + + /** + * Clears the entire bitset + */ + clear(): boolean; + + /** + * Clones the set + */ + clone(): BitSet; + + /** + * Turns the bitset into a comma separated string that skips leading & trailing 0 words. + * Ends with the number of leading 0s and MAX_BIT. + * Useful if you need the bitset to be an object key (eg dynamic programming). + * Can rehydrate by passing the result into the constructor + */ + dehydrate(): string; + + /** + * Performs a bitwise AND on 2 bitsets or 1 bitset and 1 index. + * Both bitsets must have the same number of words, no length check is performed to prevent and overflow. + */ + and(value: number | BitSet): BitSet; + + /** + * Performs a bitwise OR on 2 bitsets or 1 bitset and 1 index. + * Both bitsets must have the same number of words, no length check is performed to prevent and overflow. + */ + or(value: number | BitSet): BitSet; + + /** + * Performs a bitwise XOR on 2 bitsets or 1 bitset and 1 index. + * Both bitsets must have the same number of words, no length check is performed to prevent and overflow. + */ + xor(value: number | BitSet): BitSet; + + /** + * Runs a custom function on every set bit. + * Faster than iterating over the entire bitset with a get(). + * If the callback returns `false` it stops iterating. + */ + forEach(callback: ((idx: number) => void | boolean)): void; + + /** + * Performs a circular shift bitset by an offset + * + * @param n number of positions that the bitset that will be shifted to the right. Using a negative number will result in a left shift. + */ + circularShift(n: number): BitSet; + + /** + * Gets the cardinality (count of set bits) for the entire bitset + */ + getCardinality(): number; + + /** + * Gets the indices of all set bits + */ + getIndices(): number[]; + + /** + * Checks if one bitset is subset of another. + */ + isSubsetOf(other: BitSet): boolean; + + /** + * Quickly determines if a bitset is empty + */ + isEmpty(): boolean; + + /** + * Quickly determines if both bitsets are equal (faster than checking if the XOR of the two is === 0). + * Both bitsets must have the same number of words, no length check is performed to prevent and overflow. + */ + isEqual(other: BitSet): boolean; + + /** + * Gets a string representation of the entire bitset, including leading 0s + */ + toString(): string; + + /** + * Finds first set bit (useful for processing queues, breadth-first tree searches, etc.). + * Returns -1 if not found + * + * @param startWord the word to start with (only used internally by nextSetBit) + */ + ffs(startWord?: number): number; + + /** + * Finds first zero (unset bit). + * Returns -1 if not found + * + * @param startWord the word to start with (only used internally by nextUnsetBit) + */ + ffz(startWord?: number): number; + + /** + * Finds last set bit. + * Returns -1 if not found + * + * @param startWord the word to start with (only used internally by previousSetBit) + */ + fls(startWord?: number): number; + + /** + * Finds last zero (unset bit). + * Returns -1 if not found + * + * @param startWord the word to start with (only used internally by previousUnsetBit) + */ + flz(startWord?: number): number; + + /** + * Finds first set bit, starting at a given index. + * Return -1 if not found + * + * @param idx the starting index for the next set bit + */ + nextSetBit(idx: number): number; + + /** + * Finds first unset bit, starting at a given index. + * Return -1 if not found + * + * @param idx the starting index for the next unset bit + */ + nextUnsetBit(idx: number): number; + + /** + * Finds last set bit, up to a given index. + * Returns -1 if not found + * + * @param idx the starting index for the next unset bit (going in reverse) + */ + previousSetBit(idx: number): number; + + /** + * Finds last unset bit, up to a given index. + * Returns -1 if not found + */ + previousUnsetBit(idx: number): number; + + /** + * Converts the bitset to a math.Long number + */ + toLong(): Long; + + /** + * Reads an unsigned integer of the given bits from the given offset + * + * @param bits number of bits, 1 by default + * @param offset offset, 0 by default + */ + readUInt(bits?: number, offset?: number): number; + + /** + * Writes the given unsigned integer + * + * @param val integer + * @param bits number of bits to write, 1 by default + * @param offset write offset, 0 by default + */ + writeUInt(val: number, bits?: number, offset?: number): void; + + /** + * Creates a new BitSet from the given math.Long number + */ + static fromLong(l: Long): BitSet; + } +} diff --git a/types/adone/glosses/math/decimal.d.ts b/types/adone/glosses/math/decimal.d.ts new file mode 100644 index 0000000000..a7acb0ecad --- /dev/null +++ b/types/adone/glosses/math/decimal.d.ts @@ -0,0 +1,1287 @@ +declare namespace adone.math { + namespace I.Decimal { + type Constructor = typeof Decimal; + type Instance = Decimal; + type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; + type Modulo = Rounding | 9; + type Value = string | number | Decimal; + + interface Config { + /** + * The maximum number of significant digits of the result of an operation. + * + * @default 20 + */ + precision?: number; + + /** + * The default rounding mode used when rounding the result of an operation to precision significant digits, and when rounding + * the return value of the round, toBinary, toDecimalPlaces, toExponential, toFixed, toHexadecimal, toNearest, toOctal, + * toPrecision and toSignificantDigits methods. + * + * @default 4 (ROUND_HALF_UP) + */ + rounding?: Rounding; + + /** + * The negative exponent value at and below which toString returns exponential notation. + * + * JavaScript numbers use exponential notation for negative exponents of -7 and below. + * + * @default -7 + */ + toExpNeg?: number; + + /** + * The positive exponent value at and above which toString returns exponential notation. + * + * JavaScript numbers use exponential notation for positive exponents of 20 and above. + * + * @default 20 + */ + toExpPos?: number; + + /** + * The negative exponent limit, i.e. the exponent value below which underflow to zero occurs. + * + * If the Decimal to be returned by a calculation would have an exponent lower than minE then the value of that Decimal becomes zero. + * + * JavaScript numbers underflow to zero for exponents below -324. + * + * @default -9e15 + */ + minE?: number; + + /** + * The positive exponent limit, i.e. the exponent value above which overflow to Infinity occurs. + * + * If the Decimal to be returned by a calculation would have an exponent higher than maxE then the value of that Decimal becomes Infinity. + * + * JavaScript numbers overflow to Infinity for exponents above 308. + * + * @default 9e15 + */ + maxE?: number; + + /** + * The value that determines whether cryptographically-secure pseudo-random number generation is used. + */ + crypto?: boolean; + + /** + * The modulo mode used when calculating the modulus: a mod n. + * + * The quotient, q = a / n, is calculated according to the rounding mode that corresponds to the chosen modulo mode. + * + * The remainder, r, is calculated as: r = a - n * q. + * + * @default 1 (ROUND_DOWN) + */ + modulo?: Modulo; + + defaults?: boolean; + } + } + + /** + * An arbitrary precision decimal number + */ + class Decimal { + /** + * digits + */ + readonly d: number[]; + + /** + * exponent + */ + readonly e: number; + + /** + * sign + */ + readonly s: number; + + private readonly name: string; + + constructor(x: I.Decimal.Value); + + /** + * Returns a new Decimal whose value is the absolute value, i.e. the magnitude, of the value of this Decimal. + * + * @alias abs + */ + absoluteValue(): Decimal; + + /** + * Returns a new Decimal whose value is the absolute value, i.e. the magnitude, of the value of this Decimal. + * + * @alias absoluteValue + */ + abs(): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to a whole number in the direction of positive Infinity. + * + * The return value is not affected by the value of the precision setting. + */ + ceil(): Decimal; + + /** + * 1 if the value of this Decimal is greater than the value of x + * + * -1 if the value of this Decimal is less than the value of x + * + * 0 if this Decimal and x have the same value + * + * NaN if the value of either this Decimal or x is NaN + * + * @alias cmp + */ + comparedTo(x: I.Decimal.Value): number; + + /** + * 1 if the value of this Decimal is greater than the value of x + * + * -1 if the value of this Decimal is less than the value of x + * + * 0 if this Decimal and x have the same value + * + * NaN if the value of either this Decimal or x is NaN + * + * @alias comparedTo + */ + cmp(x: I.Decimal.Value): number; + + /** + * Returns a new Decimal whose value is the cosine of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias cos + */ + cosine(): Decimal; + + /** + * Returns a new Decimal whose value is the cosine of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias cosine + */ + cos(): Decimal; + + /** + * Returns a new Decimal whose value is the cube root of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * The return value will be correctly rounded, + * i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding. + * + * @alias cbrt + */ + cubeRoot(): Decimal; + + /** + * Returns a new Decimal whose value is the cube root of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * The return value will be correctly rounded, + * i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding. + * + * @alias cubeRoot + */ + cbrt(): Decimal; + + /** + * Returns the number of decimal places, i.e. the number of digits after the decimal point, of the value of this Decimal. + * + * @alias dp + */ + decimalPlaces(): number; + + /** + * Returns the number of decimal places, i.e. the number of digits after the decimal point, of the value of this Decimal. + * + * @alias decimalPlaces + */ + dp(): number; + + /** + * Returns a new Decimal whose value is the value of this Decimal divided by x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias div + */ + dividedBy(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal divided by x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias dividedBy + */ + div(x: I.Decimal.Value): Decimal; + + /** + * Return a new Decimal whose value is the integer part of dividing this Decimal by x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias divToInt + */ + dividedToIntegerBy(x: I.Decimal.Value): Decimal; + + /** + * Return a new Decimal whose value is the integer part of dividing this Decimal by x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias dividedToIntegerBy + */ + divToInt(x: I.Decimal.Value): Decimal; + + /** + * Returns true if the value of this Decimal equals the value of x, otherwise returns false. + * As with JavaScript, NaN does not equal NaN. + * + * @alias eq + */ + equals(x: I.Decimal.Value): boolean; + + /** + * Returns true if the value of this Decimal equals the value of x, otherwise returns false. + * As with JavaScript, NaN does not equal NaN. + * + * @alias equals + */ + eq(x: I.Decimal.Value): boolean; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to a whole number in the direction of negative Infinity. + * + * The return value is not affected by the value of the precision setting. + */ + floor(): Decimal; + + /** + * Returns true if the value of this Decimal is greater than the value of x, otherwise returns false. + * + * @alias gt + */ + greaterThan(x: I.Decimal.Value): boolean; + + /** + * Returns true if the value of this Decimal is greater than the value of x, otherwise returns false. + * + * @alias greaterThan + */ + gt(x: I.Decimal.Value): boolean; + + /** + * Returns true if the value of this Decimal is greater than or equal to the value of x, otherwise returns false. + * + * @alias gte + */ + greaterThanOrEqualTo(x: I.Decimal.Value): boolean; + + /** + * Returns true if the value of this Decimal is greater than or equal to the value of x, otherwise returns false. + * + * @alias greaterThanOrEqualTo + */ + gte(x: I.Decimal.Value): boolean; + + /** + * Returns a new Decimal whose value is the hyperbolic cosine of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias cosh + */ + hyperbolicCosine(): Decimal; + + /** + * Returns a new Decimal whose value is the hyperbolic cosine of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias hyperbolicCosine + */ + cosh(): Decimal; + + /** + * Returns a new Decimal whose value is the hyperbolic sine of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias sinh + */ + hyperbolicSine(): Decimal; + + /** + * Returns a new Decimal whose value is the hyperbolic sine of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias hyperbolicSine + */ + sinh(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic tangent in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias tanh + */ + hyperbolicTangent(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic tangent in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias hyperbolicTangent + */ + tanh(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse cosine in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias acos + */ + inverseCosine(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse cosine in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias inverseCosine + */ + acos(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic cosine in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias acosh + */ + inverseHyperbolicCosine(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic cosine in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias inverseHyperbolicCosine + */ + acosh(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic sine in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias asinh + */ + inverseHyperbolicSine(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic sine in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias inverseHyperbolicSine + */ + asinh(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic tangent in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias atanh + */ + inverseHyperbolicTangent(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic tangent in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias inverseHyperbolicTangent + */ + atanh(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse sine in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias asin + */ + inverseSine(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse sine in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias inverseSine + */ + asin(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse tangent in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias atan + */ + inverseTangent(): Decimal; + + /** + * Returns a new Decimal whose value is the inverse tangent in radians of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias inverseTangent + */ + atan(): Decimal; + + /** + * Returns true if the value of this Decimal is a finite number, otherwise returns false. + * The only possible non-finite values of a Decimal are NaN, Infinity and -Infinity. + */ + isFinite(): boolean; + + /** + * Returns true if the value of this Decimal is a whole number, otherwise returns false. + * + * @alias isInt + */ + isInteger(): boolean; + + /** + * Returns true if the value of this Decimal is a whole number, otherwise returns false. + * + * @alias isInteger + */ + isInt(): boolean; + + /** + * Returns true if the value of this Decimal is NaN, otherwise returns false. + */ + isNaN(): boolean; + + /** + * Returns true if the value of this Decimal is negative, otherwise returns false. + * + * @alias isNeg + */ + isNegative(): boolean; + + /** + * Returns true if the value of this Decimal is negative, otherwise returns false. + * + * @alias isNegative + */ + isNeg(): boolean; + + /** + * Returns true if the value of this Decimal is positive, otherwise returns false. + * + * @alias isPos + */ + isPositive(): boolean; + + /** + * Returns true if the value of this Decimal is positive, otherwise returns false. + * + * @alias isPositive + */ + isPos(): boolean; + + /** + * Returns true if the value of this Decimal is zero or minus zero, otherwise returns false. + */ + isZero(): boolean; + + /** + * Returns true if the value of this Decimal is less than the value of x, otherwise returns false. + * + * @alias lt + */ + lessThan(x: I.Decimal.Value): boolean; + + /** + * Returns true if the value of this Decimal is less than the value of x, otherwise returns false. + * + * @alias lessThan + */ + lt(x: I.Decimal.Value): boolean; + + /** + * Returns true if the value of this Decimal is less than or equal to the value of x, otherwise returns false. + * + * @alias lte + */ + lessThanOrEqualTo(x: I.Decimal.Value): boolean; + + /** + * Returns true if the value of this Decimal is less than or equal to the value of x, otherwise returns false. + * + * @alias lessThanOrEqualTo + */ + lte(x: I.Decimal.Value): boolean; + + /** + * Returns a new Decimal whose value is the base x logarithm of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias log + */ + logarithm(n?: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the base x logarithm of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias logarithm + */ + log(n?: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal minus x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias sub + */ + minus(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal minus x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias minus + */ + sub(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal modulo x, + * rounded to precision significant digits using rounding mode rounding. + * + * The value returned, and in particular its sign, is dependent on the value of the modulo property of this Decimal's constructor. + * If it is 1 (default value), the result will have the same sign as this Decimal, + * and it will match that of Javascript's % operator (within the limits of double precision) and BigDecimal's remainder method. + * + * @alias mod + */ + modulo(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal modulo x, + * rounded to precision significant digits using rounding mode rounding. + * + * The value returned, and in particular its sign, is dependent on the value of the modulo property of this Decimal's constructor. + * If it is 1 (default value), the result will have the same sign as this Decimal, + * and it will match that of Javascript's % operator (within the limits of double precision) and BigDecimal's remainder method. + * + * @alias modulo + */ + mod(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the base e (Euler's number, the base of the natural logarithm) exponential of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias exp + */ + naturalExponential(): Decimal; + + /** + * Returns a new Decimal whose value is the base e (Euler's number, the base of the natural logarithm) exponential of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias naturalExponential + */ + exp(): Decimal; + + /** + * Returns a new Decimal whose value is the natural logarithm of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias ln + */ + naturalLogarithm(): Decimal; + + /** + * Returns a new Decimal whose value is the natural logarithm of the value of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias naturalLogarithm + */ + ln(): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal negated, i.e. multiplied by -1. + * + * @alias neg + */ + negated(): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal negated, i.e. multiplied by -1. + * + * @alias negated + */ + neg(): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal plus x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias add + */ + plus(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal plus x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias plus + */ + add(x: I.Decimal.Value): Decimal; + + /** + * Returns the number of significant digits of the value of this Decimal. + * + * @param includeZeros If it is true or 1 then any trailing zeros of the integer part of a number are counted as significant digits, + * otherwise they are not. + * @alias sd + */ + precision(includeZeros?: boolean): number; + + /** + * Returns the number of significant digits of the value of this Decimal. + * + * @param includeZeros If it is true or 1 then any trailing zeros of the integer part of a number are counted as significant digits, + * otherwise they are not. + * @alias precision + */ + sd(includeZeros?: boolean): number; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to a whole number using rounding mode rounding. + */ + round(): Decimal; + + /** + * Returns a new Decimal whose value is the sine of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias sin + */ + sine(): Decimal; + + /** + * Returns a new Decimal whose value is the sine of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias sine + */ + sin(): Decimal; + + /** + * Returns a new Decimal whose value is the square root of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * The return value will be correctly rounded, + * i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding. + * + * @alias sqrt + */ + squareRoot(): Decimal; + + /** + * Returns a new Decimal whose value is the square root of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * The return value will be correctly rounded, + * i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding. + * + * @alias squareRoot + */ + sqrt(): Decimal; + + /** + * Returns a new Decimal whose value is the tangent of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias tan + */ + tangent(): Decimal; + + /** + * Returns a new Decimal whose value is the tangent of the value in radians of this Decimal, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias tangent + */ + tan(): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal times x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias mul + */ + times(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal times x, + * rounded to precision significant digits using rounding mode rounding. + * + * @alias times + */ + mul(x: I.Decimal.Value): Decimal; + + /** + * Returns a string representing the value of this Decimal in binary, rounded to sd significant digits using rounding mode rm. + */ + toBinary(significantDigits?: number): string; + + /** + * Returns a string representing the value of this Decimal in binary, rounded to sd significant digits using rounding mode rm. + */ + toBinary(significantDigits: number, rounding: I.Decimal.Rounding): string; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to dp decimal places using rounding mode rm. + * + * @alias toDP + */ + toDecimalPlaces(decimalPlaces?: number): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to dp decimal places using rounding mode rm. + * + * @alias toDP + */ + toDecimalPlaces(decimalPlaces: number, rounding: I.Decimal.Rounding): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to dp decimal places using rounding mode rm. + * + * @alias toDecimalPlaces + */ + toDP(decimalPlaces?: number): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to dp decimal places using rounding mode rm. + * + * @alias toDecimalPlaces + */ + toDP(decimalPlaces: number, rounding: I.Decimal.Rounding): Decimal; + + /** + * Returns a string representing the value of this Decimal in exponential notation rounded using rounding mode rm to dp decimal places, + * i.e with one digit before the decimal point and dp digits after it. + * + * If the value of this Decimal in exponential notation has fewer than dp fraction digits, + * the return value will be appended with zeros accordingly. + */ + toExponential(decimalPlaces?: number): string; + + /** + * Returns a string representing the value of this Decimal in exponential notation rounded using rounding mode rm to dp decimal places, + * i.e with one digit before the decimal point and dp digits after it. + * + * If the value of this Decimal in exponential notation has fewer than dp fraction digits, + * the return value will be appended with zeros accordingly. + */ + toExponential(decimalPlaces: number, rounding: I.Decimal.Rounding): string; + + /** + * Returns a string representing the value of this Decimal in normal (fixed-point) notation rounded to dp decimal places using rounding mode rm. + * + * If the value of this Decimal in normal notation has fewer than dp fraction digits, the return value will be appended with zeros accordingly. + * + * Unlike Number.prototype.toFixed, which returns exponential notation if a number is greater or equal to 1021, this method will always return normal notation. + */ + toFixed(decimalPlaces?: number): string; + + /** + * Returns a string representing the value of this Decimal in normal (fixed-point) notation rounded to dp decimal places using rounding mode rm. + * + * If the value of this Decimal in normal notation has fewer than dp fraction digits, the return value will be appended with zeros accordingly. + * + * Unlike Number.prototype.toFixed, which returns exponential notation if a number is greater or equal to 1021, this method will always return normal notation. + */ + toFixed(decimalPlaces: number, rounding: I.Decimal.Rounding): string; + + /** + * Returns an array of two Decimals representing the value of this Decimal as a simple fraction with an integer numerator and an integer denominator. + * The denominator will be a positive non-zero value less than or equal to maxDenominator. + * + * If a maximum denominator is omitted, the denominator will be the lowest value necessary to represent the number exactly. + */ + toFraction(maxDenominator?: I.Decimal.Value): Decimal[]; + + /** + * Returns a string representing the value of this Decimal in hexadecimal, rounded to sd significant digits using rounding mode rm. + * + * @alias toHex + */ + toHexadecimal(significantDigits?: number): string; + + /** + * Returns a string representing the value of this Decimal in hexadecimal, rounded to sd significant digits using rounding mode rm. + * + * @alias toHex + */ + toHexadecimal(significantDigits: number, rounding: I.Decimal.Rounding): string; + + /** + * Returns a string representing the value of this Decimal in hexadecimal, rounded to sd significant digits using rounding mode rm. + * + * @alias toHexadecimal + */ + toHex(significantDigits?: number): string; + + /** + * Returns a string representing the value of this Decimal in hexadecimal, rounded to sd significant digits using rounding mode rm. + * + * @alias toHexadecimal + */ + toHex(significantDigits: number, rounding?: I.Decimal.Rounding): string; + + /** + * Same as valueOf + */ + toJSON(): string; + + /** + * Returns a new Decimal whose value is the nearest multiple of x in the direction of rounding mode rm, or rounding if rm is omitted, + * to the value of this Decimal. + * + * The return value will always have the same sign as this Decimal, unless either this Decimal or x is NaN, + * in which case the return value will be also be NaN. + */ + toNearest(x?: I.Decimal.Value, rounding?: I.Decimal.Rounding): Decimal; + + /** + * Returns the value of this Decimal converted to a primitive number. + * + * Type coercion with, for example, JavaScript's unary plus operator will also work, + * except that a Decimal with the value minus zero will convert to positive zero. + */ + toNumber(): number; + + /** + * Returns a string representing the value of this Decimal in octal, rounded to sd significant digits using rounding mode rm. + */ + toOctal(significantDigits?: number): string; + + /** + * Returns a string representing the value of this Decimal in octal, rounded to sd significant digits using rounding mode rm. + */ + toOctal(significantDigits: number, rounding: I.Decimal.Rounding): string; + + /** + * Returns a new Decimal whose value is the value of this Decimal raised to the power x, + * rounded to precision significant digits using rounding mode rounding. + * + * The return value will almost always be correctly rounded, + * i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding. + * If a result is incorrectly rounded the maximum error will be 1 ulp (unit in the last place). + * + * @alias pow + */ + toPower(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal raised to the power x, + * rounded to precision significant digits using rounding mode rounding. + * + * The return value will almost always be correctly rounded, + * i.e. rounded as if the result was first calculated to an infinite number of correct digits before rounding. + * If a result is incorrectly rounded the maximum error will be 1 ulp (unit in the last place). + * + * @alias toPower + */ + pow(x: I.Decimal.Value): Decimal; + + /** + * Returns a string representing the value of this Decimal rounded to sd significant digits using rounding mode rm. + */ + toPrecision(significantDigits?: number): string; + + /** + * Returns a string representing the value of this Decimal rounded to sd significant digits using rounding mode rm. + */ + toPrecision(significantDigits: number, rounding: I.Decimal.Rounding): string; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to sd significant digits using rounding mode rm. + * + * @alias toSD + */ + toSignificantDigits(significantDigits?: number): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to sd significant digits using rounding mode rm. + * + * @alias toSD + */ + toSignificantDigits(significantDigits: number, rounding: I.Decimal.Rounding): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to sd significant digits using rounding mode rm. + * + * @alias toSignificantDigits + */ + toSD(significantDigits?: number): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal rounded to sd significant digits using rounding mode rm. + * + * @alias toSignificantDigits + */ + toSD(significantDigits: number, rounding: I.Decimal.Rounding): Decimal; + + /** + * Returns a string representing the value of this Decimal. + * + * If this Decimal has a positive exponent that is equal to or greater than toExpPos, + * or a negative exponent equal to or less than toExpNeg, then exponential notation will be returned. + */ + toString(): string; + + /** + * Returns a new Decimal whose value is the value of this Decimal truncated to a whole number. + * + * @alias trunc + */ + truncated(): Decimal; + + /** + * Returns a new Decimal whose value is the value of this Decimal truncated to a whole number. + * + * @alias truncated + */ + trunc(): Decimal; + + /** + * As toString, but zero is signed. + */ + valueOf(): string; + + /** + * Returns a new Decimal whose value is the absolute value of x + */ + static abs(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the inverse cosine in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static acos(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the inverse cosine in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static acosh(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of x + y, rounded to precision significant digits using rounding mode rounding. + */ + static add(x: I.Decimal.Value, y: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the inverse sine in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static asin(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic sine in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static asinh(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the inverse tangent in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static atan(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic tangent in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static atanh(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the inverse tangent in radians of the quotient of y and x, rounded to precision significant digits using rounding mode rounding. + * + * The signs of y and x are used to determine the quadrant of the result. + */ + static atan2(y: I.Decimal.Value, x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the cube root of x, rounded to precision significant digits using rounding mode rounding. + */ + static cbrt(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of x rounded to a whole number in the direction of positive Infinity. + */ + static ceil(x: I.Decimal.Value): Decimal; + + /** + * Returns a new independent Decimal constructor with configuration settings as described by object, or with the same settings as this Decimal constructor if object is omitted. + * + * @alias config + */ + static clone(object?: I.Decimal.Config): I.Decimal.Constructor; + + /** + * Configures the 'global' settings for this particular Decimal constructor, i.e. the settings which apply to operations performed on the Decimal instances created by it. + * + * @alias set + */ + static config(object: I.Decimal.Config): I.Decimal.Constructor; + + /** + * Configures the 'global' settings for this particular Decimal constructor, i.e. the settings which apply to operations performed on the Decimal instances created by it. + * + * @alias config + */ + static set(object: I.Decimal.Config): I.Decimal.Constructor; + + /** + * Returns a new Decimal whose value is the cosine of the value in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static cos(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the inverse hyperbolic cosine in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static cosh(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of x divided by x, rounded to precision significant digits using rounding mode rounding. + */ + static div(x: I.Decimal.Value, y: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the base e (Euler's number, the base of the natural logarithm) exponential of x, rounded to precision significant digits using rounding mode rounding. + */ + static exp(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the value of x rounded to a whole number in the direction of negative Infinity. + */ + static floor(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the square root of the sum of the squares of the arguments, rounded to precision significant digits using rounding mode rounding. + */ + static hypot(...x: I.Decimal.Value[]): Decimal; + + /** + * Returns true if object is a Decimal instance (where Decimal is any Decimal constructor), or false if it is not. + */ + static isDecimal(object: any): boolean; + + /** + * Returns a new Decimal whose value is the natural logarithm of x, rounded to precision significant digits using rounding mode rounding. + */ + static ln(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the base x logarithm of x, rounded to precision significant digits using rounding mode rounding. + * + * @param base logarithm base, default is 10 + */ + static log(x: I.Decimal.Value, base?: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the base 2 logarithm of x, rounded to precision significant digits using rounding mode rounding. + */ + static log2(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the base 10 logarithm of x, rounded to precision significant digits using rounding mode rounding. + */ + static log10(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the maximum of the arguments. + */ + static max(...x: I.Decimal.Value[]): Decimal; + + /** + * Returns a new Decimal whose value is the minimum of the arguments. + */ + static min(...x: I.Decimal.Value[]): Decimal; + + /** + * Returns a new Decimal whose value is x modulo y, rounded to precision significant digits using rounding mode rounding. + */ + static mod(x: I.Decimal.Value, y: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is x times y, rounded to precision significant digits using rounding mode rounding. + */ + static mul(x: I.Decimal.Value, y: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is base raised to the power exponent, rounded to precision significant digits using rounding mode rounding. + */ + static pow(base: I.Decimal.Value, exponent: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal with a pseudo-random value equal to or greater than 0 and less than 1. + * + * The return value will have dp decimal places (or less if trailing zeros are produced). If dp is omitted then the number of decimal places will default to the current precision setting. + */ + static random(significantDigits?: number): Decimal; + + /** + * Returns a new Decimal whose value is x rounded to a whole number using rounding mode rounding. + */ + static round(x: I.Decimal.Value): Decimal; + + /** + * 1 if the value of x is non-zero and its sign is positive + * + * -1 if the value of x is non-zero and its sign is negative + * + * 0 if the value of x is positive zero + * + * -0 if the value of x is negative zero + * + * NaN if the value of x is NaN + */ + static sign(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the sine of the value in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static sin(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the hyperbolic sine of the value in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static sinh(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the square root of x, rounded to precision significant digits using rounding mode rounding. + */ + static sqrt(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is x minus y, rounded to precision significant digits using rounding mode rounding. + */ + static sub(x: I.Decimal.Value, y: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the tangent of the value in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static tan(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is the hyperbolic tangent of the value in radians of x, rounded to precision significant digits using rounding mode rounding. + */ + static tanh(x: I.Decimal.Value): Decimal; + + /** + * Returns a new Decimal whose value is x truncated to a whole number. + */ + static trunc(x: I.Decimal.Value): Decimal; + + static readonly default?: I.Decimal.Constructor; + static readonly Decimal?: I.Decimal.Constructor; + + /** + * The maximum number of significant digits of the result of an operation. + */ + static readonly precision: number; + + /** + * The default rounding mode used when rounding the result of an operation to precision significant digits, and when rounding + * the return value of the round, toBinary, toDecimalPlaces, toExponential, toFixed, toHexadecimal, toNearest, toOctal, + * toPrecision and toSignificantDigits methods. + */ + static readonly rounding: I.Decimal.Rounding; + + /** + * The negative exponent value at and below which toString returns exponential notation. + * + * JavaScript numbers use exponential notation for negative exponents of -7 and below. + */ + static readonly toExpNeg: number; + + /** + * The positive exponent value at and above which toString returns exponential notation. + * + * JavaScript numbers use exponential notation for positive exponents of 20 and above. + */ + static readonly toExpPos: number; + + static readonly minE: number; + + static readonly maxE: number; + + static readonly crypto: boolean; + + /** + * The modulo mode used when calculating the modulus: a mod n. + * + * The quotient, q = a / n, is calculated according to the rounding mode that corresponds to the chosen modulo mode. + * + * The remainder, r, is calculated as: r = a - n * q. + */ + static readonly modulo: I.Decimal.Modulo; + + /** + * Rounds away from zero + */ + static readonly ROUND_UP: 0; + + /** + * Rounds towards zero + */ + static readonly ROUND_DOWN: 1; + + /** + * Rounds towards Infinity + */ + static readonly ROUND_CEIL: 2; + + /** + * Rounds towards -Infinity + */ + static readonly ROUND_FLOOR: 3; + + /** + * Rounds towards nearest neighbour. + * + * If equidistant, rounds away from zero + */ + static readonly ROUND_HALF_UP: 4; + + /** + * Rounds towards nearest neighbour. + * + * If equidistant, rounds towards zero + */ + static readonly ROUND_HALF_DOWN: 5; + + /** + * Rounds towards nearest neighbour. + * + * If equidistant, rounds towards even neighbour + */ + static readonly ROUND_HALF_EVEN: 6; + + /** + * Rounds towards nearest neighbour. + * + * If equidistant, rounds towards Infinity + */ + static readonly ROUND_HALF_CEIL: 7; + + /** + * Rounds towards nearest neighbour. + * + * If equidistant, rounds towards -Infinity + */ + static readonly ROUND_HALF_FLOOR: 8; + + /** + * Not a rounding mode + */ + static readonly EUCLID: 9; + } +} diff --git a/types/adone/glosses/math/index.d.ts b/types/adone/glosses/math/index.d.ts index 2713196e6e..5e6bbeea65 100644 --- a/types/adone/glosses/math/index.d.ts +++ b/types/adone/glosses/math/index.d.ts @@ -1,3 +1,7 @@ +/// +/// +/// +/// /// /// @@ -6,748 +10,6 @@ declare namespace adone { * math related things */ namespace math { - namespace I { - interface LowHighBits { - /** - * The low (signed) 32 bits of the long - */ - low: number; - /** - * The high (signed) 32 bits of the long - */ - high: number; - } - type Longable = Long | number | string | LowHighBits; - } - - /** - * Represents a 64 bit two's-complement integer - */ - class Long { - low: number; - high: number; - unsigned: boolean; - - /** - * @param low The low (signed) 32 bits of the long - * @param high The high (signed) 32 bits of the long - * @param unsigned Whether unsigned or not, defaults to false for signed - */ - constructor(low?: number, high?: number, unsigned?: boolean); - - /** - * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer - */ - toInt(): number; - - /** - * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa) - */ - toNumber(): number; - - /** - * Converts the Long to a string written in the specified radix - * - * @param radix Radix (2-36), 10 by default - */ - toString(radix?: number): string; - - inspect(): string; - - /** - * Gets the high 32 bits as a signed integer - */ - getHighBits(): number; - - /** - * Gets the high 32 bits as an unsigned integer - */ - getHighBitsUnsigned(): number; - - /** - * Gets the low 32 bits as a signed integer - */ - getLowBits(): number; - - /** - * Gets the low 32 bits as an unsigned integer - */ - getLowBitsUnsigned(): number; - - /** - * Gets the number of bits needed to represent the absolute value of this Long - */ - getNumBitsAbs(): number; - - /** - * Tests if this Long's value equals zero - */ - isZero(): boolean; - - /** - * Tests if this Long's value is negative - */ - isNegative(): boolean; - - /** - * Tests if this Long's value is positive - */ - isPositive(): boolean; - - /** - * Tests if this Long's value is odd - */ - isOdd(): boolean; - - /** - * Tests if this Long's value is even - */ - isEven(): boolean; - - /** - * Tests if this Long's value equals the specified's - */ - equals(other: I.Longable): boolean; - - /** - * Tests if this Long's value is less than the specified's - */ - lessThan(other: I.Longable): boolean; - - /** - * Tests if this Long's value is less than or equal the specified's - */ - lessThanOrEqual(other: I.Longable): boolean; - - /** - * Tests if this Long's value is greater than the specified's - */ - greaterThan(other: I.Longable): boolean; - - /** - * Tests if this Long's value is greater than or equal the specified's - */ - greaterThanOrEqual(other: I.Longable): boolean; - - /** - * Compares this Long's value with the specified's. - * Returns 0 if they are the same, 1 if the this is greater and -1 if the given one is greater - */ - compare(other: I.Longable): number; - - /** - * Negates this Long's value - */ - negate(): Long; - - /** - * Returns the sum of this and the specified Long - */ - add(addend: I.Longable): Long; - - /** - * Returns the difference of this and the specified Long - */ - sub(subtrahend: I.Longable): Long; - - /** - * Returns the product of this and the specified Long - */ - mul(multiplier: I.Longable): Long; - - /** - * Returns this Long divided by the specified - */ - div(divisor: I.Longable): Long; - - /** - * Returns this Long modulo the specified - */ - mod(divisor: I.Longable): Long; - - /** - * Returns the bitwise NOT of this Long - */ - not(): Long; - - /** - * Returns the bitwise AND of this Long and the specified - */ - and(other: I.Longable): Long; - - /** - * Returns the bitwise OR of this Long and the specifieds - */ - or(other: I.Longable): Long; - - /** - * Returns the bitwise XOR of this Long and the given one - */ - xor(other: I.Longable): Long; - - /** - * Returns this Long with bits shifted to the left by the given amount - */ - shl(numBits: number | Long): Long; - - /** - * Returns this Long with bits arithmetically shifted to the right by the given amount - */ - shr(numBits: number | Long): Long; - - /** - * Returns this Long with bits logically shifted to the right by the given amount - */ - shru(numBits: number | Long): Long; - - /** - * Converts this Long to signed - */ - toSigned(): Long; - - /** - * Converts this Long to unsigned - */ - toUnsigned(): Long; - - /** - * Converts this Long to an array of bytes, big-endian by default - * - * @param le Whether to return an array in little-endian format - */ - toBytes(le?: boolean): number[]; - - /** - * Converts this Long to an array of bytes in little-endian format - */ - toBytesLE(): number[]; - - /** - * Converts this Long to an array of bytes in big-endian format - */ - toBytesBE(): number[]; - - /** - * Returns a Long representing the given 32 bit integer value - */ - static fromInt(value: number, unsigned?: boolean): Long; - - /** - * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned - */ - static fromNumber(value?: number, unsigned?: boolean): Long; - - /** - * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is assumed to use 32 bits - */ - static fromBits(lowBits: number, highBits: number, unsigned?: boolean): Long; - - /** - * Returns a Long representation of the given string, written using the specified radix - */ - static fromString(str: string, unsigned?: boolean, radix?: number): Long; - - /** - * Returns a Long representation of the given string, written using the specified radix - */ - static fromString(str: string, radix?: number): Long; - - /** - * Converts the specified value to a Long - */ - static fromValue(val: I.Longable): Long; - - /** - * Minimum signed value - */ - static MIN_VALUE: Long; - - /** - * Maximum signed value - */ - static MAX_VALUE: Long; - - /** - * Maximum unsigned value - */ - static MAX_UNSIGNED_VALUE: Long; - - /** - * Signed zero - */ - static ZERO: Long; - - /** - * Unsigned zero - */ - static UZERO: Long; - - /** - * Signed one - */ - static ONE: Long; - - /** - * Unsigned one - */ - static UONE: Long; - - /** - * Signed negative one - */ - static NEG_ONE: Long; - } - - namespace I.BigNumber { - interface BufferConvertOptions { - endian?: 1 | -1 | "big" | "little"; - size?: "auto" | number; - } - } - - /** - * Represents a number of arbitrary precision - */ - class BigNumber { - /** - * Creates a BigNumber from the given value, the base is 10 - */ - constructor(n: number | string | BigNumber); - - /** - * Creates a BigNumber from the given string and base - */ - constructor(n: string, base: number); - - /** - * Converts the number to a string in the given base - */ - toString(base?: number): string; - - /** - * Converts the bignum into a Number. - * If the bignum is too big you'll lose precision or you'll get ±Infinity. - */ - toNumber(): number; - - /** - * Returns a new Buffer with the data from the bignum. - */ - toBuffer(opts?: I.BigNumber.BufferConvertOptions): Buffer; - - /** - * Returns a new bignum containing the instance value plus n - */ - add(n: number | string | BigNumber): BigNumber; - - /** - * Return a new bignum containing the instance value minus n - */ - sub(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum containing the instance value multiplied by n - */ - mul(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum containing the instance value integrally divided by n - */ - div(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum with the absolute value of the instance - */ - abs(): BigNumber; - - /** - * Returns a new bignum with the negative of the instance value - */ - neg(): BigNumber; - - /** - * Compares the instance value to n. - * - * Returns a positive integer if > n, a negative integer if < n, and 0 if == n - */ - cmp(n: number | string | BigNumber): number; - - /** - * Checks whether the instance value is greater than n (> n). - */ - gt(n: number | string | BigNumber): boolean; - - /** - * Checks whether the instance value is greater than or equal to n (>= n). - */ - ge(n: number | string | BigNumber): boolean; - - /** - * Checks whether the instance value is equal to n (== n). - */ - eq(n: number | string | BigNumber): boolean; - - /** - * Checks whether the instance value is less than n (< n). - */ - lt(n: number | string | BigNumber): boolean; - - /** - * Checks whether the instance value is less than or equal to n (<= n). - */ - le(n: number | string | BigNumber): boolean; - - /** - * Returns a new bignum with the instance value bitwise AND (&)-ed with n. - */ - and(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum with the instance value bitwise inclusive-OR (|)-ed with n. - */ - or(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum with the instance value bitwise exclusive-OR (^)-ed with n. - */ - xor(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum with the instance value modulo n. - */ - mod(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum with the instance value raised to the nth power. - */ - pow(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum with the instance value raised to the nth power modulo m. - */ - powm(n: number | string | BigNumber, m: number | string | BigNumber): BigNumber; - - /** - * Computes the multiplicative inverse modulo m. - */ - invertm(m: number | string | BigNumber): BigNumber; - - /** - * Returns a random number from 0 to this -1 - */ - rand(): BigNumber; - - /** - * Returns a random number from this to upperBound - 1 - */ - rand(upperBound: number | string | BigNumber): BigNumber; - - /** - * Checks whether the bignum is: - * - * - certainly prime (true) - * - * - probably prime ('maybe') - * - * - certainly composite (false) - */ - probPrime(): boolean | "maybe"; - - /** - * Returns the next prime number after this bignum - */ - nextPrime(): BigNumber; - - /** - * Returns a new bignum that is the square root. This truncates. - */ - sqrt(): BigNumber; - - /** - * Returns a new bignum that is the nth root. This truncates. - */ - root(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum that is the 2^n multiple. Equivalent of the << operator. - */ - shiftLeft(n: number | string | BigNumber): BigNumber; - - /** - * Returns a new bignum of the value integer divided by 2^n. Equivalent of the >> operator. - */ - shiftRight(n: number | string | BigNumber): BigNumber; - - /** - * Returns the greatest common divisor of the current bignum with n as a new bignum. - */ - gcd(n: number | string | BigNumber): BigNumber; - - /** - * Returns the Jacobi symbol (or Legendre symbol if n is prime) of the current bignum (= a) over n. - * Note that n must be odd and >= 3. 0 <= a < n. - * Returns -1 or 1 - */ - jacobi(n: number | string | BigNumber): number; - - /** - * Returns the number of bits used to represent the current bignum - */ - bitLength(): number; - - /** - * Checks whether the bit at the given index is set - */ - isBitSet(n: number): boolean; - - /** - * Generates a probable prime number of length bits. - * - * @param bits the number of bits - * @param safe If true, it will be a "safe" prime of the form p=2p'+1 where p' is also prime. Default: true - */ - static prime(bits: number, safe?: boolean): BigNumber; - - /** - * Creates a new bignum from a Buffer. - */ - static fromBuffer(buf: Buffer, opts?: I.BigNumber.BufferConvertOptions): BigNumber; - - /** - * One - */ - static ONE: BigNumber; - - /** - * Zero - */ - static ZERO: BigNumber; - } - - /** - * Represents a set of bits - */ - class BitSet { - /** - * Creates a new bitset of n bits - */ - constructor(n: number); - - /** - * Creates a new bitset from a dehydrated bitset - */ - constructor(key: string); - - /** - * Checks whether a bit at a specific index is set - */ - get(idx: number): boolean; - - /** - * Sets a single bit. - * Returns true if set was successfull - */ - set(idx: number): boolean; - - /** - * Sets a range of bits. - * Returns true if set was successfull - */ - setRange(from: number, to: number): boolean; - - /** - * Unsets a single bit. - * Returns true if unset was successfull - */ - unset(idx: number): boolean; - - /** - * Unsets a range of bits. - * Returns true if unset was successfull - */ - unsetRange(from: number, to: number): boolean; - - /** - * Toggles a single bit - */ - toggle(idx: number): boolean; - - /** - * Toggles a range of bits - */ - toggleRange(from: number, to: number): boolean; - - /** - * Clears the entire bitset - */ - clear(): boolean; - - /** - * Clones the set - */ - clone(): BitSet; - - /** - * Turns the bitset into a comma separated string that skips leading & trailing 0 words. - * Ends with the number of leading 0s and MAX_BIT. - * Useful if you need the bitset to be an object key (eg dynamic programming). - * Can rehydrate by passing the result into the constructor - */ - dehydrate(): string; - - /** - * Performs a bitwise AND on 2 bitsets or 1 bitset and 1 index. - * Both bitsets must have the same number of words, no length check is performed to prevent and overflow. - */ - and(value: number | BitSet): BitSet; - - /** - * Performs a bitwise OR on 2 bitsets or 1 bitset and 1 index. - * Both bitsets must have the same number of words, no length check is performed to prevent and overflow. - */ - or(value: number | BitSet): BitSet; - - /** - * Performs a bitwise XOR on 2 bitsets or 1 bitset and 1 index. - * Both bitsets must have the same number of words, no length check is performed to prevent and overflow. - */ - xor(value: number | BitSet): BitSet; - - /** - * Runs a custom function on every set bit. - * Faster than iterating over the entire bitset with a get(). - * If the callback returns `false` it stops iterating. - */ - forEach(callback: ((idx: number) => void | boolean)): void; - - /** - * Performs a circular shift bitset by an offset - * - * @param n number of positions that the bitset that will be shifted to the right. Using a negative number will result in a left shift. - */ - circularShift(n: number): BitSet; - - /** - * Gets the cardinality (count of set bits) for the entire bitset - */ - getCardinality(): number; - - /** - * Gets the indices of all set bits - */ - getIndices(): number[]; - - /** - * Checks if one bitset is subset of another. - */ - isSubsetOf(other: BitSet): boolean; - - /** - * Quickly determines if a bitset is empty - */ - isEmpty(): boolean; - - /** - * Quickly determines if both bitsets are equal (faster than checking if the XOR of the two is === 0). - * Both bitsets must have the same number of words, no length check is performed to prevent and overflow. - */ - isEqual(other: BitSet): boolean; - - /** - * Gets a string representation of the entire bitset, including leading 0s - */ - toString(): string; - - /** - * Finds first set bit (useful for processing queues, breadth-first tree searches, etc.). - * Returns -1 if not found - * - * @param startWord the word to start with (only used internally by nextSetBit) - */ - ffs(startWord?: number): number; - - /** - * Finds first zero (unset bit). - * Returns -1 if not found - * - * @param startWord the word to start with (only used internally by nextUnsetBit) - */ - ffz(startWord?: number): number; - - /** - * Finds last set bit. - * Returns -1 if not found - * - * @param startWord the word to start with (only used internally by previousSetBit) - */ - fls(startWord?: number): number; - - /** - * Finds last zero (unset bit). - * Returns -1 if not found - * - * @param startWord the word to start with (only used internally by previousUnsetBit) - */ - flz(startWord?: number): number; - - /** - * Finds first set bit, starting at a given index. - * Return -1 if not found - * - * @param idx the starting index for the next set bit - */ - nextSetBit(idx: number): number; - - /** - * Finds first unset bit, starting at a given index. - * Return -1 if not found - * - * @param idx the starting index for the next unset bit - */ - nextUnsetBit(idx: number): number; - - /** - * Finds last set bit, up to a given index. - * Returns -1 if not found - * - * @param idx the starting index for the next unset bit (going in reverse) - */ - previousSetBit(idx: number): number; - - /** - * Finds last unset bit, up to a given index. - * Returns -1 if not found - */ - previousUnsetBit(idx: number): number; - - /** - * Converts the bitset to a math.Long number - */ - toLong(): Long; - - /** - * Reads an unsigned integer of the given bits from the given offset - * - * @param bits number of bits, 1 by default - * @param offset offset, 0 by default - */ - readUInt(bits?: number, offset?: number): number; - - /** - * Writes the given unsigned integer - * - * @param val integer - * @param bits number of bits to write, 1 by default - * @param offset write offset, 0 by default - */ - writeUInt(val: number, bits?: number, offset?: number): void; - - /** - * Creates a new BitSet from the given math.Long number - */ - static fromLong(l: Long): BitSet; - } - /** * Returns a random number from min to max - 1 * @@ -755,5 +17,21 @@ declare namespace adone { * @param max upper bound, default is 0xFFFFFFFF */ function random(min?: number, max?: number): number; + + /** + * Returns the maximum value from the given array + * + * @param array array of values + * @param score function to calculate the element score value + */ + function max(array: T[], score?: (x: T) => any): T; + + /** + * Returns the minimum value from the given array + * + * @param array array of values + * @param score function to calculate the element score value + */ + function min(array: T[], score?: (x: T) => any): T; } } diff --git a/types/adone/glosses/math/long.d.ts b/types/adone/glosses/math/long.d.ts new file mode 100644 index 0000000000..a4a15e2be5 --- /dev/null +++ b/types/adone/glosses/math/long.d.ts @@ -0,0 +1,293 @@ +declare namespace adone.math { + namespace I { + interface LowHighBits { + /** + * The low (signed) 32 bits of the long + */ + low: number; + /** + * The high (signed) 32 bits of the long + */ + high: number; + } + type Longable = Long | number | string | LowHighBits; + } + + /** + * Represents a 64 bit two's-complement integer + */ + class Long { + low: number; + high: number; + unsigned: boolean; + + /** + * @param low The low (signed) 32 bits of the long + * @param high The high (signed) 32 bits of the long + * @param unsigned Whether unsigned or not, defaults to false for signed + */ + constructor(low?: number, high?: number, unsigned?: boolean); + + /** + * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer + */ + toInt(): number; + + /** + * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa) + */ + toNumber(): number; + + /** + * Converts the Long to a string written in the specified radix + * + * @param radix Radix (2-36), 10 by default + */ + toString(radix?: number): string; + + inspect(): string; + + /** + * Gets the high 32 bits as a signed integer + */ + getHighBits(): number; + + /** + * Gets the high 32 bits as an unsigned integer + */ + getHighBitsUnsigned(): number; + + /** + * Gets the low 32 bits as a signed integer + */ + getLowBits(): number; + + /** + * Gets the low 32 bits as an unsigned integer + */ + getLowBitsUnsigned(): number; + + /** + * Gets the number of bits needed to represent the absolute value of this Long + */ + getNumBitsAbs(): number; + + /** + * Tests if this Long's value equals zero + */ + isZero(): boolean; + + /** + * Tests if this Long's value is negative + */ + isNegative(): boolean; + + /** + * Tests if this Long's value is positive + */ + isPositive(): boolean; + + /** + * Tests if this Long's value is odd + */ + isOdd(): boolean; + + /** + * Tests if this Long's value is even + */ + isEven(): boolean; + + /** + * Tests if this Long's value equals the specified's + */ + equals(other: I.Longable): boolean; + + /** + * Tests if this Long's value is less than the specified's + */ + lessThan(other: I.Longable): boolean; + + /** + * Tests if this Long's value is less than or equal the specified's + */ + lessThanOrEqual(other: I.Longable): boolean; + + /** + * Tests if this Long's value is greater than the specified's + */ + greaterThan(other: I.Longable): boolean; + + /** + * Tests if this Long's value is greater than or equal the specified's + */ + greaterThanOrEqual(other: I.Longable): boolean; + + /** + * Compares this Long's value with the specified's. + * Returns 0 if they are the same, 1 if the this is greater and -1 if the given one is greater + */ + compare(other: I.Longable): number; + + /** + * Negates this Long's value + */ + negate(): Long; + + /** + * Returns the sum of this and the specified Long + */ + add(addend: I.Longable): Long; + + /** + * Returns the difference of this and the specified Long + */ + sub(subtrahend: I.Longable): Long; + + /** + * Returns the product of this and the specified Long + */ + mul(multiplier: I.Longable): Long; + + /** + * Returns this Long divided by the specified + */ + div(divisor: I.Longable): Long; + + /** + * Returns this Long modulo the specified + */ + mod(divisor: I.Longable): Long; + + /** + * Returns the bitwise NOT of this Long + */ + not(): Long; + + /** + * Returns the bitwise AND of this Long and the specified + */ + and(other: I.Longable): Long; + + /** + * Returns the bitwise OR of this Long and the specifieds + */ + or(other: I.Longable): Long; + + /** + * Returns the bitwise XOR of this Long and the given one + */ + xor(other: I.Longable): Long; + + /** + * Returns this Long with bits shifted to the left by the given amount + */ + shl(numBits: number | Long): Long; + + /** + * Returns this Long with bits arithmetically shifted to the right by the given amount + */ + shr(numBits: number | Long): Long; + + /** + * Returns this Long with bits logically shifted to the right by the given amount + */ + shru(numBits: number | Long): Long; + + /** + * Converts this Long to signed + */ + toSigned(): Long; + + /** + * Converts this Long to unsigned + */ + toUnsigned(): Long; + + /** + * Converts this Long to an array of bytes, big-endian by default + * + * @param le Whether to return an array in little-endian format + */ + toBytes(le?: boolean): number[]; + + /** + * Converts this Long to an array of bytes in little-endian format + */ + toBytesLE(): number[]; + + /** + * Converts this Long to an array of bytes in big-endian format + */ + toBytesBE(): number[]; + + /** + * Returns a Long representing the given 32 bit integer value + */ + static fromInt(value: number, unsigned?: boolean): Long; + + /** + * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned + */ + static fromNumber(value?: number, unsigned?: boolean): Long; + + /** + * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is assumed to use 32 bits + */ + static fromBits(lowBits: number, highBits: number, unsigned?: boolean): Long; + + /** + * Returns a Long representation of the given string, written using the specified radix + */ + static fromString(str: string, unsigned?: boolean, radix?: number): Long; + + /** + * Returns a Long representation of the given string, written using the specified radix + */ + static fromString(str: string, radix?: number): Long; + + /** + * Converts the specified value to a Long + */ + static fromValue(val: I.Longable): Long; + + /** + * Minimum signed value + */ + static MIN_VALUE: Long; + + /** + * Maximum signed value + */ + static MAX_VALUE: Long; + + /** + * Maximum unsigned value + */ + static MAX_UNSIGNED_VALUE: Long; + + /** + * Signed zero + */ + static ZERO: Long; + + /** + * Unsigned zero + */ + static UZERO: Long; + + /** + * Signed one + */ + static ONE: Long; + + /** + * Unsigned one + */ + static UONE: Long; + + /** + * Signed negative one + */ + static NEG_ONE: Long; + } +} diff --git a/types/adone/glosses/regex.d.ts b/types/adone/glosses/regex.d.ts index e5c3be642a..edd66d324f 100644 --- a/types/adone/glosses/regex.d.ts +++ b/types/adone/glosses/regex.d.ts @@ -2,9 +2,17 @@ declare namespace adone { namespace regex { function filename(): RegExp; - function ip4(): RegExp; + namespace I.IP { + interface Options { + exact?: boolean; + } + } - function ip6(): RegExp; + function ip(options?: I.IP.Options): RegExp; + + function ip4(options?: I.IP.Options): RegExp; + + function ip6(options?: I.IP.Options): RegExp; function protocol(): RegExp; diff --git a/types/adone/test/glosses/collections/byte_array.ts b/types/adone/test/glosses/collections/byte_array.ts index 7254008322..377acfba9c 100644 --- a/types/adone/test/glosses/collections/byte_array.ts +++ b/types/adone/test/glosses/collections/byte_array.ts @@ -56,6 +56,11 @@ namespace adoneTests.collection.ByteArray { const b: number = buffer.readUInt16BE(10); } + namespace readUInt24BE { + const a: number = buffer.readUInt24BE(); + const b: number = buffer.readUInt24BE(10); + } + namespace readInt32LE { const a: number = buffer.readInt32LE(); const b: number = buffer.readInt32LE(10); @@ -162,6 +167,11 @@ namespace adoneTests.collection.ByteArray { const b: adone.collection.ByteArray = buffer.writeUInt16BE(10, 10); } + namespace writeUInt24BE { + const a: adone.collection.ByteArray = buffer.writeUInt24BE(10); + const b: adone.collection.ByteArray = buffer.writeUInt24BE(10, 10); + } + namespace writeInt32LE { const a: adone.collection.ByteArray = buffer.writeInt32LE(10); const b: adone.collection.ByteArray = buffer.writeInt32LE(10, 10); diff --git a/types/adone/test/glosses/collections/fast_lru.ts b/types/adone/test/glosses/collections/fast_lru.ts index 0e61f51dc5..6df1164d53 100644 --- a/types/adone/test/glosses/collections/fast_lru.ts +++ b/types/adone/test/glosses/collections/fast_lru.ts @@ -6,8 +6,8 @@ namespace adoneTests.collection.FastLRU { } = adone; new FastLRU(); - new FastLRU(100); - new FastLRU(100, { dispose: (key: string, value: number) => null }); + new FastLRU({ maxSize: 100 }); + new FastLRU({ maxSize: 100, dispose: (key: string, value: number) => null }); { const a: number = new FastLRU().size; } { const a: number | undefined = new FastLRU().get("key"); } new FastLRU().set("key", 123); diff --git a/types/adone/test/glosses/collections/lru.ts b/types/adone/test/glosses/collections/lru.ts index 934e5a1fbf..59e7b77694 100644 --- a/types/adone/test/glosses/collections/lru.ts +++ b/types/adone/test/glosses/collections/lru.ts @@ -8,15 +8,14 @@ namespace adoneTests.collection.LRU { type LRU = adone.collection.LRU; new LRU(); - new LRU(100); + new LRU({ maxSize: 100 }); new LRU({}); - new LRU({ max: 100 }); new LRU({ dispose: (key: string, value: number) => null }); new LRU({ maxAge: 100 }); new LRU({ noDisposeOnSet: false }); new LRU({ stale: true }); - { const a: number = new LRU().max; } - { new LRU().max = 100; } + { const a: number = new LRU().maxSize; } + { new LRU().maxSize = 100; } { const a: boolean = new LRU().allowStale; } { new LRU().allowStale = false; } { const a: number = new LRU().maxAge; } diff --git a/types/adone/test/glosses/collections/time_map.ts b/types/adone/test/glosses/collections/time_map.ts new file mode 100644 index 0000000000..5cabcdac9d --- /dev/null +++ b/types/adone/test/glosses/collections/time_map.ts @@ -0,0 +1,22 @@ +namespace adoneTests.collection.TimedoutMap { + const { + collection: { + TimeMap + } + } = adone; + + type TimeMap = adone.collection.TimeMap; + + new TimeMap(); + new TimeMap(1000); + new TimeMap(1000, (key: string) => null); + { + const a: TimeMap = new TimeMap().forEach((value: number, key: string) => null); + } + { + const a: TimeMap = new TimeMap().forEach(function (value: number, key: string) { + const a: number = this.a; + }, { a: 1 }); + } + { const a: boolean = new TimeMap().delete("123"); } +} diff --git a/types/adone/test/glosses/collections/timedout_map.ts b/types/adone/test/glosses/collections/timedout_map.ts deleted file mode 100644 index ffca754e2a..0000000000 --- a/types/adone/test/glosses/collections/timedout_map.ts +++ /dev/null @@ -1,22 +0,0 @@ -namespace adoneTests.collection.TimedoutMap { - const { - collection: { - TimedoutMap - } - } = adone; - - type TimedoutMap = adone.collection.TimedoutMap; - - new TimedoutMap(); - new TimedoutMap(1000); - new TimedoutMap(1000, (key: string) => null); - { - const a: TimedoutMap = new TimedoutMap().forEach((value: number, key: string) => null); - } - { - const a: TimedoutMap = new TimedoutMap().forEach(function (value: number, key: string) { - const a: number = this.a; - }, { a: 1 }); - } - { const a: boolean = new TimedoutMap().delete("123"); } -} diff --git a/types/adone/test/glosses/fs.ts b/types/adone/test/glosses/fs.ts index e7c5333624..86236038a0 100644 --- a/types/adone/test/glosses/fs.ts +++ b/types/adone/test/glosses/fs.ts @@ -602,13 +602,12 @@ namespace fsTests { } namespace isTests { - const { is } = fs; - is.file("hello").then((x: boolean) => {}); - { const a: boolean = is.fileSync("hello"); } - is.directory("hello").then((x: boolean) => {}); - { const a: boolean = is.directorySync("hello"); } - is.executable("hello").then((x: boolean) => {}); - { const a: boolean = is.executableSync("hello"); } + fs.isFile("hello").then((x: boolean) => {}); + { const a: boolean = fs.isFileSync("hello"); } + fs.isDirectory("hello").then((x: boolean) => {}); + { const a: boolean = fs.isDirectorySync("hello"); } + fs.isExecutable("hello").then((x: boolean) => {}); + { const a: boolean = fs.isExecutableSync("hello"); } } namespace whichTests { @@ -944,4 +943,17 @@ namespace fsTests { fs.watchTail("file", { separator: /\n/ }); fs.watchTail("file", { useWatchFile: true }); } + + namespace writeFileAtomicTests { + fs.writeFileAtomic("a", "b").then(() => {}); + fs.writeFileAtomic("a", Buffer.from("b")).then(() => {}); + fs.writeFileAtomic("a", new Uint8Array(10)).then(() => {}); + fs.writeFileAtomic("a", "a", {}).then(() => {}); + fs.writeFileAtomic("a", "a", { chown: {} }).then(() => {}); + fs.writeFileAtomic("a", "a", { chown: { gid: 0 } }).then(() => {}); + fs.writeFileAtomic("a", "a", { chown: { uid: 0 } }).then(() => {}); + fs.writeFileAtomic("a", "a", { encoding: "utf8" }).then(() => {}); + fs.writeFileAtomic("a", "a", { fsync: false }).then(() => {}); + fs.writeFileAtomic("a", "a", { mode: 0o666 }).then(() => {}); + } } diff --git a/types/adone/test/glosses/is.ts b/types/adone/test/glosses/is.ts index 045818f0ec..96c954d284 100644 --- a/types/adone/test/glosses/is.ts +++ b/types/adone/test/glosses/is.ts @@ -336,6 +336,8 @@ namespace isTests { { const a: boolean = is.freebsd; } { const a: boolean = is.darwin; } { const a: boolean = is.sunos; } + { const a: boolean = is.openbsd; } + { const a: boolean = is.aix; } { const a: boolean = is.uppercase("abc"); } { const a: boolean = is.lowercase("abc"); } { const a: boolean = is.digits("012"); } @@ -343,7 +345,11 @@ namespace isTests { { const a: boolean = is.binaryExtension("mp3"); } { const a: boolean = is.binaryPath("a.mp3"); } { const a: boolean = is.ip4("192.168.1.1"); } + { const a: boolean = is.ip4("192.168.1.1", { exact: true }); } { const a: boolean = is.ip6("::192.168.1.1"); } + { const a: boolean = is.ip6("::192.168.1.1", { exact: true }); } + { const a: boolean = is.ip("::192.168.1.1"); } + { const a: boolean = is.ip("::192.168.1.1", { exact: true }); } { const a: boolean = is.arrayBuffer({}); const b: any = 2; @@ -490,4 +496,7 @@ namespace isTests { b.charCodeAt(0); } } + { + const a: boolean = is.multiAddress(2); + } } diff --git a/types/adone/test/glosses/math/bignumber.ts b/types/adone/test/glosses/math/bignumber.ts new file mode 100644 index 0000000000..8466abae7f --- /dev/null +++ b/types/adone/test/glosses/math/bignumber.ts @@ -0,0 +1,154 @@ +namespace mathTests.bignumberTests { + const { + math: { + BigNumber + } + } = adone; + + type BigNumber = adone.math.BigNumber; + + new BigNumber(10); + new BigNumber("10"); + new BigNumber(new BigNumber(10)); + new BigNumber("10", 2); + + { const a: string = new BigNumber(1).toString(); } + { const a: string = new BigNumber(1).toString(2); } + + { const a: number = new BigNumber(1).toNumber(); } + + { const a: Buffer = new BigNumber(1).toBuffer(); } + { const a: Buffer = new BigNumber(1).toBuffer({}); } + { const a: Buffer = new BigNumber(1).toBuffer({ endian: 1 }); } + { const a: Buffer = new BigNumber(1).toBuffer({ endian: -1 }); } + { const a: Buffer = new BigNumber(1).toBuffer({ endian: "big" }); } + { const a: Buffer = new BigNumber(1).toBuffer({ endian: "little" }); } + { const a: Buffer = new BigNumber(1).toBuffer({ size: 1 }); } + { const a: Buffer = new BigNumber(1).toBuffer({ size: "auto" }); } + + { const a: BigNumber = new BigNumber(10).add(1); } + { const a: BigNumber = new BigNumber(10).add("1"); } + { const a: BigNumber = new BigNumber(10).add(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).sub(1); } + { const a: BigNumber = new BigNumber(10).sub("1"); } + { const a: BigNumber = new BigNumber(10).sub(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).mul(1); } + { const a: BigNumber = new BigNumber(10).mul("1"); } + { const a: BigNumber = new BigNumber(10).mul(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).div(1); } + { const a: BigNumber = new BigNumber(10).div("1"); } + { const a: BigNumber = new BigNumber(10).div(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).abs(); } + + { const a: BigNumber = new BigNumber(10).neg(); } + + { const a: number = new BigNumber(10).cmp(1); } + { const a: number = new BigNumber(10).cmp("1"); } + { const a: number = new BigNumber(10).cmp(new BigNumber(1)); } + + { const a: boolean = new BigNumber(10).gt(1); } + { const a: boolean = new BigNumber(10).gt("1"); } + { const a: boolean = new BigNumber(10).gt(new BigNumber(10)); } + + { const a: boolean = new BigNumber(10).ge(1); } + { const a: boolean = new BigNumber(10).ge("1"); } + { const a: boolean = new BigNumber(10).ge(new BigNumber(10)); } + + { const a: boolean = new BigNumber(10).eq(1); } + { const a: boolean = new BigNumber(10).eq("1"); } + { const a: boolean = new BigNumber(10).eq(new BigNumber(10)); } + + { const a: boolean = new BigNumber(10).lt(1); } + { const a: boolean = new BigNumber(10).lt("1"); } + { const a: boolean = new BigNumber(10).lt(new BigNumber(10)); } + + { const a: boolean = new BigNumber(10).le(1); } + { const a: boolean = new BigNumber(10).le("1"); } + { const a: boolean = new BigNumber(10).le(new BigNumber(10)); } + + { const a: BigNumber = new BigNumber(10).and(1); } + { const a: BigNumber = new BigNumber(10).and("1"); } + { const a: BigNumber = new BigNumber(10).and(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).or(1); } + { const a: BigNumber = new BigNumber(10).or("1"); } + { const a: BigNumber = new BigNumber(10).or(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).xor(1); } + { const a: BigNumber = new BigNumber(10).xor("1"); } + { const a: BigNumber = new BigNumber(10).xor(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).mod(1); } + { const a: BigNumber = new BigNumber(10).mod("1"); } + { const a: BigNumber = new BigNumber(10).mod(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).pow(1); } + { const a: BigNumber = new BigNumber(10).pow("1"); } + { const a: BigNumber = new BigNumber(10).pow(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).powm(1, 1); } + { const a: BigNumber = new BigNumber(10).powm("1", 1); } + { const a: BigNumber = new BigNumber(10).powm(new BigNumber(1), 1); } + { const a: BigNumber = new BigNumber(10).powm(1, "1"); } + { const a: BigNumber = new BigNumber(10).powm("1", "1"); } + { const a: BigNumber = new BigNumber(10).powm(new BigNumber(1), "1"); } + { const a: BigNumber = new BigNumber(10).powm(1, new BigNumber(1)); } + { const a: BigNumber = new BigNumber(10).powm("1", new BigNumber(1)); } + { const a: BigNumber = new BigNumber(10).powm(new BigNumber(1), new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).invertm(1); } + { const a: BigNumber = new BigNumber(10).invertm("1"); } + { const a: BigNumber = new BigNumber(10).invertm(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).rand(); } + { const a: BigNumber = new BigNumber(10).rand(1); } + { const a: BigNumber = new BigNumber(10).rand("1"); } + { const a: BigNumber = new BigNumber(10).rand(new BigNumber(1)); } + + { const a: boolean | "maybe" = new BigNumber(10).probPrime(); } + + { const a: BigNumber = new BigNumber(10).nextPrime(); } + + { const a: BigNumber = new BigNumber(10).sqrt(); } + + { const a: BigNumber = new BigNumber(10).root(1); } + { const a: BigNumber = new BigNumber(10).root("1"); } + { const a: BigNumber = new BigNumber(10).root(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).shiftLeft(1); } + { const a: BigNumber = new BigNumber(10).shiftLeft("1"); } + { const a: BigNumber = new BigNumber(10).shiftLeft(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).shiftRight(1); } + { const a: BigNumber = new BigNumber(10).shiftRight("1"); } + { const a: BigNumber = new BigNumber(10).shiftRight(new BigNumber(1)); } + + { const a: BigNumber = new BigNumber(10).gcd(1); } + { const a: BigNumber = new BigNumber(10).gcd("1"); } + { const a: BigNumber = new BigNumber(10).gcd(new BigNumber(1)); } + + { const a: number = new BigNumber(10).jacobi(1); } + { const a: number = new BigNumber(10).jacobi("1"); } + { const a: number = new BigNumber(10).jacobi(new BigNumber(1)); } + + { const a: number = new BigNumber(10).bitLength(); } + + { const a: boolean = new BigNumber(10).isBitSet(10); } + + { const a: BigNumber = BigNumber.prime(10); } + { const a: BigNumber = BigNumber.prime(10, true); } + + { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10)); } + { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { endian: "little" }); } + { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { endian: -1 }); } + { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { endian: 1 }); } + { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { endian: "big" }); } + { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { size: "auto" }); } + + { const a: BigNumber = BigNumber.ONE; } + { const a: BigNumber = BigNumber.ZERO; } +} diff --git a/types/adone/test/glosses/math/bitset.ts b/types/adone/test/glosses/math/bitset.ts new file mode 100644 index 0000000000..1e08d0649f --- /dev/null +++ b/types/adone/test/glosses/math/bitset.ts @@ -0,0 +1,62 @@ +namespace mathTests.bitsetTests { + const { + math: { + BitSet + } + } = adone; + + type BitSet = adone.math.BitSet; + + new BitSet(10); + new BitSet(new BitSet(10).dehydrate()); + + { const a: boolean = new BitSet(10).get(0); } + { const a: boolean = new BitSet(10).set(0); } + { const a: boolean = new BitSet(10).setRange(0, 10); } + { const a: boolean = new BitSet(10).unset(0); } + { const a: boolean = new BitSet(10).unsetRange(0, 10); } + { const a: boolean = new BitSet(10).toggle(0); } + { const a: boolean = new BitSet(10).toggleRange(0, 10); } + { const a: boolean = new BitSet(10).clear(); } + { const a: BitSet = new BitSet(10).clone(); } + { const a: string = new BitSet(10).dehydrate(); } + + { const a: BitSet = new BitSet(10).and(1); } + { const a: BitSet = new BitSet(10).and(new BitSet(10)); } + + { const a: BitSet = new BitSet(10).or(1); } + { const a: BitSet = new BitSet(10).or(new BitSet(10)); } + + { const a: BitSet = new BitSet(10).xor(1); } + { const a: BitSet = new BitSet(10).xor(new BitSet(10)); } + + new BitSet(10).forEach((x: number) => {}); + new BitSet(10).forEach((x: number) => false); + + { const a: BitSet = new BitSet(10).circularShift(10); } + { const a: number = new BitSet(10).getCardinality(); } + { const a: number[] = new BitSet(10).getIndices(); } + { const a: boolean = new BitSet(10).isSubsetOf(new BitSet(10)); } + { const a: boolean = new BitSet(10).isEmpty(); } + { const a: boolean = new BitSet(10).isEqual(new BitSet(10)); } + { const a: string = new BitSet(10).toString(); } + { const a: number = new BitSet(10).ffs(); } + { const a: number = new BitSet(10).ffs(1); } + { const a: number = new BitSet(10).ffz(); } + { const a: number = new BitSet(10).ffz(1); } + { const a: number = new BitSet(10).fls(); } + { const a: number = new BitSet(10).fls(1); } + { const a: number = new BitSet(10).flz(); } + { const a: number = new BitSet(10).flz(1); } + { const a: number = new BitSet(10).nextSetBit(1); } + { const a: number = new BitSet(10).nextUnsetBit(1); } + { const a: number = new BitSet(10).previousSetBit(1); } + { const a: number = new BitSet(10).previousUnsetBit(1); } + { const a: number = new BitSet(10).readUInt(); } + { const a: number = new BitSet(10).readUInt(1); } + { const a: number = new BitSet(10).readUInt(1, 2); } + { new BitSet(10).writeUInt(1); } + { new BitSet(10).writeUInt(1, 2); } + { new BitSet(10).writeUInt(1, 2, 3); } + { const a: BitSet = BitSet.fromLong(new adone.math.Long(10, 20)); } +} diff --git a/types/adone/test/glosses/math/decimal.ts b/types/adone/test/glosses/math/decimal.ts new file mode 100644 index 0000000000..7c5f450c35 --- /dev/null +++ b/types/adone/test/glosses/math/decimal.ts @@ -0,0 +1,445 @@ +namespace mathTests.decimalTest { + const { + math: { + Decimal + } + } = adone; + + type Decimal = adone.math.Decimal; + + new Decimal(0); + new Decimal("0"); + new Decimal(new Decimal(0)); + + new Decimal(0).e.toExponential(); + new Decimal(0).d[0].toExponential(); + new Decimal(0).s.toExponential(); + + const d = new Decimal(0); + + { const a: Decimal = d.abs(); } + { const a: Decimal = d.absoluteValue(); } + + { const a: Decimal = d.ceil(); } + + { const a: number = d.comparedTo(1); } + { const a: number = d.comparedTo("1"); } + { const a: number = d.comparedTo(d); } + { const a: number = d.cmp(1); } + { const a: number = d.cmp("1"); } + { const a: number = d.cmp(d); } + + { const a: Decimal = d.cos(); } + { const a: Decimal = d.cosine(); } + + { const a: Decimal = d.cubeRoot(); } + { const a: Decimal = d.cbrt(); } + + { const a: number = d.decimalPlaces(); } + { const a: number = d.dp(); } + + { const a: Decimal = d.dividedBy(1); } + { const a: Decimal = d.dividedBy("1"); } + { const a: Decimal = d.dividedBy(d); } + { const a: Decimal = d.div(1); } + { const a: Decimal = d.div("1"); } + { const a: Decimal = d.div(d); } + + { const a: Decimal = d.dividedToIntegerBy(1); } + { const a: Decimal = d.dividedToIntegerBy("1"); } + { const a: Decimal = d.dividedToIntegerBy(d); } + { const a: Decimal = d.divToInt(1); } + { const a: Decimal = d.divToInt("1"); } + { const a: Decimal = d.divToInt(d); } + + { const a: boolean = d.equals(1); } + { const a: boolean = d.equals("1"); } + { const a: boolean = d.equals(d); } + { const a: boolean = d.eq(1); } + { const a: boolean = d.eq("1"); } + { const a: boolean = d.eq(d); } + + { const a: Decimal = d.floor(); } + + { const a: boolean = d.greaterThan(1); } + { const a: boolean = d.greaterThan("1"); } + { const a: boolean = d.greaterThan(d); } + { const a: boolean = d.gt(1); } + { const a: boolean = d.gt("1"); } + { const a: boolean = d.gt(d); } + + { const a: boolean = d.greaterThanOrEqualTo(1); } + { const a: boolean = d.greaterThanOrEqualTo("1"); } + { const a: boolean = d.greaterThanOrEqualTo(d); } + { const a: boolean = d.gte(1); } + { const a: boolean = d.gte("1"); } + { const a: boolean = d.gte(d); } + + { const a: Decimal = d.hyperbolicCosine(); } + { const a: Decimal = d.cosh(); } + + { const a: Decimal = d.hyperbolicSine(); } + { const a: Decimal = d.sinh(); } + + { const a: Decimal = d.hyperbolicTangent(); } + { const a: Decimal = d.tanh(); } + + { const a: Decimal = d.inverseCosine(); } + { const a: Decimal = d.acos(); } + + { const a: Decimal = d.inverseHyperbolicCosine(); } + { const a: Decimal = d.acosh(); } + + { const a: Decimal = d.inverseHyperbolicSine(); } + { const a: Decimal = d.asinh(); } + + { const a: Decimal = d.inverseHyperbolicTangent(); } + { const a: Decimal = d.atanh(); } + + { const a: Decimal = d.inverseSine(); } + { const a: Decimal = d.asin(); } + + { const a: Decimal = d.inverseTangent(); } + { const a: Decimal = d.atan(); } + + { const a: boolean = d.isFinite(); } + + { const a: boolean = d.isInteger(); } + { const a: boolean = d.isInt(); } + + { const a: boolean = d.isNaN(); } + + { const a: boolean = d.isNegative(); } + { const a: boolean = d.isNeg(); } + + { const a: boolean = d.isPositive(); } + { const a: boolean = d.isPos(); } + + { const a: boolean = d.isZero(); } + + { const a: boolean = d.lessThan(1); } + { const a: boolean = d.lessThan("1"); } + { const a: boolean = d.lessThan(d); } + { const a: boolean = d.lt(1); } + { const a: boolean = d.lt("1"); } + { const a: boolean = d.lt(d); } + + { const a: boolean = d.lessThanOrEqualTo(1); } + { const a: boolean = d.lessThanOrEqualTo("1"); } + { const a: boolean = d.lessThanOrEqualTo(d); } + { const a: boolean = d.lte(1); } + { const a: boolean = d.lte("1"); } + { const a: boolean = d.lte(d); } + + { const a: Decimal = d.logarithm(); } + { const a: Decimal = d.logarithm(1); } + { const a: Decimal = d.logarithm("1"); } + { const a: Decimal = d.logarithm(d); } + { const a: Decimal = d.log(); } + { const a: Decimal = d.log(1); } + { const a: Decimal = d.log("1"); } + { const a: Decimal = d.log(d); } + + { const a: Decimal = d.minus(1); } + { const a: Decimal = d.minus("1"); } + { const a: Decimal = d.minus(d); } + { const a: Decimal = d.sub(1); } + { const a: Decimal = d.sub("1"); } + { const a: Decimal = d.sub(d); } + + { const a: Decimal = d.modulo(1); } + { const a: Decimal = d.modulo("1"); } + { const a: Decimal = d.modulo(d); } + { const a: Decimal = d.mod(1); } + { const a: Decimal = d.mod("1"); } + { const a: Decimal = d.mod(d); } + + { const a: Decimal = d.naturalExponential(); } + { const a: Decimal = d.exp(); } + + { const a: Decimal = d.naturalLogarithm(); } + { const a: Decimal = d.ln(); } + + { const a: Decimal = d.negated(); } + { const a: Decimal = d.neg(); } + + { const a: Decimal = d.plus(1); } + { const a: Decimal = d.plus("1"); } + { const a: Decimal = d.plus(d); } + { const a: Decimal = d.add(1); } + { const a: Decimal = d.add("1"); } + { const a: Decimal = d.add(d); } + + { const a: number = d.precision(); } + { const a: number = d.precision(true); } + { const a: number = d.sd(); } + { const a: number = d.sd(true); } + + { const a: Decimal = d.round(); } + + { const a: Decimal = d.sine(); } + { const a: Decimal = d.sin(); } + + { const a: Decimal = d.squareRoot(); } + { const a: Decimal = d.sqrt(); } + + { const a: Decimal = d.tangent(); } + { const a: Decimal = d.tan(); } + + { const a: Decimal = d.times(1); } + { const a: Decimal = d.times("1"); } + { const a: Decimal = d.times(d); } + { const a: Decimal = d.mul(1); } + { const a: Decimal = d.mul("1"); } + { const a: Decimal = d.mul(d); } + + { const a: string = d.toBinary(); } + { const a: string = d.toBinary(1); } + { const a: string = d.toBinary(1, 1); } + + { const a: Decimal = d.toDecimalPlaces(); } + { const a: Decimal = d.toDecimalPlaces(1); } + { const a: Decimal = d.toDecimalPlaces(1, 1); } + { const a: Decimal = d.toDP(); } + { const a: Decimal = d.toDP(1); } + { const a: Decimal = d.toDP(1, 1); } + + { const a: string = d.toExponential(); } + { const a: string = d.toExponential(1); } + { const a: string = d.toExponential(1, 1); } + + { const a: string = d.toFixed(); } + { const a: string = d.toFixed(1); } + { const a: string = d.toFixed(1, 1); } + + { const a: Decimal[] = d.toFraction(); } + { const a: Decimal[] = d.toFraction(1); } + { const a: Decimal[] = d.toFraction("1"); } + { const a: Decimal[] = d.toFraction(d); } + + { const a: string = d.toHexadecimal(); } + { const a: string = d.toHexadecimal(1); } + { const a: string = d.toHexadecimal(1, 1); } + { const a: string = d.toHex(); } + { const a: string = d.toHex(1); } + { const a: string = d.toHex(1, 1); } + + { const a: string = d.toJSON(); } + + { const a: Decimal = d.toNearest(); } + { const a: Decimal = d.toNearest(1); } + { const a: Decimal = d.toNearest("1"); } + { const a: Decimal = d.toNearest(d); } + { const a: Decimal = d.toNearest(d, 1); } + + { const a: number = d.toNumber(); } + + { const a: string = d.toOctal(); } + { const a: string = d.toOctal(1); } + { const a: string = d.toOctal(1, 1); } + + { const a: Decimal = d.toPower(1); } + { const a: Decimal = d.toPower("1"); } + { const a: Decimal = d.toPower(d); } + { const a: Decimal = d.pow(1); } + { const a: Decimal = d.pow("1"); } + { const a: Decimal = d.pow(d); } + + { const a: string = d.toPrecision(); } + { const a: string = d.toPrecision(1); } + { const a: string = d.toPrecision(1, 1); } + + { const a: Decimal = d.toSignificantDigits(); } + { const a: Decimal = d.toSignificantDigits(1); } + { const a: Decimal = d.toSignificantDigits(1, 1); } + { const a: Decimal = d.toSD(); } + { const a: Decimal = d.toSD(1); } + { const a: Decimal = d.toSD(1, 1); } + + { const a: string = d.toString(); } + + { const a: Decimal = d.truncated(); } + { const a: Decimal = d.trunc(); } + + { const a: string = d.valueOf(); } + + { const a: Decimal = Decimal.abs(1); } + { const a: Decimal = Decimal.abs("1"); } + { const a: Decimal = Decimal.abs(d); } + + { const a: Decimal = Decimal.acos(1); } + { const a: Decimal = Decimal.acos("1"); } + { const a: Decimal = Decimal.acos(d); } + + { const a: Decimal = Decimal.acosh(1); } + { const a: Decimal = Decimal.acosh("1"); } + { const a: Decimal = Decimal.acosh(d); } + + { const a: Decimal = Decimal.asin(1); } + { const a: Decimal = Decimal.asin("1"); } + { const a: Decimal = Decimal.asin(d); } + + { const a: Decimal = Decimal.asinh(1); } + { const a: Decimal = Decimal.asinh("1"); } + { const a: Decimal = Decimal.asinh(d); } + + { const a: Decimal = Decimal.atan(1); } + { const a: Decimal = Decimal.atan("1"); } + { const a: Decimal = Decimal.atan(d); } + + { const a: Decimal = Decimal.atan2(1, 1); } + { const a: Decimal = Decimal.atan2("1", "1"); } + { const a: Decimal = Decimal.atan2(d, d); } + + { const a: Decimal = Decimal.cbrt(1); } + { const a: Decimal = Decimal.cbrt("1"); } + { const a: Decimal = Decimal.cbrt(d); } + + { const a: typeof Decimal = Decimal.clone({}); } + { const a: typeof Decimal = Decimal.clone({ crypto: true }); } + { const a: typeof Decimal = Decimal.clone({ defaults: true }); } + { const a: typeof Decimal = Decimal.clone({ maxE: 1 }); } + { const a: typeof Decimal = Decimal.clone({ minE: 1 }); } + { const a: typeof Decimal = Decimal.clone({ modulo: 1 }); } + { const a: typeof Decimal = Decimal.clone({ precision: 1 }); } + { const a: typeof Decimal = Decimal.clone({ rounding: 1 }); } + { const a: typeof Decimal = Decimal.clone({ toExpNeg: 1 }); } + { const a: typeof Decimal = Decimal.clone({ toExpPos: 1 }); } + { const a: typeof Decimal = Decimal.clone({}); } + + { const a: typeof Decimal = Decimal.config({ crypto: true }); } + { const a: typeof Decimal = Decimal.config({ defaults: true }); } + { const a: typeof Decimal = Decimal.config({ maxE: 1 }); } + { const a: typeof Decimal = Decimal.config({ minE: 1 }); } + { const a: typeof Decimal = Decimal.config({ modulo: 1 }); } + { const a: typeof Decimal = Decimal.config({ precision: 1 }); } + { const a: typeof Decimal = Decimal.config({ rounding: 1 }); } + { const a: typeof Decimal = Decimal.config({ toExpNeg: 1 }); } + { const a: typeof Decimal = Decimal.config({ toExpPos: 1 }); } + + { const a: typeof Decimal = Decimal.set({ crypto: true }); } + { const a: typeof Decimal = Decimal.set({ defaults: true }); } + { const a: typeof Decimal = Decimal.set({ maxE: 1 }); } + { const a: typeof Decimal = Decimal.set({ minE: 1 }); } + { const a: typeof Decimal = Decimal.set({ modulo: 1 }); } + { const a: typeof Decimal = Decimal.set({ precision: 1 }); } + { const a: typeof Decimal = Decimal.set({ rounding: 1 }); } + { const a: typeof Decimal = Decimal.set({ toExpNeg: 1 }); } + { const a: typeof Decimal = Decimal.set({ toExpPos: 1 }); } + + { const a: Decimal = Decimal.cos(1); } + { const a: Decimal = Decimal.cos("1"); } + { const a: Decimal = Decimal.cos(d); } + + { const a: Decimal = Decimal.div(1, 1); } + { const a: Decimal = Decimal.div("1", "1"); } + { const a: Decimal = Decimal.div(d, d); } + + { const a: Decimal = Decimal.exp(1); } + { const a: Decimal = Decimal.exp("1"); } + { const a: Decimal = Decimal.exp(d); } + + { const a: Decimal = Decimal.floor(1); } + { const a: Decimal = Decimal.floor("1"); } + { const a: Decimal = Decimal.floor(d); } + + { const a: Decimal = Decimal.hypot(1); } + { const a: Decimal = Decimal.hypot("1"); } + { const a: Decimal = Decimal.hypot(d); } + { const a: Decimal = Decimal.hypot(1, 1); } + { const a: Decimal = Decimal.hypot("1", "1"); } + { const a: Decimal = Decimal.hypot(d, d); } + { const a: Decimal = Decimal.hypot(1, 1, 1); } + { const a: Decimal = Decimal.hypot("1", "1", "1"); } + { const a: Decimal = Decimal.hypot(d, d, d); } + { const a: Decimal = Decimal.hypot(1, 1, 1, 1, 1, 1, 1, 1, 1, d, 1, 1, 1, "1", d); } + + { const a: boolean = Decimal.isDecimal(d); } + + { const a: Decimal = Decimal.ln(1); } + { const a: Decimal = Decimal.ln("1"); } + { const a: Decimal = Decimal.ln(d); } + + { const a: Decimal = Decimal.log(1); } + { const a: Decimal = Decimal.log("1"); } + { const a: Decimal = Decimal.log(d); } + { const a: Decimal = Decimal.log(1, 2); } + { const a: Decimal = Decimal.log("1", 2); } + { const a: Decimal = Decimal.log(d, 2); } + + { const a: Decimal = Decimal.log2(1); } + { const a: Decimal = Decimal.log2("1"); } + { const a: Decimal = Decimal.log2(d); } + + { const a: Decimal = Decimal.log10(1); } + { const a: Decimal = Decimal.log10("1"); } + { const a: Decimal = Decimal.log10(d); } + + { const a: Decimal = Decimal.min(1, "1", 1, d); } + + { const a: Decimal = Decimal.max(1, "1", 1, d); } + + { const a: Decimal = Decimal.mul(1, 1); } + { const a: Decimal = Decimal.mul("1", "1"); } + { const a: Decimal = Decimal.mul(d, d); } + + { const a: Decimal = Decimal.pow(1, 1); } + { const a: Decimal = Decimal.pow("1", "1"); } + { const a: Decimal = Decimal.pow(d, d); } + + { const a: Decimal = Decimal.random(); } + { const a: Decimal = Decimal.random(1); } + + { const a: Decimal = Decimal.round(1); } + { const a: Decimal = Decimal.round("1"); } + { const a: Decimal = Decimal.round(d); } + + { const a: Decimal = Decimal.sign(1); } + { const a: Decimal = Decimal.sign("1"); } + { const a: Decimal = Decimal.sign(d); } + + { const a: Decimal = Decimal.sin(1); } + { const a: Decimal = Decimal.sin("1"); } + { const a: Decimal = Decimal.sin(d); } + + { const a: Decimal = Decimal.sinh(1); } + { const a: Decimal = Decimal.sinh("1"); } + { const a: Decimal = Decimal.sinh(d); } + + { const a: Decimal = Decimal.sqrt(1); } + { const a: Decimal = Decimal.sqrt("1"); } + { const a: Decimal = Decimal.sqrt(d); } + + { const a: Decimal = Decimal.sub(1, 1); } + { const a: Decimal = Decimal.sub("1", "1"); } + { const a: Decimal = Decimal.sub(d, d); } + + { const a: Decimal = Decimal.tan(1); } + { const a: Decimal = Decimal.tan("1"); } + { const a: Decimal = Decimal.tan(d); } + + { const a: Decimal = Decimal.tanh(1); } + { const a: Decimal = Decimal.tanh("1"); } + { const a: Decimal = Decimal.tanh(d); } + + { const a: Decimal = Decimal.trunc(1); } + { const a: Decimal = Decimal.trunc("1"); } + { const a: Decimal = Decimal.trunc(d); } + + { const a: number = Decimal.precision; } + { const a: number = Decimal.rounding; } + { const a: number = Decimal.toExpNeg; } + { const a: number = Decimal.minE; } + { const a: boolean = Decimal.crypto; } + { const a: number = Decimal.modulo; } + { const a: number = Decimal.ROUND_UP; } + { const a: number = Decimal.ROUND_DOWN; } + { const a: number = Decimal.ROUND_CEIL; } + { const a: number = Decimal.ROUND_FLOOR; } + { const a: number = Decimal.ROUND_HALF_UP; } + { const a: number = Decimal.ROUND_HALF_DOWN; } + { const a: number = Decimal.ROUND_HALF_EVEN; } + { const a: number = Decimal.ROUND_HALF_CEIL; } + { const a: number = Decimal.ROUND_HALF_FLOOR; } + { const a: number = Decimal.EUCLID; } +} diff --git a/types/adone/test/glosses/math/index.ts b/types/adone/test/glosses/math/index.ts index 928977fad9..d85c08bdef 100644 --- a/types/adone/test/glosses/math/index.ts +++ b/types/adone/test/glosses/math/index.ts @@ -1,469 +1,7 @@ namespace mathTests { - const { math } = adone; - - namespace LongTests { - new math.Long(); - new math.Long(0); - new math.Long(0, 0); - new math.Long(0, 0, true); - - namespace toInt { - const a: number = new math.Long().toInt(); - } - - namespace toNumber { - const a: number = new math.Long().toNumber(); - } - - namespace toString { - const a: string = new math.Long().toString(); - const b: string = new math.Long().toString(16); - } - - namespace getHighBits { - const a: number = new math.Long().getHighBits(); - } - - namespace getLowBits { - const a: number = new math.Long().getLowBits(); - } - - namespace getLowBitsUnsigned { - const a: number = new math.Long().getLowBitsUnsigned(); - } - - namespace getHighBitsUnsigned { - const a: number = new math.Long().getHighBitsUnsigned(); - } - - namespace getNumBitsAbs { - const a: number = new math.Long().getNumBitsAbs(); - } - - namespace isZero { - const a: boolean = new math.Long().isZero(); - } - - namespace isNegative { - const a: boolean = new math.Long().isNegative(); - } - - namespace isPositive { - const a: boolean = new math.Long().isPositive(); - } - - namespace isOdd { - const a: boolean = new math.Long().isOdd(); - } - - namespace isEven { - const a: boolean = new math.Long().isEven(); - } - - namespace equals { - const a = new math.Long(); - const b: boolean = a.equals(new math.Long()); - const c: boolean = a.equals(1); - const d: boolean = a.equals("1"); - const e: boolean = a.equals({ low: 0, high: 0 }); - } - - namespace lessThan { - const a = new math.Long(); - const b: boolean = a.lessThan(new math.Long()); - const c: boolean = a.lessThan(1); - const d: boolean = a.lessThan("1"); - const e: boolean = a.lessThan({ low: 0, high: 0 }); - } - - namespace lessThanOrEqual { - const a = new math.Long(); - const b: boolean = a.lessThanOrEqual(new math.Long()); - const c: boolean = a.lessThanOrEqual(1); - const d: boolean = a.lessThanOrEqual("1"); - const e: boolean = a.lessThanOrEqual({ low: 0, high: 0 }); - } - - namespace greaterThan { - const a = new math.Long(); - const b: boolean = a.greaterThan(new math.Long()); - const c: boolean = a.greaterThan(1); - const d: boolean = a.greaterThan("1"); - const e: boolean = a.greaterThan({ low: 0, high: 0 }); - } - - namespace greaterThanOrEqual { - const a = new math.Long(); - const b: boolean = a.greaterThanOrEqual(new math.Long()); - const c: boolean = a.greaterThanOrEqual(1); - const d: boolean = a.greaterThanOrEqual("1"); - const e: boolean = a.greaterThanOrEqual({ low: 0, high: 0 }); - } - - namespace compareTests { - const a = new math.Long(); - const b: number = a.compare(new math.Long()); - const c: number = a.compare(1); - const d: number = a.compare("1"); - const e: number = a.compare({ low: 0, high: 0 }); - } - - namespace negate { - const a: adone.math.Long = new math.Long().negate(); - } - - namespace add { - const a = new math.Long(); - const b: adone.math.Long = a.add(new math.Long()); - const c: adone.math.Long = a.add(1); - const d: adone.math.Long = a.add("1"); - const e: adone.math.Long = a.add({ low: 0, high: 0 }); - } - - namespace sub { - const a = new math.Long(); - const b: adone.math.Long = a.sub(new math.Long()); - const c: adone.math.Long = a.sub(1); - const d: adone.math.Long = a.sub("1"); - const e: adone.math.Long = a.sub({ low: 0, high: 0 }); - } - - namespace mul { - const a = new math.Long(); - const b: adone.math.Long = a.mul(new math.Long()); - const c: adone.math.Long = a.mul(1); - const d: adone.math.Long = a.mul("1"); - const e: adone.math.Long = a.mul({ low: 0, high: 0 }); - } - - namespace div { - const a = new math.Long(); - const b: adone.math.Long = a.div(new math.Long()); - const c: adone.math.Long = a.div(1); - const d: adone.math.Long = a.div("1"); - const e: adone.math.Long = a.div({ low: 0, high: 0 }); - } - - namespace mod { - const a = new math.Long(); - const b: adone.math.Long = a.mod(new math.Long()); - const c: adone.math.Long = a.mod(1); - const d: adone.math.Long = a.mod("1"); - const e: adone.math.Long = a.mod({ low: 0, high: 0 }); - } - - namespace not { - const a: adone.math.Long = new math.Long().not(); - } - - namespace and { - const a = new math.Long(); - const b: adone.math.Long = a.and(new math.Long()); - const c: adone.math.Long = a.and(1); - const d: adone.math.Long = a.and("1"); - const e: adone.math.Long = a.and({ low: 0, high: 0 }); - } - - namespace or { - const a = new math.Long(); - const b: adone.math.Long = a.or(new math.Long()); - const c: adone.math.Long = a.or(1); - const d: adone.math.Long = a.or("1"); - const e: adone.math.Long = a.or({ low: 0, high: 0 }); - } - - namespace xor { - const a = new math.Long(); - const b: adone.math.Long = a.xor(new math.Long()); - const c: adone.math.Long = a.xor(1); - const d: adone.math.Long = a.xor("1"); - const e: adone.math.Long = a.xor({ low: 0, high: 0 }); - } - - namespace shl { - const a = new math.Long(); - const b: adone.math.Long = a.shl(new math.Long()); - const c: adone.math.Long = a.shl(1); - } - - namespace shr { - const a = new math.Long(); - const b: adone.math.Long = a.shr(new math.Long()); - const c: adone.math.Long = a.shr(1); - } - - namespace shru { - const a = new math.Long(); - const b: adone.math.Long = a.shr(new math.Long()); - const c: adone.math.Long = a.shr(1); - } - - namespace toSigned { - const a: adone.math.Long = new math.Long().toSigned(); - } - - namespace toUnsigned { - const a: adone.math.Long = new math.Long().toUnsigned(); - } - - namespace toBytes { - const a: number[] = new math.Long().toBytes(); - } - - namespace toBytesLE { - const a: number[] = new math.Long().toBytesLE(); - } - - namespace static { - namespace fromInt { - const a: adone.math.Long = math.Long.fromInt(123); - const b: adone.math.Long = math.Long.fromInt(123, true); - } - - namespace fromNumber { - const a: adone.math.Long = math.Long.fromNumber(123); - const b: adone.math.Long = math.Long.fromNumber(123, true); - } - - namespace fromBits { - const a: adone.math.Long = math.Long.fromBits(0, 0); - const b: adone.math.Long = math.Long.fromBits(123, 0, true); - } - - namespace fromString { - const a: adone.math.Long = math.Long.fromString("123"); - const b: adone.math.Long = math.Long.fromString("123", true); - const c: adone.math.Long = math.Long.fromString("123", 16); - const d: adone.math.Long = math.Long.fromString("123", true, 16); - } - - namespace fromValue { - const a: adone.math.Long = math.Long.fromValue(new math.Long()); - const b: adone.math.Long = math.Long.fromValue(1); - const c: adone.math.Long = math.Long.fromValue("1"); - const e: adone.math.Long = math.Long.fromValue({ low: 0, high: 0 }); - } - - namespace constants { - const a: adone.math.Long = math.Long.MIN_VALUE; - const b: adone.math.Long = math.Long.MAX_VALUE; - const c: adone.math.Long = math.Long.MAX_UNSIGNED_VALUE; - const d: adone.math.Long = math.Long.ZERO; - const e: adone.math.Long = math.Long.UZERO; - const f: adone.math.Long = math.Long.ONE; - const g: adone.math.Long = math.Long.UONE; - const h: adone.math.Long = math.Long.NEG_ONE; - } - } - } - - namespace BigNumberTests { - const { BigNumber } = math; - type BigNumber = adone.math.BigNumber; - - new BigNumber(10); - new BigNumber("10"); - new BigNumber(new BigNumber(10)); - new BigNumber("10", 2); - - { const a: string = new BigNumber(1).toString(); } - { const a: string = new BigNumber(1).toString(2); } - - { const a: number = new BigNumber(1).toNumber(); } - - { const a: Buffer = new BigNumber(1).toBuffer(); } - { const a: Buffer = new BigNumber(1).toBuffer({}); } - { const a: Buffer = new BigNumber(1).toBuffer({ endian: 1 }); } - { const a: Buffer = new BigNumber(1).toBuffer({ endian: -1 }); } - { const a: Buffer = new BigNumber(1).toBuffer({ endian: "big" }); } - { const a: Buffer = new BigNumber(1).toBuffer({ endian: "little" }); } - { const a: Buffer = new BigNumber(1).toBuffer({ size: 1 }); } - { const a: Buffer = new BigNumber(1).toBuffer({ size: "auto" }); } - - { const a: BigNumber = new BigNumber(10).add(1); } - { const a: BigNumber = new BigNumber(10).add("1"); } - { const a: BigNumber = new BigNumber(10).add(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).sub(1); } - { const a: BigNumber = new BigNumber(10).sub("1"); } - { const a: BigNumber = new BigNumber(10).sub(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).mul(1); } - { const a: BigNumber = new BigNumber(10).mul("1"); } - { const a: BigNumber = new BigNumber(10).mul(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).div(1); } - { const a: BigNumber = new BigNumber(10).div("1"); } - { const a: BigNumber = new BigNumber(10).div(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).abs(); } - - { const a: BigNumber = new BigNumber(10).neg(); } - - { const a: number = new BigNumber(10).cmp(1); } - { const a: number = new BigNumber(10).cmp("1"); } - { const a: number = new BigNumber(10).cmp(new BigNumber(1)); } - - { const a: boolean = new BigNumber(10).gt(1); } - { const a: boolean = new BigNumber(10).gt("1"); } - { const a: boolean = new BigNumber(10).gt(new BigNumber(10)); } - - { const a: boolean = new BigNumber(10).ge(1); } - { const a: boolean = new BigNumber(10).ge("1"); } - { const a: boolean = new BigNumber(10).ge(new BigNumber(10)); } - - { const a: boolean = new BigNumber(10).eq(1); } - { const a: boolean = new BigNumber(10).eq("1"); } - { const a: boolean = new BigNumber(10).eq(new BigNumber(10)); } - - { const a: boolean = new BigNumber(10).lt(1); } - { const a: boolean = new BigNumber(10).lt("1"); } - { const a: boolean = new BigNumber(10).lt(new BigNumber(10)); } - - { const a: boolean = new BigNumber(10).le(1); } - { const a: boolean = new BigNumber(10).le("1"); } - { const a: boolean = new BigNumber(10).le(new BigNumber(10)); } - - { const a: BigNumber = new BigNumber(10).and(1); } - { const a: BigNumber = new BigNumber(10).and("1"); } - { const a: BigNumber = new BigNumber(10).and(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).or(1); } - { const a: BigNumber = new BigNumber(10).or("1"); } - { const a: BigNumber = new BigNumber(10).or(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).xor(1); } - { const a: BigNumber = new BigNumber(10).xor("1"); } - { const a: BigNumber = new BigNumber(10).xor(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).mod(1); } - { const a: BigNumber = new BigNumber(10).mod("1"); } - { const a: BigNumber = new BigNumber(10).mod(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).pow(1); } - { const a: BigNumber = new BigNumber(10).pow("1"); } - { const a: BigNumber = new BigNumber(10).pow(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).powm(1, 1); } - { const a: BigNumber = new BigNumber(10).powm("1", 1); } - { const a: BigNumber = new BigNumber(10).powm(new BigNumber(1), 1); } - { const a: BigNumber = new BigNumber(10).powm(1, "1"); } - { const a: BigNumber = new BigNumber(10).powm("1", "1"); } - { const a: BigNumber = new BigNumber(10).powm(new BigNumber(1), "1"); } - { const a: BigNumber = new BigNumber(10).powm(1, new BigNumber(1)); } - { const a: BigNumber = new BigNumber(10).powm("1", new BigNumber(1)); } - { const a: BigNumber = new BigNumber(10).powm(new BigNumber(1), new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).invertm(1); } - { const a: BigNumber = new BigNumber(10).invertm("1"); } - { const a: BigNumber = new BigNumber(10).invertm(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).rand(); } - { const a: BigNumber = new BigNumber(10).rand(1); } - { const a: BigNumber = new BigNumber(10).rand("1"); } - { const a: BigNumber = new BigNumber(10).rand(new BigNumber(1)); } - - { const a: boolean | "maybe" = new BigNumber(10).probPrime(); } - - { const a: BigNumber = new BigNumber(10).nextPrime(); } - - { const a: BigNumber = new BigNumber(10).sqrt(); } - - { const a: BigNumber = new BigNumber(10).root(1); } - { const a: BigNumber = new BigNumber(10).root("1"); } - { const a: BigNumber = new BigNumber(10).root(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).shiftLeft(1); } - { const a: BigNumber = new BigNumber(10).shiftLeft("1"); } - { const a: BigNumber = new BigNumber(10).shiftLeft(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).shiftRight(1); } - { const a: BigNumber = new BigNumber(10).shiftRight("1"); } - { const a: BigNumber = new BigNumber(10).shiftRight(new BigNumber(1)); } - - { const a: BigNumber = new BigNumber(10).gcd(1); } - { const a: BigNumber = new BigNumber(10).gcd("1"); } - { const a: BigNumber = new BigNumber(10).gcd(new BigNumber(1)); } - - { const a: number = new BigNumber(10).jacobi(1); } - { const a: number = new BigNumber(10).jacobi("1"); } - { const a: number = new BigNumber(10).jacobi(new BigNumber(1)); } - - { const a: number = new BigNumber(10).bitLength(); } - - { const a: boolean = new BigNumber(10).isBitSet(10); } - - { const a: BigNumber = BigNumber.prime(10); } - { const a: BigNumber = BigNumber.prime(10, true); } - - { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10)); } - { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { endian: "little" }); } - { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { endian: -1 }); } - { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { endian: 1 }); } - { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { endian: "big" }); } - { const a: BigNumber = BigNumber.fromBuffer(Buffer.alloc(10), { size: "auto" }); } - - { const a: BigNumber = BigNumber.ONE; } - { const a: BigNumber = BigNumber.ZERO; } - } - - namespace bitSetTests { - const { BitSet } = math; - type BitSet = adone.math.BitSet; - - new BitSet(10); - new BitSet(new BitSet(10).dehydrate()); - - { const a: boolean = new BitSet(10).get(0); } - { const a: boolean = new BitSet(10).set(0); } - { const a: boolean = new BitSet(10).setRange(0, 10); } - { const a: boolean = new BitSet(10).unset(0); } - { const a: boolean = new BitSet(10).unsetRange(0, 10); } - { const a: boolean = new BitSet(10).toggle(0); } - { const a: boolean = new BitSet(10).toggleRange(0, 10); } - { const a: boolean = new BitSet(10).clear(); } - { const a: BitSet = new BitSet(10).clone(); } - { const a: string = new BitSet(10).dehydrate(); } - - { const a: BitSet = new BitSet(10).and(1); } - { const a: BitSet = new BitSet(10).and(new BitSet(10)); } - - { const a: BitSet = new BitSet(10).or(1); } - { const a: BitSet = new BitSet(10).or(new BitSet(10)); } - - { const a: BitSet = new BitSet(10).xor(1); } - { const a: BitSet = new BitSet(10).xor(new BitSet(10)); } - - new BitSet(10).forEach((x: number) => {}); - new BitSet(10).forEach((x: number) => false); - - { const a: BitSet = new BitSet(10).circularShift(10); } - { const a: number = new BitSet(10).getCardinality(); } - { const a: number[] = new BitSet(10).getIndices(); } - { const a: boolean = new BitSet(10).isSubsetOf(new BitSet(10)); } - { const a: boolean = new BitSet(10).isEmpty(); } - { const a: boolean = new BitSet(10).isEqual(new BitSet(10)); } - { const a: string = new BitSet(10).toString(); } - { const a: number = new BitSet(10).ffs(); } - { const a: number = new BitSet(10).ffs(1); } - { const a: number = new BitSet(10).ffz(); } - { const a: number = new BitSet(10).ffz(1); } - { const a: number = new BitSet(10).fls(); } - { const a: number = new BitSet(10).fls(1); } - { const a: number = new BitSet(10).flz(); } - { const a: number = new BitSet(10).flz(1); } - { const a: number = new BitSet(10).nextSetBit(1); } - { const a: number = new BitSet(10).nextUnsetBit(1); } - { const a: number = new BitSet(10).previousSetBit(1); } - { const a: number = new BitSet(10).previousUnsetBit(1); } - { const a: number = new BitSet(10).readUInt(); } - { const a: number = new BitSet(10).readUInt(1); } - { const a: number = new BitSet(10).readUInt(1, 2); } - { new BitSet(10).writeUInt(1); } - { new BitSet(10).writeUInt(1, 2); } - { new BitSet(10).writeUInt(1, 2, 3); } - { const a: BitSet = BitSet.fromLong(new adone.math.Long(10, 20)); } - } + const { + math + } = adone; namespace randomTests { const { random } = math; @@ -471,4 +9,22 @@ namespace mathTests { random(100); random(0, 10); } + + namespace maxTests { + const { max } = math; + max([]); + { const a: number = max([1, 2, 3]); } + { const a: string = max(["1", "2", "3"]); } + { const a: string = max(["1", "2", "3"], (a) => a.length); } + { const a: number = max([1, 2, 3], (a) => a.toExponential()); } + } + + namespace minTests { + const { min } = math; + min([]); + { const a: number = min([1, 2, 3]); } + { const a: string = min(["1", "2", "3"]); } + { const a: string = min(["1", "2", "3"], (a) => a.length); } + { const a: number = min([1, 2, 3], (a) => a.toExponential()); } + } } diff --git a/types/adone/test/glosses/math/long.ts b/types/adone/test/glosses/math/long.ts new file mode 100644 index 0000000000..f0dfa0b7ec --- /dev/null +++ b/types/adone/test/glosses/math/long.ts @@ -0,0 +1,261 @@ +namespace mathTests.longTests { + const { + math: { + Long + } + } = adone; + + new Long(); + new Long(0); + new Long(0, 0); + new Long(0, 0, true); + + namespace toInt { + const a: number = new Long().toInt(); + } + + namespace toNumber { + const a: number = new Long().toNumber(); + } + + namespace toString { + const a: string = new Long().toString(); + const b: string = new Long().toString(16); + } + + namespace getHighBits { + const a: number = new Long().getHighBits(); + } + + namespace getLowBits { + const a: number = new Long().getLowBits(); + } + + namespace getLowBitsUnsigned { + const a: number = new Long().getLowBitsUnsigned(); + } + + namespace getHighBitsUnsigned { + const a: number = new Long().getHighBitsUnsigned(); + } + + namespace getNumBitsAbs { + const a: number = new Long().getNumBitsAbs(); + } + + namespace isZero { + const a: boolean = new Long().isZero(); + } + + namespace isNegative { + const a: boolean = new Long().isNegative(); + } + + namespace isPositive { + const a: boolean = new Long().isPositive(); + } + + namespace isOdd { + const a: boolean = new Long().isOdd(); + } + + namespace isEven { + const a: boolean = new Long().isEven(); + } + + namespace equals { + const a = new Long(); + const b: boolean = a.equals(new Long()); + const c: boolean = a.equals(1); + const d: boolean = a.equals("1"); + const e: boolean = a.equals({ low: 0, high: 0 }); + } + + namespace lessThan { + const a = new Long(); + const b: boolean = a.lessThan(new Long()); + const c: boolean = a.lessThan(1); + const d: boolean = a.lessThan("1"); + const e: boolean = a.lessThan({ low: 0, high: 0 }); + } + + namespace lessThanOrEqual { + const a = new Long(); + const b: boolean = a.lessThanOrEqual(new Long()); + const c: boolean = a.lessThanOrEqual(1); + const d: boolean = a.lessThanOrEqual("1"); + const e: boolean = a.lessThanOrEqual({ low: 0, high: 0 }); + } + + namespace greaterThan { + const a = new Long(); + const b: boolean = a.greaterThan(new Long()); + const c: boolean = a.greaterThan(1); + const d: boolean = a.greaterThan("1"); + const e: boolean = a.greaterThan({ low: 0, high: 0 }); + } + + namespace greaterThanOrEqual { + const a = new Long(); + const b: boolean = a.greaterThanOrEqual(new Long()); + const c: boolean = a.greaterThanOrEqual(1); + const d: boolean = a.greaterThanOrEqual("1"); + const e: boolean = a.greaterThanOrEqual({ low: 0, high: 0 }); + } + + namespace compareTests { + const a = new Long(); + const b: number = a.compare(new Long()); + const c: number = a.compare(1); + const d: number = a.compare("1"); + const e: number = a.compare({ low: 0, high: 0 }); + } + + namespace negate { + const a: adone.math.Long = new Long().negate(); + } + + namespace add { + const a = new Long(); + const b: adone.math.Long = a.add(new Long()); + const c: adone.math.Long = a.add(1); + const d: adone.math.Long = a.add("1"); + const e: adone.math.Long = a.add({ low: 0, high: 0 }); + } + + namespace sub { + const a = new Long(); + const b: adone.math.Long = a.sub(new Long()); + const c: adone.math.Long = a.sub(1); + const d: adone.math.Long = a.sub("1"); + const e: adone.math.Long = a.sub({ low: 0, high: 0 }); + } + + namespace mul { + const a = new Long(); + const b: adone.math.Long = a.mul(new Long()); + const c: adone.math.Long = a.mul(1); + const d: adone.math.Long = a.mul("1"); + const e: adone.math.Long = a.mul({ low: 0, high: 0 }); + } + + namespace div { + const a = new Long(); + const b: adone.math.Long = a.div(new Long()); + const c: adone.math.Long = a.div(1); + const d: adone.math.Long = a.div("1"); + const e: adone.math.Long = a.div({ low: 0, high: 0 }); + } + + namespace mod { + const a = new Long(); + const b: adone.math.Long = a.mod(new Long()); + const c: adone.math.Long = a.mod(1); + const d: adone.math.Long = a.mod("1"); + const e: adone.math.Long = a.mod({ low: 0, high: 0 }); + } + + namespace not { + const a: adone.math.Long = new Long().not(); + } + + namespace and { + const a = new Long(); + const b: adone.math.Long = a.and(new Long()); + const c: adone.math.Long = a.and(1); + const d: adone.math.Long = a.and("1"); + const e: adone.math.Long = a.and({ low: 0, high: 0 }); + } + + namespace or { + const a = new Long(); + const b: adone.math.Long = a.or(new Long()); + const c: adone.math.Long = a.or(1); + const d: adone.math.Long = a.or("1"); + const e: adone.math.Long = a.or({ low: 0, high: 0 }); + } + + namespace xor { + const a = new Long(); + const b: adone.math.Long = a.xor(new Long()); + const c: adone.math.Long = a.xor(1); + const d: adone.math.Long = a.xor("1"); + const e: adone.math.Long = a.xor({ low: 0, high: 0 }); + } + + namespace shl { + const a = new Long(); + const b: adone.math.Long = a.shl(new Long()); + const c: adone.math.Long = a.shl(1); + } + + namespace shr { + const a = new Long(); + const b: adone.math.Long = a.shr(new Long()); + const c: adone.math.Long = a.shr(1); + } + + namespace shru { + const a = new Long(); + const b: adone.math.Long = a.shr(new Long()); + const c: adone.math.Long = a.shr(1); + } + + namespace toSigned { + const a: adone.math.Long = new Long().toSigned(); + } + + namespace toUnsigned { + const a: adone.math.Long = new Long().toUnsigned(); + } + + namespace toBytes { + const a: number[] = new Long().toBytes(); + } + + namespace toBytesLE { + const a: number[] = new Long().toBytesLE(); + } + + namespace static { + namespace fromInt { + const a: adone.math.Long = Long.fromInt(123); + const b: adone.math.Long = Long.fromInt(123, true); + } + + namespace fromNumber { + const a: adone.math.Long = Long.fromNumber(123); + const b: adone.math.Long = Long.fromNumber(123, true); + } + + namespace fromBits { + const a: adone.math.Long = Long.fromBits(0, 0); + const b: adone.math.Long = Long.fromBits(123, 0, true); + } + + namespace fromString { + const a: adone.math.Long = Long.fromString("123"); + const b: adone.math.Long = Long.fromString("123", true); + const c: adone.math.Long = Long.fromString("123", 16); + const d: adone.math.Long = Long.fromString("123", true, 16); + } + + namespace fromValue { + const a: adone.math.Long = Long.fromValue(new Long()); + const b: adone.math.Long = Long.fromValue(1); + const c: adone.math.Long = Long.fromValue("1"); + const e: adone.math.Long = Long.fromValue({ low: 0, high: 0 }); + } + + namespace constants { + const a: adone.math.Long = Long.MIN_VALUE; + const b: adone.math.Long = Long.MAX_VALUE; + const c: adone.math.Long = Long.MAX_UNSIGNED_VALUE; + const d: adone.math.Long = Long.ZERO; + const e: adone.math.Long = Long.UZERO; + const f: adone.math.Long = Long.ONE; + const g: adone.math.Long = Long.UONE; + const h: adone.math.Long = Long.NEG_ONE; + } + } +} diff --git a/types/adone/test/glosses/regex.ts b/types/adone/test/glosses/regex.ts index 7aab1e0d8d..2acf6cc24e 100644 --- a/types/adone/test/glosses/regex.ts +++ b/types/adone/test/glosses/regex.ts @@ -7,7 +7,11 @@ namespace adoneTests.regex { regex.filename().test("a"); regex.idn().test("a"); regex.ip4().test("a"); + regex.ip4({ exact: true }).test("a"); regex.ip6().test("a"); + regex.ip6({ exact: true }).test("a"); + regex.ip().test("a"); + regex.ip({ exact: true }).test("a"); regex.protocol().test("a"); regex.punycode().test("a"); regex.shebang().test("a"); diff --git a/types/adone/test/index.ts b/types/adone/test/index.ts index ac012b9535..c97886c1e0 100644 --- a/types/adone/test/index.ts +++ b/types/adone/test/index.ts @@ -54,4 +54,20 @@ namespace AdoneRootTests { obj = adone.package; { const a: typeof adone.assertion.assert = adone.assert; } { const a: typeof adone.assertion.expect = adone.expect; } + + namespace lodashTests { + adone.lodash.get({}, "a"); + adone.lodash.defaults({}, {}); + adone.lodash.zip([]); + } + + namespace benchmarkTests { + const b = new adone.benchmark.Benchmark.Suite(); + b.add(() => {}).add("", () => {}).run(); + } + + namespace asyncTests { + adone.async.all([], () => {}); + adone.async.forEach([], () => {}); + } } diff --git a/types/adone/tsconfig.json b/types/adone/tsconfig.json index 6e6b3fe1c3..3f02029dcc 100644 --- a/types/adone/tsconfig.json +++ b/types/adone/tsconfig.json @@ -22,6 +22,8 @@ "files": [ "adone-tests.ts", "adone.d.ts", + "async.d.ts", + "benchmark.d.ts", "glosses/archives.d.ts", "glosses/assertion.d.ts", "glosses/collections/array_set.d.ts", @@ -43,7 +45,7 @@ "glosses/collections/refcounted_cache.d.ts", "glosses/collections/set.d.ts", "glosses/collections/stack.d.ts", - "glosses/collections/timedout_map.d.ts", + "glosses/collections/time_map.d.ts", "glosses/compressors.d.ts", "glosses/crypto/asn1.d.ts", "glosses/crypto/ed25519.d.ts", @@ -57,7 +59,11 @@ "glosses/fast.d.ts", "glosses/fs.d.ts", "glosses/is.d.ts", + "glosses/math/bignumber.d.ts", + "glosses/math/bitset.d.ts", + "glosses/math/decimal.d.ts", "glosses/math/index.d.ts", + "glosses/math/long.d.ts", "glosses/math/matrix.d.ts", "glosses/math/simd.d.ts", "glosses/meta.d.ts", @@ -110,7 +116,7 @@ "test/glosses/collections/refcounted_cache.ts", "test/glosses/collections/set.ts", "test/glosses/collections/stack.ts", - "test/glosses/collections/timedout_map.ts", + "test/glosses/collections/time_map.ts", "test/glosses/compressors.ts", "test/glosses/crypto/asn1.ts", "test/glosses/crypto/ed25519.ts", @@ -123,7 +129,11 @@ "test/glosses/fast.ts", "test/glosses/fs.ts", "test/glosses/is.ts", + "test/glosses/math/bignumber.ts", + "test/glosses/math/bitset.ts", + "test/glosses/math/decimal.ts", "test/glosses/math/index.ts", + "test/glosses/math/long.ts", "test/glosses/math/matrix.ts", "test/glosses/math/simd.ts", "test/glosses/meta.ts", diff --git a/types/aframe/index.d.ts b/types/aframe/index.d.ts index 803318a754..0da1ed0ef5 100644 --- a/types/aframe/index.d.ts +++ b/types/aframe/index.d.ts @@ -16,16 +16,13 @@ declare var AFRAME: AFrame.AFrameGlobal; declare var hasNativeWebVRImplementation: boolean; -interface NodeSelector { - querySelector(selectors: 'a-scene'): AFrame.Scene; +interface Document { + createElement(tagName: string): AFrame.Entity; + querySelector(selectors: 'a-scene'): AFrame.Scene; querySelector>(selectors: string): T; querySelectorAll(selectors: string): NodeListOf | Element>; } -interface Document { - createElement(tagName: string): AFrame.Entity; -} - // Interfaces declare namespace AFrame { interface ObjectMap { diff --git a/types/agenda/agenda-tests.ts b/types/agenda/agenda-tests.ts index bbf945bd62..a7031d2ef8 100644 --- a/types/agenda/agenda-tests.ts +++ b/types/agenda/agenda-tests.ts @@ -5,8 +5,8 @@ var mongoConnectionString = "mongodb://127.0.0.1/agenda"; var agenda = new Agenda({ db: { address: mongoConnectionString } }); -agenda.define('delete old users', (job, done) => { - +agenda.define<{ foo: Error }>('delete old users', (job, done) => { + done(job.attrs.data.foo) }); agenda.on('ready', () => { @@ -62,7 +62,7 @@ agenda.schedule('tomorrow at noon', ['printAnalyticsReport', 'sendNotifications' agenda.now('do the hokey pokey'); -var job = agenda.create('printAnalyticsReport', { userCount: 100 }); +var job = agenda.create<{ userCount: number }>('printAnalyticsReport', { userCount: 100 }); job.save(function(err) { console.log("Job successfully saved"); }); diff --git a/types/agenda/index.d.ts b/types/agenda/index.d.ts index 12b0b76c38..b29158983d 100644 --- a/types/agenda/index.d.ts +++ b/types/agenda/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for Agenda v1.0.0 -// Project: https://github.com/rschmukler/agenda +// Type definitions for Agenda v1.0.3 +// Project: https://github.com/agenda/agenda // Definitions by: Meir Gottlieb +// Jeff Principe // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -89,14 +90,14 @@ declare class Agenda extends EventEmitter { * @param name The name of the job. * @param data Data to associated with the job. */ - create(name: string, data?: any): Agenda.Job; + create(name: string, data?: T): Agenda.Job; /** * Find all Jobs matching `query` and pass same back in cb(). * @param query * @param cb */ - jobs(query: any, cb: ResultCallback): void; + jobs(query: any, cb: ResultCallback[]>): void; /** * Removes all jobs in the database without defined behaviors. Useful if you change a definition name and want @@ -113,8 +114,8 @@ declare class Agenda extends EventEmitter { * @param options The options for the job. * @param handler The handler to execute. */ - define(name: string, handler: (job: Agenda.Job, done: (err?: Error) => void) => void): void; - define(name: string, options: Agenda.JobOptions, handler: (job: Agenda.Job, done: (err?: Error) => void) => void): void; + define(name: string, handler: (job: Agenda.Job, done: (err?: Error) => void) => void): void; + define(name: string, options: Agenda.JobOptions, handler: (job: Agenda.Job, done: (err?: Error) => void) => void): void; /** * Runs job name at the given interval. Optionally, data and options can be passed in. @@ -124,8 +125,8 @@ declare class Agenda extends EventEmitter { * @param options An optional argument that will be passed to job.repeatEvery. * @param cb An optional callback function which will be called when the job has been persisted in the database. */ - every(interval: number | string, names: string, data?: any, options?: any, cb?: ResultCallback): Agenda.Job; - every(interval: number | string, names: string[], data?: any, options?: any, cb?: ResultCallback): Agenda.Job[]; + every(interval: number | string, names: string, data?: T, options?: any, cb?: ResultCallback>): Agenda.Job; + every(interval: number | string, names: string[], data?: T, options?: any, cb?: ResultCallback[]>): Agenda.Job[]; /** * Schedules a job to run name once at a given time. @@ -134,8 +135,8 @@ declare class Agenda extends EventEmitter { * @param data An optional argument that will be passed to the processing function under job.attrs.data. * @param cb An optional callback function which will be called when the job has been persisted in the database. */ - schedule(when: Date | string, names: string, data?: any, cb?: ResultCallback): Agenda.Job; - schedule(when: Date | string, names: string[], data?: any, cb?: ResultCallback): Agenda.Job[]; + schedule(when: Date | string, names: string, data?: T, cb?: ResultCallback>): Agenda.Job; + schedule(when: Date | string, names: string[], data?: T, cb?: ResultCallback[]>): Agenda.Job[]; /** * Schedules a job to run name once immediately. @@ -143,7 +144,7 @@ declare class Agenda extends EventEmitter { * @param data An optional argument that will be passed to the processing function under job.attrs.data. * @param cb An optional callback function which will be called when the job has been persisted in the database. */ - now(name: string, data?: any, cb?: ResultCallback): Agenda.Job; + now(name: string, data?: T, cb?: ResultCallback>): Agenda.Job; /** * Cancels any jobs matching the passed mongodb-native query, and removes them from the database. @@ -242,10 +243,14 @@ declare namespace Agenda { } } + interface JobAttributesData { + [key: string]: any; + } + /** * The database record associated with a job. */ - interface JobAttributes { + interface JobAttributes { /** * The record identity. */ @@ -264,7 +269,7 @@ declare namespace Agenda { /** * The job details. */ - data: { [name: string]: any }; + data: T; /** * The priority of the job. @@ -330,12 +335,12 @@ declare namespace Agenda { /** * A scheduled job. */ - interface Job { + interface Job { /** * The database record associated with the job. */ - attrs: JobAttributes; + attrs: JobAttributes; /** * The agenda that created the job. @@ -348,54 +353,54 @@ declare namespace Agenda { * @param options An optional argument that can include a timezone field. The timezone should be a string as * accepted by moment-timezone and is considered when using an interval in the cron string format. */ - repeatEvery(interval: string | number, options?: { timezone?: string }): Job + repeatEvery(interval: string | number, options?: { timezone?: string }): Job /** * Specifies a time when the job should repeat. [Possible values](https://github.com/matthewmueller/date#examples). * @param time */ - repeatAt(time: string): Job + repeatAt(time: string): Job /** * Disables the job. */ - disable(): Job; + disable(): Job; /** * Enables the job. */ - enable(): Job; + enable(): Job; /** * Ensure that only one instance of this job exists with the specified properties * @param value The properties associated with the job that must be unqiue. * @param opts */ - unique(value: any, opts?: { insertOnly?: boolean }): Job; + unique(value: any, opts?: { insertOnly?: boolean }): Job; /** * Specifies the next time at which the job should run. * @param time The next time at which the job should run. */ - schedule(time: string | Date): Job; + schedule(time: string | Date): Job; /** * Specifies the priority weighting of the job. * @param value The priority of the job (lowest|low|normal|high|highest|number). */ - priority(value: string | number): Job; + priority(value: string | number): Job; /** * Sets job.attrs.failedAt to now, and sets job.attrs.failReason to reason. * @param reason A message or Error object that indicates why the job failed. */ - fail(reason: string | Error): Job; + fail(reason: string | Error): Job; /** * Runs the given job and calls callback(err, job) upon completion. Normally you never need to call this manually * @param cb Called when the job is completed. */ - run(cb?: ResultCallback): Job; + run(cb?: ResultCallback>): Job; /** * Returns true if the job is running; otherwise, returns false. @@ -406,7 +411,7 @@ declare namespace Agenda { * Saves the job into the database. * @param cb Called when the job is saved. */ - save(cb?: ResultCallback): Job; + save(cb?: ResultCallback>): Job; /** * Removes the job from the database and cancels the job. @@ -424,7 +429,7 @@ declare namespace Agenda { /** * Calculates next time the job should run */ - computeNextRunAt(): Job; + computeNextRunAt(): Job; } interface JobOptions { diff --git a/types/algoliasearch/index.d.ts b/types/algoliasearch/index.d.ts index 5c7026d70e..3304ad579d 100644 --- a/types/algoliasearch/index.d.ts +++ b/types/algoliasearch/index.d.ts @@ -805,11 +805,7 @@ declare namespace algoliasearch { * @param err() error callback * https://www.algolia.com/doc/api-reference/api-methods/search-for-facet-values/ */ - searchForFacetValues({ - facetName, - facetQuery, - ...qp, - }: { + searchForFacetValues(options: { facetName: string; facetQuery: string; } & AlgoliaQueryParameters): Promise; @@ -820,12 +816,7 @@ declare namespace algoliasearch { * @param err() error callback * https://www.algolia.com/doc/api-reference/api-methods/search-for-facet-values/ */ - searchForFacetValues( - { - facetName, - facetQuery, - ...qp, - }: { + searchForFacetValues(options: { facetName: string; facetQuery: string; } & AlgoliaQueryParameters, diff --git a/types/amp-message/amp-message-tests.ts b/types/amp-message/amp-message-tests.ts new file mode 100644 index 0000000000..003949f3b7 --- /dev/null +++ b/types/amp-message/amp-message-tests.ts @@ -0,0 +1,57 @@ +import Message = require('amp-message'); + +// $ExpectType Message +new Message(new Buffer('aaa')); + +// $ExpectType Message +new Message([new Buffer('aaa'), new Buffer('bbb')]); + +const message = new Message([new Buffer('aaa'), new Buffer('bbb')]); + +// $ExpectType string +message.inspect(); + +// $ExpectType Buffer +message.toBuffer(); + +// $ExpectType number +message.push(new Buffer('ccc')); + +// $ExpectType Buffer | undefined +message.pop(); + +// $ExpectType Buffer | undefined +message.shift(); + +// $ExpectType number +message.unshift(new Buffer('ddd')); + +// $ExpectError +new Message(); + +// $ExpectError +new Message(1); + +// $ExpectError +new Message({}); + +// $ExpectError +new Message('aaa'); + +// $ExpectError +message.push(1); + +// $ExpectError +message.push({}); + +// $ExpectError +message.push('aaa'); + +// $ExpectError +message.unshift(1); + +// $ExpectError +message.unshift({}); + +// $ExpectError +message.unshift('aaa'); diff --git a/types/amp-message/index.d.ts b/types/amp-message/index.d.ts new file mode 100644 index 0000000000..f1ca520ae7 --- /dev/null +++ b/types/amp-message/index.d.ts @@ -0,0 +1,25 @@ +// Type definitions for amp-message 0.1 +// Project: https://github.com/visionmedia/node-amp-message +// Definitions by: Vilim Stubičan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + +declare class Message { + constructor(args: Buffer | Buffer[]); + + inspect(): string; + + toBuffer(): Buffer; + + push(...items: Buffer[]): number; + + pop(): Buffer | undefined; + + shift(): Buffer | undefined; + + unshift(...items: Buffer[]): number; +} + +export = Message; diff --git a/types/amp-message/tsconfig.json b/types/amp-message/tsconfig.json new file mode 100644 index 0000000000..7b1826a6d8 --- /dev/null +++ b/types/amp-message/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "amp-message-tests.ts" + ] +} diff --git a/types/colors/tslint.json b/types/amp-message/tslint.json similarity index 100% rename from types/colors/tslint.json rename to types/amp-message/tslint.json diff --git a/types/amp/amp-tests.ts b/types/amp/amp-tests.ts new file mode 100644 index 0000000000..1e17bc8507 --- /dev/null +++ b/types/amp/amp-tests.ts @@ -0,0 +1,44 @@ +import { decode, encode, Stream } from 'amp'; + +// $ExpectType Buffer[] +decode(new Buffer('something')); + +// $ExpectType Buffer +encode([new Buffer('something'), new Buffer('something')]); + +// $ExpectError +decode(''); + +// $ExpectError +decode(1); + +// $ExpectError +decode(); + +// $ExpectError +encode(''); + +// $ExpectError +encode(1); + +// $ExpectError +encode(); + +// $ExpectType Stream +new Stream({}); + +// $ExpectType Stream +new Stream({ + highWaterMark: 1, + decodeStrings: true, + objectMode: true, + destroy: (error?: Error) => { + return 'handle error'; + }, + final: (callback: (error?: Error) => void) => { + // do nothing + } +}); + +// $ExpectError +new Stream({somethingNoneExisting: true}); diff --git a/types/amp/index.d.ts b/types/amp/index.d.ts new file mode 100644 index 0000000000..99b9fc7f45 --- /dev/null +++ b/types/amp/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for amp 0.3 +// Project: https://github.com/visionmedia/node-amp +// Definitions by: Vilim Stubičan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + +import * as stream from 'stream'; + +export function decode(buf: Buffer): Buffer[]; + +export function encode(args: Buffer[]): Buffer; + +export class Stream extends stream.Writable { + constructor(opts: stream.WritableOptions); + + _write(chunk: any, encoding: string, fn: () => void): void; +} diff --git a/types/amp/tsconfig.json b/types/amp/tsconfig.json new file mode 100644 index 0000000000..4bb6a171ad --- /dev/null +++ b/types/amp/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "amp-tests.ts" + ] +} diff --git a/types/amp/tslint.json b/types/amp/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/amp/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/amqplib/index.d.ts b/types/amqplib/index.d.ts index 25b0ef04e9..269ed0112e 100644 --- a/types/amqplib/index.d.ts +++ b/types/amqplib/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for amqplib 0.5 // Project: https://github.com/squaremo/amqp.node -// Definitions by: Michael Nahkies , Ab Reitsma , Nicolás Fantone +// Definitions by: Michael Nahkies , Ab Reitsma , Nicolás Fantone , Nick Zelei // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 diff --git a/types/amqplib/properties.d.ts b/types/amqplib/properties.d.ts index af90909d8c..9f96b14f5c 100644 --- a/types/amqplib/properties.d.ts +++ b/types/amqplib/properties.d.ts @@ -141,6 +141,52 @@ export namespace Options { export interface Message { content: Buffer; - fields: any; - properties: any; + fields: MessageFields; + properties: MessageProperties; +} + +export interface MessageFields { + deliveryTag: number; + redelivered: boolean; + exchange: string; + routingKey: string; + messageCount: string; +} + +export interface MessageProperties { + contentType: any | undefined; + contentEncoding: any | undefined; + headers: MessagePropertyHeaders; + deliveryMode: any | undefined; + priority: any | undefined; + correlationId: any | undefined; + replyTo: any | undefined; + expiration: any | undefined; + messageId: any | undefined; + timestamp: any | undefined; + type: any | undefined; + userId: any | undefined; + appId: any | undefined; + clusterId: any | undefined; +} + +export interface MessagePropertyHeaders { + "x-first-death-exchange"?: string; + "x-first-death-queue"?: string; + "x-first-death-reason"?: string; + "x-death"?: XDeath[]; + [key: string]: any; +} + +export interface XDeath { + count: number; + reason: "rejected" | "expired" | "maxlen"; + queue: string; + time: { + "!": "timestamp"; + value: number; + }; + exchange: string; + "original-expiration"?: any; + "routing-keys": string[]; } diff --git a/types/angular-material/angular-material-tests.ts b/types/angular-material/angular-material-tests.ts index ad79cff2db..f29de44222 100644 --- a/types/angular-material/angular-material-tests.ts +++ b/types/angular-material/angular-material-tests.ts @@ -8,7 +8,8 @@ myApp.config(( $mdAriaProvider: ng.material.IAriaProvider, $mdThemingProvider: ng.material.IThemingProvider, $mdIconProvider: ng.material.IIconProvider, - $mdProgressCircularProvider: ng.material.IProgressCircularProvider) => { + $mdProgressCircularProvider: ng.material.IProgressCircularProvider, + $mdDialogProvider: ng.material.IDialogProvider) => { $mdThemingProvider.alwaysWatchTheme(true); const neonRedMap: ng.material.IPalette = $mdThemingProvider.extendPalette('red', { 500: 'ff0000' @@ -56,6 +57,23 @@ myApp.config(( // Globally disables all ARIA warnings. $mdAriaProvider.disableWarnings(); + + // Add custom dialog preset + $mdDialogProvider.addPreset('testPreset', { + methods: ['entityName'], + options: () => { + return { + template: + '' + + 'This is a custom preset' + + '', + controllerAs: 'dialog', + bindToController: true, + clickOutsideToClose: true, + escapeToClose: true + }; + } + }); }); myApp.controller('BottomSheetController', ($scope: TestScope, $mdBottomSheet: ng.material.IBottomSheetService, $q: ng.IQService) => { @@ -192,6 +210,11 @@ myApp.controller('DialogController', ($scope: TestScope, $mdDialog: ng.material. onComplete: (scope, element) => { }, onRemoving: (element, removePromise) => { }, }); + + // Show custom dialog preset + $mdDialog.show( + $mdDialog['testPreset']().entityName('Product #6') + ); }); class IconDirective implements ng.IDirective { diff --git a/types/angular-material/index.d.ts b/types/angular-material/index.d.ts index d77f5ae7ce..6885916e8a 100644 --- a/types/angular-material/index.d.ts +++ b/types/angular-material/index.d.ts @@ -125,6 +125,11 @@ declare module 'angular' { } interface IDialogService { + // indexer used to call preset dialog created with $mdDialogProvider + // see: https://material.angularjs.org/latest/api/service/$mdDialog#custom-presets + // tslint:disable-next-line:ban-types + [presetName: string]: Function; + show(dialog: IDialogOptions | IAlertDialog | IConfirmDialog | IPromptDialog): IPromise; confirm(): IConfirmDialog; alert(): IAlertDialog; @@ -133,6 +138,10 @@ declare module 'angular' { cancel(response?: any): void; } + interface IDialogProvider { + addPreset(presetName: string, presetOptions: { methods?: ReadonlyArray, options: () => IDialogOptions }): IDialogProvider; + } + type IIcon = (id: string) => IPromise; // id is a unique ID or URL interface IIconProvider { @@ -223,7 +232,7 @@ declare module 'angular' { contrastDefaultColor?: string; contrastDarkColors?: string | string[]; contrastLightColors?: string | string[]; - contrastStrongLightColors?: string|string[]; + contrastStrongLightColors?: string | string[]; } interface IThemeHues { diff --git a/types/angular-route/angular-route-tests.ts b/types/angular-route/angular-route-tests.ts index 4d596cdfdf..677c1589ed 100644 --- a/types/angular-route/angular-route-tests.ts +++ b/types/angular-route/angular-route-tests.ts @@ -40,7 +40,8 @@ $routeProvider } }) .otherwise({ redirectTo: '/' }) - .otherwise({ redirectTo: ($routeParams?: ng.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any) => "" }); + .otherwise({ redirectTo: ($routeParams?: ng.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any) => "" }) + .otherwise("/"); var current: ng.route.ICurrentRoute; diff --git a/types/angular-route/index.d.ts b/types/angular-route/index.d.ts index 29c59f955c..56bd3f2263 100644 --- a/types/angular-route/index.d.ts +++ b/types/angular-route/index.d.ts @@ -138,7 +138,7 @@ declare module 'angular' { * * @params Mapping information to be assigned to $route.current. */ - otherwise(params: IRoute): IRouteProvider; + otherwise(params: IRoute | string): IRouteProvider; /** * Adds a new route definition to the $route service. * diff --git a/types/aphrodite/aphrodite-tests.tsx b/types/aphrodite/aphrodite-tests.tsx index 685a9a4283..feb35c8c7c 100644 --- a/types/aphrodite/aphrodite-tests.tsx +++ b/types/aphrodite/aphrodite-tests.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { StyleSheet, css, StyleSheetServer, StyleSheetTestUtils } from "aphrodite"; +import { StyleSheet, css, StyleSheetServer, StyleSheetTestUtils, FontFamily } from "aphrodite"; const styles = StyleSheet.create({ red: { @@ -20,7 +20,7 @@ const styles = StyleSheet.create({ } }); -const coolFont = { +const coolFont: FontFamily = { fontFamily: "CoolFont", fontStyle: "normal", fontWeight: "normal", diff --git a/types/aphrodite/index.d.ts b/types/aphrodite/index.d.ts index 00d1908d9f..583e84e996 100644 --- a/types/aphrodite/index.d.ts +++ b/types/aphrodite/index.d.ts @@ -4,13 +4,36 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 -import * as React from "react"; +import * as CSS from "csstype"; + +type BaseCSSProperties = CSS.Properties; + +type FontFamily = + | BaseCSSProperties['fontFamily'] + | CSS.FontFace; + +// Replace with Exclude once on 2.8+ +type Diff = ( + & { [P in T]: P } + & { [P in U]: never } + & { [x: string]: never } +)[T]; +type Omit = Pick>; + +type CSSProperties = Omit & { + fontFamily?: FontFamily | FontFamily[]; +}; + +// For pseudo selectors and media queries +interface OpenCSSProperties extends CSSProperties { + [k: string]: CSSProperties[keyof CSSProperties] | CSSProperties; +} /** * Aphrodite style declaration */ export interface StyleDeclaration { - [key: string]: React.CSSProperties; + [key: string]: OpenCSSProperties; } interface StyleSheetStatic { diff --git a/types/aphrodite/package.json b/types/aphrodite/package.json new file mode 100644 index 0000000000..e6696d08e7 --- /dev/null +++ b/types/aphrodite/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "csstype": "^2.2.0" + } +} diff --git a/types/archiver/archiver-tests.ts b/types/archiver/archiver-tests.ts index 752d9cc944..dbb1df1de7 100644 --- a/types/archiver/archiver-tests.ts +++ b/types/archiver/archiver-tests.ts @@ -64,6 +64,6 @@ archiver.setModule(() => {}); archiver.pointer(); archiver.use(() => {}); -archiver.finalize().then(); +archiver.finalize(); archiver.symlink('./path', './target'); diff --git a/types/archiver/index.d.ts b/types/archiver/index.d.ts index df15f9ff65..d33e8ec6dd 100644 --- a/types/archiver/index.d.ts +++ b/types/archiver/index.d.ts @@ -35,7 +35,7 @@ declare namespace archiver { directory(dirpath: string, destpath: false | string, data?: EntryData | EntryDataFunction): this; file(filename: string, data: EntryData): this; glob(pattern: string, options?: glob.IOptions, data?: EntryData): this; - finalize(): Promise; + finalize(): void; setFormat(format: string): this; setModule(module: Function): this; diff --git a/types/array-unique/array-unique-tests.ts b/types/array-unique/array-unique-tests.ts new file mode 100644 index 0000000000..a854cab3bf --- /dev/null +++ b/types/array-unique/array-unique-tests.ts @@ -0,0 +1,9 @@ +import arrayUnique = require("array-unique"); + +arrayUnique([1, 1, 2, 3, 3]); + +arrayUnique(["foo", "foo", "bar", "foo"]); + +arrayUnique.immutable([1, 1, 2, 3, 3]); + +arrayUnique.immutable(["foo", "foo", "bar", "foo"]); diff --git a/types/array-unique/index.d.ts b/types/array-unique/index.d.ts new file mode 100644 index 0000000000..40d73a53de --- /dev/null +++ b/types/array-unique/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for array-unique 0.3 +// Project: https://github.com/jonschlinkert/array-unique +// Definitions by: Michaël St-Georges +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function arrayUnique(arr: T[]): T[]; + +declare namespace arrayUnique { + function immutable(arr: ReadonlyArray): T[]; +} + +export = arrayUnique; diff --git a/types/colors/tsconfig.json b/types/array-unique/tsconfig.json similarity index 87% rename from types/colors/tsconfig.json rename to types/array-unique/tsconfig.json index 99d78ad72d..9829c01906 100644 --- a/types/colors/tsconfig.json +++ b/types/array-unique/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es5" + "es6" ], "noImplicitAny": true, "noImplicitThis": true, @@ -18,7 +18,6 @@ }, "files": [ "index.d.ts", - "colors-tests.ts", - "safe.d.ts" + "array-unique-tests.ts" ] } \ No newline at end of file diff --git a/types/array-unique/tslint.json b/types/array-unique/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/array-unique/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/arrify/arrify-tests.ts b/types/arrify/arrify-tests.ts index 319e86897a..12995781bf 100644 --- a/types/arrify/arrify-tests.ts +++ b/types/arrify/arrify-tests.ts @@ -1,4 +1,4 @@ -import arrify = require("arrify"); +import * as arrify from 'arrify'; arrify(null); arrify(null); diff --git a/types/arrify/index.d.ts b/types/arrify/index.d.ts index a1dda1b9ec..43c06af05f 100644 --- a/types/arrify/index.d.ts +++ b/types/arrify/index.d.ts @@ -14,4 +14,5 @@ * arrify([2, 3]) // returns [2, 3] */ declare function arrify(val: undefined | null | T | T[]): T[]; +declare namespace arrify {} export = arrify; diff --git a/types/assets-webpack-plugin/index.d.ts b/types/assets-webpack-plugin/index.d.ts index 660fbc6052..7644d8f9ad 100644 --- a/types/assets-webpack-plugin/index.d.ts +++ b/types/assets-webpack-plugin/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/sporto/assets-webpack-plugin // Definitions by: Michael Strobel // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import * as webpack from 'webpack'; diff --git a/types/async-retry/async-retry-tests.ts b/types/async-retry/async-retry-tests.ts index 29c90b36c8..68327b66bd 100644 --- a/types/async-retry/async-retry-tests.ts +++ b/types/async-retry/async-retry-tests.ts @@ -1,4 +1,5 @@ -import { Options, RetryFunction, retry } from 'async-retry'; +import { Options, RetryFunction } from 'async-retry'; +import retry = require("async-retry"); const o: Options = { retries: 1, diff --git a/types/async-retry/index.d.ts b/types/async-retry/index.d.ts index 38d0d8aeec..a2f65e00a4 100644 --- a/types/async-retry/index.d.ts +++ b/types/async-retry/index.d.ts @@ -1,17 +1,25 @@ -// Type definitions for async-retry 1.1 +// Type definitions for async-retry 1.2 // Project: https://github.com/zeit/async-retry#readme // Definitions by: Albert Wu +// Pablo Rodríguez // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export function retry(fn: RetryFunction, opts: Options): Promise; +declare function AsyncRetry( + fn: AsyncRetry.RetryFunction, + opts: AsyncRetry.Options +): Promise; -export interface Options { - retries?: number; - factor?: number; - minTimeout?: number; - maxTimeout?: number; - randomize?: boolean; - onRetry?: (e: Error) => any; +declare namespace AsyncRetry { + interface Options { + retries?: number; + factor?: number; + minTimeout?: number; + maxTimeout?: number; + randomize?: boolean; + onRetry?: (e: Error) => any; + } + + type RetryFunction = (bail: (e: Error) => A, attempt: number) => A|Promise; } -export type RetryFunction = (bail: (e: Error) => A, attempt: number) => A|Promise; +export = AsyncRetry; diff --git a/types/async/index.d.ts b/types/async/index.d.ts index 17fecb467b..961dd73ebb 100644 --- a/types/async/index.d.ts +++ b/types/async/index.d.ts @@ -7,6 +7,7 @@ export as namespace async; export interface Dictionary { [key: string]: T; } +export type IterableCollection = T[] | IterableIterator | Dictionary export interface ErrorCallback { (err?: T): void; } export interface AsyncBooleanResultCallback { (err?: E, truthValue?: boolean): void; } @@ -36,11 +37,9 @@ export interface AsyncQueue { running(): number; idle(): boolean; concurrency: number; - push(task: T, callback?: ErrorCallback): void; + push(task: T | T[], callback?: ErrorCallback): void; push(task: T, callback?: AsyncResultCallback): void; - push(task: T[], callback?: ErrorCallback): void; - unshift(task: T, callback?: ErrorCallback): void; - unshift(task: T[], callback?: ErrorCallback): void; + unshift(task: T | T[], callback?: ErrorCallback): void; saturated: () => any; empty: () => any; drain: () => any; @@ -62,8 +61,7 @@ export interface AsyncPriorityQueue { concurrency: number; started: boolean; paused: boolean; - push(task: T, priority: number, callback?: AsyncResultArrayCallback): void; - push(task: T[], priority: number, callback?: AsyncResultArrayCallback): void; + push(task: T | T[], priority: number, callback?: AsyncResultArrayCallback): void; saturated: () => any; empty: () => any; drain: () => any; @@ -86,7 +84,6 @@ export interface AsyncCargo { length(): number; payload?: number; push(task: any, callback? : Function): void; - push(task: any[], callback? : Function): void; saturated(): void; empty(): void; drain(): void; @@ -97,39 +94,28 @@ export interface AsyncCargo { } // Collections -export function each(arr: T[] | IterableIterator, iterator: AsyncIterator, callback?: ErrorCallback): void; -export function each(arr: Dictionary, iterator: AsyncIterator, callback?: ErrorCallback): void; +export function each(arr: IterableCollection, iterator: AsyncIterator, callback?: ErrorCallback): void; export const eachSeries: typeof each; -export function eachLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncIterator, callback?: ErrorCallback): void; -export function eachLimit(arr: Dictionary, limit: number, iterator: AsyncIterator, callback?: ErrorCallback): void; +export function eachLimit(arr: IterableCollection, limit: number, iterator: AsyncIterator, callback?: ErrorCallback): void; export const forEach: typeof each; export const forEachSeries: typeof each; export const forEachLimit: typeof eachLimit; -export function forEachOf(obj: T[] | IterableIterator, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; -export function forEachOf(obj: Dictionary, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; +export function forEachOf(obj: IterableCollection, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; export const forEachOfSeries: typeof forEachOf; -export function forEachOfLimit(obj: T[] | IterableIterator, limit: number, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; -export function forEachOfLimit(obj: Dictionary, limit: number, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; +export function forEachOfLimit(obj: IterableCollection, limit: number, iterator: AsyncForEachOfIterator, callback?: ErrorCallback): void; export const eachOf: typeof forEachOf; export const eachOfSeries: typeof forEachOf; export const eachOfLimit: typeof forEachOfLimit; export function map(arr: T[] | IterableIterator, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; export function map(arr: Dictionary, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; export const mapSeries: typeof map; -export function mapLimit( - arr: T[] | Dictionary | IterableIterator, - limit: number, - iterator: AsyncResultIterator, - callback?: AsyncResultArrayCallback -): void; +export function mapLimit(arr: IterableCollection, limit: number, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; export function mapValuesLimit(obj: Dictionary, limit: number, iteratee: (value: T, key: string, callback: AsyncResultCallback) => void, callback: AsyncResultObjectCallback): void; export function mapValues(obj: Dictionary, iteratee: (value: T, key: string, callback: AsyncResultCallback) => void, callback: AsyncResultObjectCallback): void; export const mapValuesSeries: typeof mapValues; -export function filter(arr: T[] | IterableIterator, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; -export function filter(arr: Dictionary, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; +export function filter(arr: IterableCollection, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; export const filterSeries: typeof filter; -export function filterLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; -export function filterLimit(arr: Dictionary, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; +export function filterLimit(arr: IterableCollection, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultArrayCallback): void; export const select: typeof filter; export const selectSeries: typeof filter; export const selectLimit: typeof filterLimit; @@ -141,36 +127,28 @@ export const inject: typeof reduce; export const foldl: typeof reduce; export const reduceRight: typeof reduce; export const foldr: typeof reduce; -export function detect(arr: T[] | IterableIterator, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; -export function detect(arr: Dictionary, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; +export function detect(arr: IterableCollection, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; export const detectSeries: typeof detect; -export function detectLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; -export function detectLimit(arr: Dictionary, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; +export function detectLimit(arr: IterableCollection, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncResultCallback): void; export const find: typeof detect; export const findSeries: typeof detect; export const findLimit: typeof detectLimit; export function sortBy(arr: T[] | IterableIterator, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; -export function some(arr: T[] | IterableIterator, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; -export function some(arr: Dictionary, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; +export function some(arr: IterableCollection, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; export const someSeries: typeof some; -export function someLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; -export function someLimit(arr: Dictionary, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; +export function someLimit(arr: IterableCollection, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; export const any: typeof some; export const anySeries: typeof someSeries; export const anyLimit: typeof someLimit; -export function every(arr: T[] | IterableIterator, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; -export function every(arr: Dictionary, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; +export function every(arr: IterableCollection, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; export const everySeries: typeof every; -export function everyLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; -export function everyLimit(arr: Dictionary, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; +export function everyLimit(arr: IterableCollection, limit: number, iterator: AsyncBooleanIterator, callback?: AsyncBooleanResultCallback): void; export const all: typeof every; export const allSeries: typeof every; export const allLimit: typeof everyLimit; -export function concat(arr: T[] | IterableIterator, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; -export function concat(arr: Dictionary, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; -export function concatLimit(arr: T[] | IterableIterator, limit: number, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; -export function concatLimit(arr: Dictionary, limit: number,iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; +export function concat(arr: IterableCollection, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; +export function concatLimit(arr: IterableCollection, limit: number, iterator: AsyncResultIterator, callback?: AsyncResultArrayCallback): void; export const concatSeries: typeof concat; // Control Flow @@ -190,8 +168,8 @@ export function forever(next: (next : ErrorCallback) => void, errBack: Err export function waterfall(tasks: Function[], callback?: AsyncResultCallback): void; export function compose(...fns: Function[]): Function; export function seq(...fns: Function[]): Function; -export function applyEach(fns: Function[], argsAndCallback: any[]): void; // applyEach(fns, args..., callback). TS does not support ... for a middle argument. Callback is optional. -export function applyEachSeries(fns: Function[], argsAndCallback: any[]): void; // applyEachSeries(fns, args..., callback). TS does not support ... for a middle argument. Callback is optional. +export function applyEach(fns: Function[], ...argsAndCallback: any[]): void; // applyEach(fns, args..., callback). TS does not support ... for a middle argument. Callback is optional. +export function applyEachSeries(fns: Function[], ...argsAndCallback: any[]): void; // applyEachSeries(fns, args..., callback). TS does not support ... for a middle argument. Callback is optional. export function queue(worker: AsyncWorker, concurrency?: number): AsyncQueue; export function queue(worker: AsyncResultIterator, concurrency?: number): AsyncQueue; export function priorityQueue(worker: AsyncWorker, concurrency: number): AsyncPriorityQueue; diff --git a/types/atmosphere.js/index.d.ts b/types/atmosphere.js/index.d.ts index 0c0bfa3c3a..48314cfdea 100644 --- a/types/atmosphere.js/index.d.ts +++ b/types/atmosphere.js/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/Atmosphere/atmosphere-javascript // Definitions by: Kai Toedter // Fedor Kirpichev +// Jorge Beltran // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Use this typings in future instead of deprecated 'atmosphere'. @@ -65,6 +66,7 @@ declare namespace Atmosphere { maxReconnectOnClose?: number; enableProtocol?: boolean; pollingInterval?: number; + webSocketUrl?: string; onError?: (response?:Response) => void; onClose?: (response?:Response) => void; diff --git a/types/atom/atom-tests.ts b/types/atom/atom-tests.ts index e53e29b176..57420d5059 100644 --- a/types/atom/atom-tests.ts +++ b/types/atom/atom-tests.ts @@ -43,7 +43,7 @@ declare let marker: Atom.Marker; declare let markers: Atom.Marker[]; declare let markerLayer: Atom.MarkerLayer; declare let notification: Atom.Notification; -declare let notifications: Atom.Notification[]; +declare let notifications: ReadonlyArray; declare let pack: Atom.Package; declare let packs: Atom.Package[]; declare let pane: Atom.Pane; @@ -56,10 +56,12 @@ declare let posArr: Atom.Point[]; declare let project: Atom.Project; declare let range: Atom.Range; declare let ranges: Atom.Range[]; +declare let readonlyStrs: ReadonlyArray; declare let registry: Atom.GrammarRegistry; declare let repository: Atom.GitRepository; declare let repositories: Atom.GitRepository[]; declare let scopeDescriptor: Atom.ScopeDescriptor; +declare let scopes: ReadonlyArray; declare let selection: Atom.Selection; declare let selections: Atom.Selection[]; declare let styleManager: Atom.StyleManager; @@ -86,6 +88,10 @@ function testAtomEnvironment() { { label: "Undo", command: "core:undo" }, { label: "Redo", command: "core:redo" }, ], + after: ["test"], + before: ["test"], + afterGroupContaining: ["test"], + beforeGroupContaining: ["test"] }], }); @@ -188,6 +194,10 @@ function testAtomEnvironment() { // Messaging the User atom.beep(); + atom.confirm({ defaultId: 42 }, (response, checked) => { + num = response; + bool = checked; + }); atom.confirm({ message: "Test" }); atom.confirm({ message: "Test", buttons: [ "a", "b" ], detailedMessage: "Test" }); num = atom.confirm({ message: "Test", detailedMessage: "Test", buttons: { @@ -270,13 +280,19 @@ function testCommandRegistry() { "test-function2": (event) => {}, }); atom.commands.add("test", "test:function", { - didDispatch: (event) => event.stopImmediatePropagation(), + didDispatch: (event) => { + event.stopImmediatePropagation(); + }, description: "A Command Test", displayName: "Command: Test", }); atom.commands.add("atom-text-editor", { - "test-function": (event) => event.currentTarget.getModel(), - "test-function2": (event) => event.currentTarget.getComponent(), + "test-function": (event) => { + event.currentTarget.getModel(); + }, + "test-function2": (event) => { + event.currentTarget.getComponent(); + } }); atom.commands.add("atom-workspace", { "test-command": { @@ -345,7 +361,7 @@ function testConfig() { const allConfigValues = atom.config.getAll("test"); for (const { scopeDescriptor, value } of allConfigValues) { - scopeDescriptor.scopes; + scopes = scopeDescriptor.getScopesArray(); } atom.config.getAll("test", { scope: scopeDescriptor }); atom.config.getAll("test", { excludeSources: ["test"] }); @@ -719,6 +735,9 @@ function testDisplayMarker() { // DisplayMarkerLayer ========================================================= function testDisplayMarkerLayer() { + // Properties + str = displayMarkerLayer.id; + // Lifecycle displayMarkerLayer.destroy(); displayMarkerLayer.clear(); @@ -850,6 +869,7 @@ function testDock() { subscription = dock.onDidDestroyPaneItem(event => { event.index && event.item && event.pane; }); + subscription = dock.onDidChangeHovered(hovered => bool = hovered); // Pane Items objs = dock.getPaneItems(); @@ -953,7 +973,8 @@ function testFile() { // Reading and Writing async function readFile() { - str = await file.read(); + const res = await file.read(); + if (res !== null) str = res; } const stream = file.createReadStream(); @@ -1274,6 +1295,9 @@ function testMarker() { // MarkerLayer ================================================================ function testMarkerLayer() { + // Properties + str = markerLayer.id; + // Lifecycle markerLayer = markerLayer.copy(); bool = markerLayer.destroy(); @@ -1368,6 +1392,7 @@ function testNotification() { function testNotificationManager() { // Events atom.notifications.onDidAddNotification(notification => notification.dismiss()); + atom.notifications.onDidClearNotifications(() => undefined); // Adding Notifications atom.notifications.addSuccess("Test"); @@ -1402,6 +1427,9 @@ function testNotificationManager() { // Getting Notifications notifications = atom.notifications.getNotifications(); + + // Managing Notifications + atom.notifications.clear(); } // Package ==================================================================== @@ -1826,7 +1854,7 @@ function testRange() { } // ScopeDescriptor ============================================================ -strs = scopeDescriptor.getScopesArray(); +readonlyStrs = scopeDescriptor.getScopesArray(); // Selection ================================================================== function testSelection() { @@ -2212,6 +2240,7 @@ function testTextBuffer() { num = buffer.createCheckpoint(); bool = buffer.revertToCheckpoint(42); bool = buffer.groupChangesSinceCheckpoint(42); + bool = buffer.groupLastChanges(); buffer.getChangesSinceCheckpoint(42); // Search And Replace @@ -2299,6 +2328,7 @@ function testTextBuffer() { num = buffer.getLastRow(); pos = buffer.getFirstPosition(); pos = buffer.getEndPosition(); + num = buffer.getLength(); num = buffer.getMaxCharacterIndex(); range = buffer.rangeForRow(42, true); num = buffer.characterIndexForPosition(pos); @@ -2693,6 +2723,8 @@ function testTextEditor() { editor.moveToNextSubwordBoundary(); editor.moveToBeginningOfNextParagraph(); editor.moveToBeginningOfPreviousParagraph(); + editor.selectLargerSyntaxNode(); + editor.selectSmallerSyntaxNode(); cursor = editor.getLastCursor(); str = editor.getWordUnderCursor(); @@ -3282,7 +3314,7 @@ const pathWatcherPromise = Atom.watchPath("/var/test", {}, (events) => { for (const event of events) { str = event.path; str = event.action; - if (event.oldPath) str = event.oldPath; + if (event.action === "renamed") str = event.oldPath; } }); diff --git a/types/atom/autocomplete-plus/index.d.ts b/types/atom/autocomplete-plus/index.d.ts index 2e91a81262..5176ca0f30 100644 --- a/types/atom/autocomplete-plus/index.d.ts +++ b/types/atom/autocomplete-plus/index.d.ts @@ -34,7 +34,7 @@ export interface SuggestionInsertedEvent { * An autocompletion suggestion for the user. * Primary data type for the Atom Autocomplete+ service. */ -export interface Suggestion { +export interface SuggestionBase { /** * A string that will show in the UI for this suggestion. * When not set, snippet || text is displayed. @@ -91,14 +91,20 @@ export interface Suggestion { * When specified, a More.. link will be displayed in the description area. */ descriptionMoreURL?: string; + + /** + * (experimental) Description with Markdown formatting. + * Takes precedence over plaintext description. + */ + descriptionMarkdown?: string; } -export interface TextSuggestion extends Suggestion { +export interface TextSuggestion extends SuggestionBase { /** The text which will be inserted into the editor, in place of the prefix. */ text: string; } -export interface SnippetSuggestion extends Suggestion { +export interface SnippetSuggestion extends SuggestionBase { /** * A snippet string. This will allow users to tab through function arguments * or other options. @@ -106,7 +112,8 @@ export interface SnippetSuggestion extends Suggestion { snippet: string; } -export type Suggestions = Array; +export type AnySuggestion = TextSuggestion|SnippetSuggestion; +export type Suggestions = AnySuggestion[]; /** The interface that all Autocomplete+ providers must implement. */ export interface AutocompleteProvider { @@ -154,4 +161,13 @@ export interface AutocompleteProvider { /** Will be called if your provider is being destroyed by autocomplete+ */ dispose?(): void; + + /** + * (experimental) Is called when a suggestion is selected by the user for + * the purpose of loading more information about the suggestion. Return a + * Promise of the new suggestion to replace it with or return null if + * no change is needed. + */ + getSuggestionDetailsOnSelect?: + (suggestion: AnySuggestion) => Promise | AnySuggestion | null; } diff --git a/types/atom/index.d.ts b/types/atom/index.d.ts index 9b0d194976..3cee95ace5 100644 --- a/types/atom/index.d.ts +++ b/types/atom/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Atom 1.24 +// Type definitions for Atom 1.26 // Project: https://github.com/atom/atom // Definitions by: GlenCFL // smhxx @@ -7,9 +7,8 @@ // TypeScript Version: 2.3 // NOTE: only those classes exported within this file should be retain that status below. -// https://github.com/atom/atom/blob/v1.24.0/exports/atom.js +// https://github.com/atom/atom/blob/v1.26.0/exports/atom.js -/// /// import { ReadStream, WriteStream } from "fs"; @@ -40,58 +39,58 @@ export function watchPath(rootPath: string, options: {}, eventCallback: (events: export interface AtomEnvironment { // Properties /** A CommandRegistry instance. */ - commands: CommandRegistry; + readonly commands: CommandRegistry; /** A Config instance. */ - config: Config; + readonly config: Config; /** A Clipboard instance. */ - clipboard: Clipboard; + readonly clipboard: Clipboard; /** A ContextMenuManager instance. */ - contextMenu: ContextMenuManager; + readonly contextMenu: ContextMenuManager; /** A MenuManager instance. */ - menu: MenuManager; + readonly menu: MenuManager; /** A KeymapManager instance. */ - keymaps: KeymapManager; + readonly keymaps: KeymapManager; /** A TooltipManager instance. */ - tooltips: TooltipManager; + readonly tooltips: TooltipManager; /** A NotificationManager instance. */ - notifications: NotificationManager; + readonly notifications: NotificationManager; /** A Project instance. */ - project: Project; + readonly project: Project; /** A GrammarRegistry instance. */ - grammars: GrammarRegistry; + readonly grammars: GrammarRegistry; /** A HistoryManager instance. */ - history: HistoryManager; + readonly history: HistoryManager; /** A PackageManager instance. */ - packages: PackageManager; + readonly packages: PackageManager; /** A ThemeManager instance. */ - themes: ThemeManager; + readonly themes: ThemeManager; /** A StyleManager instance. */ - styles: StyleManager; + readonly styles: StyleManager; /** A DeserializerManager instance. */ - deserializers: DeserializerManager; + readonly deserializers: DeserializerManager; /** A ViewRegistry instance. */ - views: ViewRegistry; + readonly views: ViewRegistry; /** A Workspace instance. */ - workspace: Workspace; + readonly workspace: Workspace; /** A TextEditorRegistry instance. */ - textEditors: TextEditorRegistry; + readonly textEditors: TextEditorRegistry; // Event Subscription /** Invoke the given callback whenever ::beep is called. */ @@ -205,7 +204,27 @@ export interface AtomEnvironment { beep(): void; /** - * A flexible way to open a dialog akin to an alert dialog. + * A flexible way to open a dialog akin to an alert dialog. If a callback + * is provided, then the confirmation will work asynchronously, which is + * recommended. + * + * If the dialog is closed (via `Esc` key or `X` in the top corner) without + * selecting a button the first button will be clicked unless a "Cancel" or "No" + * button is provided. + * + * Returns the chosen button index number if the buttons option was an array. + * @param response The index of the button that was clicked. + * @param checkboxChecked The checked state of the checkbox if `checkboxLabel` was set. + * Otherwise false. + */ + confirm(options: ConfirmationOptions, callback: (response: number, + checkboxChecked: boolean) => void): void; + + /** + * A flexible way to open a dialog akin to an alert dialog. If a callback + * is provided, then the confirmation will work asynchronously, which is + * recommended. + * * If the dialog is closed (via `Esc` key or `X` in the top corner) without * selecting a button the first button will be clicked unless a "Cancel" or "No" * button is provided. @@ -219,7 +238,10 @@ export interface AtomEnvironment { }): void; /** - * A flexible way to open a dialog akin to an alert dialog. + * A flexible way to open a dialog akin to an alert dialog. If a callback + * is provided, then the confirmation will work asynchronously, which is + * recommended. + * * If the dialog is closed (via `Esc` key or `X` in the top corner) without * selecting a button the first button will be clicked unless a "Cancel" or "No" * button is provided. @@ -265,11 +287,11 @@ export interface CommandRegistryTargetMap extends HTMLElementTagNameMap { } export type CommandRegistryListener = { - didDispatch(event: CommandEvent): void, - displayName?: string, - description?: string, - hiddenInCommandPalette?: boolean, -} | ((event: CommandEvent) => void); + didDispatch(event: CommandEvent): void | Promise, + displayName?: string, + description?: string, + hiddenInCommandPalette?: boolean, +} | ((event: CommandEvent) => void | Promise); /** * Associates listener functions with commands in a context-sensitive way @@ -306,9 +328,10 @@ export interface CommandRegistry { /** * Simulate the dispatch of a command on a DOM node. - * @return Whether or not there was a matching command for the target. + * @return Either a Promise that resolves after all handlers complete or null if + * no handlers were matched. */ - dispatch(target: Node, commandName: string): boolean; + dispatch(target: Node, commandName: string): Promise | null; /** Invoke the given callback before dispatching a command event. */ onWillDispatch(callback: (event: CommandEvent) => void): Disposable; @@ -447,7 +470,7 @@ export interface Config { */ export interface Decoration { /** The identifier for this Decoration. */ - id: number; + readonly id: number; // Construction and Destruction /** @@ -654,6 +677,9 @@ export interface DisplayMarker { * This API is experimental and subject to change on any release. */ export interface DisplayMarkerLayer { + /** The identifier for the underlying MarkerLayer. */ + readonly id: string; + // Lifecycle /** Destroy this layer. */ destroy(): void; @@ -837,7 +863,7 @@ export interface LayerDecoration { */ export interface Marker { /** The identifier for this Marker. */ - id: number; + readonly id: number; // Lifecycle /** @@ -949,6 +975,9 @@ export interface Marker { /** Experimental: A container for a related set of markers. */ export interface MarkerLayer { + /** The identifier for this MarkerLayer. */ + readonly id: string; + // Lifecycle /** Create a copy of this layer with markers in the same state and locations. */ copy(): MarkerLayer; @@ -1030,13 +1059,13 @@ export class Notification { /** A notification manager used to create Notifications to be shown to the user. */ export interface NotificationManager { - // Properties - notifications: Notification[]; - // Events /** Invoke the given callback after a notification has been added. */ onDidAddNotification(callback: (notification: Notification) => void): Disposable; + /** Invoke the given callback after the notifications have been cleared. */ + onDidClearNotifications(callback: () => void): Disposable; + // Adding Notifications /** Add a success notification. */ addSuccess(message: string, options?: NotificationOptions): Notification; @@ -1055,7 +1084,11 @@ export interface NotificationManager { // Getting Notifications /** Get all the notifications. */ - getNotifications(): Notification[]; + getNotifications(): ReadonlyArray; + + // Managing Notifications + /** Clear all the notifications. */ + clear(): void; } /** Represents a point in a buffer in row/column coordinates. */ @@ -1267,8 +1300,7 @@ export class Range { * including cursor and selection positions, folds, and soft wraps. */ export class TextEditor { - id: number; - buffer: TextBuffer; + readonly id: number; // NOTE: undocumented within the public API. Don't go down the rabbit hole. constructor(options?: object); @@ -1497,7 +1529,7 @@ export class TextEditor { /** Set the text in the given Range in buffer coordinates. */ setTextInBufferRange(range: RangeCompatible, text: string, options?: - { normalizeLineEndings?: boolean, undo?: "skip" }): Range; + TextEditOptions): Range; /* For each selection, replace the selected text with the given text. */ insertText(text: string, options?: TextInsertionOptions): Range|false; @@ -2132,6 +2164,12 @@ export class TextEditor { */ selectToBeginningOfPreviousParagraph(): void; + /** For each selection, select the syntax node that contains that selection. */ + selectLargerSyntaxNode(): void; + + /** Undo the effect a preceding call to `::selectLargerSyntaxNode`. */ + selectSmallerSyntaxNode(): void; + /** Select the range of the given marker if it is valid. */ selectMarker(marker: DisplayMarker): Range|undefined; @@ -2342,7 +2380,10 @@ export class TextEditor { /** Unfold all existing folds. */ unfoldAll(): void; - /** Fold all foldable lines at the given indent level. */ + /** + * Fold all foldable lines at the given indent level. + * @param level A zero-indexed number. + */ foldAllAtIndentLevel(level: number): void; /** @@ -2526,7 +2567,7 @@ export type TooltipPlacement = /** Associates tooltips with HTML elements or selectors. */ export interface TooltipManager { /** Add a tooltip to the given element. */ - add(target: HTMLElement, options: { + add(target: HTMLElement | JQueryCompatible, options: { item?: object, } | { title?: string|(() => string), @@ -2975,7 +3016,7 @@ export interface WorkspaceCenter { * Node's ChildProcess. */ export class BufferedProcess { - process?: ChildProcess; + readonly process?: ChildProcess; constructor(options: ProcessOptions); @@ -3443,6 +3484,12 @@ export interface Dock { /** Invoke the given callback when a pane item is destroyed. */ onDidDestroyPaneItem(callback: (event: PaneItemObservedEvent) => void): Disposable; + /** + * Invoke the given callback when the hovered state of the dock changes. + * @param hovered Is the dock now hovered? + */ + onDidChangeHovered(callback: (hovered: boolean) => void): Disposable; + // Pane Items /** Get all pane items in the dock. */ getPaneItems(): object[]; @@ -3547,7 +3594,7 @@ export class File { // Reading and Writing /** Reads the contents of the file. */ - read(flushCache?: boolean): Promise; + read(flushCache?: boolean): Promise; /** Returns a stream to read the content of the file. */ createReadStream(): ReadStream; @@ -4043,10 +4090,10 @@ export interface MenuManager { */ export interface Package { /** The name of the Package. */ - name: string; + readonly name: string; /** The path to the Package on disk. */ - path: string; + readonly path: string; // Event Subscription /** Invoke the given callback when all packages have been activated. */ @@ -4368,7 +4415,7 @@ export interface Pane { */ export interface Panel { /** Whether or not the Panel is visible. */ - visible: boolean; + readonly visible: boolean; // Construction and Destruction /** Destroy and remove this panel from the UI. */ @@ -4489,10 +4536,8 @@ export interface Project { * syntax tree to a token including all scope names for the entire path. */ export interface ScopeDescriptor { - scopes: string[]; - /** Returns all scopes for this descriptor. */ - getScopesArray(): string[]; + getScopesArray(): ReadonlyArray; } /** Represents a selection in the TextEditor. */ @@ -4885,13 +4930,13 @@ export class Task { */ export class TextBuffer { /** The unique identifier for this buffer. */ - id: string; + readonly id: string; /** The number of retainers for the buffer. */ - refcount: number; + readonly refcount: number; /** Whether or not the bufffer has been destroyed. */ - destroyed: boolean; + readonly destroyed: boolean; /** Create a new buffer backed by the given file path. */ static load(filePath: string, params?: BufferLoadOptions): Promise; @@ -5059,7 +5104,10 @@ export class TextBuffer { /** Get the text of the last line of the buffer, without its line ending. */ getLastLine(): string; - /** Get the text of the line at the given row, without its line ending. */ + /** + * Get the text of the line at the given 0-indexed row, without its line ending. + * @param row A number representing the row. + */ lineForRow(row: number): string|undefined; /** Get the line ending for the given 0-indexed row. */ @@ -5097,24 +5145,29 @@ export class TextBuffer { setTextViaDiff(text: string): void; /** Set the text in the given range. */ - setTextInRange(range: RangeCompatible, text: string, options?: - { normalizeLineEndings?: boolean, undo?: "skip" }): Range; + setTextInRange(range: RangeCompatible, text: string, options?: TextEditOptions): Range; /** Insert text at the given position. */ - insert(position: PointCompatible, text: string, options?: - { normalizeLineEndings?: boolean, undo?: "skip" }): Range; + insert(position: PointCompatible, text: string, options?: TextEditOptions): Range; /** Append text to the end of the buffer. */ - append(text: string, options?: { normalizeLineEndings?: boolean, undo?: - "skip" }): Range; + append(text: string, options?: TextEditOptions): Range; /** Delete the text in the given range. */ delete(range: RangeCompatible): Range; - /** Delete the line associated with a specified row. */ + /** + * Delete the line associated with a specified 0-indexed row. + * @param row A number representing the row to delete. + */ deleteRow(row: number): Range; - /** Delete the lines associated with the specified row range. */ + /** + * Delete the lines associated with the specified 0-indexed row range. + * + * If the row range is out of bounds, it will be clipped. If the `startRow` + * is greater than the `endRow`, they will be reordered. + */ deleteRows(startRow: number, endRow: number): Range; // Markers @@ -5153,10 +5206,16 @@ export class TextBuffer { getMarkerCount(): number; // History - /** Undo the last operation. If a transaction is in progress, aborts it. */ + /** + * Undo the last operation. If a transaction is in progress, aborts it. + * @return A boolean of whether or not a change was made. + */ undo(): boolean; - /** Redo the last operation. */ + /** + * Redo the last operation. + * @return A boolean of whether or not a change was made. + */ redo(): boolean; /** Batch multiple operations as a single undo/redo step. */ @@ -5164,37 +5223,44 @@ export class TextBuffer { transact(fn: () => T): T; /** - * Call within a transaction to terminate the function's execution and - * revert any changes performed up to the abortion. + * Abort the currently running transaction. + * + * Only intended to be called within the `fn` option to `::transact`. */ abortTransaction(): void; - /** - * Clear the undo stack. When calling this method within a transaction, - * the ::onDidChangeText event will not be triggered because the information - * describing the changes is lost. - */ + /** Clear the undo stack. */ clearUndoStack(): void; /** * Create a pointer to the current state of the buffer for use with - * ::revertToCheckpoint and ::groupChangesSinceCheckpoint. + * `::revertToCheckpoint` and `::groupChangesSinceCheckpoint`. + * @return A checkpoint ID value. */ createCheckpoint(): number; /** * Revert the buffer to the state it was in when the given checkpoint was created. - * Returns a boolean indicating whether the operation succeeded. + * @return A boolean indicating whether the operation succeeded. */ revertToCheckpoint(checkpoint: number): boolean; /** * Group all changes since the given checkpoint into a single transaction for * purposes of undo/redo. - * Returns a boolean indicating whether the operation succeeded. + * @return A boolean indicating whether the operation succeeded. */ groupChangesSinceCheckpoint(checkpoint: number): boolean; + /** + * Group the last two text changes for purposes of undo/redo. + * + * This operation will only succeed if there are two changes on the undo stack. + * It will not group past the beginning of an open transaction. + * @return A boolean indicating whether the operation succeeded. + */ + groupLastChanges(): boolean; + /** * Returns a list of changes since the given checkpoint. * If the given checkpoint is no longer present in the undo history, this method @@ -5284,17 +5350,26 @@ export class TextBuffer { /** Get the maximal position in the buffer, where new text would be appended. */ getEndPosition(): Point; + /** Get the length of the buffer's text. */ + getLength(): number; + /** Get the length of the buffer in characters. */ getMaxCharacterIndex(): number; - /** Get the range for the given row. */ - rangeForRow(row: number, includeNewline: boolean): Range; + /** + * Get the range for the given row. + * @param row A number representing a 0-indexed row. + * @param includeNewline A boolean indicating whether or not to include the + * newline, which results in a range that extends to the start of the next line. + * (default: false) + */ + rangeForRow(row: number, includeNewline?: boolean): Range; /** * Convert a position in the buffer in row/column coordinates to an absolute * character offset, inclusive of line ending characters. */ - characterIndexForPosition(position: Point|[number, number]): number; + characterIndexForPosition(position: PointCompatible): number; /** * Convert an absolute character offset, inclusive of newlines, to a position @@ -5569,19 +5644,28 @@ export interface FileSavedEvent { path: string; } -export type FilesystemChangeEvent = Array<{ +export interface FilesystemChangeBasic< + Action extends "created"|"modified"|"deleted"|"renamed" + = "created"|"modified"|"deleted" +> { /** A string describing the filesystem action that occurred. */ - action: "created"|"modified"|"deleted"|"renamed"; + action: Action; /** The absolute path to the filesystem entry that was acted upon. */ path: string; +} +export interface FilesystemChangeRename extends FilesystemChangeBasic<"renamed"> { /** * For rename events, a string containing the filesystem entry's former * absolute path. */ - oldPath?: string; -}>; + oldPath: string; +} + +export type FilesystemChange = FilesystemChangeBasic|FilesystemChangeRename; + +export type FilesystemChangeEvent = FilesystemChange[]; export interface FullKeybindingMatchEvent { /** The string of keystrokes that matched the binding. */ @@ -5744,7 +5828,7 @@ export interface TextEditorObservedEvent { // information under certain contexts. // NOTE: the config schema with these defaults can be found here: -// https://github.com/atom/atom/blob/v1.24.0/src/config-schema.js +// https://github.com/atom/atom/blob/v1.26.0/src/config-schema.js /** * Allows you to strongly type Atom configuration variables. Additional key:value * pairings merged into this interface will result in configuration values under @@ -6030,7 +6114,60 @@ export interface BuildEnvironmentOptions { enablePersistence?: boolean; } -export interface ContextMenuOptions { +export interface ConfirmationOptions { + /** The type of the confirmation prompt. */ + type?: "none"|"info"|"error"|"question"|"warning"; + + /** The text for the buttons. */ + buttons?: ReadonlyArray; + + /** The index for the button to be selected by default in the prompt. */ + defaultId?: number; + + /** The title for the prompt. */ + title?: string; + + /** The content of the message box. */ + message?: string; + + /** Additional information regarding the message. */ + detail?: string; + + /** If provided, the message box will include a checkbox with the given label. */ + checkboxLabel?: string; + + /** Initial checked state of the checkbox. false by default. */ + checkboxChecked?: boolean; + + /** An Electron NativeImage to use as the prompt's icon. */ + icon?: object; + + /** + * The index of the button to be used to cancel the dialog, via the `Esc` key. + * By default this is assigned to the first button with "cancel" or "no" as the + * label. If no such labeled buttons exist and this option is not set, 0 will be + * used as the return value or callback response. + * + * This option is ignored on Windows. + */ + cancelId?: number; + + /** + * On Windows, Electron will try to figure out which one of the buttons are + * common buttons (like `Cancel` or `Yes`), and show the others as command links + * in the dialog. This can make the dialog appear in the style of modern Windows + * apps. If you don't like this behavior, you can set noLink to true. + */ + noLink?: boolean; + + /** + * Normalize the keyboard access keys across platforms. + * Atom defaults this to true. + */ + normalizeAccessKeys?: boolean; +} + +export interface ContextMenuItemOptions { /** The menu item's label. */ label?: string; @@ -6049,12 +6186,6 @@ export interface ContextMenuOptions { /** An array of additional items. */ submenu?: ReadonlyArray; - /** - * If you want to create a separator, provide an item with type: 'separator' - * and no other keys. - */ - type?: "separator"; - /** Whether the menu item should appear in the menu. Defaults to true. */ visible?: boolean; @@ -6069,8 +6200,28 @@ export interface ContextMenuOptions { * given context menu deployment. */ shouldDisplay?(event: Event): void; + + /** Place this menu item before the menu items representing the given commands. */ + before?: ReadonlyArray; + + /** Place this menu item after the menu items representing the given commands. */ + after?: ReadonlyArray; + + /** + * Place this menu item's group before the containing group of the menu items + * representing the given commands. + */ + beforeGroupContaining?: ReadonlyArray; + + /** + * Place this menu item's group after the containing group of the menu items + * representing the given commands. + */ + afterGroupContaining?: ReadonlyArray; } +export type ContextMenuOptions = ContextMenuItemOptions | { type: "separator" }; + export interface CopyMarkerOptions { /** Whether or not the marker should be tailed. */ tailed?: boolean; @@ -6343,7 +6494,18 @@ export interface SpawnProcessOptions { shell?: boolean | string; } -export interface TextInsertionOptions { +export interface TextEditOptions { + /** If true, all line endings will be normalized to match the editor's current mode. */ + normalizeLineEndings?: boolean; + + /** + * If skip, skips the undo stack for this operation. + * @deprecated Call groupLastChanges() on the TextBuffer afterward instead. + */ + undo?: "skip"; +} + +export interface TextInsertionOptions extends TextEditOptions { /** If true, selects the newly added text. */ select?: boolean; @@ -6366,12 +6528,6 @@ export interface TextInsertionOptions { * true, this behavior is suppressed. */ preserveTrailingLineIndentation?: boolean; - - /** If true, all line endings will be normalized to match the editor's current mode. */ - normalizeLineEndings?: boolean; - - /** If skip, skips the undo stack for this operation. */ - undo?: "skip"; } /** The options for a Bootstrap 3 Tooltip class, which Atom uses a variant of. */ @@ -6497,6 +6653,10 @@ export interface DisposableLike { dispose(): void; } +export interface JQueryCompatible extends Iterable { + jquery: string; +} + /** The types usable when constructing a point via the Point::fromObject method. */ export type PointCompatible = PointLike|[number, number]; @@ -6744,11 +6904,11 @@ export interface TokenizeLineResult { * jQuery, which is an expensive dependency we want to eliminate. */ export interface Tooltip { - options: TooltipOptions; - enabled: boolean; - timeout: number; - hoverState: "in"|"out"|null; - element: JQuery|HTMLElement; + readonly options: TooltipOptions; + readonly enabled: boolean; + readonly timeout: number; + readonly hoverState: "in"|"out"|null; + readonly element: HTMLElement; getTitle(): string; getTooltipElement(): HTMLElement; @@ -6765,11 +6925,11 @@ export interface ViewModel { } export interface WindowLoadSettings { - appVersion: string; - atomHome: string; - devMode: boolean; - resourcePath: string; - safeMode: boolean; - env?: { [key: string]: string|undefined }; - profileStartup?: boolean; + readonly appVersion: string; + readonly atomHome: string; + readonly devMode: boolean; + readonly resourcePath: string; + readonly safeMode: boolean; + readonly env?: { [key: string]: string|undefined }; + readonly profileStartup?: boolean; } diff --git a/types/auth0-lock/auth0-lock-tests.ts b/types/auth0-lock/auth0-lock-tests.ts index 119bbb3c37..b3b2c81339 100644 --- a/types/auth0-lock/auth0-lock-tests.ts +++ b/types/auth0-lock/auth0-lock-tests.ts @@ -117,6 +117,20 @@ const authOptions : Auth0LockConstructorOptions = { new Auth0Lock(CLIENT_ID, DOMAIN, authOptions); +// test "other" properties + +const otherOptions : Auth0LockConstructorOptions = { + clientBaseUrl: "http://www.example.com", + configurationBaseUrl: "https://cdn.auth0.com", + languageBaseUrl: "http://www.example.com", + hashCleanup: false, + leeway: 30, + _enableImpersonation: true, + _enableIdPInitiatedLogin: false +}; + +new Auth0Lock(CLIENT_ID, DOMAIN, otherOptions); + // test multi-variant example const multiVariantOptions : Auth0LockConstructorOptions = { diff --git a/types/auth0-lock/index.d.ts b/types/auth0-lock/index.d.ts index 352d9c71a9..fec943ce02 100644 --- a/types/auth0-lock/index.d.ts +++ b/types/auth0-lock/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for auth0-lock 10.16 +// Type definitions for auth0-lock 11.4 // Project: http://auth0.com // Definitions by: Brian Caruso // Dan Caddigan @@ -118,18 +118,24 @@ interface Auth0LockConstructorOptions { auth?: Auth0LockAuthOptions; autoclose?: boolean; autofocus?: boolean; - avatar?: Auth0LockAvatarOptions; + avatar?: Auth0LockAvatarOptions | null; + clientBaseUrl?: string; closable?: boolean; + configurationBaseUrl?: string; container?: string; defaultADUsernameFromEmailPrefix?: string; defaultDatabaseConnection?: string; defaultEnterpriseConnection?: string; forgotPasswordLink?: string; + hashCleanup?: boolean; initialScreen?: "login" | "signUp" | "forgotPassword"; language?: string; + languageBaseUrl?: string; languageDictionary?: any; + leeway?: number; loginAfterSignUp?: boolean; mustAcceptTerms?: boolean; + oidcConformant?: boolean; popupOptions?: Auth0LockPopupOptions; prefill?: { email?: string, username?: string}; rememberLastLogin?: boolean; @@ -137,7 +143,8 @@ interface Auth0LockConstructorOptions { socialButtonStyle?: "big" | "small"; theme?: Auth0LockThemeOptions; usernameStyle?: string; - oidcConformant?: boolean; + _enableImpersonation?: boolean; + _enableIdPInitiatedLogin?: boolean; } interface Auth0LockFlashMessageOptions { diff --git a/types/autobahn/index.d.ts b/types/autobahn/index.d.ts index 969c703478..59bb2c404d 100644 --- a/types/autobahn/index.d.ts +++ b/types/autobahn/index.d.ts @@ -25,7 +25,7 @@ declare namespace autobahn { leave(reason: string, message: string): void; - call(procedure: string, args?: any[], kwargs?: any, options?: ICallOptions): When.Promise; + call(procedure: string, args?: any[] | any, kwargs?: any, options?: ICallOptions): When.Promise; publish(topic: string, args?: any[], kwargs?: any, options?: IPublishOptions): When.Promise; @@ -96,7 +96,7 @@ declare namespace autobahn { kwargs: any; } - type SubscribeHandler = (args?: any[], kwargs?: any, details?: IEvent) => void; + type SubscribeHandler = (args?: any[] | any, kwargs?: any, details?: IEvent) => void; interface ISubscription { topic: string; @@ -206,7 +206,7 @@ declare namespace autobahn { type DeferFactory = () => When.Promise; - type OnChallengeHandler = (session: Session, method: string, extra: any) => string; + type OnChallengeHandler = (session: Session, method: string, extra: any) => string | When.Promise; interface IConnectionOptions { use_es6_promises?: boolean; diff --git a/types/aws-lambda/aws-lambda-tests.ts b/types/aws-lambda/aws-lambda-tests.ts index 2b7b375576..dc16eca58f 100644 --- a/types/aws-lambda/aws-lambda-tests.ts +++ b/types/aws-lambda/aws-lambda-tests.ts @@ -260,9 +260,27 @@ statement = { }; statement = { + Sid: str, Action: [str, str], Effect: str, - Resource: [str, str] + Resource: [str, str], + Condition: { + condition1: { key: "value" }, + condition2: [{ + key1: "value", + key2: "value" + }, { + key3: "value" + }] + }, + Principal: [str, str], + NotPrincipal: [str, str] +}; + +statement = { + Effect: str, + NotAction: str, + NotResource: str }; policyDocument = { @@ -270,6 +288,11 @@ policyDocument = { Statement: [statement] }; +policyDocument = { + Version: str, + Statement: [statement, statement] +}; + authResponse = { principalId: str, policyDocument, @@ -572,6 +595,28 @@ const CloudFrontResponseEvent: AWSLambda.CloudFrontResponseEvent = { ] }; +/* Kinesis Data Stream Events */ +declare let kinesisStreamEvent: AWSLambda.KinesisStreamEvent; +declare let kinesisStreamRecord: AWSLambda.KinesisStreamRecord; +declare let kinesisStreamRecordPayload: AWSLambda.KinesisStreamRecordPayload; + +kinesisStreamRecord = kinesisStreamEvent.Records[0]; + +str = kinesisStreamRecord.awsRegion; +str = kinesisStreamRecord.eventID; +str = kinesisStreamRecord.eventName; +str = kinesisStreamRecord.eventSource; +str = kinesisStreamRecord.eventSourceARN; +str = kinesisStreamRecord.eventVersion; +str = kinesisStreamRecord.invokeIdentityArn; +kinesisStreamRecordPayload = kinesisStreamRecord.kinesis; + +num = kinesisStreamRecordPayload.approximateArrivalTimestamp; +str = kinesisStreamRecordPayload.data; +str = kinesisStreamRecordPayload.kinesisSchemaVersion; +str = kinesisStreamRecordPayload.partitionKey; +str = kinesisStreamRecordPayload.sequenceNumber; + /* Compatibility functions */ context.done(); context.done(error); @@ -585,8 +630,27 @@ context.fail(str); /* Handler */ let handler: AWSLambda.Handler = (event: any, context: AWSLambda.Context, cb: AWSLambda.Callback) => { }; -// async methods return Promise, test assignability -let asyncHandler: AWSLambda.Handler = async (event: any, context: AWSLambda.Context, cb: AWSLambda.Callback) => { }; +/* In node8.10 runtime, handlers may return a promise for the result value, so existing async + * handlers that return Promise before calling the callback will now have a `null` result. + * Be safe and make that badly typed with a major verson bump to 8.10 so users expect the breaking change, + * since the upgrade effort should be pretty low in most cases, and it points them at a nicer solution. + */ +// $ExpectError +let legacyAsyncHandler: AWSLambda.APIGatewayProxyHandler = async ( + event: AWSLambda.APIGatewayProxyEvent, + context: AWSLambda.Context, + cb: AWSLambda.Callback, +) => { + cb(null, { statusCode: 200, body: 'No longer valid' }); +}; + +let node8AsyncHandler: AWSLambda.APIGatewayProxyHandler = async ( + event: AWSLambda.APIGatewayProxyEvent, + context: AWSLambda.Context, + cb: AWSLambda.Callback, +) => { + return { statusCode: 200, body: 'Is now valid!' }; +}; let inferredHandler: AWSLambda.S3Handler = (event, context, cb) => { // $ExpectType S3Event @@ -661,3 +725,5 @@ let customHandler: AWSLambda.Handler = (event, contex // $ExpectError cb(null, { resultString: bool }); }; + +let kinesisStreamHandler: AWSLambda.KinesisStreamHandler = (event: AWSLambda.KinesisStreamEvent, context: AWSLambda.Context, cb: AWSLambda.Callback) => { }; diff --git a/types/aws-lambda/index.d.ts b/types/aws-lambda/index.d.ts index eccc96ba3e..c060bc10ee 100644 --- a/types/aws-lambda/index.d.ts +++ b/types/aws-lambda/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for AWS Lambda +// Type definitions for AWS Lambda 8.10 // Project: http://docs.aws.amazon.com/lambda // Definitions by: James Darbyshire // Michael Skarum @@ -16,6 +16,8 @@ // Danilo Raisi // Simon Buchan // David Hayden +// Chris Redekop +// Aneil Mallavarapu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -90,7 +92,7 @@ export interface AttributeValue { // Context // http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_StreamRecord.html export interface StreamRecord { - ApproximateCreationTime?: number; + ApproximateCreationDateTime?: number; Keys?: { [key: string]: AttributeValue }; NewImage?: { [key: string]: AttributeValue }; OldImage?: { [key: string]: AttributeValue }; @@ -437,28 +439,52 @@ export interface CustomAuthorizerResult { principalId: string; policyDocument: PolicyDocument; context?: AuthResponseContext; + usageIdentifierKey?: string; } export type AuthResponse = CustomAuthorizerResult; /** * API Gateway CustomAuthorizer AuthResponse.PolicyDocument. - * http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html#api-gateway-custom-authorizer-output + * https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-output.html + * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html#Condition */ export interface PolicyDocument { Version: string; - Statement: [Statement]; + Id?: string; + Statement: Statement[]; +} + +/** + * API Gateway CustomAuthorizer AuthResponse.PolicyDocument.Condition. + * https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-control-access-policy-language-overview.html + * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html + */ +export interface ConditionBlock { + [condition: string]: Condition | Condition[]; +} + +export interface Condition { + [key: string]: string | string[]; } /** * API Gateway CustomAuthorizer AuthResponse.PolicyDocument.Statement. - * http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html#api-gateway-custom-authorizer-output + * https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-control-access-policy-language-overview.html + * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html */ -export interface Statement { - Action: string | string[]; +export type Statement = BaseStatement & StatementAction & StatementResource; + +export interface BaseStatement { Effect: string; - Resource: string | string[]; + Sid?: string; + Condition?: ConditionBlock; + Principal?: string | string[]; + NotPrincipal?: string | string[]; } +export type StatementAction = { Action: string | string[] } | { NotAction: string | string[] }; +export type StatementResource = { Resource: string | string[] } | { NotResource: string | string[] }; + /** * API Gateway CustomAuthorizer AuthResponse.PolicyDocument.Statement. * http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html#api-gateway-custom-authorizer-output @@ -529,6 +555,31 @@ export interface CloudFrontRequestEvent { export type CloudFrontResponseResult = undefined | null | CloudFrontResultResponse; +// Kinesis Streams +// https://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-kinesis-streams +export interface KinesisStreamRecordPayload { + approximateArrivalTimestamp: number; + data: string; + kinesisSchemaVersion: string; + partitionKey: string; + sequenceNumber: string; +} + +export interface KinesisStreamRecord { + awsRegion: string; + eventID: string; + eventName: string; + eventSource: string; + eventSourceARN: string; + eventVersion: string; + invokeIdentityArn: string; + kinesis: KinesisStreamRecordPayload; +} + +export interface KinesisStreamEvent { + Records: KinesisStreamRecord[]; +} + /** * AWS Lambda handler function. * http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-handler.html @@ -536,8 +587,13 @@ export type CloudFrontResponseResult = undefined | null | CloudFrontResultRespon * @param event – event data. * @param context – runtime information of the Lambda function that is executing. * @param callback – optional callback to return information to the caller, otherwise return value is null. + * @return In the node8.10 runtime, a promise for the lambda result. */ -export type Handler = (event: TEvent, context: Context, callback: Callback) => void; +export type Handler = ( + event: TEvent, + context: Context, + callback: Callback, +) => void | Promise; /** * Optional callback parameter. @@ -595,7 +651,9 @@ export type CloudFrontRequestCallback = Callback; export type CloudFrontResponseHandler = Handler; export type CloudFrontResponseCallback = Callback; -// TODO: Kinesis (should be very close to DynamoDB stream?) +export type KinesisStreamHandler = Handler; + +// TODO: Kinesis Firehose export type CustomAuthorizerHandler = Handler; export type CustomAuthorizerCallback = Callback; diff --git a/types/axon/axon-tests.ts b/types/axon/axon-tests.ts new file mode 100644 index 0000000000..a7f2a95a87 --- /dev/null +++ b/types/axon/axon-tests.ts @@ -0,0 +1,173 @@ +import * as axon from 'axon'; +import { Socket as NetSocket } from 'net'; + +const PubEmitterSocket = axon.PubEmitterSocket; +const PubSocket = axon.PubSocket; +const RepSocket = axon.RepSocket; +const ReqSocket = axon.ReqSocket; +const Socket = axon.Socket; +const SubSocket = axon.SubSocket; + +const pubSocket = new PubSocket(); +const pubEmitterSocket = new PubEmitterSocket(); +const repSocket = new RepSocket(); +const reqSocket = new ReqSocket(); +const netSocket = new NetSocket(); +const socket = new Socket(); +const subSocket = new SubSocket(); + +// $ExpectType PubSocket +pubSocket.send('anything'); + +// $ExpectType PubSocket +pubSocket.send('anything', {w: 100, h: 200}); + +// $ExpectType PubSocket +pubEmitterSocket.send('anything'); + +// $ExpectType PubSocket +pubEmitterSocket.send('anything', {w: 100, h: 200}); + +// $ExpectType Socket +pubEmitterSocket.bind(3000); + +// $ExpectError +pubEmitterSocket.bind({a, b, c}); + +// $ExpectError +pubEmitterSocket.bind(); + +// $ExpectType Socket +pubEmitterSocket.connect(3000); + +// $ExpectError +pubEmitterSocket.connect({a, b, c}); + +// $ExpectError +pubEmitterSocket.connect(); + +// $ExpectType (args: Buffer | Buffer[]) => void +repSocket.onmessage(netSocket); + +// $ExpectError +repSocket.onmessage(); + +// $ExpectError +repSocket.onmessage(''); + +// $ExpectError +repSocket.onmessage(1); + +// $ExpectError +repSocket.onmessage({}); + +// $ExpectType string +reqSocket.id(); + +// $ExpectType (args: Buffer | Buffer[]) => void +reqSocket.onmessage(); + +// $ExpectType void +reqSocket.send('anything'); + +// $ExpectType void +reqSocket.send('anything', {w: 100, h: 200}); + +// $ExpectType Socket +socket.set('name', 'aaa'); + +// $ExpectError +socket.set(1, 'aaa'); + +// $ExpectError +socket.set({}, 'aaa'); + +// $ExpectError +socket.set('name'); + +// $ExpectType any +socket.get('name'); + +// $ExpectError +socket.get(1); + +// $ExpectError +socket.get({}); + +// $ExpectType Socket +socket.enable('name'); + +// $ExpectError +socket.enable(1); + +// $ExpectError +socket.enable({}); + +// $ExpectType Socket +socket.disable('name'); + +// $ExpectError +socket.disable(1); + +// $ExpectError +socket.disable({}); + +// $ExpectType boolean +socket.enabled('name'); + +// $ExpectError +socket.enabled(1); + +// $ExpectError +socket.enabled({}); + +// $ExpectType boolean +socket.disabled('name'); + +// $ExpectError +socket.disabled(1); + +// $ExpectError +socket.disabled({}); + +// $ExpectType boolean +subSocket.hasSubscriptions(); + +// $ExpectType boolean +subSocket.matches('name'); + +// $ExpectError +subSocket.matches(1); + +// $ExpectError +subSocket.matches({}); + +// $ExpectType RegExp +subSocket.subscribe(/some regex/); + +// $ExpectType RegExp +subSocket.subscribe('some string'); + +// $ExpectError +subSocket.subscribe(1); + +// $ExpectError +subSocket.subscribe({}); + +// $ExpectError +subSocket.subscribe(); + +// $ExpectType void +subSocket.unsubscribe(/some regex/); + +// $ExpectType void +subSocket.unsubscribe('some string'); + +// $ExpectError +subSocket.unsubscribe(1); + +// $ExpectError +subSocket.unsubscribe({}); + +// $ExpectError +subSocket.unsubscribe(); diff --git a/types/axon/index.d.ts b/types/axon/index.d.ts new file mode 100644 index 0000000000..2449b83eb4 --- /dev/null +++ b/types/axon/index.d.ts @@ -0,0 +1,134 @@ +// Type definitions for axon 2.0 +// Project: https://github.com/visionmedia/axon#readme +// Definitions by: Vilim Stubičan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + +import { EventEmitter } from "events"; +import { Socket as NetSocket } from "net"; + +export class Socket extends EventEmitter { + set(name: string, val: any): Socket; + + get(name: string): any; + + enable(name: string): Socket; + + disable(name: string): Socket; + + enabled(name: string): boolean; + + disabled(name: string): boolean; + + use(plugin: (socket: Socket) => any): Socket; + + pack(args: Buffer | Buffer[]): Buffer; + + closeSockets(): void; + + close(): void; + + closeServer(fn: () => any): void; + + address(): { port: number; family: string; address: string; string: string } | undefined; + + removeSocket(sock: Socket): void; + + addSocket(sock: Socket): void; + + handleErrors(sock: Socket): void; + + onmessage(sock: NetSocket): (args: Buffer | Buffer[]) => void; + + connect(port: ConnectionPort, host?: string | (() => void), fn?: () => void): Socket; + + onconnect(sock: Socket): void; + + bind(port: ConnectionPort, host?: string | (() => void), fn?: () => void): Socket; +} + +export class SubSocket extends Socket { + hasSubscriptions(): boolean; + + matches(topic: string): boolean; + + onmessage(sock: NetSocket): (args: Buffer | Buffer[]) => void; + + subscribe(re: RegExp | string): RegExp; + + unsubscribe(re: RegExp | string): void; + + clearSubscriptions(): void; + + /** + * @throws {Error} + */ + send(): void; +} + +export class SubEmitterSocket { + onmessage(): (args: Buffer | Buffer[]) => void; + + on(event: string, fn: (...args: any[]) => void): SubEmitterSocket; + + off(event: string): SubEmitterSocket; + + bind(port: ConnectionPort, host?: string | (() => void), fn?: () => void): Socket; + + connect(port: ConnectionPort, host?: string | (() => void), fn?: () => void): Socket; + + close(): void; +} + +export class PubSocket extends Socket { + send(...args: any[]): PubSocket; +} + +export class PubEmitterSocket { + sock: PubSocket; + + send(...args: any[]): PubSocket; + + bind(port: ConnectionPort, host?: string | (() => void), fn?: () => void): Socket; + + connect(port: ConnectionPort, host?: string | (() => void), fn?: () => void): Socket; + + close(): void; +} + +export class PushSocket extends Socket { + send(...args: any[]): void; + enqueue(msg: any): void; +} + +export class ReqSocket extends Socket { + id(): string; + + onmessage(): (args: Buffer | Buffer[]) => void; + + send(...args: any[]): void; +} + +export class RepSocket extends Socket { + onmessage(sock: NetSocket): (args: Buffer | Buffer[]) => void; +} + +export class PullSocket extends Socket { + /** + * @throws {Error} + */ + send(): void; +} + +export type ConnectionPort = + number + | string + | { protocol?: string, hostname?: string, pathname: string, port: string | number }; + +export function socket(type: string, options?: any): Socket; + +export const types: { + [propName: string]: { new(): PubEmitterSocket | SubEmitterSocket | PushSocket | PullSocket | PubSocket | SubSocket | ReqSocket | RepSocket | Socket }; +}; diff --git a/types/axon/tsconfig.json b/types/axon/tsconfig.json new file mode 100644 index 0000000000..2025639930 --- /dev/null +++ b/types/axon/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "axon-tests.ts" + ] +} diff --git a/types/axon/tslint.json b/types/axon/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/axon/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/azure-sb/azure-sb-tests.ts b/types/azure-sb/azure-sb-tests.ts index 411862a3b2..14d2ba9054 100644 --- a/types/azure-sb/azure-sb-tests.ts +++ b/types/azure-sb/azure-sb-tests.ts @@ -14,14 +14,14 @@ function ResponseCallback(err: Error | null, response: Azure.ServiceBus.Response const ServiceBus = AzureSB.createServiceBusService('connectionstring'); // Queues -ServiceBus.listQueues('', createResultCallback()); +ServiceBus.listQueues(createResultCallback()); ServiceBus.createQueue('test', createResultCallback()); ServiceBus.createQueueIfNotExists('test', createResultCallback()); ServiceBus.getQueue('test', createResultCallback()); ServiceBus.deleteQueue('test', ResponseCallback); // Topics -ServiceBus.listTopics('', createResultCallback()); +ServiceBus.listTopics(createResultCallback()); ServiceBus.createTopic('test', createResultCallback()); ServiceBus.createTopicIfNotExists('test', createResultCallback()); ServiceBus.getTopic('test', createResultCallback()); diff --git a/types/azure-sb/index.d.ts b/types/azure-sb/index.d.ts index ba92395c0f..9f9d07d3dc 100644 --- a/types/azure-sb/index.d.ts +++ b/types/azure-sb/index.d.ts @@ -214,15 +214,15 @@ export namespace Azure.ServiceBus { // [x: string]: string | Dictionary; // } + export const ActiveMessageCount = 'd2p1:ActiveMessageCount'; + export const DeadLetterMessageCount = 'd2p1:DeadLetterMessageCount'; + export const ScheduledMessageCount = 'd2p1:ScheduledMessageCount'; + export const TransferMessageCount = 'd2p1:TransferMessageCount'; + export const TransferDeadLetterMessageCount = 'd2p1:TransferDeadLetterMessageCount'; + export interface Topic extends ExtendedBase { AccessedAt: DateString; - CountDetails: { - 'd2p1:ActiveMessageCount': string; - 'd2p1:DeadLetterMessageCount': string; - 'd2p1:ScheduledMessageCount': string; - 'd2p1:TransferMessageCount': string; - 'd2p1:TransferDeadLetterMessageCount': string; - }; + CountDetails: { [key: string]: string }; EnableSubscriptionPartitioning: string; FilteringMessagesBeforePublishing: string; IsExpress: string; @@ -242,13 +242,7 @@ export namespace Azure.ServiceBus { } export interface Subscription extends ExtendedBase { - CountDetails: { - 'd3p1:ActiveMessageCount': string; - 'd3p1:DeadLetterMessageCount': string; - 'd3p1:ScheduledMessageCount': string; - 'd3p1:TransferMessageCount': string; - 'd3p1:TransferDeadLetterMessageCount': string; - }; + CountDetails: { [key: string]: string }; DeadLetteringOnFilterEvaluationExceptions: string; DeadLetteringOnMessageExpiration: string; LockDuration: string; @@ -315,6 +309,8 @@ export namespace Azure.ServiceBus { export type CreateSubscriptionOptions = Partial; export type ListSubscriptionsOptions = Partial; export type ListRulesOptions = Partial; + export type ListTopicsOptions = Partial; + export type ListQueuesOptions = Partial; export type CreateRuleOptions = Partial; export type CreateNotificationHubOptions = Partial; export type ListNotificationHubsOptions = Partial; diff --git a/types/azure-sb/lib/servicebusservice.d.ts b/types/azure-sb/lib/servicebusservice.d.ts index 44f2b2c522..45600a1661 100644 --- a/types/azure-sb/lib/servicebusservice.d.ts +++ b/types/azure-sb/lib/servicebusservice.d.ts @@ -11,6 +11,8 @@ import CreateTopicOptions = Azure.ServiceBus.CreateTopicOptions; import ListNotificationHubsOptions = Azure.ServiceBus.ListNotificationHubsOptions; import ListRulesOptions = Azure.ServiceBus.ListRulesOptions; import ListSubscriptionsOptions = Azure.ServiceBus.ListSubscriptionsOptions; +import ListTopicsOptions = Azure.ServiceBus.ListTopicsOptions; +import ListQueuesOptions = Azure.ServiceBus.ListQueuesOptions; import MessageOrName = Azure.ServiceBus.MessageOrName; import Queue = Azure.ServiceBus.Results.Models.Queue; import ReceiveQueueMessageOptions = Azure.ServiceBus.ReceiveQueueMessageOptions; @@ -88,7 +90,8 @@ declare class ServiceBusService extends ServiceBusServiceBase { public getQueue(queuePath: string, callback: TypedResultAndResponseCallback): void; - public listQueues(queuePath: string, + public listQueues(callback: TypedResultAndResponseCallback): void; + public listQueues(options: ListQueuesOptions, callback: TypedResultAndResponseCallback): void; /* @@ -115,7 +118,8 @@ declare class ServiceBusService extends ServiceBusServiceBase { public getTopic(topicPath: string, callback: TypedResultAndResponseCallback): void; - public listTopics(topicPath: string, + public listTopics(callback: TypedResultAndResponseCallback): void; + public listTopics(options: ListTopicsOptions, callback: TypedResultAndResponseCallback): void; /* diff --git a/types/azure-sb/lib/servicebusserviceclient.d.ts b/types/azure-sb/lib/servicebusserviceclient.d.ts index c97b1e3107..1730b642c3 100644 --- a/types/azure-sb/lib/servicebusserviceclient.d.ts +++ b/types/azure-sb/lib/servicebusserviceclient.d.ts @@ -1,14 +1,13 @@ -/// -import EventEmitter = NodeJS.EventEmitter; +import ServiceClient = require('azure-sb/lib/serviceclient'); -declare class ServiceBusServiceClient extends EventEmitter { +declare class ServiceBusServiceClient extends ServiceClient { constructor(accessKey?: string, issuer?: string, sharedAccessKeyName?: string, sharedAccessKeyValue?: string, host?: string, acsHost?: string, - authenticationProvider?: object); + authenticationProvider?: object); } export = ServiceBusServiceClient; diff --git a/types/azure-sb/lib/serviceclient.d.ts b/types/azure-sb/lib/serviceclient.d.ts new file mode 100644 index 0000000000..3e39052235 --- /dev/null +++ b/types/azure-sb/lib/serviceclient.d.ts @@ -0,0 +1,8 @@ +/// +import EventEmitter = NodeJS.EventEmitter; +declare class ServiceClient extends EventEmitter { + public host: string; + public port: number; + public protocol: string; +} +export = ServiceClient; diff --git a/types/azure-sb/tsconfig.json b/types/azure-sb/tsconfig.json index 6e015480dc..61e37ac754 100644 --- a/types/azure-sb/tsconfig.json +++ b/types/azure-sb/tsconfig.json @@ -30,6 +30,7 @@ "lib/models/subscriptionresult.d.ts", "lib/models/notificationhubresult.d.ts", "lib/models/resourceresult.d.ts", + "lib/serviceclient.d.ts", "lib/servicebusserviceclient.d.ts", "lib/gcmservice.d.ts", "lib/wnsservice.d.ts", @@ -38,4 +39,4 @@ "azure-sb-tests.ts", "index.d.ts" ] -} \ No newline at end of file +} diff --git a/types/backbone.marionette/index.d.ts b/types/backbone.marionette/index.d.ts index cd8ccd3821..7626d60d56 100644 --- a/types/backbone.marionette/index.d.ts +++ b/types/backbone.marionette/index.d.ts @@ -1,6 +1,9 @@ // Type definitions for Marionette 3.3 // Project: https://github.com/marionettejs/ -// Definitions by: Zeeshan Hamid , Natan Vivo , Sven Tschui +// Definitions by: Zeeshan Hamid , +// Natan Vivo , +// Sven Tschui , +// Volker Nauruhn // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -1394,27 +1397,27 @@ export class CollectionView, childView: TView): void; /** * This callback function allows you to know when a child / child view * instance has been added to the collection view. It provides access to * the view instance for the child that was added. */ - onAddChild(childView: TView): void; + onAddChild(collectionView: CollectionView, childView: TView): void; /** * This callback function allows you to know when a childView instance is * about to be removed from the collectionView. It provides access to the * view instance for the child that was removed. */ - onBeforeRemoveChild(childView: TView): void; + onBeforeRemoveChild(collectionView: CollectionView, childView: TView): void; /** * This callback function allows you to know when a child / childView * instance has been deleted or removed from the collection. */ - onRemoveChild(childView: TView): void; + onRemoveChild(collectionView: CollectionView, childView: TView): void; /** * Automatically destroys this Collection's children and cleans up diff --git a/types/baidumap-web-sdk/baidumap-web-sdk-tests.ts b/types/baidumap-web-sdk/baidumap-web-sdk-tests.ts index 8ac6457975..3ac593a651 100644 --- a/types/baidumap-web-sdk/baidumap-web-sdk-tests.ts +++ b/types/baidumap-web-sdk/baidumap-web-sdk-tests.ts @@ -20,5 +20,8 @@ namespace BMapTests { map.addOverlay(marker); marker.setAnimation(BMAP_ANIMATION_BOUNCE); } + public create_map(map: BMap.Map, city: string) { + map.centerAndZoom(city); + } } } diff --git a/types/baidumap-web-sdk/baidumap.core.d.ts b/types/baidumap-web-sdk/baidumap.core.d.ts index 24d1aed9f0..a12b78788a 100644 --- a/types/baidumap-web-sdk/baidumap.core.d.ts +++ b/types/baidumap-web-sdk/baidumap.core.d.ts @@ -56,6 +56,7 @@ declare namespace BMap { getZoom(): number getPanorama(): Panorama centerAndZoom(center: Point, zoom: number): void + centerAndZoom(city: string): void panTo(center: Point, opts?: PanOptions): void panBy(x: number, y: number, opts?: PanOptions): void reset(): void diff --git a/types/base64-url/base64-url-tests.ts b/types/base64-url/base64-url-tests.ts new file mode 100644 index 0000000000..fd5c07cac0 --- /dev/null +++ b/types/base64-url/base64-url-tests.ts @@ -0,0 +1,9 @@ +import * as base64url from 'base64-url'; + +base64url.encode('Node.js is awesome.'); // $ExpectType string +base64url.decode('Tm9kZS5qcyBpcyBhd2Vzb21lLg'); // $ExpectType string +base64url.escape('This+is/goingto+escape=='); // $ExpectType string +base64url.unescape('This-is_goingto-escape'); // $ExpectType string + +base64url.encode('string to encode', 'ascii'); // $ExpectType string +base64url.decode('string to decode', 'ascii'); // $ExpectType string diff --git a/types/base64-url/index.d.ts b/types/base64-url/index.d.ts new file mode 100644 index 0000000000..1065cb9115 --- /dev/null +++ b/types/base64-url/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for base64-url 2.2 +// Project: https://github.com/joaquimserafim/base64-url +// Definitions by: Uri Shaked +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function decode(value: string, encoding?: string): string; +export function encode(value: string, encoding?: string): string; +export function escape(value: string): string; +export function unescape(value: string): string; diff --git a/types/base64-url/tsconfig.json b/types/base64-url/tsconfig.json new file mode 100644 index 0000000000..26ccd93511 --- /dev/null +++ b/types/base64-url/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "base64-url-tests.ts" + ] +} diff --git a/types/base64-url/tslint.json b/types/base64-url/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/base64-url/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/bell/bell-tests.ts b/types/bell/bell-tests.ts new file mode 100644 index 0000000000..65b3e5f4d5 --- /dev/null +++ b/types/bell/bell-tests.ts @@ -0,0 +1,106 @@ +import { RequestQuery, Server } from 'hapi'; +import * as bell from 'bell'; + +async function run() { + const server = new Server({ port: 8000 }); + await server.register(bell); + + server.auth.strategy('arcgisonline', 'bell', { + provider: 'twitter', + password: 'some cookie password', + location: 'http://example.com/oauth', + clientId: '', + clientSecret: '', + scope(request) { + const scopes = ['public_profile', 'email']; + if (( request.query).wantsSharePermission) { + scopes.push('publish_actions'); + } + return scopes; + } + }); + + const providers: bell.BellOptions[] = [{ + provider: 'discord', + password: 'cookie_encryption_password_secure', + isSecure: false, + clientId: '', + clientSecret: '', + location: () => '', + }, + { + provider: 'facebook', + password: 'cookie_encryption_password_secure', + isSecure: false, + clientId: '', + clientSecret: '', + location: server.info.uri + }, + { + provider: 'google', + password: 'cookie_encryption_password_secure', + isSecure: false, + clientId: '', + clientSecret: '', + location: server.info.uri + }, + { + provider: 'linkedin', + password: 'cookie_encryption_password_secure', + isSecure: false, + clientId: '', + clientSecret: '', + providerParams: { + redirect_uri: server.info.uri + '/bell/door' + } + }, + { + provider: 'meetup', + password: 'cookie_encryption_password_secure', + isSecure: false, + clientId: '', + clientSecret: '', + scope: ['basic', 'ageless', 'group_edit', 'reporting'], + }, + { + provider: 'nest', + password: 'cookie_encryption_password_secure', + isSecure: false, + clientId: '', + clientSecret: '' + }, + { + provider: 'office365', + clientId: '', + clientSecret: '', + password: 'cookie_encryption_password_secure', + providerParams: { + response_type: 'code' + }, + scope: ['openid', 'offline_access', 'profile'] + }, + { + provider: 'okta', + config: { uri: 'https://your-organization.okta.com' }, + password: 'cookie_encryption_password_secure', + isSecure: false, + location: 'http://127.0.0.1:8000', + clientId: '', + clientSecret: '' + }, + { + provider: 'slack', + password: 'cookie_encryption_password_secure', + isSecure: false, + clientId: '', + clientSecret: '' + }, + { + provider: 'twitch', + password: 'cookie_encryption_password_secure', + isSecure: false, + clientId: '', + clientSecret: '', + scope: ['user_read', 'channel_read'] + }]; +} diff --git a/types/bell/index.d.ts b/types/bell/index.d.ts new file mode 100644 index 0000000000..14cdc65cb9 --- /dev/null +++ b/types/bell/index.d.ts @@ -0,0 +1,269 @@ +// Type definitions for bell 9.1 +// Project: https://github.com/hapijs/bell +// Definitions by: Simon Schick +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.7 + +import { Server, Request, Plugin, AuthCredentials } from 'hapi'; + +declare module 'hapi' { + interface ServerAuth { + strategy(name: string, scheme: 'bell', options: BellOptions): void; + strategy( + name: string, + scheme: 'bell', + mode: boolean | 'required' | 'optional' | 'try', + options: BellOptions, + ): void; + } +} + +export interface StringLikeMap { + [key: string]: string | number; +} +export type Provider = + 'arcgisonline' | + 'auth0' | + 'azuread' | + 'bitbucket' | + 'digitalocean' | + 'discord' | + 'dropbox' | + 'dropboxV2' | + 'facebook' | + 'fitbit' | + 'foursquare' | + 'github' | + 'gitlab' | + 'google' | + 'googleplus' | + 'instagram' | + 'linkedin' | + 'live' | + 'medium' | + 'meetup' | + 'mixer' | + 'nest' | + 'office365' | + 'okta' | + 'phabricator' | + 'pingfed' | + 'pinterest' | + 'reddit' | + 'salesforce' | + 'slack' | + 'spotify' | + 'stripe' | + 'trakt' | + 'tumblr' | + 'twitch' | + 'twitter' | + 'vk' | + 'wordpress' | + 'yahoo'; + +export type RequestPassThrough = ( + request: Request, + next: (err: Error | null, credentials: AuthCredentials) => void, +) => void; + +export interface OptionalOptions { + /** + * the name of the cookie used to manage the temporary state. + * Defaults to 'bell-provider' where 'provider' is the provider name (or 'custom' for custom providers). + * For example, the Twitter cookie name defaults to 'bell-twitter'. + */ + cookie?: string; + /** + * sets the cookie secure flag. + * Defaults to true. + */ + isSecure?: boolean; + /** + * sets the cookie HTTP only flag. + * Defaults to true. + */ + isHttpOnly?: boolean; + /** + * cookie time-to-live in milliseconds. + * Defaults to null (session time-life - cookies are deleted when the browser is closed). + */ + ttl?: number; + /** + * the domain scope. + * Defaults to null (no domain). + */ + domain?: string; + /** + * provider-specific query parameters for the authentication endpoint. + * It may be passed either as an object to merge into the query string, + * or a function which takes the client's request and returns an object. + * Each provider supports its own set of parameters which customize the user's login experience. + * For example: + * * Facebook supports `display` ('page', 'popup', or 'touch'), `auth_type`, `auth_nonce`. + * * Google supports `access_type`, `approval_prompt`, `prompt`, `login_hint`, `user_id`, `hd`. + * * Twitter supports `force_login`, `screen_name`. + * * Linkedin supports `fields`. + */ + providerParams?: StringLikeMap | ((request: Request) => StringLikeMap); + /** + * allows passing query parameters from a bell protected endpoint to the auth request. + * It will merge the query params you pass along with the providerParams and any other predefined ones. + * Be aware that this will override predefined query parameters! + * Default to false. + */ + allowRuntimeProviderParams?: StringLikeMap | boolean; + /** + * Each built-in vendor comes with the required scope for basic profile information. + * Use scope to specify a different scope as required by your application. + * It may be passed either as an object to merge into the query string, + * or a function which takes the client's request and returns an object. + * Consult the provider for their specific supported scopes. + */ + scope?: string[] | ((request: Request) => string[]); + /** + * skips obtaining a user profile from the provider. + * Useful if you need specific scopes, + * but not the user profile. + * Defaults to false. + */ + skipProfile?: boolean; + /** + * a configuration object used to customize the provider settings. + * The built-in 'twitter' provider accepts the `extendedProfile` & `getMethod` options. + * option which allows disabling the extra profile request when the provider + * returns the user information in the callback (defaults to true). + * The built-in 'github' and 'phabricator' providers accept the uri + * option which allows pointing to a private enterprise installation (e.g. 'https://vpn.example.com'). + * See Providers documentation for more information. + */ + config?: { extendedProfile?: boolean; getMethod?: string } | { uri?: string }; + /** + * an object of key-value pairs that specify additional + * URL query parameters to send with the profile request to the provider. + * The built-in facebook provider, + * for example, could have fields specified to determine the fields returned from the user's graph, + * which would then be available to you in the auth.credentials.profile.raw object. + */ + profileParams?: StringLikeMap; + /** + * allows passing additional OAuth state from initial request. + * This must be a function returning a string, + * which will be appended to the bell internal state parameter for OAuth code flow. + */ + runtimeStateCallback?(req: Request): string; + + // THESE ARE IN THE *REQUIRED* section but are actually not... + /** + * A boolean indicating whether or not you want the redirect_uri to be forced to https. + * Useful if your hapi application runs as http, but is accessed through https. + */ + forceHttps?: boolean; + /** + * Set the base redirect_uri manually if it cannot be inferred properly from server settings. + * Useful to override port, protocol, and host if proxied or forwarded. + */ + location?: string | ((req: Request) => string); +} + +export interface RequiredProviderOptions { + /** + * the cookie encryption password. + * Used to encrypt the temporary state cookie used by the module in + * between the authorization protocol steps. + */ + password: string; + /** + * the OAuth client identifier (consumer key). + */ + clientId: string; + /** + * the OAuth client secret (consumer secret) + */ + clientSecret: string; +} + +export interface KnownProviderOptions extends RequiredProviderOptions, OptionalOptions { + provider: Provider; +} + +/** + * @param uri the requested resource URI (bell will add the token or authentication header as needed). + * @param params any URI query parameters (cannot include them in the URI due to signature requirements). + */ +export type AuthedRequest = (uri: string, params: { [key: string]: string } | null) => Promise; + +export interface CustomProtocol { + /** + * the authorization protocol used. + */ + protocol: 'oauth' | 'oauth2'; + /** + * the OAuth signature method (OAuth 1.0a only). Must be one of: + * * 'HMAC-SHA1' - default + * * 'RSA-SHA1' - in that case, the clientSecret is your RSA private key + */ + signatureMethod?: 'HMAC-SHA1' | 'RSA-SHA1'; + /** + * the temporary credentials (request token) endpoint (OAuth 1.0a only). + */ + temporary?: string; + /** + * boolean that determines if OAuth client id and client secret will be sent + * as parameters as opposed to an Authorization header (OAuth 2.0 only). + * Defaults to false. + */ + useParamsAuth?: boolean; + /** + * the authorization endpoint URI. + */ + auth: string; + /** + * the access token endpoint URI. + */ + token: string; + /** + * the OAuth version. + */ + version?: string; + /** + * an array of scope strings (OAuth 2.0 only). + */ + scope?: string[] | ((query: StringLikeMap) => string[]); + /** + * the scope separator character (OAuth 2.0 only). Only required when a provider has a broken OAuth 2.0 implementation. Defaults to space (Facebook and GitHub default to comma). + */ + scopeSeparator?: string; + /** + * a headers object with additional headers required by the provider + * (e.g. GitHub required the 'User-Agent' header which is set by default). + */ + headers?: { + [key: string]: string; + }; + /** + * a function used to obtain user profile information and normalize it. + * @param credentials the credentials object. + * Change the object directly within the function (profile information is typically stored under credentials.profile). + * @param params the parsed information received from the provider (e.g. token, secret, and other custom fields). + * @param get an OAuth helper function to make authenticated requests using the credentials received. + */ + profile(credentials: any, params: { [key: string]: string }, get: AuthedRequest): Promise; +} + +export interface CustomProviderOptions extends RequiredProviderOptions, OptionalOptions { + provider: CustomProtocol; +} + +export type BellOptions = CustomProviderOptions | KnownProviderOptions; + +export const plugin: Plugin; +/** + * Enables simulation mode. + */ +export function simulate(credentialsFunc: RequestPassThrough): void; +/** + * [See docs](https://github.com/hapijs/bell/blob/master/API.md#simulated-authentication) + * Disables simulation mode + */ +export function simulate(state: false): void; diff --git a/types/bell/tsconfig.json b/types/bell/tsconfig.json new file mode 100644 index 0000000000..4db30822b8 --- /dev/null +++ b/types/bell/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "strictFunctionTypes": true, + "strictNullChecks": true, + "noImplicitAny": true, + "noImplicitThis": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "bell-tests.ts" + ] +} diff --git a/types/bell/tslint.json b/types/bell/tslint.json new file mode 100644 index 0000000000..843d627f89 --- /dev/null +++ b/types/bell/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "unified-signatures": false // Disabling as it prevents me from using overloaded doctags + } +} diff --git a/types/big.js/index.d.ts b/types/big.js/index.d.ts index 405622f7ee..8b61c73d37 100644 --- a/types/big.js/index.d.ts +++ b/types/big.js/index.d.ts @@ -102,6 +102,12 @@ export interface BigConstructor { export interface Big { /** Returns a Big number whose value is the absolute value, i.e. the magnitude, of this Big number. */ abs(): Big; + /** + * Returns a Big number whose value is the value of this Big number plus n - alias for .plus(). + * + * @throws `NaN` if n is invalid. + */ + add(n: BigSource): Big; /** * Compare the values. * @@ -162,6 +168,12 @@ export interface Big { * @throws `NaN` if n is negative or otherwise invalid. */ mod(n: BigSource): Big; + /** + * Returns a Big number whose value is the value of this Big number times n - alias for .times(). + * + * @throws `NaN` if n is invalid. + */ + mul(n: BigSource): Big; /** * Returns a Big number whose value is the value of this Big number plus n. * @@ -196,6 +208,12 @@ export interface Big { * @throws `NaN` if this Big number is negative. */ sqrt(): Big; + /** + * Returns a Big number whose value is the value of this Big number minus n - alias for .minus(). + * + * @throws `NaN` if n is invalid. + */ + sub(n: BigSource): Big; /** * Returns a Big number whose value is the value of this Big number times n. * diff --git a/types/big.js/test/big.js-global-tests.ts b/types/big.js/test/big.js-global-tests.ts index 578391de7b..a57e748fbf 100644 --- a/types/big.js/test/big.js-global-tests.ts +++ b/types/big.js/test/big.js-global-tests.ts @@ -86,6 +86,7 @@ function minusTests() { 0.3 - 0.1; // 0.19999999999999998 const x = new Big(0.3); x.minus(0.1); // '0.2' + x.sub(0.1); // '0.2' } function modTests() { @@ -99,6 +100,7 @@ function plusTests() { const x = new Big(0.1); const y = x.plus(0.2); // '0.3' Big(0.7).plus(x).plus(y); // '1' + Big(0.7).add(x).add(y); // '1' } function powTests() { @@ -138,6 +140,7 @@ function timesTests() { const x = new Big(0.6); const y = x.times(3); // '1.8' Big('7e+500').times(y); // '1.26e+501' + Big('7e+500').mul(y); // '1.26e+501' } function toExponentialTests() { diff --git a/types/big.js/test/big.js-module-tests.ts b/types/big.js/test/big.js-module-tests.ts index 056d41727b..62e5ba491e 100644 --- a/types/big.js/test/big.js-module-tests.ts +++ b/types/big.js/test/big.js-module-tests.ts @@ -88,6 +88,7 @@ function minusTests() { 0.3 - 0.1; // 0.19999999999999998 const x = new Big(0.3); x.minus(0.1); // '0.2' + x.sub(0.1); // '0.2' } function modTests() { @@ -101,6 +102,7 @@ function plusTests() { const x = new Big(0.1); const y = x.plus(0.2); // '0.3' Big(0.7).plus(x).plus(y); // '1' + Big(0.7).add(x).add(y); // '1' } function powTests() { @@ -140,6 +142,7 @@ function timesTests() { const x = new Big(0.6); const y = x.times(3); // '1.8' Big('7e+500').times(y); // '1.26e+501' + Big('7e+500').mul(y); // '1.26e+501' } function toExponentialTests() { diff --git a/types/bigi/bigi-tests.ts b/types/bigi/bigi-tests.ts index ef9d7421d3..0e4822aeb6 100644 --- a/types/bigi/bigi-tests.ts +++ b/types/bigi/bigi-tests.ts @@ -7,3 +7,10 @@ const b3 = b1.multiply(b2); console.log(b3.toHex()); // => ae499bfe762edfb416d0ce71447af67ff33d1760cbebd70874be1d7a5564b0439a59808cb1856a91974f7023f72132 + +const b4 = BigInteger.valueOf(42); +const b5 = BigInteger.valueOf(10); +const b6 = b4.multiply(b5); + +console.log(b6); +// => BigInteger { '0': 420, '1': 0, t: 1, s: 0 } diff --git a/types/bigi/index.d.ts b/types/bigi/index.d.ts index c991b13fac..7b44ff75e4 100644 --- a/types/bigi/index.d.ts +++ b/types/bigi/index.d.ts @@ -87,7 +87,7 @@ declare class bigi { static fromDERInteger(byteArray?: any): number; static fromHex(hex: string): bigi; static isBigInteger(obj: any, check_ver: any): obj is bigi; - static valueOf(i: any): number; + static valueOf(i: any): bigi; } declare namespace bigi { interface Constants { diff --git a/types/bingmaps/Autosuggest.d.ts b/types/bingmaps/Autosuggest.d.ts deleted file mode 100644 index 7d83ca6e4b..0000000000 --- a/types/bingmaps/Autosuggest.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -declare module Microsoft.Maps { - /** Options used to customize the autosuggest functionality. */ - export interface IAutosuggestOptions { - /** Specifies if street address suggestions should be returned. Default: true */ - addressSuggestions?: boolean; - - /** - * Specifies if the user’s location should be auto detected using their IP address, if no location information is provided - * in the userLocation property. Default: true - */ - autoDetectLocation?: boolean; - - /** - * A bounding box that is used to help influence the results such that locations that are in or near this bounding box - * are given more weight than they would normally. - */ - bounds?: LocationRect; - - /** - * A reference to a map instance. If the useMapView property is set to true, the bounding box of the map view will be used - * to influence the weight of suggestions. - */ - map?: Map; - - /** The maximum number of results to return. Can be any value between 1 and 10. Default: 5 */ - maxResults?: number; - - /** Specifies if place suggestions (city, landmark, etc.) should be returned. Default: true */ - placeSuggestions?: boolean; - - /** - * Indicates if the maps bounding box should be used to influence the suggested results. Ignored if the bounds property is - * set. Default: true - */ - useMapView?: boolean; - - /** A coordinate indicating where the user is located. This will influence the results to be more relevant to the user. */ - userLocation?: Location; - } - - /** Represents the suggestion result from the Autosuggest manager. */ - export interface ISuggestionResult { - /** A structured address object for the result. */ - address: IAddress; - - /** A LocationRect that can be used to set the map view over the result. */ - bestView: LocationRect; - - /** Unique entity id to be used for searching the entity. */ - entityId: string; - - /** The type of the result; Address, Place */ - entityType: string; - - /** The sub type of result; Address, RoadBlock, PopulatedPlace, CountryRegion, etc. */ - entitySubType: string; - - /** A nicely formatted suggestion string for the result based on market. */ - formattedSuggestion: string; - - /** - * The coordinate of the result. This value is only returned for place (city, landmarks) results and not for addresses. - * Street addresses will need to be geocoded to get their location. - */ - location: Location; - - /** A secondary title that provides additional context to the title value of the suggestion. **/ - subtitle: string; - - /** The display title for the result (i.e. “Redmond”). */ - title: string; - } - - /** - * The AutosuggestManager is the primary class in the Autosuggest module that powers the autosuggest functionality. - * @requires The Microsoft.Maps.Autosuggest module. - */ - export class AutosuggestManager { - /** - * @constructor - * @requires The Microsoft.Maps.Autosuggest module. - * @param options The options to use with the autosuggest manager. - */ - constructor(options?: IAutosuggestOptions); - - /** - * Attaches the Autosuggest functionality to an input box. - * @param suggestionBoxId The HTML element identifier of the input box. - * @param suggestionContainerId The Id of container where suggestions will be displayed. - * @param selectedSuggestionCallback A reference to a callback function that will be called when a user selects a suggestion from the Autosuggest UI. - */ - public attachAutosuggest(suggestionBoxId: string, suggestionContainerId: string, selectedSuggestionCallback: (result: ISuggestionResult) => void) : void; - - /** Detaches the autosuggest functionality from the input box, freeing any resources it has or events it has tied to. */ - public detachAutosuggest(): void; - - /** Disposes the Autosuggest object, freeing any resources it has or events it has tied to. */ - public dispose(): void; - - /** - * Gets the options currently used by the autosuggest manager. - * @returns The options currently used by the autosuggest manager. - */ - public getOptions(): IAutosuggestOptions; - - /** - * Sets the options currently used by the autosuggest manager. - * @param options The options to use with the autosuggest manager. - */ - public setOptions(options?: IAutosuggestOptions): void; - } -} \ No newline at end of file diff --git a/types/bingmaps/Clustering.d.ts b/types/bingmaps/Clustering.d.ts deleted file mode 100644 index 17c9425933..0000000000 --- a/types/bingmaps/Clustering.d.ts +++ /dev/null @@ -1,142 +0,0 @@ -declare module Microsoft.Maps { - /** The options used to customize how the ClusterLayer functions. */ - export interface IClusterLayerOptions { - /** - * A callback function that is fired after the clustering for a map view has completed. This is useful if you want to generate a list of locations based on what is in the current view. - */ - callback?: () => void; - - /** - * A callback function that allows you to process a clustered pushpin before it is added to a layer. This is useful if you want to add events or set style options on the clustered pushpin. - */ - clusteredPinCallback?: (pin: ClusterPushpin) => void; - - /** - * Indicates if the layer should cluster the locations or not. Default: true - */ - clusteringEnabled?: boolean; - - /** - * Defines how clusters are positioned on the map. Default: MeanAverage - */ - clusterPlacementType?: ClusterPlacementType; - - /** - * The width and height of the gird cells used for clustering in pixels. Default: 45 - */ - gridSize?: number; - - /** - * Offsets the placement of clustered pushpins by a set number of pixels. This option is only available when the placement type is set to GridCenter. - * This is useful if you have multiple cluster layers on the map and you want to offset the clustered pushpins between the layers so that they are visible, - * otherwise the clusters from the different layers would overlap completely. - */ - layerOffset?: Point; - - /** - * A boolean indicating if the layer is visible or not. - */ - visible?: boolean; - - /** - * The z-index of the layer. - */ - zIndex?: number; - } - - /** - * Used to specify how a clustered pushpin should be positioned relative to the pushpins it contains. - * @requires The Microsoft.Maps.Clustering module. - */ - export enum ClusterPlacementType { - /** - * Mean Average placement calculates the average position of a group of coordinates. This method creates a more realistic representation of the data, - * however requires more processing power and increases the chances of pushpins overlapping. - */ - MeanAverage, - - /** - * This method is the simplest way to represent a cluster. It places the cluster at the first location in the cluster. This method may not accurately - * represent the data but requires little processing power. - */ - FirstLocation - } - - /** - * This class extends the Pushpin class and has all the same methods and properties plus the following properties. - * @requires The Microsoft.Maps.Clustering module. - */ - export class ClusterPushpin extends Pushpin { - /** An array of all the pushpins that are in the cluster. */ - containedPushpins: Pushpin[]; - - /** - * The grid cell key that can be used retrieve the clustered pushpin(s) from the clustering layer. This is useful when creating a clickable list that - * link items in the list to clusters or pushpins on the map. Your list just needs to store the gridKey value. - */ - gridKey: number; - } - - /** - * This class allows you to easily add in client side clustering to your application. Client Side Clustering is a method where pushpins that are close - * together are grouped and represented as a single pushpin, often using a different icon to indicate the cluster. This is a great way to improve both - * the user experience and performance of the map. - * @requires The Microsoft.Maps.Clustering module. - */ - export class ClusterLayer implements IDataLayer { - /** - * @constructor - * @requires The Microsoft.Maps.Clustering module. - * @param pushpins An array of pushpins to cluster in the layer. - * @param options The options used to customize how the ClusterLayer functions. - */ - constructor(pushpins: Pushpin[], options?: IClusterLayerOptions); - - /** Clears all the data in the cluster layer. */ - public clear(): void; - - /** - * Gets all the pushpins that are in the current map view. If clustering is disabled, all pushpins in the clustering layer are returned. - * @returns All the pushpins that are in the current map view. If clustering is disabled, all pushpins in the clustering layer are returned. - */ - public getDisplayedPushpins(): Pushpin[]; - - /** - * Gets the current options used by the cluster layer. - * @returns The current options used by the cluster layer. - */ - public getOptions(): IClusterLayerOptions; - - /** - * Gets all pushpins that are in the layers. - * @returns An array of all the pushpins that are in the layers. - */ - public getPushpins(): Pushpin[]; - - /** - * Gets the original pushpins that are in the specified grid cell. - * @param The gridKey index to retrieve the pushpins for. - * @returns The original pushpins that are in the specified grid cell. - */ - public getPushpinsByGridKey(gridKey: number): Pushpin[]; - - /** - * Gets the pushpin in the specified cluster grid cell which can be either a ClusterPushpin if there are multiple pushpins in a cell or a single Pushpin. - * @param The gridKey index to retrieve the pushpins for. - * @returns The pushpin in the specified cluster grid cell which can be either a ClusterPushpin if there are multiple pushpins in a cell or a single Pushpin. - */ - public getClusterPushpinByGridKey(gridKey: number): ClusterPushpin | Pushpin; - - /** - * Sets the clustering options to use in the layer. - * @params options The clustering options to use in the layer. - */ - public setOptions(options: IClusterLayerOptions): void; - - /** - * Sets the array of pushpins that are used in the clustering layer. - * @param pushpins An array of pushpins that are to be used by the clustering layer. - */ - public setPushpins(pushpins: Pushpin[]): void; - } -} \ No newline at end of file diff --git a/types/bingmaps/Contour.d.ts b/types/bingmaps/Contour.d.ts deleted file mode 100644 index cd2d9767c7..0000000000 --- a/types/bingmaps/Contour.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -declare module Microsoft.Maps { - - /** - * The contour layer options - */ - interface IContourLayerOptions { - /** The z-index of this layer */ - zIndex?: number; - - /** Whether the layer is visible */ - visible?: boolean; - - /** A callback function which defines the color of the contour line fill. */ - colorCallback?: (contourValue: number | string) => string | Color; - - /** The polygon options that apply to all contour lines of this layer */ - polygonOptions?: IPolygonOptions; - } - - /** - * The contour line of a contour layer - */ - export class ContourLine extends Polygon { - /** The contour lines that are directly nested inside this contour line */ - public innerContourLines: ContourLine[]; - - /** The outer/parent contour line of this contour */ - public outerContourLine: ContourLine; - - /** The data value associated with this contour line */ - public contourValue: number | string; - - /** - * @constructor - * @param boundary The boundary of this contour line - * @param contourValue The value associated with this contour line - */ - constructor(boundary: Location[], contourValue?: number | string); - } - - /** - * The contour layer class. - */ - export class ContourLayer extends Layer { - /** - * @constructor - * @param contourLines The contour lines that compose this layer. - * @param options The contour layer options. - */ - constructor(contourLines: ContourLine[], options?: IContourLayerOptions); - - /** - * Clears all data on the contour layer. - */ - public clear(): void; - - /** - * Gets the contour lines of this layer. - * @returns The contour lines of this layer. - */ - public getContourLines(): ContourLine[]; - - /** - * Gets the polygons that were generated from the contour lines in this layer. - * @returns The polygons that were generated from the contour lines in this layer. - */ - public getContourPolygons(): Polygon[]; - - /** - * Retrieves the options of this contour layer. - * @returns The options of this contour layer. - */ - public getOptions(): IContourLayerOptions; - - /** - * Sets the contour lines used to calculate the polygon areas of this layer. - * @param contourLines The contour lines used to calculate the polygon areas of this layer. - */ - public setContourLines(contourLines: ContourLine[]): void; - - /** - * Sets the options of the contour layer. - * @param options The new options to update the layer. - */ - public setOptions(options: IContourLayerOptions): void; - } -} \ No newline at end of file diff --git a/types/bingmaps/DataBinning.d.ts b/types/bingmaps/DataBinning.d.ts deleted file mode 100644 index e33b2d5113..0000000000 --- a/types/bingmaps/DataBinning.d.ts +++ /dev/null @@ -1,148 +0,0 @@ -/// - -declare module Microsoft.Maps { - - /** - * Specifies the shape of data bin rendered in the layer. - */ - export enum DataBinType { - /* Renders data bins as circles in a square grid. */ - circle, - - /* Renders data bins as hexagons with a flat top edge. */ - hexagon, - - /* Renders data bins as circles in a hexagonal grid. */ - hexCircle, - - /* Renders data bins as hexagons with a pointy top corner. */ - pointyHexagon, - - /* Renders data bins as a square grid. */ - square - } - - /** - * A set options the define how a data binning layer is rendered. - */ - export interface IDataBinningOptions { - /* The name of a property in the Pushpin.metadata object on which to perform calculations (average, count, sum) against the pushpins in each data bin. */ - aggregationProperty?: string; - - /* - * A callback function which defines the color a data bin polygon should be. This callback recieves data bin information - * along with the min and max calculated metrics for the data set. If set, this callback function must return a color value. - */ - colorCallback?: (binInfo: IDataBinInfo, min: IDataBinMetrics, max: IDataBinMetrics) => string | Color; - - /* The shape of the data bin to generate. Default: hexagon */ - dataBinType?: DataBinType; - - /* The distance units of the radius option. Default: meters */ - distanceUnits?: SpatialMath.DistanceUnits; - - /* The default options used for rendering the data bin polygons. */ - polygonOptions?: IPolygonOptions; - - /* - * A spatial distance which will be converted into a pixel distance at the equater and used to generate symetrically sized data bins - * that have the apprimate spatial distance radius. Default: 1000 - */ - radius?: number; - - /* - * A callback function which defines how much to scale a data bins size. This callback recieves data bin information - * along with the min and max calculated metrics for the data set. If set, this callback function must return a number between 0 and 1. - */ - scaleCallback?: (binInfo: IDataBinInfo, min: IDataBinMetrics, max: IDataBinMetrics) => number; - } - - /** - * A set of values calculated from the pushpins in a data bin. - */ - export interface IDataBinMetrics { - - /* The average value of the aggregation property of the pushpins in a data bin. */ - average?: number; - - /* The number of pushpins in a data bin. */ - count?: number; - - /* The number of pushpins in the data bin who's aggregation property has a value. */ - countNotBlank?: number; - - /* The number of pushpins in the data bin who's aggregation property is a valid number. */ - countNumbers?: number; - - /* The sum of the aggregation property of the pushpins in a data bin. */ - sum?: number; - } - - /** - * The result of a calculated data bin. - */ - export interface IDataBinInfo { - /* An array of all the pushpins that are in the data bin. */ - containedPushpins: Microsoft.Maps.Pushpin[]; - - /* A set of calculated metric values determined using the aggregationProperty value of all the pushpins contained in the data bin. */ - metrics: IDataBinMetrics; - } - - /** - * A polygon which represents a data bin on the map and contains the data bin information. - */ - - export class DataBinPolygon extends Polygon { - /* Information about the data bin; the contained pushpins and calculated metrics. */ - public dataBinInfo: IDataBinInfo; - } - - /** - * This class provides a data binning visualization for the map. It takes in an array of pushpins, groups them into - * symmetrical shapes that fit together in a grid such as hexagons. Aggregation of data values are done and can be - * used to customize how the data bins are rendered on the map (i.e. scale / color) . - */ - export class DataBinningLayer extends Layer { - /** - * Initializes the data binning layer. - * @param pushpins The array of pushpins that are used to generate the data bins. - * @param options The options used for calculating and rendering the data bins. - */ - constructor(pushpins?: Pushpin[], options?: IDataBinningOptions); - - /** - * Gets the options used for calculating and rendering the data bins. - * @returns The options used for calculating and rendering the data bins. - */ - public getOptions(): IDataBinningOptions; - - /** - * Gets all pushpins that are in the layers. - * @returns All pushpins that are in the layers. - */ - public getPushpins(): Pushpin[]; - - /** - * Sets the array of pushpins that are used to generate the data bins. - * @param pushpins The array of pushpins that are used to generate the data bins. - */ - public setPushpins(pushpins: Pushpin[]): void; - - /** - * Clears all the data in the data binning layer. - */ - public clear(): void; - - /** - * Cleans up any resources this object is consuming. - */ - public dispose(): void; - - /** - * Sets the options used for calculating and rendering the data bins. - * @param options The options used for calculating and rendering the data bins. - */ - public setOptions(options: IDataBinningOptions): void; - } -} \ No newline at end of file diff --git a/types/bingmaps/Directions.d.ts b/types/bingmaps/Directions.d.ts deleted file mode 100644 index 3663fc8c21..0000000000 --- a/types/bingmaps/Directions.d.ts +++ /dev/null @@ -1,611 +0,0 @@ -declare module Microsoft.Maps.Directions { - ///////////////////////////////////// - /// Enumerations - //////////////////////////////////// - - /** Distance units for calculating the directions in. */ - export enum DistanceUnit { - - /** A distance in Kilometers. */ - km, - - /** A distance in Miles. */ - miles - } - - /** Defines the type of route to calculate. */ - export enum RouteMode { - /** Driving directions are calculated. */ - driving, - - /** Transit directions are calculated. */ - transit, - - /** Walking directions are calculated. */ - walking - } - - /** Defines features to avoid when calculating the route. */ - export enum RouteAvoidance { - /** Calculate the best route using any travel option available. */ - none = 0, - - /** Reduce the use of limited access highways when calculating the route. */ - minimizeHighways = 1, - - /** Reduce the use of roads with tolls when calculating the route. */ - minimizeToll = 2, - - /** Avoid using limited access highways when calculating the route. */ - avoidHighways = 4, - - /** Avoid using roads with tolls when calculating the route. */ - avoidToll = 8, - - /** Avoid using express trains when calculating the route. This option only affects routes with a transitRouteMode that have the culture set to ja-jp. */ - avoidExpressTrain = 16, - - /** Avoid using airlines when calculating the route. This option only affects routes with a transitRouteMode that have the culture set to ja-jp. */ - avoidAirline = 32, - - /** Avoid using bullet trains when calculating the route. This option only affects routes with a transitRouteMode that have the culture set to ja-jp. */ - avoidBulletTrain = 64 - } - - /** Response codes for a route calculation request. */ - export enum RouteResponseCode { - /** The route was successfully calculated. */ - success = 0, - - /** An unknown error has occurred. */ - unknownError = 1, - - /** A nearby road cannot be found for one or more of the route waypoints. */ - cannotFindNearbyRoad = 2, - - /** - * The distance between two route waypoints, or the total length of the route exceeds the limit of the route mode. - * Modify the waypoint locations so that they are closer together. - */ - tooFar = 3, - - /** - * A route cannot be calculated for the specified waypoints. For example, this code is returned when a route between - * “Seattle, WA” and “Honolulu, HI” is requested. - */ - noSolution = 4, - - /** There is no route data for the specified waypoints. */ - dataSourceNotFound = 5, - - /** There are no transit options available for the specified time. */ - noAvailableTransitTrip = 7, - - /** The transit stops are so close that walking is always a better option. */ - transitStopsTooClose = 8, - - /** The transit stops are so close that walking is a better option. */ - walkingBestAlternative = 9, - - /** - * There is no transit data available for the route or for one or more of the specified waypoints, - * or the waypoints are in different transit areas that do not overlap. - */ - outOfTransitBounds = 10, - - /** The directions calculation request has timed out. */ - timeOut = 11, - - /** - * One or more waypoints need to be disambiguated. This error does not occur if the - * autoDisplayDisambiguation directions render option is set to true. - */ - waypointDisambiguation = 12, - - /** One or more waypoints do not have an address or location specified. */ - hasEmptyWaypoint = 13, - - /** The maximum number of waypoints, which is 25, has been exceeded. */ - exceedMaxWaypointLimit = 14, - - /** At least two waypoints are required to calculate a route. */ - atleastTwoWaypointRequired = 15, - - /** The first or last waypoint is a via point, which is not allowed. */ - firstOrLastStoppointIsVia = 16, - - /** The search service failed to return results. */ - searchServiceFailed = 17, - - /** The credentials passed to the Directions module are invalid. */ - invalidCredentials = 18 - } - - /** Defines optimization options for calculating directions. */ - export enum RouteOptimization { - /** Calculate a route the shortest time. */ - shortestTime = 0, - - /** Calculate a route with the shortest distance. */ - shortestDistance = 1, - - /** The route is calculated to minimize the time and uses current traffic information. */ - timeWithTraffic = 2, - - /** The route is calculated to minimize the time and avoid road closures. Traffic information is not used in the calculation. */ - timeAvoidClosure = 3, - - /** Minimize the cost when calculating directions. This option only affects routes with a transitRouteMode that have the culture set to ja-jp.*/ - minimizeMoney = 4, - - /** Minimize transit transfers when calculating directions. This option only affects routes with a transitRouteMode that have the culture set to ja-jp.*/ - minimizeTransfers = 5, - - /** Minimize the amount of walking when calculating directions. This option only affects routes with a transitRouteMode that have the culture set to ja-jp.*/ - minimizeWalking = 6 - } - - /** An enumeration that specifies the releance of a dateTime when calculating a route. */ - export enum TimeType { - /** The dateTime parameter contains the desired arrival time for a transit request. */ - arrival, - - /** The dateTime parameter contains the desired departure time for a transit request. */ - departure, - - /** The dateTime parameter should be ignored and the first available transit taken. */ - firstAvailable, - - /** The dateTime parameter contains the latest departure time available for a transit request. */ - lastAvailable - } - - ///////////////////////////////////// - /// Interfaces - //////////////////////////////////// - - /** Contains the arguments for directions events. */ - export interface IDirectionsEventArgs { - /** The calculated route (or routes, if the route mode is transit). */ - route: IRoute[]; - - /** The route summary (or summaries) of the route(s) defined in the route property. */ - routeSummary: IRouteSummary[]; - } - - /** Contains arguments for directions error events. */ - export interface IDirectionsErrorEventArgs { - /** The code which identifies the error that occurred. */ - responseCode: RouteResponseCode; - - /** The error message. */ - message: string; - } - - /** Represents one direction in a set of route directions. */ - export interface IDirectionsStep { - /** The child direction items for this directions step. */ - childItineraryItems: IDirectionsStep[]; - - /** The location of the start of the direction. */ - coordinate: Location; - - /** The total distance of the step in the unit specified in the distanceUnit property of the DirectionsRequestOptions. */ - distance: string; - - /** The total time, in seconds, of the direction step. */ - durationInSeconds: number; - - /** The HTML formatted route instruction associated with the step. */ - formattedText: string; - - /** A boolean indicating whether the maneuver image is a road shield image. */ - isImageRoadShield: boolean; - - /** The name of the maneuver image. */ - maneuverImageName: string; - - /** An array of strings, where each string is a hint to help determine when to move to the next direction step. Not all direction steps have hints. */ - postIntersectionHints: string[]; - - /** An array of strings, where each string is a hint to help determine when you have arrived at this direction step. Not all direction steps have hints. */ - preIntersectionHints: string[]; - - /** The name of the transit stop where this step originates. */ - startStopName: string; - - /** The transit line associated with this step. */ - transitLine: ITransitLine; - - /** The URL of the image to use for transit direction steps. */ - transitStepIcon: string; - - /** The ID of the transit stop. */ - transitStopId: string; - - /** The name of the transit line end. */ - transitTerminus: string; - } - - /** Represents a route. */ - export interface IRoute { - /** The legs of the route. Each route leg represents the route between two waypoints. */ - routeLegs: IRouteLeg[]; - - /** An array of locations that makes up the path of the route. */ - routePath: Location[]; - } - - /** Represents a leg of a route. A route leg is the part of the route between two stop waypoints. */ - export interface IRouteLeg { - /** The end time of the route leg. This property only applies when the routeMode of the DirectionsRequestOptions is set to transit. */ - endTime: Date; - - /** The location of the last waypoint of this leg. */ - endWaypointLocation: Location; - - /** The directions steps associated with this route leg. */ - itineraryItems: IDirectionsStep[]; - - /** The index of the route to which this route leg belongs. */ - originalRouteIndex: number; - - /** The start time of the route leg. This property only applies when the routeMode of the DirectionsRequestOptions is set to transit. */ - startTime: Date; - - /** The location of the first waypoint of this route leg. */ - startWaypointLocation: Location; - - /** The sub legs of this route leg. A sub leg of a route is the part of the route between a stop point and a via point or between two via points.*/ - subLegs: IRouteSubLeg[]; - - /** The summary which describes this route leg. */ - summary: IRouteSummary; - } - - /** Represents a route sub leg. A route sub leg is the part of the route between a stop point and a via point or between two via points. */ - export interface IRouteSubLeg { - /** The location of the last waypoint of the sub leg. */ - actualEnd: Location; - - /** The location of the first waypoint of the sub leg. */ - actualStart: Location; - - /** The description of the last waypoint of the sub leg. */ - endDescription: string; - - /** The description of the first waypoint of the sub leg. */ - startDescription: string; - } - - /** Represents a route summary. */ - export interface IRouteSummary { - /** The total travel distance of the route */ - distance: number; - - /** The cost of the route. This property is only returned if the routeMode of the IDirectionsRequestOptions is set to transit and the map culture is set to ja-jp. */ - monetaryCost: number; - - /** The location of the northeast corner of bounding box that defines the best map view of the route. */ - northEast: Location; - - /** The location of the southwest corner of bounding box that defines the best map view of the route. */ - southWest: Location; - - /** The total travel time, in seconds, for the route. */ - time: number; - - /** - * The total travel time, in seconds, taking into account traffic delays, for the route. - * This property is 0 if the avoidTraffic property of the IDirectionsRequestOptions is set to false. - */ - timeWithTraffic: number; - } - - /** Contains information about a transit line. */ - export interface ITransitLine { - /** The short name for the transit line. */ - abbreviatedName: string; - - /** The ID of the agency that owns the transit line. */ - agencyId: number; - - /** The name of the agency that owns the transit line. */ - agencyName: string; - - /** The URL of the website of the agency that owns the transit line. */ - agencyUrl: string; - - /** Phone number for the transit agency. */ - phoneNumber: string; - - /** Information about the provider of this transit line data. */ - providerInfo: string; - - /** The uri for the transit agencies website. */ - uri: string; - - /** The full name of this transit line. */ - verboseName: string; - } - - /** Options that can be used to define a waypoint. */ - export interface IWaypointOptions { - /** - * The address string of the waypoint. For example, the following strings are valid for this parameter: "Seattle", "1 Microsoft Way, Redmond, WA". Either the address or location property must be specified. - */ - address?: string; - - /** - * A boolean indicating whether the waypoint is a via point. A via point is a point along the route that is not a stop point. Set this property to - * true if you just want the route to pass through this location. Default: false - */ - isViaPoint?: boolean; - - /** The location of the waypoint. Either the address or location property must be specified. */ - location?: Location; - } - - /** Contains options for the directions to calculate. */ - export interface IDirectionsRequestOptions { - /** The unit to use when displaying direction distances. */ - distanceUnit?: DistanceUnit; - - /** The number of routes to calculate. */ - maxRoutes?: number; - - /** The features to avoid when calculating the route. */ - routeAvoidance?: RouteAvoidance[]; - - /** A boolean indicating whether the route line on the map can be dragged with the mouse cursor. */ - routeDraggable?: boolean; - - /** If multiple routes are returned, the index of the route and directions to display. */ - routeIndex?: number; - - /** The type of directions to calculate. */ - routeMode?: RouteMode; - - /** The optimization setting for the route calculation. */ - routeOptimization?: RouteOptimization; - - /** The type of the time specified. The default value is departure. */ - timeType?: TimeType; - - /** The time to use when calculating the route. If this property is set to null, the current time is used */ - time?: Date; - } - - /** Represents render options for a route. */ - export interface IDirectionsRenderOptions { - /** A boolean indicating whether to automatically set the map view to the best map view of the calculated route. Default: true */ - autoUpdateMapView?: boolean; - - /** A boolean indicating whether to display the disclaimer about the accuracy of the directions. Default: true */ - displayDisclaimer?: boolean; - - /** A boolean indicating whether to display the icons for each direction maneuver. Default: true */ - displayManeuverIcons?: boolean; - - /** A boolean indicating whether to display direction hints that describe when a direction step was missed. Default: true */ - displayPostItineraryItemHints?: boolean; - - /** - * A boolean indicating whether to display direction hints that describe what to look for before you come to the next - * direction step. The default value is true. - */ - displayPreItineraryItemHints?: boolean; - - /** A boolean indicating whether to display the route selector control. Default: true */ - displayRouteSelector?: boolean; - - /** A boolean indicating whether to display direction warnings. Default: true */ - displayStepWarnings?: boolean; - - /** A boolean indicating whether to display a warning about walking directions. Default: true */ - displayWalkingWarning?: boolean; - - /** The polyline options that define how to draw the route line on the map, if the RouteMode is driving. */ - drivingPolylineOptions?: IPolylineOptions; - - /** The pushpin options that define how the first waypoint should be rendered. */ - firstWaypointPushpinOptions?: IPushpinOptions; - - /** The DOM element inside which the directions itinerary will be rendered. */ - itineraryContainer?: HTMLElement; - - /** The pushpin options that define how the last waypoint should be rendered. */ - lastWaypointPushpinOptions?: IPushpinOptions; - - /** A boolean indicating whether to show the input panel. Default: false */ - showInputPanel?: boolean; - - /** The options that define how to draw the route line on the map, if the RouteMode is transit. */ - transitPolylineOptions?: IPolylineOptions; - - /** The options that define how to draw the route line on the map, if the RouteMode is walking. */ - walkingPolylineOptions?: IPolylineOptions; - - /** The options that define the pushpin to use for all route waypoints by default. The first and last waypoints in the route will be overriden by firstWaypointPushpinOptions and lastWaypointPushpinOptions if set. */ - waypointPushpinOptions?: IPushpinOptions; - } - - ///////////////////////////////////// - /// Classes - //////////////////////////////////// - - /** An object used to define a start, end or stop location along a route. */ - export class Waypoint { - /** - * @constructor - * @param options: Options used to define the Waypoint. - */ - constructor(options: IWaypointOptions); - - /** Releases any resources associated with the waypoint. */ - public dispose(): void; - - /** - * Gets the address associated with the waypoint. - * @returns The address associated with the waypoint. - */ - public getAddress(): string; - - /** - * Gets the location of the waypoint. - * @returns The location of the waypoint. - */ - public getLocation(): Location; - - /** - * Gets a boolean value indicating whether the waypoint is a via point. - * @returns A boolean value indicating whether the waypoint is a via point. - */ - public isViapoint(): boolean; - - /** - * Sets options for the waypoint. For these options to take effect, you must recalculate the route. - * @param options Options used to define the Waypoint. - */ - public setOptions(options: IWaypointOptions): void; - } - - /** The main class in the Directions module that process direction calculations and rendering. */ - export class DirectionsManager { - - /** - * @constructor - * @param map A map to calculate directions for. - * @param waypoints An array of waypoints to be added to the route. - */ - constructor(map: Map, waypoints?: Waypoint[]); - - /** - * Adds a waypoint to the route at the given index, if specified. If an index is not specified, the waypoint is added as the last waypoint in the route. The maximum number of walking or driving waypoints is 25. The maximum number of transit waypoints is 2. Up to 10 via points are allowed between two stop waypoints. To recalculate the route, use calculateDirections. - * @param waypoint The waypoint to be added to the directions manager. - * @param index An index at which the waypoint is to be added. - */ - public addWaypoint(waypoint: Waypoint, index?: number): void; - - /** - * Calculates directions based on request and render options set - */ - public calculateDirections(): void; - - /** Clears the directions request and render options and removes all waypoints */ - public clearAll(): void; - - /** - * Clears the directions displayed and removes the route line from the map. - * This method does not remove waypoints from the route and retains all calculated direction information and option settings. - */ - public clearDisplay(): void; - - /** Deletes the DirectionsManager object and releases any associated resources. */ - public dispose(): void; - - /** - * Gets all the waypoints in the directions manager. - * @returns All the waypoints in the directions manager. - */ - public getAllWaypoints(): Waypoint[]; - - /** - * Gets the currently displayed route information. - * @returns The currently displayed route information. - */ - public getCurrentRoute(): IRoute; - - /** - * Gets the route render options. - * @returns The route render options - */ - public getRenderOptions(): IDirectionsRenderOptions; - - /** - * Gets the directions request options. - * @returns The directions request options. - */ - public getRequestOptions(): IDirectionsRequestOptions; - - /** - * Gets the current calculated route(s) - * @returns The current calculated route(s). If the route was not successfully calculated, null is returned. - */ - public getRouteResult(): IRoute[]; - - /** - * Removes the given waypoint or the waypoint identified by the given index from the route. - * @param waypointOrIndex A Waypoint object to be removed or the index of the waypoint to be removed - */ - public removeWaypoint(waypointOrIndex: Waypoint | number): void; - - /** - * Sets the specified render options for the route. - * @param options The options that customize the rendering of the calculated route. - */ - public setRenderOptions(options: IDirectionsRenderOptions): void; - - /** - * Sets the specified route calculation options. - * @param options The route calculation options. - */ - public setRequestOptions(options: IDirectionsRequestOptions): void; - - /** - * Displays an input panel for calculating directions in the specified container. Provides autosuggest for location inputs. - * @param inputContainerId The id name of the HTML container in which to render the directions input panel. - */ - public showInputPanel(inputContainerId: string): void; - } -} - -declare module Microsoft.Maps { - /** A static class that manages events within the map SDK. */ - module Events { - ///////////////////////////////////// - /// addHandler Definitions - //////////////////////////////////// - - /** - * Attaches the handler for the event that is thrown by the target. Use the return object to remove the handler using the removeHandler method. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * • directionsError - * • directionsUpdated - * @param handler The callback function to handle the event when triggered. - * @returns The handler id. - */ - export function addHandler(target: Directions.DirectionsManager, eventName: string, handler: (eventArg?: Directions.IDirectionsEventArgs | Directions.IDirectionsErrorEventArgs) => void): IHandlerId; - - ///////////////////////////////////// - /// addOne Definitions - //////////////////////////////////// - - /** - * Attaches the handler for the event that is thrown by the target, but only triggers the handler the first once after being attached. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * • directionsError - * • directionsUpdated - * @param handler The callback function to handle the event when triggered. - */ - export function addOne(target: Directions.DirectionsManager, eventName: string, handler: (eventArg?: Directions.IDirectionsEventArgs | Directions.IDirectionsErrorEventArgs) => void): void; - - ///////////////////////////////////// - /// addThrottledHandler Definitions - //////////////////////////////////// - - /** - * Attaches the handler for the event that is thrown by the target, where the minimum interval between events (in milliseconds) is specified as a parameter. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * • directionsError - * • directionsUpdated - * @param handler The callback function to handle the event when triggered. - * @param throttleInterval throttle interval (in ms) - * @returns The handler id. - */ - export function addThrottledHandler(target: Directions.DirectionsManager, eventName: string, handler: (eventArg?: Directions.IDirectionsEventArgs | Directions.IDirectionsErrorEventArgs) => void, throttleInterval: number): IHandlerId; - } -} diff --git a/types/bingmaps/DrawingTools.d.ts b/types/bingmaps/DrawingTools.d.ts deleted file mode 100644 index bd5c938e4e..0000000000 --- a/types/bingmaps/DrawingTools.d.ts +++ /dev/null @@ -1,234 +0,0 @@ -declare module Microsoft.Maps { - /** An object that contains the event arguments for when the drawing mode changes in the drawing tools. **/ - export interface IDrawingModeChangedData { - - /** The shape being modified by the drawing tools. **/ - shape: IPrimitive; - - /** The new drawing mode. **/ - mode: DrawingTools.DrawingMode; - } - - /** - * The DrawingManager class manages the ability to draw and edit multiple shapes on the map. Shapes managed by this class are rendered on a separate drawing layer. - * User can use a mouse or a touch screen to draw on the map. When they are done, pressing the escape button or any button on the toolbar will exit the current drawing mode. - * This class does not have a publicly accessible constructor and can only be accessed using the showDrawingManager of the DrawingTools class. - */ - export interface DrawingManager { - /** - * Adds a shapes to the layer, at the specified index if specified. - • @param data The shape(s) to be added to the layer. - • @param index The index at which to insert the shape into the layer. - */ - add(data: IPrimitive | IPrimitive[], index?: number): void; - - /** - * Disposes the drawing manager instance. - */ - dispose(): void; - - /** - * Resets the drawing manager and clears all shapes in the drawing layer. - */ - clear(): void; - - /** - * Gets the current drawing mode of the drawing manager. - * @returns The current drawing mode of the drawing manager. - */ - getDrawingMode(): DrawingTools.DrawingMode; - - /** - * Gets an array of shapes that are in the layer. This can be used to iterate over the individual shapes. - * @returns An array of shapes that are in the layer. This can be used to iterate over the individual shapes. - */ - getPrimitives(): IPrimitive[]; - - /** - * Returns the index of the shape in the drawing layer. - * @param primitive The shape to find the index of. - * @param fromIndex The index to start the search from. - * @returns The index of the shape in the drawing layer. Returns -1 if shape is not found. - */ - indexOf(primitive: IPrimitive, fromIndex?: number): number; - - /** - * Removes a shape from the layer and returns it. - * @param primitive The shape to remove from the layer. - * @returns The shape that was removed from the layer. - */ - remove(primitive: IPrimitive): IPrimitive; - - /** - * Removes a shape from the layer at the specified index. - * @param index The index of the shape to remove from the layer. - * @returns The shape that was removed from the layer. - */ - removeAt(index: number): IPrimitive; - - /** - * Sets the drawing mode of the drawing manager. - * @param mode The drawing mode to set the DrawingManager to. - */ - setDrawingMode(mode: DrawingTools.DrawingMode): void; - - /** - * Replaces all shapes in the layer with the new array of shapes that have been provided. - * @param primitives An array of shapes to add to the drawing layer. - */ - setPrimitives(primitives: IPrimitive[]): void; - } - - /** - * Provides a set of tools for drawing and editing shapes on top of the map. - * @requires The Microsoft.Maps.DrawingTools module. - */ - export class DrawingTools { - /** - * @constructor - * @requires The Microsoft.Maps.DrawingTools module. - * @param map A map instanct to attach the drawing tools to. - */ - constructor(map: Map); - - /** - * Initializes the drawing layer and instructs it to create a new shape of a given type. - * @param shapeType The type of new shape to create. - * @param created A callback function that is fired after the initial shape is created. - */ - public create(shapeType: DrawingTools.ShapeType, created?: (shape: IPrimitive) => void): void; - - /** Disposes the instance of the DrawingTools class. */ - public dispose(): void; - - /** - * Adds a shape to the drawing layer and puts it into edit mode. - * @param shape A shape to put into editting mode. - */ - public edit(shape: IPrimitive): void; - - /** - * Finishes any shape create / edit operation currently in progress, and returns the shape that was created or editted through a specified callback function. - * @param finished A callback function to return the completed shape with. - */ - public finish(finished?: (shape: IPrimitive) => void): void; - - /** - * Creates a drawing manager which allows multi-shape editing and displays the toolbar. - * @param callback A callback function that is triggered after the DrawingTools have loaded. - */ - public showDrawingManager(callback?: (manager: DrawingManager) => void): void; - } - - export module Events { - ///////////////////////////////////// - /// addHandler Definitions - //////////////////////////////////// - - /** - * Attaches the handler for the event that is thrown by the target. Use the return object to remove the handler using the removeHandler method. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * drawingChanged, drawingChanging, drawingEnded, drawingModeChanged, drawingStarted - * @param handler The callback function to handle the event when triggered. - * @returns The handler id. - */ - export function addHandler(target: DrawingTools, eventName: string, handler: (eventArg?: IPrimitive | IDrawingModeChangedData) => void): IHandlerId; - - /** - * Attaches the handler for the event that is thrown by the target. Use the return object to remove the handler using the removeHandler method. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * disposed, drawingChanged, drawingChanging, drawingEnded, drawingErased, drawingModeChanged, drawingStarted - * @param handler The callback function to handle the event when triggered. - * @returns The handler id. - */ - export function addHandler(target: DrawingManager, eventName: string, handler: (eventArg?: IPrimitive | DrawingTools.DrawingMode) => void): IHandlerId; - - ///////////////////////////////////// - /// addOne Definitions - //////////////////////////////////// - - /** - * Attaches the handler for the event that is thrown by the target, but only triggers the handler the first once after being attached. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * drawingChanged, drawingChanging, drawingEnded, drawingModeChanged, drawingStarted - * @param handler The callback function to handle the event when triggered. - */ - export function addOne(target: DrawingTools, eventName: string, handler: (eventArg?: IPrimitive | IDrawingModeChangedData) => void): void; - - /** - * Attaches the handler for the event that is thrown by the target, but only triggers the handler the first once after being attached. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * disposed, drawingChanged, drawingChanging, drawingEnded, drawingErased, drawingModeChanged, drawingStarted - * @param handler The callback function to handle the event when triggered. - */ - export function addOne(target: DrawingManager, eventName: string, handler: (eventArg?: IPrimitive | DrawingTools.DrawingMode) => void): void; - - ///////////////////////////////////// - /// addThrottledHandler Definitions - //////////////////////////////////// - - /** - * Attaches the handler for the event that is thrown by the target, where the minimum interval between events (in milliseconds) is specified as a parameter. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * drawingChanged, drawingChanging, drawingEnded, drawingModeChanged, drawingStarted - * @param handler The callback function to handle the event when triggered. - * @returns The handler id. - */ - export function addThrottledHandler(target: DrawingTools, eventName: string, handler: (eventArg?: IPrimitive | IDrawingModeChangedData) => void): IHandlerId; - - /** - * Attaches the handler for the event that is thrown by the target, where the minimum interval between events (in milliseconds) is specified as a parameter. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * disposed, drawingChanged, drawingChanging, drawingEnded, drawingErased, drawingModeChanged, drawingStarted - * @param handler The callback function to handle the event when triggered. - * @param throttleInterval throttle interval (in ms) - * @returns The handler id. - */ - export function addThrottledHandler(target: DrawingManager, eventName: string, handler: (eventArg?: IPrimitive | DrawingTools.DrawingMode) => void, throttleInterval: number): IHandlerId; - } - -} - -declare module Microsoft.Maps.DrawingTools { - /** - * The different drawing modes that the drawing manager can be set to. - * @requires The Microsoft.Maps.DrawingTools module. - */ - export enum DrawingMode { - /** Edit an existing shape. Click on a shape to edit it. */ - edit, - - /** Erase and existing shape. Click on the shapes to erase them. */ - erase, - - /** Sets the drawing manager into an idle mode. */ - none, - - /** Allow the user to draw a polygon. */ - polygon, - - /** Allow the user to draw a polyline. */ - polyline, - - /** Allow the user to draw a pushpin. */ - pushpin - } - - /** - * The different types of shapes that are created or edited by the drawing tools. - * @requires The Microsoft.Maps.DrawingTools module. - */ - export enum ShapeType { - /** A polygon shape type. */ - polygon, - - /** A polyline shape type. */ - polyline - } -} \ No newline at end of file diff --git a/types/bingmaps/GeoJson.d.ts b/types/bingmaps/GeoJson.d.ts deleted file mode 100644 index 94726ab542..0000000000 --- a/types/bingmaps/GeoJson.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -declare module Microsoft.Maps { - - /** GeoJSON object definition */ - export interface IGeoJsonObject { - /** - * Type of the object - * could be one of the following: - * Point - * LineString - * Polygon - * MultiPoint - * MultiLineString - * MultiPolygon - * GeometryCollection - * Feature - * FeatureCollection - */ - type: string; - - /** Geometric coordinates of the object */ - coordinates?: number[] | number[][] | number[][][] | number[][][][]; - - /** Additional properties of the object as a key,value pair */ - properties?: any; - - /** Set of features (only applicable if the type is 'featurecollection') */ - features?: IGeoJsonObject[]; - - /** Set of geometries (only applicable if the type is 'geometrycollection') */ - geometries?: IGeoJsonObject[]; - - /** Geometry (only applicable if the type is 'feature') */ - geometry?: IGeoJsonObject; - - /** identifier of a feature (only applicable if the type is 'feature') */ - id?: any; - } - - /** - * Class responsible for reading/writing geo data in GeoJson format - * @requires The Microsoft.Maps.GeoJson module. - */ - export module GeoJson { - /** - * Reads the data from a given url and returns the shapes. - * @param url GeoJson download url. - * @param callback Callback function that needs to be called once the data is downloaded and parsed. - * @param jsonpQueryParam The name of the url query param to make a jsonp request. - * @param styles Styles that needs to be applied. - */ - export function readFromUrl(url: string, callback: (data: IPrimitive | IPrimitive[]) => void, jsonpQueryParam?: string, styles?: IStylesOptions): void; - - /** - * Reads the data in geoJson format and returns the shapes. - * @param geoJson GeoJson data object that needs to be parsed into shapes. - * @param styles Styles that needs to be applied. - * @returns An array of shapes. - */ - export function read(geoJson: IGeoJsonObject | string, styles?: IStylesOptions): IPrimitive | IPrimitive[]; - - /** - * Writes the data into geoJson format. - * @param data Data that needs to be serialized. - * @returns A geoJson formatted string. - */ - export function write(data: IPrimitive | IPrimitive[]): IGeoJsonObject; - } -} \ No newline at end of file diff --git a/types/bingmaps/HeatMapLayer.d.ts b/types/bingmaps/HeatMapLayer.d.ts deleted file mode 100644 index c90813b00d..0000000000 --- a/types/bingmaps/HeatMapLayer.d.ts +++ /dev/null @@ -1,106 +0,0 @@ -declare module Microsoft.Maps { - /** A standard dictionary object (associative array). */ - export interface IDictionary { - [K: string]: T; - } - - /** Options for customizing how the heat map is rendered. */ - export interface IHeatMapLayerOptions { - /** - * The temperature gradient that is used to colorize the map. Default gradient: - * { - * '0.00': 'rgb(255,0,255)', // Magenta - * '0.25': 'rgb(0,0,255)', // Blue - * '0.50': 'rgb(0,255,0)', // Green - * '0.75': 'rgb(255,255,0)', // Yellow - * '1.00': 'rgb(255,0,0)' // Red - * } - */ - colorGradient?: IDictionary; - - /** - * The intensity of each heat point. This is a decimal value between 0 and 1. This is used to specify how "hot" a single data point should be. Default: 0.5 - */ - intensity?: number; - - /** - * The opacity of the HeatMapLayer canvas. Value should be a decimal between 0 and 1. Default: 1 - */ - opacity?: number; - - /** - * The radius to draw each data point on the map. Default: 10 - */ - radius?: number; - - /** - * The distance units of the radius. Possible values are: - * - * • 'pixels' (defualt) - * • 'meters' - * - * When set to pixels the size of each data point will always be the same radius, regardless of zoom level. When set to meters, the size of the data points - * will scale based on zoom level so as to ensure that the radius is spatially accurate. - */ - unit?: 'meters' | 'pixel'; - - /** A boolean indicating if the heat map layer is visible or not. **/ - visible?: boolean; - } - - /** - * Class for rendering data as a heat map layer. - * @requires The Microsoft.Maps.Heatmap module. - */ - export class HeatMapLayer implements IDataLayer { - /** - * @constructor - * @requires The Microsoft.Maps.Heatmap module. - * @param locations Set of locations to visualize as a heat map. - * @param options Options for customizing how the heat map is rendered. - */ - constructor(locations: (Location | Pushpin)[], options?: IHeatMapLayerOptions); - - /** Clears all data in the heat map layer. */ - public clear(): void; - - /** Disposes the heat map layer. */ - public dispose(): void; - - /** - * Gets a boolean indicating if the heat map layer is visible or not. - * @returns A boolean indicating if the heat map layer is visible or not. - */ - public getVisible(): boolean; - - /** - * @deprecated - * Hides the heat map layer. - */ - public hide(): void; - - /** - * Specifies the locations to use when generating the heat map. - * @param locations Set of locations. - */ - public setLocations(locations: (Location | Pushpin)[]): void; - - /** - * Sets the options to use with the heat map layer. - * @param options Set of heat map layer options. - */ - public setOptions(options: IHeatMapLayerOptions): void; - - /** - * Sets the visibility of the heat map layer. - * @param visible A boolean indicating if the heat map layer is visible or not. - */ - public setVisible(visible: boolean): void; - - /** - * @deprecated - * Shows the heat map layer. - */ - public show(): void; - } -} \ No newline at end of file diff --git a/types/bingmaps/Search.d.ts b/types/bingmaps/Search.d.ts deleted file mode 100644 index 0d799c7078..0000000000 --- a/types/bingmaps/Search.d.ts +++ /dev/null @@ -1,228 +0,0 @@ -/** - * Provides an easy method for geocoding address and searching for points of interest from JavaScript. - * @requires The Microsoft.Maps.Search module. - */ -declare module Microsoft.Maps.Search { - /** - * Defines the match precision of a geocdoed result. - * @requires The Microsoft.Maps.Search module. - */ - export enum LocationPrecision { - /** The geocode result was matched to a point on a road using interpolation. */ - interpolated, - - /** - * The geocode result was matched to a point on a road using interpolation with an additional offset to shift the - * Location to the side of the street. - */ - InterpolatedOffset, - - /** The geocode result was matched to the center of a parcel (property boundary). */ - parcel, - - /** The geocode result was matched to the rooftop of a building. */ - rooftop - } - - /** - * Defines the geocoding level of the location match found by the geocoder. - * @requires The Microsoft.Maps.Search module. - */ - export enum MatchCode { - /** No match was found. */ - none, - - /** The match was good. */ - good, - - /** The match was ambiguous. Multiple results were returned. */ - ambiguous, - - /** The match was found by a broader search. */ - upHierarchy, - - /** The match was found, but possibly using a modified query. */ - modified - } - - /** - * Defines the confidence of the location match found by the geocoding service. - * @requires The Microsoft.Maps.Search module. - */ - export enum MatchConfidence { - /** The confidence of the match is high. */ - high, - - /** The confidence of the match is medium. */ - medium, - - /** The confidence of the match is low. */ - low, - - /** The confidence of the match is unknown. */ - unknown - } - - /** A object that represents a geocoded location. */ - export interface IGeocodeLocation { - /** The map location of this geocode location match. */ - location: Location; - - /** The name of this geocode location match. */ - name: string; - - /** The precision of this geocode location match. */ - precision: string | LocationPrecision; - } - - /** An object that represents an place result. */ - export interface IPlaceResult { - /** The geocoded address of the place result. */ - address: IAddress; - - /** The location rectangle that defines the boundaries of the best map view of the place result. */ - bestView: LocationRect; - - /** The classification of the geographic entity returned, such as PopulatedPlace. */ - entityType: string; - - /** The geocoded location of the best result. */ - location: Location; - - /** The geocoded locations. */ - locations: IGeocodeLocation[]; - - /** The match code of the best result. */ - matchCode: string | MatchCode; - - /** The match confidence of the best result. */ - matchConfidence: string | MatchConfidence; - - /** The name of the place result, if one exists. */ - name: string; - } - - /** An object that represents a geocode result returned by REST service. */ - export interface IGeocodeResult { - /** An array of geocode results. */ - results: IPlaceResult[]; - } - - /** The options for a geocode request. */ - export interface IGeocodeRequestOptions { - /** - * A location rectangle that defines the boundaries of the area in which to search for - * location results. The default is the bounds of the map view associated with this - * instance of the SearchManager, which is usually the current map view. - */ - bounds?: LocationRect; - - /** - * The name of the function to call when a successful result is returned from the - * geocode request. The callback function must accept two parameters: result, which is - * a GeocodeResult type, and a userData object. - */ - callback: (geocodeResult: IGeocodeResult, userData: any) => void; - - /** The maximum number of results to return. Required. The maximum number than can be returned is 20. */ - count?: number; - - /** - * The name of the function to call when the request is returned with an error. The - * error callback function must accept an IGeocodeRequestOptions object. - */ - errorCallback?: (geocodeRequestOptions: IGeocodeRequestOptions) => void; - - /** Specifies to include the two-letter ISO country code. */ - includeCountryIso2?: boolean; - - /** Specifies to include the neighborhood in the response when it is available. */ - includeNeighborhood?: boolean; - - /** A number indicating how long to wait, in seconds, for the geocode request to return. The default value is 5 seconds. */ - timeout?: number; - - /** An object containing any data that needs to be passed to the callback when the request is completed. */ - userData?: any; - - /** A string containing the address or place to be matched to a location on the map. */ - where: string; - } - - /** The options for a reverse geocode request. */ - export interface ReverseGeocodeRequestOptions { - /** - * A reference to a function to call when a successful result is returned from the geocode request. The callback function - * will receive a PlaceResult object as an argument. - */ - callback: (placeResult: IPlaceResult, userData: any) => void; - - /** - * A reference to a function to call when the request is returned with an error. The error callback function will receive - * an object containing the geocode request options used in the request. - */ - errorCallback?: (reverseGeocodeRequestOptions: ReverseGeocodeRequestOptions) => void; - - /** Specifies to include the two-letter ISO country code. Default: false */ - includeCountryIso2?: boolean; - - /** - * An array of entity types selected from the following options. - * • Address - * • Neighborhood - * • PopulatedPlace - * • Postcode1 - * • AdminDivision1 - * • AdminDivision2 - * • CountryRegion - * These entity types are ordered from the most specific entity to the least specific entity. When entities of more than one entity type are found, only the most specific - * entity is returned. For example, if you specify Address and AdminDistrict1 as entity types and entities were found for both types, only the Address entity information is - * returned in the response. One exception to this rule is when both PopulatedPlace and Neighborhood entity types are specified and information is found for both. In this case, - * the information for both entity types is returned. Also, more than one Neighborhood may be returned because the area covered by two different neighborhoods can overlap. - */ - includeEntityTypes?: string[]; - - /** - * Specifies to include the neighborhood in the response when it is available. Note: This feature isn’t - * available in all locations. - */ - includeNeighborhood?: boolean; - - /** The location to use to match to geographic entities and addresses. */ - location: Location; - - /** A number indicating how long to wait, in seconds, for the reverse geocode request to return. The default value is 5 seconds. */ - timeout?: number; - - /** An object containing any data that needs to be passed to the callback when the request is completed. */ - userData?: any; - } - - /** - * A class that contains methods for returning search and location results. - * @requires The Microsoft.Maps.Search module. - */ - export class SearchManager { - /** - * @constructor - * @requires The Microsoft.Maps.Search module. - * @param map A Map object - */ - constructor(map: Map); - - /** - * Matches the address or place query in the specified request - * options to a location and returns the results to the request - * options callback function. - * @param request Options for sending geocode request - */ - public geocode(request: IGeocodeRequestOptions): void; - - /** - * Matches the specified location to an address and returns the - * address results to the specified request options callback function. - * @param request Options for sending reverse geocode request - */ - public reverseGeocode(request: ReverseGeocodeRequestOptions): void; - } -} \ No newline at end of file diff --git a/types/bingmaps/SpatialDataService.d.ts b/types/bingmaps/SpatialDataService.d.ts deleted file mode 100644 index 627ab7cbad..0000000000 --- a/types/bingmaps/SpatialDataService.d.ts +++ /dev/null @@ -1,440 +0,0 @@ -/** - * This module wraps the Query and GeoData REST API’s in the Bing Spatial Dara Services and expose them as an easy to use JavaScript library. - * @requires The Microsoft.Maps.SpatialDataService module. - */ -declare module Microsoft.Maps.SpatialDataService { - - ////////////////////////////////////////////// - /// GeoData API - ////////////////////////////////////////////// - - /** Represents the options for requests boundary data from the GeoData API in the Bing Spatial Data Services. */ - export interface IGetBoundaryRequestOptions { - /** - * The level of detail for the boundary polygons returned. An integer between 0 and 3, where 0 specifies the coarsest level of boundary detail and 3 - * specifies the best. Default: 0 - */ - lod?: number; - - /** - * The entity type to return. Default: CountryRegion - * Supported entity types: - * AdminDivision1, AdminDivision2, CountryRegion, eighborhood, PopulatedPlace, Postcode1, Postcode2, Postcode3, Postcode4 - * Note: Not all entity types are available in all areas. - */ - entityType?: string; - - /** - * Specifies the preferred language to use for any metadata text about the entity or polygons. Defaults to the culture used by the map control, which - * usually automatically detected based on user's browser settings. Setting this property will override the default value. - */ - culture?: string; - - /** - * Specifies whether the response should include all of the boundary polygons for the requested entity or just return a single polygon that represents - * the main outline of the entity. Default: false - */ - getAllPolygons?: boolean; - - /** - * Specifies whether the response should include metadata about the entity, such as AreaSqKm and others. Default: false - */ - getEntityMetadata?: boolean; - - /** - * Specifies the user’s home country or region.Defaults to the region setting of the user who loads the map. - * Warning: Setting this property will override the default value, which is the region the user is actually in, and will allow the user to see boundaries - * which may not align with the views of their region.This could result in geopolitically sensitive borders being returned. - */ - userRegion?: string; - } - - /** Represents the primitive object for a boundary returned by the GeoData API. */ - export interface IGeoDataPrimitive { - /** A unique ID associated with this polygon primitive. */ - PrimitiveID: string; - - /** - * A comma-delimited sequence starting with the version number of the polygon set followed by a list of compressed polygon - * "rings" (closed paths represented by sequences of latitude and-longitude points). - */ - Shape: string; - - /** The number of vertex points used to define the polygon. */ - NumPoints: string; - - /** - * An ID identifying the data provider that supplied the data. This ID number will reference one of the sources listed in the - * array of CopyrightSources in the Copyright property of the GeoDataResultSet object. - */ - SourceID: string; - } - - /** Represents the copyright source object for a boundary returned by the GeoData API. */ - export interface ICopyrightSource { - /** The copyright string from the source. */ - Copyright: string; - - /** An ID identifying the data provider that supplied the data. */ - SourceID: string; - - /** The name of the data provider represented by this Source element. */ - SourceName: string; - } - - /** Represents the copyright object for a boundary returned by the GeoData API. */ - export interface ICopyright { - /** The copyright URL for the GeoData service. */ - CopyrightURL: string; - - /** A collection of CopyrightSource objects that give information about the sources of the polygon data that is returned. */ - Sources: ICopyrightSource[]; - } - - /** Represents the name object for a boundary returned by the GeoData API. */ - export interface IName { - /** The name of boundary. Example: "United States" */ - EntityName: string; - - /** The culture of the region. */ - Culture: string; - - /** An ID identifying the data provider that supplied the data. */ - SourceID: string; - } - - /** Represents the metadata object for a boundary returned by the GeoData API. Not all properties will be returned for all results. */ - export interface IMetadata { - /** The approximate total surface area (in square kilometers) covered by all the polygons that comprise this entity. */ - AreaSqKm: string; - - /** - * An area on the Earth that provides the best map view for this entity. This area is defined as a bounding box in the format of a - * “MULTIPOINT ((WestLongitude SouthLatitude), (EastLongitude NorthLatitude))”. - */ - BestMapViewBox: string; - - /** The culture associated with this entity. Example: en */ - OfficialCulture: string; - - /** The approximate population within this entity. Example: PopClass20000to99999 */ - PopulationClass: string; - - /** The regional culture associated with this entity. */ - RegionalCulture: string; - } - - /** Represents a single result object returned by the GeoData API. */ - export interface IGeoDataResult { - /** Copyright information for the returned boundary data. */ - Copyright: ICopyright; - - /** A unique ID number associated with this entity. */ - EntityID: string; - - /** - * A collection of metadata information associated with the entity. The getEntityMetadata option of the request must be set - * to true. Note, not all boundaries will return this metadata. - */ - EntityMetadata: IMetadata; - - /** Information about the name of the boundary location. */ - Name: IName; - - /** A Polygon object that has been generated from the data in the Primitives property. */ - Polygons: Polygon[]; - - /** An array of objects that contain the polygon information for the boundary. */ - Primitives: IGeoDataPrimitive[]; - } - - /** Represents the set of results returned by the GeoData API. */ - export interface IGeoDataResultSet { - /** Copyright information for the GeoData API. */ - Copyright: string; - - /** The location provided in the query that generated this result. */ - location: string |  Location; - - /** Results of the boundary data. */ - results: IGeoDataResult[]; - } - - /** - * This is a static class that provides the ability to request polygons that describe the boundaries of a geographic entities, such as an AdminDivision1 - * (such as a state or province) or a Postcode1 (such as a zip code) that contain a given point (latitude and longitude) or address. This uses the GeoData - * API in the Bing Spatial Data Services. - * @requires The Microsoft.Maps.SpatialDataService module. - */ - export module GeoDataAPIManager { - /** - * Gets a boundary for the specified request. If the specified location value is a string, it will be geocoded and the coordinates of the result will - * be used to find a boundary of the specified entityType that intersects with this coordinate. - * @requires The Microsoft.Maps.SpatialDataService module. - * @param locations The locations to retrieve boundaries for. If the specified location value is a string, it will be geocoded and the coordinates of - * the result will be used to find a boundary of the specified entityType that intersects with this coordinate. - * @param request The request options for retrieving a boundary. - * @param credentials A bing maps key or a map instance which can be used to provide credentials to access the data source. Note that the map will need - * to be loaded with a bing maps key that has access to the data source. - * @param callback A callback function to return the results to. If an array of locations are specified the callback function will be triggered for each location in the array. - */ - export function getBoundary(locations: string | Location | (string | Location)[], request: IGetBoundaryRequestOptions, credentials: string | Map, callback: (results: IGeoDataResultSet) => void): void; - } - - ////////////////////////////////////////////// - /// Query API - ////////////////////////////////////////////// - - /** - * An enumeration that defines how to compare the filters value against the corresponding property value. - * @requires The Microsoft.Maps.SpatialDataService module. - */ - export enum FilterCompareOperator { - /** Determines if a string value ends with a specified string value. */ - endsWith, - - /** Determines if two values are equal. */ - equals, - - /** Determines if a first value is greater than a second value. */ - greaterThan, - - /** Determines if a first value is greater than or equal to a second value. */ - greaterThanOrEqual, - - /** Determines if a value is within an array. */ - isIn, - - /** Determines if a first value is less than a second value. */ - lessThan, - - /** Determines if a first value is less than or equal a second value. */ - lessThanOrEqual, - - /** Determines if a string value does not end with a specified string value. */ - notEndsWith, - - /** Determines if two values are not equal. */ - notEquals, - - /** Determines if a string value does not start with a specified string value. */ - notStartsWith, - - /** Determines if a string value starts with a specified string value. */ - startsWith - } - - /** - * An enumeration that defines how two or more filters are linked together. - * @requires The Microsoft.Maps.SpatialDataService module. - */ - export enum FilterLogicalOperator { - /** Connects two or more filters that both must be true. */ - and, - - /** Connects two or more filters where one of them must be true. */ - or - } - - /** - * A Fitler object that defines the logic behind a filter expression that can be executed against a JSON object or generate - * a filter string that can be used with the Bing Spatial Data Services. - */ - export interface IFilter { - /** - * Executes the filter logic against a JSON object and returns a boolean indicating if the object meets the requirements of the Filter. - * @returns A boolean indicating if the specified object meets the requirements of the Filter. - */ - execute(object: any): boolean; - - /** - * Converts the filter logic into a string format that is compatible with the Bing Spatial Data Services. - * @returns A filter string that is formatted such that it is compatible with the Bing Spatial Data Services. - */ - toString(): string; - } - - /** - * The Fitler class defines the logic behind a filter expression that can be executed against a JSON object or generate - * a filter string that can be used with the Bing Spatial Data Services. - * @requires The Microsoft.Maps.SpatialDataService module. - */ - export class Filter implements IFilter { - /** - * @constructor - * @requires The Microsoft.Maps.SpatialDataService module. - * @param propertyName The name of the property in the object to test against. Can also provide child properties i.e. 'root.child'. - * @param operator The operator to use when comparing the specified property to value to the provided value. - * @param value A value to compare against. - */ - constructor(propertyName: string, operator: string | FilterCompareOperator, value: any); - - /** - * Executes the filter logic against a JSON object and returns a boolean indicating if the object meets the requirements of the Filter. - * @returns A boolean indicating if the specified object meets the requirements of the Filter. - */ - public execute(object: any): boolean; - - /** - * Converts the filter logic into a string format that is compatible with the Bing Spatial Data Services. - * @returns A filter string that is formatted such that it is compatible with the Bing Spatial Data Services. - */ - public toString(): string; - } - - /** - * A class that groups two or more logical filters or filter groups together. It can be executed against a JSON or generate - * a filter string that can be used with the Bing Spatial Data Services. - * @requires The Microsoft.Maps.SpatialDataService module. - */ - export class FilterGroup implements IFilter { - /** - * @constructor - * @requires The Microsoft.Maps.SpatialDataService module. - * @param filters An array consisting of Filter or FilterGroup objects to combine. - * @param operator The logical operator for combining the filters together. - * @param not A boolean is the logical inverse should of the filter should be used. - */ - constructor(filters: IFilter[], operator: FilterLogicalOperator, not?: boolean) - - /** - * Executes the filter logic against a JSON object and returns a boolean indicating if the object meets the requirements of the Filter. - * @returns A boolean indicating if the specified object meets the requirements of the Filter. - */ - public execute(object: any): boolean; - - /** - * Converts the filter logic into a string format that is compatible with the Bing Spatial Data Services. - * @returns A filter string that is formatted such that it is compatible with the Bing Spatial Data Services. - */ - public toString(): string; - } - - /** Options for find near route query API. */ - export interface ISpatialFilterOptions { - /** - * One of the following values: - * • nearby – Searches in a radius around a location. - * • nearRoute – Searches for results that are within 1 mile of a route. - * • intersects – Searches for results that intersect with the specified geometry. - * Note: Note that the NavteqNA and NavteqEU data sources only support nearby queries. - */ - spatialFilterType: string; - - /** Location at which the filter should be applied (only for nearby filter). */ - location?: string | Location; - - /** - * Radius to use when performing a nearby search. The distance in kilometers and must be between 0.16 and 1000 kilometers - * (only for nearby filter). - */ - radius?: number; - - /** Start location of the route (only for nearroute filter). */ - start?: string | Location; - - /** End location of the route (only for nearroute filter). */ - end?: string | Location; - - /** Intersection object. Can be a well known text string or a LocationRect object (only for intersects filter). */ - intersects?: string | LocationRect | IPrimitive; - } - - /** Options for find near route query API. */ - export interface IFindNearRouteOptions extends ISpatialFilterOptions { - /** - * One of the following values: - * • Driving [default] - * • Walking - */ - travelMode?: string; - - /** - * An integer value between 0 and 359 that represents degrees from north - * where north is 0 degrees and the heading is specified clockwise from north. - * For example, setting the heading of 270 degrees creates a route that initially heads west - */ - heading?: number; - - /** - * An integer distance specified in meters. - * Use this parameter to make sure that the moving vehicle has enough distance - * to make the first turn - */ - distanceBeforeFirstTurn?: number; - - /** - * A list of values that limit the use of highways and toll roads in the route. - * Use one of the following values: - * • highways - Avoids the use of highways in the route. - * • tolls - Avoids the use of toll roads in the route. - * • minimizeHighways - Minimizes (tries to avoid) the use of highways in the route. - * • minimizeTolls - Minimizes (tries to avoid) the use of toll roads in the route. - */ - avoid?: string[]; - - /** - * One of the following values: - * • distance - The route is calculated to minimize the distance.Traffic information is not used. - * • time[default] - The route is calculated to minimize the time.Traffic information is not used. - * • timeWithTraffic - The route is calculated to minimize the time and uses current traffic information. - */ - optimize?: string; - } - - /** Set of options that can be specified for query APIs. */ - export interface IQueryAPIOptions { - /** A queryurl containing the access id, data source name and the entity type name. */ - queryUrl: string; - - /** Specifies a conditional expression for a list of properties and values. */ - filter?: IFilter; - - /** Specifies whether or not to return a count of the results in the response. Default: false */ - inlineCount?: boolean; - - /** Specifies to query the staged version of the data source instead of the published version. Default: false */ - isStaging?: boolean; - - /** - * Specifies one or more properties to use to sort the results of a query. - * You can specify up to three (3) properties. Results are sorted in ascending order. - * Note: You cannot use the latitude and longitude properties to sort results. You can use the elevation property. - */ - orderBy?: string[]; - - /** - * Specifies the data source properties to return in the response. If the $select query option is not specified or - * if it is set to "" ($select=), all data source properties are returned. Default: "*,_distance" - */ - select?: string[]; - - /** Specifies to not return a specified number of query results. */ - skip?: number; - - /** Spatial filter options to apply. */ - spatialFilter?: ISpatialFilterOptions | IFindNearRouteOptions; - - /** Specifies the maximum number of results to return in the query response. Default: 25 */ - top?: number; - } - - /** - * This is a static class that provides that ability to query data sources that are hosted by the Bing Spatial Data Services using the Query API. - * @requires The Microsoft.Maps.SpatialDataService module. - */ - export module QueryAPIManager { - /** - * Perform a search - * @requires The Microsoft.Maps.SpatialDataService module. - * @param queryOptions - Options for the query - * @param credentials - Credentials for the query - * @param callback - The function to call once the results are retrieved - * @param styles - (Optional) Styles of the data that needs to be rendered on map - */ - export function search(queryOptions: IQueryAPIOptions, - credentials: string | Map, - callback: (data: IPrimitive[], inlineCount?: number) => void, - styles?: IStylesOptions): void; - } -} \ No newline at end of file diff --git a/types/bingmaps/SpatialMath.d.ts b/types/bingmaps/SpatialMath.d.ts deleted file mode 100644 index 4fe3b4ea12..0000000000 --- a/types/bingmaps/SpatialMath.d.ts +++ /dev/null @@ -1,530 +0,0 @@ -////////////////////////////////////////////// -/// Core Library -////////////////////////////////////////////// - -/** - * This module provides a bunch of useful spatial math calculations. - * @requires The Microsoft.Maps.SpatialMath module. - */ -declare module Microsoft.Maps.SpatialMath { - - /** - * Distance Unit enumerator - * @requires The Microsoft.Maps.SpatialMath module. - **/ - export enum DistanceUnits { - /** A distance in meters */ - Meters, - - /** A distance in kilometers */ - Kilometers, - - /** A distance in miles */ - Miles, - - /** A distance in Feet */ - Feet, - - /** A distance in Yards */ - Yards, - - /** A distance in Nautical Miles */ - NauticalMiles - } - - /** - * Area units enumerator - * @requires The Microsoft.Maps.SpatialMath module. - **/ - export enum AreaUnits { - /** Area in square meters */ - SquareMeters, - - /** Area in square kilometers */ - SquareKilometers, - - /** Area in square miles */ - SquareMiles, - - /** Area in square Feet */ - SquareFeet, - - /** Area in square Yards */ - SquareYards, - - /** Area in Acres */ - Acres, - - /** Area in Hectares */ - Hectares - } - - ////////////////////////////////////////////// - /// Core Calculations - ////////////////////////////////////////////// - - /** - * Converts an area from one area units to another. - * @param area A number that represents an area to convert. - * @param fromUnits The area units the original area is in. - * @param toUnits The area units to convert to. - * @returns An area in the new units. - **/ - export function convertArea(area: number, fromUnits: AreaUnits, toUnits: AreaUnits): number; - - /** - * Converts a distance from one distance units to another. - * @param distance A number that represents a distance to convert. - * @param fromUnits The distance units the original distance is in. - * @param toUnits The disired distance units to convert to. - * @returns A distance in the new units. - **/ - export function convertDistance(distance: number, fromUnits: DistanceUnits, toUnits: DistanceUnits): number; - - /** - * Calculates an array of locations that form a cardinal spline between the specified array of locations. - * @param locations The array of locations to calculate the spline through. - * @param tension A number that indicates the tightness of the curve. Can be any number, although a value between 0 and 1 is usually used. Default: 0.5 - * @param nodeSize Number of nodes to insert between each Location. Default: 15 - * @param close A boolean indicating if the spline should be a closed ring or not. Default: false - * @returns An array of locations that form a cardinal spline between the specified array of locations. - */ - export function getCardinalSpline(locations: Location[], tension ?: number, nodeSize ?: number, close ?: boolean): Location[]; - - /** - * Calculates a destination Location based on a starting Location, a heading, a distance, and a distance unit type. - * @param origin Location that the destination is relative to. - * @param bearing A heading angle between 0 - 360 degrees. 0 - North, 90 - East, 180 - South, 270 - West. - * @param distance Distance that destination is away. - * @param units Unit of distance measurement. Default is Meters. - * @returns A Location that is the specified distance away from the origin. - **/ - export function getDestination(origin: Location, bearing: number, distance: number, units?: DistanceUnits): Location; - - /** - * Calculate the distance between two Location objects on the surface of the earth using the Haversine formula. - * @param origin First Location to calculate distance between. - * @param destination Second Location to calculate distance between. - * @param units Unit of distance measurement. Default is Meters. - * @param highAccuracy When set enabled, will use the slower but more accurate Vincenty formula for calculating distances, rather than the Haversine formula. - * @returns The shortest distance between two Locations in the specifed units. - **/ - export function getDistanceTo(origin: Location, destination: Location, units?: DistanceUnits, highAccuracy?: boolean): number; - - /** - * Retrieves the radius of the earth in a specific distance unit for WGS84. - * @param units Unit of distance measurement. Default: Meters - * @returns A number that represents the radius of the earth in a specific distance unit. - **/ - export function getEarthRadius(units?: DistanceUnits): number; - - /** - * Takes an array of Locations objects and fills in the space between them with accurately positioned Locations to form an approximated Geodesic path. - * @param path Array of Location objects that form a path to fill in. - * @param nodeSize Number of nodes to insert between each Location. Default: 15 - * @returns An array of Location objects that form a geodesic paths. - **/ - export function getGeodesicPath(path: Location[], nodeSize?: number): Location[]; - - /** - * Calculates the heading from one Location object to another. - * @param origin Point of origin. - * @param destination Destination to calculate relative heading to. - * @returns A heading in degrees between 0 and 360. 0 degrees points due North. - **/ - export function getHeading(origin: Location, destination: Location): number; - - /** - * Calculates the distance between all Location objects in an array. - * @param path The array of Location objects that make up the path to calculate the length of. - * @param units Unit of distance measurement. Default: Meters - * @param highAccuracy If set to true, uses the more accurate Vincenty algorithm for calcuating distances. Otherwise the faster Haversine formula is used. - * @returns The distance between all Locations in between all Location objects in an array on the surface of a earth in the specifed units. - **/ - export function getLengthOfPath(path: Location[], units?: DistanceUnits, highAccuracy?: boolean): number; - - /** - * Calculates the Location object on a path that is a specified distance away from the start of the path. If the specified distance is longer - * than the length of the path, the last Location of the path will be returned. - * @param path A polyline or array of Location coordinates that form a path. - * @param distance The distance along the path (from the start) to calculate the location for. - * @param units Unit of distance measurement. Default is Meters. - * @returns A Location object that is the specified distance away from the start of the path when following the path. - **/ - export function getLocationAlongPath(path: Polyline | Location[], distance: number, units?: DistanceUnits): Location; - - /** - * Calculates an array of Location objects that are an equal distance away from a central point to create a regular polygon. - * @param origin Center of the regular polygon. - * @param radius Radius of the regular polygon. - * @param numberOfPoints Number of points the polygon should have. - * @param units Unit of distance measurement for radius. Default is Meters. - * @param offset An offset to rotate the polygon clockwise in degrees. When 0 the first Location will align with North. - * @returns An array of Location objects that form a regular polygon. - **/ - export function getRegularPolygon(origin: Location, radius: number, numberOfPoints: number, units?: DistanceUnits, offset?: number): Location[]; - - /** - * Calculates a Location object that is a fractional distance between two Location objects. - * @param origin First Location to calculate mid-point between. - * @param destination Second Location to calculate mid-point between. - * @param fraction The fractional parameter to calculate a mid-point for. Default 0.5. - * @returns A Location that lies a fraction of the distance between two Location objects, relative to the first Location object. - **/ - export function interpolate(origin: Location, destination: Location, fraction?: number): Location; - - /** - * Takes a LocationRect and converts it to a polygon. - * @param bounds The LocationRect to convert to a Polygon. - * @returns A polygon representation of the LocationRect. - **/ - export function locationRectToPolygon(bounds: LocationRect): Polygon; - - /** - * Takes a Location object and converts it into a Degree Minute Seconds string in the format. For example: 40° 26′ 46″ N 79° 58′ 56″ W - * @param loc The Location object to convert into a Degree Minute Seconds string. - * @returns A string in Degree Minute Seconds format or null if invalid Location object is provided. - */ - export function toDegMinSec(loc: Location): string; - - /** - * Tries to parse the given string that is in Degree Minute Seconds format. For Example: 35° 26′ 31″ E or 40° 26′ 46″ N 79° 58′ 56″ W - * @param input A string in Degree Minute Seconds format to parse. - * @returns Returns a decimal degree value if only a single angle is provided. If two angles provided in the string, then a - * Location object is returned. If string is in an invalid format, null is returned. - */ - export function tryParseDegMinSec(input: string): number | Location; -} - - -////////////////////////////////////////////// -/// Tile Calculations -////////////////////////////////////////////// - -/** -* A colleciton of mathematical algorithms based on the tile pyramid used by Bign Maps. -* @requires The Microsoft.Maps.SpatialMath module. -*/ -declare module Microsoft.Maps.SpatialMath.Tiles { - //Based on https://msdn.microsoft.com/en-us/library/bb259689.aspx - - /** - * Calculates the full width of the map in pixels at a specific zoom level from -180 degrees to 180 degrees. - * @param zoom Zoom level to calculate width at. - * @param tileWidth Width of tile. - * @returns Width of map in pixels. - **/ - export function mapSize(zoom: number): number; - - /** - * Calculates the Ground resolution at a specific degree of latitude in the specified units per pixel. - * @param latitude Degree of latitude to calculate resolution at. - * @param zoom Zoom level to calculate resolution at. - * @param units Distance unit type to calculate resolution in. - * @returns Ground resolution in distance unit per pixels. - **/ - export function groundResolution(latitude: number, zoom: number, units?: SpatialMath.DistanceUnits): number; - - /** - * Converts a Pixel coordinate into a Geospatial Location at a specified zoom level. - * Global Pixel coordinates are relative to the top left corner of the map (90, -180) - * @param point Pixel coordinate. - * @param zoom Zoom level. - * @returns A Location that is at the specified pixel location at a specified zoom level. - **/ - export function globalPixelToLocation(point: Point, zoom: number): Location; - - /** - * Converts a point from latitude/longitude WGS-84 Location (in degrees) - * into pixel XY coordinates at a specified level of detail. - * @param loc Location to convert to a global pixel. - * @param zoom Level of detail, from 1 (lowest detail) to 23 (highest detail). - * @returns Point object containing the the global pixel location of a Location. - **/ - export function locationToGlobalPixel(loc: Location, zoom: number): Point; - - /** - * Calculates the PyramidTileId that a global pixel intersects with at a specific zoom level. - * @param pixel The pixel coordinate to calculate the tile for. - * @param zoom The zoom level to calculate the tile for. - * @returns A PyramidTileId that a global pixel intersects with at a specific zoom level. - **/ - export function globalPixelToTile(pixel: Point, zoom: number): PyramidTileId; - - /** - * Converts a PyramidTileId into a global pixel coordinates of the upper-left pixel of the specified tile. - * @param tile A PyramidTileId to calculate the upper-left pixel for. - * @returns Global pixel coordinate of the top left corner of a tile. - **/ - export function tileToGlobalPixel(tile: PyramidTileId): Point; - - /** - * Calculates the PyramidTileId that a Location object intersects with at a specific zoom level. - * @param loc The location to calulate the tile for. - * @param zoom The zoom level to use to calculate the tile. - * @returns A PyramidTileId that a Location object intersects with at a specific zoom level. - **/ - export function locationToTile(loc: Location, zoom: number): PyramidTileId; - - /** - * Calculates all the PyramidTileId's that are within a LocationRect at a specific zoom level. - * @param bounds A LocationRect to search for tiles in. - * @param zoom The zoom level to calculate tiles for. - * @returns A list of PyramidTileId's that are within the specified LocationRect and zoom level. - **/ - export function getTilesInBounds(bounds: LocationRect, zoom: number): PyramidTileId[]; - - /** - * Calculates the LocationRect (bounding box) of a PyramidTileId. - * @param tile A PyramidTileId to calculate the LocationRect of. - * @returns The bounding box of a tile. - **/ - export function tileToLocationRect(tile: PyramidTileId): LocationRect; -} - - -////////////////////////////////////////////// -/// Geometry Calculations -////////////////////////////////////////////// - -/** -* A colleciton of geometry calculations that can be performed against Bing Maps shapes. -* @requires The Microsoft.Maps.SpatialMath module. -*/ -declare module Microsoft.Maps.SpatialMath.Geometry { - - /** Defines how the end of a line should be buffered. */ - export enum BufferEndCap { - /** Adds a rounded end to a buffered line. */ - Round, - - /** Adds a flat end to a buffered line that touches the end of the line. */ - Flat, - - /** Adds a square end to a buffered line that has a buffer area at the end of the line. */ - Square - } - - /** - * Calculates the area of a shape. - * @param shape The shape to calculate the area of. - * @param areaUnits The unit of measurement to calculate the area in. - * @returns The area of a shape in the specified unit of measurement. - */ - export function area(shape: IPrimitive | IPrimitive[], areaUnits?: AreaUnits): number; - - /** - * Calculates a bounding box that encloses a set of shapes and/or locations. - * @param shapes The shape(s) to calculate the bounding box for. - * @returns A location rect that encloses the shapes and/or locations. - */ - export function bounds(shapes: Location | IPrimitive | (Location | IPrimitive)[]): LocationRect; - - /** - * Calcuates a shape with an updated boundary that has been inflated/deflated by a speicifed distance. - * @param shape The shape to buffer. - * @param distance The distance to buffer the shape by. - * @param units The distance units to buffer the shape by. - * @param endCapType The type of end cap to use for the joints of the buffer, default value is round. - * @param options A set of polygon options to apply to the generated shape. - * @returns A buffered version of the shape. - */ - export function buffer(shape: Location | IPrimitive | (Location | IPrimitive)[], distance: number, units?: DistanceUnits, endCapType?: BufferEndCap, options?: IPolygonOptions): IPrimitive | IPrimitive[]; - - /** - * Calculates the center of a shape. - * @param shape The shape to calculate the center of. - * @returns The center of the specified shape. - */ - export function centroid(shape: IPrimitive | IPrimitive[]): Location; - - /** - * Calculates an approximate concave hull that best fits the data. - * A concave hull is a shape that represents that a possible concave geometry that encloses all shapes in the specified data set. - * If a single unique Location is in the data set, a Pushpin is returned. If only two unique Locations are provided, or if all Locations form a line, a Polyline is returned. - * If 3 or more unique Locations are in the data set a Polygon, or array of Polygons will be returned. - * @param shapes Shape(s) whose Location(s) or Location(s) are to be used to generate a concave hull. - * @param allowMultiPolygons A boolean indicating if the resulting concave hull can be a MultiPolygon. Default: false - * @param allowHoles A boolean indicating if the polygons in the resulting concave hull can have holes in them. Default: false - * @param options A set of polygon options to apply to the generated shape. - * @returns An approximate concave hull that best fits the data. - * If a single unique Location is in the data set, a Pushpin is returned. If only two unique Locations are provided, or if all Locations form a line, a Polyline is returned. - * If 3 or more unique Locations are in the data set a Polygon, or array of Polygons will be returned. - */ - export function concaveHull(shapes: Location | IPrimitive | (Location | IPrimitive)[], allowMultiPolygons?: boolean, allowHoles?: boolean, options?: IPolygonOptions): IPrimitive | IPrimitive[]; - - /** - * Given two shapes, determines if the first one contains the second one - * (or, the second shape is a subset of the first shape) or not. - * @param shapeA The first shape to test against the second. - * @param shapeB The second shape to test against the first. - * @returns A boolean indicating if the first shape contains the second shape. - */ - export function contains(shapeA: Location | IPrimitive | (Location | IPrimitive)[], shapeB: Location | IPrimitive | (Location | IPrimitive)[]): boolean; - - /** - * Calculates a convex hull. A convex hull is a shape that represents that minimum convex geometry that encloses all shapes in the specified data set. - * @param shapes Shape(s) whose Location(s) or Location(s) are to be used to generate a convex hull. - * @param options A set of polygon options to apply to the generated shape. - * @returns An array of locations that form a convex hull that encloses all locations of the shapes provided in an array. - */ - export function convexHull(shapes: Location | IPrimitive | (Location | IPrimitive)[], options?: IPolygonOptions): IPrimitive | IPrimitive[]; - - /** - * Creates Delaunay Triangles from the Location objects of the provided shapes. - * @param shapes Location(s) of shape(s) or Location(s) to generate a Delaunay Triangles from. - * @param options A set of polyline or polygon options to apply to the generated shape. - * @returns An array of shapes that form the polygon triangles of the delaunay triangles. - */ - export function delaunayTriangles(shapes: Location | IPrimitive | (Location | IPrimitive)[], options?: IPolygonOptions): Polygon[]; - - /** - * Returns an object that represents area of an initial shape subtracted by the overlapping area of a second shape. - * @param shapeA The first shape. - * @param shapeB The second shape to subtract from the first. - * @returns A set of shapes that represent the area of the first shape that is not overlapped by the second shape. - */ - export function difference(shapeA: IPrimitive | IPrimitive[], shapeB: IPrimitive | IPrimitive[]): IPrimitive | IPrimitive[]; - - /** - * Calculates the approximate shortest distance between any two shapes. - * @param shapeA The first shape to calculate the distance from. - * @param shapeB The second shape to calculate the distance to. - * @param units Unit of distance measurement. Default: Meters - * @param highAccuracy If set to true, uses the more accurate Vincenty algorithm for calcuating distances. Otherwise the faster Haversine formula is used. - * @returns The shorested distance between the shapes in the specified units. - */ - export function distance(shapeA: Location | IPrimitive | (Location | IPrimitive)[], shapeB: Location | IPrimitive | (Location | IPrimitive)[], units?: DistanceUnits, highAccuracy?: boolean): number; - - /** - * Returns an object that represents the area where two shapes intersect. - * @param shapeA The first shape. - * @param shapeB The second shape. - * @returns A set of shapes that represents the area where two shapes intersect. - */ - export function intersection(shapeA: IPrimitive | IPrimitive[], shapeB: IPrimitive | IPrimitive[]): IPrimitive | IPrimitive[]; - - /** - * Determines if two shapes intersect or not. - * @param shapeA The first shape to test against the second. - * @param shapeB The second shape to test against the first. - * @returns A boolean indicating if the two shapes intersect. - */ - export function intersects(shapeA: Location | IPrimitive | (Location | IPrimitive)[], shapeB: Location | IPrimitive | (Location | IPrimitive)[]): boolean; - - /** - * Tests to see if the shape is valid and meets the requirements of an SQL Geography type and other OGC compliant systems. Polylines & Polygons can't be self intersecting. For Polygons, - * coordinates in an exterior rings have a counter-clockwise orientation, while holes have a clockwise orientation. - * @param shape The shape to test for validity. - * @returns Returns a boolean indicting if the specified shape(s) is valid or not. - */ - export function isValid(shape: IPrimitive | IPrimitive[]): boolean; - - /** - * Calculates the distance between all Locations in a shape. If the shape is a polygon, the length of the perimeter of all rings is calculated. - * @param shape The shape to calculate the length of. - * @param units Unit of distance measurement. Default: Meters - * @param highAccuracy If set to true, uses the more accurate Vincenty algorithm for calcuating distances. Otherwise the faster Haversine formula is used. - * @returns The distance between all Locations in a polyline or the perimeter of a ploygon on the surface of a earth in the specifed units. - */ - export function calculateLength(shape: IPrimitive | IPrimitive[], units ?: DistanceUnits, highAccuracy ?: boolean): number; - - /** - * Takes a shape and returns a copy of it that meets the requirements of an SQL Geography type and other OGC compliant systems. Polylines & Polygons can't be self intersecting. For Polygons, - * coordinates in an exterior rings have a counter-clockwise orientation, while holes have a clockwise orientation. - * @param shape The shape to make valid. - * @returns Valiated version of the provided shape. May be a different shape type than what was provided. i.e. A polygon may be broken up into an array of polygons (MultiPolygon). - */ - export function makeValid(shape: IPrimitive | IPrimitive[]): IPrimitive | IPrimitive[]; - - /** - * Calculates the nearest Location objects between to shapes that lie on the shapes. - * If the shapes do not overlap, this calculates a location on each shape that is closest to the other shape. - * If the shapes overlap, a location that is within the intersection area of the shapes will be added twice to an array, once for each shape, and returned. - * @param shapeA The first shape. - * @param shapeB The second shape. - * @returns An array of two Location objects that represent the nearest points between two shapes. - * The Location objects are in the same order as the input shapes. - * Returns null if nearest points were unable to be computed. - */ - export function nearestLocations(shapeA: Location | IPrimitive | (Location | IPrimitive)[], shapeB: Location | IPrimitive | (Location | IPrimitive)[]): Location[]; - - /** - * Reduces the resolution of a shape using the Douglas-Peucker algorithm. - * @param shape The shape to reduce the resolution of. - * @param tolerance A tolerance distance in meters used by the reduction algorithms. - * @returns A version of the specified shape that has been reduced. - */ - export function reduce(shape: IPrimitive | IPrimitive[], tolerance: number): IPrimitive | IPrimitive[]; - - /** - * Rotates a shape around a given Location for the specified angle of rotation. If an origin is not provided, the centroid of the shape is used. - * @param shape The shape to be rotated. - * @param angle The amount to rotate the shape in degrees. - * @param origin The location to rotate the shape around. Defaults to the centroid of the shape. - */ - export function rotate(shape: IPrimitive | IPrimitive[], angle: number, origin?: Location): void; - - /** - * Calculates the shortest path that between two shapes and returns a Polyline. - * @param shapeA The first shape. - * @param shapeB The second shape. - * @param options A set of polyline options to apply to the generated polyline. - * @returns A polyline that represents the shortest path between two shapes. - */ - export function shortestLineTo(shapeA: Location | IPrimitive | (Location | IPrimitive)[], shapeB: Location | IPrimitive | (Location | IPrimitive)[], options?: IPolylineOptions): Polyline; - - /** - * Snaps the locations of one shape that are within the specified tolerance distance away from another shape. - * @param locs The locations to snap to the shape. - * @param shape The shape to snap the locations to. - * @param tolerance A maximum distance (in the specified units) that the snapped location can be from the input location. Default: Infinity - * @param toleranceUnits The distance units of the tolerance value. Default: Meters - * @returns A snapped location if only one location is provided, otherwise returns an array of snapped locations. - */ - export function snapLocationsToShape(locs: Location | Location[], shape: IPrimitive | IPrimitive[], tolerance?: number, toleranceUnits?: DistanceUnits): Location | Location[]; - - /** - * Snaps the locations of one shape that are within the specified tolerance distance away from another shape. - * @param shapeToSnap The shape to snap the locations of. - * @param shape The shape to snap the locations to. - * @param tolerance A maximum distance (in the specified units) that the snapped location can be from the input location. Default: Infinity - * @param toleranceUnits The distance units of the tolerance value. Default: Meters - */ - export function snapShapeToShape(shapeToSnap: IPrimitive | IPrimitive[], shape: IPrimitive | IPrimitive[], tolerance?: number, toleranceUnits?: DistanceUnits): void; - - /** - * Returns an object that represents all points that are either in one shape instance or another, but not those points that lie in both instances. - * "Sym" stands for Symmetric. symDifference is an OGC standard name for this calculation used in most spatial math libraries, including SQL. - * @param shapeA The first shape. - * @param shapeB The second shape. - * @returns A shape that represents the symetric difference between two shapes. - */ - export function symDifference(shapeA: IPrimitive | IPrimitive[], shapeB: IPrimitive | IPrimitive[]): IPrimitive | IPrimitive[]; - - /** - * Returns an object that represents the union of two shapes. If shapes don't overlap, an array of each individual shapes will be returned. - * @param shapeA The first shape. - * @param shapeB The second shape. - * @returns A shape that represents the union of two shapes. - */ - export function union(shapeA: IPrimitive | IPrimitive[], shapeB: IPrimitive | IPrimitive[]): IPrimitive | IPrimitive[]; - - /** - * Performs a union operation on a set of shapes. - * If a shape doesn't overlap with the rest, the returned result will be an array of shapes containing this shape and the union of the rest. - * @param shapes An array of shapes to union together. - * @returns A shape that represents the union of all specified shapes. - */ - export function unionAggregate(shapes: IPrimitive[]): IPrimitive | IPrimitive[]; - - /** - * Creates a Voronoi diagram from the Location objects of the provided shapes. The diagram is returned as an array of Polygons. - * If a clip region is specified, the diagram will be clipped accordingly. - * @param shapes Location(s) of shape(s) or Location(s) to generate a Voronoi diagram. - * @param clipRegion A region to clip the voronoi diagram to. - * @param options A set of polygon options to apply to the generated shape. - * @returns An array of polygons that form a Voronoi diagram. - */ - export function voronoiDiagram(shapes: Location | IPrimitive | (Location | IPrimitive)[], clipRegion?: LocationRect | Polygon, options?: IPolygonOptions): Polygon[]; -} \ No newline at end of file diff --git a/types/bingmaps/Traffic.d.ts b/types/bingmaps/Traffic.d.ts deleted file mode 100644 index 1c78256053..0000000000 --- a/types/bingmaps/Traffic.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Adds a traffic incident and flow data to the map. - * @requires The Microsoft.Maps.Traffic module. - */ -declare module Microsoft.Maps.Traffic { - /** Options that can be customized in the Traffic manager. */ - export interface ITrafficOptions { - /** Displays the traffic flow layer. */ - flowVisible?: boolean; - - /** Displays all traffic incidents. */ - incidentsVisible?: boolean; - - /** Displays the traffic legend. */ - legendVisible?: boolean; - - /** - * Sets the opacity of the traffic flow tile layer. Must be a number between 0 and 1. The default is 1 unless the map - * mode is set to lite, in which case the default is set to 0.7. - */ - opacity?: number; - } - - /** - * The TrafficManager class provides the ability to show traffic flow and incident data on top of the map. When creating an - * instance of the TrafficManager class the map must be passed as an argument to the constructor. - * @requires The Microsoft.Maps.Traffic module. - */ - export class TrafficManager { - /** - * @constructor - * @requires The Microsoft.Maps.Traffic module. - * @param map A map instnce to attach the traffic manager to. - */ - constructor(map: Map); - - /** Hides all traffic data. */ - public hide(): void; - - /** Hides the traffic flow layer. */ - public hideFlow(): void; - - /** Hides all traffic incidents. */ - public hideIncidents(): void; - - /** Hides the traffic legend. */ - public hideLegend(): void; - - /** - * Sets the options for the traffic manager. - * @param options The options for the traffic manager. - */ - public setOptions(options: ITrafficOptions): void; - - /** Displays all traffic data. */ - public show(): void; - - /** Displays the traffic flow layer. */ - public showFlow(): void; - - /** Displays all traffic incidents. */ - public showIncidents(): void; - - /** Displays the traffic legend. */ - public showLegend(): void; - - } -} \ No newline at end of file diff --git a/types/bingmaps/WellKnownText.d.ts b/types/bingmaps/WellKnownText.d.ts deleted file mode 100644 index 51c42203ce..0000000000 --- a/types/bingmaps/WellKnownText.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -declare module Microsoft.Maps { - /** - * Class responsible for readon/writing geo data in well known text format - * @requires The Microsoft.Maps.WellKnownText module. - */ - export module WellKnownText { - /** - * Reads the data in wellknowntext format and returns the shapes. Multi-Geometry type shapes are returned as an array of shapes. - * @param wkt The well known text string that needs to be parsed into shapes. - * @param styles Styles to apply to the shapes. - * @returns One of more shapes. - */ - export function read(wkt: string, styles?: IStylesOptions): IPrimitive | IPrimitive[]; - - /** - * Writes the data into wellknowntext format. - * @param data The data that needs to be serialized. - * @returns Well known text formatted string. - */ - export function write(data: IPrimitive | IPrimitive[]): string; - } -} \ No newline at end of file diff --git a/types/bingmaps/bingmaps-tests.ts b/types/bingmaps/bingmaps-tests.ts deleted file mode 100644 index 962c3047fa..0000000000 --- a/types/bingmaps/bingmaps-tests.ts +++ /dev/null @@ -1,83 +0,0 @@ -namespace BingMapsTests { - - // An interactive set of Bing Maps AJAX control usages can be found at http://www.bingmapsportal.com/isdk/ajaxv7 - // A full API description can be found at http://msdn.microsoft.com/en-us/library/gg427610.aspx - export class TestFixture { - - public createMap( - // This key can be acquired at http://www.microsoft.com/maps/create-a-bing-maps-key.aspx - bingMapsApiKey: string, - // This is the HTML container that the map will be drawn inside of - target: HTMLElement, - // These positions will be placed as pushpins onto the map - mapPositions: Array, - // This will fire if the geolocation fails and will pass the original target (parameter 2) - onFailure: (element: HTMLElement) => any) { - - var self = this; - var map: Microsoft.Maps.Map; - - navigator.geolocation.getCurrentPosition((position: Position) => { - - var locations: Array = new Array(); - var options: Microsoft.Maps.IMapLoadOptions; - - function loadMap() { - options = { - credentials: bingMapsApiKey, - enableClickableLogo: false, - showDashboard: false, - showScalebar: false, - center: self.toLocation(position), - zoom: 16, - mapTypeId: Microsoft.Maps.MapTypeId.road - }; - - target.innerHTML = ""; - - map = new Microsoft.Maps.Map(target, options); - - for (var i = 0; i < mapPositions.length; ++i) { - - var mapPosition: Position = mapPositions[i]; - var location: Microsoft.Maps.Location = self.createPushpin(map, mapPosition); - - locations.push(location); - } - - // Sets the view of the map to the smallest size that contains all of the - // specified locations (in this case the pusphin locations) - map.setView({ bounds: Microsoft.Maps.LocationRect.fromLocations(locations) }); - } - - if ((window).Windows != undefined) { - // Running in Win8 app - Microsoft.Maps.loadModule("Microsoft.Maps.Map", { callback: loadMap }); - } else { - // Running anywhere else - loadMap(); - } - }, () => onFailure(target), { maximumAge: 3000, timeout: 5000, enableHighAccuracy: true }); - - } - - // Converts a standard HTML geolocation Position to a Location - private toLocation(position: Position): Microsoft.Maps.Location { - return new Microsoft.Maps.Location(position.coords.latitude, position.coords.longitude); - } - - // Creates a pushpin on a specified map and returns the Location for potentially setting the map view - private createPushpin(map: Microsoft.Maps.Map, position: Position): Microsoft.Maps.Location { - - var location: Microsoft.Maps.Location; - var pushpin: Microsoft.Maps.Pushpin; - - location = this.toLocation(position); - pushpin = new Microsoft.Maps.Pushpin(location, null); - - map.entities.push(pushpin); - - return location; - } - } -} diff --git a/types/bingmaps/index.d.ts b/types/bingmaps/index.d.ts deleted file mode 100644 index b629e3b903..0000000000 --- a/types/bingmaps/index.d.ts +++ /dev/null @@ -1,2850 +0,0 @@ -// Type definitions for Microsoft.Maps 8.0 (Change set e6d7cc4) -// Project: https://github.com/Microsoft/Bing-Maps-V8-TypeScript-Definitions -// Definitions by: Ricky Brundritt -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// - -/** - * The Bing Maps V8 developer API. - */ -declare module Microsoft.Maps { - - ////////////////////////////////////////////// - /// Custom Map Styles - ////////////////////////////////////////////// - - /** The styles options that can be applied to map elements. */ - export interface IMapElementStyle { - /** - * Hex color used for filling polygons, the background of point icons, and for the center of lines if they have split. - */ - fillColor?: string; - - /** - * The hex color of a map label. - */ - labelColor?: string; - - /** - * The outline hex color of a map label. - */ - labelOutlineColor?: string; - - /** - * Species if a map label type is visible or not. - */ - labelVisible?: boolean; - - /** - * Hex color used for the outline around polygons, the outline around point icons, and the color of lines. - */ - strokeColor?: string; - - /** - * Specifies if the map element is visible or not. - */ - visible?: boolean; - } - - /** The style options that can be appliction to bordered map elements. */ - export interface IBorderedMapElementStyle extends IMapElementStyle { - /** - * Secondary/casing line hex color of the border of a filled polygon. - */ - borderOutlineColor?: string; - - /** - * Primary line hex color of the border of a filled polygon. - */ - borderStrokeColor?: string; - - /** - * Specifies if a border is visible or not. - */ - borderVisible?: boolean; - } - - /** Global style settings */ - export interface ISettingsStyle { - /** A hex color value that all land is first flushed to before things are drawn on it. */ - landColor?: string; - - /** Specifies whether or not to draw elevation shading on the map. */ - shadedReliefVisible?: boolean; - } - - /** Map Elements which can be styled. */ - export interface IMapElements { - - /** Admin1, state, province, etc. */ - adminDistrict?: IBorderedMapElementStyle; - - /** Icon representing the capital of a state/province. */ - adminDistrictCapital?: IMapElementStyle; - - /** Area of land encompassing an airport. */ - airport?: IMapElementStyle; - - /** Area of land use, not to be confused with Structure */ - area?: IMapElementStyle; - - /** An arterial road is a high-capacity urban road. Its primary function is to deliver traffic from collector roads to freeways or expressways, and between urban centers efficiently. */ - arterialRoad?: IMapElementStyle; - - /** A structure such as a house, store, factory. */ - building?: IMapElementStyle; - - /** Restaurant, hospital, school, etc. */ - business?: IMapElementStyle; - - /** Icon representing the capital populated place. */ - capital?: IMapElementStyle; - - /** Area of a cemetery */ - cemetery?: IMapElementStyle; - - /** Area of a whole continent */ - continent?: IMapElementStyle; - - /** A controlled-access highway is a type of road which has been designed for high-speed vehicular traffic, with all traffic flow and ingress/egress regulated. Also known as a highway, freeway, motorway, expressway, interstate, parkway. */ - controlledAccessHighway?: IMapElementStyle; - - /** A country or independent sovereign state. */ - countryRegion?: IBorderedMapElementStyle; - - /** Icon representing the capital of a country/region. */ - countryRegionCapital?: IMapElementStyle; - - /** Admin2, county, etc. */ - district?: IBorderedMapElementStyle; - - /** An area of land used for educational purposes such as a school campus. */ - education?: IMapElementStyle; - - /** A school or other educational building. */ - educationBuilding?: IMapElementStyle; - - /** Restaurant, caf�, etc. */ - foodPoint?: IMapElementStyle; - - /** Area of forest land. */ - forest?: IMapElementStyle; - - /** An area of land where the game of golf is played. */ - golfCourse?: IMapElementStyle; - - /** Lines representing ramps typically alongside ControlledAccessHighways */ - highSpeedRamp?: IMapElementStyle; - - /** A highway. */ - highway?: IMapElementStyle; - - /** An area of land reserved for Indigenous people. */ - indigenousPeoplesReserve?: IMapElementStyle; - - /** Labeling of area of an island. */ - island?: IMapElementStyle; - - /** Major roads. */ - majorRoad?: IMapElementStyle; - - /** The base map element in which all other map elements inherit from. */ - mapElement?: IMapElementStyle; - - /** Area of land used for medical purposes. Generally, hospital campuses. */ - medical?: IMapElementStyle; - - /** A building which provides medical services. */ - medicalBuilding?: IMapElementStyle; - - /** A military area. */ - military?: IMapElementStyle; - - /** A natural point of interest. */ - naturalPoint?: IMapElementStyle; - - /** Area of land used for nautical purposes. */ - nautical?: IMapElementStyle; - - /** Area defined as a neighborhood. Labels only. */ - neighborhood?: IMapElementStyle; - - /** Area of any kind of park. */ - park?: IMapElementStyle; - - /** Icon representing the peak of a mountain. */ - peak?: IMapElementStyle; - - /** All point features that are rendered with an icon of some sort */ - point?: IMapElementStyle; - - /** Restaurant, hospital, school, marina, ski area, etc. */ - pointOfInterest?: IMapElementStyle; - - /** A political border. */ - political?: IBorderedMapElementStyle; - - /** Icon representing size of populated place (city, town, etc). */ - populatedPlace?: IMapElementStyle; - - /** Railway lines */ - railway?: IMapElementStyle; - - /** Line representing the connecting entrance/exit to a highway. */ - ramp?: IMapElementStyle; - - /** Area of nature reserve. */ - reserve?: IMapElementStyle; - - /** River, stream, or other passage. Note that this may be a line or polygon and may connect to non-river water bodies. */ - river?: IMapElementStyle; - - /** Lines that represent all roads */ - road?: IMapElementStyle; - - /** Icon representing the exit, typically from a controlled access highway. */ - roadExit?: IMapElementStyle; - - /** Sign representing a compact name for a road. For example, I-5. */ - //roadShield?: IMapElementStyle; - - /** Land area covered by a runway. See also Airport for the land area of the whole airport. */ - runway?: IMapElementStyle; - - /** Area generally used for beaches, but could be used for sandy areas/golf bunkers in the future. */ - sand?: IMapElementStyle; - - /** A shopping center or mall. */ - shoppingCenter?: IMapElementStyle; - - /** Area of a stadium. */ - stadium?: IMapElementStyle; - - /** A street. */ - street?: IMapElementStyle; - - /** Buildings and other building-like structures */ - structure?: IMapElementStyle; - - /** A toll road. */ - tollRoad?: IMapElementStyle; - - /** Walking trail, either through park or hiking trail */ - trail?: IMapElementStyle; - - /** Icon representing a bus stop, train stop, airport, etc. */ - transit?: IMapElementStyle; - - /** A transit building. */ - transitBuilding?: IMapElementStyle; - - /** Lines that are part of the transportation network (roads, trains, ferries, etc) */ - transportation?: IMapElementStyle; - - /** An unpaved street. */ - unpavedStreet?: IMapElementStyle; - - /** Forests, grassy areas, etc. */ - vegetation?: IMapElementStyle; - - /** Icon representing the peak of a volcano. */ - volcanicPeak?: IMapElementStyle; - - /** Anything that looks like water */ - water?: IMapElementStyle; - - /** Icon representing a water feature location such as a waterfall. */ - waterPoint?: IMapElementStyle; - - /** Ferry route lines */ - waterRoute?: IMapElementStyle; - } - - /** Defines a custom map style. */ - export interface ICustomMapStyle { - /** A list of map elements to be styled. */ - elements?: IMapElements; - - /** Global Settings. */ - settings?: ISettingsStyle; - - /** The version of the style syntax used. */ - version: string; - } - - ////////////////////////////////////////////// - /// Enumerations - ////////////////////////////////////////////// - - /** This enumeration defines how the map labels are displayed. */ - export enum LabelOverlay { - /** - * Map labels are hidden. Note that this will have no effect on road maps unless the allowHidingLabelsOfRoad map option - * is set to true. - */ - hidden, - - /** Map labels are visible. */ - visible - } - - /** This enumeration is used to specify the type of map style that should be displayed by the map. */ - export enum MapTypeId { - /** The aerial map type which uses top-down satellite & airplane imagery. */ - aerial, - - /** High resolution aerial imagery taken at 45 degrees to the ground, from 4 different directions. */ - birdseye, - - /** A darker version of the road maps. */ - canvasDark, - - /** A lighter version of the road maps which also has some of the details such as hill shading disabled. */ - canvasLight, - - /** A grayscale version of the road maps. */ - grayscale, - - /** Displays a blank canvas that uses the mercator map project. It basically removed the base maps layer. */ - mercator, - - /** Ordnance survey map type (en-gb only). */ - ordnanceSurvey, - - /** Road map type. */ - road, - - /** Provides streetside panoramas from the street level. */ - streetside - } - - /** The NavigationBarMode can be used to customize the layout and style of the navigation bar. */ - export enum NavigationBarMode { - /** - * A compact navigation bar that includes a smaller drop down for the map type and zoom buttons. Recommended for small - * maps or screen such as a mobile device. - */ - compact, - - /** - * The default navigation bar that has a drop down for the map type, a locate me button, and zoom buttons. Recommended for - * medium to large maps in desktop browsers. - */ - default, - - /** - * A minified navigation bar that has a button to toggle between road and aerial maps, zoom buttons, and a button to turn - * traffic information on and off. Recommended for small maps or screen such as a mobile device. - */ - minified - } - - /** The NavigationBarOrientation enumeration is used to define how the navigation bar controls are laid out. */ - export enum NavigationBarOrientation { - /** Repositions the buttons in the navigation bar such that they are aligned horizontally. */ - horizontal, - - /** Repositions the buttons in the navigation bar such that they are aligned vertically. */ - vertical - } - - /** This enumeration is used to specify how the overview map for the streetside map mode should be displayed. */ - export enum OverviewMapMode { - /** Shows the overview map in an expanded state. */ - expanded, - - /** Hides the overview map. */ - hidden, - - /** Shows the overview map in a minimized state. */ - minimized - } - - /** Contains enum to show how pixels are defined. */ - export enum PixelReference { - /** The pixel is defined relative to the map control�s root element, where the top left corner of the map control is (0, 0). */ - control, - - /** The pixel is defined relative to the page, where the top left corner of the HTML page is (0, 0). */ - page, - - /** The pixel is defined in viewport coordinates, relative to the center of the map, where the center of the map is (0, 0). */ - viewport - } - - ////////////////////////////////////////////// - /// Interfaces - ////////////////////////////////////////////// - - /** Represents a structured address object. */ - export interface IAddress { - /** - * The street line of an address. The addressLine property is the most precise, official line for an address relative to the postal agency - * servicing the area specified by the locality or postalCode properties. - */ - addressLine: string; - - /** - * The subdivision name within the country or region for an address. This element is also commonly treated as the first order administrative - * subdivision. An example is a US state, such as �Oregon�. - */ - adminDistrict: string; - - /** The country or region name of the address. */ - countryRegion: string; - - /** A string specifying the two-letter ISO country code. */ - countryRegionISO2: string; - - /** The second, third, or fourth order subdivision within a country, dependency, or region. An example is a US county, such as �King�. */ - district: string; - - /** A nicely formatted address string for the result. */ - formattedAddress: string; - - /** The locality, such as the primary city, that corresponds to an address. An example is �Seattle�. */ - locality: string; - - /** The post code, postal code, or ZIP code of an address. An example is a US ZIP code, such as �98152�. */ - postalCode: string; - } - - /** The event args for when a layer frame is being loaded in an AnimtedTileLayer. **/ - export interface IAnimatedFrameEventArgs { - /** The animated tile layer that the frame belongs to. **/ - animatedTileLayer: AnimatedTileLayer; - - /** The index of the frame being loaded. **/ - index: number; - } - - /** An object that defines the options for an AnimatedTileLayer. **/ - export interface IAnimatedTileLayerOptions { - /** A boolean that specifies whether the animation should auto-start when it is added to the map or not. Default: true **/ - autoPlay?: boolean; - - /** The number of miliseconds between two layer frames. Default: 1000 **/ - frameRate?: number; - - /** A custom loading screen to show on the map when the map tiles are being fetched. **/ - loadingScreen?: CustomOverlay; - - /** The max amount of total loading time of all tiles in a viewport in milliseconds. Default: 15000 **/ - maxTotalLoadTime?: number; - - /** The array of tile layer sources to animate through. **/ - mercator: TileSource[]; - - /** A boolean specifying if the animated tile layer is visible or not. **/ - visible?: boolean; - } - - /** Represents the options that can be used when initializing a custom overlay. **/ - export interface ICustomOverlayOptions { - /** - * Specifies if the custom overlay should eb rendered above or below the label layer of the map. When above, - * elements in the overlay can be clickable. Default: True - */ - beneathLabels?: boolean; - } - - /** Base data layer interface. */ - export interface IDataLayer extends ILayer { - /** Clears all data in the layer. */ - clear(): void; - } - - /** Event args included in entity collection events. */ - export interface IEntityCollectionChangedEventArgs { - /** The entity collection the event was triggered from. */ - collection: EntityCollection; - - /** The IPrimitive object that the event occurred for. */ - data: IPrimitive; - } - - /** An object the identifies an event that has been attached to an object. */ - export interface IHandlerId { - } - - /** Base layer interface. */ - export interface ILayer { - } - - /** - * @deprecated use IMouseEventArgs - * A LayerMouseEventArgs object is returned by many the mouse event handlers attached to a Layer. - */ - export interface ILayerMouseEventArgs { - /** - * @deprecated use target - * The IPrimitive shape (pushpin, polyline, polygon) that the event occurred on. - */ - primitive: IPrimitive; - } - - /** The options that can be used to customize an infobox. */ - export interface IInfoboxOptions { - /** - * @deprecated Use HTML buttons and links in description instead. - */ - actions?: IInfoboxActions[]; - - /** The string displayed inside the infobox. */ - description?: string; - - /** - * The HTML that represents the infobox. Note that infobox options are ignored if custom HTML is set. Also, if custom HTML is used to represent the - * infobox, the infobox is anchored at the top-left corner. - */ - htmlContent?: string; - - /** The location on the map where the infobox�s anchor is attached. */ - location?: Location; - - /** The maximium size that the infobox height can expand to based on it�s content. Default: 126 **/ - maxHeight?: number; - - /** The maximium size that the infobox width can expand to based on it�s content. Default: 256 **/ - maxWidth?: number; - - /** - * The amount the infobox pointer is shifted from the location of the infobox, or if showPointer is false, then it is the amount the info box bottom - * left edge is shifted from the location of the infobox. If custom HTML is set, it is the amount the top-left corner of the infobox is shifted from - * its location. The default offset value is (0,0), which means there is no offset. - */ - offset?: Point; - - /** - * A boolean indicating whether to show the close dialog button on the infobox. The default value is true. By default, the close button is displayed - * as an X in the top right corner of the infobox. This property is ignored if custom HTML is used to represent the infobox. - */ - showCloseButton?: boolean; - - /** - * A boolean indicating whether to display the infobox with a pointer. The default value is true. In this case the infobox is anchored at the bottom - * point of the pointer. If this property is set to false, the infobox is anchored at the bottom left corner. This property is ignored if custom HTML - * is used to represent the infobox. - */ - showPointer?: boolean; - - /** The title of the infobox. */ - title?: string; - - /** - * A boolean indicating whether to show or hide the infobox. The default value is true. A value of false indicates that the infobox is hidden, - * although it is still an entity on the map. - */ - visible?: boolean; - - /** The z-index of the infobox with respect to other items on the map. */ - zIndex?: number; - } - - /** - * @deprecated Use HTML buttons and links in description instead. - */ - export interface IInfoboxActions { - /** The text to display for the action. */ - label: string; - - /** The function to call when the label is clicked. */ - eventHandler: (eventArg?: MouseEvent) => void; - } - - /** An object that contains information about an infobox event. **/ - export interface IInfoboxEventArgs { - /** The event that occurred. **/ - eventName: string; - - /** The x-value of the pixel coordinate on the page of the mouse cursor. **/ - pageX: number; - - /** The y-value of the pixel coordinate on the page of the mouse cursor. **/ - pageY: number; - - /** The infobox object that fired the event. **/ - target: Infobox; - - /** The type of the object that fired the event.This will always be 'infobox'. **/ - targetType: string; - - /** Original mouse event from the browser. */ - originalEvent?: MouseEvent; - } - - /** Map or View options */ - export interface IMapLoadOptions extends IMapOptions, IViewOptions { - /** The Bing Maps Key used to authenticate the application. This property can only be set when using the Map constructor. */ - credentials: string; - } - - /** - * An object that can be used to customize the map. Some of the map options can be changed after the map has loaded by using - * the setOptions function on the map. - */ - export interface IMapOptions { - - /** - * A boolean that, when set to true, allows the road labels to be hidden. Default: false - * This property can only be set when using the Map constructor. This property can only be set when using the Map constructor. - */ - allowHidingLabelsOfRoad?: boolean; - - /** A boolean indicating if the infobox is allowed to overflow outside the bounds of the map. Default: false. */ - allowInfoboxOverflow?: boolean; - - /** The color to use for the map control background. The default color is #EAE8E1. This property can only be set when using the Map constructor. */ - backgroundColor?: string | Color; - - /** Custom map styles used to modify the look and feel of the base map. */ - customMapStyle?: ICustomMapStyle; - - /** A boolean value indicating whether to disable the user�s ability to control the using the keyboard. Default: false */ - disableKeyboardInput?: boolean; - - /** A boolean value indicating if mousing over the map type selector should open it or not. Default: true */ - disableMapTypeSelectorMouseOver?: boolean; - - /** A boolean value indicating whether to disable the user's ability to pan the map. Default: false */ - disablePanning?: boolean; - - /** - * Scrolling the mouse wheel over the map will zoom it in or out, but will not scroll the page. - * Setting this property to true disables the zooming of the map and instead reverts back to scrolling the page instea. - * Default: false - */ - disableScrollWheelZoom?: boolean; - - /** - * A boolean indicating whether to disable streetside mode.If this property is set to true, streetside will be removed from - * the navigation bar, and the automatic coverage overlay will be disabled when zoomed in at lower zoom levels. Default false - * This property can only be set when using the Map constructor. - */ - disableStreetside?: boolean; - - /** - * A boolean indicating whether to disable the automatic streetside coverage layer that appears when zoomed in at lower zoom - * levels. Default false - * This property can only be set when using the Map constructor. - **/ - disableStreetsideAutoCoverage?: boolean; - - /** A boolean value indicating whether to disable the user's ability to zoom in or out. Default: false */ - disableZooming?: boolean; - - /** - * A boolean value indicating whether the Bing(TM) logo on the map is clickable. Default: true. - * This property can only be set when using the Map constructor. - */ - enableClickableLogo?: boolean; - - /** - * A boolean value indicating whether to use the inertia animation effect during map navigation. Default: true - * This property can only be set when using the Map constructor. - */ - enableInertia?: boolean; - - /** - * A boolean that indicates if the map should be rendered using lite mode. When set to true vector map labels are - * disabled and map labels are rendered directly into the map tiles. This offers improved performance, but will result - * in the labels being rendered behind data on the map and the labels will also not use collision dection with pushpins. - * If this property is not set, the map set this value based on the target device and browser as vector labels perform - * better in some scenrarios than others. - * This property can only be set when using the Map constructor. - */ - liteMode?: boolean; - - /** A bounding area that restricts the map view. */ - maxBounds?: LocationRect; - - /** The maximum zoom level that the map can be zoomed into. */ - maxZoom?: number; - - /** The minimum zoom level that the map cab be zoomed out to. */ - minZoom?: number; - - /** Specifies how the navigation bar should be rendered on the map. */ - navigationBarMode?: NavigationBarMode; - - /** A boolean whether what orientation should be used when laying out the navigation controls. */ - navigationBarOrientation?: NavigationBarOrientation; - - /** - * A boolean value indicating whether to display the �breadcrumb control�. The breadcrumb control shows the current center location�s geography hierarchy. - * The default value is false. Requires the showLocateMeButton map option to be set to true. The breadcrumb control displays best when the width of the map - * is at least 400 pixels. - */ - showBreadcrumb?: boolean; - - /** - * A boolean value indicating whether to show the map navigation control. Default: true�This property can only be set when using the Map constructor. - */ - showDashboard?: boolean; - - /** - * A boolean value indicating whether to show a button that centers the map over the user's location in the map navigation control. Default: true - * This property can only be set when using the Map constructor. - */ - showLocateMeButton?: boolean; - - /** - * A boolean value indicating whether or not to show the map Bing logo. The default value is true. - * This property can only be set when using the Map constructor. - */ - showLogo?: boolean; - - /** - * A boolean value indicating whether to show the map type selector in the map navigation control. Default: true - * This property can only be set when using the Map constructor. - */ - showMapTypeSelector?: boolean; - - /** - * A boolean value indicating whether to show the scale bar. Default: true - * This property can only be set when using the Map constructor. - */ - showScalebar?: boolean; - - /** When using the minified navigation bar, a traffic button is displayed. Setting this option to false will hide this button. */ - showTrafficButton?: boolean; - - /** - * A boolean value indicating whether to show a link to the End User Terms of Use, which appears to the right of the copyrights, or not. Default: true - * This property can only be set when using the Map constructor. - */ - showTermsLink?: boolean; - - /** - * A boolean value indicating whether to show the zoom buttons in the map navigation control. Default: true - * This property can only be set when using the Map constructor. - */ - showZoomButtons?: boolean; - - /** A set of properties for the streetside mode of the map. */ - streetsideOptions?: IStreetsideOptions; - - /** Additional support map types that should be added to the navigaiton bar such as canvasDark, canvasLight, and grayscale.*/ - supportedMapTypes?: MapTypeId[]; - } - - /** A MapTypeChangeEventArgs object is returned by the map when using the mapTypeChanged event. */ - export interface IMapTypeChangeEventArgs { - /** The map type that map has changed to. */ - newMapTypeId: MapTypeId; - - /** The map type that the map has changed from. */ - oldMapTypeId: MapTypeId; - - /** The map instance the event occured on */ - target: Map; - - /** The type of object the event was attached to. Should always be "map" */ - targetType: string; - } - - /** Interface for module options. */ - export interface IModuleOptions { - /** A callback function that is fired after the module has loaded. */ - callback?: () => void; - - /** A function that is called if there is an error loading the module. */ - errorCallback?: () => void; - - /** A Bing Maps key that is used with the module when the module is loaded without a map. */ - credentials?: string; - } - - /** A MouseEventArgs object is returned by many the mouse event handlers. */ - export interface IMouseEventArgs extends ILayerMouseEventArgs { - /** The event that occurred. */ - eventName: string; - - /** A boolean indicating if the primary button, such as the left mouse button or a tap on a touch screen, was used during a mouse down or up event. */ - isPrimary: boolean; - - /** A boolean indicating if the secondary mouse button, such as the right mouse button, was used during a mouse down or up event. */ - isSecondary: boolean; - - /** If the target is a shape, this will be the layer that the shape is in. */ - layer: Layer; - - /** The map location of where the event occurred. */ - location: Location; - - /** The x-value of the pixel coordinate on the page of the mouse cursor. */ - pageX: number; - - /** The y-value of the pixel coordinate on the page of the mouse cursor. */ - pageY: number; - - /** The pixel coordinate of the mouse cusrsor relative to the top left corner of the map div. */ - point: Point; - - /** The object that triggered the event. */ - target: Map | IPrimitive; - - /** The type of the object that the event is attached to. Valid values include the following: �map�, 'layer', �polygon�, �polyline�, or �pushpin� */ - targetType: string; - - /** - * Returns the x-value of the pixel coordinate, relative to the map, of the mouse. - * @returns The x-value of the pixel coordinate, relative to the map, of the mouse. - */ - getX(): number; - - /** - * Returns the y-value of the pixel coordinate, relative to the map, of the mouse. - * @returns The y-value of the pixel coordinate, relative to the map, of the mouse. - */ - getY(): number; - } - - /** - * An object tthat contains information about a streetside scene. - */ - export interface IPanoramaInfo { - /** The capture date of the streetside scene. */ - cd?: string; - } - - /** - * All shapes; Pushpins, Polylines and Polygons, derive from the IPrimitive interface. This means that they can be - * passed into any function that takes in an IPrimitive object. Also, any function that returns an IPrimitive is capable - * of returning any of these shapes. - */ - export interface IPrimitive { - /** Optional property to store any additional metadata for this primitive. */ - metadata?: any; - - /** - * Gets the css cursor value when the primitive has events on it. - * @returns css cursor string when primitive has events on it. - */ - getCursor(): string; - - /** - * Gets whether the primitive is visible. - * @returns A boolean indicating whether the primitive is visible or not. - */ - getVisible(): boolean; - - /** - * Sets the options for customizing the IPrimitive. - * @param options The options for customizing the IPrimitive. - */ - setOptions(options: IPrimitiveOptions): void; - } - - /** A IPrimitiveChangedEventArgs object is returned by the changed event on IPrimitive shapes. */ - export interface IPrimitiveChangedEventArgs { - /** The IPrimitive shape the event occured on. */ - sender: IPrimitive; - - /** The name of the change that occured; 'locations' or 'options'. */ - name: string; - } - - /** Options used for customizing IPrimitive objects. */ - export interface IPrimitiveOptions { - /** The css cursor to show when the IPrimitive has mouse events on it. Default value is pointer (hand). */ - cursor?: string; - - /** Boolean indicating whether the IPrimitive is visible. */ - visible?: boolean; - } - - /** Options used for customizing Polylines. */ - export interface IPolylineOptions extends IPrimitiveOptions { - /** Indicates if drawn shape should be generalized based on the zoom level to improve rendering performance. Default true **/ - generalizable?: boolean; - - /** CSS string or Color object as the poly's color. */ - strokeColor?: string | Color; - - /** An array of numbers separated by spaces, or a string separated by spaces/commas specifying the repetitive stroke pattern. */ - strokeDashArray?: number[] | string; - - /** The thickness of the poly stroke. */ - strokeThickness?: number; - } - - /** Options used for customizing Polygons. */ - export interface IPolygonOptions extends IPolylineOptions { - /** CSS string or Color object as the polygon's filling color. */ - fillColor?: string | Color; - } - - /** Options used for customizing Pushpins. */ - export interface IPushpinOptions extends IPrimitiveOptions { - /** The point on the pushpin icon, in pixels, which is anchored to the pushpin location. An anchor of (0,0) is the top left corner of the icon. */ - anchor?: Point; - - /** Specifies what color to make the default pushpin. */ - color?: string | Color; - - /** A boolean indicating whether the pushpin can be dragged to a new position with the mouse or by touch. */ - draggable?: boolean; - - /** Specifies whether to enable the clicked style on the pushpin. */ - enableClickedStyle?: boolean; - - /** Specifies whether to enable the hover style on the pushpin. */ - enableHoverStyle?: boolean; - - /** - * Defines the the icon to use for the pushpin.This can be a URL to an Image or SVG file, an image data URI, or an inline SVG string. - * Tip: When using inline SVG, you can pass in placeholders `{color}` and `{text}` in your SVG string. This placeholder will be replaced by the pushpins color or text property value when rendered. - */ - icon?: string; - - /** Whether the clickable area of pushpin should be an ellipse instead of a rectangle. */ - roundClickableArea?: boolean; - - /** - * A secondary title label value to display under the pushpin. Uses label collision detection. This label automatically changes color between white - * and dark grey depending on which map style is selected. Requires the title label to be set. - */ - subTitle?: string; - - /** - * The title label value to display under the pushpin. This label automatically changes color between white and dark grey depending on which map - * style is selected. Pushpin Titles support label collision detection, as described below. - */ - title?: string; - - /** A short string of text that is overlaid on top of the pushpin. */ - text?: string; - - /** The amount the text is shifted from the pushpin icon. The default value is (0,5). */ - textOffset?: Point; - } - - /** An object that represents a min and max value range. */ - export interface IRange { - /** The minimum value. */ - min: number; - - /** The maximum value. */ - max: number; - } - - /** The options that can be used to customize how the streetside map mode is displayed to the user. */ - export interface IStreetsideOptions { - /** A boolean indicating if the ability to navigate between image bubbles should be disabled in streetside map mode. Default: false */ - disablePanoramaNavigation?: boolean; - - /** The location that the streetside panorama should be looking towards. This can be used instead of a heading. */ - locationToLookAt?: Location; - - /** A callback function that is triggered after the streetside view has not loaded successfully. */ - onErrorLoading?: () => void; - - /** A callback function that is triggered after the streetside view has loaded successfully. */ - onSuccessLoading?: () => void; - - /** - * Specifies how to render the overview map when in streetside mode. - * Default: Microsoft.Maps.OverviewMapMode.expanded - */ - overviewMapMode?: OverviewMapMode; - - /** - * Information for a streetside panorama scene to load. - */ - panoramaInfo?: IPanoramaInfo; - - /** The radius to search in for available streetside panoramas. */ - panoramaLookupRadius?: number; - - /** A boolean indicating if the current address being viewed should be hidden when in streetside map mode. Default: true */ - showCurrentAddress?: boolean; - - /** A boolean indicating if the exit button should be hidden when in streetside map mode. Default: true */ - showExitButton?: boolean; - - /** A boolean indicating if the heading compass button is hidden when in streetside map mode. Default: true */ - showHeadingCompass?: boolean; - - /** A boolean indicating if the link to report a problem with a streetside image is hidden when in streetside map mode. Default: true */ - showProblemReporting?: boolean; - - /** A boolean indicating if the zoom buttons should be displayed when in streetside map mode. Default: true */ - showZoomButtons?: boolean; - } - - /** Defines a set of styles for pushpins, polylines, and polygons. */ - export interface IStylesOptions { - /** Sets the options for all pushpins. */ - pushpinOptions?: IPushpinOptions; - - /** Sets the options for all polylines. */ - polylineOptions?: IPolylineOptions; - - /** Sets the options for all polygons. */ - polygonOptions?: IPolygonOptions; - } - - /** Interface to specify style css while registering a module */ - export interface IStyleUrl { - /** List of style css urls o be downloaded */ - styleURLs: string[]; - } - - /** Represents options that can be used to customize a tile layer. */ - export interface ITileLayerOptions { - - /** - * The number of milliseconds allowed for the tile layer image download. If the timeout occurs before the image is fully - * downloaded, the map control considers the download a failure. The default value is 10000. - */ - downloadTimeout?: number; - - /** The tile source for the tile layer. */ - mercator: TileSource; - - /** The opacity of the tile layer, defined by a number between 0 (not visible) and 1. */ - opacity?: number; - - /** - * A boolean indicating whether to show or hide the tile layer. The default value is true. A value of false indicates that - * the tile layer is hidden, although it is still an entity on the map. - */ - visible?: boolean; - - /** The z-index of the tile layer. */ - zIndex?: number; - } - - /** Represents options that can be used to define a tile source. */ - export interface ITileSourceOptions { - /** - * A bounding box that specifies where tiles are available. - * Note: This will not crop tiles to the specific bounding box, it limits the tiles it loads to those that intersect this bounding box. - */ - bounds?: LocationRect; - - /** The maximum zoom level tiles that tiles should be rendered at. */ - maxZoom?: number; - - /** The minimum zoom level tiles that tiles should be rendered at. */ - minZoom?: number; - - /** - * Required. This can be a string or a callback function that constructs the URLs used to retrieve tiles from the tile source. - * When using a string, the uriConstructor will allow you to specify placeholders that will be replaced with the tiles value (i.e. {quadkey}). - * See the Tile URL Parameters section for a list of supported parameters. - * Besides using formatted tile URLs, you can also specify a callback function as the uriConstructor. This is useful if you need to be able to - * build custom tile URL�s that may require some additional calculations for a tile. - */ - uriConstructor: string | ((tile: PyramidTileId) => string); - } - - /** Represents options that can be used to set the view of the map. */ - export interface IViewOptions { - /** The bounding rectangle of the map view. If both bounds and center are specified, bounds takes precedence over center. */ - bounds?: LocationRect; - - /** The location of the center of the map view. If both bounds and center are specified, bounds takes precedence over center. */ - center?: Location; - - /** - * The directional heading of the map. The heading is represented in geometric degrees with 0 or 360 = North, 90 = East, - * 180 = South, and 270 = West. - */ - heading?: number; - - /** Indicates how the map labels are displayed. */ - labelOverlay?: LabelOverlay; - - /** The map type of the view. */ - mapTypeId?: MapTypeId; - - /** The amount of padding in pixels to be added to each side of the bounds of the map view. */ - padding?: number; - - /** The angle relative to the horizon to tilt a streetside panorama image. */ - pitch?: number; - - /** The zoom level of the map view. */ - zoom?: number; - } - - ////////////////////////////////////////////// - /// Modular Framework - ////////////////////////////////////////////// - - /** - * Loads the specified registered module, making its functionality available. You can provide the name of a single module or an array of names in. - * Options or a callback function that is called when the module is loaded can be specified. - * @param moduleName Name of the module to load. Can be the name of a custom module or a built in module name. Built in modules: - * Microsoft.Maps.Autosuggest, Microsoft.Maps.Clustering, Microsoft.Maps.Directions, Microsoft.Maps.DrawingTools, Microsoft.Maps.GeoJSON, - * Microsoft.Maps.HeatMap, Microsoft.Maps.Search, Microsoft.Maps.SpatialDataService, Microsoft.Maps.SpatialMath, Microsoft.Maps.Traffic, - * Microsoft.Maps.WellKnownText - * @param options A callback function or options containing additional information and a callback to call once a module is loaded - */ - export function loadModule(moduleName: string | string[], options?: (() => void) | IModuleOptions): void; - - /** - * Registers a module with the map control. The name of the module is specified in moduleKey, the module script is defined in scriptURL, and the - * options provides the location of a *.css file to load with the module. - * @param moduleName Name of the module to load. - * @param url Url to where the module code is located. - * @param styles List of css files to download. - */ - export function registerModule(moduleName: string, url: string, styles?: IStyleUrl): void; - - /** - * Signals that the specified module has been loaded and if specified, calls the callback function in loadModule. Call this method at the end of your custom module script. - * @param moduleName Name of the module that is loaded. - */ - export function moduleLoaded(moduleName: string): void; - - ////////////////////////////////////////////// - /// Classes - ////////////////////////////////////////////// - - /** - * Provides a layer which can smoothly animate through an array of tile layer sources. - */ - export class AnimatedTileLayer { - /** - * @contstructor - * @param options Options that define how to animate between the specified tile layers. - */ - constructor(options?: IAnimatedTileLayerOptions); - - /** - * Gets the frame rate of this animated tile layer. - * @returns The frame rate of this animated tile layer. - **/ - public getFrameRate(): number; - - /** - * Gets the loading screen overlay when tiles are being fetched. - * @returns The loading screen overlay when tiles are being fetched. - **/ - public getLoadingScreen(): CustomOverlay; - - /** - * Gets the maximum total tile fetching time of this animated tile layer. - * @returns The maximum total tile fetching time of this animated tile layer - **/ - public getMaxTotalLoadTime(): number; - - /** - * Gets the tile sources associated with this layer. - * @returns The tile sources associated with this layer. - **/ - public getTileSources(): TileSource[]; - - /** - * Gets the visibility of this animated tile layer. - * @returns The visibility of this animated tile layer. - **/ - public getVisible(): boolean; - - /** Pause the tile layer animation. **/ - public pause(): void; - - /** Play the animation either from start or where it was paused. **/ - public play(): void; - - /** - * Sets the options for the animated tile layer. - * @params Options that define how to animate between the specified tile layers. - **/ - public setOptions(options: IAnimatedTileLayerOptions): void; - - /** Stop the layer animation, hide layer, and reset frame to the beginning. **/ - public stop(): void; - } - - /** Class that represents a color */ - export class Color { - /** The opacity of the color. The range of valid values are an interger between 0 and 255, or a decimal between 0 and 1. */ - public a: number; - - /** The red value of the color. The range of valid values is 0 to 255 */ - public r: number; - - /** The green value of the color. The range of valid values is 0 to 255 */ - public g: number; - - /** The blue value of the color. The range of valid values is 0 to 255 */ - public b: number; - - /** - * @constructor - * @param a The alpha value in argb format - * @param r The r value in argb format - * @param g The g value in argb format - * @param b The b value in argb format - */ - constructor(a: number, r: number, g: number, b: number); - - /** - * Clones the color. - * @param color The color class that needs to be clones. - * @returns The colne of the color. - */ - public static clone(color: Color): Color; - - /** - * Creates the color from a hex string. - * @param hex The color represented as '#rrggbb' format. - * @returns The color object. - */ - public static fromHex(hex: string): Color; - - /** - * Clones the color. - * @returns The clone of the color. - */ - public clone(): Color; - - /** - * Gets the opacity of this color. - * @returns The opacity between 0 and 1 of this color. - */ - public getOpacity(): number; - - /** - * Converts the color to hex notation. - * @returns The hex notation as '#rrggbb' (ignores a). - */ - public toHex(): string; - - /** - * Converts the color to rgba notation. - * @returns The rgba notation as rgba(rr, gg, bb, aa) - */ - public toRgba(): string; - } - - /** - * You can use this class to create custom overlays on top of the map. These can be static overlays such as custom - * navigation bars, or dynamic overlays such as custom visualization layers. CustomOverlays can be added to the map - * just like any other layer using the map.layers property. - */ - export class CustomOverlay implements ILayer { - /** A reference the the map instance that the overlay was added to. This will be null until the onLoad function has fired. **/ - _map: Map; - - /** - * @constructor - * @param options The options to use when initializing the custom overlay. - */ - constructor(options?: ICustomOverlayOptions); - - /** - * Gets the html element of this custom overlay. - * @returns The htmlElement of this overlay. - */ - public getHtmlElement(): HTMLElement; - - /** - * Gets the map that this overlay is attached to. - * @returns The map that this overlay is attached to. - */ - public getMap(): Map; - - /** - * Updates the html element of this custom overlay. - * @param htmlElement The new htmlElement to set for the overlay. - */ - public setHtmlElement(htmlElement: HTMLElement): void; - - /** - * Implement this method to perform any task that should be done when the overlay is added to the map. - */ - public onAdd(): void; - - /** - * Implement this methof to perform any task that should be done after the overlay has been added to the map. - */ - public onRemove(): void; - - /** - * Implement this method to perform any tasks that should be done when the overlay is removed from the map. - */ - public onLoad(): void; - } - - /** - * Use the Layer class. - * @deprecated in V8 - */ - export class EntityCollection extends Layer { - /** - * @constructor Deprecated. Use the Layer class. - * @deprecated in V8 - */ - constructor(); - - /** - * Removes all shapes from the collection. - */ - public clear(): void; - - /** - * Gets the item at a specified index. - * @param index Index of the item to get. - * @returns The item at a specified index. - */ - public get(index: number): IPrimitive; - - /** - * Gets the number of items in this collection. - * @returns The count of the items. - */ - public getLength(): number; - - /** - * Gets the index of the item in the list. - * @param primitive The item to get the index of. - * @returns The index of the item in the list. - */ - public indexOf(primitive: IPrimitive): number; - - /** - * Inserts the item into the list at a specific index. - * @param primitive The item to insert. - * @param index Index of the item to be inserted. - */ - public insert(primitive: IPrimitive, index: number): void; - - /** - * Returns the last element in the list after removing it. - * @returns The last element in the list after removing it. - */ - public pop(): IPrimitive; - - /** - * Adds the item to the end of the list. - * @param primitive Item to be added. - */ - public push(primitive: IPrimitive | IPrimitive[]): void; - - /** - * Removes the item from the list. - * @param primitive Item to be removed. - * @returns The item to be removed. - */ - public remove(primitive: IPrimitive): IPrimitive; - - /** - * Removes the item from the list at a specified index. - * @param index Index of the item that needs to be removed. - * @returns The item to be removed at a specified index. - */ - public removeAt(index: number): IPrimitive; - } - - /** A static class that manages events within the map SDK. */ - export module Events { - ///////////////////////////////////// - /// addHandler Definitions - //////////////////////////////////// - - /** - * Attaches the handler for the event that is thrown by the target. Use the return object to remove the handler using the removeHandler method. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported events: - * click, dblclick, maptypechanged, mousedown, mousemove, mouseout, mouseover, mouseup, mousewheel, rightclick, viewchange, viewchangeend, viewchangestart - * @param handler The callback function to handle the event when triggered. - * @returns The handler id. - */ - export function addHandler(target: Map, eventName: string, handler: (eventArg?: IMouseEventArgs | IMapTypeChangeEventArgs) => void): IHandlerId; - - /** - * Attaches the handler for the event that is thrown by the target. Use the return object to remove the handler using the removeHandler method. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * changed, click, dblclick, drag, dragend, dragstart, mousedown, mouseout, mouseover, mouseup - * @param handler The callback function to handle the event when triggered. - * @returns The handler id. - */ - export function addHandler(target: Pushpin, eventName: string, handler: (eventArg?: IMouseEventArgs | IPrimitiveChangedEventArgs) => void): IHandlerId; - - /** - * Attaches the handler for the event that is thrown by the target. Use the return object to remove the handler using the removeHandler method. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * changed, click, dblclick, mousedown, mouseout, mouseover, mouseup - * @param handler The callback function to handle the event when triggered. - * @returns The handler id. - */ - export function addHandler(target: Polyline | Polygon, eventName: string, handler: (eventArg?: IMouseEventArgs | IPrimitiveChangedEventArgs) => void): IHandlerId; - - /** - * Attaches the handler for the event that is thrown by the target. Use the return object to remove the handler using the removeHandler method. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * click, infoboxChanged, mouseenter, mouseleave - * @param handler The callback function to handle the event when triggered. - * @returns The handler id. - */ - export function addHandler(target: Infobox, eventName: string, handler: (eventArg?: IInfoboxEventArgs) => void): IHandlerId; - - /** - * Attaches the handler for the event that is thrown by the target. Use the return object to remove the handler using the removeHandler method. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * click, dblclick, mousedown, mouseout, mouseover, mouseup, rightclick - * @param handler The callback function to handle the event when triggered. - * @returns The handler id. - */ - export function addHandler(target: Layer, eventName: string, handler: (eventArg?: IMouseEventArgs) => void): IHandlerId; - - /** - * Attaches the handler for the event that is thrown by the target. Use the return object to remove the handler using the removeHandler method. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * � entityadded - * � entityremoved - * @param handler The callback function to handle the event when triggered. - * @returns The handler id. - */ - export function addHandler(target: EntityCollection, eventName: string, handler: (eventArg?: IEntityCollectionChangedEventArgs) => void): IHandlerId; - - /** - * Attaches the handler for the event that is thrown by the target. Use the return object to remove the handler using the removeHandler method. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. - * @param handler The callback function to handle the event when triggered. - * @returns The handler id. - */ - export function addHandler(target: any, eventName: string, handler: (eventArg?: any) => void): IHandlerId; - - ///////////////////////////////////// - /// addOne Definitions - //////////////////////////////////// - - /** - * Attaches the handler for the event that is thrown by the target, but only triggers the handler the first once after being attached. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported events: - * click, dblclick, maptypechanged, mousedown, mousemove, mouseout, mouseover, mouseup, mousewheel, rightclick, viewchange, viewchangeend, viewchangestart - * @param handler The callback function to handle the event when triggered. - */ - export function addOne(target: Map, eventName: string, handler: (eventArg?: IMouseEventArgs | IMapTypeChangeEventArgs) => void): void; - - /** - * Attaches the handler for the event that is thrown by the target, but only triggers the handler the first once after being attached. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * changed, click, dblclick, drag, dragend, dragstart, mousedown, mouseout, mouseover, mouseup - * @param handler The callback function to handle the event when triggered. - */ - export function addOne(target: Pushpin, eventName: string, handler: (eventArg?: IMouseEventArgs | IPrimitiveChangedEventArgs) => void): void; - - /** - * Attaches the handler for the event that is thrown by the target, but only triggers the handler the first once after being attached. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * changed, click, dblclick, mousedown, mouseout, mouseover, mouseup - * @param handler The callback function to handle the event when triggered. - */ - export function addOne(target: Polyline | Polygon, eventName: string, handler: (eventArg?: IMouseEventArgs | IPrimitiveChangedEventArgs) => void): void; - - /** - * Attaches the handler for the event that is thrown by the target, but only triggers the handler the first once after being attached. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * click, infoboxChanged, mouseenter, mouseleave - * @param handler The callback function to handle the event when triggered. - */ - export function addOne(target: Infobox, eventName: string, handler: (eventArg?: IInfoboxEventArgs) => void): void; - - /** - * Attaches the handler for the event that is thrown by the target, but only triggers the handler the first once after being attached. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * click, dblclick, mousedown, mouseout, mouseover, mouseup, rightclick - * @param handler The callback function to handle the event when triggered. - */ - export function addOne(target: Layer, eventName: string, handler: (eventArg?: IMouseEventArgs) => void): void; - - /** - * Attaches the handler for the event that is thrown by the target, but only triggers the handler the first once after being attached. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * � entityadded - * � entityremoved - * @param handler The callback function to handle the event when triggered. - */ - export function addOne(target: EntityCollection, eventName: string, handler: (eventArg?: IEntityCollectionChangedEventArgs) => void): void; - - /** - * Attaches the handler for the event that is thrown by the target, but only triggers the handler the first once after being attached. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. - * @param handler The callback function to handle the event when triggered. - */ - export function addOne(target: any, eventName: string, handler: (eventArg?: any) => void): void; - - ///////////////////////////////////// - /// addThrottledHandler Definitions - //////////////////////////////////// - - /** - * Attaches the handler for the event that is thrown by the target, where the minimum interval between events (in milliseconds) is specified as a parameter. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported events: - * click, dblclick, maptypechanged, mousedown, mousemove, mouseout, mouseover, mouseup, mousewheel, rightclick, viewchange, viewchangeend, viewchangestart - * @param handler The callback function to handle the event when triggered. - * @param throttleInterval throttle interval (in ms) - * @returns The handler id. - */ - export function addThrottledHandler(target: Map, eventName: string, handler: (eventArg?: IMouseEventArgs | IMapTypeChangeEventArgs) => void, throttleInterval: number): IHandlerId; - - /** - * Attaches the handler for the event that is thrown by the target, where the minimum interval between events (in milliseconds) is specified as a parameter. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * changed, click, dblclick, drag, dragend, dragstart, mousedown, mouseout, mouseover, mouseup - * @param handler The callback function to handle the event when triggered. - * @param throttleInterval throttle interval (in ms) - * @returns The handler id. - */ - export function addThrottledHandler(target: Pushpin, eventName: string, handler: (eventArg?: IMouseEventArgs | IPrimitiveChangedEventArgs) => void, throttleInterval: number): IHandlerId; - - /** - * Attaches the handler for the event that is thrown by the target, where the minimum interval between events (in milliseconds) is specified as a parameter. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * changed, click, dblclick, mousedown, mouseout, mouseover, mouseup - * @param handler The callback function to handle the event when triggered. - * @param throttleInterval throttle interval (in ms) - * @returns The handler id. - */ - export function addThrottledHandler(target: Polyline | Polygon, eventName: string, handler: (eventArg?: IMouseEventArgs | IPrimitiveChangedEventArgs) => void, throttleInterval: number): IHandlerId; - - /** - * Attaches the handler for the event that is thrown by the target, where the minimum interval between events (in milliseconds) is specified as a parameter. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * click, infoboxChanged, mouseenter, mouseleave - * @param handler The callback function to handle the event when triggered. - * @returns The handler id. - */ - export function addThrottledHandler(target: Infobox, eventName: string, handler: (eventArg?: IInfoboxEventArgs) => void): IHandlerId; - - /** - * Attaches the handler for the event that is thrown by the target, where the minimum interval between events (in milliseconds) is specified as a parameter. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * click, dblclick, mousedown, mouseout, mouseover, mouseup, rightclick - * @param handler The callback function to handle the event when triggered. - * @param throttleInterval throttle interval (in ms) - * @returns The handler id. - */ - export function addThrottledHandler(target: Layer, eventName: string, handler: (eventArg?: IMouseEventArgs) => void, throttleInterval: number): IHandlerId; - - /** - * Attaches the handler for the event that is thrown by the target, where the minimum interval between events (in milliseconds) is specified as a parameter. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. Supported Events: - * � entityadded - * � entityremoved - * @param handler The callback function to handle the event when triggered. - * @param throttleInterval throttle interval (in ms) - * @returns The handler id. - */ - export function addThrottledHandler(target: EntityCollection, eventName: string, handler: (eventArg?: IEntityCollectionChangedEventArgs) => void, throttleInterval: number): IHandlerId; - - /** - * Attaches the handler for the event that is thrown by the target, where the minimum interval between events (in milliseconds) is specified as a parameter. - * @param target The object to attach the event to; Map, IPrimitive, Infobox, Layer, DrawingTools, DrawingManager, DirectionsManager, etc. - * @param eventName The type of event to attach. - * @param handler The callback function to handle the event when triggered. - * @param throttleInterval throttle interval (in ms) - * @returns The handler id. - */ - export function addThrottledHandler(target: any, eventName: string, handler: (eventArg?: any) => void, throttleInterval: number): IHandlerId; - - ///////////////////////////////////// - /// All other definitions - //////////////////////////////////// - - /** - * Checks if the target has any attached event handler. - * @param target The object to check if an event is attached to it. - * @param eventName The name of the event to check to see is attached. - * @returns A boolean indicating if the specified event type is attached to the object. - */ - export function hasHandler(target: any, eventName: string): boolean; - - /** - * Invokes an event on the target. This causes all handlers for the specified event name to be called. - * @param target The object to invoke the event on. - * @param eventName The name of the event to invoke. - * @param args Arguments for the event handler. - */ - export function invoke(target: any, evenName: string, args: any): void; - - /** - * Detaches the specified handler from the event. The handlerId is returned by the addHandler and addThrottledHandler methods. - * @param handlerId The handler id of the event to remove. - */ - export function removeHandler(handlerId: IHandlerId): void; - } - - /** - * Standard compass headings; north, south, east, west. - */ - export class Heading { - /** A heading pointing north, 0 degrees. */ - static North: number; - - /** A heading pointing south, 180 degrees. */ - static South: number; - - /** A heading pointing east, 90 degrees. */ - static East: number; - - /** A heading pointing west, 270 degrees. */ - static West: number; - } - - /** - * An infobox, also sometimes refer to as an info window or popup, is a simple panel that displays information over top the map. This is - * often used to display information linked to a location after clicking on a pushpin. - */ - export class Infobox { - - /** - * @constructor - * @param location The location to display the infobox at. - * @param options Options for rendering the infobox. - */ - constructor(location: Location, options?: IInfoboxOptions); - - /** - * @deprecated Use HTML buttons and links in description instead. - */ - public getActions(): IInfoboxActions[]; - - /** - * Gets the point on the infobox which is anchored to the map. An anchor of (0,0) is the top left corner of the infobox. - * @returns The anchor point of the infobox. - */ - public getAnchor(): Point; - - /** - * Gets the string that is printed inside the infobox. - * @returns The description value of the infobox options. - */ - public getDescription(): string; - - /** - * Gets the height of the infobox. - * @returns The height of the infobox. - */ - public getHeight(): number; - - /** - * Gets the infobox as HTML. - * @returns The HTML string used to create a custom infobox. - */ - public getHtmlContent(): string; - - /** - * Gets the location on the map where the infobox�s anchor is attached. - * @returns The location of the infobox. - */ - public getLocation(): Location; - - /** - * Gets the maximium height setting for the infobox. - * @returns the maximium height setting for the infobox. - */ - public getMaxHeight(): number; - - /** - * Gets the maximium width setting for the infobox. - * @returns the maximium width setting for the infobox. - */ - public getMaxWidth(): number; - - /** - * Gets the amount the infobox pointer is shifted from the location of the infobox, or if showPointer is false, then it is the amount the infobox - * bottom left edge is shifted from the location of the infobox. The default value is (0,0), which means there is no offset. - * @returns The offset of the infobox. - */ - public getOffset(): Point; - - /** - * Gets the infobox options. - * @returns The infobox options currently used by the infobox. - */ - public getOptions(): IInfoboxOptions; - - /** - * Gets a boolean indicating whether the infobox close button is shown. - * @returns A boolean indicating if the close button is shown or not. - */ - public getShowCloseButton(): boolean; - - /** - * Gets a boolean indicating whether the infobox is drawn with a pointer. - * @returns A boolean indicating if the pointer of the infobox is shown or not. - */ - public getShowPointer(): boolean; - - /** - * Gets a string that is the title of the infobox. - * @returns The title property of the infobox. - */ - public getTitle(): string; - - /** - * Gets whether the infobox is visible. A value of false indicates that the infobox is hidden, although it is still an entity on the map. - * @returns A boolean indicating if the infobox is visible or not. - */ - public getVisible(): boolean; - - /** - * Gets the width of the infobox. - * @returns The width of the infobox. - */ - public getWidth(): number; - - /** - * Gets the z-index of the infobox. - * @returns The z-index of the infobox. - */ - public getZIndex(): number; - - /** - * Sets the HTML content of the infobox. You can use this method to change the look of the infobox. Note that infobox options are ignored if - * custom HTML is set. Also, when custom HTML is used to represent the infobox, the infobox is anchored at the bottom-left corner. - * @param content The HTML string to use to generate the infobox. - */ - public setHtmlContent(content: string): void; - - /** - * Sets the location on the map where the anchor of the infobox is attached. - * @param loc The location to display the infobox at. - */ - public setLocation(loc: Location): void; - - /** - * Adds the infobox to the map. To remove an Infobox from the map, simply pass null into this function. - * @param map A map instance to display the infoboox on, or null if removing infobox from map. - */ - public setMap(map: Map): void; - - /** - * Sets options for the infobox. - * @param options The options to assign to the infobox. - */ - public setOptions(options: IInfoboxOptions): void; - } - - /** - * The Layer class makes it easy to organize groups of data by storing them in separate layers on the map. Grouping your data into layers - * provides a number of benefits such as the ability to hide or attach events to all IPrimitive shapes in a layer with a single line of code, - * while also providing providing a performance benefit over manually looping through each shape and performing these tasks. - */ - export class Layer implements IDataLayer { - - /** Optional property to store any additional metadata for this layer. */ - public metadata: any; - - /** - * @constructor - * @param id Unique string identifier for the layer. - */ - constructor(id?: string); - - /** - * Adds a shapes to the layer, at the specified index if specified. - * @param primitive The shape(s) to be added to the layer. - * @param index The index at which to insert the shape into the layer. - */ - public add(primitive: IPrimitive | IPrimitive[], index?: number): void; - - /** - * Clears all the data - */ - public clear(): void; - - /** - * Cleans up any resources this object is consuming - */ - public dispose(): void; - - /** - * Gets the id of the layer. - * @returns The id assigned to the layer. - */ - public getId(): string; - - /** - * Gets an array of shapes that are in the layer. This can be used to iterate over the individual shapes. - * @returns An array of shapes that are in the layer. - */ - public getPrimitives(): IPrimitive[]; - - /** - * Gets a value indicating whether the layer is visible or not. - * @returns A boolean indicating if the layer is visible or not. - */ - public getVisible(): boolean; - - /** - * Gets the zIndex of the layer. - * @returns The zIndex of the layer. - */ - public getZIndex(): number; - - /** - * Removes a primitive - * @param primitive primitive that needs to be removed - * @returns The primitive that needs to be removed - */ - public remove(primitive: IPrimitive): IPrimitive; - - /** - * Removes a primitive at a specified index - * @param index index of the primitive that needs to be removed - * @returns The primitive that needs to be removed at this index - */ - public removeAt(index: number): IPrimitive; - - /** - * Replaces all shapes in the layer with the new array of shapes that have been provided. - * @param primitives The array of shapes to add to the layer. - */ - public setPrimitives(primitives: IPrimitive[]): void; - - /** - * Sets whether the layer is visible or not. - * @param value A value indicating if the layer should be displayed or not. - */ - public setVisible(value: boolean): void; - - /** - * Sets the zIndex of the layer. - * @param zIndex The zIndex value to assign to the layer. - */ - public setZIndex(zIndex: number): void; - } - - /** - * The layers property of the map is a LayerCollection object and contains all the layers that have been added to the map. - * Note: This class is only exposed in the map.layers property. No other instance of this class can be created. - */ - export class LayerCollection extends Array { - /** The number of layers in the collection. */ - public length: number; - - /** - * Removes all layers from the map. - */ - public clear(): void; - - /** - * Gets the index of a layer in the collection. - * @param layer The layer to get the index of. - * @returns The index of the specified layer. - */ - public indexOf(layer: ILayer): number; - - /** - * Adds a layer to the map. - * @param layer The layer to insert into the collection. - */ - public insert(layer: ILayer): void; - - /** - * Adds an array of layers to the map. - * @param layers The layers to insert into the collection. - */ - public insertAll(layers: ILayer[]): void; - - /** - * Removes a layer from the map. - * @param layer The layer to remove from the collection. - */ - public remove(layer: ILayer): void; - - /** - * Removes a layer from the map at the specified index in the collection. - * @param idx The index of the layer to remove. - */ - public removeAt(idx: number): void; - } - - /** - * This class stores the coordinate information needed to mark locations on a map. The Location class consists of two properties: - * latitude and longitude. - */ - export class Location { - /** The location north or south of the equator from +90 to -90 */ - public latitude: number; - - /** The location east or west of the prime meridian +180 to -180 */ - public longitude: number; - - /** - * @constructor - * @param latitude The location north or south of the equator from +90 to -90 - * @param longitude The location east or west of the prime meridian +180 to -180 - */ - constructor(latitude: any, longitude: any); - - /** - * Determines if two locations are equal. - * @param location1 The first location to test. - * @param location2 The second location to test. - * @returns True if both locations are equivalent. - */ - static areEqual(location1: Location, location2: Location): boolean; - - /** - * Creates a deep copy of the map location. - * @returns A deep copy of the map location. - */ - public clone(): Location; - - /** - * Creates a proper Location from an object that has the same signature. - * @param source A Location or Location-like object that contains the same properties. - * @returns A copy of the map location. - */ - static cloneFrom(source: Location): Location; - - /** - * Normalizes the longitude by wrapping it around the earth. - * @param longitude The input longitude. - * @returns The longitude normalized to within -180 and +180. - */ - static normalizeLongitude(longitude: number): number; - - /** - * Parses a location string of the form "lat,long". - * @param str The location string. - * @returns The parsed location or null otherwise. - */ - static parseLatLong(str: string): Location; - - /** - * Converts the Location to a string representation. - * @returns A string representation of the location. - */ - public toString(): string; - } - - /** - * The LocationRect class, also known as a bounding box, consists of a set of coordinates that are used to represent rectangular area on the map. - */ - export class LocationRect { - /** The location that defines the center of the rectangle. */ - public center: Location; - - /** The height, in degrees, of the rectangle. */ - public height: number; - - /** The width, in degrees, of the rectangle. */ - public width: number; - - /** - * @constructor - * @param center The center of the LocationRect. - * @param width The width of the LocationRect in degrees. - * @param height The height of the LocationRect in degrees. - */ - constructor(center: Location, width: number, height: number); - - /** - * Gets a LocationRect using the specified locations for the northwest and southeast corners. - * @param northwest The north west corner of the LocationRect. - * @param southeast The south east corner of the LocationRect. - * @returns A LocationRect using the specified locations for the northwest and southeast corners. - */ - static fromCorners(northwest: Location, southeast: Location): LocationRect; - - /** - * Gets a LocationRect using the specified northern and southern latitudes and western and eastern longitudes for the rectangle boundaries. - * @param north The northern latitude of the LocationRect. - * @param west The western longitude of the LocationRect. - * @param south The southern latitude of the LocationRect. - * @param east The eastern longitude of the LocationRect. - * @returns A LocationRect defined by the specified northern and southern latitudes and western and eastern longitudes for the rectangle boundaries. - */ - static fromEdges(north: number, west: number, south: number, east: number): LocationRect; - - /** - * Gets a LocationRect using a list of locations. - * @param locations A list of locations. - * @returns A LocationRect that encloses all the specified locations. - */ - static fromLocations(...locations: Location[]): LocationRect; - - /** - * Gets a LocationRect using an array of locations. - * @param locations An array of locations. - * @returns A LocationRect that encloses all the specified locations. - */ - static fromLocations(locations: Location[]): LocationRect; - - /** - * Creates a LocationRect from a string with the following format: "north,west,south,east". North, west, south and east specify the coordinate number values. - * @param str A string that repsents a LocationRect with the format "north,west,south,east". - * @returns A LocationRect defined by the specified northern and southern latitudes and western and eastern longitudes for the rectangle boundaries that have been parsed by the string. - */ - static fromString(str: string): LocationRect; - - /** - * Gets a copy of the LocationRect object. - * @retruns A copy of the LocationRect object. - */ - public clone(): LocationRect; - - /** - * Gets whether the specified Location is within the LocationRect. - * @returns A boolean indicating if a location is within a LocationRect. - */ - public contains(location: Location): boolean; - - /** - * Determines if the LocationRect crosses the 180th meridian. - * @returns A boolean indicating if the LocationRect crosses the international date line (-180/180 degrees longitude). - */ - public crossesInternationalDateLine(): boolean; - - /** - * Gets the longitude that defines the eastern edge of the LocationRect. - * @returns The eastern longitude value of the LocationRect. - */ - public getEast(): number; - - /** - * Gets the latitude that defines the northern edge of the LocationRect. - * @returns The northern latitude value of the LocationRect. - */ - public getNorth(): number; - - /** - * Gets the Location that defines the northwest corner of the LocationRect. - * @returns The northwest corner location of the LocationRect. - */ - public getNorthwest(): Location; - - /** - * Gets the latitude that defines the southern edge of the LocationRect. - * @returns The southern latitude value of the LocationRect. - */ - public getSouth(): number; - - /** - * Gets the Location that defines the southeast corner of the LocationRect. - * @returns The southeast corner location of the LocationRect. - */ - public getSoutheast(): Location; - - /** - * Gets the latitude that defines the western edge of the LocationRect. - * @returns The western longitude value of the LocationRect. - */ - public getWest(): number; - - /** - * Gets whether the specified LocationRect intersects with this LocationRect. - * @param rect A second LocationRect to test for intersection with. - * @returns A boolean indicating if a second LocationRect interests with this LocationRect. - */ - public intersects(rect: LocationRect): boolean; - - /** - * Scales the size of a LocationRect by multiplying the width and height properties by a percentage. - * @param percentage A percentage value to increase the size of the LocationRect by. - */ - public inflate(percentage: number): void; - - /** - * If a LocationRect crosses the international date line, this method splits it into two LocationRect objects and returns them as an array. - * @returns An array of LocationRects, that are split by the international date line (-180/180 degrees longitude) - */ - public splitByInternationalDateLine(): LocationRect[]; - - /** - * Converts the LocationRect object to a string. - * @returns A string version of the LocationRect. - */ - public toString(): string; - } - - /** The map object generates an interactive map within a specified DOM element. */ - export class Map { - /** Entities of the map */ - public entities: EntityCollection; - - /** Set of map layers */ - public layers: LayerCollection; - - /** - * @constructor - * @param parentElement The parent element of the map as a CSS selector string or HTMLElement. - * @param options Options used when creating the map. - */ - constructor(parentElement: string | HTMLElement, options: IMapLoadOptions); - - /** - * Gets the streetside panorama information closest to the specified bounding box and returns using a success callback function. - * This information can then be used to set the map view to that streetside panorama. - */ - public static getClosestPanorama(bounds: LocationRect, success: (panoramaInfo: IPanoramaInfo) => void, missingCoverage: () => void): void; - - /** Returns the branch name; release, experimental, frozen. */ - public static getVersion(): string; - - - /** Deletes the Map object and releases any associated resources. */ - public dispose(): void; - - /** - * Gets the location rectangle that defines the boundaries of the current map view. - * @returns The location rectangle that defines the boundaries of the current map view. - */ - public getBounds(): LocationRect; - - /** - * Gets the location of the center of the current map view. - * @returns The location of the center of the current map view. - */ - public getCenter(): Location; - - /** - * Gets to the specified callback an array of strings representing the attributions of the imagery currently displayed on the map. - * @param callback The callback function that needs to be called after retrieving the copyright information. - */ - public getCopyrights(callback: (copyrights: string[]) => void): void; - - /** - * Gets the session ID. This method calls the callback function with the session ID as the first parameter - * @param callback The callback function that needs to be called with the session id. - */ - public getCredentials(callback: (creds: string) => void): void; - - /** - * Gets the current culture. - * @returns The current culture. - */ - public getCulture(): string; - - /** - * Gets the height of the map control. - * @returns The height of the map control. - */ - public getHeight(): number; - - /** - * Returns the heading of the current map view. - * @returns Returns the heading of the current map view. - */ - public getHeading(): number; - - /** - * Gets the string that represents the imagery currently displayed on the map. - * @returns The string that represents the imagery currently displayed on the map. - */ - public getImageryId(): string; - - /** - * Gets a string that represents the current map type displayed on the map. - * @returns A string that represents the current map type displayed on the map. - */ - public getMapTypeId(): MapTypeId; - - /** - * Gets the current scale in meters per pixel of the center of the map. - * @returns The current scale in meters per pixel of the center of the map. - */ - public getMetersPerPixel(): number; - - /** - * Gets the map options that have been set. - * @returns the map options that have been set. - */ - public getOptions(): IMapOptions; - - /** - * Gets the x coordinate of the top left corner of the map control, relative to the page. - * @returns The x coordinate of the top left corner of the map control, relative to the page. - */ - public getPageX(): number; - - /** - * Gets the y coordinate of the top left corner of the map control, relative to the page. - * @returns The y coordinate of the top left corner of the map control, relative to the page. - */ - public getPageY(): number; - - /** - * Returns the pitch of the current streetside map view. - * @returns Returns the pitch of the current streetside map view. - */ - public getPitch(): number; - - /** - * Gets the map root node. - * @returns the map root node. - */ - public getRootElement(): HTMLElement; - - /** - * Gets the user region. - * @returns The user region. - */ - public getUserRegion(): string; - - /** - * Gets the width of the map control. - * @returns the width of the map control. - */ - public getWidth(): number; - - /** - * Gets the zoom level of the current map view. - * @returns Returns the zoom level of the current map view. - */ - public getZoom(): number; - - /** - * Gets the range of valid zoom levels for the current map view. - * @returns The range of valid zoom levels for the current map view. - */ - public getZoomRange(): IRange; - - /** - * Gets a boolean indicating whether the map is in a regular Mercator nadir mode. - * @returns A boolean indicating whether the map is in a regular Mercator nadir mode. - */ - public isMercator(): boolean; - - /** - * Gets a boolean indicating if the current map type allows the heading to change; false if the display heading is fixed. - * @returns true if the current map type allows the heading to change; false if the display heading is fixed. - */ - public isRotationEnabled(): boolean; - - /** - * Sets the current map type. - * @param mapTypeId The map imagery type of the map to set. - */ - public setMapType(mapTypeId: MapTypeId): void; - - /** - * Sets the map options. - * @param options The map options to be set. - */ - public setOptions(options: IMapOptions): void; - - /** - * Sets the view of the map. - * @param viewOptions The view options to be set. - */ - public setView(viewOptions: IViewOptions): void; - - /** - * Converts a specified Location or a Location array to a Point or Point array on the map - * relative to the specified PixelReference. If no reference is specified, PixelReference.viewport - * is taken. - * @param location The given Location or Location[] to convert. - * @param reference The PixelReference to specify the reference point. - * @returns The converted Point or Point[], or null if the conversion fails. - */ - public tryLocationToPixel(location: Location | Location[], reference?: any): Point | Point[]; - - /** - * Converts a specified Point or a Point array to a Location or Location array on the map - * relative to the specified PixelReference. If no reference is specified, PixelReference.viewport - * is taken. - * @param point The given Point or Point[] to convert. - * @param reference The PixelReference to specify the reference point. - * @returns The converted Location or Location[], or null if the conversion fails. - */ - public tryPixelToLocation(point: Point | Point[], reference?: any): Location | Location[]; - } - - /** - * This class is used to represent a pixel coordinate or offset. This is often used by pushpin anchors, and map location to pixel conversion calculations. - */ - export class Point { - /** The x coordinate */ - public x: number; - - /** The y coordinate */ - public y: number; - - /** - * @constructor - * @param x The x coordinate. - * @param y The y coordinate. - */ - constructor(x: number, y: number); - - /** - * Adds the x and y values of two points and returns a new Point. - * @param point The point to add. - * @returns A new point created by the sum of two points. - */ - public add(point: Point): Point; - - /** - * Creates a copy of the current point. - * @returns A new instance of the current point. - */ - public clone(): Point; - - /** - * Compares the x and y values of two points to see if they are equal. If a tolerance value is specified, it checks to see if the linear distance between the points is less than or equal to the tolerance value. - * @param point The point to compare to. - * @param tolerance Optional, tolerance (>= 0) to avoid false result because of floating point errors. - * @returns true if this point equals point, false otherwise - */ - public equals(point: Point, tolerance?: number): boolean; - - /** - * Subtracts the x and y values of a points and returns a new Point. - * @param point The point to subtract. - * @returns A new point created by the subtraction of two points. - */ - public subtract(point: Point): Point; - - /** - * Converts the Point to a string representation. - * @returns A string representation of the point. - */ - public toString(): string; - } - - /** - * This compression algorithm encodes/decodes an array of locations into a string. - * This algorithm is used for generating a compressed collection of locations for use - * with the Bing Maps REST Elevation Service. This algorithm is also used for decoding - * the compressed coordinates returned by the GeoData API. - * - * These algorithms come from the following documentation: - * http://msdn.microsoft.com/en-us/library/jj158958.aspx - * http://msdn.microsoft.com/en-us/library/dn306801.aspx - */ - export class PointCompression { - /** - * Decodes a collection of locations from a compressed string. - * @param value Compressed string to decode. - * @returns An array of locations that have been decoded from the compressed string. - */ - public static decode(value: string): Location[]; - - /** - * Compresses an array of locations into a string. - * @param locations Collection of coordinates to compress. - * @returns A compressed string representing an array of locations. - */ - public static encode(locations: Location[]): string; - } - - /** - * A polygon is an area defined by a closed ring of locations. A simple polygon consists of an array of Location objects that form a boundary. - * A complex polygon consists of several arrays of Locations, where the first array is the outline of the polygon, and the subsequent arrays are holes in the polygon. - * The Polygon class derives from the IPrimitive interface. - */ - export class Polygon implements IPrimitive { - /** - * Information that is linked to the polygon. - * Some modules such as the GeoJSON, and Spatial Data Service modules will also often add information to this property. - */ - public metadata: any; - - /** - * @constructor - * @param rings A Location array for basic polygon with single outer perimeter, - * or an array of Location arrays for advanced polygon (multi-polygon, polygon with holes, or combination of polygons). - * @param options Options used to customize polygon. - */ - constructor(rings: Location[] | Location[][], options?: IPolygonOptions); - - /** - * Gets the css cursor value when polygon has events on it. - * @returns CSS cursor string when polygon has events on it. - */ - public getCursor(): string; - - /** - * Gets the fill color of the inside of the polygon. Will be string or Color object depending on the the what method was used in the pushpin options. - * @returns The fill color of the inside of the polygon. - */ - public getFillColor(): string | Color; - - /** - * Returns whether the polygon is generalizable based on zoom level or not. - * @returns whether the polygon is generalizable based on zoom level or not. - */ - public getGeneralizable(): boolean; - - /** - * Gets the first ring of the polygon (for V7 compatability). - * @returns An array of Locations that is the first ring of the polygon; or an empty array if the polygon has no ring at all. - */ - public getLocations(): Location[]; - - /** - * Gets an array of location arrays, where each location array defines a ring of the polygon. - * @returns An array of location arrays, where each location array defines a ring of the polygon. - */ - public getRings(): Location[][]; - - /** - * Gets the color of the border stroke of the polygon. Will be string or Color object depending on the the what method was used in the pushpin options. - * @returns The color of the border stroke of the polygon. - */ - public getStrokeColor(): string | Color; - - /** - * Gets the stroke dash array of the polygon, in format of either array or string, whichever user provides. - * @returns The stroke dash array of the polygon. - */ - public getStrokeDashArray(): number[] | string; - - /** - * Gets the thickness of the border stroke of the polygon. - * @returns The thickness of the border stroke of the polygon as a number. - */ - public getStrokeThickness(): number; - - /** - * Gets whether the polygon is visible. - * @returns A boolean indicating whether the polygon is visible or not. - */ - public getVisible(): boolean; - - /** - * Sets locations (single ring) of the polygon. (for V7 compatability) - * @param locations A Location[] that defines the only ring of the polygon - */ - public setLocations(locations: Location[]): void; - - /** - * Sets the properties for the polygon. - * @param options The IPolygonOptions object containing the options to customize the polygon. - */ - public setOptions(options: IPolygonOptions): void; - - /** - * Sets rings of the polygon. - * @param rings A Location[][] where each Location[] defines a ring of the polygon. - */ - public setRings(rings: Location[] | Location[][]): void; - } - - /** - * Polylines allow you to draw connected lines on a map. In many spatial database systems, this is also known as a LineString. - * The Polyline class derives from the IPrimitive interface. - */ - export class Polyline implements IPrimitive { - /** - * Information that is linked to the polyline. - * Some modules such as the GeoJSON, and Spatial Data Service modules will also often add information to this property. - */ - public metadata: any; - - /** - * @constructor - * @param locations An array of locations that make up the path of the polyine. - * @param options Options used to customize polyline. - */ - constructor(locations: Location[], options?: IPolylineOptions); - - /** - * Gets the css cursor value when polyline has events on it. - * @returns CSS cursor string when polyline has events on it. - */ - public getCursor(): string; - - /** - * Returns whether the polyline is generalizable based on zoom level or not. - * @returns whether the polyline is generalizable based on zoom level or not. - */ - public getGeneralizable(): boolean; - - /** - * Gets the locations that make up the polyline. - * @returns An array that defines the path of the polyline. - */ - public getLocations(): Location[]; - - /** - * Gets the color of the border stroke of the polyline. Will be string or Color object depending on the the what method was used in the polyline options. - * @returns The stroke color of the polyline. - */ - public getStrokeColor(): string | Color; - - /** - * Gets the stroke dash array of the polyline, in format of either array or string, whichever user provides. - * @returns The stroke dash array of the polyline. - */ - public getStrokeDashArray(): number[] | string; - - /** - * Gets the thickness of the border stroke of the polyline. - * @returns The thickness of the border stroke of the polyline as a number. - */ - public getStrokeThickness(): number; - - /** - * Gets whether the polyline is visible. - * @returns A boolean indicating whether the polyline is visible or not. - */ - public getVisible(): boolean; - - /** - * Sets locations of the polyline. - * @param locations A Location[] that defines path of the polyline - */ - public setLocations(locations: Location[]): void; - - /** - * Sets the properties for the polyline. - * @param options The IPolylineOptions object containing the options to customize the polyline. - */ - public setOptions(options: IPolylineOptions): void; - } - - /** - * Pushpins, sometimes also referred to as markers or MapIcons on other mapping platforms, are one of the primary ways of marking a location on a map. - * The Pushpin class derives from the IPrimitive interface. - */ - export class Pushpin implements IPrimitive { - - /** - * Information that is linked to the pushpin. - * Some modules such as the GeoJSON, and Spatial Data Service modules will also often add information to this property. - */ - public metadata: any; - - /** - * @constructor - * @param location A Location object that specifies where to display the pushpin. - * @param options Options used when creating the Pushpin. - */ - constructor(location: Location, options?: IPushpinOptions); - - /** - * Gets the point on the Pushpin icon which is anchored to the pushpin location. - * An anchor of (0,0) is the top left corner of the icon. - * @returns The point on the Pushpin icon which is anchored to the pushpin location. - */ - public getAnchor(): Point; - - /** - * Gets whether the pushpin clicked style is enabled - * @returns Whether the pushpin clicked style is enabled. - */ - public getClickedStyleEnabled(): boolean; - - /** - * Gets the color option of the pushpin. - * @returns The color option of the pushpin. - */ - public getColor(): string | Color; - - /** - * Gets the css cursor value when pushpin has events on it. - * @returns CSS cursor string when pushpin has events on it. - */ - public getCursor(): string; - - /** - * Gets a boolean indicating if the pushpin is draggable or not. - * @returns A boolean indicating if the pushpin is draggable or not. - */ - public getDraggable(): boolean; - - /** - * Gets whether the pushpin hover style is enabled - * @returns Whether the pushpin hover style is enabled. - */ - public getHoverStyleEnabled(): boolean; - - /** - * Gets the custom Pushpin source icon string which can be a url to an image or SVG, inline SVG string, or data URI. - * @returns the custom Pushpin icon source string, which can be a url to an image or SVG, inline SVG string, or data URI. - */ - public getIcon(): string; - - /** - * Returns the location of the pushpin. - * @returns The location of the pushpin. - */ - public getLocation(): Location; - - /** - * Returns whether the clickable area of the pushpin is an ellipse. - * @returns A boolean indicating whether the clickable area of the pushpin is an ellipse. - */ - public getRoundClickableArea(): boolean; - - /** - * Gets the subtitle label of the Pushpin. - * @returns The subtitle label of the Pushpin. - */ - public getSubTitle(): string; - - /** - * Gets the text within the Pushpin icon. - * @returns The text within the Pushpin icon. - */ - public getText(): string; - - /** - * Gets the amount the text is shifted from the Pushpin icon. - * @returns the amount the text is shifted from the Pushpin icon. - */ - public getTextOffset(): Point; - - /** - * Gets the title label of the Pushpin. - * @returns the title label of the Pushpin. - */ - public getTitle(): string; - - /** - * Gets whether the pushpin is visible. - * @returns A boolean indicating whether the pushpin is visible or not. - */ - public getVisible(): boolean; - - /** - * Sets the location of the Pushpin. - * @param location The location of the Pushpin. - */ - public setLocation(location: Location): void; - - /** - * Sets the properties for the pushpin. - * @param options The IPushpinOptions object containing the options to customize the pushpin. - */ - public setOptions(options: IPushpinOptions): void; - } - - /** - * Used to represent the location of a map tile in the quadkey tile pyramid system used by the map. - * If using a tile source where the uriConstructor property is set to a callback function, that callback function will recieve - * an instance of the PyramidTileId class. - */ - export class PyramidTileId { - /** The height of the tile. */ - public pixelHeight: number; - - /** The width of the tile. */ - public pixelWidth: number; - - /** The quadkey ID of the tile. */ - public quadKey: string; - - /** The x tile coordinate. */ - public x: number; - - /** The y tile coordinate. */ - public y: number; - - /** The zoom level of the tile. */ - public zoom: number; - - /** - * @constructor - * @param x The integer x position of the tile within the tile layer at the specified zoom level. - * @param y The integer y position of the tile within the tile layer at the specified zoom level. - * @param zoom The zoom level of the tile. - * @param width The tile's width in pixels. Default value: 256 - * @param height The tile's height in pixels. Default value: 256 - */ - constructor(x: number, y: number, zoom: number, width?: number, height?: number) - - /** - * Compares two PyramidTileId objects and returns a boolean indicating if the two PyramidTileId are equal. - * @param tileId1 The first PyramidTileId to compare to the second. - * @param tileId2 The second PyramidTileId to compare to the first. - * @returns A boolean indicating if the two PyramidTileId are equal. - */ - public static areEqual(tileId1: PyramidTileId, tileId2: PyramidTileId): boolean; - - /** - * Generates a PyramidTileId from a quadkey tile id string. - * @param quadkey The quadkey tile id string to convert into a PyramidTileId object. - * @param width The tile's width in pixels. Default value: 256 - * @param height The tile's height in pixels. Default value: 256 - */ - public static fromQuadKey(quadkey: string, width?: number, height?: number): PyramidTileId; - } - - /** Provides static functions for generating random test data. */ - export class TestDataGenerator { - /** - * Generates a random hex or rgba color string. - * @param withAlpha A boolean indicating if the color should have an alpha value or not. if set to true, a rgba value will be returned with an alpha value of 0.5. - * @returns A css color string, hex or rgba. - */ - public static getColor(withAlpha?: boolean): string; - - /** - * Generates random Location objects. - * @param num The number of locations to generate. If set to one a single Location will be returned. If greater than one and array will be returned. - * @param bounds The bounding box in which all the locations should fall within. - * @returns One or more random Locations. - */ - public static getLocations(num?: number, bounds?: LocationRect): Location | Location[]; - - /** - * Generates random pushpins. - * @param num The number of pushpins to generate. If set to one a single Pushpin will be returned. If greater than one and array will be returned. - * @param bounds The bounding box in which all the pushpins should fall within. - * @param options The options to use for rendering the pushpins. Default is random. - * @returns One or more random Pushpins. - */ - public static getPushpins(num?: number, bounds?: LocationRect, options?: IPushpinOptions): Pushpin | Pushpin[]; - - /** - * Generates random polylines. - * @param num The number of polylines to generate. If set to one a single Polyline will be returned. If greater than one and array will be returned. - * @param bounds The bounding box in which all the locations of the polylines should fall within. - * @param size The number of locations each polylines should have. Default: random between 3 and 10. - * @param scaleFactor A number that scales the size of the polylines based on size of the bounding box. A value of 0.1 would generate polylines that are no larger than 10% of the width/height of the map. Default: 0.1 - * @param options The options to use for rendering the polylines. Default is random. - * @returns One or more random Polylines. - */ - public static getPolylines(num?: number, bounds?: LocationRect, size?: number, scaleFactor?: number, options?: IPolylineOptions): Polyline | Polyline[]; - - /** - * Generates random polygons. - * @param num The number of polygons to generate. If set to one a single Polygon will be returned. If greater than one and array will be returned. - * @param bounds The bounding box in which all the locations of the polygon should fall within. - * @param size The number of locations each polygon should have. Default: random between 3 and 10. - * @param scaleFactor A number that scales the size of the polygons based on the size of the bounding box. A value of 0.1 would generate polygons that are no larger than 10% of the width/height of the map. Default: 0.1 - * @param options The options to use for rendering the polygons. Default is random. - * @param addHole A boolean indicating if the generated polygon should have a hole or not. Note that this will double the number of Location objects that are in the Polygon. Default: false - * @returns One or more random polygons. - */ - public static getPolygons(num?: number, bounds?: LocationRect, size?: number, scaleFactor?: number, options?: IPolygonOptions, addHole?: boolean): Polygon | Polygon[]; - } - - /** Represents a tile layer that can be overlaid on top of the map. */ - export class TileLayer implements ILayer { - /** - * @constructor - * @param options The options to use to define the tile layer. - */ - constructor(options: ITileLayerOptions); - - /** - * Gets the opacity of the tile layer, defined as a double between 0 (not visible) and 1. - * @returns The opacity of the tile layer, defined as a double between 0 (not visible) and 1. - */ - public getOpacity(): number; - - /** - * Gets the tile source of the tile layer. - * @returns The tile source of the tile layer. - */ - public getTileSource(): TileSource; - - /** - * Gets a boolean that indicates if the tile layer is visible or not. - * @returns A boolean that indicates if the tile layer is visible or not. - */ - public getVisible(): boolean; - - /** - * Gets the zIndex of the tile layer. - * @returns The zIndex of the tile layer. - */ - public getZIndex(): number; - - /** - * Sets the opacity of the tile layer. Value must be a number between 0 and 1. - * @param opacity The opacity of the tile layer. Value must be a number between 0 and 1. - */ - public setOpacity(opacity: number): void; - - /** - * Sets options for the tile layer. - * @param options The options for the tile layer. - */ - public setOptions(options: ITileLayerOptions): void; - - /** - * Sets the visibility of the tile layer. - * @param show A boolean indicating if the tile layer should be visible or not. - */ - public setVisible(show: boolean): void; - - /** - * Sets the zIndex of the tile layer. - * @param idx The zIndex of the tile layer. - */ - public setZIndex(idx: number): void; - } - - /** Defines the data source for a tile layer. */ - export class TileSource { - /** - * @constructor - * @param options The options to use to define the tile source. - */ - constructor(options: ITileSourceOptions); - - /** - * Gets the specified bounding box of the of the tile source. - * @returns The specified bounding box of the of the tile source. - */ - public getBounds(): LocationRect; - - /** - * Gets the pixel height of each tile in the tile source. - * @returns The pixel height of each tile in the tile source. - */ - public getHeight(): number; - - /** - * Gets the maximum zoom level specified for the tile source. - * @returns The maximum zoom level specified for the tile source. - */ - public getMaxZoom(): number; - - /** - * Gets the minimum zoom level specified for the tile source. - * @returns The minimum zoom level specified for the tile source. - */ - public getMinZoom(): number; - - /** - * Gets a string that constructs tile URLs used to retrieve tiles for the tile layer. - * @returns A string that constructs tile URLs used to retrieve tiles for the tile layer. - */ - public getUriConstructor(): string | ((tile: PyramidTileId) => string); - - /** - * Gets the pixel width of each tile in the tile source. - * @returns The pixel width of each tile in the tile source. - */ - public getWidth(): number; - } -} diff --git a/types/bintrees/bintrees-tests.ts b/types/bintrees/bintrees-tests.ts index fb4a22a3d8..84b75c98be 100644 --- a/types/bintrees/bintrees-tests.ts +++ b/types/bintrees/bintrees-tests.ts @@ -1,8 +1,11 @@ -/// /// import assert = require('assert'); import { BinTree, RBTree } from 'bintrees'; +// Declaring shims removes mocha dependency. These tests are never executed, only typechecked, so this is fine. +declare function describe(description: string, callback: () => void): void; +declare function it(description: string, callback: () => void): void; + describe('bintrees', () => { it('builds a simple tree', () => { let treeA = new RBTree((a: number, b: number) => a - b); diff --git a/types/bitcoinjs-lib/index.d.ts b/types/bitcoinjs-lib/index.d.ts index c7d1acc899..920df43d6e 100644 --- a/types/bitcoinjs-lib/index.d.ts +++ b/types/bitcoinjs-lib/index.d.ts @@ -71,6 +71,10 @@ export class ECPair { d: BigInteger; + readonly compressed: boolean; + + readonly network: Network; + getAddress(): string; getNetwork(): Network; @@ -85,7 +89,7 @@ export class ECPair { static fromPublicKeyBuffer(buffer: Buffer, network: Network): ECPair; - static fromWIF(string: string, network: Network): ECPair; + static fromWIF(string: string, network?: Network): ECPair; static makeRandom(options?: { compressed?: boolean, network?: Network, rng?: Rng }): ECPair; } diff --git a/types/bl/index.d.ts b/types/bl/index.d.ts index 5d34052b80..8ad01671fd 100644 --- a/types/bl/index.d.ts +++ b/types/bl/index.d.ts @@ -11,7 +11,7 @@ import stream = require('stream'); declare class BufferList extends stream.Duplex { constructor(callback?: (err: Error, buffer: Buffer) => void); - append(buffer: Buffer): void; + append(buffer: Buffer | Buffer[] | BufferList | BufferList[] | string): void; get(index: number): number; slice(start?: number, end?: number): Buffer; copy(dest: Buffer, destStart?: number, srcStart?: number, srcEnd?: number): void; diff --git a/types/boom/boom-tests.ts b/types/boom/boom-tests.ts index 4d133b2545..5ffd808de4 100644 --- a/types/boom/boom-tests.ts +++ b/types/boom/boom-tests.ts @@ -1,10 +1,10 @@ -import Boom = require('boom'); +import * as Boom from 'boom'; // 4xx and data type const badRequestError = Boom.badRequest('message', {some: 'data'}); badRequestError.data.some; -const badRequestError2: Boom.Boom = Boom.badImplementation('message'); +const badRequestError2: Boom = Boom.badImplementation('message'); const unauthorizedError1 = Boom.unauthorized('message', 'scheme', {some: 'attribute'}); unauthorizedError1.output.payload.attributes === { some: 'attribute', error: 'message' }; @@ -24,127 +24,131 @@ unauthorizedError4.output.headers === { 'WWW-Authenticate': 'scheme some="attrib const paymentRequiredError = Boom.paymentRequired('message', {some: 'data'}); paymentRequiredError.data.some; -const paymentRequiredError2: Boom.Boom = Boom.paymentRequired('message'); +const paymentRequiredError2: Boom = Boom.paymentRequired('message'); const forbiddenError = Boom.forbidden('message', {some: 'data'}); forbiddenError.data.some; -const forbiddenError2: Boom.Boom = Boom.forbidden('message'); +const forbiddenError2: Boom = Boom.forbidden('message'); const notFoundError = Boom.notFound('message', {some: 'data'}); notFoundError.data.some; -const notFoundError2: Boom.Boom = Boom.notFound('message'); +const notFoundError2: Boom = Boom.notFound('message'); const methodNotAllowedError = Boom.methodNotAllowed('message', {some: 'data'}); methodNotAllowedError.data.some; -const methodNotAllowedError2: Boom.Boom = Boom.methodNotAllowed('message'); +const methodNotAllowedError2: Boom = Boom.methodNotAllowed('message'); const notAcceptableError = Boom.notAcceptable('message', {some: 'data'}); notAcceptableError.data.some; -const notAcceptableError2: Boom.Boom = Boom.notAcceptable('message'); +const notAcceptableError2: Boom = Boom.notAcceptable('message'); const proxyAuthRequiredError = Boom.proxyAuthRequired('message', {some: 'data'}); proxyAuthRequiredError.data.some; -const proxyAuthRequiredError2: Boom.Boom = Boom.proxyAuthRequired('message'); +const proxyAuthRequiredError2: Boom = Boom.proxyAuthRequired('message'); const clientTimeoutError = Boom.clientTimeout('message', {some: 'data'}); clientTimeoutError.data.some; -const clientTimeoutError2: Boom.Boom = Boom.clientTimeout('message'); +const clientTimeoutError2: Boom = Boom.clientTimeout('message'); const conflictError = Boom.conflict('message', {some: 'data'}); conflictError.data.some; const resourceGoneError = Boom.resourceGone('message', {some: 'data'}); resourceGoneError.data.some; -const resourceGoneError2: Boom.Boom = Boom.resourceGone('message'); +const resourceGoneError2: Boom = Boom.resourceGone('message'); const lengthRequiredError = Boom.lengthRequired('message', {some: 'data'}); lengthRequiredError.data.some; -const lengthRequiredError2: Boom.Boom = Boom.lengthRequired('message'); +const lengthRequiredError2: Boom = Boom.lengthRequired('message'); const preconditionFailedError = Boom.preconditionFailed('message', {some: 'data'}); preconditionFailedError.data.some; -const preconditionFailedError2: Boom.Boom = Boom.preconditionFailed('message'); +const preconditionFailedError2: Boom = Boom.preconditionFailed('message'); const entityTooLargeError = Boom.entityTooLarge('message', {some: 'data'}); entityTooLargeError.data.some; -const entityTooLargeError2: Boom.Boom = Boom.lengthRequired('message'); +const entityTooLargeError2: Boom = Boom.lengthRequired('message'); const uriTooLongError = Boom.uriTooLong('message', {some: 'data'}); uriTooLongError.data.some; -const uriTooLongError2: Boom.Boom = Boom.uriTooLong('message'); +const uriTooLongError2: Boom = Boom.uriTooLong('message'); const unsupportedMediaTypeError = Boom.unsupportedMediaType('message', {some: 'data'}); unsupportedMediaTypeError.data.some; -const unsupportedMediaTypeError2: Boom.Boom = Boom.unsupportedMediaType('message'); +const unsupportedMediaTypeError2: Boom = Boom.unsupportedMediaType('message'); const rangeNotSatisfiableError = Boom.rangeNotSatisfiable('message', {some: 'data'}); rangeNotSatisfiableError.data.some; -const rangeNotSatisfiableError2: Boom.Boom = Boom.rangeNotSatisfiable('message'); +const rangeNotSatisfiableError2: Boom = Boom.rangeNotSatisfiable('message'); const expectationFailedError = Boom.expectationFailed('message', {some: 'data'}); expectationFailedError.data.some; -const expectationFailedError2: Boom.Boom = Boom.expectationFailed('message'); +const expectationFailedError2: Boom = Boom.expectationFailed('message'); const teapotError = Boom.teapot('message', {some: 'data'}); teapotError.data.some; -const teapotError2: Boom.Boom = Boom.teapot('message'); +const teapotError2: Boom = Boom.teapot('message'); const badDataError = Boom.badData('message', {some: 'data'}); badDataError.data.some; -const badDataError2: Boom.Boom = Boom.badData('message'); +const badDataError2: Boom = Boom.badData('message'); const lockedError = Boom.locked('message', {some: 'data'}); lockedError.data.some; -const lockedError2: Boom.Boom = Boom.locked('message'); +const lockedError2: Boom = Boom.locked('message'); + +const failedDependencyError = Boom.failedDependency('message', {some: 'data'}); +failedDependencyError.data.some; +const failedDependencyError2: Boom = Boom.failedDependency('message'); const preconditionRequiredError = Boom.preconditionRequired('message', {some: 'data'}); preconditionRequiredError.data.some; -const preconditionRequiredError2: Boom.Boom = Boom.preconditionRequired('message'); +const preconditionRequiredError2: Boom = Boom.preconditionRequired('message'); const tooManyRequestsError = Boom.tooManyRequests('message', {some: 'data'}); tooManyRequestsError.data.some; -const tooManyRequestsError2: Boom.Boom = Boom.tooManyRequests('message'); +const tooManyRequestsError2: Boom = Boom.tooManyRequests('message'); const illegalError = Boom.illegal('message', {some: 'data'}); illegalError.data.some; -const illegalError2: Boom.Boom = Boom.illegal('message'); +const illegalError2: Boom = Boom.illegal('message'); // 5xx and data type const badImplementationError = Boom.badImplementation('message', {some: 'data'}); badImplementationError.data.some; -const badImplementationError2: Boom.Boom = Boom.badImplementation('message'); +const badImplementationError2: Boom = Boom.badImplementation('message'); const internalError = Boom.internal('message', {some: 'data'}); internalError.data.some; -const internalError2: Boom.Boom = Boom.internal('message'); +const internalError2: Boom = Boom.internal('message'); const notImplementedError = Boom.notImplemented('message', {some: 'data'}); notImplementedError.data.some; -const notImplementedError2: Boom.Boom = Boom.notImplemented('message'); +const notImplementedError2: Boom = Boom.notImplemented('message'); const badGatewayError = Boom.badGateway('message', {some: 'data'}); badGatewayError.data.some; -const badGatewayError2: Boom.Boom = Boom.badGateway('message'); +const badGatewayError2: Boom = Boom.badGateway('message'); const serverUnavailableError = Boom.serverUnavailable('message', {some: 'data'}); serverUnavailableError.data.some; -const serverUnavailableError2: Boom.Boom = Boom.serverUnavailable('message'); +const serverUnavailableError2: Boom = Boom.serverUnavailable('message'); const gatewayTimeoutError = Boom.gatewayTimeout('message', {some: 'data'}); gatewayTimeoutError.data.some; -const gatewayTimeoutError2: Boom.Boom = Boom.gatewayTimeout('message'); +const gatewayTimeoutError2: Boom = Boom.gatewayTimeout('message'); // boomify const boomifiedError = Boom.boomify(new Error('test'), { statusCode: 400, message: 'some message' }); // isBoom -const isBoomError = new Boom.Boom('test') +const isBoomError = new Boom('test') Boom.isBoom(isBoomError); -const maybeBoom = new Boom.Boom('test'); +const maybeBoom = new Boom('test'); if(Boom.isBoom(maybeBoom)) { // isBoom is a type guard that allows accessing these properties: maybeBoom.output.headers; @@ -152,7 +156,7 @@ if(Boom.isBoom(maybeBoom)) { // constructor -const constructorError: Boom.Boom = new Boom.Boom('test'); +const constructorError: Boom = new Boom('test'); constructorError.message; @@ -180,11 +184,11 @@ interface CustomPayload extends Boom.Payload { * Test assignment of custom error data: */ const errorWithData = Boom.badImplementation('', { custom1: 'test', customType: 'Custom1', isCustom: true } as CustomData1); -const errorWithNoExplicitDataType: Boom.Boom = errorWithData; // can assign to error without explicit data type -const errorWithExplicitType: Boom.Boom = errorWithData; // can assign to union data type -const errorWithConcreteCustomData: Boom.Boom = errorWithData; // can assign to concrete data type +const errorWithNoExplicitDataType: Boom = errorWithData; // can assign to error without explicit data type +const errorWithExplicitType: Boom = errorWithData; // can assign to union data type +const errorWithConcreteCustomData: Boom = errorWithData; // can assign to concrete data type // assignment to CustomData2 would not be possible -// const errorWithConcreteCustomData2: Boom.Boom = errorWithData; +// const errorWithConcreteCustomData2: Boom = errorWithData; // Some complex error data types for testing purposes: interface CustomDataBase { diff --git a/types/boom/index.d.ts b/types/boom/index.d.ts index ed48f181cf..b38dafe038 100644 --- a/types/boom/index.d.ts +++ b/types/boom/index.d.ts @@ -1,23 +1,22 @@ -// Type definitions for boom 7.1.1 +// Type definitions for boom 7.2.0 // Project: https://github.com/hapijs/boom // Definitions by: Igor Rogatty // AJP // Jinesh Shah // Timon van Spronsen +// Daniel Machado // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 -export = Boom; - -declare namespace Boom { - - /** + export = Boom; +/** * boom provides a set of utilities for returning HTTP errors. Each utility returns a Boom error response object (instance of Error) which includes the following properties: * @see {@link https://github.com/hapijs/boom#boom} */ - export class Boom extends Error { +declare class Boom extends Error { + /** Creates a new Boom object using the provided message and then calling boomify() to decorate the error with the Boom properties. */ - constructor(message?: string | Error, options?: Options); + constructor(message?: string | Error, options?: Boom.Options); /** isBoom - if true, indicates this is a Boom object instance. */ isBoom: boolean; /** isServer - convenience bool indicating status code >= 500. */ @@ -25,7 +24,7 @@ declare namespace Boom { /** message - the error message. */ message: string; /** output - the formatted response. Can be directly manipulated after object construction to return a custom error response. Allowed root keys: */ - output: Output; + output: Boom.Output; /** reformat() - rebuilds error.output using the other object properties. */ reformat: () => string; /** "If message is unset, the 'error' segment of the header will not be present and isMissing will be true on the error object." mentioned in @see {@link https://github.com/hapijs/boom#boomunauthorizedmessage-scheme-attributes} */ @@ -33,7 +32,7 @@ declare namespace Boom { /** https://github.com/hapijs/boom#createstatuscode-message-data and https://github.com/hapijs/boom/blob/v4.3.0/lib/index.js#L99 */ data: Data; } - +declare namespace Boom { interface Options { /** statusCode - the HTTP status code. Defaults to 500 if no status code is already set. */ statusCode?: number; @@ -49,7 +48,7 @@ declare namespace Boom { override?: boolean; } - export interface Output { + interface Output { /** statusCode - the HTTP status code (typically 4xx or 5xx). */ statusCode: number; /** headers - an object containing any HTTP headers where each key is a header name and value is the header content. (Limited value type to string https://github.com/hapijs/boom/issues/151 ) */ @@ -58,7 +57,7 @@ declare namespace Boom { payload: Payload; } - export interface Payload { + interface Payload { /** statusCode - the HTTP status code, derived from error.output.statusCode. */ statusCode: number; /** error - the HTTP status message (e.g. 'Bad Request', 'Internal Server Error') derived from statusCode. */ @@ -80,13 +79,13 @@ declare namespace Boom { * @param options optional additional options * @see {@link https://github.com/hapijs/boom#boomifyerror-options} */ - export function boomify(error: Error, options?: { statusCode?: number, message?: string, override?: boolean }): Boom; + function boomify(error: Error, options?: { statusCode?: number, message?: string, override?: boolean }): Boom; /** * Identifies whether an error is a Boom object. Same as calling instanceof Boom. * @param error the error object to identify. */ - export function isBoom(error: Error): error is Boom + function isBoom(error: Error): error is Boom // 4xx /** @@ -95,7 +94,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boombadrequestmessage-data} */ - export function badRequest(message?: string, data?: Data): Boom; + function badRequest(message?: string, data?: Data): Boom; /** * Returns a 401 Unauthorized error @@ -106,10 +105,10 @@ declare namespace Boom { * @param attributes an object of values to use while setting the 'WWW-Authenticate' header. This value is only used when scheme is a string, otherwise it is ignored. Every key/value pair will be included in the 'WWW-Authenticate' in the format of 'key="value"' as well as in the response payload under the attributes key. Alternatively value can be a string which is use to set the value of the scheme, for example setting the token value for negotiate header. If string is used message parameter must be null. null and undefined will be replaced with an empty string. If attributes is set, message will be used as the 'error' segment of the 'WWW-Authenticate' header. If message is unset, the 'error' segment of the header will not be present and isMissing will be true on the error object. * @see {@link https://github.com/hapijs/boom#boomunauthorizedmessage-scheme-attributes} */ - export function unauthorized(message?: string, scheme?: string, attributes?: {[index: string]: string}): Boom; - export function unauthorized(message?: string, scheme?: string[]): Boom; - export function unauthorized(message?: null, scheme?: string, attributes?: {[index: string]: string} | string): Boom; - export function unauthorized(message?: null, scheme?: string[]): Boom; + function unauthorized(message?: string, scheme?: string, attributes?: {[index: string]: string}): Boom; + function unauthorized(message?: string, scheme?: string[]): Boom; + function unauthorized(message?: null, scheme?: string, attributes?: {[index: string]: string} | string): Boom; + function unauthorized(message?: null, scheme?: string[]): Boom; /** * Returns a 402 Payment Required error @@ -117,7 +116,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boompaymentrequiredmessage-data} */ - export function paymentRequired(message?: string, data?: Data): Boom; + function paymentRequired(message?: string, data?: Data): Boom; /** * Returns a 403 Forbidden error @@ -125,7 +124,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomforbiddenmessage-data} */ - export function forbidden(message?: string, data?: Data): Boom; + function forbidden(message?: string, data?: Data): Boom; /** * Returns a 404 Not Found error @@ -133,7 +132,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomnotfoundmessage-data} */ - export function notFound(message?: string, data?: Data): Boom; + function notFound(message?: string, data?: Data): Boom; /** * Returns a 405 Method Not Allowed error @@ -142,7 +141,7 @@ declare namespace Boom { * @param allow optional string or array of strings (to be combined and separated by ', ') which is set to the 'Allow' header. * @see {@link https://github.com/hapijs/boom#boommethodnotallowedmessage-data-allow} */ - export function methodNotAllowed(message?: string, data?: Data, allow?: string | string[]): Boom; + function methodNotAllowed(message?: string, data?: Data, allow?: string | string[]): Boom; /** * Returns a 406 Not Acceptable error @@ -150,7 +149,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomnotacceptablemessage-data} */ - export function notAcceptable(message?: string, data?: Data): Boom; + function notAcceptable(message?: string, data?: Data): Boom; /** * Returns a 407 Proxy Authentication Required error @@ -158,7 +157,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomproxyauthrequiredmessage-data} */ - export function proxyAuthRequired(message?: string, data?: Data): Boom; + function proxyAuthRequired(message?: string, data?: Data): Boom; /** * Returns a 408 Request Time-out error @@ -166,7 +165,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomclienttimeoutmessage-data} */ - export function clientTimeout(message?: string, data?: Data): Boom; + function clientTimeout(message?: string, data?: Data): Boom; /** * Returns a 409 Conflict error @@ -174,7 +173,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomconflictmessage-data} */ - export function conflict(message?: string, data?: Data): Boom; + function conflict(message?: string, data?: Data): Boom; /** * Returns a 410 Gone error @@ -182,7 +181,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomresourcegonemessage-data} */ - export function resourceGone(message?: string, data?: Data): Boom; + function resourceGone(message?: string, data?: Data): Boom; /** * Returns a 411 Length Required error @@ -190,7 +189,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomlengthrequiredmessage-data} */ - export function lengthRequired(message?: string, data?: Data): Boom; + function lengthRequired(message?: string, data?: Data): Boom; /** * Returns a 412 Precondition Failed error @@ -198,7 +197,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boompreconditionfailedmessage-data} */ - export function preconditionFailed(message?: string, data?: Data): Boom; + function preconditionFailed(message?: string, data?: Data): Boom; /** * Returns a 413 Request Entity Too Large error @@ -206,7 +205,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomentitytoolargemessage-data} */ - export function entityTooLarge(message?: string, data?: Data): Boom; + function entityTooLarge(message?: string, data?: Data): Boom; /** * Returns a 414 Request-URI Too Large error @@ -214,7 +213,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomuritoolongmessage-data} */ - export function uriTooLong(message?: string, data?: Data): Boom; + function uriTooLong(message?: string, data?: Data): Boom; /** * Returns a 415 Unsupported Media Type error @@ -222,7 +221,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomunsupportedmediatypemessage-data} */ - export function unsupportedMediaType(message?: string, data?: Data): Boom; + function unsupportedMediaType(message?: string, data?: Data): Boom; /** * Returns a 416 Requested Range Not Satisfiable error @@ -230,7 +229,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomrangenotsatisfiablemessage-data} */ - export function rangeNotSatisfiable(message?: string, data?: Data): Boom; + function rangeNotSatisfiable(message?: string, data?: Data): Boom; /** * Returns a 417 Expectation Failed error @@ -238,7 +237,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomexpectationfailedmessage-data} */ - export function expectationFailed(message?: string, data?: Data): Boom; + function expectationFailed(message?: string, data?: Data): Boom; /** * Returns a 418 I'm a Teapot error @@ -246,7 +245,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomteapotmessage-data} */ - export function teapot(message?: string, data?: Data): Boom; + function teapot(message?: string, data?: Data): Boom; /** * Returns a 422 Unprocessable Entity error @@ -254,7 +253,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boombaddatamessage-data} */ - export function badData(message?: string, data?: Data): Boom; + function badData(message?: string, data?: Data): Boom; /** * Returns a 423 Locked error @@ -262,7 +261,15 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomlockedmessage-data} */ - export function locked(message?: string, data?: Data): Boom; + function locked(message?: string, data?: Data): Boom; + + /** + * Returns a 424 Failed Dependency error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomfaileddependencymessage-data} + */ + function failedDependency(message?: string, data?: Data): Boom; /** * Returns a 428 Precondition Required error @@ -270,7 +277,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boompreconditionrequiredmessage-data} */ - export function preconditionRequired(message?: string, data?: Data): Boom; + function preconditionRequired(message?: string, data?: Data): Boom; /** * Returns a 429 Too Many Requests error @@ -278,7 +285,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomtoomanyrequestsmessage-data} */ - export function tooManyRequests(message?: string, data?: Data): Boom; + function tooManyRequests(message?: string, data?: Data): Boom; /** * Returns a 451 Unavailable For Legal Reasons error @@ -286,7 +293,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomillegalmessage-data} */ - export function illegal(message?: string, data?: Data): Boom; + function illegal(message?: string, data?: Data): Boom; // 5xx /** @@ -296,7 +303,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boombadimplementationmessage-data---alias-internal} */ - export function badImplementation(message?: string, data?: Data): Boom; + function badImplementation(message?: string, data?: Data): Boom; /** * Returns a 500 Internal Server Error error @@ -305,7 +312,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boombadimplementationmessage-data---alias-internal} */ - export function internal(message?: string, data?: Data): Boom; + function internal(message?: string, data?: Data): Boom; /** * Returns a 501 Not Implemented error with your error message to the user @@ -313,7 +320,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomnotimplementedmessage-data} */ - export function notImplemented(message?: string, data?: Data): Boom; + function notImplemented(message?: string, data?: Data): Boom; /** * Returns a 502 Bad Gateway error with your error message to the user @@ -321,7 +328,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boombadgatewaymessage-data} */ - export function badGateway(message?: string, data?: Data): Boom; + function badGateway(message?: string, data?: Data): Boom; /** * Returns a 503 Service Unavailable error with your error message to the user @@ -329,7 +336,7 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomserverunavailablemessage-data} */ - export function serverUnavailable(message?: string, data?: Data): Boom; + function serverUnavailable(message?: string, data?: Data): Boom; /** * Returns a 504 Gateway Time-out error with your error message to the user @@ -337,5 +344,5 @@ declare namespace Boom { * @param data optional additional error data. * @see {@link https://github.com/hapijs/boom#boomgatewaytimeoutmessage-data} */ - export function gatewayTimeout(message?: string, data?: Data): Boom; + function gatewayTimeout(message?: string, data?: Data): Boom; } diff --git a/types/boom/v3/index.d.ts b/types/boom/v3/index.d.ts index adf433c9f4..d9c34be4fb 100644 --- a/types/boom/v3/index.d.ts +++ b/types/boom/v3/index.d.ts @@ -48,6 +48,7 @@ declare namespace Boom { export function expectationFailed(message?: string, data?: any): BoomError; export function badData(message?: string, data?: any): BoomError; export function locked(message?: string, data?: any): BoomError; + export function failedDependency(message?: string, data?: any): BoomError; export function preconditionRequired(message?: string, data?: any): BoomError; export function tooManyRequests(message?: string, data?: any): BoomError; export function illegal(message?: string, data?: any): BoomError; diff --git a/types/boom/v4/boom-tests.ts b/types/boom/v4/boom-tests.ts index 1819be25cb..33e86699e8 100644 --- a/types/boom/v4/boom-tests.ts +++ b/types/boom/v4/boom-tests.ts @@ -98,6 +98,10 @@ const lockedError = Boom.locked('message', {some: 'data'}); lockedError.data.some; const lockedError2: Boom.BoomError = Boom.locked('message'); +const failedDependencyError = Boom.failedDependency('message', {some: 'data'}); +failedDependencyError.data.some; +const failedDependencyError2: Boom.BoomError = Boom.failedDependency('message'); + const preconditionRequiredError = Boom.preconditionRequired('message', {some: 'data'}); preconditionRequiredError.data.some; const preconditionRequiredError2: Boom.BoomError = Boom.preconditionRequired('message'); diff --git a/types/boom/v4/index.d.ts b/types/boom/v4/index.d.ts index 76cd2d6b46..50d7a7d59a 100644 --- a/types/boom/v4/index.d.ts +++ b/types/boom/v4/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Igor Rogatty // AJP // Jinesh Shah +// Daniel Machado // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 @@ -258,6 +259,14 @@ declare namespace Boom { */ export function locked(message?: string, data?: Data): BoomError; + /** + * Returns a 424 Failed Dependency error + * @param message optional message. + * @param data optional additional error data. + * @see {@link https://github.com/hapijs/boom#boomfaileddependencymessage-data} + */ + export function failedDependency(message?: string, data?: Data): BoomError; + /** * Returns a 428 Precondition Required error * @param message optional message. diff --git a/types/bootstrap-datepicker/index.d.ts b/types/bootstrap-datepicker/index.d.ts index dfe358854e..b841fe07ab 100644 --- a/types/bootstrap-datepicker/index.d.ts +++ b/types/bootstrap-datepicker/index.d.ts @@ -10,7 +10,20 @@ type DatepickerEvents = "show"|"hide"|"clearDate"|"changeDate"|"changeMonth"|"ch type DatepickerViewModes = 0|"days"|1|"months"|2|"years"|3|"decades"|4|"centuries"|"millenium"; -type DatepickerOrientations = "auto"|"left top"|"left bottom"|"right top"|"right bottom"; +type DatepickerOrientations = + "auto" + | "left top" + | "left bottom" + | "right top" + | "right bottom" + | "top auto" + | "bottom auto" + | "auto left" + | "top left" + | "bottom left" + | "auto right" + | "top right" + | "bottom right" /** * All options that take a “Date” can handle a Date object; a String diff --git a/types/bootstrap/bootstrap-tests.ts b/types/bootstrap/bootstrap-tests.ts index 17d6e088cf..f0a353889c 100755 --- a/types/bootstrap/bootstrap-tests.ts +++ b/types/bootstrap/bootstrap-tests.ts @@ -2,8 +2,10 @@ // Alert // -------------------------------------------------------------------------------------- +// $ExpectType JQuery $("#alert").alert(); +// $ExpectType JQuery $("#alert").alert("close"); $("#alert").on("close.bs.alert", () => {}); @@ -12,31 +14,24 @@ $("#alert").on("close.bs.alert", () => {}); // Button // -------------------------------------------------------------------------------------- -// $("#button").button(); // must fail +// $ExpectError +$("#button").button(); +// $ExpectType JQuery $("#button").button("toggle"); // -------------------------------------------------------------------------------------- // Carousel // -------------------------------------------------------------------------------------- +// $ExpectType JQuery $("#carousel").carousel(); +// $ExpectType JQuery $("#carousel").carousel("pause"); $("#carousel").carousel(100); -$("#carousel").carousel({ - interval: 5000, - keyboard: true, - pause: "hover", - wrap: true, -}); - -$("#carousel").carousel({ - pause: false, -}); - $("#carousel").on("slide.bs.carousel", function(ev) { const that: HTMLElement = this; const from: number = ev.from; @@ -45,12 +40,59 @@ $("#carousel").on("slide.bs.carousel", function(ev) { const data: undefined = ev.data; }); +$("#carousel").carousel({ + interval: 5000, + keyboard: true, + slide: false, + pause: "hover", + wrap: true, +}); + +$("#carousel").carousel({ + slide: "prev", +}); + +$("#carousel").carousel({ + pause: false, +}); + +// -------------------------------------------------------------------------------------- +// Collapse +// -------------------------------------------------------------------------------------- + +// $ExpectType JQuery +$("#collapse").collapse(); + +// $ExpectType JQuery +$("#collapse").collapse("toggle"); + +$("#collapse").on("show.bs.collapse", () => {}); + +$("#collapse").collapse({ + parent: "#parent", + toggle: true, +}); + +$("#collapse").collapse({ + parent: document.body, +}); + +$("#collapse").collapse({ + parent: $("#parent"), +}); + +$("#collapse").collapse({ + toggle: false, +}); + // -------------------------------------------------------------------------------------- // Dropdown // -------------------------------------------------------------------------------------- +// $ExpectType JQuery $("#dropdown").dropdown(); +// $ExpectType JQuery $("#dropdown").dropdown("update"); $("#dropdown").on("hide.bs.dropdown", () => {}); @@ -59,6 +101,8 @@ $("#dropdown").dropdown({ offset: 10, flip: false, boundary: "window", + reference: "toggle", + display: "dynamic", }); $("#dropdown").dropdown({ @@ -66,7 +110,7 @@ $("#dropdown").dropdown({ }); $("#dropdown").dropdown({ - offset(offsets: BootstrapOffsetsExtend) { + offset(offsets: Bootstrap.OffsetsExtend) { if (!this.flip) return { popper: { left: 100 } }; return {}; @@ -77,12 +121,18 @@ $("#dropdown").dropdown({ boundary: document.body, }); +$("#dropdown").dropdown({ + reference: document.body, +}); + // -------------------------------------------------------------------------------------- // Modal // -------------------------------------------------------------------------------------- +// $ExpectType JQuery $("#modal").modal(); +// $ExpectType JQuery $("#modal").modal("show"); $("#modal").on("hide.bs.modal", () => {}); @@ -98,12 +148,90 @@ $("#modal").modal({ backdrop: "static", }); +// -------------------------------------------------------------------------------------- +// Popover +// -------------------------------------------------------------------------------------- + +// $ExpectType JQuery +$("#popover").popover(); + +// $ExpectType JQuery +$("#popover").popover("toggle"); + +$("#popover").on("show.bs.popover", () => {}); + +$("#popover").popover({}); + +$("#popover").popover({ + animation: false, + container: "#container", + delay: {show: 500, hide: 100}, + html: true, + placement: "auto", + selector: "[rel=\"popover\"]", + template: '
', + title: "Hello world", + trigger: "hover focus", + offset: 10, + fallbackPlacement: ["flip", "clockwise"], + boundary: "scrollParent", +}); + +$("#popover").popover({ + placement(this, popover, trigger) { + console.log(this.tip === popover); + console.log(this.element === trigger); + console.log(this.config.content); + return "left"; + }, +}); + +// -------------------------------------------------------------------------------------- +// Scrollspy +// -------------------------------------------------------------------------------------- + +// $ExpectType JQuery +$("#scrollspy").scrollspy(); + +// $ExpectType JQuery +$("#scrollspy").scrollspy("refresh"); + +$("#scrollspy").on("activate.bs.scrollspy", () => {}); + +$("#scrollspy").scrollspy({ + offset: 100, + target: "#navbar-example2", + method: "offset", +}); + +$("#scrollspy").scrollspy({ + target: document.getElementById("navbar-example2") as HTMLElement +}); + +$("#scrollspy").scrollspy({ + method: "position" +}); + +// -------------------------------------------------------------------------------------- +// Tab +// -------------------------------------------------------------------------------------- + +// $ExpectType JQuery +$("#someListItem").tab("show"); + +$("a[data-toggle=\"list\"]").on("shown.bs.tab", (e) => { + e.target; // newly activated tab + e.relatedTarget; // previous active tab +}); + // -------------------------------------------------------------------------------------- // Tooltip // -------------------------------------------------------------------------------------- +// $ExpectType JQuery $("#tooltip").tooltip(); +// $ExpectType JQuery $("#tooltip").tooltip("show"); $("#tooltip").on("hide.bs.tooltip", () => {}); @@ -149,6 +277,14 @@ $("#tooltip").tooltip({ }, }); +$("#tooltip").tooltip({ + placement(this, tooltip, trigger) { + // $ExpectError + console.log(this.config.content); // only for PopoverOption, not TooltipOption + return "left"; + }, +}); + $("#tooltip").tooltip({ selector: "[rel=\"tooltip\"]", }); @@ -176,7 +312,7 @@ $("#tooltip").tooltip({ }); $("#tooltip").tooltip({ - trigger: "focus hover", + trigger: "hover focus", }); $("#tooltip").tooltip({ diff --git a/types/bootstrap/index.d.ts b/types/bootstrap/index.d.ts index c158bbd807..2f43555a73 100755 --- a/types/bootstrap/index.d.ts +++ b/types/bootstrap/index.d.ts @@ -1,48 +1,46 @@ -// Type definitions for Bootstrap 4.0 +// Type definitions for Bootstrap 4.1 // Project: https://github.com/twbs/bootstrap/ // Definitions by: denisname // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -// TODO: collapse, tab (list-group, navs), popovers, scrollspy +/// -/// +import * as Popper from "popper.js"; + +export as namespace Bootstrap; // -------------------------------------------------------------------------- // Some Types and Interfaces // -------------------------------------------------------------------------- -type BootstrapPlacement = "auto" | "top" | "bottom" | "left" | "right"; -type PopperBehavior = "flip" | "clockwise" | "counterclockwise"; +export type Placement = "auto" | "top" | "bottom" | "left" | "right"; -interface BootstrapDelay { +export type Trigger = "click" | "hover" | "focus" | "manual" | + "click hover" | "click focus" | "hover focus" | + "click hover focus"; + +export interface Delay { show: number; hide: number; } -interface BootstrapTooltipInstance { - config: BootstrapTooltipOption; +export interface TooltipInstance { + config: T; element: Element; tip: HTMLElement; } -interface BootstrapOffsetExtend { - top?: number; - left?: number; - width?: number; - height?: number; -} - -interface BootstrapOffsetsExtend { - popper?: BootstrapOffsetExtend; - reference?: BootstrapOffsetExtend; +export interface OffsetsExtend { + popper?: Partial; + reference?: Partial; } // -------------------------------------------------------------------------------------- // Options Interfaces // -------------------------------------------------------------------------------------- -interface BootstrapCarouselOption { +export interface CarouselOption { /** * The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle. * @@ -57,6 +55,14 @@ interface BootstrapCarouselOption { */ keyboard?: boolean; + /** + * Use to easily control the position of the carousel. It accepts the keywords prev or next, which alters the slide position + * relative to its current position. Alternatively, use `data-slide-to` to pass a raw slide index to the carousel. + * + * @default false + */ + slide?: "next" | "prev" | false; + /** * If set to "hover", pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave. * If set to false, hovering over the carousel won't pause it. @@ -75,14 +81,32 @@ interface BootstrapCarouselOption { wrap?: boolean; } -interface BootstrapDropdownOption { +export interface CollapseOption { + /** + * If parent is provided, then all collapsible elements under the specified parent will be closed when + * this collapsible item is shown. (similar to traditional accordion behavior - this is dependent on the card class). + * The attribute has to be set on the target collapsible area. + * + * @default "" + */ + parent?: string | JQuery | Element; + + /** + * Toggles the collapsible element on invocation. + * + * @default true + */ + toggle?: boolean; +} + +export interface DropdownOption { /** * Offset of the dropdown relative to its target. * For more information refer to Popper.js's offset docs. * * @default 0 */ - offset?: number | string | ((this: BootstrapDropdownOption, offset: BootstrapOffsetsExtend) => BootstrapOffsetsExtend); + offset?: number | string | ((this: DropdownOption, offset: OffsetsExtend) => OffsetsExtend); /** * Allow Dropdown to flip in case of an overlapping on the reference element. @@ -99,10 +123,25 @@ interface BootstrapDropdownOption { * * @default "scrollParent" */ - boundary?: "viewport" | "window" | "scrollParent" | HTMLElement; + boundary?: Popper.Boundary | HTMLElement; + + /** + * Reference element of the dropdown menu. Accepts the values of 'toggle', 'parent', or an HTMLElement reference. + * For more information refer to Popper.js's referenceObject docs. + * + * @default "toggle" + */ + reference?: "toggle" | "parent" | HTMLElement; + + /** + * By default, we use Popper.js for dynamic positioning. Disable this with 'static'. + * + * @default "dynamic" + */ + display?: "dynamic" | "static"; } -interface BootstrapModalOption { +export interface ModalOption { /** * Includes a modal-backdrop element. * Alternatively, specify static for a backdrop which doesn't close the modal on click. @@ -133,36 +172,71 @@ interface BootstrapModalOption { show?: boolean; } -interface BootstrapTooltipOption { +export interface PopoverOption extends TooltipOption { /** - * Apply a CSS fade transition to the tooltip. + * Default content value if data-content attribute isn't present. + * If a function is given, it will be called with its this reference + * set to the element that the popover is attached to. + * + * @default "" + */ + content?: string | Element | ((this: Element) => string | Element); +} + +export interface ScrollspyOption { + /** + * TODO: https://github.com/twbs/bootstrap/issues/25799 + * + * @default "auto" + */ + method?: "auto" | "offset" | "position"; + + /** + * Pixels to offset from top when calculating position of scroll. + * + * @default 10 + */ + offset?: number; + + /** + * A selector of the parent element or the parent element itself + * of any Bootstrap `.nav` or `.list-group` component. + * + * @default "" + */ + target?: string | Element; +} + +export interface TooltipOption { + /** + * Apply a CSS fade transition to the tooltip or popover. * * @default true */ animation?: boolean; /** - * Appends the tooltip to a specific element. Example: `container: 'body'`. - * This option is particularly useful in that it allows you to position the tooltip + * Appends the tooltip or popover to a specific element. Example: `container: 'body'`. + * This option is particularly useful in that it allows you to position the tooltip or popover * in the flow of the document near the triggering element - which will prevent - * the tooltip from floating away from the triggering element during a window resize. + * it from floating away from the triggering element during a window resize. * * @default false */ container?: string | Element | false; /** - * Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type. + * Delay showing and hiding the tooltip or popover (ms) - does not apply to manual trigger type. * If a number is supplied, delay is applied to both hide/show. * Object structure is: `delay: { "show": 500, "hide": 100 }`. * * @default 0 */ - delay?: number | BootstrapDelay; + delay?: number | Delay; /** - * Allow HTML in the tooltip. - * If true, HTML tags in the tooltip's title will be rendered in the tooltip. + * Allow HTML in the tooltip or popover. + * If true, HTML tags will be rendered in the tooltip or popover. * If false, jQuery's text method will be used to insert content into the DOM. * Use text if you're worried about XSS attacks. * @@ -171,18 +245,18 @@ interface BootstrapTooltipOption { html?: boolean; /** - * How to position the tooltip - auto | top | bottom | left | right. - * When auto is specified, it will dynamically reorient the tooltip. + * How to position the tooltip or popover - auto | top | bottom | left | right. + * When auto is specified, it will dynamically reorient the tooltip or popover. * When a function is used to determine the placement, it is called with - * the tooltip DOM node as its first argument and the triggering element DOM node as its second. - * The this context is set to the tooltip instance. + * the tooltip or popover DOM node as its first argument and the triggering element DOM node as its second. + * The this context is set to the tooltip or popover instance. * - * @default "top" + * @default tooltip: "top", popover: "right" */ - placement?: BootstrapPlacement | ((this: BootstrapTooltipInstance, tooltip: HTMLElement, trigger: Element) => BootstrapPlacement); + placement?: Placement | ((this: TooltipInstance, node: HTMLElement, trigger: Element) => Placement); /** - * If a selector is provided, tooltip objects will be delegated to the specified targets. + * If a selector is provided, tooltip or popover objects will be delegated to the specified targets. * In practice, this is used to enable dynamic HTML content to have popovers added. * * @default false @@ -190,41 +264,40 @@ interface BootstrapTooltipOption { selector?: string | false; /** - * Base HTML to use when creating the tooltip. The tooltip's title will be injected into - * the `.tooltip-inner`. The `.arrow` will become the tooltip's arrow. - * The outermost wrapper element should have the `.tooltip` class and `role="tooltip"`. + * Base HTML to use when creating the tooltip or popover. The tooltip's (resp., popover's) title will be injected into + * the `.tooltip-inner` (resp., `.popover-header`). The `.arrow` will become the tooltip's (resp., popover's) arrow. + * The outermost wrapper element should have the `.tooltip` (resp., .popover) class and `role="tooltip"`. * * @default '' + * @default '' */ template?: string; /** * Default title value if title attribute isn't present. * If a function is given, it will be called with its this reference set to the element - * that the tooltip is attached to. + * that the tooltip or popover is attached to. * * @default "" */ - title?: string | Element | ((this: Element) => string); + title?: string | Element | ((this: Element) => string | Element); /** - * How tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space. - * 'manual' indicates that the tooltip will be triggered programmatically via the .tooltip('show'), .tooltip('hide') and - * .tooltip('toggle') methods; this value cannot be combined with any other trigger. - * 'hover' on its own will result in tooltips that cannot be triggered via the keyboard, and should only be used if - * alternative methods for conveying the same information for keyboard users is present. + * How tooltip or popover is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space. + * 'manual' indicates that the tooltip will be triggered programmatically; this value cannot be combined with any other trigger. + * 'hover' should only be used if alternative methods for conveying the same information for keyboard users is present. * - * @default "hover focus" + * @default tooltip: "hover focus", popover: "click" */ - trigger?: string; + trigger?: Trigger; /** - * Offset of the tooltip relative to its target. + * Offset of the tooltip or popover relative to its target. * For more information refer to Popper.js's offset docs. * * @default 0 */ - offset?: number | string; + offset?: number | string; /** * Allow to specify which position Popper will use on fallback. @@ -232,24 +305,24 @@ interface BootstrapTooltipOption { * * @default "flip" */ - fallbackPlacement?: PopperBehavior | PopperBehavior[]; + fallbackPlacement?: Popper.Behavior | ReadonlyArray; /** - * Overflow constraint boundary of the tooltip. + * Overflow constraint boundary of the tooltip or popover. * Accepts the values of 'viewport', 'window', 'scrollParent', * or an HTMLElement reference (JavaScript only). * For more information refer to Popper.js's preventOverflow docs. * * @default "scrollParent" */ - boundary?: "viewport" | "window" | "scrollParent" | HTMLElement; + boundary?: Popper.Boundary | HTMLElement; } // -------------------------------------------------------------------------------------- // Events // -------------------------------------------------------------------------------------- -interface BootstrapCarouselEventHandler extends JQuery.Event { +export interface CarouselEventHandler extends JQuery.Event { /** * The direction in which the carousel is sliding. */ @@ -266,34 +339,53 @@ interface BootstrapCarouselEventHandler extends JQuery.Event extends Iterable { - alert(action?: "close" | "dispose"): this; +declare global { + interface JQuery extends Iterable { + alert(action?: "close" | "dispose"): this; - button(action: "toggle" | "dispose"): this; + button(action: "toggle" | "dispose"): this; - carousel(action: "cycle" | "pause" | number | "prev" | "next" | "dispose"): this; - carousel(options?: BootstrapCarouselOption): this; + carousel(action: "cycle" | "pause" | number | "prev" | "next" | "dispose"): this; + carousel(options?: CarouselOption): this; - dropdown(action: "toggle" | "update" | "dispose"): this; - dropdown(options?: BootstrapDropdownOption): this; + collapse(action: "toggle" | "show" | "hide" | "dispose"): this; + collapse(options?: CollapseOption): this; - modal(action: "toggle" | "show" | "hide" | "handleUpdate" | "dispose"): this; - modal(options?: BootstrapModalOption): this; + dropdown(action: "toggle" | "update" | "dispose"): this; + dropdown(options?: DropdownOption): this; - tooltip(action: "show" | "hide" | "toggle" | "dispose" | "enable" | "disable" | "toggleEnabled" | "update"): this; - tooltip(options?: BootstrapTooltipOption): this; + modal(action: "toggle" | "show" | "hide" | "handleUpdate" | "dispose"): this; + modal(options?: ModalOption): this; - on(events: BootstrapCarouselEvent, handler: JQuery.EventHandlerBase>): this; - on(events: BootstrapAlertEvent | BootstrapDropdownEvent | BootstrapModalEvent | BootstrapTooltipEvent, - handler: JQuery.EventHandler): this; + popover(action: "show" | "hide" | "toggle" | "dispose" | "enable" | "disable" | "toggleEnabled" | "update"): this; + popover(options?: PopoverOption): this; + + scrollspy(action: "refresh" | "dispose"): this; + scrollspy(options?: ScrollspyOption): this; + + tab(action: "show" | "dispose"): this; + + tooltip(action: "show" | "hide" | "toggle" | "dispose" | "enable" | "disable" | "toggleEnabled" | "update"): this; + tooltip(options?: TooltipOption): this; + + on(events: CarouselEvent, handler: JQuery.EventHandlerBase>): this; + on(events: + AlertEvent | CollapseEvent | DropdownEvent | ModalEvent | + PopoverEvent | ScrollspyEvent | TapEvent | TooltipEvent, + handler: JQuery.EventHandler): this; + } } diff --git a/types/bootstrap/package.json b/types/bootstrap/package.json new file mode 100644 index 0000000000..af84860ef1 --- /dev/null +++ b/types/bootstrap/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "popper.js": "^1.14.1" + } +} \ No newline at end of file diff --git a/types/bootstrap3-dialog/bootstrap3-dialog-tests.ts b/types/bootstrap3-dialog/bootstrap3-dialog-tests.ts new file mode 100644 index 0000000000..5434971f41 --- /dev/null +++ b/types/bootstrap3-dialog/bootstrap3-dialog-tests.ts @@ -0,0 +1,123 @@ +function BootstrapDialogOptionsTests() { + const options1: BootstrapDialog.DialogOptions = { }; + const options2: BootstrapDialog.DialogOptions = { + animate: false, + buttons: [{id: "btn-1"}], + callback: (result: boolean) => { }, + closable: false, + closeByBackdrop: false, + closeByKeyboard: false, + data: {name: "value"}, + draggable: false, + description: "", + buttonLabel: "", + message: "", + onhide: (dialog: BootstrapDialog.DialogContext) => { }, + onhidden: (dialog: BootstrapDialog.DialogContext) => { }, + onshow: (dialog: BootstrapDialog.DialogContext) => { }, + onshown: (dialog: BootstrapDialog.DialogContext) => { }, + size: BootstrapDialog.SIZE_LARGE, + title: "", + type: BootstrapDialog.TYPE_DEFAULT, + btnCancelLabel: "", + btnOKClass: "", + btnOKLabel: "", + cssClass: "", + spinicon: "", + autodestroy: false, + nl2br: false, + }; + options2.onhide = (dialog: BootstrapDialog.DialogContext): void => { }; + options2.onhide = (dialog: BootstrapDialog.DialogContext): boolean => false; + options2.message = ""; + options2.message = $("#element"); + options2.message = (dialog?: BootstrapDialog.DialogContext): string => { + return ""; + }; + options2.message = (dialog?: BootstrapDialog.DialogContext): JQuery => { + return $("#element"); + }; + // BootstrapDialog.SIZE_xxx constants. + options2.size = BootstrapDialog.SIZE_LARGE; + options2.size = BootstrapDialog.SIZE_NORMAL; + options2.size = BootstrapDialog.SIZE_SMALL; + options2.size = BootstrapDialog.SIZE_WIDE; + options2.title = ""; + options2.title = $("#element"); + // BootstrapDialog.TYPE_xxx constants. + options2.type = BootstrapDialog.TYPE_DANGER; + options2.type = BootstrapDialog.TYPE_DEFAULT; + options2.type = BootstrapDialog.TYPE_INFO; + options2.type = BootstrapDialog.TYPE_PRIMARY; + options2.type = BootstrapDialog.TYPE_SUCCESS; + options2.type = BootstrapDialog.TYPE_WARNING; +} + +function BootstrapDialogStaticTests() { + BootstrapDialog.alert(""); + BootstrapDialog.alert("", () => { }); + BootstrapDialog.confirm(""); + BootstrapDialog.confirm("", (result: boolean) => { }); + const instance1: BootstrapDialog.DialogInstance = BootstrapDialog.show({}); + // BUTTON_SIZES + BootstrapDialog.BUTTON_SIZES[BootstrapDialog.SIZE_NORMAL] = ''; + const buttonSize: string = BootstrapDialog.BUTTON_SIZES[BootstrapDialog.SIZE_NORMAL]; + // Buttons order + BootstrapDialog.BUTTONS_ORDER_CANCEL_OK = ""; + BootstrapDialog.BUTTONS_ORDER_OK_CANCEL = ""; + // DEFAULT_TEXTS + BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_DEFAULT] = 'Information'; + const defaultText: string = BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_DEFAULT]; + // Miscellaneous + BootstrapDialog.ICON_SPINNER = ""; + BootstrapDialog.NAMESPACE = ""; +} + +function BootstrapDialogContextTests() { + const dialog1: BootstrapDialog.DialogContext = BootstrapDialog({}); + dialog1.close(); + dialog1.enableButtons(false); + const button: JQuery = dialog1.getButton(""); + const value: any = dialog1.getData("name"); + const modal: JQuery = dialog1.getModal(); + const content: JQuery = dialog1.getModalContent(); + const dialog: JQuery = dialog1.getModalDialog(); + const header: JQuery = dialog1.getModalHeader(); + const footer: JQuery = dialog1.getModalFooter(); + const body: JQuery = dialog1.getModalBody(); + const title: string = dialog1.getTitle(); + dialog1.open(); + dialog1.realize(); + dialog1.setClosable(false); + dialog1.setData("name", "value"); + dialog1.setData("", null); + dialog1.setMessage(""); + dialog1.setTitle(""); + dialog1.setType(BootstrapDialog.TYPE_DEFAULT); +} + +function BootstrapDialogInstanceTests() { + const instance1: BootstrapDialog.DialogInstance = BootstrapDialog.show({}); + const modal: JQuery = instance1.$modal; + const modalBody: JQuery = instance1.$modalBody; + const modalContent: JQuery = instance1.$modalContent; + const modalDialog: JQuery = instance1.$modalDialog; + const modalHeader: JQuery = instance1.$modalHeader; + const modalFooter: JQuery = instance1.$modalFooter; + const options: BootstrapDialog.DialogOptions = instance1.options; + const opened: boolean = instance1.opened; +} + +function BootstrapDialogButtonTests() { + const button1: BootstrapDialog.DialogButton = { }; + const button2: BootstrapDialog.DialogButton = { + id: "", + label: "", + hotkey: 0, + icon: "", + cssClass: "", + data: {name: "value"}, + autospin: false, + action: (dialog: BootstrapDialog.DialogContext) => { }, + }; +} diff --git a/types/bootstrap3-dialog/index.d.ts b/types/bootstrap3-dialog/index.d.ts new file mode 100644 index 0000000000..d9612167f8 --- /dev/null +++ b/types/bootstrap3-dialog/index.d.ts @@ -0,0 +1,197 @@ +// Type definitions for bootstrap3-dialog 1.35 +// Project: http://nakupanda.github.io/bootstrap3-dialog +// Definitions by: Dante +// Craig Boland +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +declare namespace BootstrapDialog { + interface DialogStatic { + BUTTON_SIZES: any; + BUTTONS_ORDER_CANCEL_OK: string; + BUTTONS_ORDER_OK_CANCEL: string; + DEFAULT_TEXTS: any; /** For text localization. */ + ICON_SPINNER: string; + NAMESPACE: string; + + SIZE_NORMAL: string; + SIZE_SMALL: string; + SIZE_WIDE: string; + SIZE_LARGE: string; + + TYPE_DEFAULT: string; + TYPE_INFO: string; + TYPE_PRIMARY: string; + TYPE_SUCCESS: string; + TYPE_WARNING: string; + TYPE_DANGER: string; + + (options: DialogOptions): DialogContext; + alert(message: string, closeCallback?: () => void): void; + confirm(message: string, closeCallback?: (result: boolean) => void): void; + show(options: DialogOptions): DialogInstance; + } + + interface DialogOptions { + /** Dialog header type. See BootstrapDialog.TYPE_xxx constants. */ + type?: string; + /** Text size. See BootstrapDialog.SIZE_xxx constants. By default - SIZE_NORMAL */ + size?: string; + /** Dialog title. Either string or JQuery element. */ + title?: string | JQuery; + /** Dialog message. Either string, JQuery element, or function that returns either string or JQuery element. */ + message?: string | JQuery | ((dialog?: DialogContext) => string | JQuery); + /** + * When set to true, you can close the dialog by: + * - Clicking the close icon in dialog header. + * - Clicking outside the dialog. + * - ESC key. + * + * FALSE by default. + */ + closable?: boolean; + /** Whether dialog will close by clicking outside of it. */ + closeByBackdrop?: boolean; + /** Whether dialog will close by ESC. */ + closeByKeyboard?: boolean; + /** Whether fade-out background while showing the dialog. TRUE by default. */ + animate?: boolean; + /** Data to be bound to the dialog. */ + data?: any; + /** Whether dialog could be dragged by its header. Cursor could be changed (see doc)! FALSE by default. */ + draggable?: boolean; + /** + * If provided, 'aria-describedby' attribute will be added to the dialog with the description string as its value. This can improve accessibility, as the description can be read by screen + * readers. + */ + description?: string; + /** Default button title. OK by default. */ + buttonLabel?: string; + buttons?: DialogButton[]; + /** Result will be true if button was click, while it will be false if users close the dialog directly. */ + callback?: (result: boolean) => void; + /** If provided, it will be invoked when the dialog is popping up. */ + onshow?(dialog?: DialogContext): void; + /** If provided, it will be invoked when the dialog is popped up. */ + onshown?(dialog?: DialogContext): void; + /** + * If provided, it will be invoked when the dialog is popping down. + * Return FALSE to don`t close the dialog. Don`t return anything by default. + */ + onhide?(dialog?: DialogContext): any; + /** If provided, it will be invoked when the dialog is popped down. */ + onhidden?(dialog?: DialogContext): void; + + /** 'Cancel' by default. */ + btnCancelLabel?: string; + /** 'OK' by default. */ + btnOKLabel?: string; + /** If you didn't specify it, dialog type will be used. */ + btnOKClass?: string; + /** Additional css classes that will be added to your dialog. */ + cssClass?: string; + /** Icon class name, for example 'glyphicon glyphicon-check'. */ + spinicon?: string; + /** + * When it's true, all modal stuff will be removed from the DOM tree after the dialog is popped down, + * set it to false if you need your dialog (same instance) pups up and down again and again. + * Default is true. + */ + autodestroy?: boolean; + /** + * Automatically convert line breaking character to
if it's set to true, + * everything keeps original if it's false. + */ + nl2br?: boolean; + } + + interface DialogInstance { + $modal: JQuery; + $modalBody: JQuery; + $modalContent: JQuery; + $modalDialog: JQuery; + $modalHeader: JQuery; + $modalFooter: JQuery; + options: DialogOptions; + opened: boolean; + } + + interface DialogButton { + /** If id is set, you can use dialogInstance.getButton(id) to get the button later. */ + id?: string; + label?: string; + /** Hotkey char code */ + hotkey?: number; + /** If set, the specified icon will be added to the button. */ + icon?: string; + /** Additional css class to be added to the button. */ + cssClass?: string; + /** Object containing data attributes to be added to the button. */ + data?: any; + /** If it's true, after clicked the button a spinning icon appears. */ + autospin?: boolean; + /** + * If provided, the callback will be invoked after the button is clicked, and the dialog instance + * will be passed to the callback function. + */ + action?: (dialog: DialogContext) => void; + } + + interface DialogButtonInstance { + toggleEnable(enabled: boolean): void; + /** Equals to $button.toggleEnable(true); */ + enable(): void; + /** Equals to $button.toggleEnable(false); */ + disable(): void; + toggleSpin(spin: boolean): void; + /** Equals to $button.toggleSpin(true); */ + spin(): void; + /** Equals to $button.toggleSpin(false); */ + stopSpin(): void; + } + + interface DialogContext { + /** Open the dialog. Usage: dialogInstance.open() */ + open(): void; + /** Close the dialog. Usage: dialogInstance.close() */ + close(): void; + /** + * Calling dialog.open() will automatically get this method called first, but if you want to do something on your dialog + * before it's shown, you can manually call dialog.realize() before calling dialog.open(). + */ + realize(): void; + getTitle(): string; + setTitle(title: string): void; + setMessage(message: string): void; + /** Bind data entry to dialog instance, value can be any types that javascript supports. */ + setData(dataName: string, value: any): void; + /** Get data entry according to the given key, returns null if no data entry found. */ + getData(dataName: string): any; + getButton(buttonId: string): JQuery; + /** + * When set to true (default), dialog can be closed by clicking close icon in dialog header, + * or by clicking outside the dialog, or, ESC key is pressed. + */ + setClosable(closable: boolean): void; + /** See BootstrapDialog.TYPE_xxx constants. */ + setType(dialogType: string): void; + /** Disable all buttons in dialog footer when it's false, enable all when it's true. */ + enableButtons(enable: boolean): void; + /** Return the raw modal, equivalent to $('') */ + getModal(): JQuery; + /** Return the raw modal content. */ + getModalContent(): JQuery; + /** Return the raw modal dialog. */ + getModalDialog(): JQuery; + /** Return the raw modal header. */ + getModalHeader(): JQuery; + /** Return the raw modal footer. */ + getModalFooter(): JQuery; + /** Return the raw modal body. */ + getModalBody(): JQuery; + } +} + +declare const BootstrapDialog: BootstrapDialog.DialogStatic; diff --git a/types/bootstrap3-dialog/tsconfig.json b/types/bootstrap3-dialog/tsconfig.json new file mode 100644 index 0000000000..cdf93479b7 --- /dev/null +++ b/types/bootstrap3-dialog/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "bootstrap3-dialog-tests.ts" + ] +} diff --git a/types/bootstrap3-dialog/tslint.json b/types/bootstrap3-dialog/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/bootstrap3-dialog/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/braft-editor/braft-editor-tests.tsx b/types/braft-editor/braft-editor-tests.tsx index 999850acaa..48513f6de4 100644 --- a/types/braft-editor/braft-editor-tests.tsx +++ b/types/braft-editor/braft-editor-tests.tsx @@ -12,7 +12,7 @@ class BraftEditorTest extends React.Component { height: 500, initialContent: this.state.content, onChange: this.handleChange, - onHTMLChange: this.handleHTMLChange + onHTMLChange: this.handleHTMLChange, }; return (
diff --git a/types/braft-editor/index.d.ts b/types/braft-editor/index.d.ts index 505403d2f3..1ad5f728ad 100644 --- a/types/braft-editor/index.d.ts +++ b/types/braft-editor/index.d.ts @@ -15,8 +15,8 @@ declare namespace BraftEditor { } interface editorProps { editorState?: any; - contentFormat?: RawDraftContentState; - initialContent?: RawDraftContentState | null; + contentFormat?: 'raw' | 'html'; + initialContent?: string | null; onChange?: (content: RawDraftContentState) => void; onRawChange?: (content: RawDraftContentState) => void; onHTMLChange?: (content: string) => void; diff --git a/types/browser-sync/browser-sync-tests.ts b/types/browser-sync/browser-sync-tests.ts index bcd829367a..613f8aee25 100644 --- a/types/browser-sync/browser-sync-tests.ts +++ b/types/browser-sync/browser-sync-tests.ts @@ -8,11 +8,98 @@ import browserSync = require("browser-sync"); })(); browserSync({ - server: { - baseDir: "./" + ui: true +}); + +browserSync({ + ui: { + port: 9000, + weinre: { + port: 9001 + } } }); +browserSync({ + files: "app/css/style.css" +}); + +browserSync({ + files: [ + "app/css/style.css", + "app/js/*.js" + ] +}); + +browserSync({ + files: [ + "app/css/style.css", + "!app/js/*.js" + ] +}); + +browserSync({ + files: [ + "wp-content/themes/**/*.css", + { + match: ["wp-content/themes/**/*.css"], + fn: function (event, file) { + /** Custom event handler **/ + } + } + ] +}); + +browserSync({ + watchEvents: [ + "change", + "add", + "unlink", + "addDir", + "unlinkDir" + ] +}); + +browserSync({ + watch: true +}); + +browserSync({ + ignore: [ + "app/js/*.js" + ] +}); + +browserSync({ + single: true +}); + +browserSync({ + watchOptions: { + ignoreInitial: true, + ignored: '*.txt' + }, + files: ['./app'] +}); + +browserSync({ + files: [ + { + match: ["wp-content/themes/**/*.php"], + fn: function (event, file) { + /** Custom event handler **/ + }, + options: { + ignored: '*.txt' + } + } + ] +}); + +browserSync({ + server: "app" +}); + // multiple base directory browserSync({ server: { @@ -20,6 +107,39 @@ browserSync({ } }); +browserSync({ + server: true +}); + +browserSync({ + server: { + baseDir: "./" + } +}); + +browserSync({ + server: { + baseDir: "./", + index: "index.htm" + } +}); + +browserSync({ + server: { + baseDir: "./", + directory: true + } +}); + +browserSync({ + server: { + baseDir: "app", + serveStaticOptions: { + extensions: ["html"] + } + } +}); + browserSync({ proxy: "yourlocal.dev" }); @@ -27,8 +147,8 @@ browserSync({ browserSync({ proxy: { target: "http://yourlocal.dev", - proxyReq: function(proxyReq) { - console.log(proxyReq); + proxyReq: function (proxyReq) { + console.log(proxyReq); } } }); @@ -37,7 +157,7 @@ browserSync({ proxy: { target: "http://yourlocal.dev", proxyReq: [ - function(proxyReq) { + function (proxyReq) { console.log(proxyReq); } ] @@ -47,7 +167,7 @@ browserSync({ browserSync({ proxy: { target: "http://yourlocal.dev", - proxyRes: function(proxyRes, req, res) { + proxyRes: function (proxyRes, req, res) { console.log(proxyRes); } } @@ -57,13 +177,137 @@ browserSync({ proxy: { target: "http://yourlocal.dev", proxyRes: [ - function(proxyRes, req, res) { + function (proxyRes, req, res) { console.log(proxyRes); } ] } }); +browserSync({ + proxy: "https://yourlocal.dev", + https: { + key: "./path/to/the/key/file.key", + cert: "./path/to/the/cert/file.cer" + } +}); + +browserSync({ + port: 3000 +}); + +browserSync({ + proxy: "http://yourlocal.dev", + serveStatic: ['.', './app/css'] +}); + +browserSync({ + proxy: "http://yourlocal.dev", + serveStatic: [{ + route: '/assets', + dir: 'tmp' + }] +}); + +browserSync({ + proxy: "http://yourlocal.dev", + serveStatic: [{ + route: ['/assets', '/content'], + dir: 'tmp' + }] +}); + +browserSync({ + proxy: "http://yourlocal.dev", + serveStatic: [{ + route: '/assets', + dir: ['./tmp', './app'] + }] +}); + +browserSync({ + serveStatic: ['.', './app', './temp'], + serveStaticOptions: { + extensions: ['html'] // pretty urls + } +}); + +browserSync({ + https: true +}); + +browserSync({ + server: "./app", + https: true +}); + +browserSync({ + server: "./app", + https: { + key: "./path/to/the/key/file.key", + cert: "./path/to/the/cert/file.cer" + } +}); + +browserSync({ + httpModule: "http2" +}); + +browserSync({ + ghostMode: { + clicks: true, + scroll: true, + forms: { + inputs: true, + submit: true, + toggles: true + } + }, + proxy: "https://yourlocal.dev" +}); + +/** + * Not testing a bunch because they are either only string or boolean types. + * ....Also just got lazy and tired of writing the simple ones. + */ + +browserSync({ + snippetOptions: { + + // Ignore all HTML files within the templates folder + blacklist: [ + "templates/*.html" + ], + // Provide a custom Regex for inserting the snippet. + rule: { + match: /<\/body>/i, + fn: function (snippet, match) { + return snippet + match; + } + } + } +}); + +browserSync({ + rewriteRules: [ + { + match: /Browsersync/g, + fn: function (req, res, match) { + return 'kittenz'; + } + } + ] +}); + +browserSync({ + rewriteRules: [ + { + match: /(cats|kitten[sz]) are mediocre/g, + replace: "$1 are excellent" + } + ] +}); + var config = { server: { baseDir: "./" @@ -84,13 +328,13 @@ browserSync(config, function (err, bs) { browserSync.reload(); // single file -browserSync.reload( "styles.css" ); +browserSync.reload("styles.css"); // multiple files -browserSync.reload( ["styles.css", "ie.css"] ); +browserSync.reload(["styles.css", "ie.css"]); // streams support -browserSync.reload( { stream: true } ); +browserSync.reload({ stream: true }); browserSync.notify("Compiling, please wait!"); @@ -143,19 +387,19 @@ browser.exit(); browser.stream(); // -- "once" option. -browser.stream({once: true}); +browser.stream({ once: true }); // -- "match" option (string). -browser.stream({match: "**/*.js"}); +browser.stream({ match: "**/*.js" }); // -- "match" option (RegExp). -browser.stream({match: /\.js$/}); +browser.stream({ match: /\.js$/ }); // -- "match" option (function). -browser.stream({match: (testString) => true}); +browser.stream({ match: (testString) => true }); // -- "match" option (array). -browser.stream({match: ["**/*.js", /\.js$/, (testString) => true]}); +browser.stream({ match: ["**/*.js", /\.js$/, (testString) => true] }); // -- Both options. -browser.stream({once: true, match: ["**/*.js", /\.js$/, (testString) => true]}); +browser.stream({ once: true, match: ["**/*.js", /\.js$/, (testString) => true] }); diff --git a/types/browser-sync/index.d.ts b/types/browser-sync/index.d.ts index b22054c367..3b97fc8616 100644 --- a/types/browser-sync/index.d.ts +++ b/types/browser-sync/index.d.ts @@ -1,16 +1,21 @@ // Type definitions for browser-sync // Project: http://www.browsersync.io/ -// Definitions by: Asana , Joe Skeen +// Definitions by: Asana , +// Joe Skeen // Thomas "Thasmo" Deinhamer +// Kiyotoshi Ichikawa // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// /// +/// import * as chokidar from "chokidar"; import * as fs from "fs"; import * as http from "http"; import * as mm from "micromatch"; +import { ServeStaticOptions } from "serve-static"; declare namespace browserSync { interface Options { @@ -20,7 +25,7 @@ declare namespace browserSync { * * port - Default: 3001 * weinre.port - Default: 8080 - * Note: requires at least version 2.0.0 + * Note: Requires at least version 2.0.0. */ ui?: UIOptions | boolean; /** @@ -29,20 +34,40 @@ declare namespace browserSync { * patterns. * Default: false */ - files?: string | (string | FileCallback)[]; + files?: string | (string | FileCallback | object)[]; + /** + * Specify which file events to respond to. + * Available events: `add`, `change`, `unlink`, `addDir`, `unlinkDir` + */ + watchEvents?: string[]; + /** + * Watch files automatically. + */ + watch?: boolean; + /** + * Patterns for any watchers to ignore. + * Anything provided here will end up inside 'watchOptions.ignored'. + */ + ignore?: string[]; + /** + * Serve an index.html file for all non-asset routes. + * Useful when using client-routers. + */ + single?: boolean; /** * File watching options that get passed along to Chokidar. Check their docs for available options * Default: undefined - * Note: requires at least version 2.6.0 + * Note: Requires at least version 2.6.0. */ watchOptions?: chokidar.WatchOptions; /** * Use the built-in static server for basic HTML/JS/CSS websites. * Default: false */ - server?: ServerOptions; + server?: string | boolean | string[] | ServerOptions; /** * Proxy an EXISTING vhost. Browsersync will wrap your vhost with a proxy URL to view your site. + * Passing only a URL as a string equates to passing only target property of ProxyOptions type. * target - Default: undefined * ws - Default: undefined * middleware - Default: undefined @@ -50,25 +75,40 @@ declare namespace browserSync { * proxyRes - Default: undefined * proxyReq - Default: undefined */ - proxy?: string | boolean | ProxyOptions; + proxy?: string | ProxyOptions; /** * Use a specific port (instead of the one auto-detected by Browsersync) * Default: 3000 */ port?: number; + /** + * Functions or actual plugins used as middleware. + */ + middleware?: MiddlewareHandler | PerRouteMiddleware | (MiddlewareHandler | PerRouteMiddleware)[]; /** * Add additional directories from which static files should be served. * Should only be used in proxy or snippet mode. * Default: [] - * Note: requires at least version 2.8.0 + * Note: Requires at least version 2.8.0. */ - serveStatic?: string[]; + serveStatic?: (string | { route?: string | string[], dir?: string | string[]})[]; + /** + * Options that are passed to the serve-static middleware when you use the + * string[] syntax: eg: `serveStatic: ['./app']`. + * Please see [serve-static](https://github.com/expressjs/serve-static) for details. + */ + serveStaticOptions?: ServeStaticOptions; /** * Enable https for localhost development. - * Note - this is not needed for proxy option as it will be inferred from your target url. - * Note: requires at least version 1.3.0 + * Note: This may not be needed for proxy option as it will try to infer from your target url. + * Note: If privacy error is encountered please see HttpsOptions below, setting those will resolve. + * Note: Requires at least version 1.3.0. */ - https?: boolean; + https?: boolean | HttpsOptions; + /** + * Override http module to allow using 3rd party server modules (such as http2). + */ + httpModule?: string; /** * Clicks, Scrolls & Form inputs on any device will be mirrored to all others. * clicks - Default: true @@ -84,7 +124,7 @@ declare namespace browserSync { /** * Change the console logging prefix. Useful if you're creating your own project based on Browsersync * Default: BS - * Note: requires at least version 1.5.1 + * Note: Requires at least version 1.5.1. */ logPrefix?: string; /** @@ -100,19 +140,19 @@ declare namespace browserSync { /** * Log the snippet to the console when you're in snippet mode (no proxy/server) * Default: true - * Note: requires at least version 1.5.2 + * Note: Requires at least version 1.5.2. */ logSnippet?: boolean; /** * You can control how the snippet is injected onto each page via a custom regex + function. * You can also provide patterns for certain urls that should be ignored from the snippet injection. - * Note: requires at least version 2.0.0 + * Note: Requires at least version 2.0.0. */ snippetOptions?: SnippetOptions; /** * Add additional HTML rewriting rules. * Default: false - * Note: requires at least version 2.4.0 + * Note: Requires at least version 2.4.0. */ rewriteRules?: boolean | RewriteRules[]; /** @@ -139,7 +179,7 @@ declare namespace browserSync { /** * Add HTTP access control (CORS) headers to assets served by Browsersync. * Default: false - * Note: requires at least version 2.16.0 + * Note: Requires at least version 2.16.0. */ cors?: boolean; /** @@ -177,12 +217,12 @@ declare namespace browserSync { /** * Sync the scroll position of any element on the page. Add any amount of CSS selectors * Default: [] - * Note: requires at least version 2.9.0 + * Note: Requires at least version 2.9.0. */ scrollElements?: string[]; /** * Default: [] - * Note: requires at least version 2.9.0 + * Note: Requires at least version 2.9.0. * Sync the scroll position of any element on the page - where any scrolled element will cause * all others to match scroll position. This is helpful when a breakpoint alters which element * is actually scrolling @@ -197,13 +237,18 @@ declare namespace browserSync { /** * Restrict the frequency in which browser:reload events can be emitted to connected clients * Default: 0 - * Note: requires at least version 2.6.0 + * Note: Requires at least version 2.6.0. */ reloadDebounce?: number; + /** + * Emit only the first event during sequential time windows of a specified duration. + * Note: Requires at least version 2.13.0. + */ + reloadThrottle?: number; /** * User provided plugins * Default: [] - * Note: requires at least version 2.6.0 + * Note: Requires at least version 2.6.0. */ plugins?: any[]; /** @@ -224,6 +269,10 @@ declare namespace browserSync { * Override host detection if you know the correct IP to use */ host?: string; + /** + * Support environments where dynamic hostnames are not required (ie: electron). + */ + localOnly?: boolean; /** * Send file-change events to the browser * Default: true @@ -234,10 +283,16 @@ declare namespace browserSync { * Default: true */ timestamps?: boolean; + /** + * ¯\_(ツ)_/¯ + * Best guess, when ghostMode (or SocketIO?) is setup the events + * listed here will be emitted and able to hook into. + */ + clientEvents?: string[]; /** * Alter the script path for complete control over where the Browsersync Javascript is served * from. Whatever you return from this function will be used as the script path. - * Note: requires at least version 1.5.0 + * Note: Requires at least version 1.5.0. */ scriptPath?: (path: string) => string; /** @@ -248,10 +303,21 @@ declare namespace browserSync { * domain - Default: undefined * port - Default: undefined * clients.heartbeatTimeout - Default: 5000 - * Note: requires at least version 1.6.2 + * Note: Requires at least version 1.6.2. */ socket?: SocketOptions; - middleware?: MiddlewareHandler | PerRouteMiddleware | (MiddlewareHandler | PerRouteMiddleware)[]; + /** + * ¯\_(ツ)_/¯ + */ + tagNames?: TagNamesOptions; + /** + * ¯\_(ツ)_/¯ + */ + injectFileTypes?: string[]; + /** + * ¯\_(ツ)_/¯ + */ + excludeFileTypes?: string[]; } interface Hash { @@ -287,6 +353,7 @@ declare namespace browserSync { routes?: Hash; /** configure custom middleware */ middleware?: (MiddlewareHandler | PerRouteMiddleware)[]; + serveStaticOptions?: ServeStaticOptions } interface ProxyOptions { @@ -298,6 +365,11 @@ declare namespace browserSync { proxyReq?: ((res: http.ServerRequest) => any)[] | ((res: http.ServerRequest) => any); } + interface HttpsOptions { + key?: string; + cert?: string; + } + interface MiddlewareHandler { (req: http.IncomingMessage, res: http.ServerResponse, next: Function): any; } @@ -310,11 +382,17 @@ declare namespace browserSync { interface GhostOptions { clicks?: boolean; scroll?: boolean; - forms?: boolean; + forms?: boolean | { + submit?: boolean; + inputs?: boolean; + toggles?: boolean; + }; } interface SnippetOptions { - ignorePaths?: string; + async?: boolean, + whitelist?: string[], + blacklist?: string[], rule?: { match?: RegExp; fn?: (snippet: string, match: string) => any }; } @@ -327,9 +405,22 @@ declare namespace browserSync { clients?: { heartbeatTimeout?: number; }; } + interface TagNamesOptions { + less?: string; + scss?: string; + css?: string; + jpg?: string; + jpeg?: string; + png?: string; + svg?: string; + gif?: string; + js?: string; + } + interface RewriteRules { match: RegExp; - fn: (match: string) => string; + replace?: string; + fn?: (req: http.IncomingMessage, res: http.ServerResponse, match: string) => string; } interface StreamOptions { @@ -342,7 +433,7 @@ declare namespace browserSync { * Start the Browsersync service. This will launch a server, proxy or start the snippet mode * depending on your use-case. */ - (config?: Options, callback?: (err: Error, bs: Object) => any): BrowserSyncInstance; + (config?: Options, callback?: (err: Error, bs: object) => any): BrowserSyncInstance; /** * Create a Browsersync instance * @param name an identifier that can used for retrieval later @@ -367,7 +458,7 @@ declare namespace browserSync { * Start the Browsersync service. This will launch a server, proxy or start the snippet mode * depending on your use-case. */ - init(config?: Options, callback?: (err: Error, bs: Object) => any): BrowserSyncInstance; + init(config?: Options, callback?: (err: Error, bs: object) => any): BrowserSyncInstance; /** * Reload the browser * The reload method will inform all browsers about changed files and will either cause the browser diff --git a/types/bson/bson-tests.ts b/types/bson/bson-tests.ts index ebdd8a19c3..b3173053c8 100644 --- a/types/bson/bson-tests.ts +++ b/types/bson/bson-tests.ts @@ -6,7 +6,7 @@ bson.ObjectID.cacheHexString = true let BSON = new bson.BSON(); let Long = bson.Long; -let doc = {long: Long.fromNumber(100)} +let doc = { long: Long.fromNumber(100) } // Serialize a document let data = BSON.serialize(doc, false, true, false); @@ -19,3 +19,10 @@ console.log("doc_2:", doc_2); BSON = new bson.BSON(); data = BSON.serialize(doc); doc_2 = BSON.deserialize(data); + + +// Calculate Object Size +BSON = new bson.BSON(); +console.log("Calculated Object size - no options object:", BSON.calculateObjectSize(doc)); +console.log("Calculated Object size - empty options object:", BSON.calculateObjectSize(doc, {})); +console.log("Calculated Object size - custom options object:", BSON.calculateObjectSize(doc, { ignoreUndefined: false, serializeFunctions: true })); diff --git a/types/bson/index.d.ts b/types/bson/index.d.ts index 24372ff0f5..3b0feb0113 100644 --- a/types/bson/index.d.ts +++ b/types/bson/index.d.ts @@ -16,6 +16,14 @@ export interface DeserializeOptions { /** {Boolean, default:false}, deserialize Binary data directly into node.js Buffer object. */ promoteBuffers?: boolean; } + +export interface CalculateObjectSizeOptions { + /** {Boolean, default:false}, serialize the javascript functions */ + serializeFunctions?: boolean; + /** {Boolean, default:true}, ignore undefined fields. */ + ignoreUndefined?: boolean; +} + export class BSON { /** * @param {Object} object the Javascript object to serialize. @@ -26,6 +34,14 @@ export class BSON { */ serialize(object: any, checkKeys?: boolean, asBuffer?: boolean, serializeFunctions?: boolean): Buffer; deserialize(buffer: Buffer, options?: DeserializeOptions, isArray?: boolean): any; + /** + * Calculate the bson size for a passed in Javascript object. + * + * @param {Object} object the Javascript object to calculate the BSON byte size for. + * @param {CalculateObjectSizeOptions} Options + * @return {Number} returns the number of bytes the BSON object will take up. + */ + calculateObjectSize(object: any, options?: CalculateObjectSizeOptions): number; } export class Binary { diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index a7a9ea350b..15de8adfde 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -5,6 +5,7 @@ // Marshall Cottrell // Weeco // Gabriel Terwesten +// Oleg Repin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -41,7 +42,7 @@ declare namespace Bull { * When specified, the `Queue` will use this function to create new `ioredis` client connections. * This is useful if you want to re-use connections. */ - createClient?(type: 'client' | 'subscriber', redisOpts?: Redis.RedisOptions): Redis.Redis; + createClient?(type: 'client' | 'subscriber' | 'bclient', redisOpts?: Redis.RedisOptions): Redis.Redis; /** * Prefix to use for all redis keys @@ -51,6 +52,8 @@ declare namespace Bull { settings?: AdvancedSettings; limiter?: RateLimiter; + + defaultJobOptions?: JobOptions; } interface AdvancedSettings { @@ -164,6 +167,11 @@ declare namespace Bull { * End date when the repeat job should stop repeating */ endDate?: Date | string | number; + + /** + * Number of times the job should repeat at max. + */ + limit?: number; } interface JobOptions { @@ -270,18 +278,30 @@ declare namespace Bull { * * The callback is called everytime a job is placed in the queue. * It is passed an instance of the job as first argument. + * The callback can also be defined as the string path to a module + * exporting the callback function. Using a path has several advantages: + * - The process is sandboxed so if it crashes it does not affect the worker. + * - You can run blocking code without affecting the queue (jobs will not stall). + * - Much better utilization of multi-core CPUs. + * - Less connections to redis. * * A promise must be returned to signal job completion. * If the promise is rejected, the error will be passed as a second argument to the "failed" event. * If it is resolved, its value will be the "completed" event's second argument. */ - process(callback: (job: Job) => void): Promise; + process(callback: ((job: Job) => void) | string): Promise; /** * Defines a processing function for the jobs placed into a given Queue. * * The callback is called everytime a job is placed in the queue. * It is passed an instance of the job as first argument. + * The callback can also be defined as the string path to a module + * exporting the callback function. Using a path has several advantages: + * - The process is sandboxed so if it crashes it does not affect the worker. + * - You can run blocking code without affecting the queue (jobs will not stall). + * - Much better utilization of multi-core CPUs. + * - Less connections to redis. * * A promise must be returned to signal job completion. * If the promise is rejected, the error will be passed as a second argument to the "failed" event. @@ -289,7 +309,7 @@ declare namespace Bull { * * @param concurrency Bull will then call you handler in parallel respecting this max number. */ - process(concurrency: number, callback: (job: Job) => void): Promise; + process(concurrency: number, callback: ((job: Job) => void) | string): Promise; /** * Defines a processing function for the jobs placed into a given Queue. @@ -311,6 +331,12 @@ declare namespace Bull { * * The callback is called everytime a job is placed in the queue. * It is passed an instance of the job as first argument. + * The callback can also be defined as the string path to a module + * exporting the callback function. Using a path has several advantages: + * - The process is sandboxed so if it crashes it does not affect the worker. + * - You can run blocking code without affecting the queue (jobs will not stall). + * - Much better utilization of multi-core CPUs. + * - Less connections to redis. * * A promise must be returned to signal job completion. * If the promise is rejected, the error will be passed as a second argument to the "failed" event. @@ -319,7 +345,7 @@ declare namespace Bull { * @param name Bull will only call the handler if the job name matches */ // tslint:disable-next-line:unified-signatures - process(name: string, callback: (job: Job) => void): Promise; + process(name: string, callback: ((job: Job) => void) | string): Promise; /** * Defines a processing function for the jobs placed into a given Queue. @@ -342,6 +368,12 @@ declare namespace Bull { * * The callback is called everytime a job is placed in the queue. * It is passed an instance of the job as first argument. + * The callback can also be defined as the string path to a module + * exporting the callback function. Using a path has several advantages: + * - The process is sandboxed so if it crashes it does not affect the worker. + * - You can run blocking code without affecting the queue (jobs will not stall). + * - Much better utilization of multi-core CPUs. + * - Less connections to redis. * * A promise must be returned to signal job completion. * If the promise is rejected, the error will be passed as a second argument to the "failed" event. @@ -350,7 +382,7 @@ declare namespace Bull { * @param name Bull will only call the handler if the job name matches * @param concurrency Bull will then call you handler in parallel respecting this max number. */ - process(name: string, concurrency: number, callback: (job: Job) => void): Promise; + process(name: string, concurrency: number, callback: ((job: Job) => void) | string): Promise; /** * Defines a processing function for the jobs placed into a given Queue. diff --git a/types/bytebuffer/index.d.ts b/types/bytebuffer/index.d.ts index 0ed98f54c6..285948dc24 100644 --- a/types/bytebuffer/index.d.ts +++ b/types/bytebuffer/index.d.ts @@ -4,6 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Definitions by: SINTEF-9012 +/// import Long = require("long"); declare namespace ByteBuffer {} @@ -70,7 +71,7 @@ declare class ByteBuffer /** * Backing buffer. */ - buffer: ArrayBuffer; + buffer: Buffer; /** * Absolute limit of the contained data. Set to the backing buffer's capacity upon allocation. @@ -135,12 +136,12 @@ declare class ByteBuffer /** * Calculates the actual number of bytes required to store a 32bit base 128 variable-length integer. */ - static calculateVariant32( value: number ): number; + static calculateVarint32( value: number ): number; /** * Calculates the actual number of bytes required to store a 64bit base 128 variable-length integer. */ - static calculateVariant64( value: number | Long ): number; + static calculateVarint64( value: number | Long ): number; /** * Concatenates multiple ByteBuffers into one. @@ -340,7 +341,7 @@ declare class ByteBuffer /** * Reads a length as uint32 prefixed UTF8 encoded string. */ - readIString( offset?: number ): string; + readIString( offset?: number ): string | { string: string; length: number }; /** * Reads a 32bit signed integer.This is an alias of ByteBuffer#readInt32. @@ -385,7 +386,7 @@ declare class ByteBuffer /** * Reads an UTF8 encoded string. */ - readUTF8String( chars: number, offset?: number ): string; + readUTF8String( chars: number, metrics?: number, offset?: number ): string | { string: string; length: number }; /** * Reads a 16bit unsigned integer. diff --git a/types/c3/c3-tests.ts b/types/c3/c3-tests.ts index 7ac2f0ccd8..f2e630cd09 100644 --- a/types/c3/c3-tests.ts +++ b/types/c3/c3-tests.ts @@ -1798,6 +1798,26 @@ function legend_custom() { }); } +function legend_tiles() { + const chart = c3.generate({ + data: { + columns: [ + ["sample", 30, 200, 100, 400, 150, 250] + ] + }, + legend: { + // amount of padding to put between each legend element + padding: 5, + // define custom height and width for the legend item tile + item: { + tile: { + width: 15, + height: 2 + } + } + }}); +} + ///////////////////// // Tooltip Tests ///////////////////// diff --git a/types/c3/index.d.ts b/types/c3/index.d.ts index 28f301237c..6c466458e3 100644 --- a/types/c3/index.d.ts +++ b/types/c3/index.d.ts @@ -1,11 +1,12 @@ -// Type definitions for C3js 0.4 +// Type definitions for C3js 0.6 // Project: http://c3js.org/ // Definitions by: Marc Climent // Gerin Jacob // Bernd Hacker // Dzmitry Shyndzin +// Tim Niemueller // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.3 import * as d3 from "d3"; @@ -28,7 +29,7 @@ export interface ChartConfiguration { * Note: When chart is not binded, c3 starts observing if chart.element is binded by MutationObserver. In this case, polyfill is required in IE9 and IE10 becuase they do not support * MutationObserver. On the other hand, if chart always will be binded, polyfill will not be required because MutationObserver will never be called. */ - bindto?: string | HTMLElement | d3.Selection | null; + bindto?: string | HTMLElement | d3.Selection | null; size?: { /** * The desired width of the chart element. @@ -172,16 +173,18 @@ export interface ChartConfiguration { /** * Change the width of bar chart. If ratio is specified, change the width of bar chart by ratio. */ - width?: number | { - /** - * Set the width of each bar by ratio - */ - ratio: number, - /** - * Set max width of each bar - */ - max?: number - }; + width?: + | number + | { + /** + * Set the width of each bar by ratio + */ + ratio: number; + /** + * Set max width of each bar + */ + max?: number; + }; /** * Set if min or max value will be 0 on bar chart. */ @@ -205,7 +208,7 @@ export interface ChartConfiguration { /** * Set threshold to show/hide labels. */ - threshold?: number + threshold?: number; }; /** * Enable or disable expanding pie pieces. @@ -226,7 +229,7 @@ export interface ChartConfiguration { /** * Set threshold to show/hide labels. */ - threshold?: number + threshold?: number; }; /** * Enable or disable expanding pie pieces. @@ -280,7 +283,17 @@ export interface ChartConfiguration { /** * Set custom spline interpolation */ - type?: 'linear' | 'linear-closed' | 'basis' | 'basis-open' | 'basis-closed' | 'bundle' | 'cardinal' | 'cardinal-open' | 'cardinal-closed' | 'monotone'; + type?: + | "linear" + | "linear-closed" + | "basis" + | "basis-open" + | "basis-closed" + | "bundle" + | "cardinal" + | "cardinal-open" + | "cardinal-closed" + | "monotone"; }; }; } @@ -309,7 +322,7 @@ export interface Data { /** * Choose which JSON object keys correspond to desired data. */ - keys?: { x?: string; value: string[]; }; + keys?: { x?: string; value: string[] }; /** * Specify the key of x values in the data. * We can show the data with non-index x values by this option. This option is required when the type of x axis is timeseries. If this option is set on category axis, the values of the data @@ -365,9 +378,7 @@ export interface Data { * - j is the sub index of the data point where the label is shown. * Formatter function can be defined for each data by specifying as an object and D3 formatter function can be set (e.g. d3.format('$')) */ - labels?: boolean | - { format: FormatFunction } | - { format: { [key: string]: FormatFunction } }; + labels?: boolean | { format: FormatFunction } | { format: { [key: string]: FormatFunction } }; /** * Define the order of the data. * This option changes the order of stacking the data and pieces of pie/donut. If null specified, it will be the order the data loaded. If function specified, it will be used to sort the data @@ -387,11 +398,11 @@ export interface Data { * This option should a function and the specified function receives color (e.g. '#ff0000') and d that has data parameters like id, value, index, etc. And it must return a string that * represents color (e.g. '#00ff00'). */ - color?(color: string, d: any): string | d3.Rgb; + color?(color: string, d: any): string | d3.RGBColor; /** * Set color for each data. */ - colors?: { [key: string]: string | d3.Rgb | ((d: any) => string | d3.Rgb) }; + colors?: { [key: string]: string | d3.RGBColor | ((d: any) => string | d3.RGBColor) }; /** * Hide each data when the chart appears. * If true specified, all of data will be hidden. If multiple ids specified as an array, those will be hidden. @@ -690,6 +701,10 @@ export interface LegendOptions { y?: number; step?: number; }; + /** + * Padding between legend elements. + */ + padding?: number; item?: { /** @@ -704,6 +719,19 @@ export interface LegendOptions { * Set mouseout event handler to the legend item. */ onmouseout?(id: any): void; + /** + * Tile settings for legend color display. + */ + tile?: { + /** + * Tile width. + */ + width?: number; + /** + * Tile height + */ + height?: number; + } }; } @@ -813,7 +841,7 @@ export interface PointOptions { /** * The radius size of each point on focus. */ - r?: number + r?: number; }; }; @@ -877,7 +905,7 @@ export interface ChartAPI { load(args: { url?: string; json?: {}; - keys?: { x?: string; value: string[]; } + keys?: { x?: string; value: string[] }; rows?: PrimitiveArray[]; columns?: PrimitiveArray[]; xs?: { [key: string]: string }; @@ -885,7 +913,7 @@ export interface ChartAPI { classes?: { [key: string]: string }; categories?: string[]; axes?: { [key: string]: string }; - colors?: { [key: string]: string | d3.Rgb }; + colors?: { [key: string]: string | d3.RGBColor }; type?: string; types?: { [key: string]: string }; unload?: boolean | ArrayOrString; @@ -911,7 +939,7 @@ export interface ChartAPI { */ flow(args: { json?: {}; - keys?: { x?: string; value: string[]; } + keys?: { x?: string; value: string[] }; rows?: PrimitiveArray[]; columns?: PrimitiveArray[]; to?: any; @@ -997,7 +1025,7 @@ export interface ChartAPI { * Get and set colors of the data loaded in the chart. * @param colors If this argument is given, the colors of data will be updated. If not given, the current colors will be returned. The format of this argument is the same as data.colors. */ - colors(colors?: { [key: string]: string | d3.Rgb }): { [key: string]: string }; + colors(colors?: { [key: string]: string | d3.RGBColor }): { [key: string]: string }; /** * Get and set axes of the data loaded in the chart. * @param axes If this argument is given, the axes of data will be updated. If not given, the current axes will be returned. The format of this argument is the same as data.axes. @@ -1040,22 +1068,25 @@ export interface ChartAPI { * Get and set axis labels. * @param labels If labels is given, specified axis' label will be updated. */ - labels(labels?: { [key: string]: string }): { [key: string]: string } + labels(labels?: { [key: string]: string }): { [key: string]: string }; /** * Get and set axis min value. * @param min If min is given, specified axis' min value will be updated. If no argument is given, the current min values for each axis will be returned. */ - min(min?: number | { [key: string]: number }): number | { [key: string]: number } + min(min?: number | { [key: string]: number }): number | { [key: string]: number }; /** * Get and set axis max value. * @param max If max is given, specified axis' max value will be updated. If no argument is given, the current max values for each axis will be returned. */ - max(max?: number | { [key: string]: number }): number | { [key: string]: number } + max(max?: number | { [key: string]: number }): number | { [key: string]: number }; /** * Get and set axis min and max value. * @param range If range is given, specified axis' min and max value will be updated. If no argument is given, the current min and max values for each axis will be returned. */ - range(range?: { min?: number | { [key: string]: number }; max?: number | { [key: string]: number } }): { min: number | { [key: string]: number }; max: number | { [key: string]: number } } + range(range?: { + min?: number | { [key: string]: number }; + max?: number | { [key: string]: number }; + }): { min: number | { [key: string]: number }; max: number | { [key: string]: number } }; }; legend: { diff --git a/types/c3/tsconfig.json b/types/c3/tsconfig.json index fe3b00c503..aa923e91c0 100644 --- a/types/c3/tsconfig.json +++ b/types/c3/tsconfig.json @@ -1,29 +1,20 @@ { "compilerOptions": { "module": "commonjs", - "lib": [ - "es6", - "dom" - ], + "lib": ["es6", "dom"], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": false, "baseUrl": "../", - "typeRoots": [ - "../" - ], + "typeRoots": ["../"], "types": [], "paths": { - "d3": [ - "d3/v3" - ] + "d3-scale": ["d3-scale/v1"], + "d3": ["d3/v4"] }, "noEmit": true, "forceConsistentCasingInFileNames": true }, - "files": [ - "index.d.ts", - "c3-tests.ts" - ] -} \ No newline at end of file + "files": ["index.d.ts", "c3-tests.ts"] +} diff --git a/types/case-sensitive-paths-webpack-plugin/index.d.ts b/types/case-sensitive-paths-webpack-plugin/index.d.ts index 38fdd9c032..58cdccf25f 100644 --- a/types/case-sensitive-paths-webpack-plugin/index.d.ts +++ b/types/case-sensitive-paths-webpack-plugin/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/Urthen/case-sensitive-paths-webpack-plugin#readme // Definitions by: Andrew Makarov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import { Plugin } from 'webpack'; diff --git a/types/cassandra-driver/index.d.ts b/types/cassandra-driver/index.d.ts index 5c0578ccf2..33a9f5988f 100644 --- a/types/cassandra-driver/index.d.ts +++ b/types/cassandra-driver/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for cassandra-driver v3.2.2 +// Type definitions for cassandra-driver v3.4.1 // Project: https://github.com/datastax/nodejs-driver // Definitions by: Marc Fisher +// Christian D // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -115,7 +116,11 @@ export namespace policies { interface RetryPolicyStatic { new (): RetryPolicy; - retryDecision: any; + retryDecision: { + rethrow: number, + retry: number, + ignore: number + }; } interface RetryPolicy { @@ -126,15 +131,55 @@ export namespace policies { retryResult(): { decision: retryDecision, consistency: types.consistencies, useCurrentHost: boolean }; } } + + namespace speculativeExecution { + let NoSpeculativeExecutionPolicy: NoSpeculativeExecutionPolicyStatic + + interface SpeculativeExecutionPolicy { + init(client: Client): void; + newPlan(keyspace: string, queryInfo: string | Array): { + nextExecution: Function + } + } + + interface NoSpeculativeExecutionPolicyStatic { + new (): NoSpeculativeExecutionPolicy + } + + interface NoSpeculativeExecutionPolicy extends SpeculativeExecutionPolicy { } + + interface ConstantSpeculativeExecutionPolicyStatic { + new (delay: number, maxSpeculativeExecutions: number): ConstantSpeculativeExecutionPolicy + } + + interface ConstantSpeculativeExecutionPolicy extends SpeculativeExecutionPolicy { } + } + + namespace timestampGeneration { + let MonotonicTimestampGenerator: MonotonicTimestampGeneratorStatic + + interface TimestampGenerator { + next(client: Client): null | number | _Long + } + + interface MonotonicTimestampGeneratorStatic { + new (warningThreshold?: number, minLogInterval?: number): MonotonicTimestampGeneratorStatic + } + + interface MonotonicTimestampGenerator extends TimestampGenerator { + getDate(): number + } + } } export namespace types { let BigDecimal: BigDecimalStatic; + let Duration: DurationStatic; + let Long: _Long; let InetAddress: InetAddressStatic; let Integer: IntegerStatic; let LocalDate: LocalDateStatic; let LocalTime: LocalTimeStatic; - let Long: _Long; let ResultSet: ResultSetStatic; // let ResultStream: ResultStreamStatic; let Row: RowStatic; @@ -221,6 +266,19 @@ export namespace types { toJSON(): string; } + interface DurationStatic { + new (month: number, days: number, nanoseconds: number | _Long): Duration; + + fromBuffer(buffer: Buffer): Duration; + fromString(input: string): Duration; + } + + interface Duration { + equals(other: Duration): boolean; + toBuffer(): Buffer; + toString(): string; + } + interface InetAddressStatic { new (buffer: Buffer): InetAddress; @@ -336,13 +394,14 @@ export namespace types { } interface ResultSetStatic { - new (response: any, host: string, triedHost: { [key: string]: any }, consistency: consistencies): ResultSet; + new (response: any, host: string, triedHost: { [key: string]: any }, speculativeExecutions: number, consistency: consistencies): ResultSet; } interface ResultSet { info: { queriedHost: Host, triedHosts: { [key: string]: string; }, + speculativeExecutions: number, achievedConsistency: consistencies, traceId: Uuid, warnings: Array, @@ -352,11 +411,13 @@ export namespace types { rowLength: number; columns: Array<{ [key: string]: string; }>; pageState: string; - nextPage: any; // function + nextPage: Function; first(): Row; getPageState(): string; getColumns(): Array<{ [key: string]: string; }>; + wasApplied(): boolean; + [Symbol.iterator](): Iterator; } interface ResultStreamStatic { @@ -442,40 +503,50 @@ export let Encoder: EncoderStatic; export interface ClientOptions { contactPoints: Array, keyspace?: string, + refreshSchemaDelay?: number, + isMetadataSyncEnabled?: boolean, + prepareOnAllHosts?: boolean, + rePrepareOnUp?: boolean, + maxPrepared?: number, policies?: { - addressResolution?: policies.addressResolution.AddressTranslator, loadBalancing?: policies.loadBalancing.LoadBalancingPolicy, + retry?: policies.retry.RetryPolicy, reconnection?: policies.reconnection.ReconnectionPolicy, - retry?: policies.retry.RetryPolicy + addressResolution?: policies.addressResolution.AddressTranslator, + speculativeExecution?: policies.speculativeExecution.SpeculativeExecutionPolicy, + timestampGeneration?: policies.timestampGeneration.TimestampGenerator, }, queryOptions?: QueryOptions, pooling?: { - heartBeatInterval: number, - coreConnectionsPerHost: { [key: number]: number; }, - warmup: boolean; + heartBeatInterval?: number, + coreConnectionsPerHost?: { [key: number]: number; }, + maxRequestsPerConnection?: number, + warmup?: boolean; }, protocolOptions?: { - port: number, - maxSchemaAgreementWaitSeconds: number, - maxVersion: number + port?: number, + maxSchemaAgreementWaitSeconds?: number, + maxVersion?: number }, socketOptions?: { - connectTimeout: number, - defunctReadTimeoutThreshold: number, - keepAlive: boolean, - keepAliveDelay: number, - readTimeout: number, - tcpNoDelay: boolean, - coalescingThreshold: number + connectTimeout?: number, + defunctReadTimeoutThreshold?: number, + keepAlive?: boolean, + keepAliveDelay?: number, + readTimeout?: number, + tcpNoDelay?: boolean, + coalescingThreshold?: number }, authProvider?: auth.AuthProvider, sslOptions?: tls.ConnectionOptions, encoding?: { - map: Function, - set: Function, - copyBuffer: boolean, - useUndefinedAsUnset: boolean - } + map?: Function, + set?: Function, + copyBuffer?: boolean, + useUndefinedAsUnset?: boolean + }, + profiles?: Array, + promiseFactory?: Function, } export interface QueryOptions { @@ -483,8 +554,11 @@ export interface QueryOptions { captureStackTrace?: boolean; consistency?: number; customPayload?: any; + executionProfile?: string | ExecutionProfile; fetchSize?: number; hints?: Array | Array>; + isIdempotent?: boolean; + keyspace?: string; logged?: boolean; pageState?: Buffer | string; prepare?: boolean; @@ -520,6 +594,7 @@ export interface Client extends events.EventEmitter { execute(query: string, callback: ResultCallback): void; execute(query: string, params?: any, options?: QueryOptions): Promise; getReplicas(keyspace: string, token: Buffer): Array; // TODO: Should this be a more explicit return? + getState(): metadata.ClientState; shutdown(callback?: Callback): void; shutdown(): Promise; stream(query: string, params?: any, options?: QueryOptions, callback?: Callback): NodeJS.ReadableStream; @@ -548,6 +623,7 @@ export interface HostMapStatic { export interface HostMap extends events.EventEmitter { length: number; + clear(): Array; forEach(callback: Callback): void; get(key: string): Host; keys(): Array; @@ -566,6 +642,22 @@ export interface Encoder { encode(value: any, typeInfo?: string | number | { code: number, info?: any }): Buffer; } +interface ExecutionProfileOptions { + consistency: number, + loadBalancing: policies.loadBalancing.LoadBalancingPolicy, + name: string, + readTimeout: number, + retry: policies.retry.RetryPolicy, + serialConsistency: number +} + +export interface ExecutionProfileStatic { + new (name: string, options: ExecutionProfileOptions): ExecutionProfile +} + +export interface ExecutionProfile extends ExecutionProfileOptions { +} + export namespace auth { let Authenticator: AuthenticatorStatic; let PlainTextAuthProvider: PlainTextAuthProviderStatic; @@ -649,6 +741,17 @@ export namespace metadata { stateFunction: string; stateType: string; } + + interface ClientStateStatic { + new (): ClientState; + } + + interface ClientState { + getConnectedHosts(): Array; + getInFlightQueries(host: Host): number; + getOpenConnections(host: Host): number; + toString(): string; + } interface DataTypeInfo { code: number, diff --git a/types/catalog/catalog-tests.tsx b/types/catalog/catalog-tests.tsx deleted file mode 100644 index 37a87540d1..0000000000 --- a/types/catalog/catalog-tests.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import * as React from "react"; -import { Config, render, markdown, Catalog, ReactSpecimen, Page } from "catalog"; - -const config: Config = { - title: 'Test', - pages: [ - { - path: '/', - title: 'Introduction', - content: '/patd/to/file.md', - }, - { - path: '/materials', - title: 'Materials', - pages: [ - { - path: '/materials/typeface', - title: 'Typeface', - component: , - }, - ], - }, - ], - useBrowserHistory: true, - basePath: '/doc', - responsiveSizes: [ - { name: 'large', width: 978, height: 1100 }, - { name: 'medium', width: 640, height: 900 }, - { name: 'small', width: 471, height: 700 }, - ], -}; - -render(config, document.body); -; - -markdown` -# Test - -${ -
-} -`; diff --git a/types/catalog/index.d.ts b/types/catalog/index.d.ts deleted file mode 100644 index 3476e86641..0000000000 --- a/types/catalog/index.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -// Type definitions for catalog 3.2 -// Project: https://github.com/interactivethings/catalog/ -// Definitions by: Peter Gassner , Tomas Carnecky -// Definitions: https://github.com/interactivethings/catalog/ -// TypeScript Version: 2.6 - -import * as React from "react"; - -// Configuration - -// XXX: Can not name this 'Page' because there's already a 'Page' -// component here. -export interface ConfigPage { - path: string; - title: string; - - content?: any; - component?: any; - pages?: ConfigPage[]; -} - -export interface ConfigResponsiveSize { - name: string; - width: number; - height: number; -} - -export interface Config { - title: string; - pages: ConfigPage[]; - - useBrowserHistory?: boolean; - basePath?: string; - responsiveSizes?: ConfigResponsiveSize[]; -} - -export function render(config: Config, element: HTMLElement): void; -export function configure(config: any): any; -export function configureRoutes(config: any): any; -export function configureJSXRoutes(config: any): any; - -export function pageLoader(f: () => Promise): any; -export function markdown(...x: any[]): JSX.Element; - -// Components -export interface DefaultCatalogProps extends React.Props<{}> { - span?: number; - theme?: any; -} - -export class Card extends React.Component {} -export class Page extends React.Component {} -export interface SpanProps extends DefaultCatalogProps { - style?: any; -} -export class Span extends React.Component {} - -// Specimens -export class AudioSpecimen extends React.Component {} - -export interface CodeSpecimenProps extends DefaultCatalogProps { - rawBody: string; - collapsed: boolean; - lang: string; - raw: boolean; -} -export class CodeSpecimen extends React.Component {} - -export interface ColorSpecimenProps extends DefaultCatalogProps { - value: string; - name: string; -} -export class ColorSpecimen extends React.Component {} - -export interface ColorPaletteSpecimenProps extends DefaultCatalogProps { - colors: Array<{name?: string, value: string}>; - horizontal?: boolean; -} -export class ColorPaletteSpecimen extends React.Component {} - -export class HtmlSpecimen extends React.Component {} -export class HintSpecimen extends React.Component {} -export class ImageSpecimen extends React.Component {} - -export interface TypeSpecimenProps extends DefaultCatalogProps { - color?: string; - font: string; - headings: string[] | number[]; - style?: string; - weight: string; -} -export class TypeSpecimen extends React.Component {} -export class DownloadSpecimen extends React.Component {} - -export interface ReactSpecimenProps extends DefaultCatalogProps { - noSource?: boolean; - plain?: boolean; - light?: boolean; - dark?: boolean; - frame?: boolean; - state?: any; - responsive?: boolean | string | string[]; - sourceText?: string; -} -export class ReactSpecimen extends React.Component {} - -export class VideoSpecimen extends React.Component {} - -export class Catalog extends React.Component {} diff --git a/types/chai-jest-snapshot/index.d.ts b/types/chai-jest-snapshot/index.d.ts index 862da8cd16..470e4fa423 100644 --- a/types/chai-jest-snapshot/index.d.ts +++ b/types/chai-jest-snapshot/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/suchipi/chai-jest-snapshot#readme // Definitions by: Matt Perry // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 /// /// diff --git a/types/chai-spies/chai-spies-tests.ts b/types/chai-spies/chai-spies-tests.ts index 326b1e0137..1d99f0add2 100644 --- a/types/chai-spies/chai-spies-tests.ts +++ b/types/chai-spies/chai-spies-tests.ts @@ -1,6 +1,5 @@ import * as chai from 'chai'; import * as spies from 'chai-spies'; -import * as Mocha from 'mocha'; function original(): void { // do something cool diff --git a/types/chai-string/chai-string-tests.ts b/types/chai-string/chai-string-tests.ts index dc798c102a..9cd9a2e024 100644 --- a/types/chai-string/chai-string-tests.ts +++ b/types/chai-string/chai-string-tests.ts @@ -1,6 +1,4 @@ -/// - var should = chai.should(); var assert = chai.assert; var expect = chai.expect; @@ -8,6 +6,11 @@ var expect = chai.expect; import chai_string = require("chai-string"); chai.use(chai_string); +// Stub mocha functions +const {describe, it, before, after, beforeEach, afterEach} = null as any as { + [s: string]: ((s: string, cb: (done: any) => void) => void) & ((cb: (done: any) => void) => void) & {only: any, skip: any}; +}; + describe('chai-string', function() { describe('#startsWith', function() { diff --git a/types/chai-string/index.d.ts b/types/chai-string/index.d.ts index bc990104be..fcf0fb9c23 100644 --- a/types/chai-string/index.d.ts +++ b/types/chai-string/index.d.ts @@ -49,4 +49,5 @@ declare global { } declare function chaiString(chai: any, utils: any): void; +declare namespace chaiString { } export = chaiString; diff --git a/types/chai-things/chai-things-tests.ts b/types/chai-things/chai-things-tests.ts index ecb7294dd2..b3549ab192 100644 --- a/types/chai-things/chai-things-tests.ts +++ b/types/chai-things/chai-things-tests.ts @@ -1,8 +1,7 @@ -import chai = require('chai'); -import chaiThings = require('chai-things'); - +import * as chai from 'chai'; +import * as chaiThings from 'chai-things'; chai.use(chaiThings); function test_somethingSyntax() { diff --git a/types/chai-things/index.d.ts b/types/chai-things/index.d.ts index 11ad20ede3..e0b3d0f0ec 100644 --- a/types/chai-things/index.d.ts +++ b/types/chai-things/index.d.ts @@ -60,5 +60,6 @@ interface Array { declare module "chai-things" { function chaiThings(chai: any, utils: any): void; + namespace chaiThings { } export = chaiThings; } diff --git a/types/chart.js/chart.js-tests.ts b/types/chart.js/chart.js-tests.ts index 6041889b66..d0f6ebc684 100644 --- a/types/chart.js/chart.js-tests.ts +++ b/types/chart.js/chart.js-tests.ts @@ -21,6 +21,12 @@ const chart: Chart = new Chart(new CanvasRenderingContext2D(), { hover: { intersect: true }, + onHover(ev: MouseEvent, points: any[]) { + return; + }, + title: { + text: ["foo", "bar"] + }, tooltips: { filter: data => Number(data.yLabel) > 0, intersect: true, @@ -52,6 +58,7 @@ const chart: Chart = new Chart(new CanvasRenderingContext2D(), { padding: 40 } }, + devicePixelRatio: 2, } }); chart.update(); diff --git a/types/chart.js/index.d.ts b/types/chart.js/index.d.ts index 338e38e223..2c5de28962 100644 --- a/types/chart.js/index.d.ts +++ b/types/chart.js/index.d.ts @@ -9,6 +9,7 @@ // Dan Manastireanu // Guillaume Rodriguez // Sergey Rubanov +// Simon Archer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -126,6 +127,10 @@ declare namespace Chart { pointStyle?: PointStyle; } + interface ChartLegendLabelItem extends ChartLegendItem { + datasetIndex: number; + } + interface ChartTooltipItem { xLabel?: string; yLabel?: string; @@ -184,6 +189,7 @@ declare namespace Chart { aspectRatio?: number; maintainAspectRatio?: boolean; events?: string[]; + onHover?(this: Chart, event: MouseEvent, activeElements: Array<{}>): any; onClick?(event?: MouseEvent, activeElements?: Array<{}>): any; title?: ChartTitleOptions; legend?: ChartLegendOptions; @@ -198,6 +204,9 @@ declare namespace Chart { cutoutPercentage?: number; circumference?: number; rotation?: number; + devicePixelRatio?: number; + // Plugins can require any options + plugins?: { [plugin: string]: any }; } interface ChartFontOptions { @@ -216,15 +225,15 @@ declare namespace Chart { fontColor?: ChartColor; fontStyle?: string; padding?: number; - text?: string; + text?: string | string[]; } interface ChartLegendOptions { display?: boolean; position?: PositionType; fullWidth?: boolean; - onClick?(event: MouseEvent, legendItem: ChartLegendItem): void; - onHover?(event: MouseEvent, legendItem: ChartLegendItem): void; + onClick?(event: MouseEvent, legendItem: ChartLegendLabelItem): void; + onHover?(event: MouseEvent, legendItem: ChartLegendLabelItem): void; labels?: ChartLegendLabelOptions; reverse?: boolean; } @@ -237,7 +246,7 @@ declare namespace Chart { fontFamily?: string; padding?: number; generateLabels?(chart: any): any; - filter?(item: ChartLegendItem, data: ChartData): any; + filter?(legendItem: ChartLegendLabelItem, data: ChartData): any; usePointStyle?: boolean; } @@ -289,7 +298,7 @@ declare namespace Chart { mode?: string; animationDuration?: number; intersect?: boolean; - onHover?(active: any): void; + onHover?(this: Chart, event: MouseEvent, activeElements: Array<{}>): any; } interface ChartAnimationObject { @@ -393,6 +402,10 @@ declare namespace Chart { interface TickOptions { autoSkip?: boolean; autoSkipPadding?: number; + backdropColor?: ChartColor; + backdropPaddingX?: number; + backdropPaddingY?: number; + beginAtZero?: boolean; callback?(value: any, index: any, values: any): string|number; display?: boolean; fontColor?: ChartColor; @@ -400,14 +413,17 @@ declare namespace Chart { fontSize?: number; fontStyle?: string; labelOffset?: number; + max?: any; maxRotation?: number; + maxTicksLimit?: number; + min?: any; minRotation?: number; mirror?: boolean; padding?: number; reverse?: boolean; - min?: any; - max?: any; + showLabelBackdrop?: boolean; } + interface AngleLineOptions { display?: boolean; color?: ChartColor; @@ -422,26 +438,15 @@ declare namespace Chart { fontStyle?: string; } - interface TickOptions { - backdropColor?: ChartColor; - backdropPaddingX?: number; - backdropPaddingY?: number; - maxTicksLimit?: number; - showLabelBackdrop?: boolean; - } interface LinearTickOptions extends TickOptions { - beginAtZero?: boolean; - min?: number; - max?: number; maxTicksLimit?: number; stepSize?: number; suggestedMin?: number; suggestedMax?: number; } + // tslint:disable-next-line no-empty-interface interface LogarithmicTickOptions extends TickOptions { - min?: number; - max?: number; } type ChartColor = string | CanvasGradient | CanvasPattern | string[]; diff --git a/types/chroma-js/chroma-js-tests.ts b/types/chroma-js/chroma-js-tests.ts index 82cfb7274d..fdd1b5946b 100644 --- a/types/chroma-js/chroma-js-tests.ts +++ b/types/chroma-js/chroma-js-tests.ts @@ -1,3 +1,6 @@ +import { Color } from "chroma-js"; +import chroma = require("chroma-js"); + function test_chroma() { chroma('hotpink'); chroma('#ff3399'); @@ -187,3 +190,9 @@ function test_types() { const color: chroma.Color = chroma('orange'); const scale: chroma.Scale = chroma.scale('RdYlBu'); } + +// the following should actually, pass, but TS can't disambiguate between a parameter +// which is passed as undefined/null or not passed at all +// const scaleColors1: Color[] = chroma.scale(['black', 'white']).colors(12); +const scaleColors2: Color[] = chroma.scale(['black', 'white']).colors(12, null); +const scaleColors3: Color[] = chroma.scale(['black', 'white']).colors(12, undefined); diff --git a/types/chroma-js/index.d.ts b/types/chroma-js/index.d.ts index c18484dc1f..797752c8ad 100644 --- a/types/chroma-js/index.d.ts +++ b/types/chroma-js/index.d.ts @@ -303,10 +303,10 @@ declare namespace chroma { * You can call scale.colors(n) to quickly grab `c` equi-distant colors from a color scale. If called with no * arguments, scale.colors returns the original array of colors used to create the scale. */ - colors(c?: number, format?: 'hex' | 'name'): string[]; - colors(c?: number, format?: null | 'alpha' | 'darken' | 'brighten' | 'saturate' | 'desaturate'): Color[]; - colors(c?: number, format?: 'luminance' | 'temperature'): number[]; - colors(c?: number, format?: K): Array; + colors(c: number | undefined, format: undefined | null | 'alpha' | 'darken' | 'brighten' | 'saturate' | 'desaturate'): Color[]; + colors(c: number | undefined, format: 'luminance' | 'temperature'): number[]; + colors(c: number | undefined, format: K): Array; + colors(c: number | undefined, format?: 'hex' | 'name'): string[]; /** * If you want the scale function to return a distinct set of colors instead of a continuous gradient, you can diff --git a/types/chrome/chrome-app.d.ts b/types/chrome/chrome-app.d.ts index 4ecf1d344a..65d80f3290 100644 --- a/types/chrome/chrome-app.d.ts +++ b/types/chrome/chrome-app.d.ts @@ -1189,7 +1189,7 @@ declare namespace chrome.system.display { * @param {string} id The display's unique identifier. * @param {(success) => void} callback Optional callback to inform the caller that the touch calibration has ended. The argument of the callback informs if the calibration was a success or not. */ - export function showNativeTouchCalibration(id: string, callback: (success) => void): void; + export function showNativeTouchCalibration(id: string, callback: (success: boolean) => void): void; /** * @description Starts custom touch calibration for a display. This should be called when using a custom UX for collecting calibration data. If another touch calibration is already in progress this will throw an error. diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index cde1de9092..466f09107d 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -1678,6 +1678,17 @@ declare namespace chrome.devtools.inspectedWindow { * Parameter exceptionInfo: An object providing details if an exception occurred while evaluating the expression. */ export function eval(expression: string, callback?: (result: T, exceptionInfo: EvaluationExceptionInfo) => void): void; + /** + * Evaluates a JavaScript expression in the context of the main frame of the inspected page. The expression must evaluate to a JSON-compliant object, otherwise an exception is thrown. The eval function can report either a DevTools-side error or a JavaScript exception that occurs during evaluation. In either case, the result parameter of the callback is undefined. In the case of a DevTools-side error, the isException parameter is non-null and has isError set to true and code set to an error code. In the case of a JavaScript error, isException is set to true and value is set to the string value of thrown object. + * @param expression An expression to evaluate. + * @param options The options parameter can contain one or more options. + * @param callback A function called when evaluation completes. + * If you specify the callback parameter, it should be a function that looks like this: + * function(object result, object exceptionInfo) {...}; + * Parameter result: The result of evaluation. + * Parameter exceptionInfo: An object providing details if an exception occurred while evaluating the expression. + */ + export function eval(expression: string, options: EvalOptions, callback?: (result: T, exceptionInfo: EvaluationExceptionInfo) => void): void; /** * Retrieves the list of resources from the inspected page. * @param callback A function that receives the list of resources when the request completes. @@ -1690,6 +1701,15 @@ declare namespace chrome.devtools.inspectedWindow { export var onResourceAdded: ResourceAddedEvent; /** Fired when a new revision of the resource is committed (e.g. user saves an edited version of the resource in the Developer Tools). */ export var onResourceContentCommitted: ResourceContentCommittedEvent; + + export interface EvalOptions { + /** If specified, the expression is evaluated on the iframe whose URL matches the one specified. By default, the expression is evaluated in the top frame of the inspected page. */ + frameURL?: string; + /** Evaluate the expression in the context of the content script of the calling extension, provided that the content script is already injected into the inspected page. If not, the expression is not evaluated and the callback is invoked with the exception parameter set to an object that has the isError field set to true and the code field set to E_NOTFOUND. */ + useContentScriptContext?: boolean; + /** Evaluate the expression in the context of a content script of an extension that matches the specified origin. If given, contextSecurityOrigin overrides the 'true' setting on userContentScriptContext. */ + contextSecurityOrigin?: string; + } } //////////////////// @@ -5041,7 +5061,7 @@ declare namespace chrome.runtime { export interface PortDisconnectEvent extends chrome.events.Event<(port: Port) => void> {} - export interface PortMessageEvent extends chrome.events.Event<(message: Object, port: Port) => void> {} + export interface PortMessageEvent extends chrome.events.Event<(message: any, port: Port) => void> {} export interface ExtensionMessageEvent extends chrome.events.Event<(message: any, sender: MessageSender, sendResponse: (response: any) => void) => void> {} @@ -7216,6 +7236,9 @@ declare namespace chrome.webNavigation { * @since Chrome 17. */ declare namespace chrome.webRequest { + /** How the requested resource will be used. */ + export type ResourceType = "main_frame" | "sub_frame" | "stylesheet" | "script" | "image" | "font" | "object" | "xmlhttprequest" | "ping" | "csp_report" | "media" | "websocket" | "other"; + export interface AuthCredentials { username: string; password: string; @@ -7257,9 +7280,8 @@ declare namespace chrome.webRequest { tabId?: number; /** * A list of request types. Requests that cannot match any of the types will be filtered out. - * Each element one of: "main_frame", "sub_frame", "stylesheet", "script", "image", "object", "xmlhttprequest", or "other" */ - types?: string[]; + types?: ResourceType[]; /** A list of URLs or URL patterns. Requests that cannot match any of the URLs will be filtered out. */ urls: string[]; @@ -7310,9 +7332,8 @@ declare namespace chrome.webRequest { tabId: number; /** * How the requested resource will be used. - * One of: "main_frame", "sub_frame", "stylesheet", "script", "image", "object", "xmlhttprequest", or "other" */ - type: string; + type: ResourceType; /** The time when this signal is triggered, in milliseconds since the epoch. */ timeStamp: number; } diff --git a/types/circuit-breaker-js/circuit-breaker-js-tests.ts b/types/circuit-breaker-js/circuit-breaker-js-tests.ts new file mode 100644 index 0000000000..b9a3c70a63 --- /dev/null +++ b/types/circuit-breaker-js/circuit-breaker-js-tests.ts @@ -0,0 +1,20 @@ +import CircuitBreaker = require('circuit-breaker-js'); + +const breaker = new CircuitBreaker(); +breaker.isOpen(); + +const options: CircuitBreaker.Options = {}; + +let status: number = CircuitBreaker.CLOSED; +status = CircuitBreaker.OPEN; + +breaker.forceOpen(); +breaker.forceClose(); + +breaker.run((success, failure) => { + if (Math.random() > 0.5) { + success(); + } else { + failure(); + } +}); diff --git a/types/circuit-breaker-js/index.d.ts b/types/circuit-breaker-js/index.d.ts new file mode 100644 index 0000000000..7b6854e61f --- /dev/null +++ b/types/circuit-breaker-js/index.d.ts @@ -0,0 +1,44 @@ +// Type definitions for circuit-breaker-js 0.0 +// Project: http://yammer.github.io/circuit-breaker-js/ +// Definitions by: Timur Amirov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = CircuitBreaker; + +declare namespace CircuitBreaker { + interface Options { + windowDuration?: number; + numBuckets?: number; + timeoutDuration?: number; + errorThreshold?: number; + volumeThreshold?: number; + + onCircuitOpen?: (m: Metrics) => void; + onCircuitClose?: (m: Metrics) => void; + } + + interface Metrics { + totalCount: number; + errorCount: number; + errorPercentage: number; + } +} + +declare class CircuitBreaker { + static OPEN: 0; + static HALF_OPEN: 1; + static CLOSED: 2; + + constructor(options?: CircuitBreaker.Options); + run( + command: ( + success: () => void, + failure: () => void, + ) => void, + fallback?: () => void + ): void; + forceClose(): void; + forceOpen(): void; + unforce(): void; + isOpen(): boolean; +} diff --git a/types/circuit-breaker-js/tsconfig.json b/types/circuit-breaker-js/tsconfig.json new file mode 100644 index 0000000000..67d9c57cc0 --- /dev/null +++ b/types/circuit-breaker-js/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "circuit-breaker-js-tests.ts" + ] +} diff --git a/types/circuit-breaker-js/tslint.json b/types/circuit-breaker-js/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/circuit-breaker-js/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/ckeditor/ckeditor-tests.ts b/types/ckeditor/ckeditor-tests.ts index dd0ec92164..1a906bc26e 100644 --- a/types/ckeditor/ckeditor-tests.ts +++ b/types/ckeditor/ckeditor-tests.ts @@ -37,6 +37,13 @@ function test_CKEDITOR() { CKEDITOR.replaceAll((textarea, config) => false); } +function test_CKEDITOR_events() { + CKEDITOR.on('instanceCreated', function(event) { + // $ExpectType editor + event.editor; + }); +} + function test_config() { var config1: CKEDITOR.config = { toolbar: 'basic', @@ -55,18 +62,18 @@ function test_config() { var config3: CKEDITOR.config = { toolbarGroups: [ { name: 'clipboard', groups: [ 'clipboard', 'undo' ] }, - { name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] }, - { name: 'links', groups: [ 'links' ] }, - { name: 'insert', groups: [ 'insert' ] }, - { name: 'tools', groups: [ 'tools' ] }, - { name: 'document', groups: [ 'mode' ] }, - { name: 'about', groups: [ 'about' ] }, - '/', - { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] }, - { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'paragraph' ] }, - '/', - { name: 'styles', groups: [ 'styles' ] }, - { name: 'colors', groups: [ 'colors' ] }, + { name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] }, + { name: 'links', groups: [ 'links' ] }, + { name: 'insert', groups: [ 'insert' ] }, + { name: 'tools', groups: [ 'tools' ] }, + { name: 'document', groups: [ 'mode' ] }, + { name: 'about', groups: [ 'about' ] }, + '/', + { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] }, + { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'paragraph' ] }, + '/', + { name: 'styles', groups: [ 'styles' ] }, + { name: 'colors', groups: [ 'colors' ] }, ], } } @@ -211,7 +218,7 @@ function test_dom_event() { domEvent.getTarget().addClass('clicked'); }); element.on('click', ev=> { - var domEvent = ev.data; + var domEvent = ev.data as CKEDITOR.dom.event; domEvent.preventDefault(); }); } @@ -323,7 +330,11 @@ function test_adding_dialog_by_definition() { title: 'Abbreviation Properties', minWidth: 400, minHeight: 200, - + onLoad: () => {}, + onOk: () => {}, + onCancel: () => {}, + onShow: () => {}, + onHide: () => {}, contents: [ { id: 'tab-basic', @@ -340,12 +351,14 @@ function test_adding_dialog_by_definition() { }); } -function test_adding_plugin() { +function test_plugins() { CKEDITOR.plugins.add( 'abbr', { init: function( editor: CKEDITOR.editor ) { // empty logic } }); + + console.log(CKEDITOR.plugins.registered['abbr']); } function test_adding_widget() { @@ -506,3 +519,82 @@ function test_editor_instance_event() { } }); } + +function test_dtd() { + var brConsideredEmptyTag = CKEDITOR.dtd.$empty['br']; + var spanCanContainText = CKEDITOR.dtd['span']['#']; + var divCanContainSpan = CKEDITOR.dtd['div']['span']; +} + +function test_getSelectedHtml() { + var textarea = document.createElement('textarea'); + var editor = CKEDITOR.replace(textarea); + + // $ExpectType documentFragment + var sel1 = editor.getSelectedHtml(); + console.log(sel1); + + // $ExpectType documentFragment + var sel2 = editor.getSelectedHtml(false); + console.log(sel2); + + // $ExpectType string + var sel3 = editor.getSelectedHtml(true); + console.log(sel3); + + // $ExpectType string | documentFragment + var sel4 = editor.getSelectedHtml(Math.random() > 0.5); + console.log(sel4); +} + +function test_element() { + var el = CKEDITOR.document.getById('myElement'); + el.addClass('class'); + console.log(el.hasClass('class')); + el.removeClass('class'); +} + +function test_selection() { + var editor = new CKEDITOR.editor(); + var testNode = CKEDITOR.document.getById('myElement'); + + var selection = editor.getSelection(); + var ranges = selection.getRanges(); + for (var i = 0, c = ranges.length; i < c; i++) { + var range = ranges[i]; + range.setStartBefore(testNode); + range.setStartAfter(testNode); + range.setEndBefore(testNode); + range.setEndAfter(testNode); + } +} + +function test_tools() { + var obj = { key: 'value' }; + CKEDITOR.tools.clone(obj); + CKEDITOR.tools.copy(obj); + CKEDITOR.tools.prototypedCopy(obj); + + console.log(CKEDITOR.tools.isArray([1])); // true + console.log(CKEDITOR.tools.isArray(obj)); // false + console.log(CKEDITOR.tools.isArray(null)); // false + console.log(CKEDITOR.tools.isArray(undefined)); // false + + CKEDITOR.tools.override(parseInt, function(_parseInt) { + return function(value: any, radix?: number) { + return _parseInt(value, radix); + }; + }); +} + +function test_htmlParser() { + var html = '
text
'; + var fragment = CKEDITOR.htmlParser.fragment.fromHtml(html); + fragment.forEach(function(node) { + if (node instanceof CKEDITOR.htmlParser.element) { + node.forEach(function(node) { + console.log(node); + }); + } + }, CKEDITOR.NODE_ELEMENT, true); +} diff --git a/types/ckeditor/index.d.ts b/types/ckeditor/index.d.ts index cf7cd0cc27..3370479bff 100644 --- a/types/ckeditor/index.d.ts +++ b/types/ckeditor/index.d.ts @@ -24,8 +24,8 @@ declare namespace CKEDITOR { var DIALOG_RESIZE_HEIGHT: number; var DIALOG_RESIZE_NONE: number; var DIALOG_RESIZE_WIDTH: number; - var DIALOG_STATE_IDLE: number; - var DIALOG_STATE_BUSY: number; + var DIALOG_STATE_IDLE: number; + var DIALOG_STATE_BUSY: number; var ELEMENT_MODE_APPENDTO: number; var ELEMENT_MODE_INLINE: number; var ELEMENT_MODE_NONE: number; @@ -44,10 +44,10 @@ declare namespace CKEDITOR { var NODE_DOCUMENT_FRAGMENT: number; var NODE_ELEMENT: number; var NODE_TEXT: number; - var POSITION_BEFORE_START: number; - var POSITION_BEFORE_END: number; - var POSITION_AFTER_START: number; - var POSITION_AFTER_END: number; + var POSITION_BEFORE_START: number; + var POSITION_BEFORE_END: number; + var POSITION_AFTER_START: number; + var POSITION_AFTER_END: number; var SELECTION_ELEMENT: number; var SELECTION_NONE: number; var SELECTION_TEXT: number; @@ -55,9 +55,9 @@ declare namespace CKEDITOR { var SHRINK_ELEMENT: number; var SHRINK_TEXT: number; var START: number; - var STYLE_BLOCK: string; - var STYLE_INLINE: string; - var STYLE_OBJECT: string; + var STYLE_BLOCK: string; + var STYLE_INLINE: string; + var STYLE_OBJECT: string; var TRISTATE_DISABLED: number; var TRISTATE_OFF: number; var TRISTATE_ON: number; @@ -80,7 +80,6 @@ declare namespace CKEDITOR { var version: string; var config: config; - // Methods function add(editor: editor): void; function addCss(css: string): void; @@ -101,6 +100,17 @@ declare namespace CKEDITOR { function replaceAll(className?: string): void; function replaceAll(assertionFunction: (textarea: HTMLTextAreaElement, config: config) => boolean): void; + // Event interface + function capture(): void; + function define(name: string, meta: Object): void; + function fire(eventName: string, data?: Object, editor?: editor): any; + function fireOnce(eventName: string, data?: Object, editor?: editor): any; + function hasListeners(eventName: string): boolean; + function on(eventName: string, listenerFunction: (eventInfo: eventInfo) => void, scopeObj?: Object, listenerData?: Object, priority?: number): void; + function once(eventName: string, listenerFunction: (eventInfo: eventInfo) => void, scopeObj?: Object, listenerData?: Object, priority?: number): void; + function removeAllListeners(): void; + function removeListener(eventName: string, listenerFunction: (eventInfo: eventInfo) => void): void; + type listenerRegistration = { removeListener: () => void; } @@ -288,7 +298,7 @@ declare namespace CKEDITOR { class elementPath { constructor(startNode: element, root: element); - constructor(startNode: element); + constructor(startNode: element); block: element; blockLimit: element; root: element; @@ -321,11 +331,11 @@ declare namespace CKEDITOR { deleteContents(mergeThen?: boolean): void; extractContents(mergeThen?: boolean): documentFragment; createBookmark(serializable?: boolean): bookmark; - createBookmark2(normalized: boolean): Object; + createBookmark2(normalized?: boolean): Object; createIterator(): iterator; moveToBookmark(bookmark: Object): void; getBoundaryNodes(): { startNode: node; endNode: node; }; - getCommonAncestor(includeSelf: boolean, ignoreTextNode: boolean): element; + getCommonAncestor(includeSelf?: boolean, ignoreTextNode?: boolean): element; optimize(): void; optimizeBookmark(): void; trim(ignoreStart?: boolean, ignoreEnd?: boolean): void; @@ -337,12 +347,14 @@ declare namespace CKEDITOR { selectNodeContents(node: node): void; setStart(startNode: node, startOffset: number): void; setEnd(endNode: node, endOffset: number): void; + setEndAfter(node: node): void; + setEndBefore(node: node): void; setStartAfter(node: node): void; setStartBefore(node: node): void; setStartAt(node: node, position: number): void; setEndAt(node: node, position: number): void; fixBlock(isStart: boolean, blockTag: Object): Object; - select(): selection; + select(): selection; splitBlock(blockTag: Object): Object; splitElement(toSplit: element): element; removeEmptyBlocksAtEnd(atEnd: boolean): void; @@ -380,8 +392,8 @@ declare namespace CKEDITOR { constructor(target: document); constructor(target: element); constructor(target: selection); - createBookmarks(serializable: Object): any[]; - createBookmarks2(normalized?: Object): any[]; + createBookmarks(serializable: Object): bookmark[]; + createBookmarks2(normalized: Object): Object[]; fake(element: element): void; getCommonAncestor(): element; getNative(): Object; @@ -406,8 +418,8 @@ declare namespace CKEDITOR { constructor(ranges: range[]); constructor(range: range); createIterator(): rangeListIterator; - createBokmark(serializable: boolean): Object[]; - createBookmark2(normalized: boolean): Object[]; + createBokmarks(serializable?: boolean): bookmark[]; + createBookmarks2(normalized?: boolean): Object[]; moveToBookmark(bookmarks: Object[]): void; } @@ -431,7 +443,7 @@ declare namespace CKEDITOR { insertAfter(node: node): node; insertBefore(node: node): node; insertBeforeMe(node: node): node; - getAddress(normalized: boolean): Object[]; + getAddress(normalized?: boolean): Object[]; getDocument(): document; getIndex(normalized?: boolean): number; getNextSourceNode(startFromSibling: Object, nodeType: Object, guard: Object): void; @@ -444,7 +456,7 @@ declare namespace CKEDITOR { getPosition(otherNode: Object): void; getAscendant(reference: string, includeSelf?: boolean): node; hasAscendant(name: Object, includeSelf: any): boolean; - move(preserveChildren?: boolean): node; + remove(preserveChildren?: boolean): node; replace(nodeToReplace: node): void; trim(): void; ltrim(): void; @@ -464,7 +476,7 @@ declare namespace CKEDITOR { constructor(domEvent: Event); getKey(): number; getKeystroke(): number; - preventDefault(stopPropagation: boolean): void; + preventDefault(stopPropagation?: boolean): void; stopPropagation(): void; getTarget(): node; getPhase(): number; @@ -836,7 +848,7 @@ declare namespace CKEDITOR { templates_files?: Object; templates_replaceContent?: boolean; title?: string | boolean; - toolbar?: string | (string | string[] | { name: string, items?: string[], groups?: string[] })[] | null; + toolbar?: string | (string | string[] | { name: string, items?: string[], groups?: string[] })[] | null; toolbarCanCollapse?: boolean; toolbarGroupCycling?: boolean; toolbarGroups?: (toolbarGroups | string)[]; @@ -869,19 +881,20 @@ declare namespace CKEDITOR { } module skin { - var icons: { [name: string]: { path: string } }; - function addIcon(name: string, path: string, offset?: number, bgsize?: string): void; - } + var icons: { [name: string]: { path: string } }; + function addIcon(name: string, path: string, offset?: number, bgsize?: string): void; + } class style { - constructor(something: { element: string, attributes: { [att: string]: string } }); - applyToRange(range: Range, editor: editor): void; - } + constructor(something: { element: string, attributes: { [att: string]: string } }); + applyToRange(range: Range, editor: editor): void; + } - interface editable extends dom.element { - hasFocus: boolean; - attachListener(obj: event | editable, eventName: string, listenerFunction: (ei: eventInfo) => void, - scopeobj?: {}, listenerData?: any, priority?: number): listenerRegistration; + class editable extends dom.element { + constructor(editor: editor, element: HTMLElement | dom.element); + hasFocus: boolean; + attachListener(obj: event | editable, eventName: string, listenerFunction: (ei: eventInfo) => void, + scopeobj?: {}, listenerData?: any, priority?: number): listenerRegistration; } @@ -978,7 +991,7 @@ declare namespace CKEDITOR { destroy(widget: CKEDITOR.plugins.widget, offline?: boolean): void; destroyAll(offline?: boolean): void; finalizeCreation(container: any): void; - focused: widget; + focused: widget; fire(eventName: string, data: Object, editor: editor): any; // should be boolean | Object getByElement(element: any, checkWrapperOnly: boolean): CKEDITOR.plugins.widget; hasListeners(eventName: string): boolean; @@ -1077,19 +1090,19 @@ declare namespace CKEDITOR { function add(name: string, definition: IPluginDefinition): void; function add(name: string): void; - function addExternal(name: string, path: string, fileName: string): void; + function addExternal(name: string, path: string, fileName?: string): void; function get(name: string): any; function getFilePath(name: string): string; function getPath(name: string): string; function load(name: string, callback: Function, scope?: Object): void; function setLang(pluginName: string, languageCode: string, languageEntries: any): void; - + var registered: {[key: string]: IPluginDefinition}; } interface IMenuItemDefinition { label:string, command:string, - icon: string + icon: string group:string, order:number } @@ -1142,7 +1155,7 @@ declare namespace CKEDITOR { createFakeParserElement(realElement: Object, className: Object, realElementType: Object, isResizable: Object): void; createRange(): dom.range; destroy(noUpdate?: boolean): void; - editable(): editable | null; + editable(): editable | null; editable(elementOrEditable: dom.element): void; editable(elementOrEditable: editable): void; elementPath(startNode?: dom.node): dom.elementPath; @@ -1155,6 +1168,9 @@ declare namespace CKEDITOR { getData(noEvents?: Object): string; getMenuItem(name: string): Object; getResizable(forContents: boolean): dom.element; + getSelectedHtml(toString?: false): dom.documentFragment; + getSelectedHtml(toString: true): string; + getSelectedHtml(toString?: boolean): CKEDITOR.dom.documentFragment | string; getSelection(forceRealSelection?: boolean): dom.selection; getSnapshot(): string; getStylesSet(callback: Function): void; @@ -1300,14 +1316,14 @@ declare namespace CKEDITOR { stop(): void; } - module filter { - interface allowedContentRules { + module filter { + interface allowedContentRules { - } - } + } + } class filter { - allow(newRules: CKEDITOR.filter.allowedContentRules, featureName?: string, overrideCustom?: boolean): boolean; + allow(newRules: CKEDITOR.filter.allowedContentRules, featureName?: string, overrideCustom?: boolean): boolean; } @@ -1370,10 +1386,28 @@ declare namespace CKEDITOR { } - class dtd { - + interface dtdDefinition { + [outerTagName: string]: {[innerTagName: string]: 1}; + $block: {[tagName: string]: 1}; + $blockLimit: {[tagName: string]: 1}; + $cdata: {[tagName: string]: 1}; + $editable: {[tagName: string]: 1}; + $empty: {[tagName: string]: 1}; + $inline: {[tagName: string]: 1}; + $intermediate: {[tagName: string]: 1}; + $list: {[tagName: string]: 1}; + $listItem: {[tagName: string]: 1}; + $nonBodyContent: {[tagName: string]: 1}; + $nonEditable: {[tagName: string]: 1}; + $object: {[tagName: string]: 1}; + $removeEmpty: {[tagName: string]: 1}; + $tabIndex: {[tagName: string]: 1}; + $tableContent: {[tagName: string]: 1}; + $transparent: {[tagName: string]: 1}; } + var dtd: dtdDefinition; + class ui extends event { constructor(editor: editor); @@ -1717,6 +1751,7 @@ declare namespace CKEDITOR { onLoad?: Function; onOk?: Function; onShow?: Function; + onHide?: Function; resizable?: number; title?: string; width?: number; @@ -1819,10 +1854,12 @@ declare namespace CKEDITOR { children: any[]; type: number; add(node: node): number; - add(node: node, index: number): void; + add(node: node, index: number): void; + addClass(className: string): void; clone(): element; filter(filter: filter): boolean; filterChildren(filter: filter): void; + forEach(callback: (node: node, type?: number) => void|false, type?: number, skipRoot?: boolean): void; writeHtml(writer: basicWriter, filter: filter): void; writeChildrenHtml(writer: basicWriter, filter: filter): void; replaceWithChildren(): void; @@ -1853,6 +1890,7 @@ declare namespace CKEDITOR { add(node: node, index?: number): void; filter(filter: filter): void; filterChildren(filter: filter, filterRoot?: boolean): void; + forEach(callback: (node: node, type?: number) => void|false, type?: number, skipRoot?: boolean): void; writeHtml(writer: basicWriter, filter?: filter): void; writeChildrenHtml(writer: basicWriter, filter?: filter, filterRoot?: boolean): void; forEach(callback: (node: node, type?: number) => boolean, type?: number, skipRoot?: boolean): void; @@ -1890,8 +1928,13 @@ declare namespace CKEDITOR { namespace tools { var callFunction: Function; + function clone(source: Object): Object; + function copy(source: Object): Object; function enableHtml5Elements(doc: Object, withAppend?: Boolean): void; + function isArray(object: any|null|undefined): object is T[]; + function override(originalFunction: T, functionBuilder: (originalFunction: T) => T): T; function parseCssText(styleText: string, normalize?: Boolean, nativeNormalize?: Boolean): { [key: string]: string } + function prototypedCopy(source: Object): Object; function writeCssText(style: { [key: string]: string }, sort?: Boolean): string; } diff --git a/types/clean-webpack-plugin/index.d.ts b/types/clean-webpack-plugin/index.d.ts index afe8a65b69..7c23e51df5 100644 --- a/types/clean-webpack-plugin/index.d.ts +++ b/types/clean-webpack-plugin/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/johnagan/clean-webpack-plugin // Definitions by: Jed Fox // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import { Plugin } from 'webpack'; diff --git a/types/clearbladejs-client/clearbladejs-client-tests.ts b/types/clearbladejs-client/clearbladejs-client-tests.ts new file mode 100644 index 0000000000..bce39bee2a --- /dev/null +++ b/types/clearbladejs-client/clearbladejs-client-tests.ts @@ -0,0 +1,193 @@ +// Testing type definitions for clearbladejs-client 1.0 +// Project: https://github.com/ClearBlade/JavaScript-API +// Definitions by: Jim Bouquet +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +let genericCallback = (error: boolean, response: Resp) => {}; + +/////////////////////////////////////// +// ClearBlade object API invocations +/////////////////////////////////////// +ClearBlade.init({ + systemKey: "abcdef", + systemSecret: "abcdefg", + callback: genericCallback +}); + +ClearBlade.setUser("test@test.com", "password"); +ClearBlade.registerUser("test@test.com", "password", genericCallback); +ClearBlade.isCurrentUserAuthenticated(genericCallback); +ClearBlade.logoutUser(genericCallback); +ClearBlade.loginAnon(genericCallback); +ClearBlade.loginUser("test@test.com", "password", genericCallback); +ClearBlade.loginUserMqtt("test@test.com", "password", genericCallback); +ClearBlade.sendPush(["user1", "user2"], {data: "Test"}, "appId: string", genericCallback); +ClearBlade.getAllCollections(genericCallback); + +let coll1 = ClearBlade.Collection("collectionID"); +let coll2 = ClearBlade.Collection({ collectionName: "collectionName" }); +let coll3 = ClearBlade.Collection({ collectionID: "collectionID" }); + +let query1 = ClearBlade.Query("collectionID"); +let query2 = ClearBlade.Query({ offset: 5, limit: 5, collectionID: "collectionID" }); +let query3 = ClearBlade.Query({ collectionName: "collectionName" }); + +let item1 = ClearBlade.Item({}, "collectionID"); +let item2 = ClearBlade.Item({}, { collectionID: "collectionID" }); + +let code = ClearBlade.Code(); +let user = ClearBlade.User(); + +let messaging = ClearBlade.Messaging({}, genericCallback); +let stats = ClearBlade.MessagingStats(); + +let edge = ClearBlade.Edge(); +let metrics = ClearBlade.Metrics(); +let device = ClearBlade.Device(); +let analytics = ClearBlade.Analytics(); +let portal = ClearBlade.Portal("MyPortal"); +let triggers = ClearBlade.Triggers(); + +ClearBlade.getEdges(query1.query, genericCallback); + +/////////////////////////////////////// +// Collection API invocations +/////////////////////////////////////// +coll1.fetch(query1.query, genericCallback); +coll1.create(ClearBlade.Item({}, ""), genericCallback); +coll1.update(query1.query, {}, genericCallback); +coll1.remove(query1.query, genericCallback); +coll1.columns(genericCallback); +coll1.count(query1.query, genericCallback); + +/////////////////////////////////////// +// Query API invocations +/////////////////////////////////////// +query1.addSortToQuery( + query1, + QuerySortDirections.QUERY_SORT_ASCENDING, + "column1" +); +query1.addFilterToQuery( + query1, + QueryConditions.QUERY_GREATERTHAN, + "key", + "value" +); +query1.ascending("string"); +query1.descending("string"); +query1.equalTo("string", "string"); +query1.greaterThan("string", 2); +query1.greaterThanEqualTo("string", false); +query1.lessThan("string", "string"); +query1.lessThanEqualTo("string", "string"); +query1.notEqualTo("string", "string"); +query1.matches("string", new RegExp(/.*/)); +query1.or(query2); +query1.setPage(1, 1); +query1.fetch(genericCallback); +query1.update({}, genericCallback); +query1.columns([]); +query1.remove(genericCallback); + +/////////////////////////////////////// +// Item API invocations +/////////////////////////////////////// +item1.save(genericCallback); +item1.refresh(genericCallback); +item1.destroy(genericCallback); + +/////////////////////////////////////// +// Code API invocations +/////////////////////////////////////// +code.create("codeName", "body: string", genericCallback); +code.update("codeName", "body: string", genericCallback); +code.delete("codeName", genericCallback); +code.execute("codeName", {}, genericCallback); +code.getCompletedServices(genericCallback); +code.getFailedServices(genericCallback); +code.getAllServices(genericCallback); + +/////////////////////////////////////// +// User API invocations +/////////////////////////////////////// +user.getUser(genericCallback); +user.setUser({}, genericCallback); +user.allUsers(query1.query, genericCallback); +user.setPassword("old_password", "new_password", genericCallback); +user.count(query1.query, genericCallback); + +/////////////////////////////////////// +// Messaging API invocations +/////////////////////////////////////// +messaging.getMessageHistoryWithTimeFrame("topic", 5, 10, 15, 20, genericCallback); +messaging.getMessageHistory("topic", 5, 15, genericCallback); +messaging.getAndDeleteMessageHistory("topic", 5, 10, 1, 20, genericCallback); +messaging.currentTopics(genericCallback); +messaging.publish("topic", {}); +messaging.publishREST("topic", { payload: Object }, genericCallback); +let mcb = (message: string) => {}; +messaging.subscribe("topic", {}, mcb); +messaging.unsubscribe("topic", {}); +messaging.disconnect(); + +/////////////////////////////////////// +// MessagingStats API invocations +/////////////////////////////////////// +stats.getAveragePayloadSize("topic: string", 5, 5, genericCallback); +stats.getOpenConnections(genericCallback); +stats.getCurrentSubscribers("topic: string", genericCallback); + +/////////////////////////////////////// +// Edge API invocations +/////////////////////////////////////// +edge.updateEdgeByName("edgename", {changedColumn: "New value"}, genericCallback); +edge.deleteEdgeByName("edgename", genericCallback); +edge.create({newEdge: Object}, "edgename", genericCallback); +edge.columns(genericCallback); +edge.count(query1.query, genericCallback); + +/////////////////////////////////////// +// Metrics API invocations +/////////////////////////////////////// +metrics.setQuery(query1.query); +metrics.getStatistics(genericCallback); +metrics.getStatisticsHistory(genericCallback); +metrics.getDBConnections(genericCallback); +metrics.getLogs(genericCallback); + +/////////////////////////////////////// +// Device API invocations +/////////////////////////////////////// +device.getDeviceByName("devicename", genericCallback); +device.updateDeviceByName("devicename", { object: Object }, true, genericCallback); +device.deleteDeviceByName("devicename", genericCallback); +device.fetch(query1.query, genericCallback); +device.update(query1.query, { object: Object }, false, genericCallback); +device.delete(query1.query, genericCallback); +device.create({ newDevice: Object }, genericCallback); +device.columns(genericCallback); +device.count(query1.query, genericCallback); + +/////////////////////////////////////// +// Analytics API invocations +/////////////////////////////////////// +analytics.getStorage({}, genericCallback); +analytics.getCount({}, genericCallback); +analytics.getEventList({}, genericCallback); +analytics.getEventTotals({}, genericCallback); +analytics.getUserEvents({}, genericCallback); + +/////////////////////////////////////// +// Portal API invocations +/////////////////////////////////////// +portal.fetch(genericCallback); +portal.update({data: Object}, genericCallback); + +/////////////////////////////////////// +// Triggers API invocations +/////////////////////////////////////// +triggers.fetchDefinitions(genericCallback); +triggers.create("triggername", {data: Object}, genericCallback); +triggers.update("triggername", {data: Object}, genericCallback); +triggers.delete("triggername", genericCallback); diff --git a/types/clearbladejs-client/global.d.ts b/types/clearbladejs-client/global.d.ts new file mode 100644 index 0000000000..d6e2e88a70 --- /dev/null +++ b/types/clearbladejs-client/global.d.ts @@ -0,0 +1,5 @@ +declare global { + var ClearBlade: ClearBladeGlobal; +} + +export {}; diff --git a/types/clearbladejs-client/index.d.ts b/types/clearbladejs-client/index.d.ts new file mode 100644 index 0000000000..4cb8c4744b --- /dev/null +++ b/types/clearbladejs-client/index.d.ts @@ -0,0 +1,436 @@ +// Type definitions for clearbladejs-client 1.0 +// Project: https://github.com/ClearBlade/JavaScript-API +// Definitions by: Jim Bouquet +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + +interface Resp { + error(msg: any): never; // todo: figure out if we can have the compiler throw an error if someone adds code after this + success(msg: any): never; +} + +declare enum MessagingQOS { + MESSAGING_QOS_AT_MOST_ONCE = 0, + MESSAGING_QOS_AT_LEAST_ONCE = 1, + MESSAGING_QOS_EXACTLY_ONCE = 2 +} + +interface InitOptions { + systemKey: string; + systemSecret: string; + masterSecret?: string; + logging?: boolean; + callback?: CbCallback; + email?: string; + password?: string; + registerUser?: boolean; + useUser?: APIUser; + URI?: string; + messagingURI?: string; + messagingPort?: number; + defaultQoS?: MessagingQOS; + callTimeout?: number; + messagingAuthPort?: number; +} + +interface RequestOptions { + method?: string; + endpoint?: string; + body?: string; + qs?: string; + URI?: string; + useUser?: boolean; + authToken?: string; + timeout?: number; + user?: APIUser; +} + +interface APIUser { + email: string; + authToken: string; +} + +type CbCallback = (error: boolean, response: Resp) => void; + +interface ClearBladeGlobal extends ClearBladeInt { + MESSAGING_QOS_AT_MOST_ONCE: MessagingQOS.MESSAGING_QOS_AT_MOST_ONCE; + MESSAGING_QOS_AT_LEAST_ONCE: MessagingQOS.MESSAGING_QOS_AT_LEAST_ONCE; + MESSAGING_QOS_EXACTLY_ONCE: MessagingQOS.MESSAGING_QOS_EXACTLY_ONCE; + + request(options: RequestOptions, callback: CbCallback): void; +} + +interface ClearBladeInt { + systemKey: string; + systemSecret: string; + masterSecret: string; + URI: string; + messagingURI: string; + messagingPort: number; + logging: boolean; + defaultQoS: MessagingQOS; + + init(options: InitOptions): void; + setUser(email: string, password: string): void; + registerUser(email: string, password: string, callback: CbCallback): void; + isCurrentUserAuthenticated(callback: CbCallback): void; + logoutUser(callback: CbCallback): void; + loginAnon(callback: CbCallback): void; + loginUser(email: string, password: string, callback: CbCallback): void; + loginUserMqtt(email: string, password: string, callback: CbCallback): void; + registerMasterCallback(callback: CbCallback): void; + Collection(options: string | CollectionOptionsWithName | CollectionOptionsWithID): Collection; + Query( + options: string | QueryOptionsWithName | QueryOptionsWithID + ): QueryObj; + Item(data: object, collectionID: string | ItemOptions): Item; + Code(): Code; + User(): AppUser; + Messaging(options: MessagingOptions, callback: CbCallback): Messaging; + MessagingStats(): MessagingStats; + sendPush( + users: string[], + payload: object, + appId: string, + callback: CbCallback + ): void; + getEdges(query: Query, callback: CbCallback): void; + Edge(): Edge; + Metrics(): Metrics; + Device(): Device; + Analytics(): Analytics; + Portal(name: string): Portal; + Triggers(): Triggers; + + getAllCollections(callback: CbCallback): void; +} +interface CollectionOptionsWithName { + collectionName: string; +} + +interface CollectionOptionsWithID { + collectionID: string; +} + +interface Collection { + name: string; + endpoint: string; + isUsingCollectionName: boolean; + user: APIUser; + URI: string; + systemKey: string; + systemSecret: string; + + fetch(query: Query, callback: CbCallback): void; + create(newItem: Item, callback: CbCallback): void; + update(query: Query, changes: object, callback: CbCallback): void; + remove(query: Query, callback: CbCallback): void; + columns(callback: CbCallback): void; + count(query: Query, callback: CbCallback): void; +} + +declare enum QuerySortDirections { + QUERY_SORT_ASCENDING = "ASC", + QUERY_SORT_DESCENDING = "DESC" +} + +declare enum QueryConditions { + QUERY_EQUAL = "EQ", + QUERY_NOTEQUAL = "NEQ", + QUERY_GREATERTHAN = "GT", + QUERY_GREATERTHAN_EQUAL = "GTE", + QUERY_LESSTHAN = "LT", + QUERY_LESSTHAN_EQUAL = "LTE", + QUERY_MATCHES = "RE" +} + +type QueryValue = string | number | boolean; + +interface QueryOptions { + offset?: number; + limit?: number; +} + +interface QueryOptionsWithName + extends CollectionOptionsWithName, + QueryOptions {} +interface QueryOptionsWithID extends CollectionOptionsWithID, QueryOptions {} + +interface Query { + SELECTCOLUMNS?: string[]; + SORT?: QuerySortDirections; + FILTERS?: QueryFilter[]; + PAGESIZE?: number; + PAGENUM?: number; +} + +interface QueryFilter { + [QueryConditions: string]: QueryFilterValue; +} + +interface QueryFilterValue { + [name: string]: QueryValue; +} + +interface QueryObj { + endpoint: string; + user: APIUser; + URI: string; + systemKey: string; + systemSecret: string; + query: Query; + OR: Query[]; + offset: number; + limit: number; + + addSortToQuery( + query: QueryObj, + direction: QuerySortDirections, + column: string + ): void; + addFilterToQuery( + query: QueryObj, + condition: QueryConditions, + key: string, + value: QueryValue + ): void; + ascending(field: string): void; + descending(field: string): void; + equalTo(field: string, value: QueryValue): void; + greaterThan(field: string, value: QueryValue): void; + greaterThanEqualTo(field: string, value: QueryValue): void; + lessThan(field: string, value: QueryValue): void; + lessThanEqualTo(field: string, value: QueryValue): void; + notEqualTo(field: string, value: QueryValue): void; + matches(field: string, pattern: RegExp): void; + or(query: QueryObj): void; + setPage(pageSize: number, pageNum: number): void; + fetch(callback: CbCallback): void; + update(changes: object, callback: CbCallback): void; + columns(columnsArray: string[]): void; + remove(callback: CbCallback): void; +} + +interface ItemOptions extends CollectionOptionsWithID {} + +interface Item { + data: object; + + save(callback: CbCallback): void; + refresh(callback: CbCallback): void; + destroy(callback: CbCallback): void; +} + +interface Code { + user: APIUser; + URI: string; + systemKey: string; + systemSecret: string; + callTimeout: number; + + create(name: string, body: string, callback: CbCallback): void; + update(name: string, body: string, callback: CbCallback): void; + delete(name: string, callback: CbCallback): void; + execute(name: string, params: object, callback: CbCallback): void; + getCompletedServices(callback: CbCallback): void; + getFailedServices(callback: CbCallback): void; + getAllServices(callback: CbCallback): void; +} + +interface AppUser { + user: APIUser; + URI: string; + endpoint: string; + systemKey: string; + systemSecret: string; + callTimeout: number; + + getUser(callback: CbCallback): void; + setUser(data: object, callback: CbCallback): void; + allUsers(query: Query, callback: CbCallback): void; + setPassword( + old_password: string, + new_password: string, + callback: CbCallback + ): void; + count(query: Query, callback: CbCallback): void; +} + +interface Messaging { + user: APIUser; + URI: string; + endpoint: string; + systemKey: string; + systemSecret: string; + callTimeout: number; + client: Paho.MQTT.Client; + + getMessageHistoryWithTimeFrame( + topic: string, + count: number, + last: number, + start: number, + stop: number, + callback: CbCallback + ): void; + getMessageHistory( + topic: string, + last: number, + count: number, + callback: CbCallback + ): void; + getAndDeleteMessageHistory( + topic: string, + count: number, + last: number, + start: number, + stop: number, + callback: CbCallback + ): void; + currentTopics(callback: CbCallback): void; + publish(topic: string, payload: object): void; + publishREST(topic: string, payload: object, callback: CbCallback): void; + subscribe( + topic: string, + options: MessagingSubscribeOptions, + messageCallback: MessageCallback + ): void; + unsubscribe(topic: string, options: MessagingSubscribeOptions): void; + disconnect(): void; +} + +interface CommonMessagingProperties { + cleanSession?: boolean; + useSSL?: boolean; + hosts?: string; + ports?: string; + onSuccess?: Function; + onFailure?: Function; +} + +interface MessagingOptions extends CommonMessagingProperties { + qos?: MessagingQOS; +} + +interface MessagingConfiguration extends CommonMessagingProperties { + userName: string; + password: string; +} + +type MessageCallback = (message: string) => void; + +interface MessagingSubscribeOptions { + qos?: MessagingQOS; + invocationContext?: object; + onSuccess?: Function; + onFailure?: Function; + timeout?: number; +} + +interface MessagingStats { + user: APIUser; + URI: string; + endpoint: string; + systemKey: string; + + getAveragePayloadSize( + topic: string, + start: number, + stop: number, + callback: CbCallback + ): void; + getOpenConnections(callback: CbCallback): void; + getCurrentSubscribers(topic: string, callback: CbCallback): void; +} + +interface Edge { + user: APIUser; + URI: string; + systemKey: string; + systemSecret: string; + + updateEdgeByName(name: string, object: object, callback: CbCallback): void; + deleteEdgeByName(name: string, callback: CbCallback): void; + create(newEdge: object, name: string, callback: CbCallback): void; + columns(callback: CbCallback): void; + count(query: Query, callback: CbCallback): void; +} + +interface Metrics { + user: APIUser; + URI: string; + systemKey: string; + + setQuery(query: Query): void; + getStatistics(callback: CbCallback): void; + getStatisticsHistory(callback: CbCallback): void; + getDBConnections(callback: CbCallback): void; + getLogs(callback: CbCallback): void; +} + +interface Device { + user: APIUser; + URI: string; + systemKey: string; + systemSecret: string; + + getDeviceByName(name: string, callback: CbCallback): void; + updateDeviceByName( + name: string, + object: object, + trigger: boolean, + callback: CbCallback + ): void; + deleteDeviceByName(name: string, callback: CbCallback): void; + fetch(query: Query, callback: CbCallback): void; + update( + query: Query, + object: object, + trigger: boolean, + callback: CbCallback + ): void; + delete(query: Query, callback: CbCallback): void; + create(newDevice: object, callback: CbCallback): void; + columns(callback: CbCallback): void; + count(query: Query, callback: CbCallback): void; +} + +interface Analytics { + user: APIUser; + URI: string; + systemKey: string; + systemSecret: string; + + getStorage(filter: QueryFilter, callback: CbCallback): void; + getCount(filter: QueryFilter, callback: CbCallback): void; + getEventList(filter: QueryFilter, callback: CbCallback): void; + getEventTotals(filter: QueryFilter, callback: CbCallback): void; + getUserEvents(filter: QueryFilter, callback: CbCallback): void; +} + +interface Portal { + name: string; + user: APIUser; + URI: string; + systemKey: string; + systemSecret: string; + + fetch(callback: CbCallback): void; + update(data: object, callback: CbCallback): void; +} + +interface Triggers { + user: APIUser; + URI: string; + systemKey: string; + systemSecret: string; + + fetchDefinitions(callback: CbCallback): void; + create(name: string, data: object, callback: CbCallback): void; + update(name: string, data: object, callback: CbCallback): void; + delete(name: string, callback: CbCallback): void; +} + +declare var ClearBlade: ClearBladeGlobal; diff --git a/types/clearbladejs-client/tsconfig.json b/types/clearbladejs-client/tsconfig.json new file mode 100644 index 0000000000..7821d7db9e --- /dev/null +++ b/types/clearbladejs-client/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "target": "ES5", + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "clearbladejs-client-tests.ts", + "global.d.ts" + ], + "exclude": [ + "**/clearbladejs-node/*", + "**/clearbladejs-server/*" + ] +} \ No newline at end of file diff --git a/types/clearbladejs-client/tslint.json b/types/clearbladejs-client/tslint.json new file mode 100644 index 0000000000..d538486d5e --- /dev/null +++ b/types/clearbladejs-client/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "ban-types": false, + "no-empty-interface": false + } +} \ No newline at end of file diff --git a/types/clearbladejs-node/clearbladejs-node-tests.ts b/types/clearbladejs-node/clearbladejs-node-tests.ts new file mode 100644 index 0000000000..e9cb585d50 --- /dev/null +++ b/types/clearbladejs-node/clearbladejs-node-tests.ts @@ -0,0 +1,124 @@ +// Testing type definitions for clearbladejs-node 1.0 +// Project: https://github.com/ClearBlade/Node-SDK +// Definitions by: Jim Bouquet +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { ClearBlade, Resp, QuerySortDirections, QueryConditions } from "."; + +// Sample code for clearbladejs Node SDK v1.0.0 used to test typescript definitions + +const genericCallback = (error: boolean, response: Resp) => {}; + +/////////////////////////////////////// +// ClearBlade object API invocations +/////////////////////////////////////// +ClearBlade.init({ + email: "a@a.com", + password: "a", + systemKey: "testkey", + systemSecret: "testsecret", + URI: "https://mycbplatform.com", + messagingURI: "mycbplatform.com", + callback: genericCallback +}); + +ClearBlade.setUser("test@test.com", "password"); +ClearBlade.registerUser("test@test.com", "password", genericCallback); +ClearBlade.isCurrentUserAuthenticated(genericCallback); +if (!ClearBlade.isObjectEmpty({prop: "test"})) { + ClearBlade.logger("Object is not empty"); +} + +ClearBlade.validateEmailPassword("test@test.com", "password"); + +ClearBlade.logoutUser(genericCallback); +ClearBlade.loginAnon(genericCallback); +ClearBlade.loginUser("test@test.com", "password", genericCallback); + +ClearBlade.sendPush([], {}, "appId: string", genericCallback); + +// execute(error: Object, response: Object, callback: ClearBladeCallback): void; +// makeKVPair(key: string, value: string): KeyValuePair; +// request(options: RequestOptions, callback: RequestCallback): void; + +const coll1 = ClearBlade.Collection("collectionID"); +const coll2 = ClearBlade.Collection({collectionName: "collectionName"}); +const coll3 = ClearBlade.Collection({collectionID: "collectionID"}); + +const query1 = ClearBlade.Query("collectionID"); +const query2 = ClearBlade.Query({offset: 5, limit: 5, collectionID: "collectionID"}); +const query3 = ClearBlade.Query({collectionName: "collectionName"}); +const query4 = ClearBlade.Query({collection: "collectionID"}); + +ClearBlade.addToQuery(query1, "key", "value"); +ClearBlade.addFilterToQuery(query1, QueryConditions.QUERY_GREATERTHAN, "key", "value"); +ClearBlade.addSortToQuery(query1, QuerySortDirections.QUERY_SORT_ASCENDING, "column1"); + +const opQueryStr = ClearBlade.parseOperationQuery(query1.query); +const parse1: string = ClearBlade.parseQuery(query1.query); +const parse2: string = ClearBlade.parseQuery(query1); + +const item1 = ClearBlade.Item({}, "hello"); +const item2 = ClearBlade.Item({}, {collectionID: "hello"}); + +const code = ClearBlade.Code(); +const user = ClearBlade.User(); + +const messaging = ClearBlade.Messaging({}, genericCallback); + +/////////////////////////////////////// +// Collection API invocations +/////////////////////////////////////// +coll1.fetch(query1, genericCallback); +coll1.create(ClearBlade.Item({}, ""), genericCallback); +coll1.update(query1.query, {}, genericCallback); +coll1.remove(query1.query, genericCallback); + +/////////////////////////////////////// +// Query API invocations +/////////////////////////////////////// +query1.ascending("string"); +query1.descending("string"); +query1.equalTo("string", "string"); +query1.greaterThan("string", 2); +query1.greaterThanEqualTo("string", false); +query1.lessThan("string", "string"); +query1.lessThanEqualTo("string", "string"); +query1.notEqualTo("string", "string"); +query1.or(query2); +query1.setPage(1, 1); +query1.fetch(genericCallback); +query1.update({}, genericCallback); +query1.remove(genericCallback); + +/////////////////////////////////////// +// Item API invocations +/////////////////////////////////////// +item1.save(); +item1.refresh(); +item1.destroy(); + +/////////////////////////////////////// +// Code API invocations +/////////////////////////////////////// +code.execute("codeName", {}, genericCallback); + +/////////////////////////////////////// +// User API invocations +/////////////////////////////////////// +user.getUser(genericCallback); +user.setUser({}, genericCallback); +user.allUsers(query1.query, genericCallback); + +/////////////////////////////////////// +// Messaging API invocations +/////////////////////////////////////// +messaging.getMessageHistory("topic: string", 5, 15, genericCallback); + +messaging.publish("topic: string", {}); + +messaging.subscribe("my/topic", {}, messageReceivedCb); + +function messageReceivedCb(message: string) { + messaging.unsubscribe("my/topic"); +} diff --git a/types/clearbladejs-node/index.d.ts b/types/clearbladejs-node/index.d.ts new file mode 100644 index 0000000000..192b1a97ee --- /dev/null +++ b/types/clearbladejs-node/index.d.ts @@ -0,0 +1,249 @@ +// Type definitions for clearbladejs-node 1.0 +// Project: https://github.com/ClearBlade/Node-SDK +// Definitions by: Jim Bouquet +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + +import { Response, RequestCallback } from "request/index"; +// import {//PacketCallback } from "mqtt"; + +export enum MessagingQOS { + MESSAGING_QOS_AT_MOST_ONCE = 0, + MESSAGING_QOS_AT_LEAST_ONCE = 1, + MESSAGING_QOS_EXACTLY_ONCE = 2 +} + +export interface Resp { + error(msg: any): never; + success(msg: any): never; +} + +export interface InitOptions { + systemKey: string; + systemSecret: string; + logging?: boolean; + callback?: CbCallback; + email?: string; + password?: string; + registerUser?: boolean; + useUser?: APIUser; + URI?: string; + messagingURI?: string; + messagingPort?: number; + defaultQoS?: MessagingQOS; + callTimeout?: number; +} + +export interface RequestOptions { + systemKey: string; + systemSecret: string; + method?: string; + endpoint?: string; + body?: string; + qs?: string; + URI?: string; + useUser?: boolean; + authToken?: string; + user?: APIUser; +} + +export interface APIUser { + email: string; + authToken: string; +} + +export interface KeyValuePair { + [key: string]: any; +} + +export type CbCallback = (error: boolean, response: Resp) => void; + +export default interface ClearBladeGlobal extends ClearBladeInt { + isCurrentUserAuthenticated(callback: CbCallback): void; +} + +export interface ClearBladeInt { + addToQuery(queryObj: QueryObj, key: string, value: string): void; + addFilterToQuery(queryObj: QueryObj, condition: QueryConditions, key: string, value: QueryValue): void; + addSortToQuery(queryObj: QueryObj, direction: QuerySortDirections, column: string): void; + Code(): Code; + Collection(options: string | CollectionOptionsWithName | CollectionOptionsWithID): Collection; + execute(error: object, response: object, callback: CbCallback): void; + init(options: InitOptions): void; + isObjectEmpty(obj: object): boolean; + Item(data: object, options: string | ItemOptions): Item; + logger(message: string): void; + loginAnon(callback: CbCallback): void; + loginUser(email: string, password: string, callback: CbCallback): void; + logoutUser(callback: CbCallback): void; + makeKVPair(key: string, value: string): KeyValuePair; + parseOperationQuery(query: Query): string; + parseQuery(query: Query | QueryObj): string; + Query(options: string | QueryOptionsWithCollection | QueryOptionsWithName | QueryOptionsWithID): QueryObj; + registerUser(email: string, password: string, callback: CbCallback): void; + request(options: RequestOptions, callback: RequestCallback): void; + setUser(email: string, password: string): void; + User(): AppUser; + Messaging(options: MessagingOptions, callback: CbCallback): Messaging; + sendPush(users: string[], payload: object, appId: string, callback: CbCallback): void; + validateEmailPassword(email: string, password: string): void; +} + +export interface CollectionOptionsWithName { + collectionName: string; +} + +export interface CollectionOptionsWithID { + collectionID: string; +} + +export interface Collection { + endpoint: string; + user: APIUser; + URI: string; + systemKey: string; + systemSecret: string; + + fetch(query: QueryObj, callback: CbCallback): void; + create(newItem: Item, callback: CbCallback): void; + update(query: Query, changes: object, callback: CbCallback): void; + remove(query: Query, callback: CbCallback): void; +} + +export enum QuerySortDirections { + QUERY_SORT_ASCENDING = 'ASC', + QUERY_SORT_DESCENDING = 'DESC' +} + +export enum QueryConditions { + QUERY_EQUAL = 'EQ', + QUERY_NOTEQUAL = 'NEQ', + QUERY_GREATERTHAN = 'GT', + QUERY_GREATERTHAN_EQUAL = 'GTE', + QUERY_LESSTHAN = 'LT', + QUERY_LESSTHAN_EQUAL = 'LTE', + QUERY_MATCHES = 'RE' +} + +export type QueryValue = string|number|boolean; + +export interface QueryOptions { + offset?: number; + limit?: number; +} + +export interface QueryOptionsWithCollection extends QueryOptions { + collection: string; +} + +export interface QueryOptionsWithName extends CollectionOptionsWithName, QueryOptions {} + +export interface QueryOptionsWithID extends CollectionOptionsWithID, QueryOptions {} + +export interface Query { + SELECTCOLUMNS?: string[]; + SORT?: QuerySortDirections; + FILTERS?: QueryFilter[]; + PAGESIZE?: number; + PAGENUM?: number; +} + +export interface QueryFilter { + [QueryConditions: string]: QueryFilterValue; +} + +export interface QueryFilterValue { + [name: string]: QueryValue; +} + +export interface QueryObj { + endpoint: string; + user: APIUser; + URI: string; + systemKey: string; + systemSecret: string; + query: Query; + OR: Query[]; + offset: number; + limit: number; + + ascending(field: string): Query; + descending(field: string): Query; + equalTo(field: string, value: QueryValue): Query; + greaterThan(field: string, value: QueryValue): Query; + greaterThanEqualTo(field: string, value: QueryValue): Query; + lessThan(field: string, value: QueryValue): Query; + lessThanEqualTo(field: string, value: QueryValue): Query; + notEqualTo(field: string, value: QueryValue): Query; + matches(field: string, pattern: string): Query; + or(query: QueryObj): Query; + setPage(pageSize: number, pageNum: number): Query; + fetch(callback: CbCallback): void; + update(changes: object, callback: CbCallback): void; + remove(callback: CbCallback): void; +} + +export interface ItemOptions extends CollectionOptionsWithID {} + +export interface Item { + data: object; + + save(): void; + refresh(): void; + destroy(): void; +} + +export interface Code { + user: APIUser; + URI: string; + systemKey: string; + systemSecret: string; + callTimeout: number; + URIPrefix: string; + + execute(name: string, params: object, callback: CbCallback): void; +} + +export interface AppUser { + user: APIUser; + URI: string; + systemKey: string; + systemSecret: string; + + getUser(callback: CbCallback): void; + setUser(data: object, callback: CbCallback): void; + allUsers(query: Query, callback: CbCallback): void; +} + +export interface Messaging { + user: APIUser; + URI: string; + systemKey: string; + systemSecret: string; + client: object; + + getMessageHistory(topic: string, startTime: number, count: number, callback: CbCallback): void; + publish(topic: string, payload: object): void; + subscribe(topic: string, options: MessagingSubscribeOptions, messageCallback: MessageCallback): void; + unsubscribe(topic: string, callback?: (error?: Error, packet?: object) => any): void; +} + +export interface CommonMessagingProperties { + hosts?: string; + ports?: string; +} + +export interface MessagingOptions extends CommonMessagingProperties { + qos?: MessagingQOS; +} + +export interface MessagingSubscribeOptions { + qos?: MessagingQOS; + timeout?: number; +} + +export type MessageCallback = (message: string) => void; + +export let ClearBlade: ClearBladeGlobal; diff --git a/types/clearbladejs-node/tsconfig.json b/types/clearbladejs-node/tsconfig.json new file mode 100644 index 0000000000..67aea82d3f --- /dev/null +++ b/types/clearbladejs-node/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compileOnSave": true, + "compilerOptions": { + "target": "ES5", + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "clearbladejs-node-tests.ts" + ], + "exclude": [ + "**/clearbladejs-client/*", + "**/clearbladejs-server/*" + ] +} \ No newline at end of file diff --git a/types/clearbladejs-node/tslint.json b/types/clearbladejs-node/tslint.json new file mode 100644 index 0000000000..2e3f95d861 --- /dev/null +++ b/types/clearbladejs-node/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "no-empty-interface": false, + "no-relative-import-in-test": false + } +} \ No newline at end of file diff --git a/types/clearbladejs-server/clearbladejs-server-tests.ts b/types/clearbladejs-server/clearbladejs-server-tests.ts new file mode 100644 index 0000000000..d240f181ea --- /dev/null +++ b/types/clearbladejs-server/clearbladejs-server-tests.ts @@ -0,0 +1,192 @@ +// Testing type definitions for clearbladejs-server 1.0 +// Project: https://github.com/ClearBlade/JavaScript-API +// Definitions by: Jim Bouquet +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +const genericCallback = (error: boolean, response: Resp) => {}; + +/////////////////////////////////////// +// ClearBlade object API invocations +/////////////////////////////////////// +ClearBlade.init({ + systemKey: "abcdef", + systemSecret: "abcdefg", + callback: genericCallback +}); + +ClearBlade.init({request: { + isLogging: false, + params: { + param1: "1", + param2: 2 + }, + systemKey: "abcdef", + systemSecret: "abcdef", + userEmail: "test@test.com", + userToken: "abcdef", + userid: "abcdef", +}}); + +const about = ClearBlade.about(); +ClearBlade.setUser("test@test.com", "authtoken", "userId"); +ClearBlade.registerUser("test@test.com", "password", genericCallback); +ClearBlade.isCurrentUserAuthenticated(genericCallback); +ClearBlade.logoutUser(genericCallback); +ClearBlade.loginAnon(genericCallback); +ClearBlade.loginUser("test@test.com", "password", genericCallback); + +ClearBlade.getAllCollections(genericCallback); +const edgeID = ClearBlade.edgeId(); +const isEdge = ClearBlade.isEdge(genericCallback); +if (ClearBlade.isObjectEmpty({test: "test"})) { + ClearBlade.logger("Object is empty"); +} +const kvPair = ClearBlade.makeKVPair("key", "value"); + +const coll1 = ClearBlade.Collection("collectionID"); +const coll2 = ClearBlade.Collection({ collectionName: "collectionName" }); +const coll3 = ClearBlade.Collection({ collectionID: "collectionID" }); +const coll4 = ClearBlade.Collection({ collection: "collectionID" }); + +const query1 = ClearBlade.Query({ collectionID: "collectionID" }); +const query2 = ClearBlade.Query({ collectionName: "collectionName" }); +const query3 = ClearBlade.Query({ collection: "collectionID" }); + +const item1 = ClearBlade.Item({}, "collectionID"); +const item2 = ClearBlade.Item({}, { collectionID: "collectionID" }); + +const code = ClearBlade.Code(); +const deployment = ClearBlade.Deployment(); +const user = ClearBlade.User(); + +const messaging = ClearBlade.Messaging({}, genericCallback); + +const device = ClearBlade.Device(); + +ClearBlade.addToQuery(query1, "key", "value"); +ClearBlade.addSortToQuery( + query1, + QuerySortDirections.QUERY_SORT_ASCENDING, + "column1" +); +ClearBlade.addFilterToQuery( + query1, + QueryConditions.QUERY_GREATERTHAN, + "key", + "value" +); + +ClearBlade.newCollection("collectionName", genericCallback); + +const parseOperation = ClearBlade.parseOperationQuery(query1.query); +const parseQuery1 = ClearBlade.parseQuery(query1); +const parseQuery2 = ClearBlade.parseQuery(query1.query); + +ClearBlade.createDevice("devicename", {type: "devicetype"}, false, genericCallback); +ClearBlade.deleteDevice("devicename", true, genericCallback); +ClearBlade.updateDevice("devicename", {type: "devicetype"}, true, genericCallback); +ClearBlade.getDeviceByName("devicename", genericCallback); +ClearBlade.getAllDevicesForSystem(genericCallback); +ClearBlade.validateEmailPassword("test@test.com", "password"); + +/////////////////////////////////////// +// Collection API invocations +/////////////////////////////////////// +coll1.addColumn({name: "column1"}, genericCallback); +coll1.dropColumn("column1", genericCallback); +coll1.deleteCollection(genericCallback); +coll1.fetch(query1.query, genericCallback); +coll1.create(ClearBlade.Item({}, ""), genericCallback); +coll1.update(query1.query, {}, genericCallback); +coll1.remove(query1.query, genericCallback); +coll1.columns(genericCallback); +coll1.count(query1.query, genericCallback); + +/////////////////////////////////////// +// Query API invocations +/////////////////////////////////////// +query2.ascending("string"); +query1.descending("string"); +query1.equalTo("string", "string"); +query1.greaterThan("string", 2); +query1.greaterThanEqualTo("string", false); +query1.lessThan("string", "string"); +query1.lessThanEqualTo("string", "string"); +query1.notEqualTo("string", "string"); +query1.matches("string", ".*"); +query1.or(query2); +query1.setPage(1, 1); +query1.fetch(genericCallback); +query1.update({}, genericCallback); +query1.columns([]); +query1.remove(genericCallback); + +/////////////////////////////////////// +// Item API invocations +/////////////////////////////////////// +item1.save(); +item1.refresh(); +item1.destroy(); + +/////////////////////////////////////// +// Code API invocations +/////////////////////////////////////// +code.execute("codeName", {}, true, genericCallback); +code.getAllServices(genericCallback); + +/////////////////////////////////////// +// Deployment API invocations +/////////////////////////////////////// +deployment.create("deploymentname", "deployment description", {}, genericCallback); +deployment.update("deploymentname", {}, genericCallback); +deployment.delete("deploymentname", genericCallback); +deployment.read("deploymentname", genericCallback); +deployment.readAll(query1, genericCallback); + +/////////////////////////////////////// +// User API invocations +/////////////////////////////////////// +user.getUser(genericCallback); +user.setUser({}, genericCallback); +user.setUsers(query2, {name: "Fred"}, genericCallback); +user.allUsers(query1, genericCallback); +user.count(query1, genericCallback); + +/////////////////////////////////////// +// Messaging API invocations +/////////////////////////////////////// +messaging.getMessageHistoryWithTimeFrame("topic", 5, 10, 15, 20, genericCallback); +messaging.getMessageHistory("topic", 5, 15, genericCallback); +messaging.getAndDeleteMessageHistory("topic", 5, 10, 1, 20, genericCallback); +messaging.getCurrentTopics(genericCallback); +messaging.publish("topic", "payload"); + +/////////////////////////////////////// +// Device API invocations +/////////////////////////////////////// +device.fetch(query1.query, genericCallback); +device.update(query1.query, { object: Object }, genericCallback); +device.delete(query1.query, genericCallback); +device.create({ newDevice: Object }, genericCallback); + +/////////////////////////////////////// +// Triggers API invocations +/////////////////////////////////////// +ClearBlade.Trigger.Create( + "triggername", + { + system_key: "key", + name: "triggername", + def_module: TriggerModule.DEVICE, + def_name: "someName", + key_value_pairs: [], + service_name: "ServiceName" + }, + genericCallback); +ClearBlade.Trigger.Fetch("triggername", genericCallback); + +/////////////////////////////////////// +// Timers API invocations +/////////////////////////////////////// +ClearBlade.Timer.Create("timername", {}, genericCallback); +ClearBlade.Timer.Fetch("timername", genericCallback); diff --git a/types/clearbladejs-server/global.d.ts b/types/clearbladejs-server/global.d.ts new file mode 100644 index 0000000000..d6e2e88a70 --- /dev/null +++ b/types/clearbladejs-server/global.d.ts @@ -0,0 +1,5 @@ +declare global { + var ClearBlade: ClearBladeGlobal; +} + +export {}; diff --git a/types/clearbladejs-server/index.d.ts b/types/clearbladejs-server/index.d.ts new file mode 100644 index 0000000000..fb3ef065ce --- /dev/null +++ b/types/clearbladejs-server/index.d.ts @@ -0,0 +1,335 @@ +// Type definitions for clearbladejs-server 1.0 +// Project: https://docs.clearblade.com/v/3/4-developer_reference/platformsdk/ClearBlade.js/ +// Definitions by: Jim Bouquet +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + +interface BasicReq { + readonly isLogging: boolean; + readonly params: { + [id: string]: any; + }; + readonly systemKey: string; + readonly systemSecret: string; + readonly userEmail: string; + readonly userToken: string; + readonly userid: string; +} +type ReqTypes = BasicReq; +declare var req: ReqTypes; +interface Resp { + error(msg: any): never; + success(msg: any): never; +} +declare var resp: Resp; + +declare enum MessagingQOS { + MESSAGING_QOS_AT_MOST_ONCE = 0, + MESSAGING_QOS_AT_LEAST_ONCE = 1, + MESSAGING_QOS_EXACTLY_ONCE = 2 +} + +interface InitOptions { + systemKey: string; + systemSecret: string; + logging?: boolean; + callback?: CbCallback; + authToken?: string; + userToken?: string; + email?: string; + password?: string; + registerUser?: boolean; + useUser?: APIUser; + URI?: string; + messagingURI?: string; + messagingPort?: number; + defaultQoS?: MessagingQOS; + callTimeout?: number; +} + +interface APIUser { + email: string; + authToken: string; + user_id?: string; +} + +interface KeyValuePair { + [key: string]: any; +} + +type CbCallback = (error: boolean, response: Resp) => void; + +interface ClearBladeGlobal extends ClearBladeInt { + user: APIUser; +} + +interface ClearBladeInt { + Trigger: TriggerClass; + Timer: TimerClass; + + about(): string; + addToQuery(queryObj: QueryObj, key: string, value: string): void; + addFilterToQuery(queryObj: QueryObj, condition: QueryConditions, key: string, value: QueryValue): void; + addSortToQuery(queryObj: QueryObj, direction: QuerySortDirections, column: string): void; + Code(): Code; + Collection(options: string | CollectionOptionsWithName | CollectionOptionsWithID | CollectionOptionsWithCollection): Collection; + Deployment(): Deployment; + Device(): Device; + edgeId(): string; + execute(error: object, response: object, callback: CbCallback): any; + getAllCollections(callback: CbCallback): void; + http(): object; + init(options: InitOptions | {request: BasicReq}): void; + isEdge(callback: CbCallback): boolean; + isCurrentUserAuthenticated(callback: CbCallback): void; + isObjectEmpty(obj: object): boolean; + Item(data: object, options: string | ItemOptions): Item; + logger(message: string): void; + loginAnon(callback: CbCallback): void; + loginUser(email: string, password: string, callback: CbCallback): void; + logoutUser(callback: CbCallback): void; + makeKVPair(key: string, value: string): KeyValuePair; + Messaging(options: MessagingOptions, callback: CbCallback): Messaging; + newCollection(name: string, callback: CbCallback): void; + Query(options: QueryOptionsWithCollection | QueryOptionsWithName | QueryOptionsWithID): QueryObj; + parseOperationQuery(query: Query): string; + parseQuery(query: Query | QueryObj): string; + registerUser(email: string, password: string, callback: CbCallback): void; + setUser(email: string, authToken: string, userId: string): void; + User(): AppUser; + + createDevice(name: string, data: object, causeTrigger: boolean, callback: CbCallback): void; + deleteDevice(name: string, causeTrigger: boolean, callback: CbCallback): void; + updateDevice(name: string, data: object, causeTrigger: boolean, callback: CbCallback): void; + getDeviceByName(name: string, callback: CbCallback): void; + getAllDevicesForSystem(callback: CbCallback): void; + validateEmailPassword(email: string, password: string): void; +} + +interface CollectionOptionsWithCollection { + collection: string; +} + +interface CollectionOptionsWithName { + collectionName: string; +} + +interface CollectionOptionsWithID { + collectionID: string; +} + +interface Collection { + user: APIUser; + URI: string; + systemKey: string; + systemSecret: string; + + addColumn(options: object, callback: CbCallback): void; + dropColumn(name: string, callback: CbCallback): void; + deleteCollection(callback: CbCallback): void; + fetch(query: Query, callback: CbCallback): void; + create(newItem: Item, callback: CbCallback): void; + update(query: Query, changes: object, callback: CbCallback): void; + remove(query: Query, callback: CbCallback): void; + columns(callback: CbCallback): void; + count(query: Query, callback: CbCallback): void; +} + +declare enum QuerySortDirections { + QUERY_SORT_ASCENDING = 'ASC', + QUERY_SORT_DESCENDING = 'DESC' +} + +declare enum QueryConditions { + QUERY_EQUAL = 'EQ', + QUERY_NOTEQUAL = 'NEQ', + QUERY_GREATERTHAN = 'GT', + QUERY_GREATERTHAN_EQUAL = 'GTE', + QUERY_LESSTHAN = 'LT', + QUERY_LESSTHAN_EQUAL = 'LTE', + QUERY_MATCHES = 'RE' +} + +type QueryValue = string|number|boolean; + +interface QueryOptions { + offset?: number; + limit?: number; +} + +interface QueryOptionsWithCollection extends CollectionOptionsWithCollection, QueryOptions {} + +interface QueryOptionsWithName extends CollectionOptionsWithName, QueryOptions {} + +interface QueryOptionsWithID extends CollectionOptionsWithID, QueryOptions {} + +interface Query { + SELECTCOLUMNS?: string[]; + SORT?: QuerySortDirections; + FILTERS?: QueryFilter[]; + PAGESIZE?: number; + PAGENUM?: number; +} + +interface QueryFilter { + [QueryConditions: string]: QueryFilterValue; +} + +interface QueryFilterValue { + [name: string]: QueryValue; +} + +interface QueryObj { + id: string; + user: APIUser; + URI: string; + systemKey: string; + systemSecret: string; + query: Query; + OR: Query[]; + offset: number; + limit: number; + + ascending(field: string): void; + descending(field: string): void; + equalTo(field: string, value: QueryValue): void; + greaterThan(field: string, value: QueryValue): void; + greaterThanEqualTo(field: string, value: QueryValue): void; + lessThan(field: string, value: QueryValue): void; + lessThanEqualTo(field: string, value: QueryValue): void; + notEqualTo(field: string, value: QueryValue): void; + matches(field: string, pattern: QueryValue): void; + or(query: QueryObj): void; + setPage(pageSize: number, pageNum: number): void; + fetch(callback: CbCallback): void; + update(changes: object, callback: CbCallback): void; + columns(columnsArray: string[]): void; + remove(callback: CbCallback): void; +} + +interface ItemOptions extends CollectionOptionsWithID {} + +interface Item { + data: object; + + save(): void; + refresh(): void; + destroy(): void; +} + +interface Code { + user: APIUser; + systemKey: string; + systemSecret: string; + + execute(name: string, params: object, loggingEnabled: boolean, callback: CbCallback): void; + getAllServices(callback: CbCallback): void; +} + +interface DeploymentOptions {} + +interface Deployment { + user: APIUser; + systemKey: string; + systemSecret: string; + + create(name: string, description: string, options: DeploymentOptions, callback: CbCallback): void; + update(name: string, options: DeploymentOptions, callback: CbCallback): void; + delete(name: string, callback: CbCallback): void; + read(name: string, callback: CbCallback): void; + readAll(query: QueryObj, callback: CbCallback): void; +} + +interface AppUser { + user: APIUser; + URI: string; + systemKey: string; + systemSecret: string; + + getUser(callback: CbCallback): void; + setUser(data: object, callback: CbCallback): void; + setUsers(query: QueryObj, data: object, callback: CbCallback): void; + allUsers(query: QueryObj, callback: CbCallback): void; + count(query: QueryObj, callback: CbCallback): void; +} + +interface Messaging { + user: APIUser; + systemKey: string; + systemSecret: string; + + getMessageHistoryWithTimeFrame(topic: string, count: number, last: number, start: number, stop: number, callback: CbCallback): void; + getMessageHistory(topic: string, start: number, count: number, callback: CbCallback): void; + getAndDeleteMessageHistory(topic: string, count: number, last: number, start: number, stop: number, callback: CbCallback): void; + getCurrentTopics(callback: CbCallback): void; + publish(topic: string, payload: string | ArrayBuffer): void; +} + +interface MessagingOptions {} + +interface Device { + URI: string; + systemKey: string; + systemSecret: string; + + fetch(query: Query, callback: CbCallback): void; + update(query: Query, changes: object, callback: CbCallback): void; + delete(query: Query, callback: CbCallback): void; + create(newDevice: object, callback: CbCallback): void; +} + +declare enum TriggerModule { + DEVICE = "Device", + Data = "Data", + MESSAGING = "Messaging", + USER = "User" +} + +interface TriggerCreateOptions { + system_key: string; + name: string; + def_module: TriggerModule; + def_name: string; + key_value_pairs: KeyValuePair[]; + service_name: string; +} + +interface TriggerClass { + Create(name: string, options: TriggerCreateOptions, callback: CbCallback): void; + Fetch(name: string, callback: CbCallback): void; +} + +interface TimerCreateOptions { + description?: string; + start_time?: Date; + repeats?: number; + frequency?: number; + service_name?: string; + user_id?: string; + user_token?: string; +} + +interface TimerClass { + Create(name: string, options: TimerCreateOptions, callback: CbCallback): void; + Fetch(name: string, callback: CbCallback): void; +} + +interface TriggerInstance { + name: string; + systemKey: string; + + Update(options: object, callback: CbCallback): void; + Delete(callback: CbCallback): void; +} + +interface TimerInstance { + name: string; + systemKey: string; + + Update(options: object, callback: CbCallback): void; + Delete(callback: CbCallback): void; +} + +declare var ClearBlade: ClearBladeGlobal; diff --git a/types/clearbladejs-server/tsconfig.json b/types/clearbladejs-server/tsconfig.json new file mode 100644 index 0000000000..b549e1c685 --- /dev/null +++ b/types/clearbladejs-server/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "target": "ES5", + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "clearbladejs-server-tests.ts", + "global.d.ts" + ], + "exclude": [ + "**/clearbladejs-client/*", + "**/clearbladejs-node/*" + ] +} \ No newline at end of file diff --git a/types/clearbladejs-server/tslint.json b/types/clearbladejs-server/tslint.json new file mode 100644 index 0000000000..6a6f758e67 --- /dev/null +++ b/types/clearbladejs-server/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "no-empty-interface": false + } +} \ No newline at end of file diff --git a/types/cleave.js/options/creditCard.d.ts b/types/cleave.js/options/creditCard.d.ts new file mode 100644 index 0000000000..b7f55ff5b0 --- /dev/null +++ b/types/cleave.js/options/creditCard.d.ts @@ -0,0 +1,19 @@ +import Cleave = require("../"); + +// Credit Card Options +export type CreditCardType = + | "amex" + | "dankort" + | "diners" + | "discover" + | "instapayment" + | "jcb" + | "maestro" + | "mastercard" + | "uatp" + | "unknown" + | "unionPay" + | "mir" + | "visa"; + +export type CreditCardTypeChangeHandler = (this: Cleave, type: CreditCardType) => void; diff --git a/types/cleave.js/options.d.ts b/types/cleave.js/options/index.d.ts similarity index 76% rename from types/cleave.js/options.d.ts rename to types/cleave.js/options/index.d.ts index 81757fe097..60e2e99e40 100644 --- a/types/cleave.js/options.d.ts +++ b/types/cleave.js/options/index.d.ts @@ -1,19 +1,4 @@ -// Credit Card Options -export type CreditCardType = - | "amex" - | "dankort" - | "diners" - | "discover" - | "instapayment" - | "jcb" - | "maestro" - | "mastercard" - | "uatp" - | "unknown" - | "unionPay" - | "mir" - | "visa"; -export type CreditCardTypeChangeHandler = (owner: HTMLInputElement, type: CreditCardType) => void; +import { CreditCardTypeChangeHandler } from "./creditCard"; export interface CleaveOptions { creditCard?: boolean; diff --git a/types/cleave.js/tsconfig.json b/types/cleave.js/tsconfig.json index c2d5447360..ec4da5d047 100644 --- a/types/cleave.js/tsconfig.json +++ b/types/cleave.js/tsconfig.json @@ -21,7 +21,8 @@ "files": [ "cleave.js-tests.tsx", "index.d.ts", - "options.d.ts", + "options/creditCard.d.ts", + "options/index.d.ts", "react/index.d.ts" ] } \ No newline at end of file diff --git a/types/clmtrackr/clmtrackr-tests.ts b/types/clmtrackr/clmtrackr-tests.ts new file mode 100644 index 0000000000..8a38e4361c --- /dev/null +++ b/types/clmtrackr/clmtrackr-tests.ts @@ -0,0 +1,26 @@ +import clm from "clmtrackr"; + +const ctracker = new clm.tracker(); + +console.log(clm.version); + +ctracker.init({ + constantVelocity: true, + searchWindow: 11, + useWebGL: true, + scoreThreshold: 0.50, + stopOnConvergence: false, + /** object with parameters for facedetection : */ + faceDetection: { useWebWorkers: true} +}); + +const video = document.getElementsByTagName("video")[0]; +ctracker.start(video); +const positions = ctracker.getCurrentPosition(); +if (positions) { + const canvas = document.getElementsByTagName("canvas")[0]; + ctracker.draw(canvas); + positions.forEach(([x, y]) => { + const sum: number = x + y; + }); +} diff --git a/types/clmtrackr/index.d.ts b/types/clmtrackr/index.d.ts new file mode 100644 index 0000000000..a0c778ed00 --- /dev/null +++ b/types/clmtrackr/index.d.ts @@ -0,0 +1,55 @@ +// Type definitions for clmtrackr 1.1 +// Project: https://github.com/auduno/clmtrackr +// Definitions by: hellochar +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface TrackerParams { + /** whether to use constant velocity model when fitting (default is true) */ + constantVelocity?: boolean; + /** the size of the searchwindow around each point (default is 11) */ + searchWindow?: number; + /** whether to use webGL if it is available (default is true) */ + useWebGL?: boolean; + /** threshold for when to assume we've lost tracking (default is 0.50) */ + scoreThreshold?: number; + /** whether to stop tracking when the fitting has converged (default is false) */ + stopOnConvergence?: boolean; + /** object with parameters for facedetection : */ + faceDetection?: { + /** whether to use web workers for face detection (default is true) */ + useWebWorkers?: boolean; + }; +} + +type IPosition = [number, number]; + +type Model = any; + +declare namespace _default { + class tracker { + constructor(params?: TrackerParams); + + init(model?: Model): void; + + start(element: HTMLVideoElement | HTMLCanvasElement): void; + + track(element: HTMLVideoElement | HTMLCanvasElement): IPosition[] | false; + + reset(): void; + + getConvergence(): number; + + getCurrentParameters(): number[]; + + getCurrentPosition(): IPosition[] | false; + + getScore(): number; + + draw(canvas: HTMLCanvasElement): void; + + setResponseMode(type: "single" | "cycle" | "blend", list: Array<"raw" | "sobel" | "lbp">): void; + } + const version: string; +} + +export default _default; diff --git a/types/clmtrackr/tsconfig.json b/types/clmtrackr/tsconfig.json new file mode 100644 index 0000000000..54d471be5c --- /dev/null +++ b/types/clmtrackr/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "dom", + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "clmtrackr-tests.ts" + ] +} diff --git a/types/clmtrackr/tslint.json b/types/clmtrackr/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/clmtrackr/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/codemirror/index.d.ts b/types/codemirror/index.d.ts index ef075b9d45..06c3b39f96 100644 --- a/types/codemirror/index.d.ts +++ b/types/codemirror/index.d.ts @@ -669,7 +669,7 @@ declare namespace CodeMirror { /** Returns a {from, to} object (both holding document positions), indicating the current position of the marked range, or undefined if the marker is no longer in the document. */ - find(): CodeMirror.Range; + find(): {from: CodeMirror.Position, to: CodeMirror.Position}; /** Returns an object representing the options for the marker. If copyWidget is given true, it will clone the value of the replacedWith option, if any. */ getOptions(copyWidget: boolean): CodeMirror.TextMarkerOptions; diff --git a/types/coinbase/coinbase-tests.ts b/types/coinbase/coinbase-tests.ts index 793833355e..fb804ac566 100644 --- a/types/coinbase/coinbase-tests.ts +++ b/types/coinbase/coinbase-tests.ts @@ -85,7 +85,7 @@ client.getAccount("abcdef", (error: Error, account: coinbase.Account): void => { }); }); -client.getBuyPrice({ currencyPair: "USD-BTC" }, (error: Error, result: coinbase.MoneyHash): void => undefined); +client.getBuyPrice({ currencyPair: "USD-BTC" }, (error: Error, result: coinbase.Price): void => undefined); client.getCurrencies((error: Error, result: coinbase.Currency[]): void => undefined); @@ -95,10 +95,10 @@ client.getPaymentMethod("foo", (error: Error, result: coinbase.PaymentMethod): v client.getPaymentMethods((error: Error, result: coinbase.PaymentMethod[]): void => undefined); -client.getSellPrice({ currencyPair: "USD-BTC" }, (error: Error, result: coinbase.MoneyHash): void => undefined); +client.getSellPrice({ currencyPair: "USD-BTC" }, (error: Error, result: coinbase.Price): void => undefined); -client.getSpotPrice({ currencyPair: "USD-BTC" }, (error: Error, result: coinbase.MoneyHash): void => undefined); -client.getSpotPrice({ currencyPair: "USD-BTC", date: "2017-22-01" }, (error: Error, result: coinbase.MoneyHash): void => undefined); +client.getSpotPrice({ currencyPair: "USD-BTC" }, (error: Error, result: coinbase.Price): void => undefined); +client.getSpotPrice({ currencyPair: "USD-BTC", date: "2017-22-01" }, (error: Error, result: coinbase.Price): void => undefined); client.getTime((error: Error, result: coinbase.Time): void => undefined); diff --git a/types/coinbase/index.d.ts b/types/coinbase/index.d.ts index ae1e041203..6057f58142 100644 --- a/types/coinbase/index.d.ts +++ b/types/coinbase/index.d.ts @@ -294,6 +294,33 @@ export interface MoneyHash { currency: string; } +/** + * Price response + */ +export interface Price { + data: { + /** + * Currency e.g. "BTC" (see Client#getCurrencies() for available strings) + */ + base: string; + /** + * Amount as floating-point in a string + */ + amount: string; + /** + * Currency e.g. "EUR" (see Client#getCurrencies() for available strings) + */ + currency: string; + }; + warnings?: [ + { + id: string + message: string + url: string + } + ]; +} + export type ResourceType = "account" | "transaction" | "address" | "user" | "buy" | "sell" | "deposit" | "withdrawal" | "payment_method"; /** @@ -1308,7 +1335,7 @@ export class Client { * If you need more accurate price estimate for a specific payment method or amount, @see Account#buy() and `quote: true` option. * Scope: none */ - getBuyPrice(opts: GetBuyPriceOpts, cb: (error: Error, result: MoneyHash) => void): void; + getBuyPrice(opts: GetBuyPriceOpts, cb: (error: Error, result: Price) => void): void; /** * Get the total price to sell one bitcoin or ether. Note that exchange rates fluctuates so the price is only correct for seconds at the time. @@ -1316,7 +1343,7 @@ export class Client { * estimate for a specific payment method or amount, see sell bitcoin endpoint and quote: true option. * Scope: none */ - getSellPrice(opts: GetSellPriceOpts, cb: (error: Error, result: MoneyHash) => void): void; + getSellPrice(opts: GetSellPriceOpts, cb: (error: Error, result: Price) => void): void; /** * Get the current market price for bitcoin. This is usually somewhere in between the buy and sell price. @@ -1324,7 +1351,7 @@ export class Client { * You can also get historic prices with date parameter. * Scope: none */ - getSpotPrice(opts: GetSpotPriceOpts, cb: (error: Error, result: MoneyHash) => void): void; + getSpotPrice(opts: GetSpotPriceOpts, cb: (error: Error, result: Price) => void): void; /** * Get the API server time. diff --git a/types/colors/colors-tests.ts b/types/colors/colors-tests.ts deleted file mode 100644 index fcac0323f6..0000000000 --- a/types/colors/colors-tests.ts +++ /dev/null @@ -1,21 +0,0 @@ -import colors = require("colors"); -import { zalgo } from "colors/safe"; - -let str: string; - -str = zalgo(""); - -colors.enabled = true; - -str = colors.black.underline('test'); -str = colors.rainbow.black.blue.gray('test'); -str = colors.random.reset.bgWhite.dim('test'); -str = colors.random.reset.bgWhite.strip('test'); -str = 'test'.black.underline; -str = 'test'.rainbow.black.blue.gray; -str = 'test'.random.reset.bgWhite.dim; -str = 'test'.random.reset.bgWhite.dim.stripColors; - -colors.enabled = false; - -str = colors.black.underline('test'); diff --git a/types/colors/index.d.ts b/types/colors/index.d.ts deleted file mode 100644 index a5494aa945..0000000000 --- a/types/colors/index.d.ts +++ /dev/null @@ -1,133 +0,0 @@ -// Type definitions for Colors.js 1.1 -// Project: https://github.com/Marak/colors.js -// Definitions by: Bart van der Schoor , Staffan Eketorp -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export interface Color { - (text: string): string; - - strip: Color; - stripColors: Color; - - black: Color; - red: Color; - green: Color; - yellow: Color; - blue: Color; - magenta: Color; - cyan: Color; - white: Color; - gray: Color; - grey: Color; - - bgBlack: Color; - bgRed: Color; - bgGreen: Color; - bgYellow: Color; - bgBlue: Color; - bgMagenta: Color; - bgCyan: Color; - bgWhite: Color; - - reset: Color; - bold: Color; - dim: Color; - italic: Color; - underline: Color; - inverse: Color; - hidden: Color; - strikethrough: Color; - - rainbow: Color; - zebra: Color; - america: Color; - trap: Color; - random: Color; - zalgo: Color; -} - -export function setTheme(theme: any): void; - -export let enabled: boolean; - -export const strip: Color; -export const stripColors: Color; - -export const black: Color; -export const red: Color; -export const green: Color; -export const yellow: Color; -export const blue: Color; -export const magenta: Color; -export const cyan: Color; -export const white: Color; -export const gray: Color; -export const grey: Color; - -export const bgBlack: Color; -export const bgRed: Color; -export const bgGreen: Color; -export const bgYellow: Color; -export const bgBlue: Color; -export const bgMagenta: Color; -export const bgCyan: Color; -export const bgWhite: Color; - -export const reset: Color; -export const bold: Color; -export const dim: Color; -export const italic: Color; -export const underline: Color; -export const inverse: Color; -export const hidden: Color; -export const strikethrough: Color; - -export const rainbow: Color; -export const zebra: Color; -export const america: Color; -export const trap: Color; -export const random: Color; -export const zalgo: Color; - -declare global { - interface String { - strip: string; - stripColors: string; - - black: string; - red: string; - green: string; - yellow: string; - blue: string; - magenta: string; - cyan: string; - white: string; - gray: string; - grey: string; - - bgBlack: string; - bgRed: string; - bgGreen: string; - bgYellow: string; - bgBlue: string; - bgMagenta: string; - bgCyan: string; - bgWhite: string; - - reset: string; - bold: string; - dim: string; - italic: string; - underline: string; - inverse: string; - hidden: string; - strikethrough: string; - - rainbow: string; - zebra: string; - america: string; - trap: string; - random: string; - zalgo: string; - } -} diff --git a/types/colors/safe.d.ts b/types/colors/safe.d.ts deleted file mode 100644 index 306b656b2b..0000000000 --- a/types/colors/safe.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -export const enabled: boolean; - -export function strip(str: string): string; -export function stripColors(str: string): string; - -export function black(str: string): string; -export function red(str: string): string; -export function green(str: string): string; -export function yellow(str: string): string; -export function blue(str: string): string; -export function magenta(str: string): string; -export function cyan(str: string): string; -export function white(str: string): string; -export function gray(str: string): string; -export function grey(str: string): string; - -export function bgBlack(str: string): string; -export function bgRed(str: string): string; -export function bgGreen(str: string): string; -export function bgYellow(str: string): string; -export function bgBlue(str: string): string; -export function bgMagenta(str: string): string; -export function bgCyan(str: string): string; -export function bgWhite(str: string): string; - -export function reset(str: string): string; -export function bold(str: string): string; -export function dim(str: string): string; -export function italic(str: string): string; -export function underline(str: string): string; -export function inverse(str: string): string; -export function hidden(str: string): string; -export function strikethrough(str: string): string; - -export function rainbow(str: string): string; -export function zebra(str: string): string; -export function america(str: string): string; -export function trap(str: string): string; -export function random(str: string): string; -export function zalgo(str: string): string; diff --git a/types/command-line-usage/command-line-usage-tests.ts b/types/command-line-usage/command-line-usage-tests.ts new file mode 100644 index 0000000000..05dfadc7f3 --- /dev/null +++ b/types/command-line-usage/command-line-usage-tests.ts @@ -0,0 +1,24 @@ +import commandLineUsage = require("command-line-usage"); + +const sections = [ + { + header: 'A typical app', + content: 'Generates something {italic very} important.' + }, + { + header: 'Options', + optionList: [ + { + name: 'input', + typeLabel: '{underline file}', + description: 'The input to process.' + }, + { + name: 'help', + description: 'Print this usage guide.' + } + ] + } +]; + +const usage = commandLineUsage(sections); diff --git a/types/command-line-usage/index.d.ts b/types/command-line-usage/index.d.ts new file mode 100644 index 0000000000..ac4f1d7606 --- /dev/null +++ b/types/command-line-usage/index.d.ts @@ -0,0 +1,48 @@ +// Type definitions for command-line-usage 5.0 +// Project: https://github.com/75lb/command-line-usage#readme +// Definitions by: Andrija Dvorski +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +declare namespace commandLineUsage { + interface Section { + list: string[]; + + add(content: object): void; + emptyLine(): void; + header(text: string): void; + toString(): string; + } + + interface SectionData { + optionList?: OptionListData[]; + hide?: string[]; + group?: string[]; + header?: string; + reverseNameOrder?: boolean; + tableOptions?: any; + } + + interface OptionListData extends SectionData { + name: string; + typeLabel?: string; + description?: string; + } + + interface ContentSectionData extends SectionData { + content: string; + raw?: boolean; + } + + type CommandLineUsageInput = + SectionData + | SectionData[] + | OptionListData + | OptionListData[] + | ContentSectionData + | ContentSectionData[]; +} + +declare function commandLineUsage(sections: commandLineUsage.CommandLineUsageInput): string | undefined | commandLineUsage.Section; + +export = commandLineUsage; diff --git a/types/command-line-usage/tsconfig.json b/types/command-line-usage/tsconfig.json new file mode 100644 index 0000000000..9deee9ab63 --- /dev/null +++ b/types/command-line-usage/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "command-line-usage-tests.ts" + ] +} diff --git a/types/command-line-usage/tslint.json b/types/command-line-usage/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/command-line-usage/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/component-emitter/index.d.ts b/types/component-emitter/index.d.ts index 95682f6ca4..b55a1673ab 100644 --- a/types/component-emitter/index.d.ts +++ b/types/component-emitter/index.d.ts @@ -13,9 +13,9 @@ interface Emitter { hasListeners(event: string): boolean; } -declare const constructor: { +declare const Emitter: { (obj?: any): Emitter; new (obj?: any): Emitter; }; -export = constructor; +export = Emitter; diff --git a/types/compression-webpack-plugin/index.d.ts b/types/compression-webpack-plugin/index.d.ts index bfb769ed2f..a7b38383ef 100644 --- a/types/compression-webpack-plugin/index.d.ts +++ b/types/compression-webpack-plugin/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/webpack-contrib/compression-webpack-plugin // Definitions by: Anton Kandybo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import { Plugin } from 'webpack'; diff --git a/types/compression/compression-tests.ts b/types/compression/compression-tests.ts index dc284ce2df..192ec309e8 100644 --- a/types/compression/compression-tests.ts +++ b/types/compression/compression-tests.ts @@ -1,4 +1,3 @@ - import express = require('express'); import compress = require('compression'); @@ -7,3 +6,15 @@ app.use(compress()); app.use(compress({ threshold: 512 })); +app.use(compress({ + threshold: 512, + filter: (req, res) => { + if (req.headers['x-no-compression']) { + // don't compress responses with this request header + return false; + } + + // fallback to standard filter function + return compress.filter(req, res); + } +})); \ No newline at end of file diff --git a/types/compression/index.d.ts b/types/compression/index.d.ts index 68d687a9c4..813a823a96 100644 --- a/types/compression/index.d.ts +++ b/types/compression/index.d.ts @@ -1,13 +1,26 @@ // Type definitions for compression // Project: https://github.com/expressjs/compression // Definitions by: Santi Albo +// Rob van der Burgt // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 import * as express from 'express'; +declare function e(options?: e.CompressionOptions): express.RequestHandler; + declare namespace e { - interface CompressionOptions { + /** + * Default filter, used for extending filter given in CompressionOptions + * See https://github.com/expressjs/compression#filter-1 regarding the usage + */ + export function filter(req: express.Request, res: express.Response): boolean; + + interface CompressionFilter { + (req: express.Request, res: express.Response): boolean; + } + + interface CompressionOptions { /** * See https://github.com/expressjs/compression#chunksize regarding the usage. */ @@ -31,7 +44,7 @@ declare namespace e { /** * See https://github.com/expressjs/compression#threshold regarding the usage. */ - threshold?: number|string; + threshold?: number | string; /** * See https://github.com/expressjs/compression#windowbits regarding the usage. @@ -41,8 +54,8 @@ declare namespace e { /** * See https://github.com/expressjs/compression#filter regarding the usage. */ - filter?: Function; - + filter?: CompressionFilter; + /** * See https://nodejs.org/api/zlib.html#zlib_class_options regarding the usage. */ @@ -55,5 +68,4 @@ declare namespace e { } } -declare function e(options?: e.CompressionOptions): express.RequestHandler; export = e; diff --git a/types/connect/connect-tests.ts b/types/connect/connect-tests.ts index 5a7590a9a0..669a146a28 100644 --- a/types/connect/connect-tests.ts +++ b/types/connect/connect-tests.ts @@ -4,13 +4,23 @@ import connect = require("connect"); const app = connect(); // log all requests -app.use((req: http.IncomingMessage, res: http.ServerResponse, next: Function) => { +app.use((req: http.IncomingMessage, res: http.ServerResponse, next: connect.NextFunction) => { console.log(req, res); next(); }); +// "Throw" an Error +app.use((req: http.IncomingMessage, res: http.ServerResponse, next: connect.NextFunction) => { + next(new Error("Something went wrong!")); +}); + +// "Throw" a number +app.use((req: http.IncomingMessage, res: http.ServerResponse, next: connect.NextFunction) => { + next(404); +}); + // Stop on errors -app.use((err: Error, req: http.IncomingMessage, res: http.ServerResponse, next: Function) => { +app.use((err: any, req: http.IncomingMessage, res: http.ServerResponse, next: connect.NextFunction) => { if (err) { return res.end(`Error: ${err}`); } @@ -18,6 +28,11 @@ app.use((err: Error, req: http.IncomingMessage, res: http.ServerResponse, next: next(); }); +// Use legacy `Function` for `next` parameter. +app.use((req: http.IncomingMessage, res: http.ServerResponse, next: Function) => { + next(); +}); + // respond to all requests app.use((req: http.IncomingMessage, res: http.ServerResponse) => { res.end("Hello from Connect!\n"); diff --git a/types/connect/index.d.ts b/types/connect/index.d.ts index 8cebd6ba78..4efddb1e7f 100644 --- a/types/connect/index.d.ts +++ b/types/connect/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for connect v3.4.0 // Project: https://github.com/senchalabs/connect // Definitions by: Maxime LUCE +// Evan Hahn // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -17,9 +18,11 @@ declare function createServer(): createServer.Server; declare namespace createServer { export type ServerHandle = HandleFunction | http.Server; + type NextFunction = (err?: any) => void; + export type SimpleHandleFunction = (req: http.IncomingMessage, res: http.ServerResponse) => void; - export type NextHandleFunction = (req: http.IncomingMessage, res: http.ServerResponse, next: Function) => void; - export type ErrorHandleFunction = (err: Error, req: http.IncomingMessage, res: http.ServerResponse, next: Function) => void; + export type NextHandleFunction = (req: http.IncomingMessage, res: http.ServerResponse, next: NextFunction) => void; + export type ErrorHandleFunction = (err: any, req: http.IncomingMessage, res: http.ServerResponse, next: NextFunction) => void; export type HandleFunction = SimpleHandleFunction | NextHandleFunction | ErrorHandleFunction; export interface ServerStackItem { diff --git a/types/copy-webpack-plugin/index.d.ts b/types/copy-webpack-plugin/index.d.ts index 72331b4c6d..eedf42f450 100644 --- a/types/copy-webpack-plugin/index.d.ts +++ b/types/copy-webpack-plugin/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/kevlened/copy-webpack-plugin // Definitions by: flying-sheep // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import { Plugin } from 'webpack' import { IOptions } from 'minimatch' diff --git a/types/cosmiconfig/cosmiconfig-tests.ts b/types/cosmiconfig/cosmiconfig-tests.ts new file mode 100644 index 0000000000..2676c58407 --- /dev/null +++ b/types/cosmiconfig/cosmiconfig-tests.ts @@ -0,0 +1,41 @@ +import cosmiconfig = require("cosmiconfig"); + +const asyncExplorer = cosmiconfig("yourModuleName", { + packageProp: "yourModuleName", + rc: ".yourModuleNamerc", + js: "yourModuleName.config.js", + rcStrictJson: false, + rcExtensions: false, + stopDir: "someDir", + cache: true, + sync: false, + transform: ({ config, filePath }) => ({ config, filePath }), + format: "js" +}); + +Promise.all([ + asyncExplorer.load(), + asyncExplorer.load("start/search/here"), + asyncExplorer.load(null, "load/this/file.json") +]).then(result => result); + +asyncExplorer.load().then(({ config, filePath }) => ({ config, filePath })); + +asyncExplorer.clearFileCache(); +asyncExplorer.clearDirectoryCache(); +asyncExplorer.clearCaches(); + +const syncExplorer = cosmiconfig("yourModuleName", { + packageProp: "yourModuleName", + rc: ".yourModuleNamerc", + js: "yourModuleName.config.js", + rcStrictJson: false, + rcExtensions: false, + stopDir: "someDir", + cache: true, + sync: true, + transform: ({ config, filePath }) => ({ config, filePath }), + format: "js" +}); + +const { config, filePath } = syncExplorer.load(); diff --git a/types/cosmiconfig/index.d.ts b/types/cosmiconfig/index.d.ts new file mode 100644 index 0000000000..032f570d6f --- /dev/null +++ b/types/cosmiconfig/index.d.ts @@ -0,0 +1,63 @@ +// Type definitions for cosmiconfig 4.0 +// Project: https://github.com/davidtheclark/cosmiconfig +// Definitions by: ozum +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +interface Result { + config: object; + filePath: string; +} + +interface Options { + packageProp?: string | false; + rc?: string | false; + js?: string | false; + rcStrictJson?: boolean; + rcExtensions?: boolean; + stopDir?: string; + cache?: boolean; + transform?: (result: Result) => Promise | Result; + configPath?: string; + format?: "json" | "yaml" | "js"; +} + +// Default is false and makes load() method async +interface AsyncOptions extends Options { + sync?: false; +} + +// Makes load() method sync +interface SyncOptions extends Options { + sync: true; +} + +interface Explorer { + clearFileCache(): void; + clearDirectoryCache(): void; + clearCaches(): void; +} + +interface AsyncExplorer extends Explorer { + // You should provide either searchPath or configPath for load method. To disallow both, overloaded definitions added. + load(searchPath?: string): Promise; + load(searchPath: null | undefined, configPath?: string): Promise; +} + +interface SyncExplorer extends Explorer { + // You should provide either searchPath or configPath for load method. To disallow both, overloaded definitions added. + load(searchPath?: string): Result; + load(searchPath: null | undefined, configPath?: string): Result; +} + +declare function cosmiconfig( + moduleName: string, + options: SyncOptions +): SyncExplorer; + +declare function cosmiconfig( + moduleName: string, + options?: AsyncOptions +): AsyncExplorer; + +export = cosmiconfig; diff --git a/types/cosmiconfig/tsconfig.json b/types/cosmiconfig/tsconfig.json new file mode 100644 index 0000000000..6f0f0ac3a2 --- /dev/null +++ b/types/cosmiconfig/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "cosmiconfig-tests.ts"] +} diff --git a/types/cosmiconfig/tslint.json b/types/cosmiconfig/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cosmiconfig/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/create-error/create-error-tests.ts b/types/create-error/create-error-tests.ts index 7a635b8dc6..ed2d9533e3 100644 --- a/types/create-error/create-error-tests.ts +++ b/types/create-error/create-error-tests.ts @@ -1,8 +1,12 @@ -/// declare function equal(a: T, b: T): void; declare function deepEqual(a: T, b: T): void; +// Stub mocha functions +const {describe, it, before, after, beforeEach, afterEach} = null as any as { + [s: string]: ((s: string, cb: (done: any) => void) => void) & ((cb: (done: any) => void) => void) & {only: any, skip: any}; +}; + import * as createError from 'create-error'; // Example taken from https://github.com/tgriesser/create-error/blob/0.3.1/README.md#use diff --git a/types/create-react-class/create-react-class-tests.ts b/types/create-react-class/create-react-class-tests.ts index b8025b23f0..3d7536d722 100644 --- a/types/create-react-class/create-react-class-tests.ts +++ b/types/create-react-class/create-react-class-tests.ts @@ -11,7 +11,7 @@ interface State { bar: number; } -const props: Props & React.ClassAttributes<{}> = { +const props: Props = { foo: "foo" }; diff --git a/types/cron/cron-tests.ts b/types/cron/cron-tests.ts index 7eea73eeed..21e28f9c0f 100644 --- a/types/cron/cron-tests.ts +++ b/types/cron/cron-tests.ts @@ -47,7 +47,12 @@ var job = new CronJob({ start: false, timeZone: 'America/Los_Angeles' }); +console.log(job.lastDate()); +console.log(job.nextDates(1)); +console.log(job.running); +job.setTime(new CronTime('00 30 11 * * 1-2')); job.start(); +job.stop(); // How to check if a cron pattern is valid: try { diff --git a/types/cron/index.d.ts b/types/cron/index.d.ts index 780890c014..b27bfdf90c 100644 --- a/types/cron/index.d.ts +++ b/types/cron/index.d.ts @@ -1,25 +1,118 @@ -// Type definitions for cron 1.2 +// Type definitions for cron 1.3 // Project: https://www.npmjs.com/package/cron // Definitions by: Hiroki Horiuchi +// Lundarl Gholoi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +export declare class CronTime { + /** + * Create a new ```CronTime```. + * @param source The time to fire off your job. This can be in the form of cron syntax or a JS ```Date``` object. + * @param zone Timezone name. You can check all timezones available at [Moment Timezone Website](http://momentjs.com/timezone/). + */ + constructor(source: string | Date, zone?: string); + /** + * Tells you when ```CronTime``` will be run. + * @param i Indicate which turn of run after now. If not given return next run time. + */ + public sendAt(i?: number): Date; + /** + * Get the number of milliseconds in the future at which to fire our callbacks. + */ + public getTimeout(): number; +} -interface CronJobStatic { - new (cronTime: string | Date, onTick: () => void, onComplete?: () => void, start?: boolean, timeZone?: string, context?: any, runOnInit?: boolean): CronJob; - new (options: { - cronTime: string | Date; onTick: () => void; onComplete?: () => void; start?: boolean; timeZone?: string; context?: any; runOnInit?: boolean - }): CronJob; +export declare interface CronJobParameters { + /** + * The time to fire off your job. This can be in the form of cron syntax or a JS ```Date``` object. + */ + cronTime: string | Date; + /** + * The function to fire at the specified time. + */ + onTick: () => void; + /** + * A function that will fire when the job is complete, when it is stopped. + */ + onComplete?: () => void; + /** + * Specifies whether to start the job just before exiting the constructor. By default this is set to false. If left at default you will need to call ```job.start()``` in order to start the job (assuming ```job``` is the variable you set the cronjob to). This does not immediately fire your onTick function, it just gives you more control over the behavior of your jobs. + */ + start?: boolean; + /** + * Specify the timezone for the execution. This will modify the actual time relative to your timezone. If the timezone is invalid, an error is thrown. You can check all timezones available at [Moment Timezone Website](http://momentjs.com/timezone/). + */ + timeZone?: string; + /** + * The context within which to execute the onTick method. This defaults to the cronjob itself allowing you to call ```this.stop()```. However, if you change this you'll have access to the functions and values within your context object. + */ + context?: any; + /** + * This will immediately fire your ```onTick``` function as soon as the requisit initialization has happened. This option is set to ```false``` by default for backwards compatibility. + */ + runOnInit?: boolean; } -interface CronJob { - start(): void; - stop(): void; - running: boolean | undefined; -} -export declare var CronJob: CronJobStatic; -interface CronTimeStatic { - new (time: string | Date): CronTime; +export declare class CronJob { + /** + * Return ```true``` if job is running. + */ + public running: boolean | undefined; + /** + * Function using to fire ```onTick```, default set to an inner private function. Overwrite this only if you have a really good reason to do so. + */ + public fireOnTick: Function; + + /** + * Create a new ```CronJob```. + * @param cronTime The time to fire off your job. This can be in the form of cron syntax or a JS ```Date``` object. + * @param onTick The function to fire at the specified time. + * @param onComplete A function that will fire when the job is complete, when it is stopped. + * @param start Specifies whether to start the job just before exiting the constructor. By default this is set to false. If left at default you will need to call ```job.start()``` in order to start the job (assuming ```job``` is the variable you set the cronjob to). This does not immediately fire your onTick function, it just gives you more control over the behavior of your jobs. + * @param timeZone Specify the timezone for the execution. This will modify the actual time relative to your timezone. If the timezone is invalid, an error is thrown. You can check all timezones available at [Moment Timezone Website](http://momentjs.com/timezone/). + * @param context The context within which to execute the onTick method. This defaults to the cronjob itself allowing you to call ```this.stop()```. However, if you change this you'll have access to the functions and values within your context object. + * @param runOnInit This will immediately fire your ```onTick``` function as soon as the requisit initialization has happened. This option is set to ```false``` by default for backwards compatibility. + */ + constructor(cronTime: string | Date, onTick: () => void, onComplete?: () => void, start?: boolean, timeZone?: string, context?: any, runOnInit?: boolean); + /** + * Create a new ```CronJob```. + * @param options Job parameters. + */ + constructor(options: CronJobParameters); + + /** + * Runs your job. + */ + public start(): void; + /** + * Stops your job. + */ + public stop(): void; + /** + * Change the time for the ```CronJob```. + * @param time Target time. + */ + public setTime(time: CronTime): void; + /** + * Tells you the last execution date. + */ + public lastDate(): Date; + /** + * Tells you when a ```CronTime``` will be run. + * @param i Indicate which turn of run after now. If not given return next run time. + */ + public nextDates(i?: number): Date; + /** + * Add another ```onTick``` function. + * @param callback Target function. + */ + public addCallback(callback: Function): void; } -interface CronTime { } -export declare var CronTime: CronTimeStatic; + +export declare var job: + ((cronTime: string | Date, onTick: () => void, onComplete?: () => void, start?: boolean, timeZone?: string, context?: any, runOnInit?: boolean) => CronJob) + | ((options: CronJobParameters) => CronJob); +export declare var time: (source: string | Date, zone?: string) => CronTime; +export declare var sendAt: (cronTime: CronTime) => Date; +export declare var timeout: (cronTime: CronTime) => number; diff --git a/types/cropperjs/index.d.ts b/types/cropperjs/index.d.ts index 60b508dd8f..30556e11fc 100644 --- a/types/cropperjs/index.d.ts +++ b/types/cropperjs/index.d.ts @@ -312,19 +312,19 @@ declare namespace cropperjs { /** * the offset left of the crop box */ - left?: number; + left: number; /** * the offset top of the crop box */ - top?: number; + top: number; /** * the width of the crop box */ - width?: number; + width: number; /** * the height of the crop box */ - height?: number; + height: number; } interface CanvasData { /** @@ -516,7 +516,7 @@ declare class cropperjs { /** * Change the cropped area position and size with new data (base on the original image). */ - setData(data: cropperjs.Data): void; + setData(data: Partial): void; /** * Output the container size data. @@ -545,7 +545,7 @@ declare class cropperjs { /** * Change the canvas (image wrapper) position and size with new data. */ - setCanvasData(data: cropperjs.CanvasData): void; + setCanvasData(data: Partial): void; /** * Output the crop box position and size data. @@ -555,7 +555,7 @@ declare class cropperjs { /** * Change the crop box position and size with new data. */ - setCropBoxData(data: cropperjs.CropBoxData): void; + setCropBoxData(data: Partial): void; /** * Get a canvas drawn the cropped image. diff --git a/types/crypto-js/crypto-js-tests.ts b/types/crypto-js/crypto-js-tests.ts index 9b5dd1be6f..59f1d684ed 100644 --- a/types/crypto-js/crypto-js-tests.ts +++ b/types/crypto-js/crypto-js-tests.ts @@ -4,9 +4,11 @@ import CryptoJS = require('crypto-js'); var wordArray: CryptoJS.WordArray; wordArray = CryptoJS.MD5('some message'); wordArray = CryptoJS.MD5('some message', 'some key'); +wordArray = CryptoJS.MD5('some message', { any: true }); wordArray = CryptoJS.SHA1('some message'); wordArray = CryptoJS.SHA1('some message', 'some key', { any: true }); +wordArray = CryptoJS.SHA1('some message', { any: true }); wordArray = CryptoJS.format.OpenSSL('some message'); wordArray = CryptoJS.format.OpenSSL('some message', 'some key'); diff --git a/types/crypto-js/index.d.ts b/types/crypto-js/index.d.ts index c066204df2..db9ed6c30e 100644 --- a/types/crypto-js/index.d.ts +++ b/types/crypto-js/index.d.ts @@ -8,7 +8,6 @@ export as namespace CryptoJS; declare var CryptoJS: CryptoJS.Hashes; declare namespace CryptoJS { - type Hash = (message: string | LibWordArray, key?: string | WordArray, ...options: any[]) => WordArray; interface Cipher { encrypt(message: string, secretPassphrase: string | WordArray, option?: CipherOption): WordArray; decrypt(encryptedMessage: string | WordArray, secretPassphrase: string | WordArray, option?: CipherOption): DecryptedMessage; @@ -54,23 +53,40 @@ declare namespace CryptoJS { interface Padding {} export interface Hashes { - MD5: Hash; - SHA1: Hash; - SHA256: Hash; - SHA224: Hash; - SHA512: Hash; - SHA384: Hash; - SHA3: Hash; - RIPEMD160: Hash; - HmacMD5: Hash; - HmacSHA1: Hash; - HmacSHA256: Hash; - HmacSHA224: Hash; - HmacSHA512: Hash; - HmacSHA384: Hash; - HmacSHA3: Hash; - HmacRIPEMD160: Hash; - PBKDF2: Hash; + MD5(message: string | LibWordArray, key?: string | WordArray, ...options: any[]): WordArray; + MD5(message: string | LibWordArray, ...options: any[]): WordArray; + SHA1(message: string | LibWordArray, key?: string | WordArray, ...options: any[]): WordArray; + SHA1(message: string | LibWordArray, ...options: any[]): WordArray; + SHA256(message: string | LibWordArray, key?: string | WordArray, ...options: any[]): WordArray; + SHA256(message: string | LibWordArray, ...options: any[]): WordArray; + SHA224(message: string | LibWordArray, key?: string | WordArray, ...options: any[]): WordArray; + SHA224(message: string | LibWordArray, ...options: any[]): WordArray; + SHA512(message: string | LibWordArray, key?: string | WordArray, ...options: any[]): WordArray; + SHA512(message: string | LibWordArray, ...options: any[]): WordArray; + SHA384(message: string | LibWordArray, key?: string | WordArray, ...options: any[]): WordArray; + SHA384(message: string | LibWordArray, ...options: any[]): WordArray; + SHA3(message: string | LibWordArray, key?: string | WordArray, ...options: any[]): WordArray; + SHA3(message: string | LibWordArray, ...options: any[]): WordArray; + RIPEMD160(message: string | LibWordArray, key?: string | WordArray, ...options: any[]): WordArray; + RIPEMD160(message: string | LibWordArray, ...options: any[]): WordArray; + HmacMD5(message: string | LibWordArray, key?: string | WordArray, ...options: any[]): WordArray; + HmacMD5(message: string | LibWordArray, ...options: any[]): WordArray; + HmacSHA1(message: string | LibWordArray, key?: string | WordArray, ...options: any[]): WordArray; + HmacSHA1(message: string | LibWordArray, ...options: any[]): WordArray; + HmacSHA256(message: string | LibWordArray, key?: string | WordArray, ...options: any[]): WordArray; + HmacSHA256(message: string | LibWordArray, ...options: any[]): WordArray; + HmacSHA224(message: string | LibWordArray, key?: string | WordArray, ...options: any[]): WordArray; + HmacSHA224(message: string | LibWordArray, ...options: any[]): WordArray; + HmacSHA512(message: string | LibWordArray, key?: string | WordArray, ...options: any[]): WordArray; + HmacSHA512(message: string | LibWordArray, ...options: any[]): WordArray; + HmacSHA384(message: string | LibWordArray, key?: string | WordArray, ...options: any[]): WordArray; + HmacSHA384(message: string | LibWordArray, ...options: any[]): WordArray; + HmacSHA3(message: string | LibWordArray, key?: string | WordArray, ...options: any[]): WordArray; + HmacSHA3(message: string | LibWordArray, ...options: any[]): WordArray; + HmacRIPEMD160(message: string | LibWordArray, key?: string | WordArray, ...options: any[]): WordArray; + HmacRIPEMD160(message: string | LibWordArray, ...options: any[]): WordArray; + PBKDF2(message: string | LibWordArray, key?: string | WordArray, ...options: any[]): WordArray; + PBKDF2(message: string | LibWordArray, ...options: any[]): WordArray; AES: Cipher; DES: Cipher; TripleDES: Cipher; diff --git a/types/csv2json/csv2json-tests.ts b/types/csv2json/csv2json-tests.ts new file mode 100644 index 0000000000..b211fd9aee --- /dev/null +++ b/types/csv2json/csv2json-tests.ts @@ -0,0 +1,8 @@ +import csv2json = require("csv2json"); +import fs = require("fs"); + +fs.createReadStream('data.csv') + .pipe(csv2json({ + separator: ';' + })) + .pipe(fs.createWriteStream('data.json')); diff --git a/types/csv2json/index.d.ts b/types/csv2json/index.d.ts new file mode 100644 index 0000000000..6906d3e925 --- /dev/null +++ b/types/csv2json/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for csv2json 1.4 +// Project: https://github.com/julien-f/csv2json +// Definitions by: Piotr Roszatycki +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import { Writable } from "stream"; + +declare namespace csv2json { + interface Options { + dynamicTyping?: boolean; + separator?: string; + } +} + +declare function csv2json(options?: csv2json.Options): Writable; + +export = csv2json; diff --git a/types/csv2json/tsconfig.json b/types/csv2json/tsconfig.json new file mode 100644 index 0000000000..79a635ca7d --- /dev/null +++ b/types/csv2json/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "csv2json-tests.ts" + ] +} diff --git a/types/csv2json/tslint.json b/types/csv2json/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/csv2json/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/cucumber/index.d.ts b/types/cucumber/index.d.ts index d0fc9085fd..d93ad4c7b2 100644 --- a/types/cucumber/index.d.ts +++ b/types/cucumber/index.d.ts @@ -95,7 +95,7 @@ export namespace pickle { locations: Location[]; name: string; steps: Step[]; - tags: string[]; + tags: Tag[]; } interface Location { @@ -117,6 +117,11 @@ export namespace pickle { location: Location; value: string; } + + interface Tag { + name: string; + location: Location; + } } export type HookCode = (this: World, scenario: HookScenarioResult, callback?: CallbackStepDefinition) => void; diff --git a/types/cytoscape/index.d.ts b/types/cytoscape/index.d.ts index b04ac2276e..4da9cd9ca0 100644 --- a/types/cytoscape/index.d.ts +++ b/types/cytoscape/index.d.ts @@ -8,7 +8,7 @@ // // Translation from Objects in help to Typescript interface. // http://js.cytoscape.org/#notation/functions -// +// TypeScript Version: 2.2 /** * cy --> Cy.Core @@ -3145,7 +3145,7 @@ declare namespace cytoscape { /** * http://js.cytoscape.org/#style/node-body */ - interface Node extends PaddingNode { + interface Node extends Partial, PaddingNode { "label"?: string; /** * The width of the node’s body. @@ -3320,7 +3320,7 @@ declare namespace cytoscape { "pie-i-background-opacity": number; } - interface Edge extends EdgeLine, EdgeArror { } + interface Edge extends EdgeLine, EdgeArror, Partial { } /** * These properties affect the styling of an edge’s line: diff --git a/types/d3-contour/d3-contour-tests.ts b/types/d3-contour/d3-contour-tests.ts index 2879e71e79..4563521751 100644 --- a/types/d3-contour/d3-contour-tests.ts +++ b/types/d3-contour/d3-contour-tests.ts @@ -63,6 +63,8 @@ let contGen: d3Contour.Contours = d3Contour.contours(); // size(...) ------------------------------------------------------------------- +const multiPolygon: d3Contour.ContourMultiPolygon = contGen.contour(values, 5); + // set with chainability contGen = contGen.size([n, m]); @@ -111,7 +113,11 @@ interface CustomDatum { // Get contour generator ------------------------------------------------------- -const contDensDefault: d3Contour.ContourDensity<[number, number]> = d3Contour.contourDensity(); +// test generic parameter defaults for ContourDensity and contourDensity +const contDensDefault: d3Contour.ContourDensity = d3Contour.contourDensity(); +// tslint:disable-next-line: use-default-type-parameter +const contDensDefaultCopy: d3Contour.ContourDensity<[number, number]> = contDensDefault; +// test with explicit generic parameter let contDensCustom: d3Contour.ContourDensity = d3Contour.contourDensity(); // Configure contour generator ================================================= diff --git a/types/d3-contour/index.d.ts b/types/d3-contour/index.d.ts index 1d82faae40..c0b3d70b5e 100644 --- a/types/d3-contour/index.d.ts +++ b/types/d3-contour/index.d.ts @@ -1,10 +1,10 @@ -// Type definitions for d3-contour 1.1 +// Type definitions for d3-contour 1.2 // Project: https://d3js.org/d3-contour/ // Definitions by: Tom Wanzek , Hugues Stefanski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -// Last module patch version validated against: 1.1.0 +// Last module patch version validated against: 1.2.0 import { MultiPolygon } from 'geojson'; import { ThresholdArrayGenerator, ThresholdCountGenerator } from 'd3-array'; @@ -41,6 +41,17 @@ export interface Contours { */ (values: number[]): ContourMultiPolygon[]; + /** + * Computes a single contour, returning a GeoJSON MultiPolygon geometry object. + * This geometry object represents the area where the input values are greater than or equal to the given threshold value; + * the threshold value for the geometry object is exposed as geometry.value. + * + * @param values Array of input values. The input values must be an array of length n×m where [n, m] is the contour generator’s size; + * furthermore, each values[i + jn] must represent the value at the position ⟨i, j⟩. + * @param threshold Threshold value. + */ + contour(values: number[], threshold: number): ContourMultiPolygon; + /** * Return the expected size of the input values grid, which defaults to [1,1]. */ @@ -109,8 +120,13 @@ export function contours(): Contours; /** * A contour generator for density estimates. + * + * The generic refers to the data type of an element in the data array + * used with the density contour generator. If omitted, the default setting assumes that, + * the elements of the data array used with the density contour generator are two-element arrays. + * The first element corresponds to the x-dimension, the second to the y-dimension. */ -export interface ContourDensity { +export interface ContourDensity { /** * Estimates the density contours for the given array of data, returning an array of GeoJSON MultiPolygon geometry objects. * Each geometry object represents the area where the estimated number of points per square pixel is greater than or equal to @@ -227,21 +243,15 @@ export interface ContourDensity { bandwidth(bandwidth: number): this; } -/** - * Construct a new contour generator for density estimates with the default settings. - * - * The default settings assume that, the elements of the data array used - * with the density contour generator are two-element arrays. The first element - * corresponds to the x-dimension, the second to the y-dimension. - */ -export function contourDensity(): ContourDensity<[number, number]>; /** * Construct a new contour generator for density estimates. * * The generic refers to the data type of an element in the data array - * used with the density contour generator. + * used with the density contour generator. If omitted, the default setting assumes that, + * the elements of the data array used with the density contour generator are two-element arrays. + * The first element corresponds to the x-dimension, the second to the y-dimension. * * Important: ensure that the x- and y-accessor functions are configured to * match the data type used for the generic Datum. */ -export function contourDensity(): ContourDensity; +export function contourDensity(): ContourDensity; diff --git a/types/d3-drag/d3-drag-tests.ts b/types/d3-drag/d3-drag-tests.ts index 848e3d1256..3bc7e6f851 100644 --- a/types/d3-drag/d3-drag-tests.ts +++ b/types/d3-drag/d3-drag-tests.ts @@ -67,7 +67,8 @@ let containerAccessor: (this: SVGCircleElement, d: CircleDatum, i: number, group containerAccessor = function(d, i, group) { console.log('Node Id of circle: ', d.nodeId); // console.log(this.a); // fails, a is not a property of SVGCircleElement - return this.ownerSVGElement; // this-type is SVGCircleElement + /* tslint:disable-next-line:no-unnecessary-type-assertion */ + return this.ownerSVGElement!; // this-type is SVGCircleElement }; // Test chainability @@ -75,7 +76,8 @@ circleDrag = circleDrag .container(function(d, i, group) { // container accessor function setter console.log('Node Id of circle: ', d.nodeId); // CircleDatum type // console.log(this.a); // fails, a is not a property of SVGCircleElement - return this.ownerSVGElement; // this-type is SVGCircleElement + /* tslint:disable-next-line:no-unnecessary-type-assertion */ + return this.ownerSVGElement!; // this-type is SVGCircleElement }); // Test chainability diff --git a/types/d3-fetch/d3-fetch-tests.ts b/types/d3-fetch/d3-fetch-tests.ts index 941955c996..9712a0da15 100644 --- a/types/d3-fetch/d3-fetch-tests.ts +++ b/types/d3-fetch/d3-fetch-tests.ts @@ -49,3 +49,14 @@ promise1 = d3Fetch.tsv(url); promise1 = d3Fetch.tsv(url, init); promise2 = d3Fetch.tsv(url, parseRow); promise2 = d3Fetch.tsv(url, init, parseRow); + +let docPromise: Promise; +docPromise = d3Fetch.html(url); +docPromise = d3Fetch.html(url, init); + +docPromise = d3Fetch.svg(url); +docPromise = d3Fetch.svg(url, init); + +let xmlDocPromise: Promise; +xmlDocPromise = d3Fetch.xml(url); +xmlDocPromise = d3Fetch.xml(url, init); diff --git a/types/d3-fetch/index.d.ts b/types/d3-fetch/index.d.ts index 3eb11ce48a..6e31d70a76 100644 --- a/types/d3-fetch/index.d.ts +++ b/types/d3-fetch/index.d.ts @@ -1,10 +1,10 @@ -// Type definitions for d3-fetch 1.0 +// Type definitions for d3-fetch 1.1 // Project: https://d3js.org/d3-fetch/ // Definitions by: Hugues Stefanski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -// Last module patch version validated against: 1.0.1 +// Last module patch version validated against: 1.1.0 import { DSVParsedArray, DSVRowString, DSVRowAny } from 'd3-dsv'; @@ -146,6 +146,16 @@ export function dsv( row: (rawRow: DSVRowString, index: number, columns: string[]) => ParsedRow | undefined | null ): Promise>; +/** + * Fetches the file at the specified input URL as text, parses it as HTML and returns a Promise of an HTML DOM Document. + * + * If init is specified, it is passed along to the underlying call to fetch. + * + * @param url A valid URL string. + * @param init An optional request initialization object. + */ +export function html(url: string, init?: RequestInit): Promise; + /** * Fetches the image at the specified input URL and returns a promise of an HTML image element. * @@ -168,6 +178,16 @@ export function image(url: string, init?: {[key: string]: any}): Promise(url: string, init?: RequestInit): Promise; +/** + * Fetches the file at the specified input URL as text, parses it as SVG and returns a Promise of an SVG Document. + * + * If init is specified, it is passed along to the underlying call to fetch. + * + * @param url A valid URL string. + * @param init An optional request initialization object. + */ +export function svg(url: string, init?: RequestInit): Promise; + /** * Fetches the text file at the specified input URL and returns it as a Promise of a string. * @@ -234,3 +254,13 @@ export function tsv( init: RequestInit, row: (rawRow: DSVRowString, index: number, columns: string[]) => ParsedRow | undefined | null ): Promise>; + +/** + * Fetches the file at the specified input URL as text, parses it as XML and returns a Promise of an XML Document. + * + * If init is specified, it is passed along to the underlying call to fetch. + * + * @param url A valid URL string. + * @param init An optional request initialization object. + */ +export function xml(url: string, init?: RequestInit): Promise; diff --git a/types/d3-format/d3-format-tests.ts b/types/d3-format/d3-format-tests.ts index def8994b70..5ab53a45a7 100644 --- a/types/d3-format/d3-format-tests.ts +++ b/types/d3-format/d3-format-tests.ts @@ -12,6 +12,20 @@ import * as d3Format from 'd3-format'; // Preparatory Steps // ---------------------------------------------------------------------- +class NumCoercible { + a: number; + + constructor(a: number) { + this.a = a; + } + + valueOf() { + return this.a; + } +} + +const numeric: NumCoercible = new NumCoercible(10); + let num: number; let formatFn: (n: number) => string; @@ -30,6 +44,12 @@ formatFn = d3Format.format('.0%'); formatFn = d3Format.formatPrefix(',.0', 1e-6); +d3Format.format('.0%')(10); +d3Format.format('.0%')(numeric); + +d3Format.formatPrefix(',.0', 1e-6)(10); +d3Format.formatPrefix(',.0', 1e-6)(numeric); + // ---------------------------------------------------------------------- // Test Format Specifier // ---------------------------------------------------------------------- @@ -43,7 +63,7 @@ const symbol: '$' | '#' | '' = specifier.symbol; const zero: boolean = specifier.zero; const width: number | undefined = specifier.width; const comma: boolean = specifier.comma; -const precision: number = specifier.precision; +const precision: number | undefined = specifier.precision; const type: 'e' | 'f' | 'g' | 'r' | 's' | '%' | 'p' | 'b' | 'o' | 'd' | 'x' | 'X' | 'c' | '' | 'n' = specifier.type; const formatString: string = specifier.toString(); @@ -63,10 +83,10 @@ num = d3Format.precisionRound(0.0005, 3000); // ---------------------------------------------------------------------- localeDef = { - decimal: ',', - thousands: '.', - grouping: [3], - currency: ['EUR', ''] + decimal: ',', + thousands: '.', + grouping: [3], + currency: ['EUR', ''] }; localeDef = { diff --git a/types/d3-format/index.d.ts b/types/d3-format/index.d.ts index 6592756ef1..bb0473a4fb 100644 --- a/types/d3-format/index.d.ts +++ b/types/d3-format/index.d.ts @@ -1,6 +1,9 @@ // Type definitions for D3JS d3-format module 1.2 // Project: https://github.com/d3/d3-format/ -// Definitions by: Tom Wanzek , Alex Ford , Boris Yankov +// Definitions by: Tom Wanzek +// Alex Ford +// Boris Yankov +// denisname // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Last module patch version validated against: 1.2.0 @@ -23,7 +26,7 @@ export interface FormatLocaleDefinition { */ grouping: number[]; /** - * The currency prefix and suffix (e.g., ["$", ""]) + * The currency prefix and suffix (e.g., ["$", ""]). */ currency: [string, string]; /** @@ -31,7 +34,7 @@ export interface FormatLocaleDefinition { */ numerals?: string[]; /** - * An optional symbol to replace the `percent` suffix; the percent suffix (defaults to "%") + * An optional symbol to replace the `percent` suffix; the percent suffix (defaults to "%"). */ percent?: string; } @@ -44,9 +47,10 @@ export interface FormatLocaleObject { * Returns a new format function for the given string specifier. The returned function * takes a number as the only argument, and returns a string representing the formatted number. * - * @param specifier A Specifier string + * @param specifier A Specifier string. + * @throws Error on invalid format specifier. */ - format(specifier: string): (n: number) => string; + format(specifier: string): (n: number | { valueOf(): number }) => string; /** * Returns a new format function for the given string specifier. The returned function @@ -54,10 +58,11 @@ export interface FormatLocaleObject { * The returned function will convert values to the units of the appropriate SI prefix for the * specified numeric reference value before formatting in fixed point notation. * - * @param specifier A Specifier string + * @param specifier A Specifier string. * @param value The reference value to determine the appropriate SI prefix. + * @throws Error on invalid format specifier. */ - formatPrefix(specifier: string, value: number): (n: number) => string; + formatPrefix(specifier: string, value: number): (n: number | { valueOf(): number }) => string; } /** @@ -71,7 +76,7 @@ export interface FormatSpecifier { */ fill: string; /** - * Alignment used for format, as set by choosing one of the following + * Alignment used for format, as set by choosing one of the following: * * '>' - Forces the field to be right-aligned within the available space. (Default behavior). * '<' - Forces the field to be left-aligned within the available space. @@ -83,9 +88,9 @@ export interface FormatSpecifier { * The sign can be: * * '-' - nothing for positive and a minus sign for negative. (Default behavior.) - * '+' - a plus sign for positive and a minus sign for negative. + * '+' - a plus sign for positive and a minus sign for negative. * '(' - nothing for positive and parentheses for negative. - * ' '(space) - a space for positive and a minus sign for negative. + * ' ' (space) - a space for positive and a minus sign for negative. * */ sign: '-' | '+' | '(' | ' '; @@ -94,7 +99,7 @@ export interface FormatSpecifier { * * '$' - apply currency symbols per the locale definition. * '#' - for binary, octal, or hexadecimal notation, prefix by 0b, 0o, or 0x, respectively. - * ''(none) - no symbol. + * '' (none) - no symbol. (Default behavior.) */ symbol: '$' | '#' | ''; /** @@ -116,9 +121,9 @@ export interface FormatSpecifier { * it defaults to 6 for all types except '' (none), which defaults to 12. * Precision is ignored for integer formats (types 'b', 'o', 'd', 'x', 'X' and 'c'). * - * See precisionFixed and precisionRound for help picking an appropriate precision + * See precisionFixed and precisionRound for help picking an appropriate precision. */ - precision: number; + precision: number | undefined; /** * The available type values are: * @@ -137,7 +142,7 @@ export interface FormatSpecifier { * 'c' - converts the integer to the corresponding unicode character before printing. * '' (none) - like g, but trim insignificant trailing zeros. * - * The type 'n' is also supported as shorthand for ',g'. For the 'g', 'n' and ''(none) types, + * The type 'n' is also supported as shorthand for ',g'. For the 'g', 'n' and '' (none) types, * decimal notation is used if the resulting string would have precision or fewer digits; otherwise, exponent notation is used. */ type: 'e' | 'f' | 'g' | 'r' | 's' | '%' | 'p' | 'b' | 'o' | 'd' | 'x' | 'X' | 'c' | '' | 'n'; @@ -173,9 +178,10 @@ export function formatDefaultLocale(defaultLocale: FormatLocaleDefinition): Form * The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][type]. * For reference, an explanation of the segments of the specifier string, refer to the FormatSpecifier interface properties. * - * @param specifier A Specifier string + * @param specifier A Specifier string. + * @throws Error on invalid format specifier. */ -export function format(specifier: string): (n: number) => string; +export function format(specifier: string): (n: number | { valueOf(): number }) => string; /** * Returns a new format function for the given string specifier. The returned function @@ -183,15 +189,16 @@ export function format(specifier: string): (n: number) => string; * The returned function will convert values to the units of the appropriate SI prefix for the * specified numeric reference value before formatting in fixed point notation. * - * Uses the current default locale. + * Uses the current default locale. * * The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][type]. * For reference, an explanation of the segments of the specifier string, refer to the FormatSpecifier interface properties. * - * @param specifier A Specifier string + * @param specifier A Specifier string. * @param value The reference value to determine the appropriate SI prefix. + * @throws Error on invalid format specifier. */ -export function formatPrefix(specifier: string, value: number): (n: number) => string; +export function formatPrefix(specifier: string, value: number): (n: number | { valueOf(): number }) => string; /** * Parses the specified specifier, returning an object with exposed fields that correspond to the @@ -201,6 +208,7 @@ export function formatPrefix(specifier: string, value: number): (n: number) => s * For reference, an explanation of the segments of the specifier string, refer to the FormatSpecifier interface properties. * * @param specifier A specifier string. + * @throws Error on invalid format specifier. */ export function formatSpecifier(specifier: string): FormatSpecifier; diff --git a/types/d3-format/tsconfig.json b/types/d3-format/tsconfig.json index 6017e0916f..078df0d2f2 100644 --- a/types/d3-format/tsconfig.json +++ b/types/d3-format/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/d3-geo/d3-geo-tests.ts b/types/d3-geo/d3-geo-tests.ts index c4508351a0..51ddb93d89 100644 --- a/types/d3-geo/d3-geo-tests.ts +++ b/types/d3-geo/d3-geo-tests.ts @@ -89,7 +89,33 @@ const sampleExtendedFeatureCollection: d3Geo.ExtendedFeatureCollection = { + type: 'Feature', + geometry: null, + properties: null +}; +const sampleExtendedNullableFeature: d3Geo.ExtendedFeature = { + type: 'Feature', + geometry: null, + properties: null +}; + +const sampleNullableFeatureCollection: GeoJSON.FeatureCollection = { + type: 'FeatureCollection', + features: [ + sampleNullableFeature, + sampleNullableFeature + ] +}; + +const sampleExtendedNullableFeatureCollection: d3Geo.ExtendedFeatureCollection = { + type: 'FeatureCollection', + features: [ + sampleExtendedNullableFeature, + sampleExtendedNullableFeature + ] +}; // ---------------------------------------------------------------------- // Spherical Math // ---------------------------------------------------------------------- @@ -101,10 +127,14 @@ area = d3Geo.geoArea(sampleSphere); area = d3Geo.geoArea(sampleGeometryCollection); area = d3Geo.geoArea(sampleExtendedGeometryCollection); area = d3Geo.geoArea(sampleFeature); +area = d3Geo.geoArea(sampleNullableFeature); area = d3Geo.geoArea(sampleExtendedFeature1); area = d3Geo.geoArea(sampleExtendedFeature2); +area = d3Geo.geoArea(sampleExtendedNullableFeature); area = d3Geo.geoArea(sampleFeatureCollection); +area = d3Geo.geoArea(sampleNullableFeatureCollection); area = d3Geo.geoArea(sampleExtendedFeatureCollection); +area = d3Geo.geoArea(sampleExtendedNullableFeatureCollection); // geoBounds(...) ========================================================= @@ -113,10 +143,14 @@ bounds = d3Geo.geoBounds(sampleSphere); bounds = d3Geo.geoBounds(sampleGeometryCollection); bounds = d3Geo.geoBounds(sampleExtendedGeometryCollection); bounds = d3Geo.geoBounds(sampleFeature); +bounds = d3Geo.geoBounds(sampleNullableFeature); bounds = d3Geo.geoBounds(sampleExtendedFeature1); bounds = d3Geo.geoBounds(sampleExtendedFeature2); +bounds = d3Geo.geoBounds(sampleExtendedNullableFeature); bounds = d3Geo.geoBounds(sampleFeatureCollection); +bounds = d3Geo.geoBounds(sampleNullableFeatureCollection); bounds = d3Geo.geoBounds(sampleExtendedFeatureCollection); +bounds = d3Geo.geoBounds(sampleExtendedNullableFeatureCollection); // geoCentroid(...) ======================================================= @@ -125,10 +159,14 @@ centroid = d3Geo.geoCentroid(sampleSphere); centroid = d3Geo.geoCentroid(sampleGeometryCollection); centroid = d3Geo.geoCentroid(sampleExtendedGeometryCollection); centroid = d3Geo.geoCentroid(sampleFeature); +centroid = d3Geo.geoCentroid(sampleNullableFeature); centroid = d3Geo.geoCentroid(sampleExtendedFeature1); centroid = d3Geo.geoCentroid(sampleExtendedFeature2); +centroid = d3Geo.geoCentroid(sampleExtendedNullableFeature); centroid = d3Geo.geoCentroid(sampleFeatureCollection); +centroid = d3Geo.geoCentroid(sampleNullableFeatureCollection); centroid = d3Geo.geoCentroid(sampleExtendedFeatureCollection); +centroid = d3Geo.geoCentroid(sampleExtendedNullableFeatureCollection); // geoContains(...) ======================================================= @@ -137,10 +175,14 @@ contained = d3Geo.geoContains(sampleSphere, [0, 0]); contained = d3Geo.geoContains(sampleGeometryCollection, [0, 0]); contained = d3Geo.geoContains(sampleExtendedGeometryCollection, [0, 0]); contained = d3Geo.geoContains(sampleFeature, [0, 0]); +contained = d3Geo.geoContains(sampleNullableFeature, [0, 0]); contained = d3Geo.geoContains(sampleExtendedFeature1, [0, 0]); contained = d3Geo.geoContains(sampleExtendedFeature2, [0, 0]); +contained = d3Geo.geoContains(sampleExtendedNullableFeature, [0, 0]); contained = d3Geo.geoContains(sampleFeatureCollection, [0, 0]); +contained = d3Geo.geoContains(sampleNullableFeatureCollection, [0, 0]); contained = d3Geo.geoContains(sampleExtendedFeatureCollection, [0, 0]); +contained = d3Geo.geoContains(sampleExtendedNullableFeatureCollection, [0, 0]); // geoDistance(...) ======================================================= @@ -153,10 +195,14 @@ length = d3Geo.geoLength(sampleSphere); length = d3Geo.geoLength(sampleGeometryCollection); length = d3Geo.geoLength(sampleExtendedGeometryCollection); length = d3Geo.geoLength(sampleFeature); +length = d3Geo.geoLength(sampleNullableFeature); length = d3Geo.geoLength(sampleExtendedFeature1); length = d3Geo.geoLength(sampleExtendedFeature2); +length = d3Geo.geoLength(sampleExtendedNullableFeature); length = d3Geo.geoLength(sampleFeatureCollection); +length = d3Geo.geoLength(sampleNullableFeatureCollection); length = d3Geo.geoLength(sampleExtendedFeatureCollection); +length = d3Geo.geoLength(sampleExtendedNullableFeatureCollection); // geoInterpolate(...) ==================================================== @@ -181,7 +227,7 @@ const inverted: [number, number] = rotation.invert([54, 2]); // Create GeoCircleGenerator ============================================ // simple use case -let circleGeneratorSimple: d3Geo.GeoCircleGenerator = d3Geo.geoCircle(); +let circleGeneratorSimple: d3Geo.GeoCircleGenerator = d3Geo.geoCircle(); // complex use as part of object class Circulator { @@ -331,8 +377,9 @@ const naturalEart1Raw: d3Geo.GeoRawProjection = d3Geo.geoNaturalEarth1Raw(); // Use Raw Projection ===================================================== const rawProjectionPoint: [number, number] = azimuthalEqualAreaRaw(54, 2); -const rawProjectionInvertedPoint: [number, number] = azimuthalEqualAreaRaw.invert(180, 6); - +if (azimuthalEqualAreaRaw.invert) { + const rawProjectionInvertedPoint: [number, number] = azimuthalEqualAreaRaw.invert(180, 6); +} // ---------------------------------------------------------------------- // Pre-Defined Projections // ---------------------------------------------------------------------- @@ -365,8 +412,10 @@ let constructedProjection: d3Geo.GeoProjection = mutate(); // Use Projection ========================================================== -const projected: [number, number] = constructedProjection([54, 2]); -const inverted2: [number, number] = constructedProjection.invert([54, 2]); +const projected: [number, number] | null = constructedProjection([54, 2]); +if (constructedProjection.invert) { + const inverted2: [number, number] | null = constructedProjection.invert([54, 2]); +} // TODO ????? // let stream: d3Geo.Stream = constructedProjection.stream([54, 2]); @@ -378,7 +427,7 @@ constructedProjection = constructedProjection.preclip(d3Geo.geoClipCircle(45)); const postClip: (stream: d3Geo.GeoStream) => d3Geo.GeoStream = constructedProjection.postclip(); constructedProjection = constructedProjection.postclip(d3Geo.geoClipRectangle(0, 0, 1, 1)); -const clipAngle: number = constructedProjection.clipAngle(); +const clipAngle: number | null = constructedProjection.clipAngle(); constructedProjection = constructedProjection.clipAngle(null); constructedProjection = constructedProjection.clipAngle(45); @@ -395,6 +444,9 @@ constructedProjection = constructedProjection.translate([480, 250]); const center: [number, number] = constructedProjection.center(); constructedProjection = constructedProjection.center([0, 0]); +const angle = constructedProjection.angle(); +constructedProjection = constructedProjection.angle(45); + const rotate: [number, number, number] = constructedProjection.rotate(); constructedProjection = constructedProjection.rotate([0, 0]); constructedProjection = constructedProjection.rotate([0, 0, 0]); @@ -407,40 +459,56 @@ constructedProjection = constructedProjection.fitExtent([[0, 0], [960, 500]], sa constructedProjection = constructedProjection.fitExtent([[0, 0], [960, 500]], sampleGeometryCollection); constructedProjection = constructedProjection.fitExtent([[0, 0], [960, 500]], sampleExtendedGeometryCollection); constructedProjection = constructedProjection.fitExtent([[0, 0], [960, 500]], sampleFeature); +constructedProjection = constructedProjection.fitExtent([[0, 0], [960, 500]], sampleNullableFeature); constructedProjection = constructedProjection.fitExtent([[0, 0], [960, 500]], sampleExtendedFeature1); constructedProjection = constructedProjection.fitExtent([[0, 0], [960, 500]], sampleExtendedFeature2); +constructedProjection = constructedProjection.fitExtent([[0, 0], [960, 500]], sampleExtendedNullableFeature); constructedProjection = constructedProjection.fitExtent([[0, 0], [960, 500]], sampleFeatureCollection); +constructedProjection = constructedProjection.fitExtent([[0, 0], [960, 500]], sampleNullableFeatureCollection); constructedProjection = constructedProjection.fitExtent([[0, 0], [960, 500]], sampleExtendedFeatureCollection); +constructedProjection = constructedProjection.fitExtent([[0, 0], [960, 500]], sampleExtendedNullableFeatureCollection); constructedProjection = constructedProjection.fitSize([960, 500], samplePolygon); constructedProjection = constructedProjection.fitSize([960, 500], sampleSphere); constructedProjection = constructedProjection.fitSize([960, 500], sampleGeometryCollection); constructedProjection = constructedProjection.fitSize([960, 500], sampleExtendedGeometryCollection); constructedProjection = constructedProjection.fitSize([960, 500], sampleFeature); +constructedProjection = constructedProjection.fitSize([960, 500], sampleNullableFeature); constructedProjection = constructedProjection.fitSize([960, 500], sampleExtendedFeature1); constructedProjection = constructedProjection.fitSize([960, 500], sampleExtendedFeature2); +constructedProjection = constructedProjection.fitSize([960, 500], sampleExtendedNullableFeature); constructedProjection = constructedProjection.fitSize([960, 500], sampleFeatureCollection); +constructedProjection = constructedProjection.fitSize([960, 500], sampleNullableFeatureCollection); constructedProjection = constructedProjection.fitSize([960, 500], sampleExtendedFeatureCollection); +constructedProjection = constructedProjection.fitSize([960, 500], sampleExtendedNullableFeatureCollection); constructedProjection = constructedProjection.fitWidth(960, samplePolygon); constructedProjection = constructedProjection.fitWidth(960, sampleSphere); constructedProjection = constructedProjection.fitWidth(960, sampleGeometryCollection); constructedProjection = constructedProjection.fitWidth(960, sampleExtendedGeometryCollection); constructedProjection = constructedProjection.fitWidth(960, sampleFeature); +constructedProjection = constructedProjection.fitWidth(960, sampleNullableFeature); constructedProjection = constructedProjection.fitWidth(960, sampleExtendedFeature1); constructedProjection = constructedProjection.fitWidth(960, sampleExtendedFeature2); +constructedProjection = constructedProjection.fitWidth(960, sampleExtendedNullableFeature); constructedProjection = constructedProjection.fitWidth(960, sampleFeatureCollection); +constructedProjection = constructedProjection.fitWidth(960, sampleNullableFeatureCollection); constructedProjection = constructedProjection.fitWidth(960, sampleExtendedFeatureCollection); +constructedProjection = constructedProjection.fitWidth(960, sampleExtendedNullableFeatureCollection); constructedProjection = constructedProjection.fitHeight(500, samplePolygon); constructedProjection = constructedProjection.fitHeight(500, sampleSphere); constructedProjection = constructedProjection.fitHeight(500, sampleGeometryCollection); constructedProjection = constructedProjection.fitHeight(500, sampleExtendedGeometryCollection); constructedProjection = constructedProjection.fitHeight(500, sampleFeature); +constructedProjection = constructedProjection.fitHeight(500, sampleNullableFeature); constructedProjection = constructedProjection.fitHeight(500, sampleExtendedFeature1); constructedProjection = constructedProjection.fitHeight(500, sampleExtendedFeature2); +constructedProjection = constructedProjection.fitHeight(500, sampleExtendedNullableFeature); constructedProjection = constructedProjection.fitHeight(500, sampleFeatureCollection); +constructedProjection = constructedProjection.fitHeight(500, sampleNullableFeatureCollection); constructedProjection = constructedProjection.fitHeight(500, sampleExtendedFeatureCollection); +constructedProjection = constructedProjection.fitHeight(500, sampleExtendedNullableFeatureCollection); // ---------------------------------------------------------------------- // GeoConicProjection interface @@ -468,7 +536,7 @@ const minimalRenderingContextMockUp: d3Geo.GeoContext = { // Create geoPath Generator ============================================= -let geoPathCanvas: d3Geo.GeoPath; +let geoPathCanvas: d3Geo.GeoPath; geoPathCanvas = d3Geo.geoPath(); geoPathCanvas = d3Geo.geoPath(null); geoPathCanvas = d3Geo.geoPath(null, null); @@ -484,8 +552,8 @@ geoPathSVG = d3Geo.geoPath(); geoPathSVG = geoPathSVG.projection(conicConformal); @@ -498,13 +566,13 @@ const geoPathConicProjection: d3Geo.GeoConicProjection = geoPathSVG.projection, Tom Wanzek , Alex Ford , Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -// Last module patch version validated against: 1.9.0 +// Last module patch version validated against: 1.10.0 import * as GeoJSON from 'geojson'; @@ -31,9 +31,11 @@ export type GeoGeometryObjects = GeoJSON.GeometryObject | GeoSphere; /** * A GeoJSON-style GeometryCollection which supports GeoJSON geometry objects - * and additionally GeoSphere + * and additionally GeoSphere. + * + * The generic refers to the type(s) of d3-geo geometry objects contained in the collection. */ -export interface ExtendedGeometryCollection { +export interface ExtendedGeometryCollection { type: string; bbox?: number[]; crs?: { @@ -45,9 +47,18 @@ export interface ExtendedGeometryCollection extends GeoJSON.GeoJsonObject { +export interface ExtendedFeature< + GeometryType extends GeoGeometryObjects | null = GeoGeometryObjects | null, + Properties extends GeoJSON.GeoJsonProperties = GeoJSON.GeoJsonProperties + > extends GeoJSON.GeoJsonObject { geometry: GeometryType; properties: Properties; id?: string | number; @@ -56,8 +67,10 @@ export interface ExtendedFeature> extends GeoJSON.GeoJsonObject { +export interface ExtendedFeatureCollection extends GeoJSON.GeoJsonObject { features: FeatureType[]; } @@ -65,8 +78,7 @@ export interface ExtendedFeatureCollection - | ExtendedFeature | ExtendedFeatureCollection>; +export type GeoPermissibleObjects = GeoGeometryObjects | ExtendedGeometryCollection | ExtendedFeature | ExtendedFeatureCollection; // ---------------------------------------------------------------------- // Spherical Math @@ -78,14 +90,14 @@ export type GeoPermissibleObjects = GeoGeometryObjects | ExtendedGeometryCollect * * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). */ -export function geoArea(object: ExtendedFeature): number; +export function geoArea(object: ExtendedFeature): number; /** * Returns the spherical area of the specified feature collection in steradians. * This is the spherical equivalent of path.area. * * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). */ -export function geoArea(object: ExtendedFeatureCollection>): number; +export function geoArea(object: ExtendedFeatureCollection): number; /** * Returns the spherical area of the specified GeoJson Geometry Object or GeoSphere object in steradians. * This is the spherical equivalent of path.area. @@ -99,7 +111,7 @@ export function geoArea(object: GeoGeometryObjects): number; * * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). */ -export function geoArea(object: ExtendedGeometryCollection): number; +export function geoArea(object: ExtendedGeometryCollection): number; /** * Returns the spherical bounding box for the specified feature. The bounding box is represented by a two-dimensional array: [[left, bottom], [right, top]], @@ -109,7 +121,7 @@ export function geoArea(object: ExtendedGeometryCollection): * * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). */ -export function geoBounds(object: ExtendedFeature): [[number, number], [number, number]]; +export function geoBounds(object: ExtendedFeature): [[number, number], [number, number]]; /** * Returns the spherical bounding box for the specified feature collection. The bounding box is represented by a two-dimensional array: [[left, bottom], [right, top]], * where left is the minimum longitude, bottom is the minimum latitude, right is maximum longitude, and top is the maximum latitude. All coordinates are given in degrees. @@ -118,7 +130,7 @@ export function geoBounds(object: ExtendedFeature): [[n * * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). */ -export function geoBounds(object: ExtendedFeatureCollection>): [[number, number], [number, number]]; +export function geoBounds(object: ExtendedFeatureCollection): [[number, number], [number, number]]; /** * Returns the spherical bounding box for the specified GeoJson Geometry Object or GeoSphere object. The bounding box is represented by a two-dimensional array: [[left, bottom], [right, top]], * where left is the minimum longitude, bottom is the minimum latitude, right is maximum longitude, and top is the maximum latitude. All coordinates are given in degrees. @@ -136,7 +148,7 @@ export function geoBounds(object: GeoGeometryObjects): [[number, number], [numbe * * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). */ -export function geoBounds(object: ExtendedGeometryCollection): [[number, number], [number, number]]; +export function geoBounds(object: ExtendedGeometryCollection): [[number, number], [number, number]]; /** * Returns the spherical centroid of the specified feature in steradians. @@ -144,14 +156,14 @@ export function geoBounds(object: ExtendedGeometryCollection * * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). */ -export function geoCentroid(object: ExtendedFeature): [number, number]; +export function geoCentroid(object: ExtendedFeature): [number, number]; /** * Returns the spherical centroid of the specified feature collection in steradians. * This is the spherical equivalent of path.centroid. * * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). */ -export function geoCentroid(object: ExtendedFeatureCollection>): [number, number]; +export function geoCentroid(object: ExtendedFeatureCollection): [number, number]; /** * Returns the spherical centroid of the specified GeoJson Geometry Object or GeoSphere object in steradians. * This is the spherical equivalent of path.centroid. @@ -165,7 +177,7 @@ export function geoCentroid(object: GeoGeometryObjects): [number, number]; * * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). */ -export function geoCentroid(object: ExtendedGeometryCollection): [number, number]; +export function geoCentroid(object: ExtendedGeometryCollection): [number, number]; /** * Returns true if and only if the specified GeoJSON object contains the specified point, or false if the object does not contain the point. @@ -175,7 +187,7 @@ export function geoCentroid(object: ExtendedGeometryCollection, point: [number, number]): boolean; +export function geoContains(object: ExtendedFeature, point: [number, number]): boolean; /** * Returns true if and only if the specified GeoJSON object contains the specified point, or false if the object does not contain the point. * The point must be specified as a two-element array [longitude, latitude] in degrees. For Point and MultiPoint geometries, an exact test is used; @@ -184,7 +196,7 @@ export function geoContains(object: ExtendedFeature, po * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). * @param point Point specified as a two-element array [longitude, latitude] in degrees. */ -export function geoContains(object: ExtendedFeatureCollection>, point: [number, number]): boolean; +export function geoContains(object: ExtendedFeatureCollection, point: [number, number]): boolean; /** * Returns true if and only if the specified GeoJSON object contains the specified point, or false if the object does not contain the point. * The point must be specified as a two-element array [longitude, latitude] in degrees. For Point and MultiPoint geometries, an exact test is used; @@ -202,7 +214,7 @@ export function geoContains(object: GeoGeometryObjects, point: [number, number]) * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). * @param point Point specified as a two-element array [longitude, latitude] in degrees. */ -export function geoContains(object: ExtendedGeometryCollection, point: [number, number]): boolean; +export function geoContains(object: ExtendedGeometryCollection, point: [number, number]): boolean; /** * Returns the great-arc distance in radians between the two points a and b. @@ -219,14 +231,14 @@ export function geoDistance(a: [number, number], b: [number, number]): number; * * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). */ -export function geoLength(object: ExtendedFeature): number; +export function geoLength(object: ExtendedFeature): number; /** * Returns the great-arc length of the specified feature collection in radians. For polygons, returns the perimeter of the exterior ring plus that of any interior rings. * This is the spherical equivalent of path.measure. * * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). */ -export function geoLength(object: ExtendedFeatureCollection>): number; +export function geoLength(object: ExtendedFeatureCollection): number; /** * Returns the great-arc length of the specified GeoJson Geometry Object or GeoSphere object in radians. For polygons, returns the perimeter of the exterior ring plus that of any interior rings. * This is the spherical equivalent of path.measure. @@ -240,7 +252,7 @@ export function geoLength(object: GeoGeometryObjects): number; * * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). */ -export function geoLength(object: ExtendedGeometryCollection): number; +export function geoLength(object: ExtendedGeometryCollection): number; /** * Returns an interpolator function given two points a and b. @@ -291,7 +303,7 @@ export function geoRotation(angles: [number, number] | [number, number, number]) * * The second generic corresponds to the type of the Datum which will be passed into the geo circle generator. */ -export interface GeoCircleGenerator { +export interface GeoCircleGenerator { /** * Returns a new GeoJSON geometry object of type “Polygon” approximating a circle on the surface of a sphere, * with the current center, radius and precision. Any arguments are passed to the accessors. @@ -362,7 +374,7 @@ export interface GeoCircleGenerator { /** * Returns a new geo circle generator */ -export function geoCircle(): GeoCircleGenerator; +export function geoCircle(): GeoCircleGenerator; /** * Returns a new geo circle generator * @@ -547,7 +559,7 @@ export interface GeoStream { * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). * @param stream A projection stream. */ -export function geoStream(object: ExtendedFeature, stream: GeoStream): void; +export function geoStream(object: ExtendedFeature, stream: GeoStream): void; /** * Streams the specified GeoJSON object to the specified projection stream. While both features and geometry objects are supported as input, @@ -556,7 +568,7 @@ export function geoStream(object: ExtendedFeature, stre * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). * @param stream A projection stream. */ -export function geoStream(object: ExtendedFeatureCollection>, stream: GeoStream): void; +export function geoStream(object: ExtendedFeatureCollection, stream: GeoStream): void; /** * Streams the specified GeoJSON object to the specified projection stream. While both features and geometry objects are supported as input, @@ -574,7 +586,7 @@ export function geoStream(object: GeoGeometryObjects, stream: GeoStream): void; * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). * @param stream A projection stream. */ -export function geoStream(object: ExtendedGeometryCollection, stream: GeoStream): void; +export function geoStream(object: ExtendedGeometryCollection, stream: GeoStream): void; // ---------------------------------------------------------------------- // Projections @@ -736,7 +748,7 @@ export interface GeoProjection extends GeoStreamWrapper { * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). */ - fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeature): this; + fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeature): this; /** * Sets the projection’s scale and translate to fit the specified geographic feature collection in the center of the given extent. * Returns the projection. @@ -746,7 +758,7 @@ export interface GeoProjection extends GeoStreamWrapper { * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature collection). */ - fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeatureCollection>): this; + fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeatureCollection): this; /** * Sets the projection’s scale and translate to fit the specified geographic geometry object in the center of the given extent. * Returns the projection. @@ -766,7 +778,7 @@ export interface GeoProjection extends GeoStreamWrapper { * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). */ - fitExtent(extent: [[number, number], [number, number]], object: ExtendedGeometryCollection): this; + fitExtent(extent: [[number, number], [number, number]], object: ExtendedGeometryCollection): this; /** * Sets the projection’s scale and translate to fit the specified geographic feature in the center of an extent with the given size and top-left corner of [0, 0]. @@ -777,7 +789,7 @@ export interface GeoProjection extends GeoStreamWrapper { * @param size The size of the extent, specified as an array [width, height]. * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). */ - fitSize(size: [number, number], object: ExtendedFeature): this; + fitSize(size: [number, number], object: ExtendedFeature): this; /** * Sets the projection’s scale and translate to fit the specified geographic feature collection in the center of an extent with the given size and top-left corner of [0, 0]. * Returns the projection. @@ -787,7 +799,7 @@ export interface GeoProjection extends GeoStreamWrapper { * @param size The size of the extent, specified as an array [width, height]. * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature collection). */ - fitSize(size: [number, number], object: ExtendedFeatureCollection>): this; + fitSize(size: [number, number], object: ExtendedFeatureCollection): this; /** * Sets the projection’s scale and translate to fit the specified geographic geometry object in the center of an extent with the given size and top-left corner of [0, 0]. * Returns the projection. @@ -807,7 +819,7 @@ export interface GeoProjection extends GeoStreamWrapper { * @param size The size of the extent, specified as an array [width, height]. * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). */ - fitSize(size: [number, number], object: ExtendedGeometryCollection): this; + fitSize(size: [number, number], object: ExtendedGeometryCollection): this; /** * A convenience method for projection.fitSize where the height is automatically chosen from the aspect ratio of object and the given constraint on width. @@ -815,14 +827,14 @@ export interface GeoProjection extends GeoStreamWrapper { * @param width The width of the extent. * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). */ - fitWidth(width: number, object: ExtendedFeature): this; + fitWidth(width: number, object: ExtendedFeature): this; /** * A convenience method for projection.fitSize where the height is automatically chosen from the aspect ratio of object and the given constraint on width. * * @param width The width of the extent. * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). */ - fitWidth(width: number, object: ExtendedFeatureCollection>): this; + fitWidth(width: number, object: ExtendedFeatureCollection): this; /** * A convenience method for projection.fitSize where the height is automatically chosen from the aspect ratio of object and the given constraint on width. * @@ -836,7 +848,7 @@ export interface GeoProjection extends GeoStreamWrapper { * @param width The width of the extent. * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). */ - fitWidth(width: number, object: ExtendedGeometryCollection): this; + fitWidth(width: number, object: ExtendedGeometryCollection): this; /** * A convenience method for projection.fitSize where the width is automatically chosen from the aspect ratio of object and the given constraint on height. @@ -844,14 +856,14 @@ export interface GeoProjection extends GeoStreamWrapper { * @param height The height of the extent. * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). */ - fitHeight(height: number, object: ExtendedFeature): this; + fitHeight(height: number, object: ExtendedFeature): this; /** * A convenience method for projection.fitSize where the width is automatically chosen from the aspect ratio of object and the given constraint on height. * * @param height The height of the extent. * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). */ - fitHeight(height: number, object: ExtendedFeatureCollection>): this; + fitHeight(height: number, object: ExtendedFeatureCollection): this; /** * A convenience method for projection.fitSize where the width is automatically chosen from the aspect ratio of object and the given constraint on height. * @@ -865,7 +877,7 @@ export interface GeoProjection extends GeoStreamWrapper { * @param height The height of the extent. * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). */ - fitHeight(height: number, object: ExtendedGeometryCollection): this; + fitHeight(height: number, object: ExtendedGeometryCollection): this; /** * Returns a new array [longitude, latitude] in degrees representing the unprojected point of the given projected point. @@ -887,7 +899,15 @@ export interface GeoProjection extends GeoStreamWrapper { * @param precision A numeric value in pixels to use as the threshold for the projection’s adaptive resampling. */ precision(precision: number): this; - + /** + * Returns the projection’s current angle, which defaults to 0°. + */ + angle(): number; + /** + * Sets the projection’s post-projection planar rotation angle to the specified angle in degrees and returns the projection. + * @param angle The new rotation angle of the projection. + */ + angle(angle: number): this; /** * Returns the current rotation [lambda, phi, gamma] specifying the rotation angles in degrees about each spherical axis. * (These correspond to yaw, pitch and roll.) which defaults [0, 0, 0]. @@ -1004,7 +1024,7 @@ export interface GeoContext { * * The second generic corresponds to the type of the DatumObject which will be passed into the geo path generator for rendering. */ -export interface GeoPath { +export interface GeoPath { /** * Renders the given object, which may be any GeoJSON feature or geometry object: * @@ -1214,7 +1234,7 @@ export interface GeoPath { * @param context An (optional) rendering context to be used. If a context is provided, it must at least implement the interface described by GeoContext, a subset of the CanvasRenderingContext2D API. * Setting the context to "null" means that the path generator will return an SVG path string representing the to be rendered object. The default is "null". */ -export function geoPath(projection?: GeoProjection | GeoStreamWrapper | null, context?: GeoContext | null): GeoPath; +export function geoPath(projection?: GeoProjection | GeoStreamWrapper | null, context?: GeoContext | null): GeoPath; /** * Creates a new geographic path generator with the default settings. * @@ -1517,7 +1537,7 @@ export interface GeoIdentityTranform extends GeoStreamWrapper { * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). */ - fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeature): this; + fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeature): this; /** * Sets the projection’s scale and translate to fit the specified geographic feature collection in the center of the given extent. * Returns the projection. @@ -1527,7 +1547,7 @@ export interface GeoIdentityTranform extends GeoStreamWrapper { * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature collection). */ - fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeatureCollection>): this; + fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeatureCollection): this; /** * Sets the projection’s scale and translate to fit the specified geographic geometry object in the center of the given extent. * Returns the projection. @@ -1547,7 +1567,7 @@ export interface GeoIdentityTranform extends GeoStreamWrapper { * @param extent The extent, specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left side of the bounding box, y₀ is the top, x₁ is the right and y₁ is the bottom. * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). */ - fitExtent(extent: [[number, number], [number, number]], object: ExtendedGeometryCollection): this; + fitExtent(extent: [[number, number], [number, number]], object: ExtendedGeometryCollection): this; /** * Sets the projection’s scale and translate to fit the specified geographic feature in the center of an extent with the given size and top-left corner of [0, 0]. @@ -1558,7 +1578,7 @@ export interface GeoIdentityTranform extends GeoStreamWrapper { * @param size The size of the extent, specified as an array [width, height]. * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). */ - fitSize(size: [number, number], object: ExtendedFeature): this; + fitSize(size: [number, number], object: ExtendedFeature): this; /** * Sets the projection’s scale and translate to fit the specified geographic feature collection in the center of an extent with the given size and top-left corner of [0, 0]. * Returns the projection. @@ -1568,7 +1588,7 @@ export interface GeoIdentityTranform extends GeoStreamWrapper { * @param size The size of the extent, specified as an array [width, height]. * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature collection). */ - fitSize(size: [number, number], object: ExtendedFeatureCollection>): this; + fitSize(size: [number, number], object: ExtendedFeatureCollection): this; /** * Sets the projection’s scale and translate to fit the specified geographic geometry object in the center of an extent with the given size and top-left corner of [0, 0]. * Returns the projection. @@ -1588,7 +1608,7 @@ export interface GeoIdentityTranform extends GeoStreamWrapper { * @param size The size of the extent, specified as an array [width, height]. * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). */ - fitSize(size: [number, number], object: ExtendedGeometryCollection): this; + fitSize(size: [number, number], object: ExtendedGeometryCollection): this; /** * Returns true if x-reflection is enabled, which defaults to false. diff --git a/types/d3-geo/tsconfig.json b/types/d3-geo/tsconfig.json index f3661c3ad2..128bdf7ee8 100644 --- a/types/d3-geo/tsconfig.json +++ b/types/d3-geo/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ @@ -21,4 +21,4 @@ "index.d.ts", "d3-geo-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/d3kit/v1/d3kit-tests.ts b/types/d3kit/v1/d3kit-tests.ts index 9ffb7ca2ba..18f1f144f9 100644 --- a/types/d3kit/v1/d3kit-tests.ts +++ b/types/d3kit/v1/d3kit-tests.ts @@ -1,6 +1,10 @@ -/// /// +// Stub mocha functions +const {describe, it, before, after, beforeEach, afterEach} = null as any as { + [s: string]: ((s: string, cb: (done: any) => void) => void) & ((cb: (done: any) => void) => void) & {only: any, skip: any}; +}; + var expect = chai.expect; describe('Skeleton', function(){ var element: Element, $element: d3.Selection, $svg: d3.Selection, skeleton: d3kit.Skeleton; diff --git a/types/dagre/index.d.ts b/types/dagre/index.d.ts index 6c5e5e00ec..774fbf8f80 100644 --- a/types/dagre/index.d.ts +++ b/types/dagre/index.d.ts @@ -95,15 +95,15 @@ export interface NodeConfig { } export interface EdgeConfig { - minlen: number; - weight: number; - width: number; - height: number; - lablepos: 'l'|'c'|'r'; - labeloffest: number; + minlen?: number; + weight?: number; + width?: number; + height?: number; + lablepos?: 'l'|'c'|'r'; + labeloffest?: number; } -export function layout(graph: graphlib.Graph, layout?: GraphLabel&NodeConfig&EdgeConfig): void; +export function layout(graph: graphlib.Graph, layout?: GraphLabel & NodeConfig & EdgeConfig): void; export interface Edge { v: string; diff --git a/types/datadog-tracer/datadog-tracer-tests.ts b/types/datadog-tracer/datadog-tracer-tests.ts new file mode 100644 index 0000000000..b0fa4744b1 --- /dev/null +++ b/types/datadog-tracer/datadog-tracer-tests.ts @@ -0,0 +1,9 @@ +import Tracer = require('datadog-tracer'); + +const tracer = new Tracer({ + service: 'test' +}); + +tracer.on('error', (e: any) => { + void(0); +}); diff --git a/types/datadog-tracer/index.d.ts b/types/datadog-tracer/index.d.ts new file mode 100644 index 0000000000..e7a11245fe --- /dev/null +++ b/types/datadog-tracer/index.d.ts @@ -0,0 +1,24 @@ +// Type definitions for datadog-tracer 0.4 +// Project: https://github.com/rochdev/datadog-tracer-js#readme +// Definitions by: Dinesh Saravanan Kumaraswamy +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +import * as opentracing from "opentracing"; +import { EventEmitter } from "events"; + +export as namespace Tracer; +export = Tracer; + +interface TracerOptions { + service: string; + hostname?: string; + port?: number; + protocol?: string; + endpoint?: string; +} + +declare class Tracer extends opentracing.Tracer { + constructor(tracerOptions: TracerOptions); + + on(method: "error", cb?: (e: any) => void): void; + addEventListener(method: "error", cb?: (e: any) => void): void; +} diff --git a/types/datadog-tracer/package.json b/types/datadog-tracer/package.json new file mode 100644 index 0000000000..ce14cc9e91 --- /dev/null +++ b/types/datadog-tracer/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "opentracing": "^0.14.1" + } +} diff --git a/types/datadog-tracer/tsconfig.json b/types/datadog-tracer/tsconfig.json new file mode 100644 index 0000000000..f117daa17e --- /dev/null +++ b/types/datadog-tracer/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "datadog-tracer-tests.ts" + ] +} diff --git a/types/datadog-tracer/tslint.json b/types/datadog-tracer/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/datadog-tracer/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/datatables.net-autofill/datatables.net-autofill-tests.ts b/types/datatables.net-autofill/datatables.net-autofill-tests.ts new file mode 100644 index 0000000000..0ad00b4395 --- /dev/null +++ b/types/datatables.net-autofill/datatables.net-autofill-tests.ts @@ -0,0 +1,8 @@ +const config: DataTables.Settings = { + // AutoFill extension options + autoFill: { + alwaysAsk: true, + enable: true, + columns: [1, 2] + } +}; diff --git a/types/datatables.net-autofill/index.d.ts b/types/datatables.net-autofill/index.d.ts new file mode 100644 index 0000000000..2f05d608be --- /dev/null +++ b/types/datatables.net-autofill/index.d.ts @@ -0,0 +1,33 @@ +// Type definitions for datatables.net-autofill 2.2 +// Project: https://datatables.net +// Definitions by: Andy Ma +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// +/// + +declare namespace DataTables { + interface Settings { + /* + * autoFill extension options + */ + autoFill?: boolean | AutoFillSettings; + } + + interface AutoFillSettings { + /* + * Always ask the end user if an action should be taken or not + */ + alwaysAsk?: boolean; + /* + * Select the columns that can be auto filled + */ + columns: string | number[]; + /* + * + * Initial enablement state of AutoFill + */ + enable?: boolean; + } +} diff --git a/types/datatables.net-autofill/tsconfig.json b/types/datatables.net-autofill/tsconfig.json new file mode 100644 index 0000000000..e17d5de5da --- /dev/null +++ b/types/datatables.net-autofill/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "datatables.net-autofill-tests.ts" + ] +} diff --git a/types/datatables.net-autofill/tslint.json b/types/datatables.net-autofill/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/datatables.net-autofill/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/datatables.net-colreorder/datatables.net-colreorder-tests.ts b/types/datatables.net-colreorder/datatables.net-colreorder-tests.ts new file mode 100644 index 0000000000..a6126baf44 --- /dev/null +++ b/types/datatables.net-colreorder/datatables.net-colreorder-tests.ts @@ -0,0 +1,12 @@ +$(document).ready(() => { + const config: DataTables.Settings = { + // ColReorder extension options + colReorder: { + fixedColumnsLeft: 0, + fixedColumnsRight: 0, + order: [1, 2, 3], + realtime: true, + reorderCallback: () => {}, + } + }; +}); diff --git a/types/datatables.net-colreorder/index.d.ts b/types/datatables.net-colreorder/index.d.ts new file mode 100644 index 0000000000..8254cd71dc --- /dev/null +++ b/types/datatables.net-colreorder/index.d.ts @@ -0,0 +1,64 @@ +// Type definitions for datatables.net-colReorder 1.4 +// Project: https://datatables.net/extensions/colreorder/ +// Definitions by: Andy Ma +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// +/// + +declare namespace DataTables { + interface Settings { + /* + * colReorder extension options + */ + colReorder?: boolean | ColReorderSettings; + } + + interface ColReorderSettings { + /* + * Number of columns (counting from the left) to disallow reordering of, '0' in default + */ + fixedColumnsLeft?: number; + + /* + * Number of columns (counting from the right) to disallow reordering of, '0' in default + */ + fixedColumnsRight?: number; + + /* + * Set a default order for the columns in the table + */ + order?: number[]; + + /* + * Enable / disable live reordering of columns during a drag, 'true' in default + */ + realtime?: boolean; + /* + * Callback after reorder + */ + reorderCallback: () => void; + } + + interface Api { + colReorder: { + /* + * Programmatically reorder columns + */ + move(from: number, to: number, drop: boolean, invalidate: boolean): Api; + /* + * Get / set column order + */ + order(newOrder?: number[], originalIndexes?: boolean): Api; + /* + * Restore the loaded column order + */ + reset(): Api; + /* + * Convert one or more column indexes to and from current and original indexes + */ + transpose(idx?: number | number[], direction?: "toCurrent" | "toOriginal" | "fromOriginal" | "fromCurrent"): Api; + }; + } +} diff --git a/types/datatables.net-colreorder/tsconfig.json b/types/datatables.net-colreorder/tsconfig.json new file mode 100644 index 0000000000..ec5e47bb49 --- /dev/null +++ b/types/datatables.net-colreorder/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "datatables.net-colreorder-tests.ts" + ] +} diff --git a/types/datatables.net-colreorder/tslint.json b/types/datatables.net-colreorder/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/datatables.net-colreorder/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/datatables.net-select/index.d.ts b/types/datatables.net-select/index.d.ts index e24f6b8ab6..563a51fc25 100644 --- a/types/datatables.net-select/index.d.ts +++ b/types/datatables.net-select/index.d.ts @@ -44,6 +44,41 @@ declare namespace DataTables { /* * Set the selection style for end user interaction with the table */ - style?: string; + style?: "api" | "single" | "multi" | "os" | "multi+shift"; + } + + interface Api { + select: { + /* + * Get the current selection style applied to the table + */ + style(): string; + /* + * Set the table's selection style + */ + style(s: "api" | "single" | "multi" | "os"): Api; + }; + } + + interface RowMethods { + /** + * Select a row + */ + select(): Api; + /** + * Deselect a row + */ + deselect(): Api; + } + + interface RowsMethods { + /** + * Select multiple rows + */ + select(): Api; + /** + * Deselect a row + */ + deselect(): Api; } } diff --git a/types/datatables.net/datatables.net-tests.ts b/types/datatables.net/datatables.net-tests.ts index e5cb5184fd..0c9f3db3cc 100644 --- a/types/datatables.net/datatables.net-tests.ts +++ b/types/datatables.net/datatables.net-tests.ts @@ -225,7 +225,7 @@ let config: DataTables.Settings = { ], // Data ajax: "url", - data: {}, + data: [], // Features autoWidth: true, deferRender: true, diff --git a/types/datatables.net/index.d.ts b/types/datatables.net/index.d.ts index cdddc98789..c0a37145ab 100644 --- a/types/datatables.net/index.d.ts +++ b/types/datatables.net/index.d.ts @@ -28,6 +28,10 @@ declare namespace DataTables { } interface Api extends CoreMethods { + /** + * API should be array-like + */ + [key: number]: any; /** * Returns DataTables API instance * @@ -221,7 +225,7 @@ declare namespace DataTables { * @param event Event name to remove. * @param callback Specific callback function to remove if you want to unbind a single event listener. */ - off(event: string, callback?: ((e: Event, settings: Settings, json: any) => void)): Api; + off(event: string, callback?: ((e: Event, ...args: any[]) => void)): Api; /** * Table events listener. @@ -229,7 +233,7 @@ declare namespace DataTables { * @param event Event to listen for. * @param callback Specific callback function to remove if you want to unbind a single event listener. */ - on(event: string, callback: ((e: Event, settings: Settings, json: any) => void)): Api; + on(event: string, callback: ((e: Event, ...args: any[]) => void)): Api; /** * Listen for a table event once and then remove the listener. @@ -237,7 +241,7 @@ declare namespace DataTables { * @param event Event to listen for. * @param callback Specific callback function to remove if you want to unbind a single event listener. */ - one(event: string, callback: ((e: Event, settings: Settings, json: any) => void)): Api; + one(event: string, callback: ((e: Event, ...args: any[]) => void)): Api; /** * Page Methods / object @@ -1297,7 +1301,7 @@ declare namespace DataTables { /** * Data to use as the display data for the table. Since: 1.10 */ - data?: object; + data?: any[]; //#endregion "Data" @@ -1931,6 +1935,7 @@ declare namespace DataTables { } interface ColumnLegacy { + idx: number; aDataSort: any; asSorting: string[]; bSearchable: boolean; diff --git a/types/daterangepicker/index.d.ts b/types/daterangepicker/index.d.ts index 4d777b17b6..5a82950ca9 100644 --- a/types/daterangepicker/index.d.ts +++ b/types/daterangepicker/index.d.ts @@ -135,6 +135,10 @@ declare namespace daterangepicker { * A function that is passed each date in the two calendars before they are displayed, and may return true or false to indicate whether that date should be available for selection or not. */ isInvalidDate?(startDate: string | moment.Moment | Date, endDate?: string | moment.Moment | Date): boolean; + /** + * A function that is passed each date in the two calendars before they are displayed, and may return a string or array of CSS class names to apply to that date's calendar cell. + */ + isCustomDate?(date: string | moment.Moment | Date): string | string[] | undefined; /** * Indicates whether the date range picker should automatically update the value of an < input > element it's attached to at initialization and when the selected dates change. */ diff --git a/types/dc/index.d.ts b/types/dc/index.d.ts index 69ee20a93e..4ba0e5e4ab 100644 --- a/types/dc/index.d.ts +++ b/types/dc/index.d.ts @@ -176,6 +176,7 @@ declare namespace dc { legend: IGetSet; options(optionsObject: any): T; renderlet(fn: (chart: T) => any): T; + useViewBoxResizing: IGetSet; on(event: "renderlet", fn: (chart: T, filter: any) => any): T; on(event: "pretransition", fn: (chart: T, filter: any) => any): T; @@ -484,4 +485,4 @@ declare namespace dc { boxPlot(parent: string, chartGroup?: string): BoxPlot; selectMenu(parent: string, chartGroup?: string): SelectMenu; } -} \ No newline at end of file +} diff --git a/types/decompress/decompress-tests.ts b/types/decompress/decompress-tests.ts index 3df7df0219..9cb8949d99 100644 --- a/types/decompress/decompress-tests.ts +++ b/types/decompress/decompress-tests.ts @@ -1,13 +1,13 @@ import decompress = require('decompress'); import * as path from "path"; -decompress('unicorn.zip', 'dist').then(files => { +decompress('unicorn.zip', 'dist').then((files: decompress.File[]) => { console.log('done!'); }); decompress('unicorn.zip', 'dist', { filter: file => path.extname(file.path) !== '.exe' -}).then(files => { +}).then((files: decompress.File[]) => { console.log('done!'); }); @@ -16,6 +16,6 @@ decompress('unicorn.zip', 'dist', { file.path = `unicorn-${file.path}`; return file; } -}).then(files => { +}).then((files: decompress.File[]) => { console.log('done!'); }); diff --git a/types/decompress/index.d.ts b/types/decompress/index.d.ts index c2211b3434..745bebcd2e 100644 --- a/types/decompress/index.d.ts +++ b/types/decompress/index.d.ts @@ -7,33 +7,35 @@ export = decompress; -declare function decompress(input: string | Buffer, output: string, opts?: Options): Promise; +declare function decompress(input: string | Buffer, output: string, opts?: decompress.DecompressOptions): Promise; -interface File { - data: Buffer; - mode: number; - mtime: string; - path: string; - type: string; -} +declare namespace decompress { + interface File { + data: Buffer; + mode: number; + mtime: string; + path: string; + type: string; + } -interface Options { - /** - * Filter out files before extracting - */ - filter?(file: File): boolean; - /** - * Map files before extracting - */ - map?(file: File): File; - /** - * Array of plugins to use. - * Default: [decompressTar(), decompressTarbz2(), decompressTargz(), decompressUnzip()] - */ - plugins?: any[]; - /** - * Remove leading directory components from extracted files. - * Default: 0 - */ - strip?: number; + interface DecompressOptions { + /** + * Filter out files before extracting + */ + filter?(file: File): boolean; + /** + * Map files before extracting + */ + map?(file: File): File; + /** + * Array of plugins to use. + * Default: [decompressTar(), decompressTarbz2(), decompressTargz(), decompressUnzip()] + */ + plugins?: any[]; + /** + * Remove leading directory components from extracted files. + * Default: 0 + */ + strip?: number; + } } diff --git a/types/deepmerge/index.d.ts b/types/deepmerge/index.d.ts index 05f5c96d2e..39158354de 100644 --- a/types/deepmerge/index.d.ts +++ b/types/deepmerge/index.d.ts @@ -1,9 +1,10 @@ -// Type definitions for deepmerge 1.3 +// Type definitions for deepmerge 2.1 // Project: https://github.com/KyleAMathews/deepmerge // Definitions by: marvinscharle // syy1125 +// AppLover69 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.2 export = deepmerge; @@ -14,6 +15,7 @@ declare namespace deepmerge { interface Options { clone?: boolean; arrayMerge?(destination: any[], source: any[], options?: Options): any[]; + isMergeableObject?(value: object): boolean; } function all(objects: Array>, options?: Options): T; diff --git a/types/del/del-tests.ts b/types/del/del-tests.ts index fc6c63b6fa..f9d01f644f 100644 --- a/types/del/del-tests.ts +++ b/types/del/del-tests.ts @@ -1,39 +1,47 @@ -import del = require("del"); +import del = require('del'); -let paths = ["build", "dist/**/*.js"]; +let paths = ['build', 'dist/**/*.js']; -del(["tmp/*.js", "!tmp/unicorn.js"]); -del(["tmp/*.js", "!tmp/unicorn.js"], {force: true}); -del(["tmp/*.js", "!tmp/unicorn.js"], {dryRun: true}); -del(["tmp/*.js", "!tmp/unicorn.js"], {concurrency: 20}); -del(["tmp/*.js", "!tmp/unicorn.js"], {cwd: ''}); +del(['tmp/*.js', '!tmp/unicorn.js']); +del(['tmp/*.js', '!tmp/unicorn.js'], { force: true }); +del(['tmp/*.js', '!tmp/unicorn.js'], { dryRun: true }); +del(['tmp/*.js', '!tmp/unicorn.js'], { concurrency: 20 }); +del(['tmp/*.js', '!tmp/unicorn.js'], { cwd: '' }); -del(["tmp/*.js", "!tmp/unicorn.js"]).then((paths: string[]) => { +del(['tmp/*.js', '!tmp/unicorn.js']).then((paths: string[]) => { console.log('Deleted files/folders:\n', paths.join('\n')); }); -del(["tmp/*.js", "!tmp/unicorn.js"], {force: true}).then((paths: string[]) => { +del(['tmp/*.js', '!tmp/unicorn.js'], { force: true }).then( + (paths: string[]) => { + console.log('Deleted files/folders:\n', paths.join('\n')); + } +); + +del('tmp/*.js'); +del('tmp/*.js', { force: true }); +del('tmp/*.js', { dryRun: true }); +del('tmp/*.js', { concurrency: 20 }); +del('tmp/*.js', { cwd: '' }); +del('tmp/*.js').then((paths: string[]) => { console.log('Deleted files/folders:\n', paths.join('\n')); }); -del("tmp/*.js"); -del("tmp/*.js", {force: true}); -del("tmp/*.js", {dryRun: true}); -del("tmp/*.js", {concurrency: 20}); -del("tmp/*.js", {cwd: ''}); -del("tmp/*.js").then((paths: string[]) => { +del('tmp/*.js', { force: true }).then((paths: string[]) => { console.log('Deleted files/folders:\n', paths.join('\n')); }); -del("tmp/*.js", {force: true}).then((paths: string[]) => { - console.log('Deleted files/folders:\n', paths.join('\n')); -}); +paths = del.sync(['tmp/*.js', '!tmp/unicorn.js']); +paths = del.sync(['tmp/*.js', '!tmp/unicorn.js'], { force: true }); -paths = del.sync(["tmp/*.js", "!tmp/unicorn.js"]); -paths = del.sync(["tmp/*.js", "!tmp/unicorn.js"], {force: true}); +paths = del.sync('tmp/*.js'); +paths = del.sync('tmp/*.js', { force: true }); +paths = del.sync('tmp/*.js', { dryRun: true }); +paths = del.sync('tmp/*.js', { concurrency: 20 }); +paths = del.sync('tmp/*.js', { cwd: '' }); -paths = del.sync("tmp/*.js"); -paths = del.sync("tmp/*.js", {force: true}); -paths = del.sync("tmp/*.js", {dryRun: true}); -paths = del.sync("tmp/*.js", {concurrency: 20}); -paths = del.sync("tmp/*.js", {cwd: ''}); +const immutable: ReadonlyArray = ['tmp/*.js', '!tmp/unicorn.js']; +const mutable = del(immutable); +const mutablePaths = del.sync(immutable); +mutable.then(paths => paths.push('test')); +mutablePaths.push('test'); diff --git a/types/del/index.d.ts b/types/del/index.d.ts index e3c250e69b..ec92f96c84 100644 --- a/types/del/index.d.ts +++ b/types/del/index.d.ts @@ -3,14 +3,21 @@ // Definitions by: Asana // Aya Morisawa // BendingBender +// Jason Dreyzehner // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -import glob = require("glob"); +import glob = require('glob'); -declare function del(patterns: string | string[], options?: del.Options): Promise; +declare function del( + patterns: string | ReadonlyArray, + options?: del.Options +): Promise; declare namespace del { - function sync(patterns: string | string[], options?: Options): string[]; + function sync( + patterns: string | ReadonlyArray, + options?: Options + ): string[]; interface Options extends glob.IOptions { force?: boolean; diff --git a/types/detect-browser/index.d.ts b/types/detect-browser/index.d.ts index 351067ff59..22d6bf9c17 100644 --- a/types/detect-browser/index.d.ts +++ b/types/detect-browser/index.d.ts @@ -18,10 +18,13 @@ export type BrowserName = "phantomjs" | "safari" | "vivaldi" | - "yandexbrowser"; + "yandexbrowser" | + "node"; -export function detect(): null | { - name: BrowserName | "node"; +export interface BrowserInfo { + name: BrowserName; version: string; os: string; -}; +} + +export function detect(): null | BrowserInfo; diff --git a/types/detox/detox-tests.ts b/types/detox/detox-tests.ts new file mode 100644 index 0000000000..82e3a62d3a --- /dev/null +++ b/types/detox/detox-tests.ts @@ -0,0 +1,22 @@ +declare var describe: (test: string, callback: () => void) => void; +declare var beforeAll: (callback: () => void) => void; +declare var afterAll: (callback: () => void) => void; +declare var test: (test: string, callback: () => void) => void; + +describe('Test', () => { + beforeAll(async () => { + await device.reloadReactNative(); + }); + + afterAll(async () => { + await element(by.id('element')).clearText(); + }); + + test('Test', async () => { + await element(by.id('element')).replaceText('text'); + await element(by.id('element')).tap(); + await expect(element(by.id('element')).atIndex(0)).toNotExist(); + + await waitFor(element(by.id('element'))).toBeVisible().withTimeout(2000); + }); +}); diff --git a/types/detox/index.d.ts b/types/detox/index.d.ts new file mode 100644 index 0000000000..f4479ff4db --- /dev/null +++ b/types/detox/index.d.ts @@ -0,0 +1,408 @@ +// Type definitions for detox 7.3 +// Project: https://github.com/wix/detox +// Definitions by: Tareq El-Masri +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare const detox: Detox.Detox; +declare const device: Detox.Device; +declare const element: Detox.Element; +declare const waitFor: Detox.WaitFor; +declare const expect: Detox.Expect>; +declare const by: Detox.Matchers; + +declare namespace Detox { + interface Detox { + /** + * The setup phase happens inside detox.init(). This is the phase where detox reads its configuration, starts a server, loads its expection library and starts a simulator + * @param config + * @param options + * @example const config = require('../package.json').detox; + * + * before(async () => { + * await detox.init(config); + * }); + */ + init(config: any, options: DetoxInitOptions): Promise; + /** + * Artifacts currently include only logs from the app process before each task + * @param args + */ + beforeEach(...args: any[]): Promise; + /** + * Artifacts currently include only logs from the app process after each task + * @param args + */ + afterEach(...args: any[]): Promise; + /** + * The cleanup phase should happen after all the tests have finished. This is the phase where detox-server shuts down. + * @example after(async () => { + * await detox.cleanup(); + * }); + */ + cleanup(): Promise; + } + interface Device { + /** + * Launch the app + * @param config + * @example // Terminate the app and launch it again. If set to false, the simulator will try to bring app from background, + * // if the app isn't running, it will launch a new instance. default is false + * await device.launchApp({newInstance: true}); + * // Grant or deny runtime permissions for your application. + * await device.launchApp({permissions: {calendar: 'YES'}}); + * // Mock opening the app from URL to test your app's deep link handling mechanism. + * await device.launchApp({url: url}); + */ + launchApp(config: DeviceLanchAppConfig): Promise; + /** + * By default, terminateApp() with no params will terminate the app + * To terminate another app, specify its bundle id + * @param bundle + * @example await device.terminateApp('other.bundle.id'); + */ + terminateApp(bundle?: string): Promise; + /** + * Send application to background by bringing com.apple.springboard to the foreground. + * Combining sendToHome() with launchApp({newInstance: false}) will simulate app coming back from background. + * @example await device.sendToHome(); + * await device.launchApp({newInstance: false}); + */ + sendToHome(): Promise; + /** + * If this is a React Native app, reload the React Native JS bundle. This action is much faster than device.launchApp(), and can be used if you just need to reset your React Native logic. + * @example await device.reloadReactNative() + */ + reloadReactNative(): Promise; + /** + * By default, installApp() with no params will install the app file defined in the current configuration. + * To install another app, specify its path + * @param path + * @example await device.installApp('path/to/other/app'); + */ + installApp(path?: any): Promise; + /** + * By default, uninstallApp() with no params will uninstall the app defined in the current configuration. + * To uninstall another app, specify its bundle id + * @param bundle + * @example await device.installApp('other.bundle.id'); + */ + uninstallApp(bundle?: string): Promise; + /** + * Mock opening the app from URL. sourceApp is an optional parameter to specify source application bundle id. + * @param url + */ + openURL(url: {url: string, sourceApp?: string}): Promise; + /** + * Mock handling of received user notification when app is in foreground. + * @param params + */ + sendUserNotification(...params: any[]): Promise; + /** + * Mock handling of received user activity when app is in foreground. + * @param params + */ + sendUserActivity(...params: any[]): Promise; + /** + * Takes "portrait" or "landscape" and rotates the device to the given orientation. Currently only available in the iOS Simulator. + * @param orientation + */ + setOrientation(orientation: Orientation): Promise; + /** + * Note: setLocation is dependent on fbsimctl. if fbsimctl is not installed, the command will fail, it must be installed. Sets the simulator location to the given latitude and longitude. + * @param lat + * @param lon + * @example await device.setLocation(32.0853, 34.7818); + */ + setLocation(lat: number, lon: number): Promise; + /** + * Disable EarlGrey's network synchronization mechanism on preffered endpoints. Usful if you want to on skip over synchronizing on certain URLs. + * @param urls + * @example await device.setURLBlacklist(['.*127.0.0.1.*']); + */ + setURLBlacklist(urls: string[]): Promise; + /** + * Enable EarlGrey's synchronization mechanism (enabled by default). This is being reset on every new instance of the app. + * @example await device.enableSynchronization(); + */ + enableSynchronization(): Promise; + /** + * Disable EarlGrey's synchronization mechanism (enabled by default) This is being reset on every new instance of the app. + * @example await device.disableSynchronization(); + */ + disableSynchronization(): Promise; + /** + * Resets the Simulator to clean state (like the Simulator > Reset Content and Settings... menu item), especially removing previously set permissions. + * @example await device.resetContentAndSettings(); + */ + resetContentAndSettings(): Promise; + /** + * Returns the current device, ios or android. + * @example if (device.getPlatform() === 'ios') { + * await expect(loopSwitch).toHaveValue('1'); + * } + */ + getPlatform(): "ios" | "android"; + /** + * Simulate shake (iOS Only) + */ + shake(): Promise; + } + + type DetoxAny = Element & Actions & WaitFor; + + interface Element { + (by: Matchers): DetoxAny; + + /** + * Select by parent element + * @param parent + * @example await element(by.id('Grandson883').withAncestor(by.id('Son883'))); + */ + withAncestor(parent: Element): DetoxAny; + /** + * Select by child element + * @param parent + * @example await element(by.id('Son883').withDescendant(by.id('Grandson883'))); + */ + withDescendant(child: Element): DetoxAny; + /** + * Choose from multiple elements matching the same matcher using index + * @param index + * @example await element(by.text('Product')).atIndex(2); + */ + atIndex(index: number): DetoxAny; + } + interface Matchers { + /** + * by.id will match an id that is given to the view via testID prop. + * @param id + * @example // In a React Native component add testID like so: + * + * // Then match with by.id: + * await element(by.id('tap_me')); + */ + id(id: string): Matchers; + /** + * Find an element by text, useful for text fields, buttons. + * @param text + * @example await element(by.text('Tap Me')); + */ + text(text: string): Matchers; + /** + * Find an element by accessibilityLabel on iOS, or by contentDescription on Android. + * @param label + * @example await element(by.label('Welcome')); + */ + label(label: string): Matchers; + /** + * Find an element by native view type. + * @param nativeViewType + * @example await element(by.type('RCTImageView')); + */ + type(nativeViewType: string): Matchers; + /** + * Find an element with an accessibility trait. (iOS only) + * @example await element(by.traits(['button'])); + */ + traits(traits: string[]): Matchers; + } + interface Expect { + (element: Element): Expect; + /** + * Expect the view to be at least 75% visible. + * @example await expect(element(by.id('UniqueId204'))).toBeVisible(); + */ + toBeVisible(): R; + /** + * Expect the view to not be visible. + * @example await expect(element(by.id('UniqueId205'))).toBeNotVisible(); + */ + toBeNotVisible(): R; + /** + * Expect the view to exist in the UI hierarchy. + * @example await expect(element(by.id('UniqueId205'))).toExist(); + */ + toExist(): R; + /** + * Expect the view to not exist in the UI hierarchy. + * @example await expect(element(by.id('RandomJunk959'))).toNotExist(); + */ + toNotExist(): R; + /** + * In React Native apps, expect UI component of type to have text. + * In native iOS apps, expect UI elements of type UIButton, UILabel, UITextField or UITextViewIn to have inputText with text. + * @param text + * @example await expect(element(by.id('UniqueId204'))).toHaveText('I contain some text'); + */ + toHaveText(text: string): R; + /** + * It searches by accessibilityLabel on iOS, or by contentDescription on Android. + * In React Native it can be set for both platforms by defining an accessibilityLabel on the view. + * @param label + * @example await expect(element(by.id('UniqueId204'))).toHaveLabel('Done'); + */ + toHaveLabel(label: string): R; + /** + * In React Native apps, expect UI component to have testID with that id. + * In native iOS apps, expect UI element to have accesibilityIdentifier with that id. + * @param id + * @example await expect(element(by.text('I contain some text'))).toHaveId('UniqueId204'); + */ + toHaveId(id: string): R; + /** + * Expect components like a Switch to have a value ('0' for off, '1' for on). + * @param value + * @example await expect(element(by.id('UniqueId533'))).toHaveValue('0'); + */ + toHaveValue(value: any): R; + } + interface WaitFor { + /** + * This API polls using the given expectation continuously until the expectation is met. Use manual synchronization with waitFor only as a last resort. + * NOTE: Every waitFor call must set a timeout using withTimeout(). Calling waitFor without setting a timeout will do nothing. + * @example await waitFor(element(by.id('UniqueId336'))).toExist().withTimeout(2000); + */ + (element: Element): Expect; + /** + * Waits for the condition to be met until the specified time (millis) have elapsed. + * @param millis number + * @example await waitFor(element(by.id('UniqueId336'))).toExist().withTimeout(2000); + */ + withTimeout(millis: number): Promise; + /** + * Performs the action repeatedly on the element until an expectation is met + * @param element + * @example await waitFor(element(by.text('Text5'))).toBeVisible().whileElement(by.id('ScrollView630')).scroll(50, 'down'); + */ + whileElement(by: Matchers): Element; + } + interface Actions { + /** + * Simulate tap on an element + * @example await element(by.id('tappable')).tap(); + */ + tap(): Promise>; + /** + * Simulate long press on an element + * @example await element(by.id('tappable')).longPress(); + */ + longPress(): Promise>; + /** + * Simulate multiple taps on an element. + * @param times number + * @example await element(by.id('tappable')).multiTap(3); + */ + multiTap(times: number): Promise>; + /** + * Simulate tap at a specific point on an element. + * Note: The point coordinates are relative to the matched element and the element size could changes on different devices or even when changing the device font size. + * @param point + * @example await element(by.id('tappable')).tapAtPoint({ x:5, y:10 }); + */ + tapAtPoint(point: { x: number, y: number }): Promise>; + /** + * Use the builtin keyboard to type text into a text field. + * @param text + * @example await element(by.id('textField')).typeText('passcode'); + */ + typeText(text: string): Promise>; + /** + * Paste text into a text field. + * @param text + * @example await element(by.id('textField')).replaceText('passcode again'); + */ + replaceText(text: string): Promise>; + /** + * Clear text from a text field. + * @example await element(by.id('textField')).clearText(); + */ + clearText(): Promise>; + /** + * + * @param pixels + * @param direction + * @example + * await element(by.id('scrollView')).scroll(100, 'down'); + * await element(by.id('scrollView')).scroll(100, 'up'); + */ + scroll(pixels: number, direction: Direction): Actions>; + /** + * Scroll to edge. + * @param edge + * @example await element(by.id('scrollView')).scrollTo('bottom'); + * await element(by.id('scrollView')).scrollTo('top'); + */ + scrollTo(edge: Direction): Actions>; + /** + * + * @param direction + * @param speed + * @param percentage + * @example await element(by.id('scrollView')).swipe('down'); + * await element(by.id('scrollView')).swipe('down', 'fast'); + * await element(by.id('scrollView')).swipe('down', 'fast', 0.5); + */ + swipe(direction: Direction, speed?: Speed, percentage?: number): Actions>; + /** + * (iOS Only) column - number of datepicker column (starts from 0) value - string value in setted column (must be correct) + * @param column + * @param value + * @example await expect(element(by.type('UIPickerView'))).toBeVisible(); + * await element(by.type('UIPickerView')).setColumnToValue(1,"6"); + * await element(by.type('UIPickerView')).setColumnToValue(2,"34"); + */ + setColumnToValue(column: number, value: string): Actions>; + } + + type Direction = "left" | "right" | "top" | "bottom" | "up" | "down"; + type Orientation = "portrait" | "landscape"; + type Speed = "fast" | "slow"; + + interface DetoxInitOptions { + /** + * Detox exports device, expect, element, by and waitFor as globals by default, if you want to control their initialization manually, set init detox with initGlobals set to false. + * This is useful when during E2E tests you also need to run regular expectations in node. jest Expect for instance, will not be overriden by Detox when this option is used. + */ + initGlobals?: boolean; + /** + * By default await detox.init(config); will launch the installed app. If you wish to control when your app is launched, add {launchApp: false} param to your init. + */ + launchApp?: boolean; + } + + interface DeviceLanchAppConfig { + /** + * Restart the app + * Terminate the app and launch it again. If set to false, the simulator will try to bring app from background, if the app isn't running, it will launch a new instance. default is false + */ + newInstance?: boolean; + /** + * Set runtime permissions + * Grant or deny runtime permissions for your application. + */ + permissions?: any; + /** + * Launch from URL + * Mock opening the app from URL to test your app's deep link handling mechanism. + */ + url?: any; + /** + * Launch with user notifications + */ + userNotification?: any; + /** + * Launch with user activity + */ + userActivity?: any; + /** + * Launch into a fresh installation + * A flag that enables relaunching into a fresh installation of the app (it will uninstall and install the binary again), default is false. + */ + delete?: boolean; + /** + * Detox can start the app with additional launch arguments + * The added launchArgs will be passed through the launch command to the device and be accessible via [[NSProcessInfo processInfo] arguments] + */ + launchArgs?: any; + } +} diff --git a/types/detox/tsconfig.json b/types/detox/tsconfig.json new file mode 100644 index 0000000000..2d1a22fb79 --- /dev/null +++ b/types/detox/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "target": "ES2015", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "detox-tests.ts" + ] +} diff --git a/types/detox/tslint.json b/types/detox/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/detox/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/devexpress-web/index.d.ts b/types/devexpress-web/index.d.ts index 50aac382b1..9b29d9e0db 100644 --- a/types/devexpress-web/index.d.ts +++ b/types/devexpress-web/index.d.ts @@ -1,7 +1,11 @@ -// Type definitions for DevExpress ASP.NET v171.4 +// Type definitions for DevExpress ASP.NET v172.6 // Project: http://devexpress.com/ // Definitions by: DevExpress Inc. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// +/// /** * A client-side counterpart of the DashboardViewer extension. @@ -115,7 +119,7 @@ interface ASPxClientDashboardItemClickEventArgs extends ASPxClientEventArgs { /** * Requests underlying data corresponding to the clicked visual element. * @param onCompleted A ASPxClientDashboardItemRequestUnderlyingDataCompleted object that references a method executed after the request is completed. - * @param dataMembers An array of string values that specify data members used to obtain underlying data. + * @param dataMembers (Optional) An array of string values that specify data members used to obtain underlying data. If this parameter is not specified, underlying data for all available data members will be requested. */ RequestUnderlyingData(onCompleted: ASPxClientDashboardItemRequestUnderlyingDataCompleted, dataMembers: string[]): void; } @@ -550,6 +554,53 @@ interface ASPxClientDashboardItemDataDeltaValue { */ GetIndicatorType(): ASPxClientDashboardItemDataMeasureValue; } +/** + * References a method that will handle the ItemCaptionToolbarUpdated event. + */ +interface ASPxClientDashboardItemCaptionToolbarUpdatedEventHandler { + /** + * References a method that will handle the ItemCaptionToolbarUpdated event. + * @param source The event source. + * @param e The ASPxClientDashboardItemCaptionToolbarUpdatedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemCaptionToolbarUpdatedEventArgs): void; +} +/** + * Provides data for the ItemCaptionToolbarUpdated event. + */ +interface ASPxClientDashboardItemCaptionToolbarUpdatedEventArgs extends ASPxClientEventArgs { + /** + * Gets a component name of the dashboard item. + * Value: A string value that is a component name of the dashboard item. + */ + ItemName: string; + /** + * Provides access to caption options of the dashboard item. + * Value: A
DashboardItemCaptionToolbarOptions object containing caption options of the dashboard item. + */ + Options: Object; +} +/** + * References a method that will handle the DashboardTitleToolbarUpdated event. + */ +interface ASPxClientDashboardTitleToolbarUpdatedEventHandler { + /** + * References a method that will handle the DashboardTitleToolbarUpdated event. + * @param source The event source. + * @param e A ASPxClientDashboardTitleToolbarUpdatedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardTitleToolbarUpdatedEventArgs): void; +} +/** + * Provides data for the DashboardTitleToolbarUpdated event. + */ +interface ASPxClientDashboardTitleToolbarUpdatedEventArgs extends ASPxClientEventArgs { + /** + * Provides access to dashboard title options. + * Value: A DashboardTitleToolbarOptions object containing dashboard title options. + */ + Options: Object; +} /** * A point on the data axis. */ @@ -945,6 +996,16 @@ interface DashboardPdfExportOptions { * Value: A DashboardExportScaleMode value that specifies the mode for scaling a dashboard/dashboard item in the exported document. */ ScaleMode: string; + /** + * Gets or sets the mode for scaling a dashboard/dashboard item in the exported document. + * Value: A DashboardExportDocumentScaleMode value that specifies the mode for scaling a dashboard/dashboard item in the exported document. + */ + DocumentScaleMode: string; + /** + * Gets or sets whether the page orientation used to export a dashboard is selected automatically. + * Value: true, to automatically select the page orientation used to export a dashboard; otherwise, false. + */ + DashboardAutomaticPageLayout: boolean; /** * Gets or sets the scale factor (in fractions of 1), by which a dashboard/dashboard item is scaled in the exported document. * Value: A Single value that specifies the scale factor by which a dashboard/dashboard item is scaled in the exported document. @@ -1232,6 +1293,30 @@ interface ASPxClientDashboard extends ASPxClientControl { * Occurs after the dashboard update is performed. */ DashboardEndUpdate: ASPxClientEvent>; + /** + * Allows you to customize a dashboard item's caption (for instance, add custom buttons, menus, etc.). + */ + ItemCaptionToolbarUpdated: ASPxClientEvent>; + /** + * Allows you to customize a dashboard title (for instance, add custom buttons, menus, etc.). + */ + DashboardTitleToolbarUpdated: ASPxClientEvent>; + /** + * Returns names of the predefined ranges available for the specified Range Filter. + * @param itemName A string value that specifies the component name of the Range Filter dashboard item. + */ + GetAvailablePredefinedRanges(itemName: string): string[]; + /** + * Returns the name of the currently selected predefined range. + * @param itemName A string value that specifies the component name of the Range Filter dashboard item. + */ + GetCurrentPredefinedRange(itemName: string): string; + /** + * + * @param itemName + */ + UpdateItemCaptionToolbar(itemName: string): void; + UpdateDashboardTitleToolbar(): void; /** * Sends a callback to the server and generates the server-side CustomDataCallback event, passing it the specified argument. * @param parameter A string value that represents any information that needs to be sent to the server-side CustomDataCallback event. @@ -1239,7 +1324,7 @@ interface ASPxClientDashboard extends ASPxClientControl { */ PerformDataCallback(parameter: string, onCallback: ASPxClientDataCallback): void; /** - * Gets an inner part of the ASPxClientDashboard control. + * Gets the DashboardControl object that is the client-side part of the Web Dashboard. */ GetDashboardControl(): DashboardControl; /** @@ -1299,7 +1384,7 @@ interface ASPxClientDashboard extends ASPxClientControl { GetParameters(): ASPxClientDashboardParameters; /** * Invokes the dialog that allows end-users to export the entire dashboard to the specified format. - * @param format A string value that specifies the format. For instance, you can use 'PDF' or 'Image'. + * @param format A string value that specifies the format. For instance, you can use 'PDF', 'Image', or 'Excel'. */ ShowExportDashboardDialog(format: string): void; /** @@ -1635,16 +1720,6 @@ interface ASPxClientDashboard extends ASPxClientControl { * @param dateTimePeriodName A String value that specifies the predefined range name. */ SetPredefinedRange(itemName: string, dateTimePeriodName: string): void; - /** - * Returns names of the predefined ranges available for the specified Range Filter. - * @param itemName A string value that specifies the component name of the Range Filter dashboard item. - */ - GetAvailablePredefinedRanges(itemName: string): string[]; - /** - * Returns the name of the currently selected predefined range. - * @param itemName A string value that specifies the component name of the Range Filter dashboard item. - */ - GetCurrentPredefinedRange(itemName: string): string; } /** * References a method that will handle the DashboardStateChanged event. @@ -1986,6 +2061,14 @@ interface ASPxClientDashboardViewer extends ASPxClientControl { * Allows you to color the required dashboard item elements using the specified colors. */ ItemElementCustomColor: ASPxClientEvent>; + /** + * Allows you to customize a dashboard item's caption (for instance, add custom buttons, menus, etc.). + */ + ItemCaptionToolbarUpdated: ASPxClientEvent>; + /** + * Allows you to customize a dashboard title (for instance, add custom buttons, menus, etc.). + */ + TitleToolbarUpdated: ASPxClientEvent>; /** * Reloads data in the data sources. */ @@ -2064,6 +2147,12 @@ interface ASPxClientDashboardViewer extends ASPxClientControl { * @param itemName A String that specifies a component name of the master filter item. */ GetCurrentSelection(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * + * @param itemName + */ + UpdateItemCaptionToolbar(itemName: string): void; + UpdateDashboardTitleToolbar(): void; /** * Requests underlying data for the specified dashboard item. * @param itemName A string that specifies the component name of the dashboard item. @@ -2079,6 +2168,21 @@ interface ASPxClientDashboardViewer extends ASPxClientControl { * Closes the Dashboard Parameters dialog. */ HideParametersDialog(): void; + /** + * Shows the dialog that allows end-users to export the dashboard. + * @param format A string value that specifies the format. For instance, you can use 'PDF, 'Image' or 'Excel'. + */ + ShowExportDialog(format: string): void; + /** + * Shows the dialog that allows end-users to export the dashboard item. + * @param itemComponentName A component name of the dashboard item. + * @param format A string value that specifies the format. For instance, you can use 'PDF, 'Image' or 'Excel'. + */ + ShowExportDashboardItemDialog(itemComponentName: string, format: string): void; + /** + * Hides the dialog that allows end-users to export the dashboard/dashboard item. + */ + HideExportDialog(): void; /** * Returns settings that specify parameters affecting how the dashboard is exported. */ @@ -2554,8 +2658,17 @@ interface ASPxClientDashboardDrillUpPerformedEventArgs extends ASPxClientEventAr */ ItemName: string; } +/** + * Provides data for the onCustomizeText handler. + */ interface CardWidgetCustomizeTextEventArgs { + /** + * Gets a dimension/measure value to be displayed within the card. + */ getValue(): Object; + /** + * Gets a formatted value displayed within the card. + */ getDefaultText(): string; } /** @@ -2567,7 +2680,15 @@ interface CardWidget { * Value: A string that specifies the HTML color used to paint a card's background. */ cardBackColor: string; + /** + * Allows you to customize texts displayed within individual cards. + * Value: A handler used customize texts displayed within individual cards. + */ onCustomizeText: Object; + /** + * Gets the root element of the widget. + */ + element(): Object; } /** * When implemented, represents the Web Dashboard extension. @@ -2588,14 +2709,14 @@ interface IExtension { stop(): void; } /** - * An inner part of the ASPxClientDashboard control. + * A client-side part of the Web Dashboard. */ interface DashboardControl { /** * Gets or sets knockout templates that you can use in the Web Dashboard. * Value: A object that is a knockout template collection. */ - customTemplates: KnockoutObservableArray; + customTemplates: KnockoutObservableArray; /** * Provides an access to the collection of registered dashboard extensions. * Value: An array of IExtension objects that are dashboard extensions. @@ -2630,11 +2751,60 @@ interface DashboardControl { */ unregisterExtension(extensionName: string): void; } +interface UrlStateExtension extends IExtension { +} +interface Element { +} +/** + * The content of the Dashboard Parameters dialog. + */ +interface ParameterDialogContent { + /** + * Gets the Dashboard Parameters dialog's grid that displays parameter values. + * Value: The Dashboards Parameters dialog's grid that displays parameter values. + */ + grid: Object; + /** + * Applies changes made in the Dashboard Parameters dialog. + */ + submitParameterValues(): void; + /** + * Resets changes in the Dashboard Parameters dialog to the default values. + */ + resetParameterValues(): void; + valueChanged(): void; +} +/** + * A Web Dashboard extension that is the Dashboard Parameters dialog. + */ interface DashboardParameterDialogExtension extends IExtension { + /** + * Gets or sets whether to show the Dashboard Parameters button in the dashboard title. + * Value: true, to show the Dashboard Parameters button; otherwise, false. + */ + showDialogButton: KnockoutObservableBoolean; + /** + * Invokes the Dashboard Parameters dialog. + */ + show(): void; + /** + * Closes the Dashboard Parameters dialog. + */ + hide(): void; + /** + * Allows you to be notified about the dashboard parameter settings changes. + * @param callback A custom function. + */ + subscribeToContentChanges(callback: Function): Object; + /** + * Renders the content of the Dashboard Parameters dialog inside the specified JQuery element. + * @param element A JQuery element where the Dashboard Parameters dialog content is rendered. + */ + renderContent(element: Element): ParameterDialogContent; } interface DashboardExportExtension extends IExtension { } -interface DashboardClientApiExtension extends IExtension { +interface ViewerApiExtension extends IExtension { } interface DashboardCurrencyEditorExtension extends IExtension { } @@ -2642,7 +2812,12 @@ interface DataSourceBrowserExtension extends IExtension { } interface DataSourceWizardExtension extends IExtension { } -interface DashboadItemMenuExtension extends IExtension { +interface DashboardItemMenuExtension extends IExtension { +} +/** + * A Web Dashboard extension that allows you to configure color schemes. + */ +interface DashboardColorSchemeEditorExtension extends IExtension { } /** * A Web Dashboard extension that allows you to keep track of all user actions, and cancel or repeat them. @@ -2654,17 +2829,12 @@ interface UndoRedoExtension extends IExtension { isChanged(): boolean; } /** - * An extension that is the dashboard item's Binding menu allowing you to create and modify data binding. + * A Web Dashboard extension that is the dashboard item's Binding menu allowing you to create and modify data binding. */ interface BindingPanelExtension extends IExtension { } /** - * A Web Dashboard extension that allows you to configure color schemes. - */ -interface DashboardColorSchemeEditorExtension extends IExtension { -} -/** - * An extension that is the dashboard item's Convert To menu allowing you to convert or duplicate the current item. + * A Web Dashboard extension that is the dashboard item's Convert To menu allowing you to convert or duplicate the current item. */ interface ConversionPanelExtension extends IExtension { } @@ -2710,22 +2880,22 @@ interface OpenDashboardExtension extends IExtension { loadDashboard(id: string): void; } /** - * An extension that is the dashboard item's Interactivity menu containing settings that affect on interaction between various dashboard items. + * A Web Dashboard extension that is the dashboard item's Interactivity menu containing settings that affect on interaction between various dashboard items. */ interface InteractivityPanelExtension extends IExtension { } /** - * An extension that is the dashboard item's Options menu containing specific options and settings related to the current dashboard item. + * A Web Dashboard extension that is the dashboard item's Options menu containing specific options and settings related to the current dashboard item. */ interface OptionsPanelExtension extends IExtension { } /** - * An extension that is the Web Dashboard title editor. + * A Web Dashboard extension that is the dashboard title editor. */ interface DashboardTitleEditorExtension extends IExtension { } /** - * The Dashboard Panel extension that displays a list of available dashboards and lets you switch between the designer and viewer modes. + * The Dashboard Panel extension that allows users to switch between dashboards and enable the Designer mode. */ interface DashboardPanelExtension extends IExtension { /** @@ -2894,10 +3064,10 @@ interface DashboardToolboxGroup { */ index: number; /** - * Provide an access to the collection of toolbox items obtained from the specified toolbox group. - * Value: A object that is an array of items obtained from the specified toolbox group. + * Provides access to a collection of toolbox group items. + * Value: A DashboardToolboxItem). */ - items: KnockoutObservableArray; + items: KnockoutObservableArray; } /** * A toolbar group that contains dashboard toolbar items. @@ -2919,35 +3089,34 @@ interface DashboardToolbarGroup { */ index: number; /** - * Provide an access to the collection of toolbox items obtained from the specified toolbar group. - * Value: A object that is an array of items obtained from the specified toolbar group. + * Provides access to a collection of toolbar group items. + * Value: A DashboardToolbarItem). */ - items: KnockoutObservableArray; + items: KnockoutObservableArray; } /** * The Web Dashboard Toolbox extension that provides access to the dashboard menu and allows you to add dashboard items, as well as undo or repeat user actions. */ interface ToolboxExtension extends IExtension { /** - * Gets or sets the visibility of the dashboard menu. - * Value: true, to display the dashboard menu; otherwise, false. + * Provides access to a collection of the dashboard menu items. + * Value: A DashboardMenuItem). + */ + menuItems: KnockoutObservableArray; + /** + * Provides access to a collection of the Toolbox groups. + * Value: A DashboardToolboxGroup). + */ + toolboxGroups: KnockoutObservableArray; + /** + * Provides access to a collection of toolbar groups from the Toolbox. + * Value: A DashboardToolbarGroup). + */ + toolbarGroups: KnockoutObservableArray; + /** + * For internal use. */ menuVisible: KnockoutObservableBoolean; - /** - * Provide an access to the collection of menu items obtained from the dashboard menu. - * Value: A object that is a collection the dashboard menu items . - */ - menuItems: KnockoutObservableArray; - /** - * Provide an access to the collection of toolbox groups obtained from the Toolbox. - * Value: A object that is a collection the toolbox groups. - */ - toolboxGroups: KnockoutObservableArray; - /** - * Provide an access to the collection of toolbar groups obtained from the Toolbox. - * Value: A object that is a collection the toolbar groups. - */ - toolbarGroups: KnockoutObservableArray; /** * Allows you to add a specified menu item to the dashboard menu. * @param menuItem A DashboardMenuItem object that is a dashboard menu item. @@ -2970,9 +3139,9 @@ interface ToolboxExtension extends IExtension { */ addToolboxItem(groupName: string, toolboxItem: DashboardToolboxItem): void; /** - * Removes the specified toolbox item from the specified toolbox group. - * @param groupName A string value that is a unique toolbox group name. - * @param toolboxItemName A string value that is a unique toolbox item name. + * Removes the specified item from the specified toolbox group. + * @param groupName A string value that is a unique toolbox group name (name). + * @param toolboxItemName A string value that is a unique toolbox item name (name). */ removeToolboxItem(groupName: string, toolboxItemName: string): void; /** @@ -3438,6 +3607,10 @@ interface ASPxClientTextEdit extends ASPxClientEdit { * Fires on the client side when the editor's text is changed and focus moves out of the editor by end-user interactions. */ TextChanged: ASPxClientEvent>; + /** + * Fires on the client side when the editor's input value is changed before the focus moves out of the editor by end-user interactions. + */ + UserInput: ASPxClientEvent>; /** * Returns the text displayed within the editor. */ @@ -4249,7 +4422,7 @@ interface ASPxClientListBox extends ASPxClientListEdit { */ PerformCallback(parameter: string): void; /** - * Adds a new item to the end of the editor's items collection, specifying the item's display text, and returns the index of the added item. + * Adds a new item to the editor, specifying the item's display text, and returns the added item's index. * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. */ AddItem(texts: string[]): number; @@ -5021,6 +5194,11 @@ interface ASPxClientGridBase extends ASPxClientControl { */ interface ASPxClientGridColumnBase { } +/** + * Lists values that specify the document formats available for export from the grid. + */ +interface ASPxClientGridExportFormat { +} /** * A method that will handle the ToolbarItemClick event. */ @@ -5047,8 +5225,8 @@ interface ASPxClientGridToolbarItemClickEventArgs extends ASPxClientProcessingMo */ toolbarName: string; /** - * Gets the clicked toolbar item. - * Value: A ASPxClientMenuItem object that is the toolbar item. + * Gets the clicked menu item + * Value: An ASPxClientMenu value that is the menu item. */ item: ASPxClientMenuItem; /** @@ -5158,7 +5336,11 @@ interface ASPxClientCardView extends ASPxClientGridBase { /** * Fires in response to changing card focus. */ - FocusedCardChanged: ASPxClientEvent>; + FocusedCardChanged: ASPxClientEvent>; + /** + * Fires before a card has been focused. + */ + CardFocusing: ASPxClientEvent>; /** * Occurs when a callback for server-side processing is initiated. */ @@ -5175,6 +5357,21 @@ interface ASPxClientCardView extends ASPxClientGridBase { * Fires after the customization window has been closed. */ CustomizationWindowCloseUp: ASPxClientEvent>; + /** + * Returns the editor used to edit the specified column's values. + * @param column An ASPxClientCardViewColumn object that specifies the required column within the client grid. + */ + GetEditor(column: ASPxClientCardViewColumn): ASPxClientEdit; + /** + * Returns the editor used to edit the specified column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + GetEditor(columnIndex: number): ASPxClientEdit; + /** + * Returns the editor used to edit the specified column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + GetEditor(columnFieldNameOrId: string): ASPxClientEdit; /** * Returns the value of the specified edit cell. * @param column An ASPxClientCardViewColumn object that represents the data column within the client grid. @@ -5255,6 +5452,11 @@ interface ASPxClientCardView extends ASPxClientGridBase { * @param columnIndex A zero-based index that identifies the column in the column collection (the column's Index property value). */ SetFocusedCell(cardVisibleIndex: number, columnIndex: number): void; + /** + * Specifies a custom editor for the search panel on the client side. + * @param editor An ASPxClientEdit object representing a custom editor. + */ + SetSearchPanelCustomEditor(editor: ASPxClientEdit): void; /** * Sorts data by the specified data column's values. * @param column An ASPxClientCardViewColumn object that represents the data column. @@ -5407,7 +5609,7 @@ interface ASPxClientCardView extends ASPxClientGridBase { */ IsNewCardEditing(): boolean; /** - * Adds a new record. + * Adds a new card. */ AddNewCard(): void; /** @@ -5543,6 +5745,11 @@ interface ASPxClientCardView extends ASPxClientGridBase { * @param visibleIndex An integer value that identifies the card by its visible index. */ IsCardSelectedOnPage(visibleIndex: number): boolean; + /** + * Exports a grid data to a file in the specified format. + * @param format An ASPxClientCardViewExportFormat object specifying the export format. + */ + ExportTo(format: ASPxClientCardViewExportFormat): void; /** * Applies the specified search panel filter criterion to grid data. * @param value A string value that specifies the filter criterion. @@ -5682,25 +5889,10 @@ interface ASPxClientCardView extends ASPxClientGridBase { */ GetColumnById(columnId: string): ASPxClientCardViewColumn; /** - * Returns the client column which is bound to the specified data source field. + * Returns the client column to which the specified data source field is bound. * @param columnFieldName A string value that specifies the name of the data source field to which the column is bound (the column's FieldName property value). */ GetColumnByField(columnFieldName: string): ASPxClientCardViewColumn; - /** - * Returns the editor used to edit the specified column's values. - * @param column An ASPxClientCardViewColumn object that specifies the required column within the client grid. - */ - GetEditor(column: ASPxClientCardViewColumn): ASPxClientEdit; - /** - * Returns the editor used to edit the specified column's values. - * @param columnIndex An integer value that specifies the column's position within the column collection. - */ - GetEditor(columnIndex: number): ASPxClientEdit; - /** - * Returns the editor used to edit the specified column's values. - * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). - */ - GetEditor(columnFieldNameOrId: string): ASPxClientEdit; } /** * Represents a client column. @@ -5758,6 +5950,32 @@ interface ASPxClientCardViewColumnCancelEventArgs extends ASPxClientCancelEventA */ column: ASPxClientCardViewColumn; } +/** + * A method that will handle the client CardFocusing event. + */ +interface ASPxClientCardViewCardFocusingEventHandler { + /** + * Represents a method that will handle the CardFocusing event. + * @param source The event source. + * @param e An ASPxClientCardViewCardFocusingEventArgs object which contains event data. + */ + (source: S, e: ASPxClientCardViewCardFocusingEventArgs): void; +} +/** + * Provides data for the CardFocusing event. + */ +interface ASPxClientCardViewCardFocusingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the card visible index. + * Value: An integer value specifying the visible index. + */ + visibleIndex: number; + /** + * Provides access to the parameters associated with the CardFocusing event. + * Value: An object that contains parameters associated with the event. + */ + htmlEvent: Object; +} /** * A method that will handle the CardClick event. */ @@ -5846,6 +6064,27 @@ interface ASPxClientCardViewSelectionEventArgs extends ASPxClientProcessingModeE */ isChangedOnServer: boolean; } +/** + * A method that will handle the client FocusedCardChanged event. + */ +interface ASPxClientCardViewFocusEventHandler { + /** + * Represents a method that will handle the FocusedCardChanged event. + * @param source The event source. + * @param e An ASPxClientCardViewFocusEventArgs object which contains event data. + */ + (source: S, e: ASPxClientCardViewFocusEventArgs): void; +} +/** + * Provides data for the corresponding event. + */ +interface ASPxClientCardViewFocusEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets whether card focusing has been changed on the server. + * Value: true , if the card focusing has been changed on the server; otherwise, false. + */ + isChangedOnServer: boolean; +} /** * A method that will handle the client BatchEditStartEditing event. */ @@ -6143,6 +6382,30 @@ interface ASPxClientCardViewBatchEditApi { * @param visibleIndex An integer value that identifies the card by its visible index. */ IsNewCard(visibleIndex: number): boolean; + /** + * Adds a new card when ASPxCardView is in Batch Edit mode. + */ + AddNewCard(): void; + /** + * Deletes the specified card when ASPxCardView is in Batch Edit mode. + * @param visibleIndex An integer value that identifies the card index. + */ + DeleteCard(visibleIndex: number): void; + /** + * Deletes a card with a specified key value when ASPxCardView is in Batch Edit mode. + * @param key An object that uniquely identifies the card. + */ + DeleteCardByKey(key: Object): void; + /** + * Recovers the specified card when ASPxCardView is in Batch Edit mode. + * @param visibleIndex An integer value that identifies the card index. + */ + RecoverCard(visibleIndex: number): void; + /** + * Recovers a card with a specified key value when ASPxCardView is in Batch Edit mode. + * @param key An object that uniquely identifies the card. + */ + RecoverCardByKey(key: Object): void; /** * Programmatically moves the focus to the previous cell in the card */ @@ -6220,6 +6483,12 @@ interface ASPxClientCardViewBatchEditApi { * Ends cell or card editing. */ EndEdit(): void; + /** + * Provides the text displayed within the cell according to the specified display format rule. + * @param columnFieldNameOrId A string value representing the column's unique identifier or field name. + * @param value An object representing a value. + */ + GetColumnDisplayText(columnFieldNameOrId: string, value: Object): string; } /** * Contains information on a grid cell. @@ -6236,6 +6505,11 @@ interface ASPxClientCardViewCellInfo { */ column: ASPxClientCardViewColumn; } +/** + * Lists values that specify the document formats available for export from the grid. + */ +interface ASPxClientCardViewExportFormat extends ASPxClientGridExportFormat { +} /** * A client-side equivalent of the ASPxGridView object. */ @@ -6260,7 +6534,11 @@ interface ASPxClientGridView extends ASPxClientGridBase { /** * Fires in response to changing row focus. */ - FocusedRowChanged: ASPxClientEvent>; + FocusedRowChanged: ASPxClientEvent>; + /** + * Fires before a row has been focused. + */ + RowFocusing: ASPxClientEvent>; /** * Enables you to cancel data grouping. */ @@ -6369,6 +6647,29 @@ interface ASPxClientGridView extends ASPxClientGridBase { * Fires after the Customization Window has been closed. */ CustomizationWindowCloseUp: ASPxClientEvent>; + /** + * Selects the specified rows within the grid. + * @param visibleIndices An array of zero-based indices that identify data rows within the grid. + */ + SelectRows(visibleIndices: number[]): void; + /** + * Selects or deselects the specified rows within the grid. + * @param visibleIndices An array of zero-based indices that identify data rows within the grid. + * @param selected true to select the specified rows; false to deselect the rows. + */ + SelectRows(visibleIndices: number[], selected: boolean): void; + /** + * Selects or deselects the specified row within the grid. + * @param visibleIndex An integer zero-based index that identifies the data row within the grid. + * @param selected true to select the specified row; false to deselect the row. + */ + SelectRows(visibleIndex: number, selected?: boolean): void; + /** + * Selects or deselects the specified rows displayed within the grid. + * @param keys An array of objects that uniquely identify the rows. + * @param selected true to select the specified rows; false to deselect the rows. + */ + SelectRowsByKey(keys: Object[], selected?: boolean): void; /** * Selects or deselects the specified row displayed within the grid. * @param key An object that uniquely identifies the row. @@ -6498,6 +6799,16 @@ interface ASPxClientGridView extends ASPxClientGridBase { * @param scrollableRowSettings An object specifying which types of grid rows should or should not be scrollable. */ SetFixedColumnScrollableRows(scrollableRowSettings: Object): void; + /** + * Exports a grid data to a file in the specified format. + * @param format An ASPxClientGridViewExportFormat object specifying the export format. + */ + ExportTo(format: ASPxClientGridViewExportFormat): void; + /** + * Returns a value specifying the indices of the rows visible in the browser's view port. + * @param includePartiallyVisible true, to include partially visible rows, otherwise, false. + */ + GetRowIndicesVisibleInViewPort(includePartiallyVisible: boolean): number[]; /** * Applies a filter specified in the filter row to the GridView. */ @@ -6777,6 +7088,11 @@ interface ASPxClientGridView extends ASPxClientGridBase { * @param columnIndex A zero-based index that identifies the column in the column collection (the column's Index property value). */ SetFocusedCell(rowVisibleIndex: number, columnIndex: number): void; + /** + * Specifies a custom editor for the search panel on the client side. + * @param editor An ASPxClientEdit object representing a custom editor. + */ + SetSearchPanelCustomEditor(editor: ASPxClientEdit): void; /** * Invokes the Customization Dialog and displays it over the grid. */ @@ -6996,6 +7312,15 @@ interface ASPxClientGridView extends ASPxClientGridBase { * @param moveFromGroup true, to ungroup the grid's data by the column; otherwise, false. */ MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, targetPosition: ASPxClientGridColumnMovingTargetPosition, moveToGroup: boolean, moveFromGroup: boolean): void; + /** + * Returns an object specifying the grid column's layout. + */ + GetColumnLayout(): Object; + /** + * Specifies the grid column's layout. + * @param columnLayout An object specifying the grid column's layout. + */ + SetColumnLayout(columnLayout: Object): void; /** * Groups data by the values of the specified column. * @param column An ASPxClientGridViewColumn object that represents the data column by whose values data is grouped. @@ -7184,29 +7509,6 @@ interface ASPxClientGridView extends ASPxClientGridBase { * @param visibleIndex A zero-based integer value that specifies the row's visible index. */ SelectRows(visibleIndex: number): void; - /** - * Selects the specified rows within the grid. - * @param visibleIndices An array of zero-based indices that identify data rows within the grid. - */ - SelectRows(visibleIndices: number[]): void; - /** - * Selects or deselects the specified rows within the grid. - * @param visibleIndices An array of zero-based indices that identify data rows within the grid. - * @param selected true to select the specified rows; false to deselect the rows. - */ - SelectRows(visibleIndices: number[], selected: boolean): void; - /** - * Selects or deselects the specified row within the grid. - * @param visibleIndex An integer zero-based index that identifies the data row within the grid. - * @param selected true to select the specified row; false to deselect the row. - */ - SelectRows(visibleIndex: number, selected?: boolean): void; - /** - * Selects or deselects the specified rows displayed within the grid. - * @param keys An array of objects that uniquely identify the rows. - * @param selected true to select the specified rows; false to deselect the rows. - */ - SelectRowsByKey(keys: Object[], selected?: boolean): void; } /** * A client grid column. @@ -7347,6 +7649,48 @@ interface ASPxClientGridViewSelectionEventArgs extends ASPxClientProcessingModeE */ isChangedOnServer: boolean; } +/** + * A method that will handle the client FocusedRowChanged event. + */ +interface ASPxClientGridViewFocusEventHandler { + /** + * Represents a method that will handle the FocusedRowChanged event. + * @param source The event source. + * @param e An ASPxClientGridViewFocusEventArgs object which contains event data. + */ + (source: S, e: ASPxClientGridViewFocusEventArgs): void; +} +/** + * Provides data for the corresponding event. + */ +interface ASPxClientGridViewFocusEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets whether the row focusing has been changed on the server. + * Value: true , if the row focusing has been changed on the server; otherwise, false. + */ + isChangedOnServer: boolean; +} +/** + * A method that will handle the client RowFocusing event. + */ +interface ASPxClientGridViewRowFocusingEventHandler { + /** + * Represents a method that will handle the RowFocusing event. + * @param source The event source. + * @param e An ASPxClientGridViewRowFocusingEventArgs object which contains event data. + */ + (source: S, e: ASPxClientGridViewRowFocusingEventArgs): void; +} +/** + * Provides data for the RowFocusing event. + */ +interface ASPxClientGridViewRowFocusingEventArgs extends ASPxClientGridViewRowCancelEventArgs { + /** + * Provides access to the parameters associated with the RowFocusing event. + * Value: An object that contains parameters associated with the event. + */ + htmlEvent: Object; +} /** * A method that will handle the RowClick events. */ @@ -7829,6 +8173,30 @@ interface ASPxClientGridViewBatchEditApi { * @param visibleIndex An integer value that identifies the row by its visible index. */ IsNewRow(visibleIndex: number): boolean; + /** + * Adds a new row when ASPxGridView is in Batch Edit mode. + */ + AddNewRow(): void; + /** + * Deletes the specified row when ASPxGridView is in Batch Edit. + * @param visibleIndex An integer value that identifies the row index. + */ + DeleteRow(visibleIndex: number): void; + /** + * Deletes a row with a specified key value when ASPxGridView is in Batch Edit mode. + * @param key An object that uniquely identifies the row. + */ + DeleteRowByKey(key: Object): void; + /** + * Recovers the specified row when ASPxGridView is in Batch Edit mode. + * @param visibleIndex An integer value that identifies the row index. + */ + RecoverRow(visibleIndex: number): void; + /** + * Recovers a row with a specified key value when ASPxGridView is in Batch Edit mode. + * @param key An object that uniquely identifies the row. + */ + RecoverRowByKey(key: Object): void; /** * Programmatically moves the focus to the previous cell in the row. */ @@ -7906,6 +8274,17 @@ interface ASPxClientGridViewBatchEditApi { * Ends cell or row editing. */ EndEdit(): void; + /** + * Provides the text displayed within the cell according to the specified display format rule. + * @param columnFieldNameOrId A string value representing the column's unique identifier or field name. + * @param value An object representing a value. + */ + GetColumnDisplayText(columnFieldNameOrId: string, value: Object): string; +} +/** + * Lists values that specify the document formats available for export from the grid. + */ +interface ASPxClientGridViewExportFormat extends ASPxClientGridExportFormat { } /** * A client-side equivalent of the ASPxVerticalGrid object. @@ -8207,6 +8586,11 @@ interface ASPxClientVerticalGrid extends ASPxClientGridBase { * @param visibleIndex An integer value that identifies the record by its visible index. */ IsRecordSelectedOnPage(visibleIndex: number): boolean; + /** + * Exports a grid data to a file in the specified format. + * @param format An ASPxClientVerticalGridExportFormat object specifying the export format. + */ + ExportTo(format: ASPxClientVerticalGridExportFormat): void; /** * Returns the values of the specified data source fields within the specified record. * @param visibleIndex An integer value that identifies the record. @@ -8221,7 +8605,7 @@ interface ASPxClientVerticalGrid extends ASPxClientGridBase { */ GetPageRecordValues(fieldNames: string, onCallback: ASPxClientVerticalGridValuesCallback): void; /** - * Returns the number of records actually displayed within the active page. + * Returns the number of records actually displayed on the active page. */ GetVisibleRecordsOnPage(): number; /** @@ -8338,6 +8722,11 @@ interface ASPxClientVerticalGrid extends ASPxClientGridBase { * @param isFilterEnabled true to enable the current filter; otherwise, false. */ SetFilterEnabled(isFilterEnabled: boolean): void; + /** + * Specifies a custom editor for the search panel on the client side. + * @param editor An ASPxClientEdit object representing a custom editor. + */ + SetSearchPanelCustomEditor(editor: ASPxClientEdit): void; /** * Returns the client row that resides at the specified position within the row collection. * @param rowIndex A zero-based index that identifies the row within the row collection (the row's Index property value). @@ -8903,6 +9292,30 @@ interface ASPxClientVerticalGridBatchEditApi { * @param visibleIndex An integer value that identifies the record by its visible index. */ IsNewRecord(visibleIndex: number): boolean; + /** + * Adds a new record when ASPxVerticalGrid is in Batch Edit mode. + */ + AddNewRecord(): void; + /** + * Deletes the specified record when ASPxVerticalGrid is in Batch Edit mode. + * @param visibleIndex An integer value that identifies the record index. + */ + DeleteRecord(visibleIndex: number): void; + /** + * Deletes a record with a specified key value when ASPxVerticalGrid is in Batch Edit mode. + * @param key An object that uniquely identifies the record. + */ + DeleteRecordByKey(key: Object): void; + /** + * Recovers the specified record when ASPxVerticalGrid is in Batch Edit mode. + * @param visibleIndex An integer value that identifies the record index. + */ + RecoverRecord(visibleIndex: number): void; + /** + * Recovers a record with a specified key value when ASPxVerticalGrid is in Batch Edit mode. + * @param key An object that uniquely identifies the record. + */ + RecoverRecordByKey(key: Object): void; /** * Programmatically moves the focus to the previous cell in the record. */ @@ -8980,6 +9393,17 @@ interface ASPxClientVerticalGridBatchEditApi { * Ends the cell(s) editing. */ EndEdit(): void; + /** + * Provides the text displayed within the cell according to the specified display format rule. + * @param columnFieldNameOrId A string value representing the row's unique identifier or field name. + * @param value An object representing a value. + */ + GetColumnDisplayText(columnFieldNameOrId: string, value: Object): string; +} +/** + * Lists values that specify the document formats available for export from the grid. + */ +interface ASPxClientVerticalGridExportFormat extends ASPxClientGridExportFormat { } /** * Contains style settings related to media elements in ASPxHtmlEditor. @@ -9886,6 +10310,11 @@ interface ASPxClientHtmlEditor extends ASPxClientControl { * Performs validation of the editor's content. */ Validate(): void; + /** + * Returns a toolbar specified by its name. + * @param name A string value specifying the toolbar name. + */ + GetToolbarByName(name: string): ASPxClientMenu; /** * Set an active tab specified by its name. * @param name A string value that is the name of the tab. @@ -10730,22 +11159,246 @@ interface ASPxClientRichEditHyperlinkClickEventArgs extends ASPxClientEventArgs */ targetUri: string; } +/** + * A method that will handle the KeyDown event. + */ +interface ASPxClientRichEditKeyDownEventHandler { + /** + * A method that will handle the KeyDown event. + * @param source The event source. + * @param e An ASPxClientRichEditKeyDownEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRichEditKeyDownEventArgs): void; +} +/** + * Provides data for the KeyDown event. + */ +interface ASPxClientRichEditKeyDownEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets whether the event is handled manually, so no default processing is required. + * Value: true if the event is handled and no default processing is required; otherwise false. + */ + handled: boolean; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * A method that will handle the KeyUp event. + */ +interface ASPxClientRichEditKeyUpEventHandler { + /** + * A method that will handle the KeyUp event. + * @param source The event source. + * @param e An ASPxClientRichEditKeyUpEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRichEditKeyUpEventArgs): void; +} +/** + * Provides data for the KeyUp event. + */ +interface ASPxClientRichEditKeyUpEventArgs extends ASPxClientEventArgs { + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * A method that will handle the PointerDown event. + */ +interface ASPxClientRichEditPointerDownEventHandler { + /** + * A method that will handle the PointerDown event. + * @param source The event source. + * @param e An ASPxClientRichEditPointerDownEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRichEditPointerDownEventArgs): void; +} +/** + * Provides data for the PointerDown event. + */ +interface ASPxClientRichEditPointerDownEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets whether the event is handled manually, so no default processing is required. + * Value: true if the event is handled and no default processing is required; otherwise false. + */ + handled: boolean; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * A method that will handle the PointerUp event. + */ +interface ASPxClientRichEditPointerUpEventHandler { + /** + * A method that will handle the PointerUp event. + * @param source The event source. + * @param e An ASPxClientRichEditPointerUpEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRichEditPointerUpEventArgs): void; +} +/** + * Provides data for the PointerUp event. + */ +interface ASPxClientRichEditPointerUpEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets whether the event is handled manually, so no default processing is required. + * Value: true if the event is handled and no default processing is required; otherwise false. + */ + handled: boolean; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * A method that will handle the ContentInserted event. + */ +interface ASPxClientRichEditContentInsertedEventHandler { + /** + * A method that will handle the ContentInserted event. + * @param source The event source + * @param e An ASPxClientRichEditContentInsertedEventArgs that contains event data. + */ + (source: S, e: ASPxClientRichEditContentInsertedEventArgs): void; +} +/** + * Provides data for the ContentInserted event. + */ +interface ASPxClientRichEditContentInsertedEventArgs extends ASPxClientEventArgs { + /** + * Gets the active sub-document's identifier. + * Value: An integer value specifying the sub-document's identifier. + */ + subDocumentId: number; + /** + * Gets the text buffer interval related to the inserted content. + * Value: An object that stores the inserted content's length and position. + */ + interval: Interval; +} +/** + * A method that will handle the ContentRemoved event. + */ +interface ASPxClientRichEditContentRemovedEventHandler { + /** + * A method that will handle the ContentRemoved event. + * @param source The event source + * @param e An ASPxClientRichEditContentRemovedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRichEditContentRemovedEventArgs): void; +} +/** + * Provides data for the ContentRemoved event. + */ +interface ASPxClientRichEditContentRemovedEventArgs extends ASPxClientEventArgs { + /** + * Gets the active sub-document's identifier. + * Value: An integer value specifying the sub-document's identifier + */ + subDocumentId: number; + /** + * Gets the text buffer interval related to the removed content. + * Value: An object that stores the removed content's length and position. + */ + interval: Interval; +} +/** + * A method that will handle the CharacterPropertiesChanged event. + */ +interface ASPxClientRichEditCharacterPropertiesChangedEventHandler { + /** + * A method that will handle the CharacterPropertiesChanged event. + * @param source The event source + * @param e An ASPxClientRichEditCharacterPropertiesChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRichEditCharacterPropertiesChangedEventArgs): void; +} +/** + * Provides data for the CharacterPropertiesChanged event. + */ +interface ASPxClientRichEditCharacterPropertiesChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the active sub-document's identifier. + * Value: An integer value specifying the sub-document's identifier. + */ + subDocumentId: number; + /** + * Gets the text buffer interval related to the changed characters. + * Value: An object that stores the changed character length and position. + */ + interval: Interval; +} +/** + * A method that will handle the ParagraphPropertiesChanged event. + */ +interface ASPxClientRichEditParagraphPropertiesChangedEventHandler { + /** + * A method that will handle the ParagraphPropertiesChanged event. + * @param source The event source. + * @param e An ASPxClientRichEditParagraphPropertiesChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRichEditParagraphPropertiesChangedEventArgs): void; +} +/** + * Provides data for the ParagraphPropertiesChanged event. + */ +interface ASPxClientRichEditParagraphPropertiesChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the active sub-document's identifier. + * Value: An integer value specifying the sub-document's identifier + */ + subDocumentId: number; + /** + * Gets the changed paragraph's index. + * Value: An integer value specifying the changed paragraph's identifier. + */ + paragraphIndex: number; +} +/** + * A method that will handle the PopupMenuShowing event. + */ +interface ASPxClientRichEditPopupMenuShowingEventHandler { + /** + * A method that will handle the PopupMenuShowing event. + * @param source The event source. + * @param e An ASPxClientRichEditPopupMenuShowingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRichEditPopupMenuShowingEventArgs): void; +} +/** + * Provides data for the PopupMenuShowing event. + */ +interface ASPxClientRichEditPopupMenuShowingEventArgs extends ASPxClientCancelEventArgs { + /** + * Provides access to a collection of menu items in the context menu being invoked. + * Value: A object representing the context menu's item collection. + */ + menuItems: ASPxClientRichEditPopupMenuItemCollection; +} /** * A client-side equivalent of the ASPxRichEdit object. */ interface ASPxClientRichEdit extends ASPxClientControl { /** * Provides access to document structural elements. - * Value: A object that lists RichEdit's document structural elements. + * Value: A object that lists a RichEdit document's structural elements. */ document: RichEditDocument; /** - * Provides access to RichEdit's client-side commands. - * Value: A object that lists RichEdit's client-side commands. + * Provides access to the RichEdit's client-side commands. + * Value: A object that lists the RichEdit's client-side commands. */ commands: RichEditCommands; /** - * Provides access to the client methods that changes the selection. + * Provides access to the client methods that change the selection. * Value: A object that lists methods to work with the selection. */ selection: RichEditSelection; @@ -10778,18 +11431,70 @@ interface ASPxClientRichEdit extends ASPxClientControl { * Fires on the client if any server error occurs during server-side processing of a callback sent by the RichEdit. */ CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side when a document model is loaded into the control. + */ + DocumentLoaded: ASPxClientEvent>; /** * Fires if any change is made to the RichEdit's document on the client. */ DocumentChanged: ASPxClientEvent>; /** - * Occurs when a hyperlink is clicked within the document. + * Occurs when the active sub-document is substituted with another sub-document. + */ + ActiveSubDocumentChanged: ASPxClientEvent>; + /** + * Occurs when the control receives focus. + */ + GotFocus: ASPxClientEvent>; + /** + * Occurs when the control loses focus. + */ + LostFocus: ASPxClientEvent>; + /** + * Occurs when the mouse pointer is over the RichEdit's document and a mouse button is pressed. + */ + PointerDown: ASPxClientEvent>; + /** + * Occurs when the mouse button is released if it was pressed within the RichEdit's document. + */ + PointerUp: ASPxClientEvent>; + /** + * Occurs when a key is pressed while the ASPxRichEdit's document has focus. + */ + KeyDown: ASPxClientEvent>; + /** + * Occurs when a key is released while the ASPxRichEdit's document has focus. + */ + KeyUp: ASPxClientEvent>; + /** + * Occurs when a pop-up menu is about to be shown. + */ + PopupMenuShowing: ASPxClientEvent>; + /** + * Occurs when a hyperlink is activated within the document. */ HyperlinkClick: ASPxClientEvent>; /** * Occurs when the selection is changed within the document. */ SelectionChanged: ASPxClientEvent>; + /** + * Occurs when content is inserted into the document. + */ + ContentInserted: ASPxClientEvent>; + /** + * Occurs when content is removed from the document + */ + ContentRemoved: ASPxClientEvent>; + /** + * Occurs when the characters' formatting is changed. + */ + CharacterPropertiesChanged: ASPxClientEvent>; + /** + * Occurs when a paragraph's formatting is changed. + */ + ParagraphPropertiesChanged: ASPxClientEvent>; /** * Enables you to switch the full-screen mode of the Rich Text Editor. * @param fullscreen true to activate full-screen mode; false to deactivate full-screen mode. @@ -10823,6 +11528,123 @@ interface ASPxClientRichEdit extends ASPxClientControl { */ ReconnectToExternalRibbon(): void; } +/** + * Represents an individual item of the Rich Edit's context menu. + */ +interface ASPxClientRichEditPopupMenuItem { + /** + * Gets the immediate parent menu item to which the current menu item belongs. + * Value: A ASPxClientRichEditPopupMenuItem object representing the menu item's immediate parent. + */ + parent: ASPxClientRichEditPopupMenuItem; + /** + * Gets or sets the unique identifier name for the current menu item. + * Value: A string value that specifies the item's unique identifier name. + */ + name: string; + /** + * Gets or sets the text content of the current menu item. + * Value: A string value that specifies the text content of the menu item. + */ + text: string; + /** + * Gets or sets a value that indicates whether the menu item is enabled, allowing the item to respond to end-user interactions. + * Value: true if the item is enabled; otherwise, false. + */ + enabled: boolean; + /** + * Gets or sets the CSS class name defining the menu item's image. + * Value: A string value specifying the class name. + */ + imageClassName: string; + /** + * Gets or sets a URL which defines the navigation location. + * Value: A string value which represents a URL where the client web browser will navigate. + */ + navigateUrl: string; + /** + * Gets or sets the URL of the menu item's image. + * Value: A string value that specifies the location of an image. + */ + imageUrl: string; + /** + * Gets or sets a value that specifies whether the current menu item starts a group. + * Value: true if the current menu item starts a group; otherwise, false. + */ + beginGroup: boolean; + /** + * Gets or sets the current menu item's tooltip text. + * Value: A string which specifies the text content of the current menu item's tooltip. + */ + tooltip: string; + /** + * Gets or sets the window or frame at which to target the contents of the URL associated with the current menu item. + * Value: A string which identifies the window or frame at which to target the URL content. + */ + target: string; + /** + * Gets a collection that contains the submenu items of the current menu item. + */ + GetSubItems(): ASPxClientRichEditPopupMenuItemCollection; + /** + * Returns the menu item's sub-item with the specified index. + * @param index An integer value specifying the index of the sub-item within a collection of the current menu item's submenu items. + */ + GetItem(index: number): ASPxClientRichEditPopupMenuItem; + /** + * Returns the menu item's sub-item with the specified name property value. + * @param name A string value specifying the name property value of the sub-item to find. + */ + GetItemByName(name: string): ASPxClientRichEditPopupMenuItem; + /** + * Returns the total number of the menu item's child items (submenu items). + */ + GetItemCount(): number; +} +/** + * Represents a collection of items in the Rich Edit's context menu. + */ +interface ASPxClientRichEditPopupMenuItemCollection { + /** + * Adds the specified menu item to the end of the collection. + * @param item An ASPxClientRichEditPopupMenuItem object specifying the item to be added to the collection. + */ + Add(item: ASPxClientRichEditPopupMenuItem): void; + /** + * Removes a menu item specified by its index within the collection. + * @param index An integer value specifying the index of the menu item to remove. + */ + Remove(index: number): void; + /** + * Removes a menu item specified by its name. + * @param name A string value specifying the name property value of a menu item to remove from the collection. + */ + RemoveByName(name: string): void; + /** + * Adds the specified item to the specified position within the collection. + * @param index An integer value that specifies the zero-based index at which the specified item should be inserted. + * @param item An ASPxClientRichEditPopupMenuItem object to insert. + */ + Insert(index: number, item: ASPxClientRichEditPopupMenuItem): void; + /** + * Returns the total number of menu items in the collection. + */ + GetCount(): number; + /** + * Returns an item object with the specified name property value. + * @param name A string value representing the name property value of the required item. + */ + GetByName(name: string): ASPxClientRichEditPopupMenuItem; + /** + * Returns a menu item specified by its index in the collection. + * @param index An integer value that is the zero-based index of the to retrieve from the ASPxClientRichEditPopupMenuItemCollection. + */ + Get(index: number): ASPxClientRichEditPopupMenuItem; + /** + * Removes all menu items from the collection. + */ + Clear(): void; +} /** * Contains a set of the available client commands. */ @@ -10833,7 +11655,7 @@ interface RichEditCommands { */ fileNew: FileNewCommand; /** - * Gets a command to open the file, specifying its path. + * Gets a command to open a document stored in the specified file. * Value: A object that provides methods for executing the command and checking its state. */ fileOpen: FileOpenCommand; @@ -10843,22 +11665,22 @@ interface RichEditCommands { */ fileOpenDialog: FileOpenDialogCommand; /** - * Gets a command to save the document to a file. + * Gets a command to save the document at its original location on the server. * Value: A object that provides methods for executing the command and checking its state. */ fileSave: FileSaveCommand; /** - * Gets a command to download the document file, specifying its extension. + * Gets a command to download the document specifying the file's extension. * Value: A object that provides methods for executing the command and checking its state. */ fileDownload: FileDownloadCommand; /** - * Gets 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. + * Gets a command to save a document in a file with the specified path. * Value: A object that provides methods for executing the command and checking its state. */ fileSaveAs: FileSaveAsCommand; /** - * Gets a command to open the file's Save As dialog. + * Gets 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. * Value: A object that provides methods for executing the command and checking its state. */ fileSaveAsDialog: FileSaveAsDialogCommand; @@ -10898,17 +11720,17 @@ interface RichEditCommands { */ changeFontName: ChangeFontNameCommand; /** - * Gets a command to change the font size of characters in a selected range. + * Gets a command to change the font size (in points) of characters in a selected range. * Value: A object that provides methods for executing the command and checking its state. */ changeFontSize: ChangeFontSizeCommand; /** - * Gets a command to increase the font size of characters in a selected range to the closest larger predefined value. + * Gets a command to increase the font size of characters in a selected range to the closest larger predefined value (in points). * Value: A object that provides methods for executing the command and checking its state. */ increaseFontSize: IncreaseFontSizeCommand; /** - * Gets a command to decrease the selected range's font size to the closest smaller predefined value. + * Gets a command to decrease the selected range's font size to the closest smaller predefined value (in points). * Value: A object that provides methods for executing the command and checking its state. */ decreaseFontSize: DecreaseFontSizeCommand; @@ -10958,7 +11780,7 @@ interface RichEditCommands { */ changeFontSuperscript: ChangeFontSuperscriptCommand; /** - * Gets a command to change the subscript formatting of characters in the selected range. + * Gets a command to change the subscript formatting of characters in a selected range. * Value: A object that provides methods for executing the command and checking its state. */ changeFontSubscript: ChangeFontSubscriptCommand; @@ -10973,12 +11795,12 @@ interface RichEditCommands { */ changeFontBackColor: ChangeFontBackColorCommand; /** - * Gets a command to reset text and paragraph formatting in the selected range to default. + * Gets a command to reset textual and paragraph formatting in the selected range to default values. * Value: A object that provides methods for executing the command and checking its state. */ clearFormatting: ClearFormattingCommand; /** - * Gets a command to change the selected range's style. + * Gets a command to apply a character or paragraph style settings to text in a selected range. * Value: A object that provides methods for executing the command and checking its state. */ changeStyle: ChangeStyleCommand; @@ -11088,7 +11910,7 @@ interface RichEditCommands { */ openParagraphFormattingDialog: OpenParagraphFormattingDialogCommand; /** - * Gets a command to change the formatting of paragraphs in a selected range. + * Gets a command to apply formatting settings to paragraphs within a selected range. * Value: A object that provides methods for executing the command and checking its state. */ changeParagraphFormatting: ChangeParagraphFormattingCommand; @@ -11103,7 +11925,7 @@ interface RichEditCommands { */ openInsertTableDialog: OpenInsertTableDialogCommand; /** - * Gets a command to insert a rectangle table of a specified size. + * Gets a command to insert a rectangular table of the specified size. * Value: A object that provides methods for executing the command and checking its state. */ insertTable: InsertTableCommand; @@ -11113,7 +11935,7 @@ interface RichEditCommands { */ openInsertPictureDialog: OpenInsertPictureDialogCommand; /** - * Gets a command to insert an inline picture stored by specifed web address. + * Gets a command to insert an inline picture stored by the specified web address. * Value: A object that provides methods for executing the command and checking its state. */ insertPicture: InsertPictureCommand; @@ -11143,7 +11965,7 @@ interface RichEditCommands { */ openInsertHyperlinkDialog: OpenInsertHyperlinkDialogCommand; /** - * Gets a command to insert a hyperlink at the current position in the document. + * Gets a command to insert and update a hyperlink field in place of a selected range. * Value: A object that provides methods for executing the command and checking its state. */ insertHyperlink: InsertHyperlinkCommand; @@ -11158,7 +11980,7 @@ interface RichEditCommands { */ deleteHyperlinks: DeleteHyperlinksCommand; /** - * Gets a command to navigate to the document bookmark or URI (uniform resource identifier) specified for the hyperlink. + * Gets a command to go to a bookmark or URI contained within the selected hyperlink. * Value: A object that provides methods for executing the command and checking its state. */ openHyperlink: OpenHyperlinkCommand; @@ -11168,12 +11990,12 @@ interface RichEditCommands { */ openInsertSymbolDialog: OpenInsertSymbolDialogCommand; /** - * Gets a command to insert a character into a document. + * Gets a command to insert characters into a document instead of a selected range. * Value: A object that provides methods for executing the command and checking its state. */ insertSymbol: InsertSymbolCommand; /** - * Gets a command to change page margin settings. + * Gets a command to apply page margins settings to sections located within a selected range. * Value: A object that provides methods for executing the command and checking its state. */ changePageMargins: ChangePageMarginsCommand; @@ -11183,12 +12005,12 @@ interface RichEditCommands { */ openPageMarginsDialog: OpenPageMarginsDialogCommand; /** - * Gets a command to change the page orientation. + * Gets a command to apply page orientation settings to sections located within a selected range. * Value: A object that provides methods for executing the command and checking its state. */ changePageOrientation: ChangePageOrientationCommand; /** - * Gets a command to define the page size dialog's settings. + * Gets a command to invoke the Page Setup dialog. * Value: A object that provides methods for executing the command and checking its state. */ setPageSizeDialog: SetPageSizeDialogCommand; @@ -11198,12 +12020,12 @@ interface RichEditCommands { */ openPagePaperSizeDialog: OpenPagePaperSizeDialogCommand; /** - * Gets a command to change the page size. + * Gets a command to apply page size settings to sections located within a selected range. * Value: A object that provides methods for executing the command and checking its state. */ changePageSize: ChangePageSizeCommand; /** - * Gets a command to change the number of section columns having the same width. + * Gets a command to change the number of columns having the same width in a section. * Value: A object that provides methods for executing the command and checking its state. */ changeSectionEqualColumnCount: ChangeSectionEqualColumnCountCommand; @@ -11213,7 +12035,7 @@ interface RichEditCommands { */ openSectionColumnsDialog: OpenSectionColumnsDialogCommand; /** - * Gets a command to change the settings of individual section columns. + * Gets a command to apply column layout settings to a section. * Value: A object that provides methods for executing the command and checking its state. */ changeSectionColumns: ChangeSectionColumnsCommand; @@ -11238,7 +12060,7 @@ interface RichEditCommands { */ insertSectionBreakOddPage: InsertSectionBreakOddPageCommand; /** - * Gets a command to set the background color of the page. + * Gets a command to set the background color of all pages contained in the document. * Value: A object that provides methods for executing the command and checking its state. */ changePageColor: ChangePageColorCommand; @@ -11263,12 +12085,12 @@ interface RichEditCommands { */ insertParagraph: InsertParagraphCommand; /** - * Gets a command to insert text at the current position in a document. + * Gets a command to insert text in place of a selected range. * Value: A object that provides methods for executing the command and checking its state. */ insertText: InsertTextCommand; /** - * Gets a command to delete the text in a selected range. + * Gets a command to delete text and in-line objects in a selected range. * Value: A object that provides methods for executing the command and checking its state. */ delete: DeleteCommand; @@ -11283,7 +12105,7 @@ interface RichEditCommands { */ removeNextWord: RemoveNextWordCommand; /** - * Gets a command to move the cursor backwards and erase the character in that space. + * Gets a command to move the cursor backwards and erase characters in a selected range. * Value: A object that provides methods for executing the command and checking its state. */ backspace: BackspaceCommand; @@ -11293,12 +12115,12 @@ interface RichEditCommands { */ insertLineBreak: InsertLineBreakCommand; /** - * Gets a command to scale pictures in a selected range. + * Gets a command to scale a selected in-line picture. * Value: A object that provides methods for executing the command and checking its state. */ changePictureScale: ChangePictureScaleCommand; /** - * Gets a command to increment the left indentation of paragraphs in a selected range. + * Gets a command to increment the left indent of paragraphs in a selected range. * Value: A object that provides methods for executing the command and checking its state. */ incrementParagraphLeftIndent: IncrementParagraphLeftIndentCommand; @@ -11322,13 +12144,18 @@ interface RichEditCommands { * Value: A object that provides methods for executing the command and checking its state. */ insertTab: InsertTabCommand; + /** + * Gets a command to add a non-breaking space in place of a selected range + * Value: A object that provides methods for executing the command and checking its state. + */ + insertNonBreakingSpace: InsertNonBreakingSpaceCommand; /** * Gets a command to invoke the Tabs dialog window. * Value: A object that provides methods for executing the command and checking its state. */ openTabsDialog: OpenTabsDialogCommand; /** - * Gets a command to change the tab stop value of a document or selected paragraphs + * Gets a command to change the default tab stop value of a document and apply custom tab settings to the selected paragraphs. * Value: A object that provides methods for executing the command and checking its state. */ changeTabs: ChangeTabsCommand; @@ -11358,12 +12185,12 @@ interface RichEditCommands { */ decrementNumberingIndent: DecrementNumberingIndentCommand; /** - * Gets a command to create a field with an empty code and populate it with the selection (if it is not collapsed). + * Gets a command to create a field with an empty code and populate it with the characters in the selected range (if it is not collapsed). * Value: A object that provides methods for executing the command and checking its state. */ createField: CreateFieldCommand; /** - * Gets a command to update the field's result. + * Gets a command to update each field's result in the selection. * Value: A object that provides methods for executing the command and checking its state. */ updateField: UpdateFieldCommand; @@ -11388,12 +12215,12 @@ interface RichEditCommands { */ insertNumeration: InsertNumerationCommand; /** - * Gets a command to remove the selected numeration. + * Gets a command to exclude the selected paragraphs from the numbered list. * Value: A object that provides methods for executing the command and checking its state. */ removeNumeration: RemoveNumerationCommand; /** - * Gets a command to update all fields in the selected range. + * Gets a command to update all fields in the document. * Value: A object that provides methods for executing the command and checking its state. */ updateAllFields: UpdateAllFieldsCommand; @@ -11413,12 +12240,12 @@ interface RichEditCommands { */ createPageField: CreatePageFieldCommand; /** - * Gets a command to convert the text of all selected sentences to sentence case. + * Gets a command changing all selected text to the sentence case capitalization. * Value: A object that provides methods for executing the command and checking its state. */ makeTextSentenceCase: MakeTextSentenceCaseCommand; /** - * Gets a command to switch the text case at the current position in the document. + * Gets a command to switch the text capitalization in the selection. * Value: A object that provides methods for executing the command and checking its state. */ switchTextCase: SwitchTextCaseCommand; @@ -11438,7 +12265,7 @@ interface RichEditCommands { */ goToNextDataRecord: GoToNextDataRecordCommand; /** - * Gets a command to navigate to the next data record. + * Gets a command to open the specified data record. * Value: A object that provides methods for executing the command and checking its state. */ goToDataRecord: GoToDataRecordCommand; @@ -11478,12 +12305,12 @@ interface RichEditCommands { */ mailMergeAndSaveAs: MailMergeAndSaveAsCommand; /** - * Gets a command to activate the page header and begin editing. + * Gets a command to create a header sub-document (if it is not yet created) and set it as an active sub-document instead of the main sub-document. * Value: A object that provides methods for executing the command and checking its state. */ insertHeader: InsertHeaderCommand; /** - * Gets a command to activate the page footer and begin editing. + * Gets a command to create a footer sub-document (if it is not yet created) and set it as an active sub-document instead of the main sub-document. * Value: A object that provides methods for executing the command and checking its state. */ insertFooter: InsertFooterCommand; @@ -11493,37 +12320,37 @@ interface RichEditCommands { */ linkHeaderFooterToPrevious: LinkHeaderFooterToPreviousCommand; /** - * Gets a command to navigate to the page footer from the page header in the header/footer editing mode. + * Gets a command to substitute a header sub-document with a footer sub-document of the same page as an active sub-document. * Value: A object that provides methods for executing the command and checking its state. */ goToFooter: GoToFooterCommand; /** - * Gets a command to navigate to the page header from the page footer in the header/footer editing mode. + * Gets a command to substitute a footer sub-document with a header sub-document of the same page as an active sub-document. * Value: A object that provides methods for executing the command and checking its state. */ goToHeader: GoToHeaderCommand; /** - * Gets a command to navigate to the next page header or footer in the header/footer editing mode. + * Gets a command to substitute a current header/footer with a header/footer of the next section as an active sub-document. * Value: A object that provides methods for executing the command and checking its state. */ goToNextHeaderFooter: GoToNextHeaderFooterCommand; /** - * Gets a command to navigate to the previous page header or footer in the header/footer editing mode. + * Gets a command to substitute a current header/footer with a header/footer of the previous section as an active sub-document. * Value: A object that provides methods for executing the command and checking its state. */ goToPreviousHeaderFooter: GoToPreviousHeaderFooterCommand; /** - * Gets a command to change the header/footer edit mode, so it allows creation of a different header or footer for the first page of a document or section. + * Gets a command to enable (or disable if it is enabled) a different page header and footer for the first page of the current section. * Value: A object that provides methods for executing the command and checking its state. */ setDifferentFirstPageHeaderFooter: SetDifferentFirstPageHeaderFooterCommand; /** - * Gets a command to change the header/footer edit mode so it allows creation of a different header or footer for odd and even pages of a document or section. + * Gets a command to enable (or disable if it is enabled) a different page header and footer for odd and even pages of the current section. * Value: A object that provides methods for executing the command and checking its state. */ setDifferentOddAndEvenPagesHeaderFooter: SetDifferentOddAndEvenPagesHeaderFooterCommand; /** - * Gets a command to finish header/footer editing. + * Gets a command to substitute a header/footer sub-document with the main sub-document as an active sub-document. * Value: A object that provides methods for executing the command and checking its state. */ closeHeaderFooter: CloseHeaderFooterCommand; @@ -11553,7 +12380,7 @@ interface RichEditCommands { */ changeTableCellPreferredWidth: ChangeTableCellPreferredWidthCommand; /** - * Gets a command to toggle inside borders for selected cells on/off. + * Gets a command to apply (or cancel) border settings of the inside borders for the selected cells. * Value: A object that provides methods for executing the command and checking its state. */ toggleTableCellInsideBorders: ToggleTableCellInsideBordersCommand; @@ -11708,22 +12535,22 @@ interface RichEditCommands { */ changeTableStyle: ChangeTableStyleCommand; /** - * Gets a command to toggle top borders for selected cells on/off. + * Gets a command to apply (or cancel) border settings of the top border for the selected cells. * Value: A object that provides methods for executing the command and checking its state. */ toggleTableCellTopBorder: ToggleTableCellTopBorderCommand; /** - * Gets a command to toggle right borders for selected cells on/off. + * Gets a command to apply (or cancel) border settings of the right border for the selected cells. * Value: A object that provides methods for executing the command and checking its state. */ toggleTableCellRightBorder: ToggleTableCellRightBorderCommand; /** - * Gets a command to toggle bottom borders for selected cells on/off. + * Gets a command to apply (or cancel) border settings of the bottom border for the selected cells. * Value: A object that provides methods for executing the command and checking its state. */ toggleTableCellBottomBorder: ToggleTableCellBottomBorderCommand; /** - * Gets a command to toggle left borders for selected cells on/off. + * Gets a command to apply (or cancel) border settings of the left border for the selected cells. * Value: A object that provides methods for executing the command and checking its state. */ toggleTableCellLeftBorder: ToggleTableCellLeftBorderCommand; @@ -11733,22 +12560,22 @@ interface RichEditCommands { */ removeTableCellBorders: RemoveTableCellBordersCommand; /** - * Gets a command to toggle all borders for selected cells on/off. + * Gets a command to apply (or cancel) border settings to all borders of the selected cells. * Value: A object that provides methods for executing the command and checking its state. */ toggleTableCellAllBorders: ToggleTableCellAllBordersCommand; /** - * Gets a command to toggle inner horizontal borders for selected cells on/off. + * Gets a command to apply (or cancel) border settings of the inside horizontal borders for the selected cells. * Value: A object that provides methods for executing the command and checking its state. */ toggleTableCellInsideHorizontalBorders: ToggleTableCellInsideHorizontalBordersCommand; /** - * Gets a command to toggle inner vertical borders for selected cells on/off. + * Gets a command to apply (or cancel) border settings of the inside vertical borders for the selected cells. * Value: A object that provides methods for executing the command and checking its state. */ toggleTableCellInsideVerticalBorders: ToggleTableCellInsideVerticalBordersCommand; /** - * Gets a command to toggle outer borders for selected cells on/off. + * Gets a command to apply (or cancel) border settings of the outside borders for the selected cells. * Value: A object that provides methods for executing the command and checking its state. */ toggleTableCellOutsideBorders: ToggleTableCellOutsideBordersCommand; @@ -11758,12 +12585,12 @@ interface RichEditCommands { */ changeTableLook: ChangeTableLookCommand; /** - * Gets a command to change the repository item's table border style. + * Gets a command to apply borders' drawing settings. * Value: A object that provides methods for executing the command and checking its state. */ changeTableBorderRepositoryItem: ChangeTableBorderRepositoryItemCommand; /** - * Gets a command to change cell shading in the selected table elements. + * Gets a command to change cell shading in selected table cells. * Value: A object that provides methods for executing the command and checking its state. */ changeTableCellShading: ChangeTableCellShadingCommand; @@ -11788,17 +12615,17 @@ interface RichEditCommands { */ findAll: FindAllCommand; /** - * Gets a command to hide the results of the search. + * Gets a command to hide the search results. * Value: A object that provides methods for executing the command and checking its state. */ hideFindResults: HideFindResultsCommand; /** - * Gets a command to search for a specific text and replace all matches in the document with the specified string. + * Gets a command to replace all matches of the specified text with new characters. * Value: A object that provides methods for executing the command and checking its state. */ replaceAll: ReplaceAllCommand; /** - * Gets a command to search for a specific text and replace the next match in the document with the specified string. + * Gets a command to find and replace a next match of the specified text after the cursor position with new characters. * Value: A object that provides methods for executing the command and checking its state. */ replaceNext: ReplaceNextCommand; @@ -11853,7 +12680,7 @@ interface RichEditCommands { */ changeFloatingObjectAbsoluteSize: ChangeFloatingObjectAbsoluteSizeCommand; /** - * Gets a command to modify a text box' relative size settings. + * Gets a command to modify a text box's relative size settings. * Value: A object that provides methods for executing the command and checking its state. */ changeTextBoxRelativeSize: ChangeTextBoxRelativeSizeCommand; @@ -11883,11 +12710,20 @@ interface RichEditCommands { */ changeFloatingObjectOutlineWidth: ChangeFloatingObjectOutlineWidthCommand; /** - * Gets a command to modify a text box' content margins. + * Gets a command to modify a text box's content margins. * Value: A object that provides methods for executing the command and checking its state. */ changeTextBoxContentMargins: ChangeTextBoxContentMarginsCommand; + /** + * Gets a command to resize the shape to fit the text in the text box. + * Value: A object that provides methods for executing the command and checking its state. + */ changeTextBoxResizeShapeToFitText: ChangeTextBoxResizeShapeToFitTextCommand; + /** + * Gets a command to add an HTML formatted content in place of a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertHtml: InsertHtmlCommand; } /** * Serves as a base for objects that implement different client command functionalities. @@ -11981,6 +12817,10 @@ interface RichEditDocument { * An abstract numbering list definition that defines the appearance and behavior of numbered paragraphs in a document. */ interface AbstractNumberingList { + /** + * Gets or sets a value indicating whether an abstract numbering list is deleted. + * Value: true, if the abstract numbering list is deleted; otherwise, false. + */ deleted: boolean; } /** @@ -12067,6 +12907,11 @@ interface Field { * Value: true, if the field code is displayed; false, if the field result is displayed. */ showCode: boolean; + /** + * Gets the index of the field + * Value: An integer value specifying the field's index + */ + index: number; } /** * Defines a bookmark in the document. @@ -12468,7 +13313,7 @@ interface SpellingInfo { spellCheckerState: any; /** * Provides access to an array containing misspelled intervals. - * Value: An array of objects. + * Value: An array of MisspelledInterval objects. */ misspelledIntervals: MisspelledInterval[]; } @@ -12635,6 +13480,26 @@ interface SubDocument { * Value: An integer that is the number of character positions in the document. */ length: number; + /** + * Returns a field if its interval includes the specified position. + * @param position An integer value specifying the target field's position. + */ + findFields(position: number): Field[]; + /** + * Returns all fields contained in the specified interval. + * @param interval A text buffer interval that contains the target fields. + */ + findFields(interval: Interval): Field[]; + /** + * Returns a table if its interval includes the specified position. + * @param position An integer value specifying the target table's position. + */ + findTables(position: number): Field[]; + /** + * Returns all tables contained in the specified interval. + * @param interval A text buffer interval that contains the target tables. + */ + findTables(interval: Interval): Field[]; } declare enum SubDocumentType { Main=0, @@ -12656,6 +13521,11 @@ interface Table { * Value: A integer value specifying the character length of the table. */ length: number; + /** + * Gets an index of the table. + * Value: An integer value specifying the table's index. + */ + index: number; /** * Gets the text buffer interval occupied by the current table element. * Value: An object specifying the interval settings. @@ -12809,7 +13679,7 @@ interface DeleteBookmarkCommand extends CommandWithSimpleStateBase { interface GoToBookmarkCommand extends CommandWithSimpleStateBase { /** * Executes the GoToBookmarkCommand 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 name + * @param name A string value specifying the bookmark's name */ execute(name: string): boolean; } @@ -12857,6 +13727,11 @@ interface UpdateFieldCommand extends CommandWithSimpleStateBase { * Executes the UpdateFieldCommand 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 UpdateFieldCommand 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. + * @param callback A callback function that is performed when updating of all fields in the selection is completed. + */ + execute(callback: Function): boolean; } /** * A command to display the selected field's field codes. @@ -12894,6 +13769,11 @@ interface UpdateAllFieldsCommand extends CommandWithSimpleStateBase { * Executes the UpdateAllFieldsCommand 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 UpdateAllFieldsCommand 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. + * @param callback A callback function that is performed when updating of all fields in the document is completed. + */ + execute(callback: Function): boolean; } /** * A command to insert a DATE field displaying the current date. @@ -12945,6 +13825,10 @@ interface DataRecordOptions { * Value: An integer value specifying the data record index. */ activeRecordIndex: number; + /** + * Gets or sets the count of data source records. + * Value: An integer value specifying the count of data source records. + */ recordCount: number; } /** @@ -13163,7 +14047,7 @@ interface FileSaveCommand extends CommandWithSimpleStateBase { interface FileSaveAsCommand extends CommandWithSimpleStateBase { /** * Executes the FileSaveAsCommand 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. + * @param path A string value specifying path to the saving file. Note that the path should be relative to the work directory. */ execute(path: string): boolean; /** @@ -13231,15 +14115,15 @@ interface FindAllCommand extends CommandWithSimpleStateBase { * Executes the FindAllCommand command by applying the specified settings. 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 text A string value specifying finding text. * @param matchCase true, to perform a case-sensitive search; otherwise, false. - * @param highlightResults true, to highlight result of search; otherwise, false. + * @param highlightResults true, to highlight the search results; otherwise, false. */ execute(text: string, matchCase: boolean, highlightResults: boolean): boolean; /** * Executes the FindAllCommand command by applying the specified settings. 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 text A string value specifying text to find. * @param matchCase true, to perform a case-sensitive search; otherwise, false. - * @param highlightResults true, to highlight result of search; otherwise, false. - * @param results An array of Interval objects containing the results of search. + * @param highlightResults true, to highlight the search results; otherwise, false. + * @param results An array of Interval objects containing the search results. */ execute(text: string, matchCase: boolean, highlightResults: boolean, results: Interval[]): boolean; } @@ -13259,7 +14143,7 @@ interface ReplaceAllCommand extends CommandWithSimpleStateBase { /** * Executes the ReplaceAllCommand command by applying the specified settings. 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 text A string value specifying a text to replace. - * @param replaceText A string value specifying the replacing text. + * @param replaceText A string value specifying the inserted text. * @param matchCase true, to perform a case-sensitive search; otherwise, false. */ execute(text: string, replaceText: string, matchCase: boolean): boolean; @@ -13270,8 +14154,8 @@ interface ReplaceAllCommand extends CommandWithSimpleStateBase { interface ReplaceNextCommand extends CommandWithSimpleStateBase { /** * Executes the ReplaceNextCommand command by applying the specified settings. 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 text A string value specifying text to replace. - * @param replaceText A string value specifying replacing text. + * @param text A string value specifying a text to replace. + * @param replaceText A string value specifying the inserted text. * @param matchCase true, to perform a case-sensitive search; otherwise, false. */ execute(text: string, replaceText: string, matchCase: boolean): boolean; @@ -13325,7 +14209,7 @@ interface ChangeFloatingObjectAlignmentPositionCommand extends CommandBase { interface ChangeFloatingObjectAbsolutePositionCommand extends CommandBase { /** * Executes the ChangeFloatingObjectAbsolutePositionCommand 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 settings A FloatingObjectAbsolutePositionSettings object specifying page margin settings. + * @param settings A FloatingObjectAbsolutePositionSettings object specifying object position settings. */ execute(settings: FloatingObjectAbsolutePositionSettings): boolean; /** @@ -13473,8 +14357,18 @@ interface ChangeTextBoxContentMarginsCommand extends CommandBase { */ getState(): any; } +/** + * A command to resize the shape to fit the text in the text box. + */ interface ChangeTextBoxResizeShapeToFitTextCommand extends CommandBase { + /** + * Executes the ChangeTextBoxResizeShapeToFitTextCommand 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 resizeShapeToFitText true, to resize the shape to fit the text; otherwise, false. + */ execute(resizeShapeToFitText: boolean): boolean; + /** + * Gets information about the command state. + */ getState(): any; } /** @@ -13508,7 +14402,7 @@ interface FloatingObjectAlignmentPositionSettings { interface FloatingObjectAbsolutePositionSettings { /** * Gets or sets a floating object's horizontal position relative to an element specified by the horizontalPositionType property. - * Value: An integer value specifying the position. + * Value: An integer value specifying the position in twips. */ horizontalAbsolutePosition: number; /** @@ -13518,7 +14412,7 @@ interface FloatingObjectAbsolutePositionSettings { horizontalPositionType: any; /** * Gets or sets a floating object's vertical position relative to an element specified by the verticalPositionType property. - * Value: An integer value specifying the position. + * Value: An integer value specifying the position in twips. */ verticalAbsolutePosition: number; /** @@ -13533,7 +14427,7 @@ interface FloatingObjectAbsolutePositionSettings { interface FloatingObjectRelativePositionSettings { /** * Gets or sets the horizontal distance between the edge of a floating object and the element specified by the horizontalRelativePosition property - * Value: An integer value specifying the horizontal position. + * Value: An integer value specifying the horizontal position in twips. */ horizontalRelativePosition: number; /** @@ -13543,7 +14437,7 @@ interface FloatingObjectRelativePositionSettings { horizontalPositionType: any; /** * Gets or sets the horizontal distance between the edge of a floating object and the element specified by the verticalRelativePosition property - * Value: An integer value specifying the vertical position. + * Value: An integer value specifying the vertical position in twips. */ verticalRelativePosition: number; /** @@ -13568,22 +14462,22 @@ interface FloatingObjectTextWrappingSettings { floatingObjectTextWrapSide: any; /** * Gets or sets the left offset of text wrapping. - * Value: An integer value specifying the left offset. + * Value: An integer value specifying the left offset in twips. */ leftDistance: number; /** * Gets or sets the right offset of text wrapping. - * Value: An integer value specifying the right offset. + * Value: An integer value specifying the right offset in twips. */ rightDistance: number; /** * Gets or sets the top offset of text wrapping. - * Value: An integer value specifying the top offset. + * Value: An integer value specifying the top offset in twips. */ topDistance: number; /** * Gets or sets the bottom offset of text wrapping. - * Value: An integer value specifying the bottom offset. + * Value: An integer value specifying the bottom offset in twips. */ bottomDistance: number; } @@ -13593,12 +14487,12 @@ interface FloatingObjectTextWrappingSettings { interface FloatingObjectAbsoluteSizeSettings { /** * Gets or sets a floating object's absolute width. - * Value: An integer value specifying the width. + * Value: An integer value specifying the width in twips. */ absoluteWidth: number; /** * Gets or sets a floating object's absolute height. - * Value: An integer value specifying the height. + * Value: An integer value specifying the height in twips. */ absoluteHeight: number; } @@ -13710,6 +14604,16 @@ interface RedoCommand extends CommandWithSimpleStateBase { */ execute(): boolean; } +/** + * A command to add an HTML formatted content in place of a selected range. + */ +interface InsertHtmlCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertHtmlCommand 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 html A string that specifies the inserted HTML code. + */ + execute(html: string): boolean; +} /** * A command to invoke the Hyperlink dialog. */ @@ -13725,7 +14629,7 @@ interface OpenInsertHyperlinkDialogCommand extends CommandWithSimpleStateBase { interface InsertHyperlinkCommand extends CommandBase { /** * Executes the InsertHyperlinkCommand 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 settings A HyperLinkSettings object specifying hyperlink settings. + * @param settings A HyperlinkSettings object specifying hyperlink settings. */ execute(settings: HyperlinkSettings): boolean; /** @@ -14204,8 +15108,8 @@ interface ChangePictureScaleCommand extends CommandBase { execute(scale: Scale): boolean; /** * Executes the ChangePictureScaleCommand command by applying the specified settings. 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 x An interger number specifying width of the picture - * @param y An interger number specifying height of the picture + * @param x An integer number specifying the scaling value for the width of the picture as a percentage. + * @param y An integer number specifying the scaling value for the height of the picture as a percentage. */ execute(x: number, y: number): boolean; /** @@ -14229,7 +15133,7 @@ interface MoveContentCommand extends CommandWithSimpleStateBase { interface CopyContentCommand extends CommandWithSimpleStateBase { /** * Executes the CopyContentCommand 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 position An integer number value specifying position for pasting selected text. + * @param position An integer value specifying a position of the inserted text. */ execute(position: number): boolean; } @@ -14242,6 +15146,15 @@ interface InsertTabCommand extends CommandWithSimpleStateBase { */ execute(): boolean; } +/** + * A command to add a non-breaking space in place of a selected range. + */ +interface InsertNonBreakingSpaceCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertNonBreakingSpaceCommand 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; +} /** * Defines the scaling settings. */ @@ -14263,10 +15176,10 @@ interface Scale { interface ChangePageMarginsCommand extends CommandBase { /** * Executes the ChangePageMarginsCommand command by applying the specified settings. 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 left An integer number specifying left margin of the page. - * @param top An integer number specifying top margin of the page. - * @param right An integer number specifying right margin of the page. - * @param bottom An integer number specifying bottom margin of the page. + * @param left An integer number specifying left margin of the page in twips. + * @param top An integer number specifying top margin of the page in twips. + * @param right An integer number specifying right margin of the page in twips. + * @param bottom An integer number specifying bottom margin of the page in twips. */ execute(left: number, top: number, right: number, bottom: number): boolean; /** @@ -14326,8 +15239,8 @@ interface SetPageSizeDialogCommand extends CommandWithSimpleStateBase { interface ChangePageSizeCommand extends CommandBase { /** * Executes the ChangePageSizeCommand command by applying the specified settings. 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 width An integer number specifying width of the page. - * @param height An integer number specifying height of the page. + * @param width An integer number specifying width of the page in twips. + * @param height An integer number specifying height of the page in twips. */ execute(width: number, height: number): boolean; /** @@ -14383,7 +15296,7 @@ interface ChangeSectionColumnsCommand extends CommandBase { interface ChangePageColorCommand extends CommandBase { /** * Executes the ChangePageColorCommand 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 color A string specifying a background color the page. May be specified as a color name or a hex color value. + * @param color A string specifying a background color of all pages contained in the document. May be specified as a color name or a hex color value. */ execute(color: string): boolean; /** @@ -14497,12 +15410,12 @@ interface CloseHeaderFooterCommand extends CommandWithSimpleStateBase { interface SectionColumn { /** * Gets or sets the width of the section column. - * Value: An integer value specifying the section column width. + * Value: An integer value specifying the section column width in twips. */ width: number; /** * Gets or sets the amount of space between adjacent section columns. - * Value: An integer value specifying the spacing between section columns. + * Value: An integer value specifying the spacing after a column in twips. */ spacing: number; } @@ -14511,12 +15424,12 @@ interface SectionColumn { */ interface Size { /** - * Gets or sets the width value. + * Gets or sets the width value in twips. * Value: An integer value specifying the width. */ width: number; /** - * Gets or sets the height value. + * Gets or sets the height value in twips. * Value: An integer value specifying the height. */ height: number; @@ -14527,22 +15440,22 @@ interface Size { interface Margins { /** * Gets or sets the left margin. - * Value: An integer value specifying the left margin. + * Value: An integer value specifying the left margin in twips. */ left: number; /** * Gets or sets the top margin. - * Value: An integer value specifying the top margin. + * Value: An integer value specifying the top margin in twips. */ top: number; /** * Gets or sets the right margin. - * Value: An integer value specifying the right margin. + * Value: An integer value specifying the right margin in twips. */ right: number; /** * Gets or sets the bottom margin. - * Value: An integer value specifying the bottom margin. + * Value: An integer value specifying the bottom margin in twips. */ bottom: number; } @@ -14829,17 +15742,17 @@ interface ParagraphFormattingSettings { */ outlineLevel: number; /** - * Gets or sets the right indent value for the specified paragraph. + * Gets or sets the right indent value for the specified paragraph (in twips). * Value: An integer value specifying the right indent. */ rightIndent: number; /** - * Gets or sets the spacing before the current paragraph. + * Gets or sets the spacing before each selected paragraph (in twips). * Value: An integer value specifying the spacing before the paragraph. */ spacingBefore: number; /** - * Gets or sets the spacing after the current paragraph. + * Gets or sets the spacing after each selected paragraph (in twips). * Value: An integer value specifying the spacing after the paragraph. */ spacingAfter: number; @@ -14854,7 +15767,7 @@ interface ParagraphFormattingSettings { */ firstLineIndentType: any; /** - * Gets or sets a value specifying the indent of the first line of a paragraph. + * Gets or sets a value specifying the indent of the first line of a paragraph (in twips). * Value: An integer value specifying the indent of the first line. */ firstLineIndent: number; @@ -14874,12 +15787,12 @@ interface ParagraphFormattingSettings { */ pageBreakBefore: boolean; /** - * Gets or sets the left indent for text within a paragraph. + * Gets or sets the left indent for text within a paragraph (in twips). * Value: An integer value specifying the left indent. */ leftIndent: number; /** - * Gets or sets a line spacing value. + * Gets or sets a line spacing value (in twips). * Value: An integer value specifying the line spacing. */ lineSpacing: number; @@ -14914,10 +15827,10 @@ declare enum ParagraphFirstLineIndent { interface AssignShortcutCommand extends CommandWithSimpleStateBase { /** * Executes the AssignShortcutCommand command by applying the specified settings. 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 keyCode An integer value specifying the code uniquely identifying the key combination. - * @param callback A callback function to execute on pressing the shortcut. + * @param keyCode A specifically generated code that uniquely identifies the combination of keys specified for a shortcut. This code is specified using the GetShortcutCode method. + * @param callback A callback function to execute when a shortcut is activated. */ - execute(keyCode: number, callback: (arg1: string) => void): boolean; + execute(keyCode: number, callback: Function): boolean; } /** * A command to invoke the Spelling dialog window. @@ -15529,7 +16442,7 @@ interface TableBorderSettings { */ color: string; /** - * Gets or sets the border line width. + * Gets or sets the border line width in twips. * Value: An integer value defining the border line width. */ width: number; @@ -15752,22 +16665,22 @@ interface TableCellFormattingSettings { */ noWrap: boolean; /** - * Gets or sets a table cell's left margin. + * Gets or sets a table cell's left margin in twips. * Value: An integer value specifying the left margin. */ marginLeft: number; /** - * Gets or sets a table cell's right margin. + * Gets or sets a table cell's right margin in twips. * Value: An integer value specifying the right margin. */ marginRight: number; /** - * Gets or sets a table cell's top margin. + * Gets or sets a table cell's top margin in twips. * Value: An integer value specifying the top margin. */ marginTop: number; /** - * Gets or sets a table cell's bottom margin. + * Gets or sets a table cell's bottom margin in twips. * Value: An integer value specifying the bottom margin. */ marginBottom: number; @@ -15798,12 +16711,12 @@ interface TableFormattingSettings { */ alignment: any; /** - * Gets or sets the table's left indent. + * Gets or sets the table's left indent in twips. * Value: An integer value specifying the indent. */ indent: number; /** - * Gets or sets the spacing between table cells. + * Gets or sets the spacing between table cells in twips. * Value: An integer value specifying the spacing. */ spacingBetweenCells: number; @@ -15818,22 +16731,22 @@ interface TableFormattingSettings { */ resizeToFitContent: boolean; /** - * Gets or sets the default left margin for cells in the table. + * Gets or sets the default left margin for cells in the table in twips. * Value: An integer value specifying the margin value. */ defaultCellMarginLeft: number; /** - * Gets or sets the default right margin for cells in the table. + * Gets or sets the default right margin for cells in the table in twips. * Value: An integer value specifying the margin value. */ defaultCellMarginRight: number; /** - * Gets or sets the default top margin for cells in the table. + * Gets or sets the default top margin for cells in the table in twips. * Value: An integer value specifying the margin value. */ defaultCellMarginTop: number; /** - * Gets or sets the default bottom margin for cells in the table. + * Gets or sets the default bottom margin for cells in the table in twips. * Value: An integer value specifying the margin value. */ defaultCellMarginBottom: number; @@ -15843,7 +16756,7 @@ interface TableFormattingSettings { */ interface TableWidthUnit { /** - * Gets or sets the table width value. + * Gets or sets the table width value in twips. * Value: An integer value specifying the table width. */ value: number; @@ -15858,7 +16771,7 @@ interface TableWidthUnit { */ interface TableHeightUnit { /** - * Gets or sets the table height value. + * Gets or sets the table height value in twips. * Value: An integer value specifying the table height. */ value: number; @@ -15907,7 +16820,7 @@ interface ChangeFontNameCommand extends CommandBase { interface ChangeFontSizeCommand extends CommandBase { /** * Executes the ChangeFontSizeCommand 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 fontSize An integer number specifying the font size. + * @param fontSize An integer number specifying the font size in points. */ execute(fontSize: number): boolean; /** @@ -16161,7 +17074,7 @@ interface FontFormattingSettings { */ fontName: string; /** - * Gets or sets the character(s) font size. + * Gets or sets the character(s) font size (in points). * Value: An integer value specifying the font size. */ size: number; @@ -16197,7 +17110,7 @@ interface FontFormattingSettings { italic: boolean; /** * Gets or sets a value specifying whether the strikeout formatting is applied to a character(s). - * Value: true if the strikeout formatting is applied; otherwise, false. + * Value: true, if the strikeout formatting is applied; otherwise, false. */ strikeout: boolean; /** @@ -16972,7 +17885,7 @@ interface YearlyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAcce GetWeekOfMonth(): ASPxClientWeekOfMonth; } /** - * Provides base functionality for ASPxClientScheduler's forms. + * Provides base functionality for the ASPxClientScheduler's forms. */ interface ASPxClientFormBase { /** @@ -17201,6 +18114,10 @@ interface ASPxClientScheduler extends ASPxClientControl { * Client-side event that fires before an appointment is deleted. */ AppointmentDeleting: ASPxClientEvent>; + /** + * Fires on the client side before the appointment tooltip is shown. + */ + AppointmentToolTipShowing: ASPxClientEvent>; /** * Client-side scripting method that gets the active View. */ @@ -17265,6 +18182,24 @@ interface ASPxClientScheduler extends ASPxClientControl { * Client-side function that returns the time interval, selected in the scheduler. */ GetSelectedInterval(): ASPxClientTimeInterval; + /** + * Selects time cells which encompass the specified time interval on the client side. + * @param interval An ASPxClientTimeInterval object that specifies the time interval to select. + */ + SetSelection(interval: ASPxClientTimeInterval): void; + /** + * Selects time cells which encompass the specified time interval on the client side. + * @param interval An ASPxClientTimeInterval object that specifies the time interval to select. + * @param resourceId An integer value specifying the ID of the resource to which the specified time interval belongs. + */ + SetSelection(interval: ASPxClientTimeInterval, resourceId: string): void; + /** + * Selects time cells which encompass the specified time interval on the client side. + * @param interval An ASPxClientTimeInterval object that specifies the time interval to select. + * @param resourceId An integer value specifying the ID of the resource to which the specified time interval belongs. + * @param scrollToSelection true, to scroll the scheduler's contents to make the selection visible; otherwise, false. + */ + SetSelection(interval: ASPxClientTimeInterval, resourceId: string, scrollToSelection: boolean): void; /** * Client-side function that returns the ResourceId of selected time cell's resource. */ @@ -17292,6 +18227,12 @@ interface ASPxClientScheduler extends ASPxClientControl { * @param aptId An appointment's identifier. */ SelectAppointmentById(aptId: Object): void; + /** + * Selects the appointment with the specified ID. + * @param aptId An integer value specifying the appointment ID. + * @param scrollToSelection true, to scroll to the selected appointment; otherwise, false. + */ + SelectAppointmentById(aptId: Object, scrollToSelection: boolean): void; /** * Enables obtaining appointment property values in a client-side script. Executes the callback command with the AppointmentData identifier. * @param aptId An integer, representing the appointment ID. @@ -17439,6 +18380,42 @@ interface ASPxClientScheduler extends ASPxClientControl { * Client-side scripting method that changes the alert time for the selected reminder to the specified interval. */ ReminderFormSnooze(): void; + /** + * Specifies whether the toolbar is visible. + * @param visible true, to make the toolbar visible; otherwise, false. + */ + SetToolbarVisible(visible: boolean): void; + /** + * Returns a value specifying whether a toolbar is displayed. + */ + GetToolbarVisible(): boolean; + /** + * Specifies whether the Resource Navigator is visible. + * @param visible true, to make the Resource Navigator visible; otherwise, false. + */ + SetResourceNavigatorVisible(visible: boolean): void; + /** + * Returns a value specifying whether the Resource Navigator is displayed. + */ + GetResourceNavigatorVisible(): boolean; + /** + * Returns the value specifying the Scheduler's scrollable area height. + */ + GetScrollAreaHeight(): number; + /** + * Specifies the All-Day Area area height. + * @param height An integer value specifying the all-day area height. + */ + SetAllDayAreaHeight(height: number): void; + /** + * Gets the All-Day Area area height. + */ + GetAllDayAreaHeight(): number; + /** + * Sets the Scheduler's height. + * @param height An integer value specifying the scheduler's height. + */ + SetHeight(height: number): void; } /** * Represents a client-side equivalent of the SchedulerViewType object. @@ -17923,6 +18900,27 @@ interface CellClickEventArgs extends ASPxClientEventArgs { */ resource: string; } +/** + * A method that will handle the client AppointmentToolTipShowing event. + */ +interface ASPxClientAppointmentToolTipShowingEventHandler { + /** + * A method that will handle the corresponding client event. + * @param source The event source. + * @param e An ASPxClientAppointmentToolTipShowingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientAppointmentToolTipShowingEventArgs): void; +} +/** + * Provides data for the AppointmentToolTipShowing event. + */ +interface ASPxClientAppointmentToolTipShowingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the appointment. + * Value: An ASPxClientAppointment object representing the appointment. + */ + appointment: ASPxClientAppointment; +} /** * Contains information about a client tooltip. */ @@ -17968,13 +18966,13 @@ interface ASPxClientToolTipBase { */ CalculatePosition(bounds: Object): ASPxClientPoint; /** - * Displays the Appointment Menu in the position of the tooltip. - * @param eventObject An object containing information about the event on which the menu is displayed. + * Displays the Appointment Menu at the position of the tooltip. + * @param eventObject An object containing information about the event in which the menu is displayed. */ ShowAppointmentMenu(eventObject: Object): void; /** - * Displays the View Menu in the position of the tooltip. - * @param eventObject An object containing information about the event on which the menu is displayed. + * Displays the View Menu at the position of the tooltip. + * @param eventObject An object containing information about the event in which the menu is displayed. */ ShowViewMenu(eventObject: Object): void; /** @@ -18579,6 +19577,20 @@ interface ASPxClientTreeList extends ASPxClientControl { * Occurs after a column's width has been changed by an end-user. */ ColumnResized: ASPxClientEvent>; + /** + * Hides the Filter Control. + */ + CloseFilterControl(): void; + /** + * Enables or disables the current filter. + * @param isFilterEnabled true to enable the current filter; otherwise, false. + */ + SetFilterEnabled(isFilterEnabled: boolean): void; + /** + * Specifies a custom editor for the search panel on the client side. + * @param editor An ASPxClientEdit object representing a custom editor. + */ + SetSearchPanelCustomEditor(editor: ASPxClientEdit): void; /** * Sets input focus to the ASPxTreeList. */ @@ -18973,6 +19985,66 @@ interface ASPxClientTreeList extends ASPxClientControl { * @param position An integer value specifying the horizontal scroll position. */ SetHorizontalScrollPosition(position: number): void; + /** + * Exports tree list data to a file in the specified format. + * @param format An ASPxClientTreeListExportFormat object specifying the export format. + */ + ExportTo(format: ASPxClientTreeListExportFormat): void; + /** + * Applies the specified filter expression to the tree list. + * @param filterExpression A string value that specifies the filter expression. + */ + ApplyFilter(filterExpression: string): void; + /** + * Clears the filter expression applied to a client Tree List. + */ + ClearFilter(): void; + /** + * Applies a filter specified in the filter row to the ASPxTreeList. + */ + ApplyOnClickRowFilter(): void; + /** + * Applies the specified search panel filter criterion to tree list data. + * @param value A string value that specifies the filter criterion. + */ + ApplySearchPanelFilter(value: string): void; + /** + * Returns the editor used to edit the value in the auto filter row for the specified data column. + * @param column An ASPxClientTreeListColumn object that represents the data column within the ASPxTreeList. + */ + GetAutoFilterEditor(column: ASPxClientTreeListColumn): Object; + /** + * Returns the editor used to edit the value in the auto filter row for the specified data column. + * @param columnIndex An integer value that identifies the data column by its index. + */ + GetAutoFilterEditor(columnIndex: number): Object; + /** + * Returns the editor used to edit the value in the auto filter row for the specified data column. + * @param columnFieldNameOrId A string value that specifies the column's name or its data base field name. + */ + GetAutoFilterEditor(columnFieldNameOrId: string): Object; + /** + * Applies a filter to the specified data column. + * @param column An ASPxClientTreeListColumn object that represents the data column within the client Tree List. + * @param val A string value that specifies the filter expression. + */ + AutoFilterByColumn(column: ASPxClientTreeListColumn, val: string): void; + /** + * Applies a filter to the specified data column. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param val A string value that specifies the filter expression. + */ + AutoFilterByColumn(columnIndex: number, val: string): void; + /** + * Applies a filter to the specified data column. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param val A string value that specifies the filter expression. + */ + AutoFilterByColumn(columnFieldNameOrId: string, val: string): void; + /** + * Displays the Filter Control. + */ + ShowFilterControl(): void; } /** * Represents a client column. @@ -18994,6 +20066,11 @@ interface ASPxClientTreeListColumn { */ fieldName: string; } +/** + * Lists values that specify the document formats available for export from the tree list. + */ +interface ASPxClientTreeListExportFormat { +} /** * Provides data for the CustomDataCallback event. */ @@ -19227,8 +20304,8 @@ interface ASPxClientTreeListToolbarItemClickEventArgs extends ASPxClientProcessi */ toolbarName: string; /** - * Gets the toolbar item related to the event. - * Value: An ASPxClientMenuItem object that is the toolbar item. + * Gets the clicked menu item + * Value: An ASPxClientMenu value that is the menu item. */ item: ASPxClientMenuItem; /** @@ -19252,7 +20329,241 @@ interface ASPxClientTreeListToolbarItemClickEventHandler { * Represents a client-side equivalent of the BootstrapAccordion control. */ interface BootstrapClientAccordion extends ASPxClientNavBar { + /** + * Returns a group specified by its index. + * @param index An integer value specifying the zero-based index of the group object to retrieve. + */ + GetGroup(index: number): BootstrapClientAccordionGroup; + /** + * Returns a group specified by its name. + * @param name A string value specifying the name of the group. + */ + GetGroupByName(name: string): BootstrapClientAccordionGroup; + /** + * Returns the Accordion control's active group. + */ + GetActiveGroup(): BootstrapClientAccordionGroup; + /** + * Makes the specified group active. + * @param group A BootstrapClientAccordionGroup object that specifies the active group. + */ + SetActiveGroup(group: BootstrapClientAccordionGroup): void; + /** + * Returns an item specified by its name. + * @param name A string value specifying the name of the item. + */ + GetItemByName(name: string): BootstrapClientAccordionItem; + /** + * Returns the selected item within the Accordion control. + */ + GetSelectedItem(): BootstrapClientAccordionItem; + /** + * Selects the specified item within the Accordion control on the client side. + * @param item A BootstrapClientAccordionItem object specifying the item to select. + */ + SetSelectedItem(item: BootstrapClientAccordionItem): void; + /** + * Makes the specified group active. + * @param group A ASPxClientNavBarGroup object that specifies the active group. + */ + SetActiveGroup(group: ASPxClientNavBarGroup): void; + /** + * Selects the specified item within the navbar control on the client side. + * @param item An ASPxClientNavBarItem object specifying the item to select. + */ + SetSelectedItem(item: ASPxClientNavBarItem): void; } +/** + * Represents a client-side equivalent of the Accordion's BootstrapAccordionGroup object. + */ +interface BootstrapClientAccordionGroup extends ASPxClientNavBarGroup { + /** + * Gets the BootstrapClientAccordion object to which the current group belongs. + * Value: A object that is the group's owner. + */ + navBar: BootstrapClientAccordion; + /** + * Returns the group's item specified by its index. + * @param index An integer value specifying the zero-based index of the item to be retrieved. + */ + GetItem(index: number): BootstrapClientAccordionItem; + /** + * Returns a group item specified by its name. + * @param name A string value specifying the name of the item. + */ + GetItemByName(name: string): BootstrapClientAccordionItem; + /** + * Gets the text displayed within an accordion group header badge. + */ + GetHeaderBadgeText(): string; + /** + * Sets the text displayed within an accordion group header badge. + * @param text A String specifying the badge text. + */ + SetHeaderBadgeText(text: string): void; + /** + * Gets the CSS class of the icon displayed within an accordion group header badge. + */ + GetHeaderBadgeIconCssClass(): string; + /** + * Sets the CSS class of the icon displayed within an accordion group header badge. + * @param cssClass A String containing the name of a CSS class. + */ + SetHeaderBadgeIconCssClass(cssClass: string): void; +} +/** + * Represents a client-side equivalent of the Accordion's BootstrapAccordionItem object. + */ +interface BootstrapClientAccordionItem extends ASPxClientNavBarItem { + /** + * Gets the BootstrapClientAccordion object to which the current item belongs. + * Value: A object that is the item's owner. + */ + navBar: BootstrapClientAccordion; + /** + * Gets the group to which the current item belongs. + * Value: A object representing the group to which the item belongs. + */ + group: BootstrapClientAccordionGroup; + /** + * Gets the text displayed within the accordion item badge. + */ + GetBadgeText(): string; + /** + * Sets the text displayed within the accordion item badge. + * @param text A String specifying the badge text. + */ + SetBadgeText(text: string): void; + /** + * Gets the CSS class of the icon displayed within the accordion item badge. + */ + GetBadgeIconCssClass(): string; + /** + * Sets the CSS class of the icon displayed within the accordion item badge. + * @param cssClass A string containing the name of a CSS class. + */ + SetBadgeIconCssClass(cssClass: string): void; + /** + * Specifies the URL which points to the image displayed within the item. + */ + GetImageUrl(): string; + /** + * Specifies the URL which points to the image displayed within the item. + * @param value + */ + SetImageUrl(value: string): void; + /** + * Gets the CSS class of the icon displayed by the Accordion item. + */ + GetIconCssClass(): string; + /** + * Sets the CSS class of the icon displayed by the Accordion item. + * @param cssClass A string containing the name of a CSS class. + */ + SetIconCssClass(cssClass: string): void; +} +/** + * A method that will handle the Accordion control's client events concerning manipulations with an item. + */ +interface BootstrapClientAccordionItemEventHandler { + /** + * A method that will handle the Accordion control's client events concerning manipulations with an item. + * @param source An object representing the event source. Identifies the BootstrapClientAccordion control that raised the event. + * @param e An BootstrapClientAccordionItemEventArgs object that contains event data. + */ + (source: S, e: BootstrapClientAccordionItemEventArgs): void; +} +/** + * Provides data for events related to manipulations on items. + */ +interface BootstrapClientAccordionItemEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the item object related to the event. + * Value: A BootstrapClientAccordionItem object, manipulations on which forced the event to be raised. + */ + item: BootstrapClientAccordionItem; + /** + * Gets an HTML object that contains the processed Accordion item. + * Value: An HTML object. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: A DHTML event object. + */ + htmlEvent: Object; +} +/** + * A method that will handle the Accordion control's client events concerning manipulations with a group. + */ +interface BootstrapClientAccordionGroupEventHandler { + /** + * A method that will handle the Accordion control's client events concerning manipulations with a group. + * @param source An object representing the event source. Identifies the BootstrapClientAccordion control that raised the event. + * @param e An BootstrapClientAccordionGroupEventArgs object that contains event data. + */ + (source: S, e: BootstrapClientAccordionGroupEventArgs): void; +} +/** + * Provides data for events related to manipulations on groups. + */ +interface BootstrapClientAccordionGroupEventArgs extends ASPxClientEventArgs { + /** + * Gets the group object related to the event. + * Value: A BootstrapClientAccordionGroup object, manipulations on which forced the event to be raised. + */ + group: BootstrapClientAccordionGroup; +} +/** + * A method that will handle the Accordion control's cancelable client events concerning manipulations with a group. + */ +interface BootstrapClientAccordionGroupCancelEventHandler { + /** + * A method that will handle the Accordion control's cancelable client events concerning manipulations with a group. + * @param source An object representing the event source. Identifies the BootstrapClientAccordion control that raised the event. + * @param e An BootstrapClientAccordionGroupCancelEventArgs object that contains event data. + */ + (source: S, e: BootstrapClientAccordionGroupCancelEventArgs): void; +} +/** + * Provides data for events related to manipulations on accordion groups. + */ +interface BootstrapClientAccordionGroupCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets the group object related to the event. + * Value: A BootstrapClientAccordionGroup object, manipulations on which forced the event to be raised. + */ + group: BootstrapClientAccordionGroup; +} +/** + * A method that will handle the Accordion control's client events concerning clicks on groups. + */ +interface BootstrapClientAccordionGroupClickEventHandler { + /** + * A method that will handle the Accordion control's client events concerning clicks on groups. + * @param source An object representing the event source. Identifies the BootstrapClientAccordion control that raised the event. + * @param e An BootstrapClientAccordionGroupClickEventArgs object that contains event data. + */ + (source: S, e: BootstrapClientAccordionGroupClickEventArgs): void; +} +/** + * Provides data for events related to clicking on the control's group headers. + */ +interface BootstrapClientAccordionGroupClickEventArgs extends BootstrapClientAccordionGroupCancelEventArgs { + /** + * Gets an HTML object that contains the processed Accordion group. + * Value: An HTML object. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: A DHTML event object. + */ + htmlEvent: Object; +} +/** + * Represents the client-side equivalent of the BootstrapBinaryImage control. + */ interface BootstrapClientBinaryImage extends ASPxClientHyperLink { } /** @@ -19268,6 +20579,24 @@ interface BootstrapClientButton extends ASPxClientButton { * @param value A string value specifying the text to be displayed within the button. */ SetText(value: string): void; + /** + * Gets the text displayed within the button badge. + */ + GetBadgeText(): string; + /** + * Sets the text displayed within the button badge. + * @param text A String specifying the badge text. + */ + SetBadgeText(text: string): void; + /** + * Gets the CSS class of the icon displayed within the button badge. + */ + GetBadgeIconCssClass(): string; + /** + * Sets the CSS class of the icon displayed within the button badge. + * @param cssClass A string containing the name of a CSS class. + */ + SetBadgeIconCssClass(cssClass: string): void; } /** * Represents a client-side equivalent of the BootstrapCalendar control. @@ -19320,92 +20649,12 @@ interface BootstrapClientCallbackPanel extends ASPxClientControl { */ GetEnabled(): boolean; } -/** - * Serves as the base type for the BootstrapClientPieChart objects. - */ -interface BootstrapClientChartBase extends ASPxClientControl { - Done: ASPxClientEvent>; - LegendClick: ASPxClientEvent>; - PointClick: ASPxClientEvent>; - PointHoverChanged: ASPxClientEvent>; - PointSelectionChanged: ASPxClientEvent>; - TooltipHidden: ASPxClientEvent>; - TooltipShown: ASPxClientEvent>; - ArgumentAxisClick: ASPxClientEvent>; - SeriesClick: ASPxClientEvent>; - SeriesHoverChanged: ASPxClientEvent>; - SeriesSelectionChanged: ASPxClientEvent>; -} -/** - * Represents a client-side equivalent of the BootstrapChart control. - */ -interface BootstrapClientChart extends BootstrapClientChartBase { - ZoomStart: ASPxClientEvent>; - ZoomEnd: ASPxClientEvent>; -} -/** - * Represents a client-side equivalent of the BootstrapPolarChart control. - */ -interface BootstrapClientPolarChart extends BootstrapClientChartBase { -} -/** - * Represents a client-side equivalent of the BootstrapPieChart control. - */ -interface BootstrapClientPieChart extends BootstrapClientChartBase { -} -interface BootstrapClientChartBaseDoneEventHandler { - (source: S, e: BootstrapUIWidgetEventArgsBase): void; -} -interface BootstrapClientChartBaseLegendClickEventHandler { - (source: S, e: BootstrapUIWidgetElementClickEventArgs): void; -} -interface BootstrapClientCoordinateSystemChartArgumentAxisClickEventHandler { - (source: S, e: BootstrapUIWidgetElementClickEventArgs): void; -} -interface BootstrapClientChartBasePointClickEventHandler { - (source: S, e: BootstrapUIWidgetElementClickEventArgs): void; -} -interface BootstrapClientChartBasePointHoverChangedEventHandler { - (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; -} -interface BootstrapClientChartBasePointSelectionChangedEventHandler { - (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; -} -interface BootstrapClientChartBaseTooltipHiddenEventHandler { - (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; -} -interface BootstrapClientChartBaseTooltipShownEventHandler { - (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; -} -interface BootstrapClientCoordinateSystemChartSeriesClickEventHandler { - (source: S, e: BootstrapUIWidgetElementClickEventArgs): void; -} -interface BootstrapClientCoordinateSystemChartSeriesHoverChangedEventHandler { - (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; -} -interface BootstrapClientCoordinateSystemChartSeriesSelectionChangedEventHandler { - (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; -} -interface BootstrapClientChartZoomStartEventHandler { - (source: S, e: BootstrapUIWidgetEventArgsBase): void; -} -interface BootstrapClientChartZoomEndEventHandler { - (source: S, e: BootstrapClientChartZoomEndEventArgs): void; -} -interface BootstrapUIWidgetEventArgsBase extends ASPxClientEventArgs { - component: Object; - element: Object; -} -interface BootstrapClientChartZoomEndEventArgs extends BootstrapUIWidgetEventArgsBase { - rangeStart: Object; - rangeEnd: Object; -} /** * Represents a client-side equivalent of the BootstrapCheckBox control. */ interface BootstrapClientCheckBox extends ASPxClientEdit { /** - * Occurs on the client side when the editor's checked state is changed. + * Occurs on the client side when the editor's checked state has been changed. */ CheckedChanged: ASPxClientEvent>; /** @@ -19414,7 +20663,7 @@ interface BootstrapClientCheckBox extends ASPxClientEdit { GetChecked(): boolean; /** * Sets a value which specifies the checked status of the check box editor. - * @param isChecked + * @param isChecked true if the check box editor is checked; otherwise, false. */ SetChecked(isChecked: boolean): void; /** @@ -19427,12 +20676,12 @@ interface BootstrapClientCheckBox extends ASPxClientEdit { GetCheckState(): string; /** * Sets a value specifying the state of a check box. - * @param checkState + * @param checkState A string value matches one of the CheckState enumeration values. */ SetCheckState(checkState: string): void; /** * Sets the text to be displayed within the editor. - * @param text + * @param text A string value specifying the text to be displayed within the editor. */ SetText(text: string): void; } @@ -19450,103 +20699,125 @@ interface BootstrapClientComboBox extends ASPxClientComboBox { */ GetSelectedItem(): BootstrapClientListBoxItem; /** - * Sets the combo box editor's selected item. - * @param item + * Sets the list editor's selected item. + * @param item A BootstrapClientListBoxItem object that specifies the item to select. */ SetSelectedItem(item: BootstrapClientListBoxItem): void; /** * Returns an item specified by its index within the combo box editor's item collection. - * @param index + * @param index An integer value specifying the zero-based index of the item to search for. */ GetItem(index: number): BootstrapClientListBoxItem; /** * Returns a combo box item by its text. - * @param text + * @param text A string that specifies the item's text. */ FindItemByText(text: string): BootstrapClientListBoxItem; /** * Returns a combo box item by its value. - * @param value + * @param value An object that specifies the item's value. */ FindItemByValue(value: Object): BootstrapClientListBoxItem; /** - * Adds a new item to the editor, specifying the item's display text, and returns the index of the added item. + * Adds a new item to the end of the editor's items collection, specifying the item's display text, and returns the index of the added item. * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding fields within the editor's Fields collection. */ AddItem(texts: string[]): number; /** * Adds a new item to the end of the control's items collection. - * @param texts - * @param value + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding fields within the editor's Fields collection. + * @param value An object that represents the item's associated value. */ AddItem(texts: string[], value: Object): number; /** * Adds a new item to the end of the control's items collection. - * @param texts - * @param value - * @param iconCssClass + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding fields within the editor's Fields collection. + * @param value An object that represents the item's associated value. + * @param iconCssClass A String value specifying the CSS class of the image displayed by the list item. */ AddItem(texts: string[], value: Object, iconCssClass: string): number; /** - * Adds a new item to the editor specifying the item's display text and returns the index of the added item. - * @param text + * Adds a new item to the editor, specifying the item's display text, and returns the index of the added item. + * @param text A string value specifying the item's display text. */ AddItem(text: string): number; /** - * Adds a new item to the editor specifying the item's display text and associated value, and returns the index of the added item. - * @param text - * @param value + * Adds a new item to the editor, specifying the item's display text and associated value, and returns the index of the added item. + * @param text A string value specifying the item's display text. + * @param value An object that represents the item's associated value. */ AddItem(text: string, value: Object): number; /** - * Adds a new item to the editor specifying the item's display text, associated value and displayed image, and returns the index of the added item. - * @param text - * @param value - * @param iconCssClass + * Adds a new item to the editor, specifying the item's display text, associated value and displayed image, and returns the index of the added item. + * @param text A string value specifying the item's display text. + * @param value An object that represents the item's associated value. + * @param iconCssClass A String value specifying the CSS class of the image displayed by the list item. */ AddItem(text: string, value: Object, iconCssClass: string): number; /** - * Adds a new item to the control's items collection at the specified index. - * @param index - * @param texts - * @param value - * @param iconCssClass + * Inserts a new item into the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding field within the editor's Fields collection. + * @param value An object that represents the item's associated value. + * @param iconCssClass A String value specifying the CSS class of the image displayed by the list item. */ InsertItem(index: number, texts: string[], value: Object, iconCssClass: string): void; /** - * Adds a new item to the control's items collection at the specified index. - * @param index - * @param texts - * @param value + * Inserts a new item into the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding fields within the editor's Fields collection. + * @param value An object that represents the item's associated value. */ InsertItem(index: number, texts: string[], value: Object): void; /** - * Adds a new item to the control's items collection at the specified index. - * @param index - * @param texts + * Inserts a new item into the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding fields within the editor's Fields collection. */ InsertItem(index: number, texts: string[]): void; /** - * Adds a new item to the control's items collection at the specified index. - * @param index - * @param text - * @param value - * @param iconCssClass + * Inserts a new item specified by its display text, associated value and displayed image into the editor's item collection, at the position specified. + * @param index An integer value that represents the index position. + * @param text A string value specifying the item's display text. + * @param value An object that represents the item's associated value. + * @param iconCssClass A String value specifying the CSS class of the image displayed by the list item. */ InsertItem(index: number, text: string, value: Object, iconCssClass: string): void; /** - * Inserts a new item specified by its display text and associated value into the editor's item collection, at the position specified. - * @param index - * @param text - * @param value + * Inserts a new item specified by its display text, associated value and displayed image into the editor's item collection, at the position specified. + * @param index An integer value that represents the index position. + * @param text A string value specifying the item's display text. + * @param value An object that represents the item's associated value. */ InsertItem(index: number, text: string, value: Object): void; /** - * Inserts a new item specified by its display text into the editor's item collection, at the position specified. - * @param index - * @param text + * Inserts a new item into the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param text A string value specifying the item's display text. */ InsertItem(index: number, text: string): void; + /** + * Gets the text displayed within a Combo Box item badge. + * @param index The index of a Combo Box item. + */ + GetItemBadgeText(index: number): string; + /** + * Sets the text displayed within a Combo Box item badge. + * @param index The index of a Combo Box item. + * @param text A String specifying the badge text. + */ + SetItemBadgeText(index: number, text: string): void; + /** + * Gets the CSS class of the icon displayed within a Combo Box item badge. + * @param index The index of a Combo Box item. + */ + GetItemBadgeIconCssClass(index: number): string; + /** + * Sets the CSS class of the icon displayed within a Combo Box item badge. + * @param index The index of a Combo Box item. + * @param cssClass A String containing the name of a CSS class. + */ + SetItemBadgeIconCssClass(index: number, cssClass: string): void; /** * Sets the list editor's selected item. * @param item An ASPxClientListEditItem object that specifies the item to select. @@ -19572,7 +20843,28 @@ interface BootstrapClientFormLayout extends ASPxClientFormLayout { * Represents a client-side equivalent of the BootstrapHyperLink control. */ interface BootstrapClientHyperLink extends ASPxClientHyperLink { + /** + * Gets the text displayed within the hyperlink badge. + */ + GetBadgeText(): string; + /** + * Sets the text displayed within the hyperlink badge. + * @param text A String specifying the badge text. + */ + SetBadgeText(text: string): void; + /** + * Gets the CSS class of the icon displayed within the hyperlink badge. + */ + GetBadgeIconCssClass(): string; + /** + * Sets the CSS class of the icon displayed within the hyperlink badge. + * @param cssClass A string containing the name of a CSS class. + */ + SetBadgeIconCssClass(cssClass: string): void; } +/** + * Represents the client-side equivalent of the BootstrapImage control. + */ interface BootstrapClientImage extends ASPxClientImage { } /** @@ -19583,6 +20875,10 @@ interface BootstrapClientListBoxItem extends ASPxClientListEditItem { * This member is not in effect for this class. It is overridden only for the purpose of preventing it from appearing in Microsoft Visual Studio designer tools. */ imageUrl: string; + /** + * Gets the CSS class of the icon displayed by the list box item. + * Value: A string containing the name of a CSS class. + */ iconCssClass: string; /** * @@ -19595,13 +20891,13 @@ interface BootstrapClientListBoxItem extends ASPxClientListEditItem { */ GetColumnText(columnName: string): string; /** - * - * @param fieldIndex + * Returns the list item's text value that corresponds to a data field specified by its index. + * @param fieldIndex An integer value that specifies the field's index within the editor's Fields collection. */ GetFieldText(fieldIndex: number): string; /** - * - * @param fieldName + * Returns the list item's text value that corresponds to a data field specified by its name. + * @param fieldName A string value that specifies the data field's name defined via a FieldName property. */ GetFieldText(fieldName: string): string; } @@ -19610,17 +20906,17 @@ interface BootstrapClientListBoxItem extends ASPxClientListEditItem { */ interface BootstrapClientListBox extends ASPxClientListBox { /** - * Returns the list box editor's selected item. + * Returns the list editor's selected item. */ GetSelectedItem(): BootstrapClientListBoxItem; /** - * Sets the list box editor's selected item. - * @param item + * Sets the list editor's selected item. + * @param item A BootstrapClientListBoxItem object that specifies the item to select. */ SetSelectedItem(item: BootstrapClientListBoxItem): void; /** * Returns an item specified by its index within the list box editor's item collection. - * @param index + * @param index An integer value specifying the zero-based index of the item to search for. */ GetItem(index: number): BootstrapClientListBoxItem; /** @@ -19629,102 +20925,124 @@ interface BootstrapClientListBox extends ASPxClientListBox { GetSelectedItems(): BootstrapClientListBoxItem[]; /** * Selects the specified items within a list box. - * @param items + * @param items An array of BootstrapClientListBoxItem objects that represent the items. */ SelectItems(items: BootstrapClientListBoxItem[]): void; /** * Unselects an array of the specified list box items. - * @param items + * @param items An array of BootstrapClientListBoxItem objects that represent the items. */ UnselectItems(items: BootstrapClientListBoxItem[]): void; /** * Returns a list box item by its text. - * @param text + * @param text A string that specifies the item's text. */ FindItemByText(text: string): BootstrapClientListBoxItem; /** * Returns a list box item by its value. - * @param value + * @param value An object that specifies the item's value. */ FindItemByValue(value: Object): BootstrapClientListBoxItem; /** * Adds a new item to the end of the editor's items collection, specifying the item's display text, and returns the index of the added item. - * @param texts + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding fields within the editor's Fields collection. */ AddItem(texts: string[]): number; /** * Adds a new item to the end of the control's items collection. - * @param texts - * @param value + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding fields within the editor's Fields collection. + * @param value An object that represents the item's associated value. */ AddItem(texts: string[], value: Object): number; /** * Adds a new item to the end of the control's items collection. - * @param texts - * @param value - * @param iconCssClass + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding fields within the editor's Fields collection. + * @param value An object that represents the item's associated value. + * @param iconCssClass A String value specifying the CSS class of the image displayed by the list item. */ AddItem(texts: string[], value: Object, iconCssClass: string): number; /** * Adds a new item to the editor, specifying the item's display text, and returns the index of the added item. - * @param text + * @param text A string value specifying the item's display text. */ AddItem(text: string): number; /** * Adds a new item to the editor, specifying the item's display text and associated value, and returns the index of the added item. - * @param text - * @param value + * @param text A string value specifying the item's display text. + * @param value An object that represents the item's associated value. */ AddItem(text: string, value: Object): number; /** * Adds a new item to the editor, specifying the item's display text, associated value and displayed image, and returns the index of the added item. - * @param text - * @param value - * @param iconCssClass + * @param text A string value specifying the item's display text. + * @param value An object that represents the item's associated value. + * @param iconCssClass A String value specifying the CSS class of the image displayed by the list item. */ AddItem(text: string, value: Object, iconCssClass: string): number; /** - * Adds a new item to the control's items collection at the specified index. - * @param index - * @param texts - * @param value - * @param iconCssClass + * Inserts a new item into the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding field within the editor's Fields collection. + * @param value An object that represents the item's associated value. + * @param iconCssClass A String value specifying the CSS class of the image displayed by the list item. */ InsertItem(index: number, texts: string[], value: Object, iconCssClass: string): void; /** - * Adds a new item to the control's items collection at the specified index. - * @param index - * @param texts - * @param value + * Inserts a new item into the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding fields within the editor's Fields collection. + * @param value An object that represents the item's associated value. */ InsertItem(index: number, texts: string[], value: Object): void; /** - * Adds a new item to the control's items collection at the specified index. - * @param index - * @param texts + * Inserts a new item into the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding fields within the editor's Fields collection. */ InsertItem(index: number, texts: string[]): void; /** * Inserts a new item specified by its display text, associated value and displayed image into the editor's item collection, at the position specified. - * @param index - * @param text - * @param value - * @param iconCssClass + * @param index An integer value that represents the index position. + * @param text A string value specifying the item's display text. + * @param value An object that represents the item's associated value. + * @param iconCssClass A String value specifying the CSS class of the image displayed by the list item. */ InsertItem(index: number, text: string, value: Object, iconCssClass: string): void; /** * Inserts a new item specified by its display text and associated value into the editor's item collection, at the position specified. - * @param index - * @param text - * @param value + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. */ InsertItem(index: number, text: string, value: Object): void; /** * Inserts a new item specified by its display text into the editor's item collection, at the position specified. - * @param index - * @param text + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. */ InsertItem(index: number, text: string): void; + /** + * Gets the text displayed within a List Box item badge. + * @param index The index of a List Box item. + */ + GetItemBadgeText(index: number): string; + /** + * Sets the text displayed within a List Box item badge. + * @param index The index of a List Box item. + * @param text A String specifying the badge text. + */ + SetItemBadgeText(index: number, text: string): void; + /** + * Gets the CSS class of the icon displayed within a List Box item badge. + * @param index The index of a List Box item. + */ + GetItemBadgeIconCssClass(index: number): string; + /** + * Sets the CSS class of the icon displayed within a List Box item badge. + * @param index The index of a List Box item. + * @param cssClass A String containing the name of a CSS class. + */ + SetItemBadgeIconCssClass(index: number, cssClass: string): void; /** * Selects the specified items within a list box. * @param items An array of ASPxClientListEditItem objects that represent the items. @@ -19751,10 +21069,162 @@ interface BootstrapClientCheckBoxList extends ASPxClientCheckBoxList { */ interface BootstrapClientRadioButtonList extends ASPxClientRadioButtonList { } +/** + * Represents a client-side equivalent of the menu's BootstrapMenuItem object. + */ +interface BootstrapClientMenuItem extends ASPxClientMenuItem { + /** + * Gets the immediate parent item to which the current item belongs. + * Value: A BootstrapClientMenuItem object representing the item's immediate parent. + */ + parent: BootstrapClientMenuItem; + /** + * Returns the current menu item's immediate subitem specified by its index. + * @param index An integer value specifying the zero-based index of the submenu item to be retrieved. + */ + GetItem(index: number): BootstrapClientMenuItem; + /** + * Returns the current menu item's subitem specified by its name. + * @param name A string value specifying the name of the menu item. + */ + GetItemByName(name: string): BootstrapClientMenuItem; + /** + * Gets the text displayed within the menu item badge. + */ + GetBadgeText(): string; + /** + * Sets the text displayed within the menu item badge. + * @param text A String specifying the badge text. + */ + SetBadgeText(text: string): void; + /** + * Gets the CSS class of the icon displayed within the menu item badge. + */ + GetBadgeIconCssClass(): string; + /** + * Sets the CSS class of the icon displayed within the menu item badge. + * @param cssClass A string containing the name of a CSS class. + */ + SetBadgeIconCssClass(cssClass: string): void; + /** + * Returns the URL pointing to the image displayed within the menu item. + */ + GetImageUrl(): string; + /** + * Sets the URL which points to the image displayed within the menu item. + * @param value + */ + SetImageUrl(value: string): void; + /** + * Gets the CSS class of the icon displayed by the menu item. + */ + GetIconCssClass(): string; + /** + * Sets the CSS class of the icon displayed by the menu item. + * @param cssClass A string containing the name of a CSS class. + */ + SetIconCssClass(cssClass: string): void; +} /** * Represents a client-side equivalent of the BootstrapMenu control. */ interface BootstrapClientMenu extends ASPxClientMenu { + /** + * Returns the menu's root menu item specified by its index. + * @param index An integer value specifying the zero-based index of the root menu item to be retrieved. + */ + GetItem(index: number): BootstrapClientMenuItem; + /** + * Returns a menu item specified by its name. + * @param name A string value specifying the name of the menu item. + */ + GetItemByName(name: string): BootstrapClientMenuItem; + /** + * Returns the selected item within the menu control. + */ + GetSelectedItem(): BootstrapClientMenuItem; + /** + * Selects the specified menu item within the Menu control on the client side. + * @param item A BootstrapClientMenuItem object specifying the menu item to select. + */ + SetSelectedItem(item: BootstrapClientMenuItem): void; + /** + * Returns a root menu item. + */ + GetRootItem(): BootstrapClientMenuItem; + /** + * Selects the specified menu item within a menu control on the client side. + * @param item An ASPxClientMenuItem object specifying the menu item to select. + */ + SetSelectedItem(item: ASPxClientMenuItem): void; +} +/** + * A method that will handle the menu's client events concerning manipulations with an item. + */ +interface BootstrapClientMenuItemEventHandler { + /** + * A method that will handle the menu's client events concerning manipulations with an item. + * @param source An object representing the event source. Identifies the BootstrapMenu control that raised the event. + * @param e An BootstrapClientMenuItemEventArgs object that contains event data. + */ + (source: S, e: BootstrapClientMenuItemEventArgs): void; +} +/** + * Provides data for events related to manipulations on menu items. + */ +interface BootstrapClientMenuItemEventArgs extends ASPxClientEventArgs { + /** + * Gets the menu item object related to the event. + * Value: A BootstrapClientMenuItem object, manipulations on which forced the event to be raised. + */ + item: BootstrapClientMenuItem; +} +/** + * A method that will handle the ItemMouseOver events. + */ +interface BootstrapClientMenuItemMouseEventHandler { + /** + * A method that will handle the ItemMouseOver events. + * @param source An object representing the event source. Identifies the BootstrapMenu control that raised the event. + * @param e An BootstrapClientMenuItemMouseEventArgs object that contains event data. + */ + (source: S, e: BootstrapClientMenuItemMouseEventArgs): void; +} +/** + * Provides data for client events related to mouse hovering over menu items. + */ +interface BootstrapClientMenuItemMouseEventArgs extends BootstrapClientMenuItemEventArgs { +} +/** + * A method that will handle client ItemClick events. + */ +interface BootstrapClientMenuItemClickEventHandler { + /** + * A method that will handle client ItemClick events. + * @param source An object representing the event source. Identifies the BootstrapMenu control that raised the event. + * @param e An BootstrapClientMenuItemClickEventArgs object that contains event data. + */ + (source: S, e: BootstrapClientMenuItemClickEventArgs): void; +} +/** + * Provides data for events related to clicking on the control's items. + */ +interface BootstrapClientMenuItemClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the menu item object related to the event. + * Value: A BootstrapClientMenuItem object, manipulations on which forced the event to be raised. + */ + item: BootstrapClientMenuItem; + /** + * Gets an HTML object that contains the processed Menu item. + * Value: An HTML object. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: A DHTML event object. + */ + htmlEvent: Object; } /** * Represents a client-side equivalent of the BootstrapPager control. @@ -19766,8 +21236,8 @@ interface BootstrapClientPager extends ASPxClientPager { */ interface BootstrapClientPopupControl extends ASPxClientPopupControl { /** - * - * @param selector + * Sets the CSS selector of a web control or HTML element with which the current popup window is associated. + * @param selector A string value specifying the CSS selector of the web control or HTML element with which the popup window is associated. */ SetPopupElementCssSelector(selector: string): void; } @@ -19776,10 +21246,38 @@ interface BootstrapClientPopupControl extends ASPxClientPopupControl { */ interface BootstrapClientPopupMenu extends ASPxClientPopupMenu { /** - * - * @param selector + * Returns the popup menu's root menu item specified by its index. + * @param index An integer value specifying the zero-based index of the root menu item to be retrieved. + */ + GetItem(index: number): BootstrapClientMenuItem; + /** + * Returns a menu item specified by its name. + * @param name A string value specifying the name of the menu item. + */ + GetItemByName(name: string): BootstrapClientMenuItem; + /** + * Returns the selected item within the menu control. + */ + GetSelectedItem(): BootstrapClientMenuItem; + /** + * Selects the specified menu item within a the Popup Menu control on the client side. + * @param item A BootstrapClientMenuItem object specifying the menu item to select. + */ + SetSelectedItem(item: BootstrapClientMenuItem): void; + /** + * Returns a root menu item. + */ + GetRootItem(): BootstrapClientMenuItem; + /** + * Sets the CSS selector of a web control or HTML element with which the current popup menu is associated. + * @param selector A string value specifying the CSS selector of the web control or HTML element with which the popup menu is associated. */ SetPopupElementCssSelector(selector: string): void; + /** + * Selects the specified menu item within a menu control on the client side. + * @param item An ASPxClientMenuItem object specifying the menu item to select. + */ + SetSelectedItem(item: ASPxClientMenuItem): void; } /** * Represents a client-side equivalent of the BootstrapProgressBar control. @@ -19791,15 +21289,472 @@ interface BootstrapClientProgressBar extends ASPxClientProgressBar { */ interface BootstrapClientSpinEdit extends ASPxClientSpinEdit { } +/** + * Represents the client-side equivalent of the BootstrapClientTimeEdit control. + */ +interface BootstrapClientTimeEdit extends ASPxClientTimeEdit { +} /** * Represents a client-side equivalent of the BootstrapTabControl control. */ interface BootstrapClientTabControl extends ASPxClientTabControl { + /** + * Returns the active tab within the Tab Control. + */ + GetActiveTab(): BootstrapClientTab; + /** + * Makes the specified tab active within the Tab Control on the client side. + * @param tab A BootstrapClientTab object specifying the tab to select. + */ + SetActiveTab(tab: BootstrapClientTab): void; + /** + * Returns a tab specified by its index. + * @param index An integer value specifying the zero-based index of the tab object to retrieve. + */ + GetTab(index: number): BootstrapClientTab; + /** + * Returns a tab specified by its name. + * @param name A string value specifying the name of the tab. + */ + GetTabByName(name: string): BootstrapClientTab; + /** + * Makes the specified tab active within the tab control on the client side. + * @param tab An ASPxClientTab object specifying the tab to select. + */ + SetActiveTab(tab: ASPxClientTab): void; } /** * Represents a client-side equivalent of the BootstrapPageControl control. */ interface BootstrapClientPageControl extends ASPxClientPageControl { + /** + * Returns the active tab within the Page Control. + */ + GetActiveTab(): BootstrapClientTab; + /** + * Makes the specified tab active within the Page Control on the client side. + * @param tab A BootstrapClientTab object specifying the tab to select. + */ + SetActiveTab(tab: BootstrapClientTab): void; + /** + * Returns a tab specified by its index. + * @param index An integer value specifying the zero-based index of the tab object to retrieve. + */ + GetTab(index: number): BootstrapClientTab; + /** + * Returns a tab specified by its name. + * @param name A string value specifying the name of the tab. + */ + GetTabByName(name: string): BootstrapClientTab; + /** + * Returns the HTML code that represents the contents of the specified page within the page control. + * @param tab An BootstrapClientTab object that specifies the required page. + */ + GetTabContentHTML(tab: BootstrapClientTab): string; + /** + * Defines the HTML content for a specific tab page within the page control. + * @param tab A BootstrapClientTab object that specifies the required tab page. + * @param html A string value that represents the HTML code defining the content of the specified page. + */ + SetTabContentHTML(tab: BootstrapClientTab, html: string): void; + /** + * Returns the HTML code that represents the contents of the specified page within the page control. + * @param tab An ASPxClientTab object that specifies the required page. + */ + GetTabContentHTML(tab: ASPxClientTab): string; + /** + * Defines the HTML content for a specific tab page within the page control. + * @param tab An ASPxClientTab object that specifies the required tab page. + * @param html A string value that represents the HTML code defining the content of the specified page. + */ + SetTabContentHTML(tab: ASPxClientTab, html: string): void; + /** + * Makes the specified tab active within the tab control on the client side. + * @param tab An ASPxClientTab object specifying the tab to select. + */ + SetActiveTab(tab: ASPxClientTab): void; +} +/** + * Represents a client-side equivalent of a tab control's BootstrapTabPage object. + */ +interface BootstrapClientTab extends ASPxClientTab { + /** + * Gets the text displayed within the tab badge. + */ + GetBadgeText(): string; + /** + * Sets the text displayed within the tab badge. + * @param text A String specifying the badge text. + */ + SetBadgeText(text: string): void; + /** + * Gets the CSS class of the icon displayed within the tab badge. + */ + GetBadgeIconCssClass(): string; + /** + * Sets the CSS class of the icon displayed within the tab badge. + * @param cssClass A string containing the name of a CSS class. + */ + SetBadgeIconCssClass(cssClass: string): void; + /** + * Returns the URL pointing to the image displayed within the tab. + */ + GetImageUrl(): string; + /** + * Specifies the URL which points to the image displayed within the tab. + * @param value + */ + SetImageUrl(value: string): void; + /** + * Returns the URL pointing to the image displayed within the active tab. + */ + GetActiveImageUrl(): string; + /** + * Specifies the URL which points to the image displayed within the active tab. + * @param value + */ + SetActiveImageUrl(value: string): void; + /** + * Gets the CSS class of the icon displayed by the tab. + */ + GetIconCssClass(): string; + /** + * Sets the CSS class of the icon displayed by the tab. + * @param cssClass A string containing the name of a CSS class. + */ + SetIconCssClass(cssClass: string): void; + /** + * Gets the CSS class of an icon displayed by the tab when it is active. + */ + GetActiveIconCssClass(): string; + /** + * Sets the CSS class of an icon displayed by the tab when it is active. + * @param cssClass A String containing the name of a CSS class. + */ + SetActiveIconCssClass(cssClass: string): void; +} +/** + * A method that will handle a tab control's client events concerning manipulations with a tab. + */ +interface BootstrapClientTabControlTabEventHandler { + /** + * A method that will handle a tab control's client events concerning manipulations with a tab. + * @param source An object representing the event source. Identifies the BootstrapClientTabControl that raised the event. + * @param e An BootstrapClientTabControlTabEventArgs object that contains event data. + */ + (source: S, e: BootstrapClientTabControlTabEventArgs): void; +} +/** + * Provides data for events related to manipulations on tabs. + */ +interface BootstrapClientTabControlTabEventArgs extends ASPxClientEventArgs { + /** + * Gets the tab object related to the event. + * Value: A BootstrapClientTab object, manipulations on which forced the event to be raised. + */ + tab: BootstrapClientTab; +} +/** + * A method that will handle a tab control's cancelable client events concerning manipulations with a tab. + */ +interface BootstrapClientTabControlTabCancelEventHandler { + /** + * A method that will handle a tab control's cancelable client events concerning manipulations with a tab. + * @param source An object representing the event source. Identifies the BootstrapTabControl that raised the event. + * @param e An BootstrapClientTabControlTabCancelEventArgs object that contains event data. + */ + (source: S, e: BootstrapClientTabControlTabCancelEventArgs): void; +} +/** + * Provides data for cancellable events related to manipulations on tabs. + */ +interface BootstrapClientTabControlTabCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets the tab object related to the event. + * Value: A BootstrapClientTab object representing the tab manipulations on which forced the tab control to raise the event. + */ + tab: BootstrapClientTab; + /** + * Gets or sets a value specifying whether a callback should be sent to the server to reload the content of the page being activated. + * Value: true, to reload the page's content; otherwise, false. + */ + reloadContentOnCallback: boolean; +} +/** + * A method that will handle client events concerning clicks on tabs. + */ +interface BootstrapClientTabControlTabClickEventHandler { + /** + * A method that will handle client events concerning clicks on tabs. + * @param source An object representing the event source. Identifies the BootstrapTabControl that raised the event. + * @param e An BootstrapClientTabControlTabClickEventArgs object that contains event data. + */ + (source: S, e: BootstrapClientTabControlTabClickEventArgs): void; +} +/** + * Provides data for events related to clicking on the control's tabs. + */ +interface BootstrapClientTabControlTabClickEventArgs extends BootstrapClientTabControlTabCancelEventArgs { + /** + * Gets an HTML object that contains the processed tab. + * Value: An HTML object. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: A DHTML event object. + */ + htmlEvent: Object; +} +/** + * A client-side equivalent of the BootstrapTagBox object. + */ +interface BootstrapClientTagBox extends ASPxClientTokenBox { + /** + * Use the TagsChanged event instead. + */ + TokensChanged: ASPxClientEvent>; + /** + * Fires on the client side after the tag collection has been changed. + */ + TagsChanged: ASPxClientEvent>; + /** + * Adds a new token with the specified text to the end of the control's token collection. + * @param text + */ + AddToken(text: string): void; + /** + * Adds a new tag with the specified text to the end of the control's tag collection. + * @param text A string value specifying the tag's text. + */ + AddTag(text: string): void; + /** + * Use the RemoveTagByText method instead. + * @param text + */ + RemoveTokenByText(text: string): void; + /** + * Removes a tag specified by its text from the tag box on the client. + * @param text A string value that is the text of the tag to be removed. + */ + RemoveTagByText(text: string): void; + /** + * Use the RemoveTag method instead. + * @param index + */ + RemoveToken(index: number): void; + /** + * Removes a tag specified by its index from the tag box on the client. + * @param index An integer value that is the index of the tag to be removed. + */ + RemoveTag(index: number): void; + /** + * Returns an HTML span element that corresponds to the specified token. + * @param index + */ + GetTokenHtmlElement(index: number): Object; + /** + * Returns an HTML span element that corresponds to the specified tag. + * @param index An integer value that is the tag index. + */ + GetTagHtmlElement(index: number): Object; + /** + * Returns an HTML span element that corresponds to the specified token's text. + * @param index + */ + GetTokenTextHtmlElement(index: number): Object; + /** + * Returns an HTML span element that corresponds to the specified tag's text. + * @param index An integer value that is the tag index. + */ + GetTagTextHtmlElement(index: number): Object; + /** + * Returns an HTML span element that corresponds to the specified token's remove button. + * @param index + */ + GetTokenRemoveButtonHtmlElement(index: number): Object; + /** + * Returns an HTML span element that corresponds to the specified tag's remove button. + * @param index An integer value that is the tag index. + */ + GetTagRemoveButtonHtmlElement(index: number): Object; + /** + * Returns a collection of tokens. + */ + GetTokenCollection(): string[]; + /** + * Returns a collection of tags. + */ + GetTagCollection(): string[]; + /** + * Returns a collection of tokens. + * @param collection + */ + SetTokenCollection(collection: string[]): void; + /** + * Sets a collection of tags. + * @param collection An object that is the collection of tags. + */ + SetTagCollection(collection: string[]): void; + /** + * Use the ClearTagCollection method instead. + */ + ClearTokenCollection(): void; + /** + * Removes all tags contained in the tag box. + */ + ClearTagCollection(): void; + /** + * Returns the index of a token specified by its text. + * @param text + */ + GetTokenIndexByText(text: string): number; + /** + * Returns the index of a tag specified by its text. + * @param text A string value that specifies the text of the tag. + */ + GetTagIndexByText(text: string): number; + /** + * Use the IsCustomTag method instead. + * @param text + * @param caseSensitive + */ + IsCustomToken(text: string, caseSensitive: boolean): boolean; + /** + * Returns a value that indicates if the specified tag (string) is a custom tag. + * @param text A string value that is a tag. + * @param caseSensitive true, if tags are case sensitive; otherwise, false. + */ + IsCustomTag(text: string, caseSensitive: boolean): boolean; + /** + * Returns the editor's selected item. + */ + GetSelectedItem(): BootstrapClientListBoxItem; + /** + * Sets the list editor's selected item. + * @param item A BootstrapClientListBoxItem object that specifies the item to select. + */ + SetSelectedItem(item: BootstrapClientListBoxItem): void; + /** + * Returns an item specified by its index within the tag box editor's item collection. + * @param index An integer value specifying the zero-based index of the item to search for. + */ + GetItem(index: number): BootstrapClientListBoxItem; + /** + * Returns an item by its text. + * @param text A string that specifies the item's text. + */ + FindItemByText(text: string): BootstrapClientListBoxItem; + /** + * Returns a list item by its value. + * @param value An object that specifies the item's value. + */ + FindItemByValue(value: Object): BootstrapClientListBoxItem; + /** + * This method is not in effect for the BootstrapClientTagBox class. + * @param texts + */ + AddItem(texts: string[]): number; + /** + * This method is not in effect for the BootstrapClientTagBox class. + * @param texts + * @param value + */ + AddItem(texts: string[], value: Object): number; + /** + * This method is not in effect for the BootstrapClientTagBox class. + * @param texts + * @param value + * @param iconCssClass + */ + AddItem(texts: string[], value: Object, iconCssClass: string): number; + /** + * Adds a new item to the editor, specifying the item's display text, and returns the index of the added item. + * @param text A string value specifying the item's display text. + */ + AddItem(text: string): number; + /** + * Adds a new item to the editor, specifying the item's display text and associated value, and returns the index of the added item. + * @param text A string value specifying the item's display text. + * @param value An object that represents the item's associated value. + */ + AddItem(text: string, value: Object): number; + /** + * Adds a new item to the editor, specifying the item's display text, associated value and displayed image, and returns the index of the added item. + * @param text A string value specifying the item's display text. + * @param value An object that represents the item's associated value. + * @param iconCssClass A String value specifying the CSS class of the image displayed by the list item. + */ + AddItem(text: string, value: Object, iconCssClass: string): number; + /** + * This method is not in effect for the BootstrapClientTagBox class. + * @param index + * @param texts + * @param value + * @param iconCssClass + */ + InsertItem(index: number, texts: string[], value: Object, iconCssClass: string): void; + /** + * This method is not in effect for the BootstrapClientTagBox class. + * @param index + * @param texts + * @param value + */ + InsertItem(index: number, texts: string[], value: Object): void; + /** + * This method is not in effect for the BootstrapClientTagBox class. + * @param index + * @param texts + */ + InsertItem(index: number, texts: string[]): void; + /** + * Inserts a new item specified by its display text, associated value and displayed image into the editor's item collection, at the position specified. + * @param index An integer value that represents the index position. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + * @param iconCssClass A String value specifying the CSS class of the image displayed by the list item. + */ + InsertItem(index: number, text: string, value: Object, iconCssClass: string): void; + /** + * Inserts a new item specified by its display text, associated value and displayed image into the editor's item collection, at the position specified. + * @param index An integer value that represents the index position. + * @param text A string value specifying the item's display text. + * @param value An object that represents the item's associated value. + */ + InsertItem(index: number, text: string, value: Object): void; + /** + * Inserts a new item into the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param text A string value specifying the item's display text. + */ + InsertItem(index: number, text: string): void; + /** + * Gets the text displayed within a Tag Box item badge. + * @param index The index of a Tag Box item. + */ + GetItemBadgeText(index: number): string; + /** + * Sets the text displayed within a Tag Box item badge. + * @param index The index of a Tag Box item. + * @param text A String specifying the badge text. + */ + SetItemBadgeText(index: number, text: string): void; + /** + * Gets the CSS class of the icon displayed within a Tag Box item badge. + * @param index The index of a Tag Box item. + */ + GetItemBadgeIconCssClass(index: number): string; + /** + * Sets the CSS class of the icon displayed within a Tag Box item badge. + * @param index The index of a Tag Box item. + * @param cssClass A String containing the name of a CSS class. + */ + SetItemBadgeIconCssClass(index: number, cssClass: string): void; + /** + * Sets the list editor's selected item. + * @param item An ASPxClientListEditItem object that specifies the item to select. + */ + SetSelectedItem(item: ASPxClientListEditItem): void; } /** * Represents a client-side equivalent of the BootstrapTextBox control. @@ -19816,79 +21771,741 @@ interface BootstrapClientMemo extends ASPxClientMemo { */ interface BootstrapClientButtonEdit extends ASPxClientButtonEdit { } +/** + * Represents the client-side equivalent of the BootstrapToolbar control. + */ +interface BootstrapClientToolbar extends BootstrapClientMenu { +} /** * Represents a client-side equivalent of the BootstrapTreeView control. */ interface BootstrapClientTreeView extends ASPxClientTreeView { + /** + * Returns a node specified by its index within the Tree View's node collection. + * @param index An integer value specifying the zero-based index of the node to be retrieved. + */ + GetNode(index: number): BootstrapClientTreeViewNode; + /** + * Returns a node specified by its name. + * @param name A string value specifying the name of the node. + */ + GetNodeByName(name: string): BootstrapClientTreeViewNode; + /** + * Returns a node specified by its text. + * @param text A string value specifying the text content of the node. + */ + GetNodeByText(text: string): BootstrapClientTreeViewNode; + /** + * Returns the selected node within the Tree View control on the client side. + */ + GetSelectedNode(): BootstrapClientTreeViewNode; + /** + * Selects the specified node within the Tree View control on the client side. + * @param node A BootstrapClientTreeViewNode object specifying the node to select. + */ + SetSelectedNode(node: BootstrapClientTreeViewNode): void; + /** + * Gets the root node of the Tree View control. + */ + GetRootNode(): BootstrapClientTreeViewNode; + /** + * Selects the specified node within the ASPxTreeView control on the client side. + * @param node An ASPxClientTreeViewNode object specifying the node to select. + */ + SetSelectedNode(node: ASPxClientTreeViewNode): void; } -interface BootstrapUIWidgetBase extends ASPxClientControl { - Init: ASPxClientEvent>; - Drawn: ASPxClientEvent>; - Disposing: ASPxClientEvent>; - OptionChanged: ASPxClientEvent>; - Exporting: ASPxClientEvent>; - Exported: ASPxClientEvent>; - FileSaving: ASPxClientEvent>; - IncidentOccurred: ASPxClientEvent>; - GetInstance(): Object; - SetOptions(options: Object): void; - SetDataSource(dataSource: Object): void; - GetDataSource(): Object; - ExportTo(format: string, fileName: string): void; - Print(): void; +/** + * Represents a client-side equivalent of the TreeView's BootstrapTreeViewNode object. + */ +interface BootstrapClientTreeViewNode extends ASPxClientTreeViewNode { + /** + * Gets the BootstrapClientTreeView object to which the current node belongs. + * Value: A object that is the node's owner. + */ + treeView: BootstrapClientTreeView; + /** + * Gets the current node's parent node. + * Value: A BootstrapClientTreeViewNode object representing the node's immediate parent. + */ + parent: BootstrapClientTreeViewNode; + /** + * Returns the current node's immediate child node specified by its index. + * @param index An integer value specifying the zero-based index of the node to be retrieved. + */ + GetNode(index: number): BootstrapClientTreeViewNode; + /** + * Returns the current node's child node specified by its name. + * @param name A string value specifying the name of the node. + */ + GetNodeByName(name: string): BootstrapClientTreeViewNode; + /** + * Returns the current node's child node specified by its text. + * @param text A string value specifying the text content of the node. + */ + GetNodeByText(text: string): BootstrapClientTreeViewNode; + /** + * Gets the text displayed within the node badge. + */ + GetBadgeText(): string; + /** + * Sets the text displayed within the node badge. + * @param text A String specifying the badge text. + */ + SetBadgeText(text: string): void; + /** + * Gets the CSS class of the icon displayed within the node badge. + */ + GetBadgeIconCssClass(): string; + /** + * Sets the CSS class of the icon displayed within the node badge. + * @param cssClass A string containing the name of a CSS class. + */ + SetBadgeIconCssClass(cssClass: string): void; + /** + * Returns the URL pointing to the image displayed within the node. + */ + GetImageUrl(): string; + /** + * Sets the URL which points to the image displayed within the node. + * @param value + */ + SetImageUrl(value: string): void; + /** + * Gets the CSS class of the icon displayed by the node. + */ + GetIconCssClass(): string; + /** + * Sets the CSS class of the icon displayed by the node. + * @param cssClass A string containing the name of a CSS class. + */ + SetIconCssClass(cssClass: string): void; } -interface BootstrapUIWidgetInitializedEventHandler { - (source: S, e: BootstrapUIWidgetEventArgsBase): void; +/** + * A method that will handle the client events concerned with node processing. + */ +interface BootstrapClientTreeViewNodeProcessingModeEventHandler { + /** + * A method that will handle the client events concerned with node processing. + * @param source An object representing the event source. Identifies the BootstrapClientTreeView control that raised the event. + * @param e An BootstrapClientTreeViewNodeProcessingModeEventArgs object that contains event data. + */ + (source: S, e: BootstrapClientTreeViewNodeProcessingModeEventArgs): void; } -interface BootstrapUIWidgetDrawnEventHandler { - (source: S, e: BootstrapUIWidgetEventArgsBase): void; +/** + * Provides data for the client events related to node processing, and allowing the event's processing to be passed to the server side. + */ +interface BootstrapClientTreeViewNodeProcessingModeEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets a node object related to the event. + * Value: A BootstrapClientTreeViewNode object, manipulations on which forced the event to be raised. + */ + node: BootstrapClientTreeViewNode; } -interface BootstrapUIWidgetDisposingEventHandler { - (source: S, e: BootstrapUIWidgetEventArgsBase): void; +/** + * A method that will handle the NodeClick event. + */ +interface BootstrapClientTreeViewNodeClickEventHandler { + /** + * A method that will handle the NodeClick event. + * @param source An object representing the event source. Identifies the BootstrapClientTreeView control that raised the event. + * @param e An BootstrapClientTreeViewNodeClickEventArgs object that contains event data. + */ + (source: S, e: BootstrapClientTreeViewNodeClickEventArgs): void; } -interface BootstrapUIWidgetExportedEventHandler { - (source: S, e: BootstrapUIWidgetEventArgsBase): void; +/** + * Provides data for the NodeClick event. + */ +interface BootstrapClientTreeViewNodeClickEventArgs extends BootstrapClientTreeViewNodeProcessingModeEventArgs { + /** + * Gets an HTML object that contains the processed Tree View node. + * Value: An HTML object. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: A DHTML event object. + */ + htmlEvent: Object; } -interface BootstrapUIWidgetOptionChangedEventHandler { - (source: S, e: BootstrapUIWidgetOptionChangedEventArgs): void; +/** + * A method that will handle the Tree View control's client events, concerning manipulations with a node. + */ +interface BootstrapClientTreeViewNodeEventHandler { + /** + * A method that will handle the Tree View control's client events, concerning manipulations with a node. + * @param source An object representing the event source. Identifies the BootstrapClientTreeView control that raised the event. + * @param e An BootstrapClientTreeViewNodeEventArgs object that contains event data. + */ + (source: S, e: BootstrapClientTreeViewNodeEventArgs): void; } -interface BootstrapUIWidgetOptionChangedEventArgs extends BootstrapUIWidgetEventArgsBase { - fullName: string; - name: string; - previousValue: Object; - value: Object; +/** + * Provides data for the ExpandedChanged events. + */ +interface BootstrapClientTreeViewNodeEventArgs extends ASPxClientEventArgs { + /** + * Gets a node object related to the event. + * Value: A BootstrapClientTreeViewNode object, manipulations on which forced the event to be raised. + */ + node: BootstrapClientTreeViewNode; } -interface BootstrapUIWidgetExportingEventHandler { - (source: S, e: BootstrapUIWidgetExportEventArgs): void; +/** + * A method that will handle the Tree View's cancelable client events, concerning manipulations with nodes. + */ +interface BootstrapClientTreeViewNodeCancelEventHandler { + /** + * A method that will handle the Tree View's cancelable client events, concerning manipulations with nodes. + * @param source An object representing the event source. Identifies the BootstrapClientTreeView control that raised the event. + * @param e An BootstrapClientTreeViewNodeCancelEventArgs object that contains event data. + */ + (source: S, e: BootstrapClientTreeViewNodeCancelEventArgs): void; } -interface BootstrapUIWidgetFileSavingEventHandler { - (source: S, e: BootstrapUIWidgetExportEventArgs): void; -} -interface BootstrapUIWidgetExportEventArgs extends BootstrapUIWidgetEventArgsBase { - cancel: boolean; - data: Object; - fileName: string; - format: string; -} -interface BootstrapUIWidgetErrorEventHandler { - (source: S, e: BootstrapUIWidgetErrorEventArgs): void; -} -interface BootstrapUIWidgetErrorEventArgs extends BootstrapUIWidgetEventArgsBase { - target: Object; -} -interface BootstrapUIWidgetElementActionEventArgs extends BootstrapUIWidgetEventArgsBase { - target: Object; -} -interface BootstrapUIWidgetElementClickEventArgs extends BootstrapUIWidgetElementActionEventArgs { - jQueryEvent: Object; +/** + * Provides data for the ExpandedChanging event. + */ +interface BootstrapClientTreeViewNodeCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets a node object related to the event. + * Value: A BootstrapClientTreeViewNode object, manipulations on which forced the event to be raised. + */ + node: BootstrapClientTreeViewNode; } /** * Represents a client-side equivalent of the BootstrapUploadControl. */ interface BootstrapClientUploadControl extends ASPxClientUploadControl { } +/** + * Represents the client BootstrapGridView. + */ interface BootstrapClientGridView extends ASPxClientGridView { } +/** + * Represents the client BootstrapCardView. + */ +interface BootstrapClientCardView extends ASPxClientGridView { +} +/** + * Represents a client-side equivalent of the BootstrapWebClientUIWidget class. + */ +interface BootstrapUIWidgetBase extends ASPxClientControl { + /** + * Fires once, after the widget is initialized. + */ + Init: ASPxClientEvent>; + /** + * Fires when the widget has finished drawing itself. + */ + Drawn: ASPxClientEvent>; + /** + * Fires when the widget is removed from the DOM using the remove(), empty(), or html() jQuery methods only. + */ + Disposing: ASPxClientEvent>; + /** + * Fires after an option of the widget has been changed. + */ + OptionChanged: ASPxClientEvent>; + /** + * Fires before data from the widget is exported. + */ + Exporting: ASPxClientEvent>; + /** + * Fires after data from the widget is exported. + */ + Exported: ASPxClientEvent>; + /** + * Raised before a file with exported data is saved on the user's local storage. + */ + FileSaving: ASPxClientEvent>; + /** + * Fires when an error or warning appears in the widget. + */ + IncidentOccurred: ASPxClientEvent>; + /** + * Gets an instance of the widget. + */ + GetInstance(): Object; + /** + * Sets the widget's options to values specified in the passed object. + * @param options An object containing key-value pairs specifying new option values. + */ + SetOptions(options: Object): void; + /** + * Gets the client data source instance. + * @param dataSource A DevExtreme DataSource object. + */ + SetDataSource(dataSource: Object): void; + /** + * Gets the client data source instance. + */ + GetDataSource(): Object; + /** + * Exports the widget. + * @param format A string specifying the target file format. + * @param fileName A string specifying the file name. + */ + ExportTo(format: string, fileName: string): void; + /** + * Invokes the browser's Print window to print the widget's contents. + */ + Print(): void; +} +/** + * Represents a client-side equivalent of the BootstrapChartBase class. + */ +interface BootstrapClientChartBase extends BootstrapUIWidgetBase { + /** + * Fires when the Series and Points chart elements are ready to be accessed. + */ + Done: ASPxClientEvent>; + /** + * Fires when an item on the chart legend is clicked. + */ + LegendClick: ASPxClientEvent>; + /** + * Fires when a user clicks a series point. + */ + PointClick: ASPxClientEvent>; + /** + * Fires when the hover state of a series point has been changed. + */ + PointHoverChanged: ASPxClientEvent>; + /** + * Fires when the selection state of a series point has been changed. + */ + PointSelectionChanged: ASPxClientEvent>; + /** + * Fires when a point's tooltip becomes hidden. + */ + TooltipHidden: ASPxClientEvent>; + /** + * Fires when a point's tooltip appears. + */ + TooltipShown: ASPxClientEvent>; + /** + * Fires when a user clicks a label on the argument axis. + */ + ArgumentAxisClick: ASPxClientEvent>; + /** + * Fires when a user clicks a series. + */ + SeriesClick: ASPxClientEvent>; + /** + * Fires when the hover state of a series has been changed. + */ + SeriesHoverChanged: ASPxClientEvent>; + /** + * Fires when the selection state of a series has been changed. + */ + SeriesSelectionChanged: ASPxClientEvent>; +} +/** + * Represents a client-side equivalent of the Chart control. + */ +interface BootstrapClientChart extends BootstrapClientChartBase { + /** + * Fires when a chart zooming or scrolling begins. + */ + ZoomStart: ASPxClientEvent>; + /** + * Fires when a chart zooming or scrolling ends. + */ + ZoomEnd: ASPxClientEvent>; +} +/** + * Represents a client-side equivalent of the BootstrapPolarChart control. + */ +interface BootstrapClientPolarChart extends BootstrapClientChartBase { +} +/** + * Represents a client-side equivalent of the BootstrapPieChart control. + */ +interface BootstrapClientPieChart extends BootstrapClientChartBase { +} +/** + * A method that will handle the Done event. + */ +interface BootstrapClientChartBaseDoneEventHandler { + /** + * A method that will handle the Done event. + * @param source The event source. + * @param e A BootstrapUIWidgetEventArgsBase object that contains event data. + */ + (source: S, e: BootstrapUIWidgetEventArgsBase): void; +} +/** + * A method that will handle the LegendClick event. + */ +interface BootstrapClientChartBaseLegendClickEventHandler { + /** + * A method that will handle the LegendClick event. + * @param source The event source. + * @param e A BootstrapUIWidgetElementClickEventArgs object that contains event data. + */ + (source: S, e: BootstrapUIWidgetElementClickEventArgs): void; +} +/** + * A method that will handle the Invoke event. + */ +interface BootstrapClientCoordinateSystemChartArgumentAxisClickEventHandler { + /** + * A method that will handle the Invoke event. + * @param source The event source. + * @param e A BootstrapUIWidgetElementClickEventArgs object that contains event data. + */ + (source: S, e: BootstrapUIWidgetElementClickEventArgs): void; +} +/** + * A method that will handle the PointClick event. + */ +interface BootstrapClientChartBasePointClickEventHandler { + /** + * A method that will handle the PointClick event. + * @param source The event source. + * @param e A BootstrapUIWidgetElementClickEventArgs object that contains event data. + */ + (source: S, e: BootstrapUIWidgetElementClickEventArgs): void; +} +/** + * A method that will handle the PointHoverChanged event. + */ +interface BootstrapClientChartBasePointHoverChangedEventHandler { + /** + * A method that will handle the PointHoverChanged event. + * @param source The event source. + * @param e A BootstrapUIWidgetElementActionEventArgs object that contains event data. + */ + (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; +} +/** + * A method that will handle the PointSelectionChanged event. + */ +interface BootstrapClientChartBasePointSelectionChangedEventHandler { + /** + * A method that will handle the PointSelectionChanged event. + * @param source The event source. + * @param e A BootstrapUIWidgetElementActionEventArgs object that contains event data. + */ + (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; +} +/** + * A method that will handle the TooltipHidden event. + */ +interface BootstrapClientChartBaseTooltipHiddenEventHandler { + /** + * A method that will handle the TooltipHidden event. + * @param source The event source. + * @param e A BootstrapUIWidgetElementActionEventArgs object that contains event data. + */ + (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; +} +/** + * A method that will handle the TooltipShown event. + */ +interface BootstrapClientChartBaseTooltipShownEventHandler { + /** + * A method that will handle the TooltipShown event. + * @param source The event source. + * @param e A BootstrapUIWidgetElementActionEventArgs object that contains event data. + */ + (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; +} +/** + * A method that will handle the SeriesClick event. + */ +interface BootstrapClientCoordinateSystemChartSeriesClickEventHandler { + /** + * A method that will handle the SeriesClick event. + * @param source The event source. + * @param e A BootstrapUIWidgetElementClickEventArgs object that contains event data. + */ + (source: S, e: BootstrapUIWidgetElementClickEventArgs): void; +} +/** + * A method that will handle the SeriesHoverChanged event. + */ +interface BootstrapClientCoordinateSystemChartSeriesHoverChangedEventHandler { + /** + * A method that will handle the SeriesHoverChanged event. + * @param source The event source. + * @param e A BootstrapUIWidgetElementActionEventArgs object that contains event data. + */ + (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; +} +/** + * A method that will handle the SeriesSelectionChanged event. + */ +interface BootstrapClientCoordinateSystemChartSeriesSelectionChangedEventHandler { + /** + * A method that will handle the SeriesSelectionChanged event. + * @param source The event source. + * @param e A BootstrapUIWidgetElementActionEventArgs object that contains event data. + */ + (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; +} +/** + * A method that will handle the ZoomStart event. + */ +interface BootstrapClientChartZoomStartEventHandler { + /** + * A method that will handle the ZoomStart event. + * @param source The event source. + * @param e A BootstrapUIWidgetEventArgsBase object that contains event data. + */ + (source: S, e: BootstrapUIWidgetEventArgsBase): void; +} +/** + * A method that will handle the ZoomEnd event. + */ +interface BootstrapClientChartZoomEndEventHandler { + /** + * A method that will handle the ZoomEnd event. + * @param source The event source. + * @param e A BootstrapClientChartZoomEndEventArgs object that contains event data. + */ + (source: S, e: BootstrapClientChartZoomEndEventArgs): void; +} +/** + * Provides base data for the client-side events. + */ +interface BootstrapUIWidgetEventArgsBase extends ASPxClientEventArgs { + /** + * The widget instance. + * Value: An object specifying the widget instance. + */ + component: Object; + /** + * The widget's container. + * Value: An object specifying the widget's container. + */ + element: Object; +} +/** + * Provides data for the ZoomEnd event. + */ +interface BootstrapClientChartZoomEndEventArgs extends BootstrapUIWidgetEventArgsBase { + /** + * The value that became the start of the argument axis after zooming or scrolling ended. + * Value: An object specifying the start of the argument axis. + */ + rangeStart: Object; + /** + * The value that became the end of the argument axis after zooming or scrolling ended. + * Value: An object specifying the end of the argument axis. + */ + rangeEnd: Object; +} +/** + * Represents a client-side equivalent of the Range Selector control. + */ +interface BootstrapClientRangeSelector extends BootstrapUIWidgetBase { + /** + * Fires after the selected range has been changed by moving one of the sliders. + */ + ValueChanged: ASPxClientEvent>; + /** + * Gets the Range Selector's selected value range. + */ + GetValue(): Object[]; + /** + * Gets the Range Selector's selected value range. + * @param value An array containing the value range. + */ + SetValue(value: Object[]): void; +} +/** + * Provides data for events which concern manipulations on the selected range. + */ +interface BootstrapClientRangeSelectorValueChangedEventArgs extends BootstrapUIWidgetEventArgsBase { + /** + * The value currently specified for the RangeSelector control. + * Value: A System.Object instance defining the current value specified for a RangeSelector control. + */ + value: Object; + /** + * The previous value of a RangeSelector control. + * Value: A System.Object type defining the previous value specified for a RangeSelector control. + */ + previousValue: Object; +} +/** + * A method that will handle the ValueChanged event. + */ +interface BootstrapClientRangeSelectorValueChangedEventHandler { + /** + * A method that will handle the ValueChanged event. + * @param source The event source. + * @param e A BootstrapClientRangeSelectorValueChangedEventArgs object that contains event data. + */ + (source: S, e: BootstrapClientRangeSelectorValueChangedEventArgs): void; +} +/** + * A method that will handle the Init event. + */ +interface BootstrapUIWidgetInitializedEventHandler { + /** + * A method that will handle the Init event. + * @param source The event source. + * @param e A BootstrapUIWidgetEventArgsBase object that contains event data. + */ + (source: S, e: BootstrapUIWidgetEventArgsBase): void; +} +/** + * A method that will handle the Drawn event. + */ +interface BootstrapUIWidgetDrawnEventHandler { + /** + * A method that will handle the Drawn event. + * @param source The event source. + * @param e A BootstrapUIWidgetEventArgsBase object that contains event data. + */ + (source: S, e: BootstrapUIWidgetEventArgsBase): void; +} +/** + * A method that will handle the Disposing event. + */ +interface BootstrapUIWidgetDisposingEventHandler { + /** + * A method that will handle the Disposing event. + * @param source The event source. + * @param e A BootstrapUIWidgetEventArgsBase object that contains event data. + */ + (source: S, e: BootstrapUIWidgetEventArgsBase): void; +} +/** + * A method that will handle the Exported event. + */ +interface BootstrapUIWidgetExportedEventHandler { + /** + * A method that will handle the Exported event. + * @param source The event source. + * @param e A BootstrapUIWidgetEventArgsBase object that contains event data. + */ + (source: S, e: BootstrapUIWidgetEventArgsBase): void; +} +/** + * A method that will handle the OptionChanged event. + */ +interface BootstrapUIWidgetOptionChangedEventHandler { + /** + * A method that will handle the OptionChanged event. + * @param source The event source. + * @param e A BootstrapUIWidgetOptionChangedEventArgs object that contains event data. + */ + (source: S, e: BootstrapUIWidgetOptionChangedEventArgs): void; +} +/** + * Provides data for client events raised in response to changing the widget's options. + */ +interface BootstrapUIWidgetOptionChangedEventArgs extends BootstrapUIWidgetEventArgsBase { + /** + * The option's full name. + * Value: A string value specifying the option's full name. + */ + fullName: string; + /** + * The option's short name. + * Value: A string value specifying the option's short name. + */ + name: string; + /** + * The option's old value. + * Value: An object that is the option's old value. + */ + previousValue: Object; + /** + * The option's new value. + * Value: An object that is the option's new value. + */ + value: Object; +} +/** + * A method that will handle the Exporting event. + */ +interface BootstrapUIWidgetExportingEventHandler { + /** + * A method that will handle the Exporting event. + * @param source The event source. + * @param e A BootstrapUIWidgetExportEventArgs object that contains event data. + */ + (source: S, e: BootstrapUIWidgetExportEventArgs): void; +} +/** + * A method that will handle the FileSaving event. + */ +interface BootstrapUIWidgetFileSavingEventHandler { + /** + * A method that will handle the FileSaving event. + * @param source The event source. + * @param e A BootstrapUIWidgetExportEventArgs object that contains event data. + */ + (source: S, e: BootstrapUIWidgetExportEventArgs): void; +} +/** + * Provides data for events related to saving files in the built-in dialogs. + */ +interface BootstrapUIWidgetExportEventArgs extends BootstrapUIWidgetEventArgsBase { + /** + * Allows you to cancel file saving. + * Value: true, to cancel the file saving; otherwise, false. + */ + cancel: boolean; + /** + * Gets the saved data as a BLOB object. + * Value: A BLOB object containing saved data. + */ + data: Object; + /** + * Gets a name of a saved file. + * Value: A string value specifying the saved file's name. + */ + fileName: string; + /** + * Gets the saved file's format. + * Value: A string value specifying the saved file's format. + */ + format: string; +} +/** + * A method that will handle the IncidentOccurred event. + */ +interface BootstrapUIWidgetErrorEventHandler { + /** + * A method that will handle the IncidentOccurred event. + * @param source The event source. + * @param e A BootstrapUIWidgetErrorEventArgs object that contains event data. + */ + (source: S, e: BootstrapUIWidgetErrorEventArgs): void; +} +/** + * Provides data for client events raised in response to widget errors. + */ +interface BootstrapUIWidgetErrorEventArgs extends BootstrapUIWidgetEventArgsBase { + /** + * Contains information on the error that occurred. + * Value: An object containing information on the error that occurred. + */ + target: Object; +} +/** + * Provides data for client events related to actions performed on the widget's visual elements. + */ +interface BootstrapUIWidgetElementActionEventArgs extends BootstrapUIWidgetEventArgsBase { + /** + * The DOM element that initiated the event. + * Value: An object that initiated the event. + */ + target: Object; +} +/** + * Provides data for the client-side clicking events. + */ +interface BootstrapUIWidgetElementClickEventArgs extends BootstrapUIWidgetElementActionEventArgs { + /** + * The jQuery event that caused the handler execution. + * Value: An object of the jQuery.Event type. + */ + jQueryEvent: Object; +} /** * A client-side counterpart of the Calendar and CalendarFor extensions. */ @@ -20343,7 +22960,7 @@ interface MVCxClientPopupControl extends ASPxClientPopupControl { */ PerformWindowCallback(window: ASPxClientPopupWindow, data: Object): void; /** - * + * Sends a callback with parameters to update the popup window by processing the related popup window. * @param window * @param parameter */ @@ -20849,6 +23466,27 @@ interface MVCxClientVerticalGrid extends ASPxClientVerticalGrid { */ interface MVCxClientWebDocumentViewer extends ASPxClientWebDocumentViewer { } +interface ANCxClientBeginCallbackEventHandler { + (source: S, e: ANCxClientBeginCallbackEventArgs): void; +} +/** + * Serves as the base class for arguments of the web controls' client-side events. + */ +interface ASPxClientEventArgs { +} +/** + * Provides data for client events related to the beginning of a callback processing round trip. + */ +interface ASPxClientBeginCallbackEventArgs extends ASPxClientEventArgs { + /** + * Gets a command name that identifies which client action forced a callback to be occurred. + * Value: A string value that represents the name of the command which initiated a callback. + */ + command: string; +} +interface ANCxClientBeginCallbackEventArgs extends ASPxClientBeginCallbackEventArgs { + customArgs: Object; +} /** * Serves as the base type for all the objects included in the client-side object model. */ @@ -20871,6 +23509,10 @@ interface ASPxClientControlBase { * @param message A String value that specifies a text. */ SendMessageToAssistiveTechnology(message: string): void; + /** + * Returns a client instance of the control that is the parent for a specified control. + */ + GetParentControl(): Object; /** * Returns a value specifying whether a control is displayed. */ @@ -20969,11 +23611,6 @@ interface ASPxClientCallbackCompleteEventHandler { */ (source: S, e: ASPxClientCallbackCompleteEventArgs): void; } -/** - * Serves as the base class for arguments of the web controls' client-side events. - */ -interface ASPxClientEventArgs { -} /** * Provides data for events concerning the final processing of a callback. */ @@ -21195,11 +23832,6 @@ interface ASPxClientProcessingModeCancelEventArgs extends ASPxClientProcessingMo */ interface KnockoutObservableBoolean { } -/** - * Provides access to observable arrays that allow you to detect and respond to changes in a collection of things. - */ -interface KnockoutObservableArray { -} /** * Represents a JavaScript function which receives callback data obtained via a call to a specific client method (such as the PerformDataCallback). */ @@ -21262,16 +23894,6 @@ interface ASPxClientBeginCallbackEventHandler { */ (source: S, e: ASPxClientBeginCallbackEventArgs): void; } -/** - * Provides data for client events related to the beginning of a callback processing round trip. - */ -interface ASPxClientBeginCallbackEventArgs extends ASPxClientEventArgs { - /** - * Gets a command name that identifies which client action forced a callback to be occurred. - * Value: A string value that represents the name of the command which initiated a callback. - */ - command: string; -} /** * A method that will handle the BeginCallback event. */ @@ -22478,6 +25100,10 @@ interface ASPxClientFileManagerItem { * @param skipRootFolder true, to skip the root folder; otherwise, false. */ GetFullName(separator: string, skipRootFolder: boolean): string; + /** + * Gets the current item's metadata. + */ + GetMetadata(): Object; } /** * Represents the client-side equivalent of the FileManagerFile object. @@ -23523,6 +26149,11 @@ interface ASPxClientHintOptions { * Value: true, to display a hint in a callout box; otherwise, false. */ showCallout: boolean; + /** + * Gets or sets a value that specifies whether a hint's title is displayed. + * Value: true, to display the hint's title; otherwise, false. + */ + showTitle: boolean; /** * Gets or sets where a hint should be positioned. * Value: A string value that specifies a hint position. @@ -24596,7 +27227,7 @@ interface ASPxClientPopupControl extends ASPxClientPopupControlBase { */ GetWindowPopUpReasonMouseEvent(window: ASPxClientPopupWindow): Object; /** - * + * Sends a callback with parameters to update the popup window by processing the related popup window. * @param window * @param parameter */ @@ -24749,6 +27380,103 @@ interface ASPxClientPopupControl extends ASPxClientPopupControlBase { * @param html A string value that represents the HTML code defining the content of the specified popup window. */ SetWindowContentHtml(window: ASPxClientPopupWindow, html: string): void; + /** + * Stretches the popup window in adaptive mode vertically to the full height of the browser window. + */ + StretchVertically(): void; + /** + * Stretches the specified popup window in adaptive mode vertically to the full height of the browser window. + * @param window A ASPxClientPopupWindow object representing the required popup window. + */ + WindowStretchVertically(window: ASPxClientPopupWindow): void; + /** + * Sets the minimum width of the popup window in adaptive mode. + * @param minWidth An integer value specifying the minimum width of the popup window in adaptive mode. + */ + SetAdaptiveMinWidth(minWidth: number): void; + /** + * Sets the minimum width of the popup window in adaptive mode. + * @param minWidth A string value specifying the minimum width of the popup window in adaptive mode as a percentage of the browser window inner width value. + */ + SetAdaptiveMinWidth(minWidth: string): void; + /** + * Sets the minimum width of the specified popup window in adaptive mode. + * @param window A ASPxClientPopupWindow object representing the required popup window. + * @param minWidth An integer value specifying the minimum width of the popup window in adaptive mode. + */ + SetWindowAdaptiveMinWidth(window: ASPxClientPopupWindow, minWidth: number): void; + /** + * Sets the minimum width of the specified popup window in adaptive mode. + * @param window A ASPxClientPopupWindow object representing the required popup window. + * @param minWidth An integer value specifying the minimum width of the popup window in adaptive mode as a percentage of the browser window inner width value. + */ + SetWindowAdaptiveMinWidth(window: ASPxClientPopupWindow, minWidth: string): void; + /** + * Sets the maximum width of the popup window in adaptive mode. + * @param maxWidth An integer value specifying the maximum width of the popup window in adaptive mode. + */ + SetAdaptiveMaxWidth(maxWidth: number): void; + /** + * Sets the maximum width of the popup window in adaptive mode. + * @param maxWidth A string value specifying the maximum width of the popup window in adaptive mode as a percentage of the browser window inner width value. + */ + SetAdaptiveMaxWidth(maxWidth: string): void; + /** + * Sets the maximum width of the specified popup window in adaptive mode. + * @param window A ASPxClientPopupWindow object representing the required popup window. + * @param maxWidth An integer value specifying the maximum width of the popup window in adaptive mode. + */ + SetWindowAdaptiveMaxWidth(window: ASPxClientPopupWindow, maxWidth: number): void; + /** + * Sets the maximum width of the specified popup window in adaptive mode. + * @param window A ASPxClientPopupWindow object representing the required popup window. + * @param maxWidth An integer value specifying the maximum width of the popup window in adaptive mode as a percentage of the browser window inner width value. + */ + SetWindowAdaptiveMaxWidth(window: ASPxClientPopupWindow, maxWidth: string): void; + /** + * Sets the minimum height of the popup window in adaptive mode. + * @param minHeight An integer value specifying the minimum height of the popup window in adaptive mode. + */ + SetAdaptiveMinHeight(minHeight: number): void; + /** + * Sets the minimum height of the popup window in adaptive mode. + * @param minHeight A string value specifying the minimum height of the popup window in adaptive mode as a percentage of the browser window inner height value. + */ + SetAdaptiveMinHeight(minHeight: string): void; + /** + * Sets the minimum height of the specified popup window in adaptive mode. + * @param window A ASPxClientPopupWindow object representing the required popup window. + * @param minHeight An integer value specifying the minimum height of the popup window in adaptive mode. + */ + SetWindowAdaptiveMinHeight(window: ASPxClientPopupWindow, minHeight: number): void; + /** + * Sets the minimum height of the specified popup window in adaptive mode. + * @param window A ASPxClientPopupWindow object representing the required popup window. + * @param minHeight An integer value specifying the minimum height of the popup window in adaptive mode as a percentage of the browser window inner height value. + */ + SetWindowAdaptiveMinHeight(window: ASPxClientPopupWindow, minHeight: string): void; + /** + * Sets the maximum height of the popup window in adaptive mode. + * @param maxHeight An integer value specifying the maximum height of the popup window in adaptive mode. + */ + SetAdaptiveMaxHeight(maxHeight: number): void; + /** + * Sets the maximum height of the popup window in adaptive mode. + * @param maxHeight A string value specifying the maximum height of the popup window in adaptive mode as a percentage of the browser window inner height value. + */ + SetAdaptiveMaxHeight(maxHeight: string): void; + /** + * Sets the maximum height of the specified popup window in adaptive mode. + * @param window A ASPxClientPopupWindow object representing the required popup window. + * @param maxHeight An integer value specifying the maximum height of the popup window in adaptive mode. + */ + SetWindowAdaptiveMaxHeight(window: ASPxClientPopupWindow, maxHeight: number): void; + /** + * Sets the maximum height of the specified popup window in adaptive mode. + * @param window A ASPxClientPopupWindow object representing the required popup window. + * @param maxHeight An integer value specifying the maximum height of the popup window in adaptive mode as a percentage of the browser window inner height value. + */ + SetWindowAdaptiveMaxHeight(window: ASPxClientPopupWindow, maxHeight: string): void; /** * Returns an iframe object containing a web page specified via the specified popup window's SetWindowContentUrl client method). * @param window A ASPxClientPopupWindow object representing the required popup window. @@ -28890,7 +31618,7 @@ interface ASPxClientDocumentViewer extends ASPxClientControl { */ EndCallback: ASPxClientEvent>; /** - * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientDocumentViewer. + * Fires on the client if any server error occurs during server-side processing of a callback sent by ASPxClientDocumentViewer. */ CallbackError: ASPxClientEvent>; /** @@ -29011,13 +31739,17 @@ interface ASPxClientQueryBuilder extends ASPxClientControl { */ EndCallback: ASPxClientEvent>; /** - * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientQueryBuilder. + * Fires on the client if any server error occurs during server-side processing of a callback sent by ASPxClientQueryBuilder. */ CallbackError: ASPxClientEvent>; /** * Enables you to customize the menu actions of a Query Builder. */ CustomizeToolbarActions: ASPxClientEvent>; + /** + * Enables you to customize the Query Builder's localization strings. + */ + CustomizeLocalization: ASPxClientEvent>; /** * Occurs when executing the Save command on the client. */ @@ -29034,7 +31766,7 @@ interface ASPxClientQueryBuilder extends ASPxClientControl { */ PerformCallback(arg: string, onSuccess: (arg1: string) => void): void; /** - * Updates the localization settings of the ASPxClientQueryBuilder properties. + * Updates the ASPxClientQueryBuilder properties' localization settings. * @param localization A dictionary containing the property names, along with their localized equivalents. */ UpdateLocalization(localization: { [key: string]: string; }): void; @@ -29091,6 +31823,16 @@ interface ASPxClientQueryBuilderCustomizeToolbarActionsEventHandler { */ (source: S, e: ASPxClientCustomizeMenuActionsEventArgs): void; } +/** + * A method that will handle the CustomizeLocalization event. + */ +interface ASPxClientQueryBuilderCustomizeLocalizationEventHandler { + /** + * A method that will handle the CustomizeLocalization event. + * @param source The event sender. + */ + (source: S): void; +} /** * The client-side equivalent of the Web Report Designer control. */ @@ -29104,7 +31846,7 @@ interface ASPxClientReportDesigner extends ASPxClientControl { */ EndCallback: ASPxClientEvent>; /** - * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientReportDesigner. + * Fires on the client if any server error occurs during server-side processing of a callback sent by ASPxClientReportDesigner. */ CallbackError: ASPxClientEvent>; /** @@ -29112,7 +31854,7 @@ interface ASPxClientReportDesigner extends ASPxClientControl { */ SaveCommandExecute: ASPxClientEvent>; /** - * Enables you to customize the menu actions of the Web Report Designer. + * Enables you to customize the Web Report Designer's menu actions. */ CustomizeMenuActions: ASPxClientEvent>; /** @@ -29143,6 +31885,14 @@ interface ASPxClientReportDesigner extends ASPxClientControl { * Occurs when a report has been opened in the Web Report Designer. */ ReportOpened: ASPxClientEvent>; + /** + * Occurs when a report tab is about to be closed in the Web Report Designer. + */ + ReportTabClosing: ASPxClientEvent>; + /** + * Occurs when a report tab was closed in the Web Report Designer. + */ + ReportTabClosed: ASPxClientEvent>; /** * Occurs on the client each time a server-side error raises. */ @@ -29152,7 +31902,7 @@ interface ASPxClientReportDesigner extends ASPxClientControl { */ ComponentAdded: ASPxClientEvent>; /** - * Enables you to customize UI elements of the Web Report Designer. + * Enables you to customize the Web Report Designer's UI elements. */ CustomizeElements: ASPxClientEvent>; /** @@ -29176,7 +31926,7 @@ interface ASPxClientReportDesigner extends ASPxClientControl { */ PreviewDocumentReady: ASPxClientEvent>; /** - * Occurs each time a value of an editing field changes in Print Preview. + * Occurs each time an editing field's value changes in Print Preview. */ PreviewEditingFieldChanged: ASPxClientEvent>; /** @@ -29188,17 +31938,25 @@ interface ASPxClientReportDesigner extends ASPxClientControl { */ PreviewCustomizeMenuActions: ASPxClientEvent>; /** - * Occurs when the left mouse button has been clicked over a report document in Print Preview. + * Occurs when the left mouse button is clicked on a report document in Print Preview. */ PreviewClick: ASPxClientEvent>; /** - * Occurs after report parameter values have been reset to their default values in Print Preview. + * Occurs after report parameter values are reset to their default values in Print Preview. */ PreviewParametersReset: ASPxClientEvent>; /** - * Occurs after report parameter values have been submitted in Print Preview. + * Occurs after report parameter values are submitted in Print Preview. */ PreviewParametersSubmitted: ASPxClientEvent>; + /** + * Enables you to customize the Web Report Designer's localization strings. + */ + CustomizeLocalization: ASPxClientEvent>; + /** + * Occurs before the Web Report Designer UI is initialized. + */ + BeforeRender: ASPxClientEvent>; /** * Sends a callback to the server with the specified argument. * @param arg A String value, specifying the callback argument. @@ -29211,18 +31969,18 @@ interface ASPxClientReportDesigner extends ASPxClientControl { */ PerformCallback(arg: string, onSuccess: (arg1: string) => void): void; /** - * Updates the localization settings of the ASPxClientReportDesigner properties. + * Updates the Report Designer properties' localization settings. * @param localization A dictionary containing the property names, along with their localized equivalents. */ UpdateLocalization(localization: { [key: string]: string; }): void; /** - * Returns the object model of a Web Report Designer. + * Provides access to a client-side model of a Web Report Designer. */ GetDesignerModel(): Object; /** - * Provides access to the preview model of the ASPxClientReportDesigner. + * Provides access to the Document Viewer's client-side model. */ - GetPreviewModel(): Object; + GetPreviewModel(): ASPxClientSidePreviewModel; /** * Returns information about the specified property of the specified control. * @param controlType A string that specifies the control type. @@ -29313,7 +32071,7 @@ interface ASPxClientReportDesigner extends ASPxClientControl { */ ReportStorageGetUrls(): any; /** - * Opens the specified report on the client side of the Web Report Designer. + * Opens the specified report on the Web Report Designer's client side. * @param url A string that specifies the URL of a report to be opened. */ OpenReport(url: string): void; @@ -29362,12 +32120,42 @@ interface ASPxClientReportDesignerDialogEventArgs extends ASPxClientEventArgs { * Value: An object that specifies the report currently being processed. */ Report: Object; +} +/** + * Provides data for the events related to opening and saving reports in the Web Report Designer. + */ +interface ASPxClientReportDesignerDialogCancelEventArgs extends ASPxClientReportDesignerDialogEventArgs { /** * Specifies whether or not the operation performed with a report should be canceled. * Value: true, if the operation should be canceled; otherwise, false. */ Cancel: boolean; } +/** + * Provides data for the ReportTabClosed event. + */ +interface ASPxClientReportDesignerTabEventArgs extends ASPxClientEventArgs { + /** + * Specifies the report tab currently being processed. + * Value: An object that specifies the report tab currently being processed. + */ + Tab: ASPxDesignerNavigateTab; +} +/** + * Provides data for the ReportTabClosing event. + */ +interface ASPxClientReportDesignerTabClosingEventArgs extends ASPxClientReportDesignerTabEventArgs { + /** + * Specifies whether or not the event was handled. + * Value: true, if the event was handled and no other processing should occur; otherwise, false. + */ + Handled: boolean; + /** + * Specifies the JQueryDeferred object, which when resolved, forces the report tab to be closed. + * Value: A JQueryDeferred object. + */ + ReadyToClose: JQueryDeferred; +} /** * Provides data for the OnServerError event. */ @@ -29513,9 +32301,9 @@ interface ASPxClientReportDesignerReportSavingEventHandler { /** * A method that will handle the ReportSaving event. * @param source The event sender. - * @param e An ASPxClientReportDesignerDialogEventArgs object that contains data related to the event. + * @param e An ASPxClientReportDesignerDialogCancelEventArgs object that contains data related to the event. */ - (source: S, e: ASPxClientReportDesignerDialogEventArgs): void; + (source: S, e: ASPxClientReportDesignerDialogCancelEventArgs): void; } /** * A method that will handle the ReportSaved event. @@ -29535,9 +32323,9 @@ interface ASPxClientReportDesignerReportOpeningEventHandler { /** * A method that will handle the ReportOpening event. * @param source The event sender. - * @param e An ASPxClientReportDesignerDialogEventArgs object that contains data related to the event. + * @param e An ASPxClientReportDesignerDialogCancelEventArgs object that contains data related to the event. */ - (source: S, e: ASPxClientReportDesignerDialogEventArgs): void; + (source: S, e: ASPxClientReportDesignerDialogCancelEventArgs): void; } /** * A method that will handle the ReportOpened event. @@ -29550,6 +32338,28 @@ interface ASPxClientReportDesignerReportOpenedEventHandler { */ (source: S, e: ASPxClientReportDesignerDialogEventArgs): void; } +/** + * A method that will handle the ReportTabClosing event. + */ +interface ASPxClientReportDesignerReportTabClosingEventHandler { + /** + * A method that will handle the ReportTabClosing event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerTabClosingEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerTabClosingEventArgs): void; +} +/** + * A method that will handle the ReportTabClosed event. + */ +interface ASPxClientReportDesignerReportTabClosedEventHandler { + /** + * A method that will handle the ReportTabClosed event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerTabEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerTabEventArgs): void; +} /** * A method that will handle the OnServerError event. */ @@ -29616,6 +32426,27 @@ interface ASPxClientReportDesignerCustomizeToolboxEventHandler { */ (source: S, e: ASPxClientReportDesignerCustomizeToolboxEventArgs): void; } +/** + * A method that will handle the CustomizeLocalization event. + */ +interface ASPxClientReportDesignerCustomizeLocalizationEventHandler { + /** + * A method that will handle the CustomizeLocalization event. + * @param source The event sender. + */ + (source: S): void; +} +/** + * A method that will handle the BeforeRender event. + */ +interface ASPxClientReportDesignerBeforeRenderEventHandler { + /** + * A method that will handle the BeforeRender event. + * @param source The event sender. + * @param designerModel A client-side Report Designer model. + */ + (source: S, designerModel: Object): void; +} /** * Provides information about a value editor used in the Property Grid. */ @@ -29994,7 +32825,7 @@ interface ASPxClientReportViewer extends ASPxClientControl { */ EndCallback: ASPxClientEvent>; /** - * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientReportViewer. + * Fires on the client if any server error occurs during server-side processing of a callback sent by ASPxClientReportViewer. */ CallbackError: ASPxClientEvent>; /** @@ -30147,10 +32978,10 @@ interface ASPxClientMenuAction { */ hotKey: ASPxClientMenuActionHotKey; /** - * Provides access to the value that specifies whether or not the command has a visual separator. + * Specifies whether or not the command has a visual separator. * Value: true, if the command has a visual separator; otherwise, false. */ - hasSeparator: string; + hasSeparator: boolean; /** * Provides access to a value that specifies the command location. * Value: A string that specifies the command location. @@ -30505,6 +33336,11 @@ interface ASPxClientPreviewClickEventArgs extends ASPxClientEventArgs { * Returns a string providing additional information on the Brick. */ GetBrickValue(): string; + /** + * Returns a string providing additional information about the current Brick by the specified key. + * @param key A string that specifies a unique key. + */ + GetBrickValue(key: string): string; } /** * Provides information about a visual brick used to render a report control to construct a document in the Web Document Viewer. @@ -30571,19 +33407,19 @@ interface ASPxClientWebDocumentViewerBrickNavigation { */ interface ASPxClientWebDocumentViewer extends ASPxClientControl { /** - * Occurs after a report document has been loaded to the Web Document Viewer. + * Occurs after the Web Document Viewer loads a report document. */ DocumentReady: ASPxClientEvent>; /** - * Occurs each time a value of an editing field changes. + * Occurs each time an editing field's value changes. */ EditingFieldChanged: ASPxClientEvent>; /** - * Enables you to customize UI elements of the Web Document Viewer. + * Allows you to customize the Web Document Viewer's UI elements. */ CustomizeElements: ASPxClientEvent>; /** - * Enables you to customize the menu actions of a Web Document Viewer. + * Enables you to customize the Web Document Viewer's menu actions. */ CustomizeMenuActions: ASPxClientEvent>; /** @@ -30595,27 +33431,44 @@ interface ASPxClientWebDocumentViewer extends ASPxClientControl { */ CustomizeParameterLookUpSource: ASPxClientEvent>; /** - * Occurs when the left mouse button has been clicked over a report document. + * Occurs when the left mouse button is clicked on a report document. */ PreviewClick: ASPxClientEvent>; /** - * Occurs after report parameter values have been reset to their default values. + * Occurs after report parameter values are reset to their default values. */ ParametersReset: ASPxClientEvent>; /** - * Occurs after report parameter values have been submitted. + * Occurs after report parameter values are submitted. */ ParametersSubmitted: ASPxClientEvent>; /** - * Provides access to the preview model of the ASPxClientWebDocumentViewer. + * Enables you to customize the Web Document Viewer's localization strings. */ - GetPreviewModel(): Object; + CustomizeLocalization: ASPxClientEvent>; /** - * Returns a model for a report parameter. + * Occurs before the Web Document Viewer UI is initialized. */ - GetParametersModel(): Object; + BeforeRender: ASPxClientEvent>; /** - * Opens the specified report on the client side of the Web Document Viewer. + * Provides access to the Document Viewer's client-side model. + */ + GetPreviewModel(): ASPxClientSidePreviewModel; + /** + * Provides access to the report preview. + */ + GetReportPreview(): ASPxClientReportPreview; + /** + * Provide access to the report parameters' client-side model. + */ + GetParametersModel(): ASPxClientSideParametersModel; + /** + * Enables navigation between drill-through reports on the client-side. + * @param customData Provides access to custom client data associated with a currently previewed report. + */ + DrillThrough(customData: string): any; + /** + * Opens the specified report on the Web Document Viewer's client side. * @param url A string that specifies the URL of a report to be opened. */ OpenReport(url: string): any; @@ -30644,7 +33497,7 @@ interface ASPxClientWebDocumentViewer extends ASPxClientControl { */ ExportTo(format: string, inlineResult: boolean): void; /** - * Returns the zero-based index of the currently displayed page. + * Returns the current page's zero-based index. */ GetCurrentPageIndex(): number; /** @@ -30653,11 +33506,11 @@ interface ASPxClientWebDocumentViewer extends ASPxClientControl { */ GoToPage(pageIndex: number): void; /** - * Closes the document currently being opened in the Web Document Viewer. + * Closes the document which is currently opened in the Web Document Viewer. */ Close(): void; /** - * Resets the values of report parameters to their default values. + * Resets the report parameter values to the default values. */ ResetParameters(): void; /** @@ -30665,7 +33518,22 @@ interface ASPxClientWebDocumentViewer extends ASPxClientControl { */ StartBuild(): void; /** - * Updates the localization settings of the ASPxClientWebDocumentViewer properties. + * Performs a custom operation with a currently opened document on the client side. + */ + PerformCustomDocumentOperation(): any; + /** + * Performs a custom operation with a currently opened document on the client-side. + * @param customData Provides access to custom client data associated with a target document operation. + */ + PerformCustomDocumentOperation(customData: string): any; + /** + * Performs a custom operation with a currently opened document on the client-side. + * @param customData Provides access to custom client data associated with a target document operation. + * @param hideMessageFromUser true, to hide a message with the operation result from a user; otherwise, false. + */ + PerformCustomDocumentOperation(customData: string, hideMessageFromUser: boolean): any; + /** + * Updates the Web Document Viewer properties' localization settings. * @param localization A dictionary containing the property names, along with their localized equivalents. */ UpdateLocalization(localization: { [key: string]: string; }): void; @@ -30769,6 +33637,219 @@ interface ASPxClientWebDocumentViewerParametersSubmittedEventHandler { */ (source: S, e: ASPxClientParametersSubmittedEventArgs): void; } +/** + * A method that will handle the CustomizeLocalization event. + */ +interface ASPxClientWebDocumentViewerCustomizeLocalizationEventHandler { + /** + * A method that will handle the CustomizeLocalization event. + * @param source The event sender. + */ + (source: S): void; +} +/** + * A method that will handle the BeforeRender event. + */ +interface ASPxClientWebDocumentViewerBeforeRenderEventHandler { + /** + * A method that will handle the BeforeRender event. + * @param source The event sender. + * @param previewModel A client-side Document Viewer model. + */ + (source: S, previewModel: Object): void; +} +/** + * Provides information about the result of preforming a custom document operation on the client side. + */ +interface ASPxClientWebDocumentViewerDocumentOperationResponse { + /** + * Specifies whether a document operation has been successfully performed. + * Value: true, if the document operation has been successfully performed; otherwise, false. + */ + succeeded: boolean; + /** + * Specifies the error message to display if performing a document operation fails. + * Value: A string specifying the text of the error message. + */ + message: string; + /** + * Specifies custom data associated with the performed document operation. + * Value: A string containing information associated with the document operation. + */ + customData: string; + /** + * Specifies the document ID. + * Value: A string that specifies the document ID. + */ + documentId: string; +} +/** + * Provides information a client-side Document Preview model. + */ +interface ASPxClientSidePreviewModel { + /** + * Provides access to the report preview. + * Value: An object that specifies the report preview. + */ + reportPreview: ASPxClientReportPreview; + /** + * Provides access to a panel at the right of the Document Viewer. + * Value: An object that specifies the panel at the right of the Document Viewer. + */ + tabPanel: ASPxClientDocumentPreviewTabPanel; + /** + * Opens the specified report on the Web Document Viewer's client side. + * @param url A string that specifies the URL of a report to be opened. + */ + OpenReport(url: string): any; + /** + * Prints the current document. + */ + Print(): void; + /** + * Prints the document's page with the specified index. + * @param pageIndex An index of the page to be printed. + */ + Print(pageIndex: number): void; + /** + * Exports the document to a PDF file. + */ + ExportTo(): void; + /** + * Exports the document to a specified file format. + * @param format A String value, specifying the export format. The following formats are currently supported: 'csv', 'html', 'image', 'mht', 'pdf', 'rtf', 'docx', 'txt', 'xls', and 'xlsx'. + */ + ExportTo(format: string): void; + /** + * Exports the document to a specified file format. + * @param format A String value that specifies the export format. The following formats are currently supported: 'csv', 'html', 'image', 'mht', 'pdf', 'rtf', 'docx', 'txt', 'xls', and 'xlsx'. + * @param inlineResult true, to try opening the result file in a new browser tab without a download; otherwise, false. + */ + ExportTo(format: string, inlineResult: boolean): void; + /** + * Returns the current page's zero-based index. + */ + GetCurrentPageIndex(): number; + /** + * Displays the report page with the specified page index. + * @param pageIndex A zero-based integer value that specifies the index of a page to be displayed. + */ + GoToPage(pageIndex: number): void; + /** + * Closes the document which is currently opened in the Web Document Viewer. + */ + Close(): void; + /** + * Resets the report parameter values to the default values. + */ + ResetParameters(): void; + /** + * Starts building a report document. + */ + StartBuild(): void; + /** + * Provide access to the report parameters' client-side model. + */ + GetParametersModel(): ASPxClientSideParametersModel; +} +/** + * Provides information about the Document Viewer's tab panel. + */ +interface ASPxClientDocumentPreviewTabPanel { + /** + * Specifies the width of the panel at the right of the Document Viewer. + * Value: A knockout observable object that specifies the tab panel width. + */ + width: any; + /** + * Specifies whether the panel at the right of the Document Viewer is collapsed. + * Value: A knockout observable object that specifies whether the tab panel is collapsed. + */ + collapsed: any; + /** + * Provides access to the tabs of the panel at the right of the Document Viewer. + * Value: A collection of ASPxClientDocumentPreviewTab objects. + */ + tabs: ASPxClientDocumentPreviewTab[]; +} +/** + * Provides information about a tab available in the Document Viewer. + */ +interface ASPxClientDocumentPreviewTab { + /** + * Provides access to the name of an HTML template used by a tab. + * Value: A knockout observable string that specifies the name of the HTML template used by the tab. + */ + template: string; + /** + * Provides access to the tab text. + * Value: A string that specifies the tab text. + */ + text: string; + /** + * Provides access to a tab model. + * Value: An object that specifies the tab model. + */ + model: Object; + /** + * Provides access to the value that specifies whether a tab is active. + * Value: A knockout observable object that specifies whether the tab is active. + */ + active: any; + /** + * Provides access to the value that specifies whether a tab is visible. + * Value: A knockout observable object that specifies whether the tab is visible. + */ + visible: any; +} +/** + * Provides information about the report parameters' client-side model. + */ +interface ASPxClientSideParametersModel { + /** + * Provides information about the tab for specifying parameter values. + * Value: An object that provides information about the Parameters tab. + */ + tabInfo: ASPxClientDocumentPreviewTab; + /** + * Initiates passing parameter values and generating the report document. + */ + submit(): void; + /** + * Serializes report parameters before passing them to the server. + */ + serializeParameters(): void; +} +/** + * Provides information about a report preview. + */ +interface ASPxClientReportPreview { + /** + * Zooms the Document Viewer's current document. + * Value: A knockout observable object that specifies the zoom factor. + */ + zoom: any; + /** + * Enables the Document Viewer's multi-page mode. + * Value: A knockout observable object that specifies whether the multi-page mode is enabled. + */ + showMultipagePreview: any; + /** + * Provides access to the current document page's index. + * Value: A knockout observable object that specifies the zero-based index of the current page. + */ + pageIndex: any; + /** + * Provides access to document pages. + * Value: An array of objects that specify document pages. + */ + pages: any; + /** + * Provides access to a value that specifies whether the document is currently building. + * Value: A knockout observable object that specifies whether the document is building. + */ + documentBuilding: any; +} interface MVCxClientDashboardViewerStatic extends ASPxClientDashboardViewerStatic { } @@ -30812,7 +33893,7 @@ interface DashboardSpecialValuesStatic { */ OthersValue: string; /** - * Represents an error value for calculated fields. + * Represents an error value (for instance, this can be a calculated field value that cannot be evaluated). */ ErrorValue: string; /** @@ -30890,6 +33971,20 @@ interface DashboardExportScaleModeStatic { */ AutoFitWithinOnePage: string; } +interface DashboardExportDocumentScaleModeStatic { + /** + * The dashboard / dashboard item on the exported page retains its original size. + */ + None: string; + /** + * The size of the dashboard / dashboard item on the exported page is changed according to the scale factor value (ScaleFactor). + */ + UseScaleFactor: string; + /** + * The size of the dashboard / dashboard item is changed according to the width of the exported pages. + */ + AutoFitToPagesWidth: string; +} interface DashboardExportFilterStateStatic { /** * The filter state is not included in the exported document. @@ -31156,6 +34251,18 @@ interface ASPxClientEditStatic extends ASPxClientEditBaseStatic { * Verifies whether visible editors on a page are valid. */ AreEditorsValid(): boolean; + /** + * Attaches a handler to the ASPxClientEdit's event indicating whether the editor has been changed since the previous state. + * @param handler An object representing a handler. + * @param predicate An ASPxClientControlPredicate object representing the predicate criteria. + */ + AttachEditorModificationListener(handler: Object, predicate: ASPxClientControlPredicate): void; + /** + * Detaches a handler from the editor's event if the editor meets the predicate criteria. + * @param handler An object representing a handler. + * @param predicate An ASPxClientControlPredicate object representing a predicate criteria. + */ + DetachEditorModificationListener(handler: Object, predicate: ASPxClientControlPredicate): void; } interface ASPxClientBinaryImageStatic extends ASPxClientEditStatic { /** @@ -31538,11 +34645,41 @@ interface ASPxClientGridViewCallbackCommandStatic { * Default value: "TOOLBAR" */ Toolbar: string; + /** + * Default value: "EXPORT" + */ + Export: string; /** * Default value: "CUSTOMVALUES" */ CustomValues: string; } +interface ASPxClientGridExportFormatStatic { + /** + * Identifies Portable Document Format (.pdf). + */ + Pdf: string; + /** + * Identifies DOCX format (.docx). + */ + Docx: string; + /** + * Identifies Rich Text Format (.rtf). + */ + Rtf: string; + /** + * Identifies Comma Separated Values format (.csv). + */ + Csv: string; + /** + * Identifies Excel Binary File format (.xls). + */ + Xls: string; + /** + * Identifies XML spreadsheet file format (.xlsx). + */ + Xlsx: string; +} interface ASPxClientGridLookupStatic extends ASPxClientDropDownEditBaseStatic { /** * 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. @@ -31557,6 +34694,8 @@ interface ASPxClientCardViewStatic extends ASPxClientGridBaseStatic { */ Cast(obj: Object): ASPxClientCardView; } +interface ASPxClientCardViewExportFormatStatic extends ASPxClientGridExportFormatStatic { +} interface ASPxClientGridViewStatic extends ASPxClientGridBaseStatic { /** * 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. @@ -31564,6 +34703,8 @@ interface ASPxClientGridViewStatic extends ASPxClientGridBaseStatic { */ Cast(obj: Object): ASPxClientGridView; } +interface ASPxClientGridViewExportFormatStatic extends ASPxClientGridExportFormatStatic { +} interface ASPxClientVerticalGridStatic extends ASPxClientGridBaseStatic { /** * 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. @@ -31577,6 +34718,8 @@ interface ASPxClientVerticalGridCallbackCommandStatic { */ ExpandRow: string; } +interface ASPxClientVerticalGridExportFormatStatic extends ASPxClientGridExportFormatStatic { +} interface ASPxClientCommandConstsStatic { /** * Identifies a command that shows a search panel. @@ -32106,6 +35249,27 @@ interface ASPxClientHtmlEditorStatic extends ASPxClientControlStatic { * @param data An object representing custom data associated with a custom dialog. */ CustomDialogComplete(status: Object, data: Object): void; + /** + * Highlights the text. + * @param text A string value specifying the text to be highlighted. + * @param searchContainer An object specifying the container where the specified text should be searched. + */ + HighlightText(text: string, searchContainer: Object): void; + /** + * Highlights the text with the specified settings. + * @param text A string value specifying the text to be highlighted. + * @param searchContainer An object specifying the container where the specified text should be searched. + * @param className A string value specifying the text color. + */ + HighlightText(text: string, searchContainer: Object, className: string): void; + /** + * Highlights the text with the specified text color and background color. + * @param text A string value specifying the text to be highlighted. + * @param searchContainer An object specifying the container where the specified text should be searched. + * @param color A string value specifying the text color. + * @param backgroundColor A string value specifying the background color. + */ + HighlightText(text: string, searchContainer: Object, color: string, backgroundColor: string): void; } interface ASPxClientHtmlEditorMediaPreloadModeStatic { /** @@ -32229,6 +35393,28 @@ interface ASPxClientTreeListStatic extends ASPxClientControlStatic { */ Cast(obj: Object): ASPxClientTreeList; } +interface ASPxClientTreeListExportFormatStatic { + /** + * Identifies Portable Document Format (.pdf). + */ + Pdf: string; + /** + * Identifies DOCX format (.docx). + */ + Docx: string; + /** + * Identifies Rich Text Format (.rtf). + */ + Rtf: string; + /** + * Identifies Excel Binary File format (.xls). + */ + Xls: string; + /** + * Identifies XML spreadsheet file format (.xlsx). + */ + Xlsx: string; +} interface BootstrapClientAccordionStatic extends ASPxClientNavBarStatic { } interface BootstrapClientBinaryImageStatic extends ASPxClientHyperLinkStatic { @@ -32239,14 +35425,6 @@ interface BootstrapClientCalendarStatic extends ASPxClientCalendarStatic { } interface BootstrapClientCallbackPanelStatic extends ASPxClientControlStatic { } -interface BootstrapClientChartBaseStatic extends ASPxClientControlStatic { -} -interface BootstrapClientChartStatic extends BootstrapClientChartBaseStatic { -} -interface BootstrapClientPolarChartStatic extends BootstrapClientChartBaseStatic { -} -interface BootstrapClientPieChartStatic extends BootstrapClientChartBaseStatic { -} interface BootstrapClientCheckBoxStatic extends ASPxClientEditStatic { } interface BootstrapClientRadioButtonStatic extends BootstrapClientCheckBoxStatic { @@ -32281,24 +35459,45 @@ interface BootstrapClientProgressBarStatic extends ASPxClientProgressBarStatic { } interface BootstrapClientSpinEditStatic extends ASPxClientSpinEditStatic { } +interface BootstrapClientTimeEditStatic extends ASPxClientTimeEditStatic { +} interface BootstrapClientTabControlStatic extends ASPxClientTabControlStatic { } interface BootstrapClientPageControlStatic extends ASPxClientPageControlStatic { } +interface BootstrapClientTagBoxStatic extends ASPxClientTokenBoxStatic { +} interface BootstrapClientTextBoxStatic extends ASPxClientTextBoxStatic { } interface BootstrapClientMemoStatic extends ASPxClientMemoStatic { } interface BootstrapClientButtonEditStatic extends ASPxClientButtonEditStatic { } -interface BootstrapClientTreeViewStatic extends ASPxClientTreeViewStatic { +interface BootstrapClientToolbarStatic extends BootstrapClientMenuStatic { } -interface BootstrapUIWidgetBaseStatic extends ASPxClientControlStatic { +interface BootstrapClientTreeViewStatic extends ASPxClientTreeViewStatic { } interface BootstrapClientUploadControlStatic extends ASPxClientUploadControlStatic { } +interface BootstrapClientUtilsStatic { + UpdateDefaultStyles(): void; +} interface BootstrapClientGridViewStatic extends ASPxClientGridViewStatic { } +interface BootstrapClientCardViewStatic extends ASPxClientGridViewStatic { +} +interface BootstrapUIWidgetBaseStatic extends ASPxClientControlStatic { +} +interface BootstrapClientChartBaseStatic extends BootstrapUIWidgetBaseStatic { +} +interface BootstrapClientChartStatic extends BootstrapClientChartBaseStatic { +} +interface BootstrapClientPolarChartStatic extends BootstrapClientChartBaseStatic { +} +interface BootstrapClientPieChartStatic extends BootstrapClientChartBaseStatic { +} +interface BootstrapClientRangeSelectorStatic extends BootstrapUIWidgetBaseStatic { +} interface MVCxClientCalendarStatic extends ASPxClientCalendarStatic { /** * 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. @@ -32728,6 +35927,28 @@ interface ASPxClientFileManagerErrorConstsStatic { */ AlreadyExists: number; } +interface ASPxClientFileManagerCallbackCommandStatic { + GetAllItems: string; + GetFileList: string; + Refresh: string; + DeleteItems: string; + MoveItems: string; + CopyItems: string; + RenameItem: string; + Download: string; + ShowFolderBrowserDialog: string; + ShowCreateFolderEditorInTreeView: string; + CreateFolder: string; + SelectedFileOpened: string; + FoldersTreeView: string; + FolderBrowserTreeView: string; + GridView: string; + ChangeFolder: string; + ChangeFolderInTreeView: string; + CustomCallback: string; + VirtualScrolling: string; + GridViewVirtualScrolling: string; +} 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. @@ -33384,10 +36605,10 @@ interface ASPxClientUtilsStatic { DeleteCookie(name: string): void; /** * Returns a specifically generated code that uniquely identifies the combination of keys specified via the parameters. - * @param keyCode An integer value that specifies the code of the key. - * @param isCtrlKey true if the CTRL key should be included into the key combination; otherwise, false. - * @param isShiftKey true if the SHIFT key should be included into the key combination; otherwise, false. - * @param isAltKey true if the ALT key should be included into the key combination; otherwise, false. + * @param keyCode An integer value that specifies the code of the key. Codes are available via the ASPx.KeyCode client object's members. + * @param isCtrlKey true, if the CTRL key should be included into the key combination; otherwise, false. + * @param isShiftKey true, if the SHIFT key should be included into the key combination; otherwise, false. + * @param isAltKey true, if the ALT key should be included into the key combination; otherwise, false. */ GetShortcutCode(keyCode: number, isCtrlKey: boolean, isShiftKey: boolean, isAltKey: boolean): number; /** @@ -33415,6 +36636,17 @@ interface ASPxClientUtilsStatic { * @param str A string value representing the string for trimming. */ TrimEnd(str: string): string; + /** + * Returns values of editors located in the specified container. + * @param containerOrId A container of editors, or its ID. + */ + GetEditorValuesInContainer(containerOrId: Object): Object; + /** + * Returns values of editors located in the specified container. + * @param containerOrId A container of editors, or its ID. + * @param processInvisibleEditors true to process both visible and invisible editors that belong to the specified container; false to process only visible editors. + */ + GetEditorValuesInContainer(containerOrId: Object, processInvisibleEditors: boolean): Object; /** * Specifies the text that Assistive Technologies (screen readers or braille display, for example) will provide to a user. * @param message A String value that specifies a text. @@ -33488,6 +36720,7 @@ declare var DashboardSpecialValues: DashboardSpecialValuesStatic; declare var DashboardExportPageLayout: DashboardExportPageLayoutStatic; declare var DashboardExportPaperKind: DashboardExportPaperKindStatic; declare var DashboardExportScaleMode: DashboardExportScaleModeStatic; +declare var DashboardExportDocumentScaleMode: DashboardExportDocumentScaleModeStatic; declare var DashboardExportFilterState: DashboardExportFilterStateStatic; declare var DashboardStateExportPosition: DashboardStateExportPositionStatic; declare var DashboardStateExcelExportPosition: DashboardStateExcelExportPositionStatic; @@ -33541,11 +36774,15 @@ declare var ASPxClientValidationSummary: ASPxClientValidationSummaryStatic; declare var ASPxClientGaugeControl: ASPxClientGaugeControlStatic; declare var ASPxClientGridBase: ASPxClientGridBaseStatic; declare var ASPxClientGridViewCallbackCommand: ASPxClientGridViewCallbackCommandStatic; +declare var ASPxClientGridExportFormat: ASPxClientGridExportFormatStatic; declare var ASPxClientGridLookup: ASPxClientGridLookupStatic; declare var ASPxClientCardView: ASPxClientCardViewStatic; +declare var ASPxClientCardViewExportFormat: ASPxClientCardViewExportFormatStatic; declare var ASPxClientGridView: ASPxClientGridViewStatic; +declare var ASPxClientGridViewExportFormat: ASPxClientGridViewExportFormatStatic; declare var ASPxClientVerticalGrid: ASPxClientVerticalGridStatic; declare var ASPxClientVerticalGridCallbackCommand: ASPxClientVerticalGridCallbackCommandStatic; +declare var ASPxClientVerticalGridExportFormat: ASPxClientVerticalGridExportFormatStatic; declare var ASPxClientCommandConsts: ASPxClientCommandConstsStatic; declare var ASPxClientHtmlEditor: ASPxClientHtmlEditorStatic; declare var ASPxClientHtmlEditorMediaPreloadMode: ASPxClientHtmlEditorMediaPreloadModeStatic; @@ -33567,15 +36804,12 @@ declare var ASPxClientSpellChecker: ASPxClientSpellCheckerStatic; declare var ASPxClientSpellCheckerStopCheckingReason: ASPxClientSpellCheckerStopCheckingReasonStatic; declare var ASPxClientSpreadsheet: ASPxClientSpreadsheetStatic; declare var ASPxClientTreeList: ASPxClientTreeListStatic; +declare var ASPxClientTreeListExportFormat: ASPxClientTreeListExportFormatStatic; declare var BootstrapClientAccordion: BootstrapClientAccordionStatic; declare var BootstrapClientBinaryImage: BootstrapClientBinaryImageStatic; declare var BootstrapClientButton: BootstrapClientButtonStatic; declare var BootstrapClientCalendar: BootstrapClientCalendarStatic; declare var BootstrapClientCallbackPanel: BootstrapClientCallbackPanelStatic; -declare var BootstrapClientChartBase: BootstrapClientChartBaseStatic; -declare var BootstrapClientChart: BootstrapClientChartStatic; -declare var BootstrapClientPolarChart: BootstrapClientPolarChartStatic; -declare var BootstrapClientPieChart: BootstrapClientPieChartStatic; declare var BootstrapClientCheckBox: BootstrapClientCheckBoxStatic; declare var BootstrapClientRadioButton: BootstrapClientRadioButtonStatic; declare var BootstrapClientComboBox: BootstrapClientComboBoxStatic; @@ -33593,15 +36827,25 @@ declare var BootstrapClientPopupControl: BootstrapClientPopupControlStatic; declare var BootstrapClientPopupMenu: BootstrapClientPopupMenuStatic; declare var BootstrapClientProgressBar: BootstrapClientProgressBarStatic; declare var BootstrapClientSpinEdit: BootstrapClientSpinEditStatic; +declare var BootstrapClientTimeEdit: BootstrapClientTimeEditStatic; declare var BootstrapClientTabControl: BootstrapClientTabControlStatic; declare var BootstrapClientPageControl: BootstrapClientPageControlStatic; +declare var BootstrapClientTagBox: BootstrapClientTagBoxStatic; declare var BootstrapClientTextBox: BootstrapClientTextBoxStatic; declare var BootstrapClientMemo: BootstrapClientMemoStatic; declare var BootstrapClientButtonEdit: BootstrapClientButtonEditStatic; +declare var BootstrapClientToolbar: BootstrapClientToolbarStatic; declare var BootstrapClientTreeView: BootstrapClientTreeViewStatic; -declare var BootstrapUIWidgetBase: BootstrapUIWidgetBaseStatic; declare var BootstrapClientUploadControl: BootstrapClientUploadControlStatic; +declare var BootstrapClientUtils: BootstrapClientUtilsStatic; declare var BootstrapClientGridView: BootstrapClientGridViewStatic; +declare var BootstrapClientCardView: BootstrapClientCardViewStatic; +declare var BootstrapUIWidgetBase: BootstrapUIWidgetBaseStatic; +declare var BootstrapClientChartBase: BootstrapClientChartBaseStatic; +declare var BootstrapClientChart: BootstrapClientChartStatic; +declare var BootstrapClientPolarChart: BootstrapClientPolarChartStatic; +declare var BootstrapClientPieChart: BootstrapClientPieChartStatic; +declare var BootstrapClientRangeSelector: BootstrapClientRangeSelectorStatic; declare var MVCxClientCalendar: MVCxClientCalendarStatic; declare var MVCxClientCallbackPanel: MVCxClientCallbackPanelStatic; declare var MVCxClientCardView: MVCxClientCardViewStatic; @@ -33651,6 +36895,7 @@ declare var ASPxClientDockZone: ASPxClientDockZoneStatic; declare var ASPxClientFileManager: ASPxClientFileManagerStatic; declare var ASPxClientFileManagerCommandConsts: ASPxClientFileManagerCommandConstsStatic; declare var ASPxClientFileManagerErrorConsts: ASPxClientFileManagerErrorConstsStatic; +declare var ASPxClientFileManagerCallbackCommand: ASPxClientFileManagerCallbackCommandStatic; declare var ASPxClientFormLayout: ASPxClientFormLayoutStatic; declare var ASPxClientHiddenField: ASPxClientHiddenFieldStatic; declare var ASPxClientHint: ASPxClientHintStatic; diff --git a/types/devexpress-web/v171/devexpress-web-tests.ts b/types/devexpress-web/v171/devexpress-web-tests.ts new file mode 100644 index 0000000000..ef7eb8de37 --- /dev/null +++ b/types/devexpress-web/v171/devexpress-web-tests.ts @@ -0,0 +1,418 @@ +declare var hiddenField: ASPxClientHiddenField; +declare var mainCallbackPanel: ASPxClientCallbackPanel; +declare var loginPopup: ASPxClientPopupControl; +declare var searchButton: ASPxClientButton; +declare var searchComboBox: ASPxClientComboBox; +declare var roomsNumberSpinEdit: ASPxClientSpinEdit; +declare var adultsNumberSpinEdit: ASPxClientSpinEdit; +declare var childrenNumberSpinEdit: ASPxClientSpinEdit; +declare var checkInDateEdit: ASPxClientDateEdit; +declare var checkOutDateEdit: ASPxClientDateEdit; +declare var backSlider: ASPxClientImageSlider; +declare var locationComboBox: ASPxClientComboBox; +declare var nightyRateTrackBar: ASPxClientTrackBar; +declare var customerRatingTrackBar: ASPxClientTrackBar; +declare var ourRatingCheckBoxList: ASPxClientCheckBoxList; +declare var startFilterPopupControl: ASPxClientPopupControl; +declare var imagePopupControl: ASPxClientPopupControl; +declare var emailTextBox: ASPxClientTextBox; +declare var creditCardEmailTextBox: ASPxClientTextBox; +declare var accountEmailTextBox: ASPxClientTextBox; +declare var bookingPageControl: ASPxClientPageControl; +declare var paymentTypePageControl: ASPxClientPageControl; +declare var offerFormPopup: ASPxClientPopupControl; +declare var roomsSpinEdit: ASPxClientSpinEdit; +declare var adultsSpinEdit: ASPxClientSpinEdit; +declare var childrenSpinEdit: ASPxClientSpinEdit; +declare var hotelDetailsCallbackPanel: ASPxClientCallbackPanel; +declare var leftPanel: ASPxClientPanel; +declare var menuButton: ASPxClientButton; +declare var aboutWindow: ASPxClientPopupControl; +declare var offersZone: ASPxClientDockZone; + +module DXDemo { + function showPage(page: string, params: { [key: string]: any }, skipHistory?: boolean): void { + var queryString = getQueryString(params || {}); + hiddenField.Set("page", page); + hiddenField.Set("parameters", queryString); + hideMenu(); + var uri = queryString.length ? (page + "?" + queryString) : page; + try { + if (!skipHistory && window.history && window.history.pushState) + window.history.pushState(uri, "", uri || "Default.aspx"); + } catch (e) { } + mainCallbackPanel.PerformCallback(uri); + }; + + export function onMainMenuItemClick(s: ASPxClientMenu, e: ASPxClientMenuItemClickEventArgs): void { + switch (e.item.name) { + case "login": + hideMenu(); + setTimeout(function () { loginPopup.ShowAtElementByID("MainCallbackPanel_ContentPane"); }, 300); + break; + case "offers": + showPage("SpecialOffers", {}); + break; + default: + hideMenu(); + setTimeout(function () { showAboutWindow(); }, 300); + break; + } + }; + + export function onLoginButtonClick(s: ASPxClientButton, e: ASPxClientButtonClickEventArgs): void { + loginPopup.Hide(); + showAboutWindow(); + }; + + export function onSearchButtonClick(): void { + if (ASPxClientEdit.ValidateGroup("DateEditors")) { + showPage("ShowHotels", { + location: searchComboBox.GetValue(), + checkin: getFormattedDate(checkInDateEdit.GetValue()), + checkout: getFormattedDate(checkOutDateEdit.GetValue()), + rooms: roomsNumberSpinEdit.GetValue() || 1, + adults: adultsNumberSpinEdit.GetValue() || 1, + children: childrenNumberSpinEdit.GetValue() || 0 + }); + } + }; + + export function onSearchComboBoxIndexChanged(s: ASPxClientComboBox, e: ASPxClientProcessingModeEventArgs): void { + hideMenu(); + searchButton.AdjustControl(); + }; + + export function onIndexOfferCloseClick(index: number): void { + var panel = ASPxClientControl.GetControlCollection().GetByName("OfferDockPanel" + index); + var sibPanel = ASPxClientControl.GetControlCollection().GetByName("OfferDockPanel" + (index == 1 ? 2 : 1)); + panel.Hide(); + sibPanel.MakeFloat(); + sibPanel.SetWidth(offersZone.GetWidth()); + sibPanel.Dock(offersZone); + }; + + export function onLogoClick(): void { + showPage("", null, false); + }; + + export function onMenuNavButtonCheckedChanged(s: ASPxClientCheckBox, e: ASPxClientProcessingModeEventArgs): void { + var mainContainer = mainCallbackPanel.GetMainElement(); + if (s.GetChecked()) { + backSlider.Pause(); + showMenu(); + } + else { + hideMenu(); + backSlider.Play(); + } + }; + + export function onBackNavButtonClick(s: ASPxClientButton, e: ASPxClientButtonClickEventArgs): void { + var params = getCurrentQueryParams(); + switch (getCurrentPage()) { + case "PrintInvoice": + showPage("Booking", params, false); + break; + case "Booking": + if (bookingPageControl.GetActiveTabIndex() > 0) + bookingPageControl.SetActiveTabIndex(bookingPageControl.GetActiveTabIndex() - 1); + else + showPage("ShowRooms", params, false); + break; + case "ShowRooms": + showPage("ShowHotels", params, false); + break; + case "ShowDetails": + showPage("ShowHotels", params, false); + break; + case "ShowHotels": + case "SpecialOffers": + showPage("", null, false); + break; + } + }; + + export function updateSearchResults(): void { + var params = getCurrentQueryParams(); + params["location"] = locationComboBox.GetValue(); + params["minprice"] = nightyRateTrackBar.GetPositionStart(); + params["maxprice"] = nightyRateTrackBar.GetPositionEnd(); + params["custrating"] = customerRatingTrackBar.GetPosition(); + params["ourrating"] = ourRatingCheckBoxList.GetSelectedValues().join(","); + showPage("ShowHotels", params); + }; + + export function onBookHotelButtonClick(hotelID: string): void { + var queryParams = getCurrentQueryParams(); + queryParams["hotelID"] = hotelID; + showPage("ShowRooms", queryParams); + }; + + export function onDetailsHotelButtonClick(hotelID: string): void { + var queryParams = getCurrentQueryParams(); + queryParams["hotelID"] = hotelID; + showPage("ShowDetails", queryParams); + }; + + export function onShowStartFilterButtonClick(s: ASPxClientButton, e: ASPxClientButtonClickEventArgs): void { + startFilterPopupControl.ShowAtElementByID("MainCallbackPanel_ContentPane"); + }; + + export function onChangeStartFilterButtonClick(s: ASPxClientButton, e: ASPxClientButtonClickEventArgs): void { + if (ASPxClientEdit.ValidateGroup("DateEditors")) { + var params = getCurrentQueryParams(); + params["checkin"] = getFormattedDate(checkInDateEdit.GetValue()); + params["checkout"] = getFormattedDate(checkOutDateEdit.GetValue()); + params["rooms"] = roomsNumberSpinEdit.GetValue() || 1; + params["adults"] = adultsNumberSpinEdit.GetValue() || 1; + params["children"] = childrenNumberSpinEdit.GetValue() || 0; + startFilterPopupControl.Hide(); + showPage(hiddenField.Get("page").toString(), params); + } + }; + + export function onBookRoomButtonClick(roomID: string): void { + var params = getCurrentQueryParams(); + params["roomID"] = roomID; + showPage("Booking", params); + }; + + export function onShowRoomsButtonClick(): void { + var queryParams = getCurrentQueryParams(); + showPage("ShowRooms", queryParams); + }; + + export function onShowDetailsButtonClick(): void { + var queryParams = getCurrentQueryParams(); + showPage("ShowDetails", queryParams); + }; + + export function onRoomImageNavItemClick(roomID: string, pictureName: string): void { + setTimeout(function () { + imagePopupControl.PerformCallback(roomID + "|" + pictureName); + imagePopupControl.ShowAtElementByID("MainCallbackPanel_ContentPane"); + }, 500); + }; + + export function onRoomsNavBarExpandedChanged(s: ASPxClientNavBar, e: ASPxClientNavBarGroupEventArgs): void { + ASPxClientControl.AdjustControls(s.GetMainElement()); + }; + + export function onNextBookingStepButtonClick(step: number): void { + var valid = true; + var validationGroup = ""; + if (step == 1) + validationGroup = "Account"; + if (step == 2) + validationGroup = "RoomDetails"; + if (step == 3) + validationGroup = "PaymentDetails"; + + switch (step) { + case 1: + valid = ASPxClientEdit.ValidateEditorsInContainer(bookingPageControl.GetMainElement(), "Account"); + if (valid) { + emailTextBox.SetValue(accountEmailTextBox.GetValue()); + creditCardEmailTextBox.SetValue(accountEmailTextBox.GetValue()); + showPage("Booking", getCurrentQueryParams()); + return; + } + break; + case 2: + valid = ASPxClientEdit.ValidateEditorsInContainer(bookingPageControl.GetMainElement(), "RoomDetails"); + emailTextBox.SetValue(accountEmailTextBox.GetValue()); + break; + case 3: + var paymentType = paymentTypePageControl.GetActiveTabIndex(); + if (paymentType == 0) + valid = ASPxClientEdit.ValidateEditorsInContainer(bookingPageControl.GetMainElement(), "CreditCard"); + else if (paymentType == 1) + valid = ASPxClientEdit.ValidateEditorsInContainer(bookingPageControl.GetMainElement(), "Cash"); + else if (paymentType == 2) + valid = ASPxClientEdit.ValidateEditorsInContainer(bookingPageControl.GetMainElement(), "PayPal"); + break; + } + if (valid) { + bookingPageControl.GetTab(step).SetEnabled(true); + bookingPageControl.SetActiveTabIndex(step); + } + }; + + export function onAccountCaptchaHiddenFieldInit(s: ASPxClientHiddenField, e: ASPxClientEventArgs): void { + if (s.Get("IsCaptchaValid")) { + bookingPageControl.GetTab(1).SetEnabled(true); + bookingPageControl.SetActiveTabIndex(1); + } + }; + + export function onFinishBookingStepButtonClick(): void { + showAboutWindow(); + }; + + export function OnPrintInvoiceButtonClick(): void { + showPage("PrintInvoice", getCurrentQueryParams()); + }; + + export function onOfferClick(offerID: string): void { + offerFormPopup.SetContentHtml(""); + offerFormPopup.PerformCallback(offerID); + var panel = ASPxClientControl.GetControlCollection().GetByName("DockPanel" + offerID); + var panelElement = panel.GetMainElement(); + if (panelElement.offsetWidth < 330 || panelElement.offsetHeight < 250) { + offerFormPopup.SetWidth(400); + offerFormPopup.SetHeight(280); + offerFormPopup.ShowAtElementByID("SpecialOffersContainer"); + } + else { + offerFormPopup.SetWidth(panelElement.offsetWidth); + offerFormPopup.SetHeight(panelElement.offsetHeight); + offerFormPopup.ShowAtElement(panelElement); + } + }; + + export function onSpecialOfferCheckButtonClick(hotelID: string, locationID: string): void { + if (ASPxClientEdit.ValidateGroup("DateEditors")) { + var queryParams: { [key: string]: any } = { + location: locationID, + hotelID: hotelID, + checkin: getFormattedDate(checkInDateEdit.GetValue()), + checkout: getFormattedDate(checkOutDateEdit.GetValue()), + rooms: roomsSpinEdit.GetValue() || 1, + adults: adultsSpinEdit.GetValue() || 1, + children: childrenSpinEdit.GetValue() || 0 + }; + showPage("ShowRooms", queryParams); + } + }; + + export function onIndexOfferClick(): void { + showPage("SpecialOffers", {}); + }; + + export function onControlsInit(): void { + ASPxClientUtils.AttachEventToElement(window, 'popstate', onHistoryPopState); + var pathParts = document.location.href.split("/"); + var url = pathParts[pathParts.length - 1]; + try { + if (window.history) + window.history.replaceState(url, ""); + } catch (e) { } + ASPxClientUtils.AttachEventToElement(window, "resize", onWindowResize); + if (ASPxClientUtils.iOSPlatform) { + // animate + } + }; + + export function updateRatingLabels(ratingControl: ASPxClientTrackBar) { + var start = ratingControl.GetPositionStart().toString(); + var end = ratingControl.GetPositionEnd().toString(); + document.getElementById("cpLeftLabelID").innerHTML = start + " " + end; + }; + + export function onRatingControlItemClick(s: ASPxClientRatingControl, e: ASPxClientRatingControlItemClickEventArgs): void { + hotelDetailsCallbackPanel.PerformCallback(s.GetValue().toString()); + }; + + export function onInputKeyDown(s: ASPxClientTextBox, e: ASPxClientEditKeyEventArgs): void { + var keyCode = ASPxClientUtils.GetKeyCode(e.htmlEvent); + if (keyCode == 13) + (s.GetInputElement()).blur(); + }; + + function getCurrentPage(): string { + var hfPage = hiddenField.Get("page"); + if (hfPage) + return hfPage; + var pathParts = document.location.pathname.split("/"); + return pathParts[pathParts.length - 1]; + }; + + function showAboutWindow(): void { + aboutWindow.ShowAtElementByID("MainCallbackPanel_ContentPane"); + }; + + function hideMenu(): void { + leftPanel.Collapse(); + if (menuButton.GetMainElement() && menuButton.GetChecked()) + menuButton.SetChecked(false); + }; + + function showMenu(): void { + leftPanel.Expand(); + }; + + var _resizeSpecialOffersTimeoutID = -1; + function onWindowResize(): void { + switch (hiddenField.Get("page")) { + case "SpecialOffers": + if (_resizeSpecialOffersTimeoutID == -1) + _resizeSpecialOffersTimeoutID = setTimeout(resizeSpecialOffers, 200); + break; + } + hidePopups("AboutWindow", "StartFilterPopupControl", "LoginPopup", "OfferFormPopup", "ImagePopupControl"); + }; + + function hidePopups(...names: string[]): void { + for (var i = 0; i < names.length; i++) { + var popupControl = ASPxClientControl.GetControlCollection().GetByName(names[i]); + popupControl.Hide(); + } + }; + + function resizeSpecialOffers(): void { + for (var i = 1; i <= 4; i++) { + var panel = ASPxClientControl.GetControlCollection().GetByName("DockPanel" + i); + if (panel && panel.IsVisible()) { + var zone = panel.GetOwnerZone(); + zone.SetWidth(((zone.GetMainElement()).parentNode).offsetWidth) + } + } + _resizeSpecialOffersTimeoutID = -1; + }; + + function getFormattedDate(date: Date): string { + return (date.getMonth() + 1) + "-" + date.getDate() + "-" + date.getFullYear(); + }; + + function getCurrentQueryParams(): { [key:string]: any } { + var hfParams = hiddenField.Get("parameters"); + if (hfParams) + return getParamsByQueryString(hfParams); + var query = document.location.search; + if (query[0] === "?") + query = query.substr(1); + return getParamsByQueryString(query); + }; + + function getQueryString(params: { [key:string]: any }): string { + var queryItems: any[] = []; + for (var key in params) { + if (!params.hasOwnProperty(key)) continue; + queryItems.push(key + "=" + params[key]); + } + if (queryItems.length > 0) + return queryItems.join("&"); + return ""; + }; + + function getParamsByQueryString(queryString: string): { [key: string]: string } { + var result: { [key: string]: any } = {}; + if (queryString) { + var queryStringArray = queryString.split("&"); + for (var i = 0; i < queryStringArray.length; i++) { + var part = queryStringArray[i].split('='); + if (part.length != 2) continue; + result[part[0]] = decodeURIComponent(part[1].replace(/\+/g, " ")); + } + } + return result; + }; + + function onHistoryPopState(evt: any): void { + if (evt.state !== null && evt.state !== undefined) { + var uriParts = evt.state.split("?"); + showPage(uriParts[0], getParamsByQueryString(uriParts[1]), true); + } + }; +} \ No newline at end of file diff --git a/types/devexpress-web/v171/index.d.ts b/types/devexpress-web/v171/index.d.ts new file mode 100644 index 0000000000..50aac382b1 --- /dev/null +++ b/types/devexpress-web/v171/index.d.ts @@ -0,0 +1,33698 @@ +// Type definitions for DevExpress ASP.NET v171.4 +// Project: http://devexpress.com/ +// Definitions by: DevExpress Inc. +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * A client-side counterpart of the DashboardViewer extension. + */ +interface MVCxClientDashboardViewer extends ASPxClientDashboardViewer { +} +/** + * Represents a list of records from the dashboard data source. + */ +interface ASPxClientDashboardItemUnderlyingData { + /** + * Gets the number of rows in the underlying data set. + */ + GetRowCount(): number; + /** + * Returns the value of the specified cell within the underlying data set. + * @param rowIndex An integer value that specifies the zero-based index of the required row. + * @param dataMember A String that specifies the required data member. + */ + GetRowValue(rowIndex: number, dataMember: string): Object; + /** + * Returns an array of data members available in a data source. + */ + GetDataMembers(): string[]; + /** + * Returns whether or not a request for underlying data was successful. + */ + IsDataReceived(): boolean; + /** + * Returns a callstack containing the error caused by an unsuccessful request for underlying data. + */ + GetRequestDataError(): string; +} +/** + * Contains parameters used to obtain the underlying data for the dashboard item. + */ +interface ASPxClientDashboardItemRequestUnderlyingDataParameters { + /** + * Gets or sets an array of data member identifiers used to obtain underlying data. + * Value: An array of string values that specify data member identifiers. + */ + DataMembers: string[]; + /** + * Gets or sets axis points used to obtain the underlying data. + * Value: An array of ASPxClientDashboardItemDataAxisPoint objects that represent axis points. + */ + AxisPoints: ASPxClientDashboardItemDataAxisPoint[]; + /** + * Gets or sets the dimension value used to obtain the underlying data. + * Value: The dimension value. + */ + ValuesByAxisName: Object; + /** + * Gets or sets the unique dimension value used to obtain the underlying data. + * Value: The unique dimension value. + */ + UniqueValuesByAxisName: Object; +} +/** + * References a method executed after an asynchronous request is complete. + */ +interface ASPxClientDashboardItemRequestUnderlyingDataCompleted { + /** + * References a method executed after an asynchronous request is completed. + * @param data An ASPxClientDashboardItemUnderlyingData object that represents a list of records from the dashboard data source. + */ + (data: ASPxClientDashboardItemUnderlyingData): void; +} +/** + * References a method that will handle the ItemClick events. + */ +interface ASPxClientDashboardItemClickEventHandler { + /** + * References a method that will handle the ItemClick events. + * @param source The event source. + * @param e A ASPxClientDashboardItemClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemClickEventArgs): void; +} +/** + * Provides data for the ItemClick events. + */ +interface ASPxClientDashboardItemClickEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the dashboard item for which the event has been raised. + * Value: A string value that is the dashboard item name. + */ + ItemName: string; + /** + * Gets the dashboard item's client data. + */ + GetData(): ASPxClientDashboardItemData; + /** + * Returns the axis point corresponding to the clicked visual element. + * @param axisName A string value returned by the DashboardDataAxisNames class that specifies the name of the data axis. + */ + GetAxisPoint(axisName: string): ASPxClientDashboardItemDataAxisPoint; + /** + * Gets measures corresponding to the clicked visual element. + */ + GetMeasures(): ASPxClientDashboardItemDataMeasure[]; + /** + * Gets deltas corresponding to the clicked visual element. + */ + GetDeltas(): ASPxClientDashboardItemDataDelta[]; + /** + * Gets the dimensions used to create a hierarchy of axis points for the specified axis. + * @param axisName A string value returned by the DashboardDataAxisNames class that specifies the name of the data axis. + */ + GetDimensions(axisName: string): ASPxClientDashboardItemDataDimension[]; + /** + * Requests underlying data corresponding to the clicked visual element. + * @param onCompleted A ASPxClientDashboardItemRequestUnderlyingDataCompleted object that references a method executed after the request is completed. + * @param dataMembers An array of string values that specify data members used to obtain underlying data. + */ + RequestUnderlyingData(onCompleted: ASPxClientDashboardItemRequestUnderlyingDataCompleted, dataMembers: string[]): void; +} +/** + * References a method that will handle the ItemVisualInteractivity events. + */ +interface ASPxClientDashboardItemVisualInteractivityEventHandler { + /** + * References a method that will handle the ItemVisualInteractivity events. + * @param source The event source. + * @param e A ASPxClientDashboardItemVisualInteractivityEventArgs object containing event data. + */ + (source: S, e: ASPxClientDashboardItemVisualInteractivityEventArgs): void; +} +/** + * Provides data for the ItemVisualInteractivity events. + */ +interface ASPxClientDashboardItemVisualInteractivityEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item for which the event was raised. + * Value: A string value that is the component name of the dashboard item. + */ + ItemName: string; + /** + * Gets the selection mode for dashboard item elements. + */ + GetSelectionMode(): string; + /** + * Sets the selection mode for dashboard item elements. + * @param selectionMode A String that specifies the selection mode. + */ + SetSelectionMode(selectionMode: string): void; + /** + * Returns whether or not highlighting is enabled for the current dashboard item. + */ + IsHighlightingEnabled(): boolean; + /** + * Enables highlighting for the current dashboard item. + * @param enableHighlighting true, to enable highlighting; otherwise, false. + */ + EnableHighlighting(enableHighlighting: boolean): void; + /** + * Gets data axes used to perform custom interactivity actions. + */ + GetTargetAxes(): string[]; + /** + * Sets data axes used to perform custom interactivity actions. + * @param targetAxes An array of String objects that specify names of data axes. + */ + SetTargetAxes(targetAxes: string[]): void; + /** + * Gets the default selection for the current dashboard item. + */ + GetDefaultSelection(): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Sets the default selection for the current dashboard item. + * @param values An array of ASPxClientDashboardItemDataAxisPointTuple objects specifying axis point tuples used to select default elements. + */ + SetDefaultSelection(values: ASPxClientDashboardItemDataAxisPointTuple[]): void; +} +/** + * References a method that will handle the ItemSelectionChanged events. + */ +interface ASPxClientDashboardItemSelectionChangedEventHandler { + /** + * References a method that will handle the ItemSelectionChanged events. + * @param source The event source. + * @param e A ASPxClientDashboardItemSelectionChangedEventArgs object containing event data. + */ + (source: S, e: ASPxClientDashboardItemSelectionChangedEventArgs): void; +} +/** + * Provides data for the ItemSelectionChanged events. + */ +interface ASPxClientDashboardItemSelectionChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item for which the event was raised. + * Value: A string that is the component name of the dashboard item. + */ + ItemName: string; + /** + * Gets currently selected elements. + */ + GetCurrentSelection(): ASPxClientDashboardItemDataAxisPointTuple[]; +} +/** + * References a method that will handle the ItemElementCustomColor event. + */ +interface ASPxClientDashboardItemElementCustomColorEventHandler { + /** + * References a method that will handle the ItemElementCustomColor events. + * @param source The event source. + * @param e An ASPxClientDashboardItemElementCustomColorEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemElementCustomColorEventArgs): void; +} +/** + * Provides data for the ItemElementCustomColor events. + */ +interface ASPxClientDashboardItemElementCustomColorEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item for which the event was raised. + * Value: A string value that is the component name of the dashboard item for which the event was raised. + */ + ItemName: string; + /** + * Gets the axis point tuple that corresponds to the current dashboard item element. + */ + GetTargetElement(): ASPxClientDashboardItemDataAxisPointTuple; + /** + * Gets the color of the current dashboard item element. + */ + GetColor(): string; + /** + * Sets the color of the current dashboard item element. + * @param color A String that specifies the color of the current dashboard item element. + */ + SetColor(color: string): void; + /** + * Gets measures corresponding to the current dashboard item element. + */ + GetMeasures(): ASPxClientDashboardItemDataMeasure[]; +} +/** + * References a method that will handle the ItemWidgetCreated events. + */ +interface ASPxClientDashboardItemWidgetCreatedEventHandler { + /** + * References a method that will handle the ItemWidgetCreated events. + * @param source The event source. + * @param e A ASPxClientDashboardItemWidgetEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemWidgetEventArgs): void; +} +/** + * References a method that will handle the ItemWidgetUpdating event. + */ +interface ASPxClientDashboardItemWidgetUpdatingEventHandler { + /** + * References a method that will handle the ItemWidgetUpdating event. + * @param source The event source. + * @param e A ASPxClientDashboardItemWidgetEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemWidgetEventArgs): void; +} +/** + * References a method that will handle the ItemWidgetUpdated event. + */ +interface ASPxClientDashboardItemWidgetUpdatedEventHandler { + /** + * References a method that will handle the ItemWidgetUpdated event. + * @param source The event source. + * @param e A ASPxClientDashboardItemWidgetEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemWidgetEventArgs): void; +} +/** + * References a method that will handle the ItemBeforeWidgetDisposed events. + */ +interface ASPxClientDashboardItemBeforeWidgetDisposedEventHandler { + /** + * References a method that will handle the ItemBeforeWidgetDisposed events. + * @param source The event source. + * @param e A ASPxClientDashboardItemWidgetEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemWidgetEventArgs): void; +} +/** + * Provides data for events related to client widgets used to visualize data in dashboard items. + */ +interface ASPxClientDashboardItemWidgetEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item for which the event was raised. + * Value: A string value that is the component name of the dashboard item. + */ + ItemName: string; + /** + * Returns an underlying widget corresponding to the current dashboard item. + */ + GetWidget(): Object; +} +/** + * Represents multidimensional data visualized in the dashboard item. + */ +interface ASPxClientDashboardItemData { + /** + * Gets the names of the axes that constitute the current ASPxClientDashboardItemData. + */ + GetAxisNames(): string[]; + /** + * Returns the specified data axis. + * @param axisName A string value returned by the DashboardDataAxisNames class that specifies the name of the data axis. + */ + GetAxis(axisName: string): ASPxClientDashboardItemDataAxis; + /** + * Gets the dimensions used to create a hierarchy of axis points for the specified axis. + * @param axisName A string value returned by the DashboardDataAxisNames class that specifies the name of the data axis. + */ + GetDimensions(axisName: string): ASPxClientDashboardItemDataDimension[]; + /** + * Gets the measures for the current ASPxClientDashboardItemData object. + */ + GetMeasures(): ASPxClientDashboardItemDataMeasure[]; + /** + * Gets the deltas for the current ASPxClientDashboardItemData object. + */ + GetDeltas(): ASPxClientDashboardItemDataDelta[]; + /** + * Gets the slice of the current ASPxClientDashboardItemData object by the specified axis point tuple. + * @param tuple A ASPxClientDashboardItemDataAxisPointTuple object that is a tuple of axis points. + */ + GetSlice(tuple: ASPxClientDashboardItemDataAxisPointTuple): ASPxClientDashboardItemData; + /** + * Gets the slice of the current ASPxClientDashboardItemData object by the specified axis point. + * @param axisPoint An ASPxClientDashboardItemDataAxisPoint object that is the data point in a multidimensional space. + */ + GetSlice(axisPoint: ASPxClientDashboardItemDataAxisPoint): ASPxClientDashboardItemData; + /** + * Returns a total summary value for the specified measure. + * @param measureId A String that is the measure identifier. + */ + GetMeasureValue(measureId: string): ASPxClientDashboardItemDataMeasureValue; + /** + * Gets the summary value for the specified delta. + * @param deltaId A String that is the data item identifier. + */ + GetDeltaValue(deltaId: string): ASPxClientDashboardItemDataDeltaValue; + /** + * Returns an array of data members available in a data source. + */ + GetDataMembers(): string[]; + /** + * Creates a tuple based on the specified axes names and corresponding values. + * @param values An array of name-value pairs containing the axis name and corresponding values. + */ + CreateTuple(values: Object[]): ASPxClientDashboardItemDataAxisPointTuple; + /** + * Creates a tuple based on the specified axis points. + * @param axisPoints An array of ASPxClientDashboardItemDataAxisPoint objects that specify axis points belonging to different data axes. + */ + CreateTuple(axisPoints: ASPxClientDashboardItemDataAxisPoint[]): ASPxClientDashboardItemDataAxisPointTuple; +} +/** + * An axis that contains data points corresponding to the specified value hierarchy. + */ +interface ASPxClientDashboardItemDataAxis { + /** + * Gets the dimensions used to create a hierarchy of axis points belonging to the current axis. + */ + GetDimensions(): ASPxClientDashboardItemDataDimension[]; + /** + * Gets the root axis point belonging to the current ASPxClientDashboardItemDataAxis. + */ + GetRootPoint(): ASPxClientDashboardItemDataAxisPoint; + /** + * Returns axis points corresponding to values of the last-level dimension. + */ + GetPoints(): ASPxClientDashboardItemDataAxisPoint[]; + /** + * Returns axis points corresponding to the specified dimension. + * @param dimensionId A String that is the dimension identifier. + */ + GetPointsByDimension(dimensionId: string): ASPxClientDashboardItemDataAxisPoint[]; + /** + * Returns the data point for the specified axis by unique values. + * @param uniqueValues A hierarchy of unique values identifying the required data point. + */ + GetPointByUniqueValues(uniqueValues: Object[]): ASPxClientDashboardItemDataAxisPoint; +} +/** + * Contains the dimension metadata. + */ +interface ASPxClientDashboardItemDataDimension { + /** + * Gets the dimension identifier. + * Value: A string value that is the dimension identifier. + */ + Id: string; + /** + * Gets or sets the name of the dimension. + * Value: A string value that is the name of the dimension. + */ + Name: string; + /** + * Gets the data member identifier for the current dimension. + * Value: A string value that identifies a data member. + */ + DataMember: string; + /** + * Gets the group interval for date-time values for the current dimension. + * Value: A string value that represents how date-time values are grouped. + */ + DateTimeGroupInterval: string; + /** + * Gets the group interval for string values. + * Value: A string value that specifies the group interval for string values. + */ + TextGroupInterval: string; + /** + * Formats the specified value using format settings of the current dimension. + * @param value A value to be formatted. + */ + Format(value: Object): string; +} +/** + * Contains the measure metadata. + */ +interface ASPxClientDashboardItemDataMeasure { + /** + * Gets the measure identifier. + * Value: A string value that is the measure identifier. + */ + Id: string; + /** + * Gets the name of the measure. + * Value: A string value that is the name of the measure. + */ + Name: string; + /** + * Gets the data member that identifies the data source list used to provide data for the current measure. + * Value: A string value that identifies the data source list used to provide data for the current measure. + */ + DataMember: string; + /** + * Gets the type of summary function calculated against the current measure. + * Value: A string value that identifies the type of summary function calculated against the current measure. + */ + SummaryType: string; + /** + * Formats the specified value using format settings of the current measure. + * @param value A value to be formatted. + */ + Format(value: Object): string; +} +/** + * Contains the delta metadata. + */ +interface ASPxClientDashboardItemDataDelta { + /** + * Gets the data item identifier. + * Value: A string that is the data item identifier. + */ + Id: string; + /** + * Gets the name of the data item container. + * Value: A string value that is the name of the data item container. + */ + Name: string; + /** + * Gets the identifier for the measure that provides actual values. + * Value: A string value that is the measure identifier. + */ + ActualMeasureId: string; + /** + * Gets the identifier for the measure that provides target values. + * Value: A string value that is the measure identifier. + */ + TargetMeasureId: string; +} +/** + * Provides dimension values at the specified axis point. + */ +interface ASPxClientDashboardItemDataDimensionValue { + /** + * Gets the current dimension value. + */ + GetValue(): Object; + /** + * Gets the unique value for the current dimension value. + */ + GetUniqueValue(): Object; + /** + * Gets the display text for the current dimension value. + */ + GetDisplayText(): string; +} +/** + * Provides the measure value and display text. + */ +interface ASPxClientDashboardItemDataMeasureValue { + /** + * Gets the measure value. + */ + GetValue(): Object; + /** + * Gets the measure display text. + */ + GetDisplayText(): string; +} +/** + * Provides delta element values. + */ +interface ASPxClientDashboardItemDataDeltaValue { + /** + * Provides access to the actual value displayed within the delta element. + */ + GetActualValue(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the target value. + */ + GetTargetValue(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the absolute difference between the actual and target values. + */ + GetAbsoluteVariation(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the percent of variation between the actual and target values. + */ + GetPercentVariation(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the percentage of the actual value in the target value. + */ + GetPercentOfTarget(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the main delta value. + */ + GetDisplayValue(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the first additional delta value. + */ + GetDisplaySubValue1(): ASPxClientDashboardItemDataMeasureValue; + /** + * Provides access to the second additional delta value. + */ + GetDisplaySubValue2(): ASPxClientDashboardItemDataMeasureValue; + /** + * Gets the value specifying the condition for displaying the delta indication. + */ + GetIsGood(): ASPxClientDashboardItemDataMeasureValue; + /** + * Gets the type of delta indicator. + */ + GetIndicatorType(): ASPxClientDashboardItemDataMeasureValue; +} +/** + * A point on the data axis. + */ +interface ASPxClientDashboardItemDataAxisPoint { + /** + * Gets the name of the axis to which the current axis point belongs. + */ + GetAxisName(): string; + /** + * Gets the last level dimension corresponding to the current axis point. + */ + GetDimension(): ASPxClientDashboardItemDataDimension; + /** + * Gets the collection of dimensions used to create a hierarchy of axis points from the root point to the current axis point. + */ + GetDimensions(): ASPxClientDashboardItemDataDimension[]; + /** + * Gets the value corresponding to the current axis point. + */ + GetValue(): Object; + /** + * Gets the display text corresponding to the current axis point. + */ + GetDisplayText(): string; + /** + * Gets the unique value corresponding to the current axis point. + */ + GetUniqueValue(): Object; + /** + * Gets the dimension values at the specified axis point. + */ + GetDimensionValue(): ASPxClientDashboardItemDataDimensionValue; + /** + * Gets the dimension value at the current axis point. + * @param dimensionId A String value that specifies the dimension identifier. + */ + GetDimensionValue(dimensionId: string): ASPxClientDashboardItemDataDimensionValue; + /** + * Gets the child axis points for the current axis point. + */ + GetChildren(): ASPxClientDashboardItemDataAxisPoint[]; + /** + * Gets the parent axis point for the current axis point. + */ + GetParent(): ASPxClientDashboardItemDataAxisPoint; +} +/** + * Represents a tuple of axis points. + */ +interface ASPxClientDashboardItemDataAxisPointTuple { + /** + * Returns the axis point belonging to the default data axis. + */ + GetAxisPoint(): ASPxClientDashboardItemDataAxisPoint; + /** + * Returns the axis point belonging to the specified data axis. + * @param axisName A string value returned by the DashboardDataAxisNames class that specifies the name of the data axis. + */ + GetAxisPoint(axisName: string): ASPxClientDashboardItemDataAxisPoint; +} +/** + * A range in the Range Filter dashboard item. + */ +interface ASPxClientDashboardRangeFilterSelection { + /** + * Gets or sets a maximum value in the range of the Range Filter dashboard item. + * Value: A maximum value in the range of the Range Filter dashboard item. + */ + Maximum: Object; + /** + * Gets or sets a minimum value in the range of the Range Filter dashboard item. + * Value: A minimum value in the range of the Range Filter dashboard item. + */ + Minimum: Object; +} +/** + * A collection of ASPxClientDashboardParameter objects. + */ +interface ASPxClientDashboardParameters { + /** + * Returns an array of dashboard parameters from the ASPxClientDashboardParameters collection. + */ + GetParameterList(): ASPxClientDashboardParameter[]; + /** + * Returns a dashboard parameter by its name. + * @param name A String object that specifies the parameter name. + */ + GetParameterByName(name: string): ASPxClientDashboardParameter; + /** + * Returns a dashboard parameter by its index in the ASPxClientDashboardParameters collection. + * @param index An integer value that specifies the parameter index. + */ + GetParameterByIndex(index: number): ASPxClientDashboardParameter; +} +/** + * A client-side dashboard parameter. + */ +interface ASPxClientDashboardParameter { + /** + * Gets the dashboard parameter name on the client side. + * Value: A string value that is the dashboard parameter name on the client side. + */ + Name: string; + /** + * Gets the dashboard parameter value on the client side. + * Value: A string value that specifies the dashboard parameter value on the client side. + */ + Value: Object; + /** + * Returns a parameter name. + */ + GetName(): string; + /** + * Returns a current parameter value(s). + */ + GetValue(): Object; + /** + * Specifies the current parameter value(s). + * @param value The current parameter value(s). + */ + SetValue(value: Object): void; + /** + * Returns a default parameter value. + */ + GetDefaultValue(): Object; + /** + * Returns the parameter's description displayed to an end-user. + */ + GetDescription(): string; + /** + * Returns a parameter type. + */ + GetType(): string; + /** + * Returns possible parameter values. + */ + GetValues(): ASPxClientDashboardParameterValue[]; +} +/** + * Provides access to the parameter value and display text. + */ +interface ASPxClientDashboardParameterValue { + /** + * Returns the parameter display text. + */ + GetDisplayText(): string; + /** + * Returns a parameter value. + */ + GetValue(): Object; +} +/** + * Contains settings that specify parameters affecting how the dashboard or dashboard item is exported in Image format. + */ +interface ImageFormatOptions { + /** + * Gets or sets an image format in which the dashboard (dashboard item) is exported. + * Value: A value returned by the DashboardExportImageFormat class that specifies an image format in which the dashboard (dashboard item) is exported. + */ + Format: string; + /** + * Gets or sets the resolution (in dpi) used to export a dashboard (dashboard item) in Image format. + * Value: An integer value that specifies the resolution (in dpi) used to export a dashboard (dashboard item) in Image format. + */ + Resolution: number; +} +/** + * Contains options which define how the dashboard item is exported to Excel format. + */ +interface ExcelFormatOptions { + /** + * Gets or sets the Excel format in which the dashboard item is exported. + * Value: A value returned by the DashboardExportExcelFormat class that specifies the Excel format in which the dashboard item is exported. + */ + Format: string; + /** + * Gets or sets a character used to separate values in a CSV document. + * Value: A string value that specifies the character used to separate values in a CSV document. + */ + CsvValueSeparator: string; +} +/** + * Contains settings that specify parameters affecting how the Grid dashboard item is exported. + */ +interface GridExportOptions { + /** + * Gets or sets whether the size of the Grid dashboard item is changed according to the width of the exported page. + * Value: true, to change the size of the Grid dashboard item according to the width of the exported page; otherwise, false. + */ + FitToPageWidth: boolean; + /** + * Gets or sets whether to print column headers of the Grid dashboard item on every page. + * Value: true, to print column headers on every page; otherwise, false. + */ + PrintHeadersOnEveryPage: boolean; +} +/** + * Contains settings that specify parameters affecting how the Pivot dashboard item is exported. + */ +interface PivotExportOptions { + /** + * Gets or sets whether to print the column headers of the Pivot dashboard item on every page. + * Value: true, to print column headers on every page; otherwise, false. + */ + PrintHeadersOnEveryPage: boolean; +} +/** + * Contains settings that specify parameters affecting how the Pie dashboard item is exported. + */ +interface PieExportOptions { + /** + * Gets or sets whether dashboard item elements are arranged automatically on the exported page. + * Value: true, to arrange dashboard item elements automatically on the exported page; otherwise, false. + */ + AutoArrangeContent: boolean; +} +/** + * Contains settings that specify parameters affecting how the Gauge dashboard item is exported. + */ +interface GaugeExportOptions { + /** + * Gets or sets whether dashboard item elements are arranged automatically on the exported page. + * Value: true, to arrange dashboard item elements automatically on the exported page; otherwise, false. + */ + AutoArrangeContent: boolean; +} +/** + * Contains settings that specify parameters affecting how the Card dashboard item is exported. + */ +interface CardExportOptions { + /** + * Gets or sets whether dashboard item elements are arranged automatically on the exported page. + * Value: true, to arrange dashboard item elements automatically on the exported page; otherwise, false. + */ + AutoArrangeContent: boolean; +} +/** + * Contains settings that specify parameters affecting how the Range Filter dashboard item is exported. + */ +interface RangeFilterExportOptions { + /** + * Gets or sets whether the page orientation used to export a Range Filter dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export a Range Filter dashboard item; otherwise, false. + */ + AutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the Range Filter dashboard item. + * Value: A value returned by the RangeFilterExportSizeMode class that specifies the export size mode for the Range Filter dashboard item. + */ + SizeMode: string; +} +/** + * Contains settings that specify parameters affecting how Chart dashboard items are exported. + */ +interface ChartExportOptions { + /** + * Gets or sets whether the page orientation used to export a Chart dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export a Chart dashboard item; otherwise, false. + */ + AutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the Chart dashboard item. + * Value: A value returned by the ChartExportSizeMode class that specifies the export size mode for the Chart dashboard item. + */ + SizeMode: string; +} +/** + * Contains settings that specify parameters affecting how Map dashboard items are exported. + */ +interface MapExportOptions { + /** + * Gets or sets whether the page orientation used to export a map dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export a map dashboard item; otherwise, false. + */ + AutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the map dashboard item. + * Value: A value returned by the MapExportSizeMode class that specifies specifies the export size mode for the map dashboard item. + */ + SizeMode: string; +} +/** + * Contains settings that specify parameters affecting how the dashboard (dashboard item) is exported. + */ +interface ASPxClientDashboardExportOptions { + /** + * Gets or sets the standard paper size. + * Value: A string value returned by the DashboardExportPaperKind class that specifies the standard paper size. + */ + PaperKind: string; + /** + * Gets or sets the page orientation used to export a dashboard (dashboard item). + * Value: A string value returned by the DashboardExportPageLayout class that specifies the page orientation used to export a dashboard (dashboard item). + */ + PageLayout: string; + /** + * Gets or sets the mode for scaling when exporting a dashboard (dashboard item). + * Value: A string value returned by the DashboardExportScaleMode class that specifies the mode for scaling when exporting a dashboard (dashboard item). + */ + ScaleMode: string; + /** + * Gets or sets the scale factor (in fractions of 1) by which a dashboard (dashboard item) is scaled. + * Value: A Single value that specifies the scale factor by which a dashboard (dashboard item) is scaled. + */ + ScaleFactor: number; + /** + * Gets or sets the number of horizontal/vertical pages spanning the total width/height of a dashboard (dashboard item). + * Value: An integer value that specifies the number of horizontal/vertical pages spanning the total width/height of a dashboard (dashboard item). + */ + AutoFitPageCount: number; + /** + * Gets or sets the title of the exported document. + * Value: A string value that specifies the title of the exported document. + */ + Title: string; + /** + * Gets or sets whether a dashboard title (or dashboard item's caption) is included as the exported document title. + * Value: A boolean value that specifies whether a dashboard title (or dashboard item's caption) is included as the exported document title. + */ + ShowTitle: boolean; + /** + * Gets or sets the filter state's location on the exported document. + * Value: A string value returned by the DashboardExportFilterState class that specifies the filter state's location on the exported document. + */ + FilterState: string; + /** + * Provides access to options for exporting a dashboard or individual items in Image format. + * Value: An ImageFormatOptions object containing settings that specify parameters affecting how the dashboard or dashboard item is exported in Image format. + */ + ImageOptions: ImageFormatOptions; + /** + * Provides access to options for exporting individual dashboard items in Excel format. + * Value: An ExcelFormatOptions object containing settings that specify parameters affecting how the dashboard item is exported in Excel format. + */ + ExcelOptions: ExcelFormatOptions; + /** + * Provides access to options for exporting a Grid dashboard item. + * Value: A GridExportOptions object containing settings that specify parameters that affect how Grid dashboard items are exported. + */ + GridOptions: GridExportOptions; + /** + * Provides access to options for exporting a Pivot dashboard item. + * Value: A PivotExportOptions object containing settings that specify parameters that affect how Pivot dashboard items are exported. + */ + PivotOptions: PivotExportOptions; + /** + * Provides access to options for exporting a Pie dashboard item. + * Value: A PieExportOptions object containing settings that specify parameters that affect how Pie dashboard items are exported. + */ + PieOptions: PieExportOptions; + /** + * Provides access to options for exporting a Gauge dashboard item. + * Value: A GaugeExportOptions object containing settings that specify parameters that affect how Gauge dashboard items are exported. + */ + GaugeOptions: GaugeExportOptions; + /** + * Provides access to options for exporting a Card dashboard item. + * Value: A CardExportOptions object containing settings that specify parameters that affect how Card dashboard items are exported. + */ + CardOptions: CardExportOptions; + /** + * Provides access to options for exporting a Range Filter dashboard item. + * Value: A RangeFilterExportOptions object containing settings that specify parameters affecting how the Range Filter dashboard item is exported. + */ + RangeFilterOptions: RangeFilterExportOptions; + /** + * Provides access to options for exporting a Chart dashboard item. + * Value: A ChartExportOptions object containing settings that specify parameters that affect how Chart dashboard items are exported. + */ + ChartOptions: ChartExportOptions; + /** + * Provides access to options for exporting map dashboard items. + * Value: A MapExportOptions object containing settings that specify parameters that affect how map dashboard items are exported. + */ + MapOptions: MapExportOptions; +} +/** + * Contains options related to exporting a dashboard/dashboard item to the PDF format. + */ +interface DashboardPdfExportOptions { + /** + * Gets or sets the type of paper for the exported document. + * Value: A DashboardExportPaperKind value that specifies the type of paper for the exported document. + */ + PaperKind: string; + /** + * Gets or sets the page orientation used to export a dashboard/dashboard item. + * Value: A DashboardExportPageLayout value that specifies the page orientation used to export a dashboard/dashboard item. + */ + PageLayout: string; + /** + * Gets or sets the mode for scaling a dashboard/dashboard item in the exported document. + * Value: A DashboardExportScaleMode value that specifies the mode for scaling a dashboard/dashboard item in the exported document. + */ + ScaleMode: string; + /** + * Gets or sets the scale factor (in fractions of 1), by which a dashboard/dashboard item is scaled in the exported document. + * Value: A Single value that specifies the scale factor by which a dashboard/dashboard item is scaled in the exported document. + */ + ScaleFactor: number; + /** + * Gets or sets the number of horizontal/vertical pages spanning the total width/height of a dashboard/dashboard item. + * Value: An integer value that specifies the number of horizontal/vertical pages spanning the total width/height of a dashboard/dashboard item. + */ + AutoFitPageCount: number; + /** + * Gets or sets the title of the exported document. + * Value: A string value that specifies the title of the exported document. + */ + Title: string; + /** + * Gets or sets whether a dashboard title (or dashboard item's caption) is included as the exported document title. + * Value: A boolean value that specifies whether a dashboard title (or dashboard item's caption) is included as the exported document title. + */ + ShowTitle: boolean; + /** + * Gets or sets whether to add the state of master filter items to the exported document. + * Value: true, to add the state of master filter items to the exported document; otherwise, false. + */ + ExportFilters: boolean; + /** + * Gets or sets whether to add current parameter values to the exported document. + * Value: true, to add current parameter values to the exported document; otherwise, false. + */ + ExportParameters: boolean; + /** + * Gets or sets whether to add current values of a hidden parameter to the exported document. + * Value: true, to add current values of a hidden parameter to the exported document; otherwise, false. + */ + IncludeHiddenParameters: boolean; + /** + * Gets or sets a position of the dashboard state (such as master filter or current parameter values) in the exported document. + * Value: A DashboardStateExportPosition object that specifies the position of the dashboard state in the exported document. + */ + DashboardStatePosition: string; + /** + * Gets or sets whether cards within the Card dashboard item are arranged automatically on the exported page. + * Value: true, to arrange cards automatically on the exported page; otherwise, false. + */ + CardAutoArrangeContent: boolean; + /** + * Gets or sets whether the page orientation used to export the Chart dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export the Chart dashboard item; otherwise, false. + */ + ChartAutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the Chart dashboard item. + * Value: A ChartExportSizeMode value that specifies the export size mode for the Chart dashboard item. + */ + ChartSizeMode: string; + /** + * Gets or sets whether gauges within the Gauge dashboard item are arranged automatically on the exported page. + * Value: true, to arrange gauges automatically on the exported page; otherwise, false. + */ + GaugeAutoArrangeContent: boolean; + /** + * Gets or sets whether the size of the Grid dashboard item is changed according to the width of the exported page. + * Value: true, to change the size of the Grid dashboard item according to the width of the exported page; otherwise, false. + */ + GridFitToPageWidth: boolean; + /** + * Gets or sets whether to add column headers of the Grid dashboard item to every page. + * Value: true, to add column headers to every page; otherwise, false. + */ + GridPrintHeadersOnEveryPage: boolean; + /** + * Gets or sets whether the page orientation used to export the Map dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export the Map dashboard item; otherwise, false. + */ + MapAutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the Map dashboard item. + * Value: A MapExportSizeMode value that specifies the export size mode for the Map dashboard item. + */ + MapSizeMode: string; + /** + * Gets or sets whether pies within the Pie dashboard item are arranged automatically on the exported page. + * Value: true, to arrange pies automatically on the exported page; otherwise, false. + */ + PieAutoArrangeContent: boolean; + /** + * Gets or sets whether to add column headers of the Pivot dashboard item to every page. + * Value: true, to add column headers to every page; otherwise, false. + */ + PivotPrintHeadersOnEveryPage: boolean; + /** + * Gets or sets whether the page orientation used to export the Range Filter dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export the Range Filter dashboard item; otherwise, false. + */ + RangeFilterAutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the Range Filter dashboard item. + * Value: A RangeFilterExportSizeMode value that specifies the export size mode for the Range Filter dashboard item. + */ + RangeFilterSizeMode: string; + /** + * Gets or sets whether the page orientation used to export the Treemap dashboard item is selected automatically. + * Value: true, to automatically select the page orientation used to export the Treemap dashboard item; otherwise, false. + */ + TreemapAutomaticPageLayout: boolean; + /** + * Gets or sets the export size mode for the Treemap dashboard item. + * Value: A TreemapExportSizeMode value that specifies the export size mode for the Treemap dashboard item. + */ + TreemapSizeMode: string; +} +/** + * Contains options related to exporting a dashboard/dashboard item to an image. + */ +interface DashboardImageExportOptions { + /** + * Gets or sets a title of the exported document. + * Value: A string value that specifies the title of the exported document. + */ + Title: string; + /** + * Gets or sets whether a dashboard title (or dashboard item's caption) is included as the exported document title. + * Value: true, to include a dashboard title (or dashboard item's caption) as the exported document title; otherwise, false. + */ + ShowTitle: boolean; + /** + * Gets or sets whether to add the state of master filter items to the exported document. + * Value: true, to add the state of master filter items to the exported document; otherwise, false. + */ + ExportFilters: boolean; + /** + * Gets or sets whether to add current parameter values to the exported document. + * Value: true, to add current parameter values to the exported document; otherwise, false. + */ + ExportParameters: boolean; + /** + * Gets or sets whether to add current values of a hidden parameter to the exported document. + * Value: true, to add current values of a hidden parameter to the exported document; otherwise, false. + */ + IncludeHiddenParameters: boolean; + /** + * Gets or sets an image format in which the dashboard/dashboard item is exported. + * Value: A DashboardExportImageFormat value that specifies an image format in which the dashboard/dashboard item is exported. + */ + Format: string; + /** + * Gets or sets the resolution (in dpi) used to export a dashboard/dashboard item to an image. + * Value: An integer value that specifies the resolution (in dpi) used to export a dashboard/dashboard item to an image. + */ + Resolution: number; + /** + * Gets or sets the scale factor (in fractions of 1), by which a dashboard/dashboard item is scaled in the exported document. + * Value: A string value that specifies the scale factor by which a dashboard/dashboard item is scaled in the exported document. + */ + ScaleFactor: number; +} +/** + * Contains options related to exporting a dashboard/dashboard item to the Excel format. + */ +interface DashboardExcelExportOptions { + /** + * Gets or sets the Excel format in which the dashboard item is exported. + * Value: A DashboardExportExcelFormat value that specifies the Excel format in which the dashboard item is exported. + */ + Format: string; + /** + * Gets or sets a character used to separate values in a CSV document. + * Value: A string value that specifies the character used to separate values in a CSV document. + */ + CsvValueSeparator: string; + /** + * Gets or sets whether to add the state of master filter items to the exported document. + * Value: true, to add the state of master filter items to the exported document; otherwise, false. + */ + ExportFilters: boolean; + /** + * Gets or sets whether to add current parameter values to the exported document. + * Value: true, to add current parameter values to the exported document; otherwise, false. + */ + ExportParameters: boolean; + /** + * Gets or sets whether to add current values of a hidden parameter to the exported document. + * Value: true, to add current values of a hidden parameter to the exported document; otherwise, false. + */ + IncludeHiddenParameters: boolean; + /** + * Gets or sets the position of the dashboard state (such as master filter or current parameter values) in the exported document. + * Value: A DashboardStateExcelExportPosition object that specifies the position of the dashboard state in the exported document. + */ + DashboardStatePosition: string; +} +/** + * A client-side equivalent of the ASPxDashboard control. + */ +interface ASPxClientDashboard extends ASPxClientControl { + /** + * Fires when a round trip to the server has been initiated by a call to the client PerformDataCallback method. + */ + CustomDataCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs after the state of the dashboard displayed in the ASPxClientDashboard is changed. + */ + DashboardStateChanged: ASPxClientEvent>; + /** + * Occurs after a new dashboard is displayed in the ASPxClientDashboard. + */ + DashboardChanged: ASPxClientEvent>; + /** + * For internal use. + */ + CustomizeMenuItems: ASPxClientEvent>; + /** + * Occurs before any element in the Web Dashboard control has been rendered. + */ + BeforeRender: ASPxClientEvent>; + /** + * Occurs when an end-user clicks a dashboard item. + */ + ItemClick: ASPxClientEvent>; + /** + * Allows you to provide custom visual interactivity for data-bound dashboard items that support element selection and highlighting. + */ + ItemVisualInteractivity: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemWidgetCreated: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemWidgetUpdating: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemWidgetUpdated: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemBeforeWidgetDisposed: ASPxClientEvent>; + /** + * Occurs after the selection within the dashboard item is changed. + */ + ItemSelectionChanged: ASPxClientEvent>; + /** + * Allows you to color the required dashboard item elements using the specified colors. + */ + ItemElementCustomColor: ASPxClientEvent>; + /** + * Occurs when a master filter state is changed. + */ + ItemMasterFilterStateChanged: ASPxClientEvent>; + /** + * Occurs when a drill-down/drill-up is performed. + */ + ItemDrillDownStateChanged: ASPxClientEvent>; + /** + * Occurs after the available interactivity actions have changed for the specific dashboard item. + */ + ActionAvailabilityChanged: ASPxClientEvent>; + /** + * Occurs after parameter values provided using a Dynamic List are loaded. + */ + DynamicLookUpValuesLoaded: ASPxClientEvent>; + /** + * Occurs when a dashboard item update is initiated. + */ + ItemBeginUpdate: ASPxClientEvent>; + /** + * Occurs after the dashboard item update is performed. + */ + ItemEndUpdate: ASPxClientEvent>; + /** + * Occurs when a dashboard update is initiated. + */ + DashboardBeginUpdate: ASPxClientEvent>; + /** + * Occurs after the dashboard update is performed. + */ + DashboardEndUpdate: ASPxClientEvent>; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientDataCallback object that represents the JavaScript function which receives the callback data as a parameter. + */ + PerformDataCallback(parameter: string, onCallback: ASPxClientDataCallback): void; + /** + * Gets an inner part of the ASPxClientDashboard control. + */ + GetDashboardControl(): DashboardControl; + /** + * Switches the ASPxClientDashboard to the viewer mode. + */ + SwitchToViewer(): void; + /** + * Switches the ASPxClientDashboard to the designer mode. + */ + SwitchToDesigner(): void; + /** + * Gets the current working mode of the Web Dashboard. + */ + GetWorkingMode(): string; + /** + * Gets the identifier of the dashboard that is displayed in the ASPxClientDashboard. + */ + GetDashboardId(): string; + /** + * Gets the name of the dashboard that is displayed in the ASPxClientDashboard. + */ + GetDashboardName(): string; + /** + * Gets the state of the dashboard displayed in the ASPxClientDashboard. + */ + GetDashboardState(): string; + /** + * Sets the state of the dashboard displayed in the ASPxClientDashboard. + * @param dashboardState A JSON object that specifies the dashboard state. + */ + SetDashboardState(dashboardState: Object): void; + /** + * Sets the state of the dashboard displayed in the ASPxClientDashboard. + * @param dashboardStateString A string value that specifies the state of the dashboard displayed in the ASPxClientDashboard. + */ + SetDashboardState(dashboardStateString: string): void; + /** + * Loads a dashboard with the specified identifier from the dashboard storage. + * @param dashboardId A string value that specifies the dashboard identifier. + */ + LoadDashboard(dashboardId: string): void; + /** + * Saves a current dashboard to the dashboard storage. + */ + SaveDashboard(): void; + /** + * Invokes the Dashboard Parameters dialog. + */ + ShowParametersDialog(): void; + /** + * Closes the Dashboard Parameters dialog. + */ + HideParametersDialog(): void; + /** + * Returns dashboard parameter settings and metadata. + */ + GetParameters(): ASPxClientDashboardParameters; + /** + * Invokes the dialog that allows end-users to export the entire dashboard to the specified format. + * @param format A string value that specifies the format. For instance, you can use 'PDF' or 'Image'. + */ + ShowExportDashboardDialog(format: string): void; + /** + * Invokes the dialog that allows end-users to export the dashboard item to the specified format. + * @param itemComponentName A string value that specifies the component name of the dashboard item to export. + * @param format A string value that specifies the format. For instance, you can use 'PDF, 'Image' or 'Excel'. Note that some items (i.e., ImageDashboardItem) do not support exporting to the 'Excel' format. + */ + ShowExportDashboardItemDialog(itemComponentName: string, format: string): void; + /** + * Hides the dialog that allows end-users to export the dashboard/dashboard item. + */ + HideExportDialog(): void; + /** + * Returns settings that specify parameters affecting how the dashboard is exported. + */ + GetExportOptions(): ASPxClientDashboardExportOptions; + /** + * Allows you to obtain options related to exporting a dashboard/dashboard item to the PDF format. + */ + GetPdfExportOptions(): DashboardPdfExportOptions; + /** + * Allows you to obtain options related to exporting a dashboard/dashboard item to an image. + */ + GetImageExportOptions(): DashboardImageExportOptions; + /** + * Allows you to obtain options related to exporting a dashboard/dashboard item to the Excel format. + */ + GetExcelExportOptions(): DashboardExcelExportOptions; + /** + * Specifies settings that specify parameters affecting how the dashboard is exported. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + */ + SetExportOptions(options: ASPxClientDashboardExportOptions): void; + /** + * Allows you to specify options related to exporting a dashboard/dashboard item to the PDF format. + * @param options A DashboardPdfExportOptions object containing options related to exporting a dashboard/dashboard item to the PDF format. + */ + SetPdfExportOptions(options: DashboardPdfExportOptions): void; + /** + * Allows you to specify options related to exporting a dashboard/dashboard item to an image. + * @param options A DashboardImageExportOptions object containing options related to exporting a dashboard/dashboard item to an image. + */ + SetImageExportOptions(options: DashboardImageExportOptions): void; + /** + * Allows you to specify options related to exporting a dashboard/dashboard item to the Excel format. + * @param options A DashboardExcelExportOptions object containing options related to exporting a dashboard item to the Excel format. + */ + SetExcelExportOptions(options: DashboardExcelExportOptions): void; + /** + * Exports a dashboard to a PDF file and writes it to the Response. + */ + ExportToPdf(): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A DashboardPdfExportOptions object containing PDF-specific export options. + */ + ExportToPdf(options: DashboardPdfExportOptions): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A DashboardPdfExportOptions object containing PDF-specific export options. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToPdf(options: DashboardPdfExportOptions, fileName: string): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + */ + ExportToPdf(options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToPdf(options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports a dashboard to an Image file and writes it to the Response. + */ + ExportToImage(): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A DashboardImageExportOptions object containing image-specific export options. + */ + ExportToImage(options: DashboardImageExportOptions): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A DashboardImageExportOptions object containing image-specific export options. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToImage(options: DashboardImageExportOptions, fileName: string): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + */ + ExportToImage(options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToImage(options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports dashboard data to the specified file in Excel format. + */ + ExportToExcel(): void; + /** + * Exports dashboard data to the specified file in Excel format. + * @param options A DashboardExcelExportOptions object containing Excel-specific options. + */ + ExportToExcel(options: DashboardExcelExportOptions): void; + /** + * Exports dashboard data to the specified file in Excel format. + * @param options A DashboardExcelExportOptions object containing Excel-specific options. + * @param fileName A string value that specifies the name of the exported file. + */ + ExportToExcel(options: DashboardExcelExportOptions, fileName: string): void; + /** + * Exports a dashboard item to a PDF file and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + */ + ExportDashboardItemToPdf(itemName: string): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardPdfExportOptions object containing PDF-specific export options. + */ + ExportDashboardItemToPdf(itemName: string, options: DashboardPdfExportOptions): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardPdfExportOptions object containing PDF-specific export options. + * @param fileName A string that specifies the name of the exported file. + */ + ExportDashboardItemToPdf(itemName: string, options: DashboardPdfExportOptions, fileName: string): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + */ + ExportDashboardItemToPdf(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + * @param fileName A string that specifies the name of the exported file. + */ + ExportDashboardItemToPdf(itemName: string, options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports a dashboard item to an Image file and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + */ + ExportDashboardItemToImage(itemName: string): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardImageExportOptions object containing image-specific export options. + */ + ExportDashboardItemToImage(itemName: string, options: DashboardImageExportOptions): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardImageExportOptions object containing image-specific export options. + * @param fileName A string value that specifies the name of the exported file. + */ + ExportDashboardItemToImage(itemName: string, options: DashboardImageExportOptions, fileName: string): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + */ + ExportDashboardItemToImage(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + * @param fileName A string value that specifies the name of the exported file. + */ + ExportDashboardItemToImage(itemName: string, options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports a dashboard item to an Excel file and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + */ + ExportDashboardItemToExcel(itemName: string): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardExcelExportOptions object containing Excel export options. + */ + ExportDashboardItemToExcel(itemName: string, options: DashboardExcelExportOptions): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardExcelExportOptions object containing Excel export options. + * @param fileName A string that specifies the name of the exported Excel file. + */ + ExportDashboardItemToExcel(itemName: string, options: DashboardExcelExportOptions, fileName: string): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + */ + ExportDashboardItemToExcel(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + * @param fileName A string that specifies the name of the exported Excel file. + */ + ExportDashboardItemToExcel(itemName: string, options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Returns whether or not master filtering can be applied in the current state of the specified master filter item. + * @param itemName A string that specifies the component name of the master filter item. + */ + CanSetMasterFilter(itemName: string): boolean; + /** + * Returns whether or not the specified master filter can be cleared in the current state. + * @param itemName A string that specifies the component name of the master filter item. + */ + CanClearMasterFilter(itemName: string): boolean; + /** + * Returns whether or not drill down is possible in the current state of the specified dashboard item. + * @param itemName A string that specifies the component name of the dashboard item. + */ + CanPerformDrillDown(itemName: string): boolean; + /** + * Returns whether or not drill up is possible in the current state of the specified dashboard item. + * @param itemName A string that specifies the component name of the dashboard item. + */ + CanPerformDrillUp(itemName: string): boolean; + /** + * Selects required elements by their values in the specified master filter item. + * @param itemName A String that specifies the component name of the master filter item. + * @param values Values that will be used to select elements in the master filter item. + */ + SetMasterFilter(itemName: string, values: Object[][]): void; + /** + * Selects the required elements in the specified master filter item. + * @param itemName A String that species the component name of the master filter item. + * @param axisPointTuples An array of ASPxClientDashboardItemDataAxisPointTuple objects used to identify master filter elements. + */ + SetMasterFilter(itemName: string, axisPointTuples: ASPxClientDashboardItemDataAxisPointTuple[]): void; + /** + * Performs a drill-down into the required element by its value. + * @param itemName A String that species the component name of the dashboard item. + * @param value A value that will be used to perform a drill-down for the required element. + */ + PerformDrillDown(itemName: string, value: Object): void; + /** + * Performs a drill-down into the required element. + * @param itemName A String that specifies the component name of the dashboard item. + * @param axisPointTuple A ASPxClientDashboardItemDataAxisPointTuple object representing a set of axis points. + */ + PerformDrillDown(itemName: string, axisPointTuple: ASPxClientDashboardItemDataAxisPointTuple): void; + /** + * Clears the specified master filter item. + * @param itemName A string that specifies the component name of the master filter item. + */ + ClearMasterFilter(itemName: string): void; + /** + * Performs a drill-up for the specified dashboard item. + * @param itemName A String that specifies the component name of the dashboard item. + */ + PerformDrillUp(itemName: string): void; + /** + * Returns axis point tuples identifying elements that can be used to perform drill-down in the specified dashboard item. + * @param itemName A String that is the component name of the dashboard item. + */ + GetAvailableDrillDownValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns the axis point tuple identifying the current drill-down state. + * @param itemName A String that is the component name of the dashboard item. + */ + GetCurrentDrillDownValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple; + /** + * Returns axis point tuples identifying elements that can be selected in the current state of the master filter item. + * @param itemName A String that is the component name of the master filter item. + */ + GetAvailableFilterValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns axis point tuples identifying currently selected elements in the master filter item. + * @param itemName A String that is the component name of the master filter item. + */ + GetCurrentFilterValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns currently selected elements in the master filter item. + * @param itemName A String that specifies a component name of the master filter item. + */ + GetCurrentSelection(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns the client data for the specified dashboard item. + * @param itemName A string that specifies the component name of the dashboard item. + */ + GetItemData(itemName: string): ASPxClientDashboardItemData; + /** + * Refreshes an entire dashboard displayed in the Web Dashboard control. + */ + Refresh(): void; + /** + * Refreshes the specific item from the dashboard displayed in the Web Dashboard control. + * @param itemName A string value that specifies the component name of the dashboard item to be refreshed. + */ + Refresh(itemName: string): void; + /** + * Refreshes specific items from the dashboard displayed in the Web Dashboard control. + * @param itemName An array of string values that specify the component names of the dashboard items to be refreshed. + */ + Refresh(itemName: string[]): void; + /** + * Requests underlying data for the specified dashboard item. + * @param itemName A string that specifies the component name of the dashboard item. + * @param args A ASPxClientDashboardItemRequestUnderlyingDataParameters object containing parameters used to obtain the underlying data. + * @param onCompleted A ASPxClientDashboardItemRequestUnderlyingDataCompleted object that references a method executed after the request is completed. + */ + RequestUnderlyingData(itemName: string, args: ASPxClientDashboardItemRequestUnderlyingDataParameters, onCompleted: ASPxClientDashboardItemRequestUnderlyingDataCompleted): void; + /** + * Returns the currently selected range in the specified Range Filter dashboard item. + * @param itemName A String value that specifies the component name of the Range Filter dashboard item. + */ + GetCurrentRange(itemName: string): ASPxClientDashboardRangeFilterSelection; + /** + * Returns the visible range for the specified Range Filter dashboard item. + * @param itemName A String value that specifies the component name of the Range Filter dashboard item. + */ + GetEntireRange(itemName: string): ASPxClientDashboardRangeFilterSelection; + /** + * Selects the required range in the specified Range Filter dashboard item. + * @param itemName A String that specifies the component name of the Range Filter dashboard item. + * @param range A ASPxClientDashboardRangeFilterSelection object that specifies a range to be selected. + */ + SetRange(itemName: string, range: ASPxClientDashboardRangeFilterSelection): void; + /** + * Selects a predefined range in the Range Filter dashboard item. + * @param itemName A String value that specifies the component name of the Range Filter. + * @param dateTimePeriodName A String value that specifies the predefined range name. + */ + SetPredefinedRange(itemName: string, dateTimePeriodName: string): void; + /** + * Returns names of the predefined ranges available for the specified Range Filter. + * @param itemName A string value that specifies the component name of the Range Filter dashboard item. + */ + GetAvailablePredefinedRanges(itemName: string): string[]; + /** + * Returns the name of the currently selected predefined range. + * @param itemName A string value that specifies the component name of the Range Filter dashboard item. + */ + GetCurrentPredefinedRange(itemName: string): string; +} +/** + * References a method that will handle the DashboardStateChanged event. + */ +interface ASPxClientDashboardStateChangedEventHandler { + /** + * References a method that will handle the DashboardStateChanged event. + * @param source The event source. + * @param e A ASPxClientDashboardStateChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardStateChangedEventArgs): void; +} +/** + * Provides data for the DashboardStateChanged event. + */ +interface ASPxClientDashboardStateChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the current state of the dashboard. + * Value: A string value that is the current state of the dashboard. + */ + DashboardState: string; +} +/** + * References a method that will handle the DashboardChanged event. + */ +interface ASPxClientDashboardChangedEventHandler { + /** + * References a method that will handle the DashboardChanged event. + * @param source The event source. + * @param e A ASPxClientDashboardChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardChangedEventArgs): void; +} +/** + * Provides data for the DashboardChanged event. + */ +interface ASPxClientDashboardChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the identifier of a newly opened dashboard. + * Value: A string value that is an identifier of newly opened dashboard. + */ + DashboardId: string; + /** + * Gets the name of a newly opened dashboard. + * Value: A string value that is the name of newly opened dashboard. + */ + DashboardName: string; +} +interface ASPxClientDashboardCustomizeMenuItemsEventHandler { + (source: S, e: ASPxClientDashboardCustomizeMenuItemsEventArgs): void; +} +interface ASPxClientDashboardMenuItem { + id: string; + title: string; + template: string; + selected: boolean; + disabled: boolean; + hasSeparator: boolean; + click: Function; + hotKey: number; +} +interface ASPxClientDashboardCustomizeMenuItemsEventArgs extends ASPxClientEventArgs { + Items: ASPxClientDashboardMenuItem[]; + FindById(itemId: string): ASPxClientDashboardMenuItem; +} +/** + * References a method that will handle the BeforeRender event. + */ +interface ASPxClientDashboardBeforeRenderEventHandler { + /** + * References a method that will handle the BeforeRender event. + * @param source The event source. + * @param e An ASPxClientEventArgs object that contains event data. + */ + (source: S, e: ASPxClientEventArgs): void; +} +/** + * Serves as the base class for classes that provide data for client-side events related to dashboard items. + */ +interface ASPxClientDashboardItemEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item. + * Value: A string value that is the component name of the dashboard item. + */ + ItemName: string; + /** + * Returns whether or not the specified value is null. + * @param value The specified value. + */ + IsNullValue(value: Object): boolean; + /** + * Returns whether or not the specified value is 'others'. + * @param value The specified value. + */ + IsOthersValue(value: Object): boolean; +} +/** + * References a method that will handle the ItemMasterFilterStateChanged event. + */ +interface ASPxClientDashboardItemMasterFilterStateChangedEventHandler { + /** + * References a method that will handle the ItemMasterFilterStateChanged event. + * @param source The event source. + * @param e An ASPxClientDashboardItemMasterFilterStateChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemMasterFilterStateChangedEventArgs): void; +} +/** + * Provides data for the ItemMasterFilterStateChanged event. + */ +interface ASPxClientDashboardItemMasterFilterStateChangedEventArgs extends ASPxClientDashboardItemEventArgs { + /** + * Gets the currently selected values. + * Value: An array of objects that are the currently selected values. + */ + Values: Object[][]; +} +/** + * References a method that will handle the ItemDrillDownStateChanged event. + */ +interface ASPxClientDashboardItemDrillDownStateChangedEventHandler { + /** + * References a method that will handle the ItemDrillDownStateChanged event. + * @param source The event source. + * @param e An ASPxClientDashboardItemDrillDownStateChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardItemDrillDownStateChangedEventArgs): void; +} +/** + * Provides data for the ItemDrillDownStateChanged event. + */ +interface ASPxClientDashboardItemDrillDownStateChangedEventArgs extends ASPxClientDashboardItemEventArgs { + /** + * Gets the drill-down action performed in the dashboard item. + * Value: A string value that is the drill-down action performed in the dashboard item. + */ + Action: string; + /** + * Gets values from the current drill-down hierarchy. + * Value: An array of values from the current drill-down hierarchy. + */ + Values: Object[]; +} +/** + * References a method that will handle the ActionAvailabilityChanged event. + */ +interface ASPxClientActionAvailabilityChangedEventHandler { + /** + * References a method that will handle the ActionAvailabilityChanged event. + * @param source The event source. + * @param e A ASPxClientActionAvailabilityChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientActionAvailabilityChangedEventArgs): void; +} +/** + * Provides data for the ActionAvailabilityChanged event. + */ +interface ASPxClientActionAvailabilityChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item. + * Value: A string value that is the component name of the dashboard item. + */ + ItemName: string; +} +/** + * References a method that will handle the DynamicLookUpValuesLoaded event. + */ +interface ASPxClientDynamicLookUpValuesLoadedEventHandler { + /** + * References a method that will handle the DynamicLookUpValuesLoaded event. + * @param source The event source. + * @param e A ASPxClientDynamicLookUpValuesLoadedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDynamicLookUpValuesLoadedEventArgs): void; +} +/** + * Provides data for the DynamicLookUpValuesLoaded event. + */ +interface ASPxClientDynamicLookUpValuesLoadedEventArgs extends ASPxClientEventArgs { + /** + * Gets the dashboard parameter name whose values have been loaded. + * Value: A string value that is the dashboard parameter name whose values have been loaded. + */ + ParameterName: string; +} +/** + * References a method that will handle the ItemBeginUpdate event. + */ +interface ASPxClientItemBeginUpdateEventHandler { + /** + * References a method that will handle the ItemBeginUpdate event. + * @param source The event source. + * @param e A ASPxClientItemBeginUpdateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientItemBeginUpdateEventArgs): void; +} +/** + * Provides data for the ItemBeginUpdate event. + */ +interface ASPxClientItemBeginUpdateEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item. + * Value: A string value that is the component name of the dashboard item. + */ + ItemName: string; +} +/** + * References a method that will handle the ItemEndUpdate event. + */ +interface ASPxClientItemEndUpdateEventHandler { + /** + * References a method that will handle the ItemEndUpdate event. + * @param source The event source. + * @param e A ASPxClientItemEndUpdateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientItemEndUpdateEventArgs): void; +} +/** + * Provides data for the ItemEndUpdate event. + */ +interface ASPxClientItemEndUpdateEventArgs extends ASPxClientEventArgs { + /** + * Gets the component name of the dashboard item. + * Value: A string value that is the component name of the dashboard item. + */ + ItemName: string; +} +/** + * References a method that will handle the DashboardBeginUpdate event. + */ +interface ASPxClientDashboardBeginUpdateEventHandler { + /** + * References a method that will handle the DashboardBeginUpdate event. + * @param source The event source. + * @param e A ASPxClientDashboardBeginUpdateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardBeginUpdateEventArgs): void; +} +/** + * Provides data for the DashboardBeginUpdate event. + */ +interface ASPxClientDashboardBeginUpdateEventArgs extends ASPxClientEventArgs { + /** + * Gets the identifier of the dashboard for which the event was raised. + * Value: A string value that is the dashboard identifier. + */ + DashboardId: string; +} +/** + * References a method that will handle the DashboardEndUpdate event. + */ +interface ASPxClientDashboardEndUpdateEventHandler { + /** + * References a method that will handle the DashboardEndUpdate event. + * @param source The event source. + * @param e An ASPxClientDashboardEndUpdateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardEndUpdateEventArgs): void; +} +/** + * Provides data for the DashboardEndUpdate event. + */ +interface ASPxClientDashboardEndUpdateEventArgs extends ASPxClientEventArgs { + /** + * Gets the identifier of the dashboard for which the event was raised. + * Value: A string value that is the dashboard identifier. + */ + DashboardId: string; +} +/** + * A client-side equivalent of the ASPxDashboardViewer control. + */ +interface ASPxClientDashboardViewer extends ASPxClientControl { + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs after the available interactivity actions have changed. + */ + ActionAvailabilityChanged: ASPxClientEvent>; + /** + * Occurs when an end-user changes the state of the master filter. + */ + MasterFilterSet: ASPxClientEvent>; + /** + * Occurs when an end-user clears the selection in the master filter item. + */ + MasterFilterCleared: ASPxClientEvent>; + /** + * Provides the capability to handle data loading errors in the ASPxClientDashboardViewer. + */ + DataLoadingError: ASPxClientEvent>; + /** + * Occurs after a drill-down is performed. + */ + DrillDownPerformed: ASPxClientEvent>; + /** + * Occurs after a drill-up is performed. + */ + DrillUpPerformed: ASPxClientEvent>; + /** + * Occurs after the ASPxClientDashboardViewer is loaded. + */ + Loaded: ASPxClientEvent>; + /** + * Occurs when an end-user clicks a dashboard item. + */ + ItemClick: ASPxClientEvent>; + /** + * Allows you to provide custom visual interactivity for data-bound dashboard items that support element selection and highlighting. + */ + ItemVisualInteractivity: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemWidgetCreated: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemWidgetUpdating: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemWidgetUpdated: ASPxClientEvent>; + /** + * Allows you to access underlying UI/Data Visualization widgets. + */ + ItemBeforeWidgetDisposed: ASPxClientEvent>; + /** + * Occurs after the selection within the dashboard item is changed. + */ + ItemSelectionChanged: ASPxClientEvent>; + /** + * Allows you to color the required dashboard item elements using the specified colors. + */ + ItemElementCustomColor: ASPxClientEvent>; + /** + * Reloads data in the data sources. + */ + ReloadData(): void; + /** + * Reloads data in the data sources. + * @param parameters An array of ASPxClientDashboardParameter objects that specify dashboard parameters on the client side. + */ + ReloadData(parameters: ASPxClientDashboardParameter[]): void; + /** + * Returns dashboard parameter settings and metadata. + */ + GetParameters(): ASPxClientDashboardParameters; + /** + * Locks the EndUpdateParameters method call. + */ + BeginUpdateParameters(): void; + /** + * Unlocks the BeginUpdateParameters method and applies changes made to the parameter settings. + */ + EndUpdateParameters(): void; + /** + * Returns the currently selected range in the specified Range Filter dashboard item. + * @param itemName A String value that specifies the component name of the Range Filter dashboard item. + */ + GetCurrentRange(itemName: string): ASPxClientDashboardRangeFilterSelection; + /** + * Returns the visible range for the specified Range Filter dashboard item. + * @param itemName A String value that specifies the component name of the Range Filter dashboard item. + */ + GetEntireRange(itemName: string): ASPxClientDashboardRangeFilterSelection; + /** + * Selects the required range in the specified Range Filter dashboard item. + * @param itemName A String that specifies the component name of the Range Filter dashboard item. + * @param range A ASPxClientDashboardRangeFilterSelection object that specifies a range to be selected. + */ + SetRange(itemName: string, range: ASPxClientDashboardRangeFilterSelection): void; + /** + * Selects a predefined range in the Range Filter dashboard item. + * @param itemName A String value that specifies the component name of the Range Filter. + * @param dateTimePeriodName A String value that specifies the predefined range name. + */ + SetPredefinedRange(itemName: string, dateTimePeriodName: string): void; + /** + * Returns names of the predefined ranges available for the specified Range Filter. + * @param itemName A string value that specifies the component name of the Range Filter dashboard item. + */ + GetAvailablePredefinedRanges(itemName: string): string[]; + /** + * Returns the name of the currently selected predefined range. + * @param itemName A string value that specifies the component name of the Range Filter dashboard item. + */ + GetCurrentPredefinedRange(itemName: string): string; + /** + * Returns axis point tuples identifying elements that can be used to perform drill-down in the specified dashboard item. + * @param itemName A String that is the component name of the dashboard item. + */ + GetAvailableDrillDownValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns the axis point tuple identifying the current drill-down state. + * @param itemName A String that is the component name of the dashboard item. + */ + GetCurrentDrillDownValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple; + /** + * Returns axis point tuples identifying elements that can be selected in the current state of the master filter item. + * @param itemName A String that is the component name of the master filter item. + */ + GetAvailableFilterValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns axis point tuples identifying currently selected elements in the master filter item. + * @param itemName A String that is the component name of the master filter item. + */ + GetCurrentFilterValues(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Returns currently selected elements in the master filter item. + * @param itemName A String that specifies a component name of the master filter item. + */ + GetCurrentSelection(itemName: string): ASPxClientDashboardItemDataAxisPointTuple[]; + /** + * Requests underlying data for the specified dashboard item. + * @param itemName A string that specifies the component name of the dashboard item. + * @param args A ASPxClientDashboardItemRequestUnderlyingDataParameters object containing parameters used to obtain the underlying data. + * @param onCompleted A ASPxClientDashboardItemRequestUnderlyingDataCompleted object that references a method executed after the request is completed. + */ + RequestUnderlyingData(itemName: string, args: ASPxClientDashboardItemRequestUnderlyingDataParameters, onCompleted: ASPxClientDashboardItemRequestUnderlyingDataCompleted): void; + /** + * Invokes the Dashboard Parameters dialog. + */ + ShowParametersDialog(): void; + /** + * Closes the Dashboard Parameters dialog. + */ + HideParametersDialog(): void; + /** + * Returns settings that specify parameters affecting how the dashboard is exported. + */ + GetExportOptions(): ASPxClientDashboardExportOptions; + /** + * Allows you to obtain options related to exporting a dashboard/dashboard item to the PDF format. + */ + GetPdfExportOptions(): DashboardPdfExportOptions; + /** + * Allows you to obtain options related to exporting a dashboard/dashboard item to an image. + */ + GetImageExportOptions(): DashboardImageExportOptions; + /** + * Allows you to obtain options related to exporting a dashboard/dashboard item to the Excel format. + */ + GetExcelExportOptions(): DashboardExcelExportOptions; + /** + * Specifies settings that specify parameters affecting how the dashboard is exported. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + */ + SetExportOptions(options: ASPxClientDashboardExportOptions): void; + /** + * Allows you to specify options related to exporting a dashboard/dashboard item to the PDF format. + * @param options A DashboardPdfExportOptions object containing options related to exporting a dashboard/dashboard item to the PDF format. + */ + SetPdfExportOptions(options: DashboardPdfExportOptions): void; + /** + * Allows you to specify options related to exporting a dashboard/dashboard item to an image. + * @param options A DashboardImageExportOptions object containing options related to exporting a dashboard/dashboard item to an image. + */ + SetImageExportOptions(options: DashboardImageExportOptions): void; + /** + * Allows you to specify options related to exporting a dashboard/dashboard item to the Excel format. + * @param options A DashboardExcelExportOptions object containing options related to exporting a dashboard item to the Excel format. + */ + SetExcelExportOptions(options: DashboardExcelExportOptions): void; + /** + * Exports a dashboard to a PDF file and writes it to the Response. + */ + ExportToPdf(): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A DashboardPdfExportOptions object containing PDF-specific export options. + */ + ExportToPdf(options: DashboardPdfExportOptions): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A DashboardPdfExportOptions object containing PDF-specific export options. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToPdf(options: DashboardPdfExportOptions, fileName: string): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + */ + ExportToPdf(options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard to a PDF file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToPdf(options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports a dashboard to an Image file and writes it to the Response. + */ + ExportToImage(): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A DashboardImageExportOptions object containing image-specific export options. + */ + ExportToImage(options: DashboardImageExportOptions): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A DashboardImageExportOptions object containing image-specific export options. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToImage(options: DashboardImageExportOptions, fileName: string): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + */ + ExportToImage(options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard to an Image file with the specified export options and writes it to the Response. + * @param options A ASPxClientDashboardExportOptions object containing settings that specify parameters affecting how the dashboard is exported. + * @param fileName A string that specifies the name of the exported file. + */ + ExportToImage(options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports dashboard data to the specified file in Excel format. + */ + ExportToExcel(): void; + /** + * Exports dashboard data to the specified file in Excel format. + * @param options A DashboardExcelExportOptions object containing Excel-specific options. + */ + ExportToExcel(options: DashboardImageExportOptions): void; + /** + * Exports dashboard data to the specified file in Excel format. + * @param options A DashboardExcelExportOptions object containing Excel-specific options. + * @param fileName A string value that specifies the name of the exported file. + */ + ExportToExcel(options: DashboardImageExportOptions, fileName: string): void; + /** + * Exports a dashboard item to a PDF file and writes it to the Response. + * @param itemName A String that is the component name of the dashboard item to be exported. + */ + ExportDashboardItemToPdf(itemName: string): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardPdfExportOptions object containing PDF-specific export options. + */ + ExportDashboardItemToPdf(itemName: string, options: DashboardPdfExportOptions): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardPdfExportOptions object containing PDF-specific export options. + * @param fileName A string that specifies the name of the exported file. + */ + ExportDashboardItemToPdf(itemName: string, options: DashboardPdfExportOptions, fileName: string): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A String that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + */ + ExportDashboardItemToPdf(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to a PDF file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + * @param fileName A string that specifies the name of the exported file. + */ + ExportDashboardItemToPdf(itemName: string, options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports a dashboard item to an Image file and writes it to the Response. + * @param itemName A String that is the component name of the dashboard item to be exported. + */ + ExportDashboardItemToImage(itemName: string): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardImageExportOptions object containing image-specific export options. + */ + ExportDashboardItemToImage(itemName: string, options: DashboardImageExportOptions): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardImageExportOptions object containing image-specific export options. + * @param fileName A string value that specifies the name of the exported file. + */ + ExportDashboardItemToImage(itemName: string, options: DashboardImageExportOptions, fileName: string): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A String that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + */ + ExportDashboardItemToImage(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to an Image file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + * @param fileName A string value that specifies the name of the exported file. + */ + ExportDashboardItemToImage(itemName: string, options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Exports a dashboard item to an Excel file and writes it to the Response. + * @param itemName A String that is the component name of the dashboard item to be exported. + */ + ExportDashboardItemToExcel(itemName: string): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardExcelExportOptions object containing Excel export options. + */ + ExportDashboardItemToExcel(itemName: string, options: DashboardExcelExportOptions): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options A DashboardExcelExportOptions object containing Excel export options. + * @param fileName A string that specifies the name of the exported Excel file. + */ + ExportDashboardItemToExcel(itemName: string, options: DashboardExcelExportOptions, fileName: string): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A String that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options to be applied to the exported dashboard item. + */ + ExportDashboardItemToExcel(itemName: string, options: ASPxClientDashboardExportOptions): void; + /** + * Exports a dashboard item to an Excel file with the specified export options and writes it to the Response. + * @param itemName A string that is the component name of the dashboard item to be exported. + * @param options An ASPxClientDashboardExportOptions object containing export options. + * @param fileName A string that specifies the name of the exported Excel file. + */ + ExportDashboardItemToExcel(itemName: string, options: ASPxClientDashboardExportOptions, fileName: string): void; + /** + * Returns the dashboard width. + */ + GetWidth(): number; + /** + * Returns the dashboard height. + */ + GetHeight(): number; + /** + * Specifies the dashboard width. + * @param width An integer value that specifies the dashboard width. + */ + SetWidth(width: number): void; + /** + * Specifies the dashboard height. + * @param height An integer value that specifies the dashboard height. + */ + SetHeight(height: number): void; + /** + * Specifies the dashboard size. + * @param width An integer value that specifies the dashboard width. + * @param height An integer value that specifies the dashboard height. + */ + SetSize(width: number, height: number): void; + /** + * Selects required elements by their values in the specified master filter item. + * @param itemName A String that species the component name of the master filter item. + * @param values Values that will be used to select elements in the master filter item. + */ + SetMasterFilter(itemName: string, values: Object[][]): void; + /** + * Selects the required elements in the specified master filter item. + * @param itemName A String that specifies the component name of the master filter item. + * @param axisPointTuples An array of ASPxClientDashboardItemDataAxisPointTuple objects used to identify master filter elements. + */ + SetMasterFilter(itemName: string, axisPointTuples: ASPxClientDashboardItemDataAxisPointTuple[]): void; + /** + * Performs a drill-down for the required element by its value. + * @param itemName A String that species the component name of the dashboard item. + * @param value A value that will be used to perform a drill-down for the required element. + */ + PerformDrillDown(itemName: string, value: Object): void; + /** + * Performs a drill-down for the required element. + * @param itemName A String that specifies the component name of the dashboard item. + * @param axisPointTuple A ASPxClientDashboardItemDataAxisPointTuple object representing a set of axis points. + */ + PerformDrillDown(itemName: string, axisPointTuple: ASPxClientDashboardItemDataAxisPointTuple): void; + /** + * Clears the specified master filter item. + * @param itemName A String that specifies the component name of the master filter item. + */ + ClearMasterFilter(itemName: string): void; + /** + * Performs a drill-up for the specified dashboard item. + * @param itemName A String that specifies the component name of the dashboard item. + */ + PerformDrillUp(itemName: string): void; + /** + * Returns whether or not the specified master filter item allows selecting one or more elements. + * @param itemName A String that specifies the component name of the master filter item. + */ + CanSetMasterFilter(itemName: string): boolean; + /** + * Returns whether or not the specified master filter can be cleared in the current state. + * @param itemName A String that specifies the component name of the master filter item. + */ + CanClearMasterFilter(itemName: string): boolean; + /** + * Returns whether or not drill down is possible in the current state of the specified dashboard item. + * @param itemName A String that specifies the component name of the dashboard item. + */ + CanPerformDrillDown(itemName: string): boolean; + /** + * Returns whether or not drill up is possible in the current state of the specified dashboard item. + * @param itemName A String that specifies the component name of the dashboard item. + */ + CanPerformDrillUp(itemName: string): boolean; + /** + * Returns the client data for the specified dashboard item. + * @param itemName A string that specifies the component name of the dashboard item. + */ + GetItemData(itemName: string): ASPxClientDashboardItemData; +} +/** + * References a method that will handle the ActionAvailabilityChanged event. + */ +interface ASPxClientDashboardActionAvailabilityChangedEventHandler { + /** + * References a method that will handle the ActionAvailabilityChanged event. + * @param source The event source. + * @param e A ASPxClientDashboardActionAvailabilityChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardActionAvailabilityChangedEventArgs): void; +} +/** + * Provides data for the ActionAvailabilityChanged event. + */ +interface ASPxClientDashboardActionAvailabilityChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets whether or not data reloading is available in the current state of dashboard item. + * Value: true, if data reloading is available in the current state of dashboard item; otherwise, false. + */ + IsReloadDataAvailable: boolean; + /** + * Gets interactivity actions currently available for the dashboard item. + * Value: An array of ASPxClientDashboardItemAction objects that represent interactivity actions currently available for the dashboard item. + */ + ItemActions: ASPxClientDashboardItemAction[]; +} +/** + * References a method that will handle the DataLoadingError event. + */ +interface ASPxClientDashboardDataLoadingErrorEventHandler { + /** + * References a method that will handle the DataLoadingError event. + * @param source The event source. + * @param e A ASPxClientDashboardDataLoadingErrorEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardDataLoadingErrorEventArgs): void; +} +/** + * Provides data for the DataLoadingError event. + */ +interface ASPxClientDashboardDataLoadingErrorEventArgs extends ASPxClientEventArgs { + /** + * Allows you to determine whether or not the error message will be shown. + */ + IsErrorMessageShown(): boolean; + /** + * Allows you to specify whether to show the error message. + * @param value true, to show the error message; otherwise, false. + */ + ShowErrorMessage(value: boolean): void; + /** + * Allows you to obtain the displayed error message. + */ + GetError(): string; + /** + * Allows you to specify the displayed error message. + * @param value A string value that specifies the displayed error message. + */ + SetError(value: string): void; +} +/** + * Represents an interactivity action in the dashboard item. + */ +interface ASPxClientDashboardItemAction { + /** + * Gets the name of the dashboard item. + * Value: A string that specifies the name of the dashboard item. + */ + ItemName: string; + /** + * Gets interactivity actions performed on a dashboard item. + * Value: An array of ASPxClientDashboardAction values that specify interactivity actions performed on a dashboard item. + */ + Actions: any[]; +} +declare enum ASPxClientDashboardAction { + SetMasterFilter=0, + ClearMasterFilter=1, + DrillDown=2, + DrillUp=3 +} +/** + * References a method that will handle the MasterFilterSet event. + */ +interface ASPxClientDashboardMasterFilterSetEventHandler { + /** + * References a method that will handle the MasterFilterSet event. + * @param source The event source. + * @param e A ASPxClientDashboardMasterFilterSetEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardMasterFilterSetEventArgs): void; +} +/** + * Provides data for the MasterFilterSet event. + */ +interface ASPxClientDashboardMasterFilterSetEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the dashboard item. + * Value: A string value that specifies the component name of the dashboard item. + */ + ItemName: string; + /** + * Gets values of currently selected elements in the master filter item. + * Value: Values of currently selected elements in the master filter item. + */ + Values: Object[][]; + /** + * Returns whether or not the specified value is NullValue. + * @param value The specified value. + */ + IsNullValue(value: Object): boolean; + /** + * Returns whether or not the specified value is OthersValue. + * @param value The specified value. + */ + IsOthersValue(value: Object): boolean; +} +/** + * References a method that will handle the MasterFilterCleared event. + */ +interface ASPxClientDashboardMasterFilterClearedEventHandler { + /** + * References a method that will handle the MasterFilterCleared event. + * @param source The event source. + * @param e A ASPxClientDashboardMasterFilterClearedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardMasterFilterClearedEventArgs): void; +} +/** + * Provides data for the MasterFilterCleared event. + */ +interface ASPxClientDashboardMasterFilterClearedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the dashboard item. + * Value: A string value that is the component name of the dashboard item. + */ + ItemName: string; +} +/** + * References a method that will handle the DrillDownPerformed event. + */ +interface ASPxClientDashboardDrillDownPerformedEventHandler { + /** + * References a method that will handle the DrillDownPerformed event. + * @param source The event source. + * @param e A ASPxClientDashboardDrillDownPerformedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardDrillDownPerformedEventArgs): void; +} +/** + * Provides data for the DrillDownPerformed event. + */ +interface ASPxClientDashboardDrillDownPerformedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the dashboard item. + * Value: A string that specifies the name of the dashboard item. + */ + ItemName: string; + /** + * Gets values from the current drill-down hierarchy. + * Value: An array of values from the current drill-down hierarchy. + */ + Values: Object[]; + /** + * Returns whether or not the specified value is NullValue. + * @param value The specified value. + */ + IsNullValue(value: Object): boolean; + /** + * Returns whether or not the specified value is OthersValue. + * @param value The specified value. + */ + IsOthersValue(value: Object): boolean; +} +/** + * References a method that will handle the DrillUpPerformed event. + */ +interface ASPxClientDashboardDrillUpPerformedEventHandler { + /** + * References a method that will handle the DrillUpPerformed event. + * @param source The event source. + * @param e A ASPxClientDashboardDrillUpPerformedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDashboardDrillUpPerformedEventArgs): void; +} +/** + * Provides data for the DrillUpPerformed event. + */ +interface ASPxClientDashboardDrillUpPerformedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the dashboard item. + * Value: A string that is the name of the dashboard item. + */ + ItemName: string; +} +interface CardWidgetCustomizeTextEventArgs { + getValue(): Object; + getDefaultText(): string; +} +/** + * A Card widget that visualizes a Card dashboard item's data. + */ +interface CardWidget { + /** + * Gets or sets the background color for a card. + * Value: A string that specifies the HTML color used to paint a card's background. + */ + cardBackColor: string; + onCustomizeText: Object; +} +/** + * When implemented, represents the Web Dashboard extension. + */ +interface IExtension { + /** + * Gets a unique name of a Web Dashboard extension. + * Value: A string value that is a unique name of a Web Dashboard extension. + */ + name: string; + /** + * Contains code that will be invoked when you register the dashboard extension. + */ + start(): void; + /** + * Contains code that will be invoked when you unregister the dashboard extension. + */ + stop(): void; +} +/** + * An inner part of the ASPxClientDashboard control. + */ +interface DashboardControl { + /** + * Gets or sets knockout templates that you can use in the Web Dashboard. + * Value: A object that is a knockout template collection. + */ + customTemplates: KnockoutObservableArray; + /** + * Provides an access to the collection of registered dashboard extensions. + * Value: An array of IExtension objects that are dashboard extensions. + */ + extensions: IExtension[]; + /** + * Initializes a new dashboard with the specified name and JSON model. + * @param id A string value that is a unique name of the created dashboard. + * @param dashboardJson A dashboard model encoded in the specified JSON string. + */ + initializeDashboard(id: string, dashboardJson: string): void; + /** + * Initializes a new dashboard with the specified name, JSON model and initial state. + * @param id A string value that is a unique name of the created dashboard. + * @param dashboardJson A dashboard model encoded in the specified JSON string. + * @param initialState A JSON object that specifies the dashboard state. + */ + initializeDashboard(id: string, dashboardJson: string, initialState: Object): void; + /** + * Allows you to register a dashboard extension to add its functionality to the Web Dashboard. + * @param extension An IExtension object that is a dashboard extension. + */ + registerExtension(extension: IExtension): void; + /** + * Allows you to get access to the extension. + * @param extensionName A string value that is the dashboard extension name. + */ + findExtension(extensionName: string): IExtension; + /** + * Allows you to unregister a dashboard extension to disable its functionality in the Web Dashboard. + * @param extensionName A string value that is a dashboard extension name. + */ + unregisterExtension(extensionName: string): void; +} +interface DashboardParameterDialogExtension extends IExtension { +} +interface DashboardExportExtension extends IExtension { +} +interface DashboardClientApiExtension extends IExtension { +} +interface DashboardCurrencyEditorExtension extends IExtension { +} +interface DataSourceBrowserExtension extends IExtension { +} +interface DataSourceWizardExtension extends IExtension { +} +interface DashboadItemMenuExtension extends IExtension { +} +/** + * A Web Dashboard extension that allows you to keep track of all user actions, and cancel or repeat them. + */ +interface UndoRedoExtension extends IExtension { + /** + * Allows you to track whether the Web Dashboard has unsaved changes. + */ + isChanged(): boolean; +} +/** + * An extension that is the dashboard item's Binding menu allowing you to create and modify data binding. + */ +interface BindingPanelExtension extends IExtension { +} +/** + * A Web Dashboard extension that allows you to configure color schemes. + */ +interface DashboardColorSchemeEditorExtension extends IExtension { +} +/** + * An extension that is the dashboard item's Convert To menu allowing you to convert or duplicate the current item. + */ +interface ConversionPanelExtension extends IExtension { +} +/** + * A Web Dashboard extension that allows you to save the current dashboard. + */ +interface SaveDashboardExtension extends IExtension { + /** + * Allows you to save the current dashboard with a specified unique name and JSON model. + * @param dashboardId A string value that is a unique name of the created dashboard. + * @param dashboardJson A dashboard model encoded in the specified JSON string. + */ + performSaveDashboard(dashboardId: string, dashboardJson: string): void; + /** + * Allows you to invoke a custom function while you save a dashboard. + * @param action A custom function that is invoked when the dashboard is about to be saved. + */ + ensureDashboardSaved(action: Function): void; + /** + * Saves the opened dashboard. + */ + saveDashboard(): void; +} +/** + * A Web Dashboard extension that allows you to create a new dashboard. + */ +interface CreateDashboardExtension extends IExtension { + /** + * Creates a new dashboard with a specified name and JSON model. + * @param dashboardName A string value that is the name of the created dashboard. + * @param dashboardJson A dashboard model encoded in the specified JSON string. + */ + performCreateDashboard(dashboardName: string, dashboardJson: string): void; +} +/** + * A Web Dashboard extension that allows you to open the created dashboards. + */ +interface OpenDashboardExtension extends IExtension { + /** + * Loads a dashboard with the specified identifier from the dashboard storage. + * @param id A String value that specifies the unique dashboard name. + */ + loadDashboard(id: string): void; +} +/** + * An extension that is the dashboard item's Interactivity menu containing settings that affect on interaction between various dashboard items. + */ +interface InteractivityPanelExtension extends IExtension { +} +/** + * An extension that is the dashboard item's Options menu containing specific options and settings related to the current dashboard item. + */ +interface OptionsPanelExtension extends IExtension { +} +/** + * An extension that is the Web Dashboard title editor. + */ +interface DashboardTitleEditorExtension extends IExtension { +} +/** + * The Dashboard Panel extension that displays a list of available dashboards and lets you switch between the designer and viewer modes. + */ +interface DashboardPanelExtension extends IExtension { + /** + * Gets or sets the width of the Dashboard Panel extension. + * Value: An integer value that specifies the Dashboard Panel's width. + */ + panelWidth: number; + /** + * Gets or sets whether the Dashboard Panel is visible. + * Value: true, to display the Dashboard Panel; otherwise, false. + */ + visible: KnockoutObservableBoolean; + /** + * Gets or sets whether you can switch into the designer mode. + * Value: true, to display the Edit in Designer button on the dashboard panel; otherwise, false. + */ + allowSwitchToDesigner: KnockoutObservableBoolean; +} +/** + * An extension that is a list of available data sources used to provide data to the Web Dashboard. + */ +interface AvailableDataSourcesExtension extends IExtension { +} +/** + * A dashboard menu item. + */ +interface DashboardMenuItem { + /** + * Gets or sets a unique identifier of a dashboard menu item. + * Value: A string value that is a menu item's unique identifier. + */ + id: string; + /** + * Gets or sets a dashboard menu item title. + * Value: A string value that is a dashboard menu item title. + */ + title: string; + /** + * Gets or sets a position of the dashboard menu item within the dashboard menu. + * Value: A zero-based integer specifying the position of the current dashboard menu item. + */ + index: number; + /** + * Gets or sets a code of the key used in the keyboard shortcut. This shortcut allows you to invoke the current menu item. + * Value: An integer value that specifies a key code. + */ + hotKey: number; + /** + * Gets or sets a custom function that is invoked when a click occurs. + * Value: A custom function that is invoked when a click occurs. + */ + click: Function; + /** + * Gets or sets a knockout template for the extension. + * Value: A string value that is an id of the knockout template. + */ + template: string; + /** + * Gets or sets whether the dashboard menu item is selected. + * Value: true, if the dashboard menu item is selected; otherwise, false; + */ + selected: KnockoutObservableBoolean; + /** + * Gets whether a dashboard menu item is disabled. + * Value: true, if a dashboard menu item should be disabled; otherwise, false. + */ + disabled: KnockoutObservableBoolean; + /** + * Gets or sets whether a dashboard menu item has a separator. + * Value: true, if a dashboard menu item has a separator; otherwise, false. + */ + hasSeparator: boolean; + /** + * Gets or sets data that is used by a menu item. + * Value: An object that contains data used by a menu item. + */ + data: Object; +} +/** + * A toolbox item of the specified dashboard toolbox group. + */ +interface DashboardToolboxItem { + /** + * Gets or sets a dashboard item type. + * Value: A string value that is a dashboard item type. + */ + type: string; + /** + * Gets or sets an icon of the dashboard toolbox item. + * Value: A string value that is the icon id from the SVG definition. + */ + icon: string; + /** + * Gets or sets a unique name of the dashboard toolbox item. + * Value: A string value that is a toolbox item's unique name. + */ + name: string; + /** + * Gets or sets a dashboard toolbox item title. + * Value: A string value that is a dashboard toolbox item title. + */ + title: string; + /** + * Gets or sets whether a toolbox item should be disabled. + * Value: true, if a toolbox item should be disabled; otherwise, false. + */ + disabled: KnockoutObservableBoolean; + /** + * Gets or sets a custom function that is invoked when a click occurs. + * Value: A custom function that is invoked when a click occurs. + */ + click: Function; +} +/** + * A toolbar item of the specified dashboard toolbar group. + */ +interface DashboardToolbarItem { + /** + * Gets or sets an icon of the dashboard toolbar item. + * Value: A string value that is the icon id from the SVG definition. + */ + icon: string; + /** + * Gets or sets a unique name of the dashboard toolbar item. + * Value: A string value that is a unique toolbar item name. + */ + name: string; + /** + * Gets or sets a dashboard toolbar item title. + * Value: A string value that is a dashboard toolbar item title. + */ + title: string; + /** + * Gets or sets whether a toolbar item should be disabled. + * Value: true, if a toolbar item is disabled; otherwise, false. + */ + disabled: KnockoutObservableBoolean; + /** + * Gets or sets a knockout extension template. + * Value: A string value that is an id of the knockout template. + */ + template: string; + /** + * Gets or sets a custom function that is invoked when a click occurs. + * Value: A custom function that is invoked when a click occurs. + */ + click: Function; +} +/** + * A toolbox group that contains dashboard toolbox items. + */ +interface DashboardToolboxGroup { + /** + * Gets or sets a unique name of the dashboard toolbox group. + * Value: A string value that is a unique toolbox group name. + */ + name: string; + /** + * Gets or sets a dashboard toolbox group title. + * Value: A string value that is a dashboard toolbox group title. + */ + title: string; + /** + * Gets or sets a position of the toolbox group within the Toolbox. + * Value: A zero-based integer specifying the position of the current toolbox group. + */ + index: number; + /** + * Provide an access to the collection of toolbox items obtained from the specified toolbox group. + * Value: A object that is an array of items obtained from the specified toolbox group. + */ + items: KnockoutObservableArray; +} +/** + * A toolbar group that contains dashboard toolbar items. + */ +interface DashboardToolbarGroup { + /** + * Gets or sets a unique name of the dashboard toolbar group. + * Value: A string value that is a unique toolbar group name. + */ + name: string; + /** + * Gets or sets a dashboard toolbar group title. + * Value: A string value that is a dashboard toolbar group title. + */ + title: string; + /** + * Gets or sets a position of the toolbar group within the Toolbox. + * Value: A zero-based integer specifying the position of the current toolbar group. + */ + index: number; + /** + * Provide an access to the collection of toolbox items obtained from the specified toolbar group. + * Value: A object that is an array of items obtained from the specified toolbar group. + */ + items: KnockoutObservableArray; +} +/** + * The Web Dashboard Toolbox extension that provides access to the dashboard menu and allows you to add dashboard items, as well as undo or repeat user actions. + */ +interface ToolboxExtension extends IExtension { + /** + * Gets or sets the visibility of the dashboard menu. + * Value: true, to display the dashboard menu; otherwise, false. + */ + menuVisible: KnockoutObservableBoolean; + /** + * Provide an access to the collection of menu items obtained from the dashboard menu. + * Value: A object that is a collection the dashboard menu items . + */ + menuItems: KnockoutObservableArray; + /** + * Provide an access to the collection of toolbox groups obtained from the Toolbox. + * Value: A object that is a collection the toolbox groups. + */ + toolboxGroups: KnockoutObservableArray; + /** + * Provide an access to the collection of toolbar groups obtained from the Toolbox. + * Value: A object that is a collection the toolbar groups. + */ + toolbarGroups: KnockoutObservableArray; + /** + * Allows you to add a specified menu item to the dashboard menu. + * @param menuItem A DashboardMenuItem object that is a dashboard menu item. + */ + addMenuItem(menuItem: DashboardMenuItem): void; + /** + * Removes the specified dashboard item from the dashboard menu. + * @param menuItemId A string value that is a unique dashboard item name. + */ + removeMenuItem(menuItemId: string): void; + /** + * Simulates a dashboard menu item selection. + * @param menuItem A DashboardMenuItem object that is a dashboard menu item. + */ + selectMenuItem(menuItem: DashboardMenuItem): void; + /** + * Allows you to add a specified toolbox item into a specified toolbox group. + * @param groupName A string value that is a toolbox group name. To get a toolbox group name, use the name property. + * @param toolboxItem A DashboardToolboxItem object that is a dashboard toolbox item. + */ + addToolboxItem(groupName: string, toolboxItem: DashboardToolboxItem): void; + /** + * Removes the specified toolbox item from the specified toolbox group. + * @param groupName A string value that is a unique toolbox group name. + * @param toolboxItemName A string value that is a unique toolbox item name. + */ + removeToolboxItem(groupName: string, toolboxItemName: string): void; + /** + * Allows you to add a specified toolbar item into a specified toolbar group. + * @param groupName A string value that is a toolbar group name. To get a toolbar group name, use the name property. + * @param toolbarItem A DashboardToolbarItem object that is a dashboard toolbar item. + */ + addToolbarItem(groupName: string, toolbarItem: DashboardToolbarItem): void; + /** + * Removes the specified toolbar item from the specified toolbar group. + * @param groupName A string value that is a unique toolbar group name. + * @param toolbarItemName A string value that is a unique toolbar item name. + */ + removeToolbarItem(groupName: string, toolbarItemName: string): void; +} +/** + * A Web Dashboard extension that allows you to create and edit dashboard parameters. + */ +interface DashboardParameterEditorExtension extends IExtension { +} +/** + * Serves as the base object for all the editors included in the client-side object model. + */ +interface ASPxClientEditBase extends ASPxClientControl { + /** + * Returns the editor's value. + */ + GetValue(): Object; + /** + * Changes the editor's value. + * @param value An object representing the data to be assigned to the editor's edit value. + */ + SetValue(value: Object): void; + /** + * Returns a value indicating whether an editor is enabled. + */ + GetEnabled(): boolean; + /** + * Specifies whether an editor is enabled. + * @param value true to enable the editor; otherwise, false. + */ + SetEnabled(value: boolean): void; + /** + * Returns the text displayed in the editor caption. + */ + GetCaption(): string; + /** + * Specifies the text displayed in the editor caption. + * @param caption A string value specifying the editor caption. + */ + SetCaption(caption: string): void; +} +/** + * Serves as the base object for all the editors that support validation. + */ +interface ASPxClientEdit extends ASPxClientEditBase { + /** + * Fires on the client side when the editor receives input focus. + */ + GotFocus: ASPxClientEvent>; + /** + * Fires on the client side when the editor loses input focus. + */ + LostFocus: ASPxClientEvent>; + /** + * Allows you to specify whether the value entered into the editor is valid, and whether the editor is allowed to lose focus. + */ + Validation: ASPxClientEvent>; + /** + * Fires after the editor's value has been changed by end-user interactions. + */ + ValueChanged: ASPxClientEvent>; + /** + * Returns an HTML element that represents the control's input element. + */ + GetInputElement(): Object; + /** + * Sets input focus to the editor. + */ + Focus(): void; + /** + * Gets a value that indicates whether the editor's value passes validation. + */ + GetIsValid(): boolean; + /** + * Gets the error text to be displayed within the editor's error frame if the editor's validation fails. + */ + GetErrorText(): string; + /** + * Sets a value that specifies whether the editor's value is valid. + * @param isValid True if the editor's value is valid; otherwise, False. + */ + SetIsValid(isValid: boolean): void; + /** + * Sets the error text to be displayed within the editor's error frame if the editor's validation fails. + * @param errorText A string value representing the error text. + */ + SetErrorText(errorText: string): void; + /** + * Performs the editor's validation. + */ + Validate(): void; +} +/** + * Represents the client-side equivalent of the ASPxBinaryImage control. + */ +interface ASPxClientBinaryImage extends ASPxClientEdit { + /** + * Occurs on the client side after an image is clicked. + */ + Click: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client side if any server error occurs during server-side processing of a callback sent by the ASPxClientBinaryImage. + */ + CallbackError: ASPxClientEvent>; + /** + * Sets the size of the image editor. + * @param width An integer value that specifies the control's width. + * @param height An integer value that specifies the control's height. + */ + SetSize(width: number, height: number): void; + /** + * For internal use only. + */ + GetValue(): Object; + /** + * For internal use only. + * @param value + */ + SetValue(value: Object): void; + /** + * Removes an image from the editor content. + */ + Clear(): void; + /** + * Returns a name of the last uploaded file. + */ + GetUploadedFileName(): string; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * 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; +} +/** + * Represents the client-side equivalent of the ASPxButton control. + */ +interface ASPxClientButton extends ASPxClientControl { + /** + * Occurs on the client side when the button's checked state is changed. + */ + CheckedChanged: ASPxClientEvent>; + /** + * Fires on the client side when the button receives input focus. + */ + GotFocus: ASPxClientEvent>; + /** + * Fires on the client side when the button loses input focus. + */ + LostFocus: ASPxClientEvent>; + /** + * Occurs on the client side after a button is clicked. + */ + Click: ASPxClientEvent>; + /** + * Simulates a mouse click action on the button control. + */ + DoClick(): void; + /** + * Returns a value indicating whether the button is checked. + */ + GetChecked(): boolean; + /** + * Sets a value that specifies the button's checked status. + * @param value true if the button is checked; otherwise, false. + */ + SetChecked(value: boolean): void; + /** + * Returns the text displayed within the button. + */ + GetText(): string; + /** + * Sets the text to be displayed within the button. + * @param value A string value specifying the text to be displayed within the button. + */ + SetText(value: string): void; + /** + * Returns the URL pointing to the image displayed within the button. + */ + GetImageUrl(): string; + /** + * Sets the URL pointing to the image displayed within the button. + * @param value A string value that is the URL to the image displayed within the button. + */ + SetImageUrl(value: string): void; + /** + * Sets a value specifying whether the button is enabled. + * @param value true to enable the button; false to disable it. + */ + SetEnabled(value: boolean): void; + /** + * Returns a value indicating whether the button is enabled. + */ + GetEnabled(): boolean; + /** + * Sets input focus to the button. + */ + Focus(): void; +} +/** + * A method that will handle the client Click event. + */ +interface ASPxClientButtonClickEventHandler { + /** + * A method that will handle the client Click event. + * @param source An object that is the event's source. + * @param e An ASPxClientButtonClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientButtonClickEventArgs): void; +} +/** + * Provides data for the Click event. + */ +interface ASPxClientButtonClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Specifies whether both the event's default action and the event's bubbling upon the hierarchy of event handlers should be canceled. + * Value: true to cancel the event's default action and the event's bubbling upon the hierarchy of event handlers; otherwise, false. + */ + cancelEventAndBubble: boolean; +} +/** + * Represents the client-side equivalent of the ASPxCalendar control. + */ +interface ASPxClientCalendar extends ASPxClientEdit { + /** + * Fires on the client side after the selected date has been changed within the calendar. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Occurs on the client side when the month displayed within the calendar is changed. + */ + VisibleMonthChanged: ASPxClientEvent>; + /** + * Allows you to disable the calendar's days. + */ + CustomDisabledDate: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user presses a key while the editor has focus. + */ + KeyDown: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user presses and releases a key while the editor has focus. + */ + KeyPress: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user releases a pressed key while the editor has focus. + */ + KeyUp: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after the callback server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientCalendar. + */ + CallbackError: ASPxClientEvent>; + /** + * Tests whether the specified date is selected. + * @param date A date-time value that specifies the date to test. + */ + IsDateSelected(date: Date): boolean; + /** + * Sets the date that specifies the month and year to be displayed in the calendar. + * @param date The date that specifies calendar's visible month and year. + */ + SetVisibleDate(date: Date): void; + /** + * Sets the calendar's selected date. + * @param date A date object that specifies the calendar's selected date. + */ + SetSelectedDate(date: Date): void; + /** + * Returns the calendar's selected date. + */ + GetSelectedDate(): Date; + /** + * Gets the date that determines the month and year that are currently displayed in the calendar. + */ + GetVisibleDate(): Date; + /** + * Selects the specified date within the calendar. + * @param date A date-time value that specifies the selected date. + */ + SelectDate(date: Date): void; + /** + * Selects the specified range of dates within the calendar. + * @param start A date-time value that specifies the range's first date. + * @param end A date-time value that specifies the range's last date. + */ + SelectRange(start: Date, end: Date): void; + /** + * Deselects the specified date within the calendar. + * @param date A date-time value that specifies the date to deselect. + */ + DeselectDate(date: Date): void; + /** + * Deselects the specified range of dates within the calendar. + * @param start A date-time value that specifies the range's first date. + * @param end A date-time value that specifies the range's last date. + */ + DeselectRange(start: Date, end: Date): void; + /** + * Deselects all the selected dates within the calendar. + */ + ClearSelection(): void; + /** + * Returns a list of dates which are selected within the calendar. + */ + GetSelectedDates(): Date[]; + /** + * Gets the minimum date on the calendar. + */ + GetMinDate(): Date; + /** + * Sets the minimum date of the calendar. + * @param date A DateTime object representing the minimum date. + */ + SetMinDate(date: Date): void; + /** + * Gets the maximum date on the calendar. + */ + GetMaxDate(): Date; + /** + * Sets the maximum date of the calendar. + * @param date A DateTime object representing the maximum date. + */ + SetMaxDate(date: Date): void; +} +/** + * Provides data for the CustomDisabledDate event. + */ +interface ASPxClientCalendarCustomDisabledDateEventArgs extends ASPxClientEventArgs { + /** + * Gets the date processed in the calendar. + * Value: A DateTime value containing processed data. + */ + date: Date; + /** + * Gets or sets a value specifying whether selection of the processed calendar date is disabled. + * Value: true, if the date is disabled; otherwise, false. + */ + isDisabled: boolean; +} +/** + * A method that will handle the client CustomDisabledDate event. + */ +interface ASPxClientCalendarCustomDisabledDateEventHandler { + /** + * A method that will handle the client CustomDisabledDate event. + * @param source The event source. + * @param e An ASPxClientCalendarCustomDisabledDateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCalendarCustomDisabledDateEventArgs): void; +} +/** + * Represents the client-side equivalent of the ASPxCaptcha control. + */ +interface ASPxClientCaptcha extends ASPxClientControl { + /** + * Sets input focus to the control's text box. + */ + Focus(): void; + /** + * Refreshes the code displayed within the editor's challenge image. + */ + Refresh(): void; +} +/** + * Represents the client-side equivalent of the ASPxCheckBox control. + */ +interface ASPxClientCheckBox extends ASPxClientEdit { + /** + * Occurs on the client side when the editor's checked state is changed. + */ + CheckedChanged: ASPxClientEvent>; + /** + * Returns a value indicating whether the check box editor is checked. + */ + GetChecked(): boolean; + /** + * Sets a value which specifies the checked status of the check box editor. + * @param isChecked true if the check box editor is checked; otherwise, false. + */ + SetChecked(isChecked: boolean): void; + /** + * Returns the text displayed within the editor. + */ + GetText(): string; + /** + * Returns a value which specifies a check box checked state. + */ + GetCheckState(): string; + /** + * Sets a value specifying the state of a check box. + * @param checkState A string value matches one of the CheckState enumeration values. + */ + SetCheckState(checkState: string): void; + /** + * Sets the text to be displayed within the editor. + * @param text A string value specifying the text to be displayed within the editor. + */ + SetText(text: string): void; +} +/** + * Represents the client-side equivalent of the ASPxRadioButton control. + */ +interface ASPxClientRadioButton extends ASPxClientCheckBox { + /** + * Returns a value indicating whether the radio button is checked. + */ + GetChecked(): boolean; + /** + * Sets a value which specifies the radio button's checked status. + * @param isChecked true if the radio button is checked; otherwise, false. + */ + SetChecked(isChecked: boolean): void; +} +/** + * Represents a base for client-side objects which allow single-line text input. + */ +interface ASPxClientTextEdit extends ASPxClientEdit { + /** + * Occurs on the client-side when an end-user presses a key while the editor has focus. + */ + KeyDown: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user presses and releases a key while the editor has focus. + */ + KeyPress: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user releases a pressed key while the editor has focus. + */ + KeyUp: ASPxClientEvent>; + /** + * Fires on the client side when the editor's text is changed and focus moves out of the editor by end-user interactions. + */ + TextChanged: ASPxClientEvent>; + /** + * Returns the text displayed within the editor. + */ + GetText(): string; + /** + * Sets the text to be displayed within the editor. + * @param text A string value specifying the text to be displayed within the editor. + */ + SetText(text: string): void; + /** + * Selects all text in the text editor. + */ + SelectAll(): void; + /** + * Sets the caret position within the edited text. + * @param position An integer value that specifies the zero-based index of a text character that shall precede the caret. + */ + SetCaretPosition(position: number): void; + /** + * Obtains the caret position within the edited text. + */ + GetCaretPosition(): number; + /** + * Selects the specified portion of the editor's text. + * @param startPos A zero-based integer value specifying the selection's starting position. + * @param endPos A zero-based integer value specifying the selection's ending position. + * @param scrollToSelection true to scroll the editor's contents to make the selection visible; otherwise, false. + */ + SetSelection(startPos: number, endPos: number, scrollToSelection: boolean): void; +} +/** + * Represents a base for client-side editors which are capable of displaying and editing text data in their edit regions. + */ +interface ASPxClientTextBoxBase extends ASPxClientTextEdit { +} +/** + * Represents a base for client button editor objects. + */ +interface ASPxClientButtonEditBase extends ASPxClientTextBoxBase { + /** + * Occurs on the client side after an editor button is clicked. + */ + ButtonClick: ASPxClientEvent>; + /** + * Specifies whether the button is visible. + * @param number An integer value specifying the button's index within the Buttons collection. + * @param value true, to make the button visible; otherwise, false. + */ + SetButtonVisible(number: number, value: boolean): void; + /** + * Returns a value specifying whether a button is displayed. + * @param number An integer value specifying the button's index within the Buttons collection. + */ + GetButtonVisible(number: number): boolean; +} +/** + * Represents a base class for the editors that contain a drop down window. + */ +interface ASPxClientDropDownEditBase extends ASPxClientButtonEditBase { + /** + * Occurs on the client-side when the drop down window is opened. + */ + DropDown: ASPxClientEvent>; + /** + * Occurs on the client side when the drop down window is closed. + */ + CloseUp: ASPxClientEvent>; + /** + * Occurs on the client side before the drop down window is closed and allows you to cancel the operation. + */ + QueryCloseUp: ASPxClientEvent>; + /** + * Modifies the size of the drop down window in accordance with its content. + */ + AdjustDropDownWindow(): void; + /** + * Invokes the editor's drop down window. + */ + ShowDropDown(): void; + /** + * Closes the opened drop down window of the editor. + */ + HideDropDown(): void; +} +/** + * Represents the client-side equivalent of the ASPxColorEdit control. + */ +interface ASPxClientColorEdit extends ASPxClientDropDownEditBase { + /** + * Fires after the selected color has been changed within the color editor via end-user interaction. + */ + ColorChanged: ASPxClientEvent>; + /** + * This event is not in effect for the ASPxClientColorEdit. Use the ColorChanged event instead. + */ + TextChanged: ASPxClientEvent>; + /** + * Returns the color editor's value. + */ + GetColor(): string; + /** + * Specifies the color value for the color editor. + * @param value A string value specifying the editor color. + */ + SetColor(value: string): void; + /** + * Indicates whether the automatic color item is selected. + */ + IsAutomaticColorSelected(): boolean; +} +/** + * Represent the client-side equivalent of the ASPxComboBox control. + */ +interface ASPxClientComboBox extends ASPxClientDropDownEditBase { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientComboBox. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side after a different item in the list has been selected (focus has been moved from one item to another). + */ + SelectedIndexChanged: ASPxClientEvent>; + /** + * Specifies the text displayed within the editor's edit box. + * @param text A string value specifying the editor's text. + */ + SetText(text: string): void; + /** + * Adds a new item to the editor specifying the item's display text and returns the index of the added item. + * @param text A string value specifying the item's display text. + */ + AddItem(text: string): number; + /** + * Adds a new item to the editor specifying the item's display text and associated value, and returns the index of the added item. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + */ + AddItem(text: string, value: Object): number; + /** + * Adds a new item to the editor specifying the item's display text, associated value and displayed image, and returns the index of the added item. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + * @param imageUrl A string value specifying the path to the image displayed by the item. + */ + AddItem(text: string, value: Object, imageUrl: string): number; + /** + * Inserts a new item specified by its display text, associated value and displayed image into the editor's item collection, at the position specified. + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + * @param imageUrl A string value specifying the path to the image displayed by the item. + */ + InsertItem(index: number, text: string, value: Object, imageUrl: string): void; + /** + * Inserts a new item specified by its display text and associated value into the editor's item collection, at the position specified. + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + */ + InsertItem(index: number, text: string, value: Object): void; + /** + * Inserts a new item specified by its display text into the editor's item collection, at the position specified. + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. + */ + InsertItem(index: number, text: string): void; + /** + * Removes an item specified by its index from the client list editor. + * @param index An integer value representing the index of the list item to be removed. + */ + RemoveItem(index: number): void; + /** + * Removes all items from the client combo box editor. + */ + ClearItems(): void; + /** + * Prevents the client combobox editor from being rendered until the EndUpdate method is called. + */ + BeginUpdate(): void; + /** + * Re-enables editor render operations after a call to the BeginUpdate method and forces an immediate re-rendering. + */ + EndUpdate(): void; + /** + * Scrolls the editor's item list, so that the specified item becomes visible. + * @param index An integer value that specifies the item's index within the editor's client item list. + */ + MakeItemVisible(index: number): void; + /** + * Returns an item specified by its index within the combo box editor's item collection. + * @param index An integer value specifying the zero-based index of the item to search for. + */ + GetItem(index: number): ASPxClientListEditItem; + /** + * Returns a combo box item by its text. + * @param text A string that specifies the item's text. + */ + FindItemByText(text: string): ASPxClientListEditItem; + /** + * Returns a combo box item by its value. + * @param value An object that specifies the item's value. + */ + FindItemByValue(value: Object): ASPxClientListEditItem; + /** + * Gets the number of items contained in the editor's item collection. + */ + GetItemCount(): number; + /** + * Returns the index of the selected item within the combo box editor. + */ + GetSelectedIndex(): number; + /** + * Sets the combobox editor's selected item specified by its index. + * @param index An integer value specifying the zero-based index of the item to select. + */ + SetSelectedIndex(index: number): void; + /** + * Returns the combo box editor's selected item. + */ + GetSelectedItem(): ASPxClientListEditItem; + /** + * Sets the list editor's selected item. + * @param item An ASPxClientListEditItem object that specifies the item to select. + */ + SetSelectedItem(item: ASPxClientListEditItem): void; + /** + * Gets the text displayed in the editor's edit box. + */ + GetText(): string; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * Adds a new item to the editor, specifying the item's display text, and returns the index of the added item. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + */ + AddItem(texts: string[]): number; + /** + * Adds a new item to the end of the control's items collection. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + */ + AddItem(texts: string[], value: Object): number; + /** + * Adds a new item to the end of the control's items collection. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + * @param imageUrl A string value specifying the path to the image displayed by the item. + */ + AddItem(texts: string[], value: Object, imageUrl: string): number; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + * @param imageUrl A String value specifying the path to the image displayed by the item. + */ + InsertItem(index: number, texts: string[], value: Object, imageUrl: string): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + */ + InsertItem(index: number, texts: string[], value: Object): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + */ + InsertItem(index: number, texts: string[]): void; + /** + * Determines whether the drop-down content is loaded; if not - loads the content. + * @param callbackFunction An object that is the JavaScript function that receives the callback data as a parameter. The function is performed after the combo box content is loaded. + */ + EnsureDropDownLoaded(callbackFunction: Object): void; + /** + * Defines the HTML content for the specified combo box item. + * @param index An integer value specifying the zero-based index of the item. + * @param html A string value that is the HTML code defining the content of the combo box item. + */ + SetItemHtml(index: number, html: string): void; + /** + * Sets the tooltip text for the combo box editor's item specified by its index. + * @param index An integer value specifying the zero-based index of the item. + * @param tooltip A string value specifying the tooltip text. + */ + SetItemTooltip(index: number, tooltip: string): void; + /** + * Sets the CSS class for a combo box item specified by its index. + * @param index An integer value specifying the zero-based index of the item. + * @param className A string value specifying the CSS class name. + */ + AddItemCssClass(index: number, className: string): void; + /** + * Removes the CSS class from a combo box item specified by its index. + * @param index An integer value specifying the zero-based index of the item. + * @param className A string value specifying the CSS class name. + */ + RemoveItemCssClass(index: number, className: string): void; + /** + * Defines the HTML content for the specified combo box item's text cell. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param html A string value that is the HTML code defining the content of the combo box item. + */ + SetItemTextCellHtml(itemIndex: number, textCellIndex: number, html: string): void; + /** + * Sets the tooltip text for the text cell of the editor's item specified by its index. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param tooltip A string value specifying the tooltip text. + */ + SetItemTextCellTooltip(itemIndex: number, textCellIndex: number, tooltip: string): void; + /** + * Sets the CSS class for a combo box item's text cell specified by its index. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param className A string value specifying the CSS class name. + */ + AddItemTextCellCssClass(itemIndex: number, textCellIndex: number, className: string): void; + /** + * Removes the CSS class from a combo box item's text cell specified by its index. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param className A string value specifying the CSS class name. + */ + RemoveItemTextCellCssClass(itemIndex: number, textCellIndex: number, className: string): void; +} +/** + * Represents the client-side equivalent of the ASPxDateEdit control. + */ +interface ASPxClientDateEdit extends ASPxClientDropDownEditBase { + /** + * Fires after the selected date has been changed within the date editor. + */ + DateChanged: ASPxClientEvent>; + /** + * Enables you to convert the value entered by an end user into the value that will be stored by the date editor. + */ + ParseDate: ASPxClientEvent>; + /** + * Allows you to disable the calendar's days. + */ + CalendarCustomDisabledDate: ASPxClientEvent>; + /** + * This event is not in effect for the ASPxClientDateEdit. Use the DateChanged event instead. + */ + TextChanged: ASPxClientEvent>; + /** + * Returns the calendar of the date editor. + */ + GetCalendar(): ASPxClientCalendar; + /** + * Returns the built-in time edit control. + */ + GetTimeEdit(): ASPxClientTimeEdit; + /** + * Specifies the date for the editor. + * @param date A DateTime object that is the date. + */ + SetDate(date: Date): void; + /** + * Gets the date that is the editor's value. + */ + GetDate(): Date; + /** + * Returns the number of days in a range selected within a date edit. + */ + GetRangeDayCount(): number; + /** + * Gets the minimum date of the editor. + */ + GetMinDate(): Date; + /** + * Sets the minimum date of the editor. + * @param date A DateTime object representing the minimum date. + */ + SetMinDate(date: Date): void; + /** + * Gets the maximum date of the editor. + */ + GetMaxDate(): Date; + /** + * Sets the maximum date of the editor. + * @param date A DateTime object representing the maximum date. + */ + SetMaxDate(date: Date): void; +} +/** + * Provides data for the ParseDate client-side event that parses a string entered into a date editor. + */ +interface ASPxClientParseDateEventArgs extends ASPxClientEventArgs { + /** + * Gets the value entered into the date editor by an end user. + * Value: The string value entered into the date editor by an end user. + */ + value: string; + /** + * Gets or sets the edit value of the date editor. + * Value: A date/time value representing the edit value of the date editor. + */ + date: Date; + /** + * Gets or sets a value specifying whether the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * A method that will handle the client ParseDate event, that parses a date editor's value when entered. + */ +interface ASPxClientParseDateEventHandler { + /** + * A method that will handle the ParseDate event. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientParseDateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientParseDateEventArgs): void; +} +/** + * Represents a base for client editor objects realizing the dropdown editor functionality. + */ +interface ASPxClientDropDownEdit extends ASPxClientDropDownEditBase { + /** + * Obtains the key value associated with the text displayed within the editor's edit box. + */ + GetKeyValue(): string; + /** + * Specifies the key value associated with the text displayed within the editor's edit box. + * @param keyValue A string specifying the key value associated with the editor's value (displayed text). + */ + SetKeyValue(keyValue: string): void; +} +/** + * A method that will handle the client events involving a keyboard key being pressed or released. + */ +interface ASPxClientEditKeyEventHandler { + /** + * A method that will handle the client events concerning a keyboard key being pressed. + * @param source The event source. This parameter identifies the editor which raised the event. + * @param e An ASPxClientEditKeyEventArgs object that contains event data. + */ + (source: S, e: ASPxClientEditKeyEventArgs): void; +} +/** + * Provides data for the client events involved with a key being pressed or released. + */ +interface ASPxClientEditKeyEventArgs extends ASPxClientEventArgs { + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * A method that will handle client validation events. + */ +interface ASPxClientEditValidationEventHandler { + /** + * A method that will handle client validation events. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientEditValidationEventArgs object that contains event data. + */ + (source: S, e: ASPxClientEditValidationEventArgs): void; +} +/** + * Provides data for the client events that are related to data validation (see Validate). + */ +interface ASPxClientEditValidationEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets the error description. + * Value: A string representing the error description. + */ + errorText: string; + /** + * Gets or sets a value specifying whether the validated value is valid. + * Value: true if the value is valid; otherwise, false. + */ + isValid: boolean; + /** + * Gets or sets the editor's value being validated. + * Value: An object that represents the validated value. + */ + value: string; +} +/** + * Represents the client ASPxFilterControl. + */ +interface ASPxClientFilterControl extends ASPxClientControl { + /** + * Occurs after a new filter expression has been applied. + */ + Applied: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientFilterControl. + */ + CallbackError: ASPxClientEvent>; + /** + * Returns the filter expression. + */ + GetFilterExpression(): string; + /** + * Returns the applied filter expression. + */ + GetAppliedFilterExpression(): string; + /** + * Returns the editor used to edit operand values for the specified filter column. + * @param editorIndex An integer value that identifies the filter column by its index within the collection. + */ + GetEditor(editorIndex: number): ASPxClientEditBase; + /** + * Returns a value indicating whether the filter expression being currently composed on the client side is valid - all expression conditions are filled. + */ + IsFilterExpressionValid(): boolean; + /** + * Applies a filter constructed by an end-user. + */ + Apply(): void; + /** + * Resets the current filter expression to a previously applied filter expression. + */ + Reset(): void; +} +/** + * A method that will handle the Applied event. + */ +interface ASPxClientFilterAppliedEventHandler { + /** + * A method that will handle the Applied event. + * @param source The event source. + * @param e An ASPxClientFilterAppliedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFilterAppliedEventArgs): void; +} +/** + * Provides data for the Applied event. + */ +interface ASPxClientFilterAppliedEventArgs extends ASPxClientEventArgs { + /** + * Gets the filter expression currently being applied. + * Value: A string value that specifies the filter expression currently being applied. + */ + filterExpression: string; +} +/** + * Represents a base for client editor objects that display a list of items. + */ +interface ASPxClientListEdit extends ASPxClientEdit { + /** + * Occurs on the client side after a different item in the list has been selected (focus has been moved from one item to another). + */ + SelectedIndexChanged: ASPxClientEvent>; + /** + * Returns the list editor's selected item. + */ + GetSelectedItem(): ASPxClientListEditItem; + /** + * Returns the index of the selected item within the list editor. + */ + GetSelectedIndex(): number; + /** + * Sets the list editor's selected item. + * @param item An ASPxClientListEditItem object that specifies the item to select. + */ + SetSelectedItem(item: ASPxClientListEditItem): void; + /** + * Sets the list editor's selected item specified by its index. + * @param index An integer value specifying the zero-based index of the item to select. + */ + SetSelectedIndex(index: number): void; +} +/** + * Represents the client-side equivalent of the ListEditItem object. + */ +interface ASPxClientListEditItem { + /** + * Gets a value that indicates whether a list edit item is selected. + * Value: true if a list edit item is selected; otherwise, false. + */ + selected: boolean; + /** + * Gets an editor to which the current item belongs. + * Value: An ASPxClientListEdit object that represents the item's owner editor. + */ + listEditBase: ASPxClientListEdit; + /** + * Gets the item's index. + * Value: An integer value that represents the item's index within the corresponding editor's item collection. + */ + index: number; + /** + * Gets the item's associated image. + * Value: A string value that represents the path to the image displayed by the item. + */ + imageUrl: string; + /** + * Gets the item's display text. + * Value: A string value that represents the item's display text. + */ + text: string; + /** + * Gets the item's associated value. + * Value: An object that represents the value associated with the item. + */ + value: Object; + /** + * Returns the list item's value that corresponds to a column specified by its index. + * @param columnIndex An integer value that specifies the column's index within the editor's Columns collection. + */ + GetColumnText(columnIndex: number): string; + /** + * Returns the list item's value that corresponds to a column specified by its field name. + * @param columnName A string value that specifies the column's field name defined via the FieldName property. + */ + GetColumnText(columnName: string): string; +} +/** + * Represents the client-side equivalent of the ASPxListBox control. + */ +interface ASPxClientListBox extends ASPxClientListEdit { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientListBox. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side when an end-user presses a key while the editor has focus. + */ + KeyDown: ASPxClientEvent>; + /** + * Occurs on the client side when an end-user presses and releases a key while the editor has focus. + */ + KeyPress: ASPxClientEvent>; + /** + * Occurs on the client side when an end-user releases a pressed key while the editor has focus. + */ + KeyUp: ASPxClientEvent>; + /** + * Occurs on the client side after a different item in the list box has been selected (focus has been moved from one item to another). + */ + SelectedIndexChanged: ASPxClientEvent>; + /** + * Occurs on the client when the editor's item is double clicked. + */ + ItemDoubleClick: ASPxClientEvent>; + /** + * Gets the number of items contained in the editor's item collection. + */ + GetItemCount(): number; + /** + * Returns an item specified by its index within the list box editor's item collection. + * @param index An integer value specifying the zero-based index of the item to search for. + */ + GetItem(index: number): ASPxClientListEditItem; + /** + * Returns an array of the list editor's selected items indices. + */ + GetSelectedIndices(): number[]; + /** + * Returns an array of the list editor's selected items values. + */ + GetSelectedValues(): Object[]; + /** + * Returns an array of the list editor's selected items. + */ + GetSelectedItems(): ASPxClientListEditItem[]; + /** + * Selects all list box items. + */ + SelectAll(): void; + /** + * Unselects all list box items. + */ + UnselectAll(): void; + /** + * Selects the items with the specified indices within a list box. + * @param indices An array of integer values that represent the items indices. + */ + SelectIndices(indices: number[]): void; + /** + * Unselects an array of the list box items with the specified indices. + * @param indices An array of integer values that represent the indices. + */ + UnselectIndices(indices: number[]): void; + /** + * Selects the specified items within a list box. + * @param items An array of ASPxClientListEditItem objects that represent the items. + */ + SelectItems(items: ASPxClientListEditItem[]): void; + /** + * Unselects an array of the specified list box items. + * @param items An array of ASPxClientListEditItem objects that represent the items. + */ + UnselectItems(items: ASPxClientListEditItem[]): void; + /** + * Select the items with the specified values within a list box. + * @param values An array of Object[] objects that represent the item's values. + */ + SelectValues(values: Object[]): void; + /** + * Unselects an array of the list box items with the specified values. + * @param values An array of Object[] objects that represent the values. + */ + UnselectValues(values: Object[]): void; + /** + * Scrolls the editor's item list, so that the specified item becomes visible. + * @param index An integer value that specifies the item's index within the editor's client item list. + */ + MakeItemVisible(index: number): void; + /** + * Initializes the ASPxClientListBox client object when its parent container becomes visible dynamically, on the client side. + */ + InitOnContainerMadeVisible(): void; + /** + * Adds a new item to the editor, specifying the item's display text, and returns the index of the added item. + * @param text A string value specifying the item's display text. + */ + AddItem(text: string): number; + /** + * Adds a new item to the editor, specifying the item's display text and associated value, and returns the index of the added item. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + */ + AddItem(text: string, value: Object): number; + /** + * Adds a new item to the editor, specifying the item's display text, associated value and displayed image, and returns the index of the added item. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + * @param imageUrl A string value specifying the path to the image displayed by the item. + */ + AddItem(text: string, value: Object, imageUrl: string): number; + /** + * Inserts a new item specified by its display text, associated value and displayed image into the editor's item collection, at the position specified. + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + * @param imageUrl A string value specifying the path to the image displayed by the item. + */ + InsertItem(index: number, text: string, value: Object, imageUrl: string): void; + /** + * Inserts a new item specified by its display text and associated value into the editor's item collection, at the position specified. + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. + * @param value An object specifying the value associated with the item. + */ + InsertItem(index: number, text: string, value: Object): void; + /** + * Inserts a new item specified by its display text into the editor's item collection, at the position specified. + * @param index An integer value representing the zero-based index of the position where the item should be inserted. + * @param text A string value specifying the item's display text. + */ + InsertItem(index: number, text: string): void; + /** + * Prevents the client list box editor from being rendered until the EndUpdate method is called. + */ + BeginUpdate(): void; + /** + * Re-enables editor render operations after a call to the BeginUpdate method, and forces an immediate re-rendering. + */ + EndUpdate(): void; + /** + * Removes all items from the client list box editor. + */ + ClearItems(): void; + /** + * Removes an item specified by its index from the client list editor. + * @param index An integer value representing the index of the list item to be removed. + */ + RemoveItem(index: number): void; + /** + * Returns a list box item by its text. + * @param text A string that specifies the item's text. + */ + FindItemByText(text: string): ASPxClientListEditItem; + /** + * Returns a list box item by its value. + * @param value An object that specifies the item's value. + */ + FindItemByValue(value: Object): ASPxClientListEditItem; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * Adds a new item to the end of the editor's items collection, specifying the item's display text, and returns the index of the added item. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + */ + AddItem(texts: string[]): number; + /** + * Adds a new item to the end of the control's items collection. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + */ + AddItem(texts: string[], value: Object): number; + /** + * Adds a new item to the end of the editor's items collection, specifying the item's display text, associated value and displayed image, and returns the index of the added item. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + * @param imageUrl A String value specifying the path to the image displayed by the item. + */ + AddItem(texts: string[], value: Object, imageUrl: string): number; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + * @param imageUrl A String value specifying the path to the image displayed by the item. + */ + InsertItem(index: number, texts: string[], value: Object, imageUrl: string): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + * @param value An object that represents the item's associated value. + */ + InsertItem(index: number, texts: string[], value: Object): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index An integer value that represents the index position. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding columns within the editor's Columns collection. + */ + InsertItem(index: number, texts: string[]): void; + /** + * Defines the HTML content for the specified list box item. + * @param index An integer value specifying the zero-based index of the item. + * @param html A string value that is the HTML code defining the content of the list box item. + */ + SetItemHtml(index: number, html: string): void; + /** + * Sets the tooltip text for the list box editor's item specified by its index. + * @param index An integer value specifying the zero-based index of the item. + * @param tooltip A string value specifying the tooltip text. + */ + SetItemTooltip(index: number, tooltip: string): void; + /** + * Sets the CSS class for a list box item specified by its index. + * @param index An integer value specifying the zero-based index of the item. + * @param className A string value specifying the CSS class name. + */ + AddItemCssClass(index: number, className: string): void; + /** + * Removes the CSS class from a list box item specified by its index. + * @param index An integer value specifying the zero-based index of the item. + * @param className A string value specifying the CSS class name. + */ + RemoveItemCssClass(index: number, className: string): void; + /** + * Defines the HTML content for the specified list box item's text cell. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param html A string value that is the HTML code defining the content of the list box item. + */ + SetItemTextCellHtml(itemIndex: number, textCellIndex: number, html: string): void; + /** + * Sets the tooltip text for the text cell of the editor's item specified by its index. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param tooltip A string value specifying the tooltip text. + */ + SetItemTextCellTooltip(itemIndex: number, textCellIndex: number, tooltip: string): void; + /** + * Sets the CSS class for a list box item's text cell specified by its index. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param className A string value specifying the CSS class name. + */ + AddItemTextCellCssClass(itemIndex: number, textCellIndex: number, className: string): void; + /** + * Removes the CSS class from a list box item's text cell specified by its index. + * @param itemIndex An integer value specifying the zero-based index of the item. + * @param textCellIndex An integer value specifying the zero-based index of the item's text cell. + * @param className A string value specifying the CSS class name. + */ + RemoveItemTextCellCssClass(itemIndex: number, textCellIndex: number, className: string): void; +} +/** + * Serves as the base type for the ASPxClientRadioButtonList objects. + */ +interface ASPxClientCheckListBase extends ASPxClientListEdit { + /** + * Gets the number of items contained in the editor's item collection. + */ + GetItemCount(): number; + /** + * Returns the editor's item specified by its index. + * @param index An integer value specifying the zero-based index of the item to be retrieved. + */ + GetItem(index: number): ASPxClientListEditItem; +} +/** + * Represents the client-side equivalent of the ASPxRadioButtonList control. + */ +interface ASPxClientRadioButtonList extends ASPxClientCheckListBase { +} +/** + * A client-side equivalent of the ASPxCheckBoxList object. + */ +interface ASPxClientCheckBoxList extends ASPxClientCheckListBase { + /** + * Occurs on the client side after a different item in the check box list has been selected (focus has been moved from one item to another). + */ + SelectedIndexChanged: ASPxClientEvent>; + /** + * Returns an array of the check box list editor's selected items indices. + */ + GetSelectedIndices(): number[]; + /** + * Returns an array of the check box list editor's selected items values. + */ + GetSelectedValues(): Object[]; + /** + * Returns an array of the check box list editor's selected items. + */ + GetSelectedItems(): ASPxClientListEditItem[]; + /** + * Selects all check box list items. + */ + SelectAll(): void; + /** + * Unselects all check box list items. + */ + UnselectAll(): void; + /** + * Selects items with the specified indices within a check box list. + * @param indices An array of integer values that are the item indices. + */ + SelectIndices(indices: number[]): void; + /** + * Selects the specified items within a check box list. + * @param items An array of ASPxClientListEditItem objects that are the items. + */ + SelectItems(items: ASPxClientListEditItem[]): void; + /** + * Selects items with the specified values within a check box list. + * @param values An array of Object[] objects that are the item values. + */ + SelectValues(values: Object[]): void; + /** + * Unselects items with the specified indices within a check box list. + * @param indices An array of integer values that are the item indices. + */ + UnselectIndices(indices: number[]): void; + /** + * Unselects the specified items within a check box list. + * @param items An array of ASPxClientListEditItem objects that are the items. + */ + UnselectItems(items: ASPxClientListEditItem[]): void; + /** + * Unselects items with the specified values within a check box list. + * @param values An array of Object[] objects that are the item values. + */ + UnselectValues(values: Object[]): void; +} +/** + * A method that will handle the SelectedIndexChanged event. + */ +interface ASPxClientListEditItemSelectedChangedEventHandler { + /** + * A method that will handle the SelectedIndexChanged event. + * @param source The event source. + * @param e An ASPxClientListEditItemSelectedChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientListEditItemSelectedChangedEventArgs): void; +} +/** + * Provides data for the SelectedIndexChanged event. + */ +interface ASPxClientListEditItemSelectedChangedEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the index of the item related to the event. + * Value: An integer value that represents the item's index within the corresponding editor's item collection. + */ + index: number; + /** + * Gets whether the item has been selected. + * Value: true if the item is selected; otherwise, false. + */ + isSelected: boolean; +} +/** + * Represents a client-side equivalent of the ASPxProgressBar control. + */ +interface ASPxClientProgressBar extends ASPxClientEditBase { + /** + * Sets the position of the operation's progress. + * @param position An integer value specifying the progress position. + */ + SetPosition(position: number): void; + /** + * Gets the position of the operation's progress. + */ + GetPosition(): number; + /** + * Sets the pattern used to format the displayed text for the progress bar. + * @param text A value that is the format pattern. + */ + SetCustomDisplayFormat(text: string): void; + /** + * Returns the text displayed within the progress bar. + */ + GetDisplayText(): string; + /** + * Sets the percentage representation of the progress position. + */ + GetPercent(): number; + /** + * Sets the minimum range value of the progress bar. + * @param min An integer value specifying the minimum value of the progress bar range. + */ + SetMinimum(min: number): void; + /** + * Sets the maximum range value of the progress bar. + * @param max An integer value specifying the maximum value of the progress bar range. + */ + SetMaximum(max: number): void; + /** + * Gets the minimum range value of the progress bar. + */ + GetMinimum(): number; + /** + * Gets the maximum range value of the progress bar. + */ + GetMaximum(): number; + /** + * Sets the minimum and maximum range values of the progress bar. + * @param minValue An integer value specifying the minimum value of the progress bar range. + * @param maxValue An integer value specifying the maximum value of the progress bar range. + */ + SetMinMaxValues(minValue: number, maxValue: number): void; +} +/** + * Represents a base class for the ASPxClientSpinEdit object. + */ +interface ASPxClientSpinEditBase extends ASPxClientButtonEditBase { + /** + * This event is not in effect for the ASPxClientSpinEditBase. Use the ASPxClientTimeEdit. + */ + TextChanged: ASPxClientEvent>; +} +/** + * Represents the client-side equivalent of the ASPxSpinEdit control. + */ +interface ASPxClientSpinEdit extends ASPxClientSpinEditBase { + /** + * Occurs on the client side when the editor's value is altered in any way. + */ + NumberChanged: ASPxClientEvent>; + /** + * Specifies the value of the spin edit control on the client side. + * @param number A Decimal value specifying the control value. + */ + SetValue(number: number): void; + /** + * Sets the spin editor's value. + * @param number A decimal number specifying the value to assign to the spin editor. + */ + SetNumber(number: number): void; + /** + * Gets a number which represents the spin editor's value. + */ + GetNumber(): number; + /** + * Returns the text displayed within the editor. + */ + GetText(): string; + /** + * Sets the minimum value of the editor. + * @param value A decimal value specifying the minimum value of the editor. + */ + SetMinValue(value: number): void; + /** + * Gets the minimum value of the editor. + */ + GetMinValue(): number; + /** + * Sets the maximum value of the editor. + * @param value A decimal value specifying the maximum value of the editor. + */ + SetMaxValue(value: number): void; + /** + * Gets the maximum value of the editor. + */ + GetMaxValue(): number; + /** + * Changes the editor's value. + * @param value An object representing the data to be assigned to the editor's edit value. + */ + SetValue(value: Object): void; +} +/** + * Represents the client-side equivalent of the ASPxTimeEdit control. + */ +interface ASPxClientTimeEdit extends ASPxClientSpinEditBase { + /** + * Fires after the selected date has been changed within the time editor. + */ + DateChanged: ASPxClientEvent>; + /** + * Specifies the date for the editor. + * @param date A DateTime object that is the date. + */ + SetDate(date: Date): void; + /** + * Gets the date that is the editor's value. + */ + GetDate(): Date; +} +/** + * Represents a base for client-side static editors whose values cannot be visually changed by end users. + */ +interface ASPxClientStaticEdit extends ASPxClientEditBase { + /** + * Occurs on the client side after an end-user clicks within a static editor. + */ + Click: ASPxClientEvent>; +} +/** + * A method that will handle client-side events which concern clicking within editors. + */ +interface ASPxClientEditEventHandler { + /** + * A method that will handle client-side events which concern clicking within editors. + * @param source An object representing the event source. Identifies the editor that raised the event. + * @param e An ASPxClientEditClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientEditClickEventArgs): void; +} +/** + * Provides data for the client-side events which concern clicking within editors. + */ +interface ASPxClientEditClickEventArgs extends ASPxClientEventArgs { + /** + * Gets the HTML element related to the event. + * Value: An object that represents the clicked HTML element. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * Represents the client-side equivalent of the ASPxHyperLink control. + */ +interface ASPxClientHyperLink extends ASPxClientStaticEdit { + /** + * Gets an URL which defines the navigation location for the editor's hyperlink. + */ + GetNavigateUrl(): string; + /** + * Specifies an URL which defines the navigation location for the editor's hyperlink. + * @param url A string value which specifies an URL to where the client web browser will navigate when a hyperlink in the editor is clicked. + */ + SetNavigateUrl(url: string): void; + /** + * Gets the text caption displayed for the hyperlink in the hyperlink editor. + */ + GetText(): string; + /** + * Specifies the text caption displayed for the hyperlink in the hyperlink editor. + * @param text A string value specifying the text caption for the hyperlink in the editor. + */ + SetText(text: string): void; +} +/** + * Represents a base for client-side editors which are capable of displaying images. + */ +interface ASPxClientImageBase extends ASPxClientStaticEdit { + /** + * Sets the size of the image displayed within the image editor. + * @param width An integer value that specifies the image's width. + * @param height An integer value that specifies the image's height. + */ + SetSize(width: number, height: number): void; +} +/** + * Represents the client-side equivalent of the ASPxImage control. + */ +interface ASPxClientImage extends ASPxClientImageBase { + /** + * Returns the URL pointing to the image displayed within the image editor. + */ + GetImageUrl(): string; + /** + * Sets the URL which points to the image displayed within the image editor. + * @param url A string value specifying the URL to the image displayed within the editor. + */ + SetImageUrl(url: string): void; +} +/** + * Represents the client-side equivalent of the ASPxLabel control. + */ +interface ASPxClientLabel extends ASPxClientStaticEdit { + /** + * Returns the text displayed within the editor. + */ + GetText(): string; + /** + * Sets the text to be displayed within the editor. + * @param text A string value specifying the text to be displayed within the editor. + */ + SetText(text: string): void; +} +/** + * Represents the client-side equivalent of the ASPxTextBox control. + */ +interface ASPxClientTextBox extends ASPxClientTextBoxBase { +} +/** + * Represents the client-side equivalent of the ASPxMemo control. + */ +interface ASPxClientMemo extends ASPxClientTextEdit { +} +/** + * Represents the client-side equivalent of the ASPxButtonEdit control. + */ +interface ASPxClientButtonEdit extends ASPxClientButtonEditBase { +} +/** + * A method that will handle the ButtonClick event. + */ +interface ASPxClientButtonEditClickEventHandler { + /** + * A method that will handle the ButtonClick event. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientButtonEditClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientButtonEditClickEventArgs): void; +} +/** + * Provides data for the ButtonClick event. + */ +interface ASPxClientButtonEditClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the index of the clicked button. + * Value: An integer value representing the index of the clicked button within the editor's Buttons collection. + */ + buttonIndex: number; +} +/** + * A client-side equivalent of the ASPxTokenBox object. + */ +interface ASPxClientTokenBox extends ASPxClientComboBox { + /** + * Fires on the client side after the token collection has been changed. + */ + TokensChanged: ASPxClientEvent>; + /** + * Adds a new token with the specified text to the end of the control's token collection. + * @param text A string value specifying the token's text. + */ + AddToken(text: string): void; + /** + * Removes a token specified by its text from the client token box. + * @param text A string value that is the text of the token to be removed. + */ + RemoveTokenByText(text: string): void; + /** + * Removes a token specified by its index from the client token box. + * @param index An integer value that is the index of the token to be removed. + */ + RemoveToken(index: number): void; + /** + * Returns an HTML span element that corresponds to the specified token. + * @param index An integer value that is the token index. + */ + GetTokenHtmlElement(index: number): Object; + /** + * Returns an HTML span element that corresponds to the specified token's text. + * @param index An integer value that is the token index. + */ + GetTokenTextHtmlElement(index: number): Object; + /** + * Returns an HTML span element that corresponds to the specified token's remove button. + * @param index An integer value that is the token index. + */ + GetTokenRemoveButtonHtmlElement(index: number): Object; + /** + * Returns a collection of tokens. + */ + GetTokenCollection(): string[]; + /** + * Sets a collection of tokens. + * @param collection A object that is the collection of tokens. + */ + SetTokenCollection(collection: string[]): void; + /** + * Removes all tokens contained in the token box. + */ + ClearTokenCollection(): void; + /** + * Returns the index of a token specified by its text. + * @param text A string value that specifies the text of the token. + */ + GetTokenIndexByText(text: string): number; + /** + * Gets the token texts, separated with a sign, specified by the TextSeparator property. + */ + GetText(): string; + /** + * Sets the token texts, separated with a sign, specified by the TextSeparator property. + * @param text A string value that is the token texts separated with a text separator. + */ + SetText(text: string): void; + /** + * Gets the editor value. + */ + GetValue(): string; + /** + * Sets the editor value. + * @param value A string that is the editor value. + */ + SetValue(value: string): void; + /** + * Returns a value that indicates if the specified token (string) is a custom token. + * @param text A string value that is a token. + * @param caseSensitive true, if tokens are case sensitive; otherwise, false. + */ + IsCustomToken(text: string, caseSensitive: boolean): boolean; + /** + * Changes the editor's value. + * @param value An object representing the data to be assigned to the editor's edit value. + */ + SetValue(value: Object): void; +} +/** + * The client-side equivalent of the ASPxTrackBar control. + */ +interface ASPxClientTrackBar extends ASPxClientEdit { + /** + * Fires on the client side before a track bar position is changed and allows you to cancel the action. + */ + PositionChanging: ASPxClientEvent>; + /** + * Fires after the editor's position has been changed. + */ + PositionChanged: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user moves a cursor while the drag handle is held down. + */ + Track: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user presses a drag handle and moves it. + */ + TrackStart: ASPxClientEvent>; + /** + * Occurs on the client-side when an end-user releases a drag handle after moving it. + */ + TrackEnd: ASPxClientEvent>; + /** + * Returns a track bar item index by the item's value. + * @param value An object that specifies the item's value. + */ + GetItemIndexByValue(value: Object): number; + /** + * Returns a track bar item's associated value. + * @param index An integer value that specifies the required item's index. + */ + GetItemValue(index: number): Object; + /** + * Returns a track bar item text. + * @param index An integer value that specifies the required item's index. + */ + GetItemText(index: number): string; + /** + * Returns a track bar item's tooltip text. + * @param index An integer value that specifies the required item's index. + */ + GetItemToolTip(index: number): string; + /** + * Returns the number of the track bar items that are maintained by the item collection. + */ + GetItemCount(): number; + /** + * Specifies the secondary drag handle position. + * @param position A value that specifies the position. + */ + SetPositionEnd(position: number): void; + /** + * Specifies the main drag handle position. + * @param position A value that specifies the position. + */ + SetPositionStart(position: number): void; + /** + * Returns the secondary drag handle position. + */ + GetPositionEnd(): number; + /** + * Returns the main drag handle position. + */ + GetPositionStart(): number; + /** + * Gets a drag handle position. + */ + GetPosition(): number; + /** + * Specifies a drag handle position. + * @param position A value that specifies the position. + */ + SetPosition(position: number): void; +} +/** + * A method that will handle the client PositionChanging event. + */ +interface ASPxClientTrackBarPositionChangingEventHandler { + /** + * A method that will handle the PositionChanging event. + * @param source The event source. Identifies the ASPxTrackBar control that raised the event. + * @param e A ASPxClientTrackBarPositionChangingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTrackBarPositionChangingEventArgs): void; +} +/** + * Provides data for the PositionChanging event. + */ +interface ASPxClientTrackBarPositionChangingEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; + /** + * Gets the current drag handle position. + * Value: A value that is the drag handle position. + */ + currentPosition: number; + /** + * Gets the current secondary drag handle position. + * Value: A value that is the drag handle position. + */ + currentPositionEnd: number; + /** + * Gets the current main drag handle position. + * Value: A value that is the drag handle position. + */ + currentPositionStart: number; + /** + * Gets a position where the drag handle is being moved. + * Value: A value that is the drag handle position. + */ + newPosition: number; + /** + * Gets a position where the secondary drag handle is being moved. + * Value: A value that is the drag handle position. + */ + newPositionEnd: number; + /** + * Gets a position where the main drag handle is being moved. + * Value: A value that is the drag handle position. + */ + newPositionStart: number; +} +/** + * Represents the client-side equivalent of the ASPxValidationSummary control. + */ +interface ASPxClientValidationSummary extends ASPxClientControl { + /** + * Occurs on the client side when the validation summary's visibility is changed. + */ + VisibilityChanged: ASPxClientEvent>; +} +/** + * A method that will handle the VisibilityChanged event. + */ +interface ASPxClientValidationSummaryVisibilityChangedEventHandler { + /** + * A method that will handle the VisibilityChanged client event. + * @param source An object representing the event source. + * @param e A ASPxClientValidationSummaryVisibilityChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientValidationSummaryVisibilityChangedEventArgs): void; +} +/** + * Provides data for the VisibilityChanged event. + */ +interface ASPxClientValidationSummaryVisibilityChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets whether the editor is visible on the client. + * Value: true if the editor is visible; otherwise, false. + */ + visible: boolean; +} +/** + * Represents the client ASPxGaugeControl. + */ +interface ASPxClientGaugeControl extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires when errors have occurred during callback processing. + */ + CallbackError: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * 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; +} +/** + * Lists values that specify the position relative to the target column in which a moved column should be placed. + */ +interface ASPxClientGridColumnMovingTargetPosition { + /** + * A moved column should be placed to the right of the target column. + */ + Right: number; + /** + * A moved column should be placed to the left of the target column. + */ + Left: number; + /** + * A moved column should be placed at the top of the target column. + */ + Top: number; + /** + * A moved column should be placed at the bottom of the target column. + */ + Bottom: number; +} +/** + * Represents the client ASPxGridView. + */ +interface ASPxClientGridBase extends ASPxClientControl { + /** + * Fires after a toolbar item has been clicked. + */ + ToolbarItemClick: ASPxClientEvent>; + /** + * Returns a toolbar specified by its name. + * @param name A string value specifying the toolbar name. + */ + GetToolbarByName(name: string): ASPxClientMenu; + /** + * Returns a grid's toolbar specified by its index. + * @param index An integer value specifying the zero-based index of the toolbar object to retrieve. + */ + GetToolbar(index: number): ASPxClientMenu; +} +/** + * Serves as a base object implementing the client column functionality. + */ +interface ASPxClientGridColumnBase { +} +/** + * A method that will handle the ToolbarItemClick event. + */ +interface ASPxClientGridToolbarItemClickEventHandler { + /** + * A method that will handle the ToolbarItemClick event. + * @param source The event source. + * @param e An ASPxClientGridToolbarItemClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridToolbarItemClickEventArgs): void; +} +/** + * Provides data for the ToolbarItemClick event. + */ +interface ASPxClientGridToolbarItemClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the toolbar index. + * Value: An integer value that is the toolbar index. + */ + toolbarIndex: number; + /** + * Gets the toolbar name. + * Value: A string value that is the toolbar name. + */ + toolbarName: string; + /** + * Gets the clicked toolbar item. + * Value: A ASPxClientMenuItem object that is the toolbar item. + */ + item: ASPxClientMenuItem; + /** + * Specifies whether a postback or a callback is used to finally process the event on the server side. + * Value: true to perform the round trip to the server side via postback; false to perform the round trip to the server side via callback. + */ + usePostBack: boolean; +} +/** + * The client-side equivalent of the ASPxGridLookup control. + */ +interface ASPxClientGridLookup extends ASPxClientDropDownEditBase { + /** + * Fires on the client when a data row is clicked within the built-in dropdown grid. + */ + RowClick: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Returns a client object representing the built-in dropdown grid. + */ + GetGridView(): ASPxClientGridView; + /** + * Confirms the current selection made by an end-user within the editor's dropdown grid. + */ + ConfirmCurrentSelection(): void; + /** + * Cancels the current selection made by an end-user within the editor's dropdown grid and rolls back to the last confirmed selection. The selection can be confirmed by either pressing the Enter key or calling the ConfirmCurrentSelection method. + */ + RollbackToLastConfirmedSelection(): void; +} +/** + * Represents the client ASPxCardView. + */ +interface ASPxClientCardView extends ASPxClientGridBase { + /** + * Provides access to the batch editing client API. + * Value: A object that exposes the batch editing client API methods. + */ + batchEditApi: ASPxClientCardViewBatchEditApi; + /** + * Occurs when a custom command button has been clicked. + */ + CustomButtonClick: ASPxClientEvent>; + /** + * Fires after the selection has been changed. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Enables you to prevent columns from being sorted. + */ + ColumnSorting: ASPxClientEvent>; + /** + * Occurs when a grid switches to batch edit mode. + */ + BatchEditStartEditing: ASPxClientEvent>; + /** + * Occurs when a grid leaves batch edit mode. + */ + BatchEditEndEditing: ASPxClientEvent>; + /** + * Enables you to prevent a batch edit confirmation message from being displayed. + */ + BatchEditConfirmShowing: ASPxClientEvent>; + /** + * Enables you to provide navigation for editors contained in a templated cell in Batch Edit mode. + */ + BatchEditTemplateCellFocused: ASPxClientEvent>; + /** + * Enables you to specify whether card data is valid and provide an error text. + */ + BatchEditCardValidating: ASPxClientEvent>; + /** + * Occurs on the client side before data changes are saved in batch edit mode. + */ + BatchEditChangesSaving: ASPxClientEvent>; + /** + * Occurs on the client side before data changes are canceled in batch edit mode. + */ + BatchEditChangesCanceling: ASPxClientEvent>; + /** + * Occurs on the client side before a card is inserted in batch edit mode. + */ + BatchEditCardInserting: ASPxClientEvent>; + /** + * Occurs on the client side before a card is deleted in batch edit mode. + */ + BatchEditCardDeleting: ASPxClientEvent>; + /** + * Occurs on the client side when the focused cell is about to be changed. + */ + FocusedCellChanging: ASPxClientEvent>; + /** + * Fires on the client when a card is clicked. + */ + CardClick: ASPxClientEvent>; + /** + * Fires on the client when a card is double clicked. + */ + CardDblClick: ASPxClientEvent>; + /** + * Fires in response to changing card focus. + */ + FocusedCardChanged: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any unhandled server error occurs during server-side processing of a callback sent by the ASPxClientCardView. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires after the customization window has been closed. + */ + CustomizationWindowCloseUp: ASPxClientEvent>; + /** + * Returns the value of the specified edit cell. + * @param column An ASPxClientCardViewColumn object that represents the data column within the client grid. + */ + GetEditValue(column: ASPxClientCardViewColumn): string; + /** + * Returns the value of the specified edit cell. + * @param columnIndex An integer value that identifies the data column within the grid's column collection. + */ + GetEditValue(columnIndex: number): string; + /** + * Returns the value of the specified edit cell. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + GetEditValue(columnFieldNameOrId: string): string; + /** + * Moves focus to the specified edit cell within the edited card. + * @param column An ASPxClientCardViewColumn object that represents the data column within the client grid. + */ + FocusEditor(column: ASPxClientCardViewColumn): void; + /** + * Moves focus to the specified edit cell within the edited card. + * @param columnIndex An integer value that specifies the column's position within the columns collection. + */ + FocusEditor(columnIndex: number): void; + /** + * Moves focus to the specified edit cell within the edited card. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + FocusEditor(columnFieldNameOrId: string): void; + /** + * Sets the value of the specified edit cell. + * @param column An ASPxClientCardViewColumn object that represents the data column within the client grid. + * @param value A string value that specifies the edit cell's new value. + */ + SetEditValue(column: ASPxClientCardViewColumn, value: string): void; + /** + * Sets the value of the specified edit cell. + * @param columnIndex An integer value that identifies the data column within the grid's column collection. + * @param value A string value that specifies the edit cell's new value. + */ + SetEditValue(columnIndex: number, value: string): void; + /** + * Sets the value of the specified edit cell. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param value A string value that specifies the edit cell's new value. + */ + SetEditValue(columnFieldNameOrId: string, value: string): void; + /** + * Displays the Filter Control. + */ + ShowFilterControl(): void; + /** + * Hides the Filter Control. + */ + CloseFilterControl(): void; + /** + * Enables or disables the current filter. + * @param isFilterEnabled true to enable the current filter; otherwise, false. + */ + SetFilterEnabled(isFilterEnabled: boolean): void; + /** + * Returns the current vertical scroll position of the grid's content. + */ + GetVerticalScrollPosition(): number; + /** + * Specifies the vertical scroll position for the grid's content. + * @param position An integer value specifying the vertical scroll position. + */ + SetVerticalScrollPosition(position: number): void; + /** + * Gets information about a focused cell. + */ + GetFocusedCell(): ASPxClientCardViewCellInfo; + /** + * Focuses the specified cell. + * @param cardVisibleIndex An value that specifies the visible index of the card. + * @param columnIndex A zero-based index that identifies the column in the column collection (the column's Index property value). + */ + SetFocusedCell(cardVisibleIndex: number, columnIndex: number): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientCardViewColumn object that represents the data column. + */ + SortBy(column: ASPxClientCardViewColumn): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + SortBy(columnIndex: number): void; + /** + * Sorts data by the specified data column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + SortBy(columnFieldNameOrId: string): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientCardViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(column: ASPxClientCardViewColumn, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(columnIndex: number, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(columnFieldNameOrId: string, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientCardViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(column: ASPxClientCardViewColumn, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(columnIndex: number, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(columnFieldNameOrId: string, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values, and places the column to the specified position among the sorted columns. + * @param column An ASPxClientCardViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex + */ + SortBy(column: ASPxClientCardViewColumn, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Sorts data by the specified data column's values, and places the column to the specified position among the sorted columns. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based column's index among the sorted columns. -1 if data is not sorted by this column. + */ + SortBy(columnIndex: number, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Sorts data by the specified data column's values, and places the column to the specified position among the sorted columns. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based column's index among the sorted columns. -1 if data is not sorted by this column. + */ + SortBy(columnFieldNameOrId: string, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Hides the specified column. + * @param column An ASPxClientCardViewColumn object that represents the column to hide. + */ + MoveColumn(column: ASPxClientCardViewColumn): void; + /** + * Hides the specified column. + * @param columnIndex An integer value that specifies the absolute index of the column to hide. + */ + MoveColumn(columnIndex: number): void; + /** + * Hides the specified column. + * @param columnFieldNameOrId A string value that identifies the column to be hidden by the name of the data source field to which the column is bound, or by the column's name. + */ + MoveColumn(columnFieldNameOrId: string): void; + /** + * Moves the specified column to the specified visual position within the ASPxCardView. + * @param column An ASPxClientCardViewColumn object that represents the column to move. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the ASPxCardView. + */ + MoveColumn(column: ASPxClientCardViewColumn, moveToColumnVisibleIndex: number): void; + /** + * Moves the specified column to the specified visual position within the ASPxCardView. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the grid. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number): void; + /** + * Moves the specified column to the specified visual position within the ASPxCardView. + * @param columnFieldNameOrId A string value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the ASPxCardView. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number): void; + /** + * Moves the specified column to the specified visual position within the ASPxCardView. + * @param column An ASPxClientCardViewColumn object that represents the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the CardView. + * @param moveBefore true, to move the column before the target column; otherwise, false. + */ + MoveColumn(column: ASPxClientCardViewColumn, moveToColumnVisibleIndex: number, moveBefore: boolean): void; + /** + * Moves the specified column to the specified visual position within the ASPxCardView. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number, moveBefore: boolean): void; + /** + * Moves the specified column to the specified visual position within the ASPxCardView. + * @param columnFieldNameOrId A string value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, moveBefore: boolean): void; + /** + * Returns the key value of the specified card. + * @param visibleIndex An integer value that specifies the card's visible index. + */ + GetCardKey(visibleIndex: number): string; + /** + * Switches the CardView to edit mode. + * @param visibleIndex A zero-based integer that identifies a card to be edited. + */ + StartEditCard(visibleIndex: number): void; + /** + * Switches the ASPxCardView to edit mode. + * @param key An object that uniquely identifies a card to be edited. + */ + StartEditCardByKey(key: Object): void; + /** + * Indicates whether or not a new card is being edited. + */ + IsNewCardEditing(): boolean; + /** + * Adds a new record. + */ + AddNewCard(): void; + /** + * Deletes the specified card. + * @param visibleIndex An integer value that identifies the card. + */ + DeleteCard(visibleIndex: number): void; + /** + * Deletes a card with the specified key value. + * @param key An object that uniquely identifies the card. + */ + DeleteCardByKey(key: Object): void; + /** + * Returns the focused card's index. + */ + GetFocusedCardIndex(): number; + /** + * Moves focus to the specified card. + * @param visibleIndex An integer value that specifies the focused card's index. + */ + SetFocusedCardIndex(visibleIndex: number): void; + /** + * Selects all the unselected cards within the CardView. + */ + SelectCards(): void; + /** + * Selects the specified card displayed within the CardView. + * @param visibleIndex A zero-based integer value that specifies the card's visible index. + */ + SelectCards(visibleIndex: number): void; + /** + * Selects the specified cards within the CardView. + * @param visibleIndices An array of zero-based indices that identify data cards within the grid. + */ + SelectCards(visibleIndices: number[]): void; + /** + * Selects or deselects the specified cards within the CardView. + * @param visibleIndices An array of zero-based indices that identify data cards within the grid. + * @param selected true to select the specified cards; false to deselect the cards. + */ + SelectCards(visibleIndices: number[], selected: boolean): void; + /** + * Selects or deselects the specified card within the GridView. + * @param visibleIndex An integer zero-based index that identifies the data card within the grid. + * @param selected true to select the specified card; false to deselect the card. + */ + SelectCards(visibleIndex: number, selected?: boolean): void; + /** + * Selects or deselects the specified cards displayed within the CardView. + * @param keys An array of objects that uniquely identify the cards. + * @param selected true to select the specified cards; false to deselect the cards. + */ + SelectCardsByKey(keys: Object[], selected?: boolean): void; + /** + * Selects or deselects the specified card displayed within the CardView. + * @param key An object that uniquely identifies the card. + * @param selected true to select the specified card; false to deselect the card. + */ + SelectCardsByKey(key: Object, selected?: boolean): void; + /** + * Selects the specified cards displayed within the CardView. + * @param keys An array of objects that uniquely identify the cards. + */ + SelectCardsByKey(keys: Object[]): void; + /** + * Selects a card displayed within the CardView by its key. + * @param key An object that uniquely identifies the card. + */ + SelectCardsByKey(key: Object): void; + /** + * Deselects the specified cards displayed within the ASPxCardView. + * @param keys An array of objects that uniquely identify the cards. + */ + UnselectCardsByKey(keys: Object[]): void; + /** + * Deselects the specified card displayed within the ASPxCardView. + * @param key An object that uniquely identifies the card. + */ + UnselectCardsByKey(key: Object): void; + /** + * Deselects all the selected cards within the ASPxCardView. + */ + UnselectCards(): void; + /** + * Deselects the specified cards (if selected) within the ASPxCardView. + * @param visibleIndices An array of zero-based indices that identify data cards within the grid. + */ + UnselectCards(visibleIndices: number[]): void; + /** + * Deselects the specified cards (if selected) within the ASPxCardView. + * @param visibleIndex A zero-based integer value that specifies the card's visible index. + */ + UnselectCards(visibleIndex: number): void; + /** + * Deselects all grid cards that match the filter criteria currently applied to the CardView. + */ + UnselectFilteredCards(): void; + /** + * Selects the specified card displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the card's visible index. + */ + SelectCardOnPage(visibleIndex: number): void; + /** + * Selects or deselects the specified card displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the card's visible index. + * @param selected true to select the specified card; false to deselect the card. + */ + SelectCardOnPage(visibleIndex: number, selected?: boolean): void; + /** + * Deselects the specified cards (if selected) displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the card's visible index. + */ + UnselectCardOnPage(visibleIndex: number): void; + /** + * Selects all unselected cards displayed on the current page. + */ + SelectAllCardsOnPage(): void; + /** + * Allows you to select or deselect all cards displayed on the current page based on the parameter passed. + * @param selected true to select all unselected cards displayed on the current page; false to deselect all selected cards on the page. + */ + SelectAllCardsOnPage(selected: boolean): void; + /** + * Deselects all selected cards displayed on the current page. + */ + UnselectAllCardsOnPage(): void; + /** + * Returns the number of selected cards. + */ + GetSelectedCardCount(): number; + /** + * Indicates whether or not the specified card is selected within the current page. + * @param visibleIndex An integer value that identifies the card by its visible index. + */ + IsCardSelectedOnPage(visibleIndex: number): boolean; + /** + * Applies the specified search panel filter criterion to grid data. + * @param value A string value that specifies the filter criterion. + */ + ApplySearchPanelFilter(value: string): void; + /** + * Applies the specified filter expression to the grid. + * @param filterExpression A string value that specifies the filter expression. + */ + ApplyFilter(filterExpression: string): void; + /** + * Clears the filter expression applied to a client CardView. + */ + ClearFilter(): void; + /** + * Gets the Popup Edit Form. + */ + GetPopupEditForm(): ASPxClientPopupControl; + /** + * Sets input focus to the grid. + */ + Focus(): void; + /** + * 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. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing the specified argument to it. + * @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; + /** + * Selects the specified page. + * @param pageIndex An integer value that specifies the active page's index. + */ + GotoPage(pageIndex: number): void; + /** + * Gets the index of the page currently being selected. + */ + GetPageIndex(): number; + /** + * Gets the number of pages to which the grid's data is divided. + */ + GetPageCount(): number; + /** + * Activates the next page. + */ + NextPage(): void; + /** + * Activates the previous page. + */ + PrevPage(): void; + /** + * Returns the index of the first card displayed within the grid's active page. + */ + GetTopVisibleIndex(): number; + /** + * Indicates whether the grid is in edit mode. + */ + IsEditing(): boolean; + /** + * Saves all the changes made and switches the grid to browse mode. + */ + UpdateEdit(): void; + /** + * Cancels all the changes made and switches the CardView to browse mode. + */ + CancelEdit(): void; + /** + * Updates data displayed within the grid. + */ + Refresh(): void; + /** + * Indicates whether the customization window is displayed. + */ + IsCustomizationWindowVisible(): boolean; + /** + * Invokes the customization window. + */ + ShowCustomizationWindow(): void; + /** + * Invokes the customization window and displays it over the specified HTML element. + * @param showAtElement An object that specifies the HTML element relative to whose position the customization window is invoked. + */ + ShowCustomizationWindow(showAtElement?: Object): void; + /** + * Closes the customization window. + */ + HideCustomizationWindow(): void; + /** + * Returns the number of columns within the client grid. + */ + GetColumnCount(): number; + /** + * Returns the card values displayed within all selected cards. + * @param fieldNames The names of data source fields separated via a semicolon, whose values within the selected cards are returned. + * @param onCallback An ASPxClientCardViewValuesCallback object that represents the JavaScript function which receives the list of card values as a parameter. + */ + GetSelectedFieldValues(fieldNames: string, onCallback: ASPxClientCardViewValuesCallback): void; + /** + * Returns key values of selected cards displayed within the current page. + */ + GetSelectedKeysOnPage(): Object[]; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event. + * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback An ASPxClientCardViewValuesCallback object that is the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(args: string, onCallback: ASPxClientCardViewValuesCallback): void; + /** + * Returns the values of the specified data source fields within the specified card. + * @param visibleIndex An integer value that identifies the data card. + * @param fieldNames The names of data source fields separated via a semicolon, whose values within the specified card are returned. + * @param onCallback An ASPxClientCardViewValuesCallback object that represents the JavaScript function which receives the list of card values as a parameter. + */ + GetCardValues(visibleIndex: number, fieldNames: string, onCallback: ASPxClientCardViewValuesCallback): void; + /** + * Returns the card values displayed within the current page. + * @param fieldNames The names of data source fields whose values are returned. + * @param onCallback An ASPxClientCardViewValuesCallback object that represents the JavaScript function which receives the list of card values as a parameter. + */ + GetPageCardValues(fieldNames: string, onCallback: ASPxClientCardViewValuesCallback): void; + /** + * Returns the number of cards actually displayed within the active page. + */ + GetVisibleCardsOnPage(): number; + /** + * Returns the client column that resides at the specified position within the column collection. + * @param columnIndex A zero-based index that identifies the column within the column collection (the column's Index property value). + */ + GetColumn(columnIndex: number): ASPxClientCardViewColumn; + /** + * Returns the column with the specified unique identifier. + * @param columnId A string value that specifies the column's unique identifier (the column's Name property value). + */ + GetColumnById(columnId: string): ASPxClientCardViewColumn; + /** + * Returns the client column which is bound to the specified data source field. + * @param columnFieldName A string value that specifies the name of the data source field to which the column is bound (the column's FieldName property value). + */ + GetColumnByField(columnFieldName: string): ASPxClientCardViewColumn; + /** + * Returns the editor used to edit the specified column's values. + * @param column An ASPxClientCardViewColumn object that specifies the required column within the client grid. + */ + GetEditor(column: ASPxClientCardViewColumn): ASPxClientEdit; + /** + * Returns the editor used to edit the specified column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + GetEditor(columnIndex: number): ASPxClientEdit; + /** + * Returns the editor used to edit the specified column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + GetEditor(columnFieldNameOrId: string): ASPxClientEdit; +} +/** + * Represents a client column. + */ +interface ASPxClientCardViewColumn extends ASPxClientGridColumnBase { + /** + * Gets the name that uniquely identifies the column. + * Value: A string value assigned to the column's Name property. + */ + name: string; + /** + * Gets the column's position within the collection. + * Value: An integer zero-bazed index that specifies the column's position within the collection. + */ + index: number; + /** + * Gets the name of the database field assigned to the current column. + * Value: A string value that specifies the name of a data field. + */ + fieldName: string; + /** + * Gets whether the column is visible. + * Value: true to display the column; otherwise, false. + */ + visible: boolean; +} +/** + * Represents a JavaScript function which receives the list of card values when the client GetSelectedFieldValues method is called. + */ +interface ASPxClientCardViewValuesCallback { + /** + * Represents a JavaScript function which receives the list of card values when the client GetSelectedFieldValues method is called. + * @param result An object that represents the list of card values received from the server. + */ + (result: Object): void; +} +/** + * A method that will handle the cancelable events of a client ASPxCardView column. + */ +interface ASPxClientCardViewColumnCancelEventHandler { + /** + * A method that will handle the cancelable events of a client ASPxCardView column. + * @param source The event source. This parameter identifies the ASPxClientCardView object that raised the event. + * @param e An ASPxClientCardViewColumnCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewColumnCancelEventArgs): void; +} +/** + * Provides data for the cancelable events of a client ASPxCardView column. + */ +interface ASPxClientCardViewColumnCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed client column. + * Value: An ASPxClientCardViewColumn object that represents the processed column. + */ + column: ASPxClientCardViewColumn; +} +/** + * A method that will handle the CardClick event. + */ +interface ASPxClientCardViewCardClickEventHandler { + /** + * A method that will handle the CardClick event. + * @param source The event source. This parameter identifies the ASPxClientCardView object that raised the event. + * @param e An ASPxClientCardViewCardClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewCardClickEventArgs): void; +} +/** + * Provides data for the CardClick event. + */ +interface ASPxClientCardViewCardClickEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed card's visible index. + * Value: An integer zero-based index that identifies the processed record. + */ + visibleIndex: number; + /** + * Provides access to the parameters associated with the CardClick event. + * Value: An object that contains parameters associated with the event. + */ + htmlEvent: Object; +} +/** + * A method that will handle the CustomButtonClick event. + */ +interface ASPxClientCardViewCustomButtonEventHandler { + /** + * A method that will handle the CustomButtonClick event. + * @param source The event source. This parameter identifies the ASPxClientCardView object that raised the event. + * @param e An ASPxClientCardViewCustomButtonEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewCustomButtonEventArgs): void; +} +/** + * Provides data for the CustomButtonClick event. + */ +interface ASPxClientCardViewCustomButtonEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the value which identifies the card whose custom button has been clicked. + * Value: An integer value that identifies the card whose custom button has been clicked. + */ + visibleIndex: number; + /** + * Gets the value which identifies the custom button. + * Value: A string value that identifies the clicked custom button. + */ + buttonID: string; +} +/** + * A method that will handle the SelectionChanged event. + */ +interface ASPxClientCardViewSelectionEventHandler { + /** + * A method that will handle the SelectionChanged event. + * @param source The event source. + * @param e An ASPxClientCardViewSelectionEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewSelectionEventArgs): void; +} +/** + * Provides data for the SelectionChanged event. + */ +interface ASPxClientCardViewSelectionEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the visible index of the card whose selected state has been changed. + * Value: An value that specifies the visible index of the card. + */ + visibleIndex: number; + /** + * Gets whether the card has been selected. + * Value: true if the card has been selected; otherwise, false. + */ + isSelected: boolean; + /** + * Gets whether all cards displayed within a page have been selected or unselected. + * Value: true if all cards displayed within a page have been selected or unselected; otherwise, false. + */ + isAllRecordsOnPage: boolean; + /** + * Gets whether a selection has been changed on the server. + * Value: true if a selection has been changed on the server; otherwise, false. + */ + isChangedOnServer: boolean; +} +/** + * A method that will handle the client BatchEditStartEditing event. + */ +interface ASPxClientCardViewBatchEditStartEditingEventHandler { + /** + * A method that will handle the BatchEditStartEditing event. + * @param source The event source. + * @param e An ASPxClientCardViewBatchEditStartEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditStartEditingEventArgs): void; +} +/** + * Provides data for the BatchEditStartEditing event. + */ +interface ASPxClientCardViewBatchEditStartEditingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the visible index of the card whose cells are about to be edited. + * Value: An value that specifies the visible index of the card. + */ + visibleIndex: number; + /** + * Gets the CardView column that owns a cell that is about to be edited. + * Value: An object that is the focused CardView column. + */ + focusedColumn: ASPxClientCardViewColumn; + /** + * Gets a hashtable that maintains information about editable cells. + * Value: A hashtable that stores information about editable cells. + */ + cardValues: Object; +} +/** + * A method that will handle the client BatchEditEndEditing event. + */ +interface ASPxClientCardViewBatchEditEndEditingEventHandler { + /** + * A method that will handle the BatchEditEndEditing event. + * @param source The event source. + * @param e An ASPxClientCardViewBatchEditEndEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditEndEditingEventArgs): void; +} +/** + * Provides data for the BatchEditEndEditing event. + */ +interface ASPxClientCardViewBatchEditEndEditingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the visible index of the card whose cells have been edited. + * Value: An value that specifies the visible index of the card. + */ + visibleIndex: number; + /** + * Gets a hashtable that maintains information about editable cells. + * Value: A hashtable that stores information about editable cells. + */ + cardValues: Object; +} +/** + * A method that will handle the client BatchEditCardValidating event. + */ +interface ASPxClientCardViewBatchEditCardValidatingEventHandler { + /** + * A method that will handle the BatchEditCardValidating event. + * @param source The event source. + * @param e An ASPxClientCardViewBatchEditCardValidatingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditCardValidatingEventArgs): void; +} +/** + * Provides data for the BatchEditCardValidating event. + */ +interface ASPxClientCardViewBatchEditCardValidatingEventArgs extends ASPxClientEventArgs { + /** + * Gets the processed card's visible index. + * Value: An integer value that specifies the processed card's visible index. + */ + visibleIndex: number; + /** + * Provides validation information of a card currently being validated. + * Value: An object that is a hashtable containing validation information. + */ + validationInfo: Object; +} +/** + * Represents an object that will handle the client-side BatchEditConfirmShowing event. + */ +interface ASPxClientCardViewBatchEditConfirmShowingEventHandler { + /** + * A method that will handle the BatchEditConfirmShowing client event. + * @param source The event source. + * @param e An ASPxClientCardViewBatchEditConfirmShowingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditConfirmShowingEventArgs): void; +} +/** + * Provides data for the BatchEditConfirmShowing event. + */ +interface ASPxClientCardViewBatchEditConfirmShowingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the client identifier of an object that initiates a send request. + * Value: A string value that specifies the object client identifier. + */ + requestTriggerID: string; +} +/** + * A method that will handle the client BatchEditTemplateCellFocused event. + */ +interface ASPxClientCardViewBatchEditTemplateCellFocusedEventHandler { + /** + * A method that will handle the BatchEditTemplateCellFocused event. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientCardViewBatchEditTemplateCellFocusedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditTemplateCellFocusedEventArgs): void; +} +/** + * Provides data for the BatchEditTemplateCellFocused event. + */ +interface ASPxClientCardViewBatchEditTemplateCellFocusedEventArgs extends ASPxClientEventArgs { + /** + * Gets the currently processed column. + * Value: An object that is the client-side column object. + */ + column: ASPxClientCardViewColumn; + /** + * Gets or sets a value specifying whether the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * A method that will handle the BatchEditChangesSaving event. + */ +interface ASPxClientCardViewBatchEditChangesSavingEventHandler { + /** + * A method that will handle the BatchEditChangesSaving event. + * @param source The event source. This parameter identifies the card view object which raised the event. + * @param e An ASPxClientCardViewBatchEditChangesSavingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditChangesSavingEventArgs): void; +} +/** + * Provides data for the BatchEditChangesSaving event. + */ +interface ASPxClientCardViewBatchEditChangesSavingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets a hashtable that maintains information about inserted cells. + * Value: A hashtable that stores information about inserted cells. + */ + insertedValues: Object; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + deletedValues: Object; + /** + * Gets a hashtable that maintains information about updated cells. + * Value: A hashtable that stores information about updated cells. + */ + updatedValues: Object; +} +/** + * A method that will handle the BatchEditChangesCanceling event. + */ +interface ASPxClientCardViewBatchEditChangesCancelingEventHandler { + /** + * A method that will handle the BatchEditChangesCanceling event. + * @param source The event source. This parameter identifies the card view object which raised the event. + * @param e An ASPxClientCardViewBatchEditChangesCancelingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditChangesCancelingEventArgs): void; +} +/** + * Provides data for the BatchEditChangesCanceling event. + */ +interface ASPxClientCardViewBatchEditChangesCancelingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets a hashtable that maintains information about inserted cells. + * Value: A hashtable that stores information about inserted cells. + */ + insertedValues: Object; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + deletedValues: Object; + /** + * Gets a hashtable that maintains information about updated cells. + * Value: A hashtable that stores information about updated cells. + */ + updatedValues: Object; +} +/** + * A method that will handle the BatchEditCardInserting event. + */ +interface ASPxClientCardViewBatchEditCardInsertingEventHandler { + /** + * A method that will handle the BatchEditCardInserting event. + * @param source The event source. This parameter identifies the card view object which raised the event. + * @param e An ASPxClientCardViewBatchEditCardInsertingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditCardInsertingEventArgs): void; +} +/** + * Provides data for the BatchEditCardInserting event. + */ +interface ASPxClientCardViewBatchEditCardInsertingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed card visible index. + * Value: An integer value that specifies the processed card visible index. + */ + visibleIndex: number; +} +/** + * A method that will handle the BatchEditCardDeleting event. + */ +interface ASPxClientCardViewBatchEditCardDeletingEventHandler { + /** + * A method that will handle the BatchEditCardDeleting event. + * @param source The event source. This parameter identifies the card view object which raised the event. + * @param e An ASPxClientCardViewBatchEditCardDeletingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewBatchEditCardDeletingEventArgs): void; +} +/** + * Provides data for the BatchEditCardDeleting event. + */ +interface ASPxClientCardViewBatchEditCardDeletingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed card visible index. + * Value: An integer value that specifies the processed card visible index. + */ + visibleIndex: number; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + cardValues: Object; +} +/** + * A method that will handle the FocusedCellChanging event. + */ +interface ASPxClientCardViewFocusedCellChangingEventHandler { + /** + * A method that will handle the FocusedCellChanging event. + * @param source The event source. + * @param e An ASPxClientCardViewFocusedCellChangingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCardViewFocusedCellChangingEventArgs): void; +} +/** + * Provides data for the FocusedCellChanging event. + */ +interface ASPxClientCardViewFocusedCellChangingEventArgs extends ASPxClientCancelEventArgs { + /** + * Provides information of a card's cell currently being focused. + * Value: A ASPxClientCardViewCellInfo object that provides information about the card's cell. + */ + cellInfo: ASPxClientCardViewCellInfo; +} +/** + * Provides members related to Batch Edit Mode + */ +interface ASPxClientCardViewBatchEditApi { + /** + * Performs validation of CardView data contained in the cards when the CardView operates in Batch Edit mode. + * @param validateOnlyModified true, if only modified cards should be validated; otherwise, false. + */ + ValidateCards(validateOnlyModified?: boolean): boolean; + /** + * Performs validation of CardView data contained in the specified card when the CardView operates in Batch Edit mode. + * @param visibleIndex An integer value specifying the visible index of the validated card. + */ + ValidateCard(visibleIndex: number): boolean; + /** + * Returns an array of card visible indices. + * @param includeDeleted true, to include visible indices of deleted cards to the returned array; otherwise, false. + */ + GetCardVisibleIndices(includeDeleted: boolean): number[]; + /** + * Returns an array of the deleted card visible indices. + */ + GetDeletedCardIndices(): number[]; + /** + * Returns an array of the inserted card visible indices. + */ + GetInsertedCardIndices(): number[]; + /** + * Indicates if the card with the specified visible index is deleted. + * @param visibleIndex An integer value that identifies the card by its visible index. + */ + IsDeletedCard(visibleIndex: number): boolean; + /** + * Indicates if the card with the specified visible index is newly created. + * @param visibleIndex An integer value that identifies the card by its visible index. + */ + IsNewCard(visibleIndex: number): boolean; + /** + * Programmatically moves the focus to the previous cell in the card + */ + MoveFocusBackward(): boolean; + /** + * Programmatically moves the focus to the next cell in the card. + */ + MoveFocusForward(): boolean; + /** + * Sets the value of the specified cell. + * @param visibleIndex An integer zero-based index that identifies the card containing the processed cell. + * @param columnFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param value An object that contains the new cell value. + */ + SetCellValue(visibleIndex: number, columnFieldNameOrId: string, value: Object): void; + /** + * Sets the value of the specified cell. + * @param visibleIndex An integer zero-based index that identifies the card containing the processed cell. + * @param columnFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param value An object that contains the new cell value. + * @param displayText A string value that specifies the cell display text. + * @param cancelCellHighlighting true to cancel highlighting of the modified cell, false to highlight the modified cell. + */ + SetCellValue(visibleIndex: number, columnFieldNameOrId: string, value: Object, displayText: string, cancelCellHighlighting?: boolean): void; + /** + * Gets the value of the specified cell. + * @param visibleIndex A zero-based integer value that specifies the visible index of a card containing the processed cell. + * @param columnFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param initial true, to return the initial (server) value; false, to return a value currently contained on the client side (modified value). + */ + GetCellValue(visibleIndex: number, columnFieldNameOrId: string, initial?: boolean): Object; + /** + * Gets a container holding a data cell content. + * @param visibleIndex An integer value that is the visible index. + * @param columnFieldNameOrId A string value that is the column's Field Name or ID. + */ + GetCellTextContainer(visibleIndex: number, columnFieldNameOrId: string): Object; + /** + * Gets information about the cell currently being edited. + */ + GetEditCellInfo(): ASPxClientCardViewCellInfo; + /** + * Returns a value that indicates whether the card view has changed data. + */ + HasChanges(): boolean; + /** + * Returns a value that indicates whether the specified card has changed data. + * @param visibleIndex An integer value that specifies the visible index of a card. + */ + HasChanges(visibleIndex: number): boolean; + /** + * Returns a value that indicates whether the specified cell's data has been changed. + * @param visibleIndex An integer value that specifies the visible index of a card. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + HasChanges(visibleIndex: number, columnFieldNameOrId: string): boolean; + /** + * Resets changes in the specified card. + * @param visibleIndex An integer value that specifies the visible index of a card. + */ + ResetChanges(visibleIndex: number): void; + /** + * Resets changes in the specified cell. + * @param visibleIndex An integer value that specifies the visible index of a card containing the processed cell. + * @param columnIndex A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + */ + ResetChanges(visibleIndex: number, columnIndex: number): void; + /** + * Switches the specified cell to edit mode. + * @param visibleIndex A zero-based integer value that specifies the visible index of a card containing the processed cell. + * @param columnIndex A zero-based integer value that identifies the column which contains the processed cell in the column collection. + */ + StartEdit(visibleIndex: number, columnIndex: number): void; + /** + * Ends cell or card editing. + */ + EndEdit(): void; +} +/** + * Contains information on a grid cell. + */ +interface ASPxClientCardViewCellInfo { + /** + * Gets the visible index of the card that contains the cell currently being processed. + * Value: An value that specifies the visible index of the card. + */ + cardVisibleIndex: number; + /** + * Gets the data column that contains the cell currently being processed. + * Value: An object that is the data column which contains the processed cell. + */ + column: ASPxClientCardViewColumn; +} +/** + * A client-side equivalent of the ASPxGridView object. + */ +interface ASPxClientGridView extends ASPxClientGridBase { + /** + * Provides access to the batch editing client API. + * Value: A object that exposes the batch editing client API methods. + */ + batchEditApi: ASPxClientGridViewBatchEditApi; + /** + * Occurs when a custom command button has been clicked. + */ + CustomButtonClick: ASPxClientEvent>; + /** + * Fires after the selection has been changed. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Enables you to prevent columns from being sorted. + */ + ColumnSorting: ASPxClientEvent>; + /** + * Fires in response to changing row focus. + */ + FocusedRowChanged: ASPxClientEvent>; + /** + * Enables you to cancel data grouping. + */ + ColumnGrouping: ASPxClientEvent>; + /** + * Fires when an end-user starts dragging the column's header and enables you to cancel this operation. + */ + ColumnStartDragging: ASPxClientEvent>; + /** + * Enables you to prevent columns from being resized. + */ + ColumnResizing: ASPxClientEvent>; + /** + * Occurs after a column's width has been changed by an end-user. + */ + ColumnResized: ASPxClientEvent>; + /** + * Enables you to control column movement. + */ + ColumnMoving: ASPxClientEvent>; + /** + * Fires before a group row is expanded. + */ + RowExpanding: ASPxClientEvent>; + /** + * Fires before a group row is collapsed. + */ + RowCollapsing: ASPxClientEvent>; + /** + * Fires before a detail row is expanded. + */ + DetailRowExpanding: ASPxClientEvent>; + /** + * Fires before a detail row is collapsed. + */ + DetailRowCollapsing: ASPxClientEvent>; + /** + * Fires on the client when a data row is clicked. + */ + RowClick: ASPxClientEvent>; + /** + * Fires on the client when a data row is double clicked. + */ + RowDblClick: ASPxClientEvent>; + /** + * Occurs after an end-user right clicks in the GridView, and enables you to provide a custom context menu. + */ + ContextMenu: ASPxClientEvent>; + /** + * Fires on the client side when a context menu item has been clicked. + */ + ContextMenuItemClick: ASPxClientEvent>; + /** + * Enables you to specify whether row data is valid and provide an error text. + */ + BatchEditRowValidating: ASPxClientEvent>; + /** + * Enables you to prevent a batch edit confirmation message from being displayed. + */ + BatchEditConfirmShowing: ASPxClientEvent>; + /** + * Occurs when a grid switches to batch edit mode. + */ + BatchEditStartEditing: ASPxClientEvent>; + /** + * Occurs when a grid leaves the batch edit mode. + */ + BatchEditEndEditing: ASPxClientEvent>; + /** + * Enables you to provide navigation for editors contained in a templated cell in Batch Edit mode. + */ + BatchEditTemplateCellFocused: ASPxClientEvent>; + /** + * Occurs on the client side before data changes are saved in batch edit mode. + */ + BatchEditChangesSaving: ASPxClientEvent>; + /** + * Occurs on the client side before data changes are canceled in batch edit mode. + */ + BatchEditChangesCanceling: ASPxClientEvent>; + /** + * Occurs on the client side before a data row is inserted in batch edit mode. + */ + BatchEditRowInserting: ASPxClientEvent>; + /** + * Occurs on the client side before a data row is deleted in batch edit mode. + */ + BatchEditRowDeleting: ASPxClientEvent>; + /** + * Occurs on the client side when the focused cell is about to be changed. + */ + FocusedCellChanging: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any unhandled server error occurs during server-side processing of a callback sent by the ASPxClientGridView. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires after the Customization Window has been closed. + */ + CustomizationWindowCloseUp: ASPxClientEvent>; + /** + * Selects or deselects the specified row displayed within the grid. + * @param key An object that uniquely identifies the row. + * @param selected true to select the specified row; false to deselect the row. + */ + SelectRowsByKey(key: Object, selected?: boolean): void; + /** + * Selects the specified rows displayed within the grid. + * @param keys An array of objects that uniquely identify the rows. + */ + SelectRowsByKey(keys: Object[]): void; + /** + * Selects a grid row by its key. + * @param key An object that uniquely identifies the row. + */ + SelectRowsByKey(key: Object): void; + /** + * Deselects the specified rows displayed within the grid. + * @param keys An array of objects that uniquely identify the rows. + */ + UnselectRowsByKey(keys: Object[]): void; + /** + * Deselects the specified row displayed within the grid. + * @param key An object that uniquely identifies the row. + */ + UnselectRowsByKey(key: Object): void; + /** + * Deselects all the selected rows within the grid. + */ + UnselectRows(): void; + /** + * Deselects the specified rows (if selected) within the grid. + * @param visibleIndices An array of zero-based indices that identify data rows within the grid. + */ + UnselectRows(visibleIndices: number[]): void; + /** + * Deselects the specified row (if selected) within the grid. + * @param visibleIndex A zero-based integer value that specifies the row's visible index. + */ + UnselectRows(visibleIndex: number): void; + /** + * Deselects all grid rows that match the filter criteria currently applied to the grid. + */ + UnselectFilteredRows(): void; + /** + * Selects the specified row displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the row's visible index. + */ + SelectRowOnPage(visibleIndex: number): void; + /** + * Selects or deselects the specified row displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the row's visible index. + * @param selected true to select the specified row; false to deselect the row. + */ + SelectRowOnPage(visibleIndex: number, selected?: boolean): void; + /** + * Deselects the specified row (if selected) displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the row's visible index. + */ + UnselectRowOnPage(visibleIndex: number): void; + /** + * Selects all unselected rows displayed on the current page. + */ + SelectAllRowsOnPage(): void; + /** + * Allows you to select or deselect all rows displayed on the current page based on the parameter passed. + * @param selected true to select all unselected rows displayed on the current page; false to deselect all selected rows on the page. + */ + SelectAllRowsOnPage(selected: boolean): void; + /** + * Deselects all selected rows displayed on the current page. + */ + UnselectAllRowsOnPage(): void; + /** + * Returns the number of selected rows. + */ + GetSelectedRowCount(): number; + /** + * Indicates whether or not the specified row is selected within the current page. + * @param visibleIndex An integer value that identifies the row by its visible index. + */ + IsRowSelectedOnPage(visibleIndex: number): boolean; + /** + * Indicates whether the specified row is a group row. + * @param visibleIndex An integer value that identifies the row by its visible index. + */ + IsGroupRow(visibleIndex: number): boolean; + /** + * Indicates whether the specified row is a data row. + * @param visibleIndex An integer value that identifies the row by its visible index. + */ + IsDataRow(visibleIndex: number): boolean; + /** + * Indicates whether the specified group row is expanded. + * @param visibleIndex An integer value that identifies the group row by its visible index. + */ + IsGroupRowExpanded(visibleIndex: number): boolean; + /** + * Returns the current vertical scroll position of the grid's content. + */ + GetVertScrollPos(): number; + /** + * Returns the current horizontal scroll position of the grid's content. + */ + GetHorzScrollPos(): number; + /** + * Returns the current horizontal scroll position of the grid's content. + */ + GetHorizontalScrollPosition(): number; + /** + * Specifies the vertical scroll position for the grid's content. + * @param position An integer value specifying the vertical scroll position. + */ + SetVertScrollPos(position: number): void; + /** + * Specifies the horizontal scroll position for the grid's content. + * @param position An integer value specifying the horizontal scroll position. + */ + SetHorzScrollPos(position: number): void; + /** + * Specifies the horizontal scroll position for the grid's content. + * @param position An integer value specifying the horizontal scroll position. + */ + SetHorizontalScrollPosition(position: number): void; + /** + * Sets the scrollability of various types of grid rows when the grid displays fixed columns. + * @param scrollableRowSettings An object specifying which types of grid rows should or should not be scrollable. + */ + SetFixedColumnScrollableRows(scrollableRowSettings: Object): void; + /** + * Applies a filter specified in the filter row to the GridView. + */ + ApplyOnClickRowFilter(): void; + /** + * Returns the editor used to edit the value in the auto filter row for the specified data column. + * @param column An ASPxClientGridViewColumn object that represents the data colum within the ASPxGridView. + */ + GetAutoFilterEditor(column: ASPxClientGridViewColumn): Object; + /** + * Returns the editor used to edit the value in the auto filter row for the specified data column. + * @param columnIndex An integer value that identifies the data column by its index. + */ + GetAutoFilterEditor(columnIndex: number): Object; + /** + * Returns the editor used to edit the value in the auto filter row for the specified data column. + * @param columnFieldNameOrId A string value that specifies the column's name or its data base field name. + */ + GetAutoFilterEditor(columnFieldNameOrId: string): Object; + /** + * Applies a filter to the specified data column. + * @param column An ASPxClientGridViewColumn object that represents the data column within the client GridView. + * @param val A string value that specifies the filter expression. + */ + AutoFilterByColumn(column: ASPxClientGridViewColumn, val: string): void; + /** + * Applies a filter to the specified data column. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param val A string value that specifies the filter expression. + */ + AutoFilterByColumn(columnIndex: number, val: string): void; + /** + * Applies a filter to the specified data column. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param val A string value that specifies the filter expression. + */ + AutoFilterByColumn(columnFieldNameOrId: string, val: string): void; + /** + * Applies the specified search panel filter criterion to grid data. + * @param value A string value that specifies the filter criterion. + */ + ApplySearchPanelFilter(value: string): void; + /** + * Applies the specified filter expression to the GridView. + * @param filterExpression A string value that specifies the filter expression. + */ + ApplyFilter(filterExpression: string): void; + /** + * Clears the filter expression applied to a client GridView. + */ + ClearFilter(): void; + /** + * Gets the Popup Edit Form. + */ + GetPopupEditForm(): ASPxClientPopupControl; + /** + * Sets input focus to the grid. + */ + Focus(): void; + /** + * 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. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing the specified argument to it. + * @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; + /** + * Selects the specified page. + * @param pageIndex An integer value that specifies the active page's index. + */ + GotoPage(pageIndex: number): void; + /** + * Gets the index of the page currently being selected. + */ + GetPageIndex(): number; + /** + * Gets the number of pages to which the grid's data is divided. + */ + GetPageCount(): number; + /** + * Activates the next page. + */ + NextPage(): void; + /** + * Activates the previous page. + */ + PrevPage(): void; + /** + * Returns the index of the first data row displayed within the GridView's active page. + */ + GetTopVisibleIndex(): number; + /** + * Indicates whether the grid is in edit mode. + */ + IsEditing(): boolean; + /** + * Saves all the changes made and switches the grid to browse mode. + */ + UpdateEdit(): void; + /** + * Cancels all the changes made and switches the GridView to browse mode. + */ + CancelEdit(): void; + /** + * Updates data displayed within the grid. + */ + Refresh(): void; + /** + * Indicates whether the Customization Window is displayed. + */ + IsCustomizationWindowVisible(): boolean; + /** + * Invokes the Customization Window. + */ + ShowCustomizationWindow(): void; + /** + * Invokes the Customization Window and displays it over the specified HTML element. + * @param showAtElement An object that specifies the HTML element relative to whose position the customization window is invoked. + */ + ShowCustomizationWindow(showAtElement?: Object): void; + /** + * Closes the Customization Window. + */ + HideCustomizationWindow(): void; + /** + * Returns the number of columns within the client GridView. + */ + GetColumnsCount(): number; + /** + * Returns the number of columns within the client GridView. + */ + GetColumnCount(): number; + /** + * Returns the row values displayed within all selected rows. + * @param fieldNames The names of data source fields separated via a semicolon, whose values within the selected rows are returned. + * @param onCallback A ASPxClientGridViewValuesCallback object that represents the JavaScript function which receives the list of row values as a parameter. + */ + GetSelectedFieldValues(fieldNames: string, onCallback: ASPxClientGridViewValuesCallback): void; + /** + * Returns key values of selected rows displayed within the current page. + */ + GetSelectedKeysOnPage(): Object[]; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event. + * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientGridViewValuesCallback object that is the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(args: string, onCallback: ASPxClientGridViewValuesCallback): void; + /** + * Returns the values of the specified data source fields within the specified row. + * @param visibleIndex An integer value that identifies the data row. + * @param fieldNames The names of data source fields separated via a semicolon, whose values within the specified row are returned. + * @param onCallback An ASPxClientGridViewValuesCallback object that represents the JavaScript function which receives the list of row values as a parameter. + */ + GetRowValues(visibleIndex: number, fieldNames: string, onCallback: ASPxClientGridViewValuesCallback): void; + /** + * Returns the row values displayed within the current page. + * @param fieldNames The names of data source fields whose values are returned. + * @param onCallback A ASPxClientGridViewValuesCallback object that represents the JavaScript function which receives the list of row values as a parameter. + */ + GetPageRowValues(fieldNames: string, onCallback: ASPxClientGridViewValuesCallback): void; + /** + * Returns the number of rows actually displayed within the active page. + */ + GetVisibleRowsOnPage(): number; + /** + * Returns the client column that resides at the specified position within the column collection. + * @param columnIndex A zero-based index that identifies the column within the column collection (the column's Index property value). + */ + GetColumn(columnIndex: number): ASPxClientGridViewColumn; + /** + * Returns the column with the specified unique identifier. + * @param columnId A string value that specifies the column's unique identifier (the column's Name property value). + */ + GetColumnById(columnId: string): ASPxClientGridViewColumn; + /** + * Returns the client column which is bound to the specified data source field. + * @param columnFieldName A string value that specifies the name of the data source field to which the column is bound (the column's FieldName property value). + */ + GetColumnByField(columnFieldName: string): ASPxClientGridViewColumn; + /** + * Returns the editor used to edit the specified column's values. + * @param column An ASPxClientGridViewColumn object that specifies the required column within the client grid. + */ + GetEditor(column: ASPxClientGridViewColumn): ASPxClientEdit; + /** + * Returns the editor used to edit the specified column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + GetEditor(columnIndex: number): ASPxClientEdit; + /** + * Returns the editor used to edit the specified column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + GetEditor(columnFieldNameOrId: string): ASPxClientEdit; + /** + * Returns the value of the specified edit cell. + * @param column An ASPxClientGridViewColumn object that represents the data column within the client grid. + */ + GetEditValue(column: ASPxClientGridViewColumn): string; + /** + * Returns the value of the specified edit cell. + * @param columnIndex An integer value that identifies the data column within the grid's column collection. + */ + GetEditValue(columnIndex: number): string; + /** + * Returns the value of the specified edit cell. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + GetEditValue(columnFieldNameOrId: string): string; + /** + * Moves focus to the specified edit cell within the edited row. + * @param column An ASPxClientGridViewColumn object that represents the data column within the client grid. + */ + FocusEditor(column: ASPxClientGridViewColumn): void; + /** + * Moves focus to the specified edit cell within the edited row. + * @param columnIndex An integer value that specifies the column's position within the columns collection. + */ + FocusEditor(columnIndex: number): void; + /** + * Moves focus to the specified edit cell within the edited row. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + FocusEditor(columnFieldNameOrId: string): void; + /** + * Sets the value of the specified edit cell. + * @param column An ASPxClientGridViewColumn object that represents the data column within the client grid. + * @param value A string value that specifies the edit cell's new value. + */ + SetEditValue(column: ASPxClientGridViewColumn, value: string): void; + /** + * Sets the value of the specified edit cell. + * @param columnIndex An integer value that identifies the data column within the grid's column collection. + * @param value A string value that specifies the edit cell's new value. + */ + SetEditValue(columnIndex: number, value: string): void; + /** + * Sets the value of the specified edit cell. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param value A string value that specifies the edit cell's new value. + */ + SetEditValue(columnFieldNameOrId: string, value: string): void; + /** + * Displays the Filter Control. + */ + ShowFilterControl(): void; + /** + * Hides the Filter Control. + */ + CloseFilterControl(): void; + /** + * Enables or disables the current filter. + * @param isFilterEnabled true to enable the current filter; otherwise, false. + */ + SetFilterEnabled(isFilterEnabled: boolean): void; + /** + * Returns the current vertical scroll position of the grid's content. + */ + GetVerticalScrollPosition(): number; + /** + * Specifies the vertical scroll position for the grid's content. + * @param position An integer value specifying the vertical scroll position. + */ + SetVerticalScrollPosition(position: number): void; + /** + * Gets information about a focused cell. + */ + GetFocusedCell(): ASPxClientGridViewCellInfo; + /** + * Focuses the specified cell. + * @param rowVisibleIndex An integer value that specifies the visible index of the row. + * @param columnIndex A zero-based index that identifies the column in the column collection (the column's Index property value). + */ + SetFocusedCell(rowVisibleIndex: number, columnIndex: number): void; + /** + * Invokes the Customization Dialog and displays it over the grid. + */ + ShowCustomizationDialog(): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientGridViewColumn object that represents the data column. + */ + SortBy(column: ASPxClientGridViewColumn): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + SortBy(columnIndex: number): void; + /** + * Sorts data by the specified data column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + SortBy(columnFieldNameOrId: string): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientGridViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(column: ASPxClientGridViewColumn, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(columnIndex: number, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(columnFieldNameOrId: string, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientGridViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(column: ASPxClientGridViewColumn, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(columnIndex: number, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(columnFieldNameOrId: string, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values, and places the column to the specified position among the sorted columns. + * @param column An ASPxClientGridViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based column's index among the sorted columns. -1 if data is not sorted by this column. + */ + SortBy(column: ASPxClientGridViewColumn, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Sorts data by the specified data column's values, and places the column to the specified position among the sorted columns. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based column's index among the sorted columns. -1 if data is not sorted by this column. + */ + SortBy(columnIndex: number, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Sorts data by the specified data column's values, and places the column to the specified position among the sorted columns. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based column's index among the sorted columns. -1 if data is not sorted by this column. + */ + SortBy(columnFieldNameOrId: string, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Hides the specified column. + * @param column An ASPxClientGridViewColumn object that represents the column to hide. + */ + MoveColumn(column: ASPxClientGridViewColumn): void; + /** + * Hides the specified column. + * @param columnIndex An integer value that specifies the absolute index of the column to hide. + */ + MoveColumn(columnIndex: number): void; + /** + * Hides the specified column. + * @param columnFieldNameOrId A String value that identifies the column to be hidden by the name of the data source field to which the column is bound, or by the column's name. + */ + MoveColumn(columnFieldNameOrId: string): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param column An ASPxClientGridViewColumn object that represents the column to move. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the grid. + */ + MoveColumn(column: ASPxClientGridViewColumn, moveToColumnVisibleIndex: number): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the grid. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param columnFieldNameOrId A String value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the grid. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param column An ASPxClientGridViewColumn object that represents the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + */ + MoveColumn(column: ASPxClientGridViewColumn, moveToColumnVisibleIndex: number, moveBefore: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number, moveBefore: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param columnFieldNameOrId A string value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, moveBefore: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups the grid's data by this column. + * @param column An ASPxClientGridViewColumn object that represents the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + * @param moveToGroup true to group the grid's data by the column; otherwise, false. + */ + MoveColumn(column: ASPxClientGridViewColumn, moveToColumnVisibleIndex: number, moveBefore: boolean, moveToGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups the grid's data by this column. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + * @param moveToGroup true to group the ASPxGridView's data by the column; otherwise, false. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number, moveBefore: boolean, moveToGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups the grid's data by this column. + * @param columnFieldNameOrId A string value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + * @param moveToGroup true to group the grid's data by the column; otherwise, false. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, moveBefore: boolean, moveToGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups or ungroups the grid's data by this column. + * @param column An ASPxClientGridViewColumn object that represents the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + * @param moveToGroup true to group the grid's data by the column; otherwise, false. + * @param moveFromGroup true to ungroup the grid's data by the column; otherwise, false. + */ + MoveColumn(column: ASPxClientGridViewColumn, moveToColumnVisibleIndex: number, moveBefore: boolean, moveToGroup: boolean, moveFromGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups or ungroups the grid's data by this column. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + * @param moveToGroup true to group the grid's data by the column; otherwise, false. + * @param moveFromGroup true to ungroup the grid's data by the column; otherwise, false. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number, moveBefore: boolean, moveToGroup: boolean, moveFromGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups or ungroups the grid's data by this column. + * @param columnFieldNameOrId A string value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param moveBefore true to move the column before the target column; otherwise, false. + * @param moveToGroup true to group the grid's data by the column; otherwise, false. + * @param moveFromGroup true to ungroup the grid's data by the column; otherwise, false. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, moveBefore: boolean, moveToGroup: boolean, moveFromGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the grid. + * @param targetPosition An ASPxClientGridColumnMovingTargetPosition enumeration value specifying the position relative to the target column in which to place the moved column. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number, targetPosition: ASPxClientGridColumnMovingTargetPosition): void; + /** + * Moves the specified column to the specified visual position within the grid. + * @param columnFieldNameOrId A String value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that specifies the column's position among the visible columns within the grid. + * @param targetPosition An ASPxClientGridColumnMovingTargetPosition enumeration value specifying the position relative to the target column in which to place the moved column. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, targetPosition: ASPxClientGridColumnMovingTargetPosition): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups or ungroups the grid's data by this column. + * @param columnIndex An integer value that specifies the absolute index of the column to move. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param targetPosition An ASPxClientGridColumnMovingTargetPosition enumeration value specifying the position relative to the target column in which to place the moved column. + * @param moveToGroup true, to group the ASPxGridView's data by the column; otherwise, false. + * @param moveFromGroup true, to ungroup the grid's data by the column; otherwise, false. + */ + MoveColumn(columnIndex: number, moveToColumnVisibleIndex: number, targetPosition: ASPxClientGridColumnMovingTargetPosition, moveToGroup: boolean, moveFromGroup: boolean): void; + /** + * Moves the specified column to the specified visual position within the grid and optionally groups or ungroups the grid's data by this column. + * @param columnFieldNameOrId A string value that identifies the column to be moved by the name of the data source field to which the column is bound or by the column's name. + * @param moveToColumnVisibleIndex An integer value that identifies the target column displayed within the grid. + * @param targetPosition An ASPxClientGridColumnMovingTargetPosition enumeration value specifying the position relative to the target column in which to place the moved column. + * @param moveToGroup true, to group the grid's data by the column; otherwise, false. + * @param moveFromGroup true, to ungroup the grid's data by the column; otherwise, false. + */ + MoveColumn(columnFieldNameOrId: string, moveToColumnVisibleIndex: number, targetPosition: ASPxClientGridColumnMovingTargetPosition, moveToGroup: boolean, moveFromGroup: boolean): void; + /** + * Groups data by the values of the specified column. + * @param column An ASPxClientGridViewColumn object that represents the data column by whose values data is grouped. + */ + GroupBy(column: ASPxClientGridViewColumn): void; + /** + * Groups data by the values of the specified column. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + GroupBy(columnIndex: number): void; + /** + * Groups data by the values of the specified column. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + GroupBy(columnFieldNameOrId: string): void; + /** + * Groups data by the values of the specified data column. If several columns are involved in grouping, the specified column will reside at the specified grouping level. + * @param column An ASPxClientGridViewColumn object that represents the data column by whose values data is grouped. + * @param groupIndex An integer value that specifies the grouping level. -1 to cancel grouping by the column's values. + */ + GroupBy(column: ASPxClientGridViewColumn, groupIndex: number): void; + /** + * Groups data by the values of the specified data column. If several columns are involved in grouping, the specified column will reside at the specified grouping level. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param groupIndex An integer value that specifies the grouping level. -1 to cancel grouping by the column's values. + */ + GroupBy(columnIndex: number, groupIndex: number): void; + /** + * Groups data by the values of the specified data column. If several columns are involved in grouping, the specified column will reside at the specified grouping level. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param groupIndex An integer value that specifies the grouping level. -1 to cancel grouping by the column's values. + */ + GroupBy(columnFieldNameOrId: string, groupIndex: number): void; + /** + * Groups data by the values of the specified data column with the specified sort order. If several columns are involved in grouping, the specified column will reside at the specified grouping level. + * @param column An ASPxClientGridViewColumn object that represents the data column by whose values data is grouped. + * @param groupIndex An integer value that specifies the grouping level. -1 to cancel grouping by the column's values. + * @param sortOrder A string value that specifies the column's sort order. + */ + GroupBy(column: ASPxClientGridViewColumn, groupIndex: number, sortOrder: string): void; + /** + * Groups data by the values of the specified data column with the specified sort order. If several columns are involved in grouping, the specified column will reside at the specified grouping level. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param groupIndex An integer value that specifies the grouping level. -1 to cancel grouping by the column's values. + * @param sortOrder A string value that specifies the column's sort order. + */ + GroupBy(columnIndex: number, groupIndex: number, sortOrder: string): void; + /** + * Groups data by the values of the specified data column with the specified sort order. If several columns are involved in grouping, the specified column will reside at the specified grouping level. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param groupIndex An integer value that specifies the grouping level. -1 to cancel grouping by the column's values. + * @param sortOrder A string value that specifies the column's sort order. + */ + GroupBy(columnFieldNameOrId: string, groupIndex: number, sortOrder: string): void; + /** + * Ungroups data by the values of the specified column. + * @param column An ASPxClientGridViewColumn object that represents the data column within the ASPxGridView. + */ + UnGroup(column: ASPxClientGridViewColumn): void; + /** + * Ungroups data by the values of the specified column. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + UnGroup(columnIndex: number): void; + /** + * Ungroups data by the values of the specified column. + * @param columnFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + */ + UnGroup(columnFieldNameOrId: string): void; + /** + * Ungroups data by the values of a specified column. + * @param column A ASPxClientGridViewColumn object that is the grid column. + */ + Ungroup(column: ASPxClientGridViewColumn): void; + /** + * Ungroups data by the values of a specified column. + * @param columnIndex An integer value that is the column index. + */ + Ungroup(columnIndex: number): void; + /** + * Ungroups data by the values of a specified column. + * @param columnFieldNameOrId A string value that is the column's FieldName or ID. + */ + Ungroup(columnFieldNameOrId: string): void; + /** + * Expands all group rows. + */ + ExpandAll(): void; + /** + * Collapses all group rows. + */ + CollapseAll(): void; + /** + * Expands all detail rows. + */ + ExpandAllDetailRows(): void; + /** + * Collapses all detail rows. + */ + CollapseAllDetailRows(): void; + /** + * Expands the specified group row preserving the collapsed state of any child group row. + * @param visibleIndex An integer value that identifies the group row. + */ + ExpandRow(visibleIndex: number): void; + /** + * Expands the specified group row and optionally child group rows at all nesting levels. + * @param visibleIndex An integer value that identifies the group row. + * @param recursive true to expand any child group rows at all nesting levels; false to preserve the collapsed state of any child group rows. + */ + ExpandRow(visibleIndex: number, recursive?: boolean): void; + /** + * Collapses the specified group row preserving the expanded state of child group rows. + * @param visibleIndex An integer value that identifies the group row by its visible index. + */ + CollapseRow(visibleIndex: number): void; + /** + * Collapses the specified group row and optionally child group rows at all nesting levels. + * @param visibleIndex An integer value that identifies the group row by its visible index. + * @param recursive true to collapse child group rows at all nesting levels; false to preserve the expanded state of any child group row. + */ + CollapseRow(visibleIndex: number, recursive?: boolean): void; + /** + * Scrolls the view to the specified row. + * @param visibleIndex An integer value that identifies a row by its visible index. + */ + MakeRowVisible(visibleIndex: number): void; + /** + * Expands the specified detail row. + * @param visibleIndex A zero-based integer index that identifies the detail row. + */ + ExpandDetailRow(visibleIndex: number): void; + /** + * Collapses the specified detail row. + * @param visibleIndex A zero-based integer index that identifies the detail row. + */ + CollapseDetailRow(visibleIndex: number): void; + /** + * Returns the key value of the specified data row. + * @param visibleIndex An integer value that specifies the row's visible index. + */ + GetRowKey(visibleIndex: number): string; + /** + * Switches the grid to edit mode. + * @param visibleIndex A zero-based integer that identifies a data row to be edited. + */ + StartEditRow(visibleIndex: number): void; + /** + * Switches the grid to edit mode. + * @param key An object that uniquely identifies a data row to be edited. + */ + StartEditRowByKey(key: Object): void; + /** + * Indicates whether or not a new row is being edited. + */ + IsNewRowEditing(): boolean; + /** + * Adds a new record. + */ + AddNewRow(): void; + /** + * Deletes the specified row. + * @param visibleIndex An integer value that identifies the row. + */ + DeleteRow(visibleIndex: number): void; + /** + * Deletes a row with the specified key value. + * @param key An object that uniquely identifies the row. + */ + DeleteRowByKey(key: Object): void; + /** + * Returns the focused row's index. + */ + GetFocusedRowIndex(): number; + /** + * Moves focus to the specified row. + * @param visibleIndex An integer value that specifies the focused row's index. + */ + SetFocusedRowIndex(visibleIndex: number): void; + /** + * Selects all the unselected rows within the grid. + */ + SelectRows(): void; + /** + * Selects the specified row displayed within the grid. + * @param visibleIndex A zero-based integer value that specifies the row's visible index. + */ + SelectRows(visibleIndex: number): void; + /** + * Selects the specified rows within the grid. + * @param visibleIndices An array of zero-based indices that identify data rows within the grid. + */ + SelectRows(visibleIndices: number[]): void; + /** + * Selects or deselects the specified rows within the grid. + * @param visibleIndices An array of zero-based indices that identify data rows within the grid. + * @param selected true to select the specified rows; false to deselect the rows. + */ + SelectRows(visibleIndices: number[], selected: boolean): void; + /** + * Selects or deselects the specified row within the grid. + * @param visibleIndex An integer zero-based index that identifies the data row within the grid. + * @param selected true to select the specified row; false to deselect the row. + */ + SelectRows(visibleIndex: number, selected?: boolean): void; + /** + * Selects or deselects the specified rows displayed within the grid. + * @param keys An array of objects that uniquely identify the rows. + * @param selected true to select the specified rows; false to deselect the rows. + */ + SelectRowsByKey(keys: Object[], selected?: boolean): void; +} +/** + * A client grid column. + */ +interface ASPxClientGridViewColumn extends ASPxClientGridColumnBase { + /** + * Gets the column's unique identifier. + * Value: A string value that specifies the column's unique identifier. + */ + id: string; + /** + * Gets the name that uniquely identifies the column. + * Value: A string value assigned to the column's Name property. + */ + name: string; + /** + * Gets the column's position within the collection. + * Value: An integer zero-bazed index that specifies the column's position within the collection. + */ + index: number; + /** + * Gets the name of the database field assigned to the current column. + * Value: A string value that specifies the name of a data field. + */ + fieldName: string; + /** + * Gets whether the column is visible. + * Value: true to display the column; otherwise, false. + */ + visible: boolean; +} +/** + * Represents a JavaScript function which receives the list of row values when the client GetSelectedFieldValues method is called. + */ +interface ASPxClientGridViewValuesCallback { + /** + * Represents a JavaScript function which receives the list of row values when the client GetSelectedFieldValues method is called. + * @param result An object that represents the list of row values received from the server. + */ + (result: Object): void; +} +/** + * A method that will handle the cancelable events of a client ASPxGridView column. + */ +interface ASPxClientGridViewColumnCancelEventHandler { + /** + * A method that will handle the cancelable events of a client ASPxGridView column. + * @param source The event source. + * @param e An ASPxClientGridViewColumnCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewColumnCancelEventArgs): void; +} +/** + * Provides data for the cancelable events of a client ASPxGridView column. + */ +interface ASPxClientGridViewColumnCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed client column. + * Value: An ASPxClientGridViewColumn object that represents the processed column. + */ + column: ASPxClientGridViewColumn; +} +/** + * A method that will handle the client events concerned with column processing. + */ +interface ASPxClientGridViewColumnProcessingModeEventHandler { + /** + * A method that will handle the client events concerned with column processing. + * @param source The event source. + * @param e A ASPxClientGridViewColumnProcessingModeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewColumnProcessingModeEventArgs): void; +} +/** + * Provides data for the client events concerned with column processing, and that allow the event's processing to be passed to the server side. + */ +interface ASPxClientGridViewColumnProcessingModeEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets a grid column related to the event. + * Value: An ASPxClientGridViewColumn object representing the column related to the event. + */ + column: ASPxClientGridViewColumn; +} +/** + * A method that will handle the RowExpanding events. + */ +interface ASPxClientGridViewRowCancelEventHandler { + /** + * A method that will handle the RowExpanding events. + * @param source The event source. + * @param e An ASPxClientGridViewRowCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewRowCancelEventArgs): void; +} +/** + * Provides data for the RowExpanding events. + */ +interface ASPxClientGridViewRowCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed row's visible index. + * Value: An integer zero-based index that identifies the processed row. + */ + visibleIndex: number; +} +/** + * A method that will handle the SelectionChanged event. + */ +interface ASPxClientGridViewSelectionEventHandler { + /** + * A method that will handle the SelectionChanged event. + * @param source The event source. + * @param e An ASPxClientGridViewSelectionEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewSelectionEventArgs): void; +} +/** + * Provides data for the SelectionChanged event. + */ +interface ASPxClientGridViewSelectionEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the visible index of the row whose selected state has been changed. + * Value: An value that specifies the visible index of the row. + */ + visibleIndex: number; + /** + * Gets whether the row has been selected. + * Value: true if the row has been selected; otherwise, false. + */ + isSelected: boolean; + /** + * Gets whether all rows displayed within a page have been selected or unselected. + * Value: true if all rows displayed within a page have been selected or unselected; otherwise, false. + */ + isAllRecordsOnPage: boolean; + /** + * Gets whether a selection has been changed on the server. + * Value: true if a selection has been changed on the server; otherwise, false. + */ + isChangedOnServer: boolean; +} +/** + * A method that will handle the RowClick events. + */ +interface ASPxClientGridViewRowClickEventHandler { + /** + * A method that will handle the RowClick event. + * @param source The event source. This parameter identifies the ASPxClientGridView object that raised the event. + * @param e An ASPxClientGridViewRowClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewRowClickEventArgs): void; +} +/** + * Provides data for the RowClick event. + */ +interface ASPxClientGridViewRowClickEventArgs extends ASPxClientGridViewRowCancelEventArgs { + /** + * Provides access to the parameters associated with the RowClick event. + * Value: An object that contains parameters associated with the event. + */ + htmlEvent: Object; +} +/** + * A method that will handle the ContextMenu event. + */ +interface ASPxClientGridViewContextMenuEventHandler { + /** + * A method that will handle the ContextMenu event. + * @param source The event source. + * @param e An ASPxClientGridViewContextMenuEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewContextMenuEventArgs): void; +} +/** + * Provides data for the ContextMenu event. + */ +interface ASPxClientGridViewContextMenuEventArgs extends ASPxClientEventArgs { + /** + * Gets which grid element has been right clicked by the user. + * Value: A String value that specifies grid element. + */ + objectType: string; + /** + * Identifies the grid element being right clicked by the user. + * Value: A zero-based integer index that identifies the grid element being clicked by the user. + */ + index: number; + /** + * Provides access to the parameters associated with the ContextMenu event. + * Value: An object that contains parameters associated with the event. + */ + htmlEvent: Object; + /** + * Gets the currently processed menu object. + * Value: An object that is the currently processed menu. + */ + menu: Object; + /** + * Specifies whether a browser context menu should be displayed. + * Value: true, to display a browser context menu; otherwise, false. The default is false. + */ + showBrowserMenu: boolean; +} +/** + * A method that will handle the client ContextMenuItemClick event. + */ +interface ASPxClientGridViewContextMenuItemClickEventHandler { + /** + * A method that will handle the ContextMenuItemClick event. + * @param source The event source. + * @param e An ASPxClientGridViewContextMenuItemClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewContextMenuItemClickEventArgs): void; +} +/** + * Provides data for the ContextMenuItemClick event. + */ +interface ASPxClientGridViewContextMenuItemClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the clicked context menu item. + * Value: An object, manipulations on which forced the event to be raised. + */ + item: ASPxClientMenuItem; + /** + * Gets which grid element has been right clicked by the user. + * Value: A String value that specifies the grid element. + */ + objectType: string; + /** + * Returns the processed element index. + * Value: An integer value that specifies the processed element index. + */ + elementIndex: number; + /** + * Specifies whether a postback or a callback is used to finally process the event on the server side. + * Value: true to perform the round trip to the server side via postback; false to perform the round trip to the server side via callback. + */ + usePostBack: boolean; + /** + * Specifies whether default context menu item click is handled manually, so no default processing is required. + * Value: true if no default processing is required; otherwise false. + */ + handled: boolean; +} +/** + * A method that will handle the CustomButtonClick event. + */ +interface ASPxClientGridViewCustomButtonEventHandler { + /** + * A method that will handle the CustomButtonClick event. + * @param source The event source. This parameter identifies the ASPxClientGridView object that raised the event. + * @param e An ASPxClientGridViewCustomButtonEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewCustomButtonEventArgs): void; +} +/** + * Provides data for the CustomButtonClick event. + */ +interface ASPxClientGridViewCustomButtonEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the value which identifies the row whose custom button has been clicked. + * Value: An integer value that identifies the row whose custom button has been clicked. + */ + visibleIndex: number; + /** + * Gets the value which identifies the custom button. + * Value: A string value that identifies the clicked custom button. + */ + buttonID: string; +} +/** + * A method that will handle the ColumnMoving event. + */ +interface ASPxClientGridViewColumnMovingEventHandler { + /** + * A method that will handle the ColumnMoving event. + * @param source The event source. + * @param e An ASPxClientGridViewColumnMovingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewColumnMovingEventArgs): void; +} +/** + * Provides data for the ColumnMoving event. + */ +interface ASPxClientGridViewColumnMovingEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets whether a column is allowed to be moved. + * Value: true to allow column moving; otherwise, false. + */ + allow: boolean; + /** + * Gets the column currently being dragged by an end-user. + * Value: An ASPxClientGridViewColumn object that represents the column currently being dragged by an end-user. + */ + sourceColumn: ASPxClientGridViewColumn; + /** + * Gets the target column, before or after which the source column will be inserted (if dropped). + * Value: An ASPxClientGridViewColumn object that represents the target column. null (Nothing in Visual Basic) if the source column isn't over the column header panel. + */ + destinationColumn: ASPxClientGridViewColumn; + /** + * Gets whether the source column will be inserted before the target column (if dropped). + * Value: true if the source column will be inserted before the target column (if dropped); otherwise, false. + */ + isDropBefore: boolean; + /** + * Gets whether the source column is currently over the Group Panel. + * Value: true if the source column is currently over the Group Panel; otherwise, false. + */ + isGroupPanel: boolean; +} +/** + * Represents an object that will handle the client-side BatchEditConfirmShowing event. + */ +interface ASPxClientGridViewBatchEditConfirmShowingEventHandler { + /** + * A method that will handle the BatchEditConfirmShowing client event. + * @param source The event source. + * @param e An ASPxClientGridViewBatchEditConfirmShowingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditConfirmShowingEventArgs): void; +} +/** + * Provides data for the BatchEditConfirmShowing event. + */ +interface ASPxClientGridViewBatchEditConfirmShowingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the client identifier of an object that initiates a send request. + * Value: A string value that specifies the object client identifier. + */ + requestTriggerID: string; +} +/** + * A method that will handle the client BatchEditStartEditing event. + */ +interface ASPxClientGridViewBatchEditStartEditingEventHandler { + /** + * A method that will handle the BatchEditStartEditing event. + * @param source The event source. + * @param e An ASPxClientGridViewBatchEditStartEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditStartEditingEventArgs): void; +} +/** + * Provides data for the BatchEditStartEditing event. + */ +interface ASPxClientGridViewBatchEditStartEditingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the visible index of the row whose cells are about to be edited. + * Value: An value that specifies the visible index of the row. + */ + visibleIndex: number; + /** + * Gets the grid column that owns a cell that is about to be edited. + * Value: An object that is the focused grid column. + */ + focusedColumn: ASPxClientGridViewColumn; + /** + * Gets a hashtable that maintains information about editable cells. + * Value: A hashtable that stores information about editable cells. + */ + rowValues: Object; +} +/** + * A method that will handle the client BatchEditEndEditing event. + */ +interface ASPxClientGridViewBatchEditEndEditingEventHandler { + /** + * A method that will handle the BatchEditEndEditing event. + * @param source The event source. + * @param e An ASPxClientGridViewBatchEditEndEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditEndEditingEventArgs): void; +} +/** + * Provides data for the BatchEditEndEditing event. + */ +interface ASPxClientGridViewBatchEditEndEditingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the visible index of the row whose cells has been edited. + * Value: An value that specifies the visible index of the row. + */ + visibleIndex: number; + /** + * Gets a hashtable that maintains information about editable cells. + * Value: A hashtable that stores information about editable cells. + */ + rowValues: Object; +} +/** + * A method that will handle the client BatchEditRowValidating event. + */ +interface ASPxClientGridViewBatchEditRowValidatingEventHandler { + /** + * A method that will handle the BatchEditRowValidating event. + * @param source The event source. + * @param e An ASPxClientGridViewBatchEditRowValidatingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditRowValidatingEventArgs): void; +} +/** + * Provides data for the BatchEditRowValidating event. + */ +interface ASPxClientGridViewBatchEditRowValidatingEventArgs extends ASPxClientEventArgs { + /** + * Gets the processed row's visible index. + * Value: An integer value that specifies the processed row's visible index. + */ + visibleIndex: number; + /** + * Provides validation information of a row currently being validated. + * Value: An object that is a hashtable containing validation information. + */ + validationInfo: Object; +} +/** + * A method that will handle the client BatchEditTemplateCellFocused event. + */ +interface ASPxClientGridViewBatchEditTemplateCellFocusedEventHandler { + /** + * A method that will handle the BatchEditTemplateCellFocused event. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientGridViewBatchEditTemplateCellFocusedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditTemplateCellFocusedEventArgs): void; +} +/** + * Provides data for the BatchEditTemplateCellFocused event. + */ +interface ASPxClientGridViewBatchEditTemplateCellFocusedEventArgs extends ASPxClientEventArgs { + /** + * Gets the currently processed column. + * Value: A object that is the client-side column object. + */ + column: ASPxClientGridViewColumn; + /** + * Gets or sets a value specifying whether the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * A method that will handle the BatchEditChangesSaving event. + */ +interface ASPxClientGridViewBatchEditChangesSavingEventHandler { + /** + * A method that will handle the BatchEditChangesSaving event. + * @param source The event source. This parameter identifies the grid view object which raised the event. + * @param e An ASPxClientGridViewBatchEditChangesSavingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditChangesSavingEventArgs): void; +} +/** + * Provides data for the BatchEditChangesSaving event. + */ +interface ASPxClientGridViewBatchEditChangesSavingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets a hashtable that maintains information about inserted cells. + * Value: A hashtable that stores information about inserted cells. + */ + insertedValues: Object; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + deletedValues: Object; + /** + * Gets a hashtable that maintains information about updated cells. + * Value: A hashtable that stores information about updated cells. + */ + updatedValues: Object; +} +/** + * A method that will handle the BatchEditChangesCanceling event. + */ +interface ASPxClientGridViewBatchEditChangesCancelingEventHandler { + /** + * A method that will handle the BatchEditChangesCanceling event. + * @param source The event source. This parameter identifies the grid view object which raised the event. + * @param e An ASPxClientGridViewBatchEditChangesCancelingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditChangesCancelingEventArgs): void; +} +/** + * Provides data for the BatchEditChangesCanceling event. + */ +interface ASPxClientGridViewBatchEditChangesCancelingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets a hashtable that maintains information about inserted cells. + * Value: A hashtable that stores information about inserted cells. + */ + insertedValues: Object; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + deletedValues: Object; + /** + * Gets a hashtable that maintains information about updated cells. + * Value: A hashtable that stores information about updated cells. + */ + updatedValues: Object; +} +/** + * A method that will handle the BatchEditRowInserting event. + */ +interface ASPxClientGridViewBatchEditRowInsertingEventHandler { + /** + * A method that will handle the BatchEditRowInserting event. + * @param source The event source. This parameter identifies the card view object which raised the event. + * @param e An ASPxClientGridViewBatchEditRowInsertingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditRowInsertingEventArgs): void; +} +/** + * Provides data for the BatchEditRowInserting event. + */ +interface ASPxClientGridViewBatchEditRowInsertingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed row's visible index. + * Value: An integer value that specifies the processed row's visible index. + */ + visibleIndex: number; +} +/** + * A method that will handle the BatchEditRowDeleting event. + */ +interface ASPxClientGridViewBatchEditRowDeletingEventHandler { + /** + * A method that will handle the BatchEditRowDeleting event. + * @param source The event source. This parameter identifies the grid view object which raised the event. + * @param e An ASPxClientGridViewBatchEditRowDeletingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewBatchEditRowDeletingEventArgs): void; +} +/** + * Provides data for the BatchEditRowDeleting event. + */ +interface ASPxClientGridViewBatchEditRowDeletingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed row's visible index. + * Value: An integer value that specifies the processed row's visible index. + */ + visibleIndex: number; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + rowValues: Object; +} +/** + * A method that will handle the FocusedCellChanging event. + */ +interface ASPxClientGridViewFocusedCellChangingEventHandler { + /** + * A method that will handle the FocusedCellChanging event. + * @param source The event source. + * @param e An ASPxClientGridViewFocusedCellChangingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGridViewFocusedCellChangingEventArgs): void; +} +/** + * Provides data for the FocusedCellChanging event. + */ +interface ASPxClientGridViewFocusedCellChangingEventArgs extends ASPxClientCancelEventArgs { + /** + * Provides information on a cell currently being focused. + * Value: A ASPxClientGridViewCellInfo object that is the cell information. + */ + cellInfo: ASPxClientGridViewCellInfo; +} +/** + * Contains information on a grid cell. + */ +interface ASPxClientGridViewCellInfo { + /** + * Gets the visible index of the row that contains the cell currently being processed. + * Value: An value that specifies the visible index of the row. + */ + rowVisibleIndex: number; + /** + * Gets the data column that contains the cell currently being processed. + * Value: An object that is the data column which contains the processed cell. + */ + column: ASPxClientGridViewColumn; +} +/** + * Provides members related to Batch Edit Mode + */ +interface ASPxClientGridViewBatchEditApi { + /** + * Performs validation of grid data contained in all rows when the grid operates in Batch Edit mode. + * @param validateOnlyModified true, if only modified rows should be validated; otherwise, false. + */ + ValidateRows(validateOnlyModified?: boolean): boolean; + /** + * Performs validation of grid data contained in the specified row when the grid operates in Batch Edit mode. + * @param visibleIndex An integer value specifying the visible index of the validated row. + */ + ValidateRow(visibleIndex: number): boolean; + /** + * Returns an array of row visible indices. + * @param includeDeleted true, to include visible indices of deleted rows to the returned array; otherwise, false. + */ + GetRowVisibleIndices(includeDeleted: boolean): number[]; + /** + * Returns an array of the deleted row visible indices. + */ + GetDeletedRowIndices(): number[]; + /** + * Returns an array of the inserted row visible indices. + */ + GetInsertedRowIndices(): number[]; + /** + * Indicates if the row with specified visible index is deleted. + * @param visibleIndex An integer value that identifies the row by its visible index. + */ + IsDeletedRow(visibleIndex: number): boolean; + /** + * Indicates if the row with specified visible index is newly created. + * @param visibleIndex An integer value that identifies the row by its visible index. + */ + IsNewRow(visibleIndex: number): boolean; + /** + * Programmatically moves the focus to the previous cell in the row. + */ + MoveFocusBackward(): boolean; + /** + * Programmatically moves the focus to the next cell in the row. + */ + MoveFocusForward(): boolean; + /** + * Sets a value of the specified cell. + * @param visibleIndex An integer zero-based index that identifies the row containing the processed cell. + * @param columnFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param value An object that contains the new cell value. + */ + SetCellValue(visibleIndex: number, columnFieldNameOrId: string, value: Object): void; + /** + * Sets the value of the specified cell. + * @param visibleIndex An integer zero-based index that identifies the row containing the processed cell. + * @param columnFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param value An object that contains the new cell value. + * @param displayText A string value that specifies the cell display text. + * @param cancelCellHighlighting true to cancel highlighting of the modified cell, false to highlight the modified cell. + */ + SetCellValue(visibleIndex: number, columnFieldNameOrId: string, value: Object, displayText: string, cancelCellHighlighting?: boolean): void; + /** + * Gets the value of the specified cell. + * @param visibleIndex A zero-based integer value that specifies a visible index of a row containing the processed cell. + * @param columnFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param initial true, to return the initial (server) value; false, to return a value currently contained on the client side (modified value). + */ + GetCellValue(visibleIndex: number, columnFieldNameOrId: string, initial?: boolean): Object; + /** + * Gets a container holding a data cell content. + * @param visibleIndex An integer value that is the visible index. + * @param columnFieldNameOrId A string value that is the column's Field Name or ID. + */ + GetCellTextContainer(visibleIndex: number, columnFieldNameOrId: string): Object; + /** + * Gets information about the cell currently being edited. + */ + GetEditCellInfo(): ASPxClientGridViewCellInfo; + /** + * Returns a value that indicates whether the grid has changed data. + */ + HasChanges(): boolean; + /** + * Returns a value that indicates whether the specified row has changed data. + * @param visibleIndex An integer value that specifies the visible index of a row. + */ + HasChanges(visibleIndex: number): boolean; + /** + * Returns a value that indicates whether the specified data cell's data has been changed. + * @param visibleIndex An integer value that specifies the visible index of a row. + * @param columnFieldNameOrId A string value that identifies the column by the name of the data source field to which the column is bound, or by the column's name. + */ + HasChanges(visibleIndex: number, columnFieldNameOrId: string): boolean; + /** + * Resets changes in the specified row. + * @param visibleIndex An integer value that specifies the visible index of a row. + */ + ResetChanges(visibleIndex: number): void; + /** + * Resets changes in the specified cell. + * @param visibleIndex An integer value that specifies the visible index of a row containing the processed cell. + * @param columnIndex A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + */ + ResetChanges(visibleIndex: number, columnIndex: number): void; + /** + * Switches the specified cell to edit mode. + * @param visibleIndex A zero-based integer value that specifies the visible index of a row containing the processed cell. + * @param columnIndex A zero-based integer value that identifies the column which contains the processed cell in the column collection. + */ + StartEdit(visibleIndex: number, columnIndex: number): void; + /** + * Ends cell or row editing. + */ + EndEdit(): void; +} +/** + * A client-side equivalent of the ASPxVerticalGrid object. + */ +interface ASPxClientVerticalGrid extends ASPxClientGridBase { + /** + * Provides access to the batch editing client API. + * Value: A object that exposes the batch editing client API methods. + */ + batchEditApi: ASPxClientVerticalGridBatchEditApi; + /** + * Occurs when a custom command button has been clicked. + */ + CustomButtonClick: ASPxClientEvent>; + /** + * Fires after the selection has been changed. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Occurs when a grid switches to batch edit mode. + */ + BatchEditStartEditing: ASPxClientEvent>; + /** + * Occurs when a grid leaves the batch edit mode. + */ + BatchEditEndEditing: ASPxClientEvent>; + /** + * Enables you to prevent a batch edit confirmation message from being displayed. + */ + BatchEditConfirmShowing: ASPxClientEvent>; + /** + * Enables you to provide navigation for editors contained in a templated cell in Batch Edit mode. + */ + BatchEditTemplateCellFocused: ASPxClientEvent>; + /** + * Occurs on the client side before data changes are saved in batch edit mode. + */ + BatchEditChangesSaving: ASPxClientEvent>; + /** + * Occurs on the client side before data changes are canceled in batch edit mode. + */ + BatchEditChangesCanceling: ASPxClientEvent>; + /** + * Occurs on the client side before a record is inserted in batch edit mode. + */ + BatchEditRecordInserting: ASPxClientEvent>; + /** + * Occurs on the client side before a record is deleted in batch edit mode. + */ + BatchEditRecordDeleting: ASPxClientEvent>; + /** + * Enables you to specify whether record data is valid and provide an error text. + */ + BatchEditRecordValidating: ASPxClientEvent>; + /** + * Occurs on the client side when the focused cell is about to be changed. + */ + FocusedCellChanging: ASPxClientEvent>; + /** + * Enables you to prevent rows from being sorted. + */ + RowSorting: ASPxClientEvent>; + /** + * Fires on the client side before the expansion state of a row is changed by end-user interaction. + */ + RowExpandedChanging: ASPxClientEvent>; + /** + * Fires on the client side after a row's expansion state has been changed by end-user interaction. + */ + RowExpandedChanged: ASPxClientEvent>; + /** + * Fires on the client when a record is clicked. + */ + RecordClick: ASPxClientEvent>; + /** + * Fires on the client when a record is double clicked. + */ + RecordDblClick: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any unhandled server error occurs during server-side processing of a callback sent by the ASPxClientVerticalGrid. + */ + CallbackError: ASPxClientEvent>; + /** + * Sorts data by the specified data row's values. + * @param row An ASPxClientVerticalGridRow object that represents the data row. + */ + SortBy(row: ASPxClientVerticalGridRow): void; + /** + * Sorts data by the specified data row's values. + * @param rowIndex An integer value that specifies the row's position within the row collection. + */ + SortBy(rowIndex: number): void; + /** + * Sorts data by the specified data row's values. + * @param rowFieldNameOrId A string value that specifies the row's field name or unique identifier (the row's Name property value). + */ + SortBy(rowFieldNameOrId: string): void; + /** + * Sorts data by the specified data row's values. + * @param row An ASPxClientVerticalGridRow object that represents the data row. + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(row: ASPxClientVerticalGridRow, sortOrder: string): void; + /** + * Sorts data by the specified data row's values. + * @param rowIndex An integer value that specifies the row's position within the row collection. + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(rowIndex: number, sortOrder: string): void; + /** + * Sorts data by the specified data row's values. + * @param rowFieldNameOrId A string value that specifies the row's field name or unique identifier (the row's Name property value). + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + */ + SortBy(rowFieldNameOrId: string, sortOrder: string): void; + /** + * Sorts data by the specified data row's values. + * @param row An ASPxClientVerticalGridRow object that represents the data row. + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(row: ASPxClientVerticalGridRow, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data row's values. + * @param rowIndex An integer value that specifies the row's position within the row collection. + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true, to clear any previous sorting; otherwise, false. + */ + SortBy(rowIndex: number, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data row's values. + * @param rowFieldNameOrId A string value that specifies the row's field name or unique identifier (the row's Name property value). + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(rowFieldNameOrId: string, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data row's values, and places the row to the specified position among the sorted rows. + * @param row An ASPxClientGridViewColumn object that represents the data column. + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based row's index among the sorted rows. -1 if data is not sorted by this row. + */ + SortBy(row: ASPxClientVerticalGridRow, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Sorts data by the specified data row's values, and places the row to the specified position among the sorted rows. + * @param rowIndex An integer value that specifies the row's position within the row collection. + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex + */ + SortBy(rowIndex: number, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Sorts data by the specified data row's values, and places the row to the specified position among the sorted rows. + * @param rowFieldNameOrId A string value that specifies the column's field name or unique identifier (the column's Name property value). + * @param sortOrder A string value that specifies the row's sort order ('ASC', 'DSC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + * @param sortIndex An integer value that specifies the zero-based row's index among the sorted rows. -1 if data is not sorted by this row. + */ + SortBy(rowFieldNameOrId: string, sortOrder: string, reset: boolean, sortIndex: number): void; + /** + * Returns the key value of the specified data row (record in the vertical grid). + * @param visibleIndex An integer value that specifies the record's visible index. + */ + GetRecordKey(visibleIndex: number): string; + /** + * Adds a new record. + */ + AddNewRecord(): void; + /** + * Deletes the specified record. + * @param visibleIndex An integer value that identifies the record. + */ + DeleteRecord(visibleIndex: number): void; + /** + * Deletes a record with the specified key value. + * @param key An object that uniquely identifies the record. + */ + DeleteRecordByKey(key: Object): void; + /** + * Selects all the unselected records within the grid. + */ + SelectRecords(): void; + /** + * Selects the specified record displayed within the grid. + * @param visibleIndex A zero-based integer value that specifies the record's visible index. + */ + SelectRecords(visibleIndex: number): void; + /** + * Selects the specified rercords within the grid. + * @param visibleIndices An array of zero-based indices that identify records within the grid. + */ + SelectRecords(visibleIndices: number[]): void; + /** + * Selects or deselects the specified records within the grid. + * @param visibleIndices An array of zero-based indices that identify records within the grid. + * @param selected true to select the specified records; false to deselect the records. + */ + SelectRecords(visibleIndices: number[], selected: boolean): void; + /** + * Selects or deselects the specified record within the grid. + * @param visibleIndex An integer zero-based index that identifies the record within the grid. + * @param selected true to select the specified record; false to deselect the record. + */ + SelectRecords(visibleIndex: number, selected?: boolean): void; + /** + * Selects or deselects the specified records displayed within the grid. + * @param keys An array of objects that uniquely identify the records. + * @param selected true to select the specified records; false to deselect the records. + */ + SelectRecordsByKey(keys: Object[], selected?: boolean): void; + /** + * Selects or deselects the specified record displayed within the grid. + * @param key An object that uniquely identifies the record. + * @param selected true to select the specified record; false to deselect the record. + */ + SelectRecordsByKey(key: Object, selected?: boolean): void; + /** + * Selects the specified records displayed within the grid. + * @param keys An array of objects that uniquely identify the records. + */ + SelectRecordsByKey(keys: Object[]): void; + /** + * Selects a grid record by its key. + * @param key An object that uniquely identifies the record. + */ + SelectRecordsByKey(key: Object): void; + /** + * Deselects all the selected records within the grid. + */ + UnselectRecords(): void; + /** + * Deselects the specified records (if selected) within the grid. + * @param visibleIndices An array of zero-based indices that identify records within the grid. + */ + UnselectRecords(visibleIndices: number[]): void; + /** + * Deselects the specified record (if selected) within the grid. + * @param visibleIndex A zero-based integer value that specifies the record's visible index. + */ + UnselectRecords(visibleIndex: number): void; + /** + * Deselects the specified records displayed within the grid. + * @param keys An array of objects that uniquely identify the records. + */ + UnselectRecordsByKey(keys: Object[]): void; + /** + * Deselects the specified record displayed within the grid. + * @param key An object that uniquely identifies the record. + */ + UnselectRecordsByKey(key: Object): void; + /** + * Deselects all grid records that match the filter criteria currently applied to the grid. + */ + UnselectFilteredRecords(): void; + /** + * Selects the specified record displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the record's visible index. + */ + SelectRecordOnPage(visibleIndex: number): void; + /** + * Selects or deselects the specified record displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the record's visible index. + * @param selected true to select the specified record; false to deselect the record. + */ + SelectRecordOnPage(visibleIndex: number, selected?: boolean): void; + /** + * Deselects the specified record (if selected) displayed on the current page. + * @param visibleIndex A zero-based integer value that specifies the record's visible index. + */ + UnselectRecordOnPage(visibleIndex: number): void; + /** + * Selects all unselected records displayed on the current page. + */ + SelectAllRecordsOnPage(): void; + /** + * Allows you to select or deselect all records displayed on the current page based on the parameter passed. + * @param selected true to select all unselected records displayed on the current page; false to deselect all selected records on the page. + */ + SelectAllRecordsOnPage(selected: boolean): void; + /** + * Deselects all selected records displayed on the current page. + */ + UnselectAllRecordsOnPage(): void; + /** + * Returns the number of selected records. + */ + GetSelectedRecordCount(): number; + /** + * Indicates whether or not the specified record is selected within the current page. + * @param visibleIndex An integer value that identifies the record by its visible index. + */ + IsRecordSelectedOnPage(visibleIndex: number): boolean; + /** + * Returns the values of the specified data source fields within the specified record. + * @param visibleIndex An integer value that identifies the record. + * @param fieldNames The names of data source fields separated using a semicolon, whose values within the specified record are returned. + * @param onCallback An ASPxClientVerticalGridValuesCallback object that represents the JavaScript function which receives the list of record values as a parameter. + */ + GetRecordValues(visibleIndex: number, fieldNames: string, onCallback: ASPxClientVerticalGridValuesCallback): void; + /** + * Returns the record values displayed within the current page. + * @param fieldNames The names of data source fields whose values are returned. + * @param onCallback A ASPxClientVerticalGridValuesCallback object that represents the JavaScript function which receives the list of record values as a parameter. + */ + GetPageRecordValues(fieldNames: string, onCallback: ASPxClientVerticalGridValuesCallback): void; + /** + * Returns the number of records actually displayed within the active page. + */ + GetVisibleRecordsOnPage(): number; + /** + * Returns the number of rows within the client vertical grid. + */ + GetRowCount(): number; + /** + * Applies the specified search panel filter criterion to grid data. + * @param value A string value that specifies the filter criterion. + */ + ApplySearchPanelFilter(value: string): void; + /** + * Applies the specified filter expression to the ASPxVerticalGrid. + * @param filterExpression A string value that specifies the filter expression. + */ + ApplyFilter(filterExpression: string): void; + /** + * Clears the filter expression applied to a client vertical grid. + */ + ClearFilter(): void; + /** + * Sets input focus to the grid. + */ + Focus(): void; + /** + * 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. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing the specified argument to it. + * @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; + /** + * Selects the specified page. + * @param pageIndex An integer value that specifies the active page's index. + */ + GotoPage(pageIndex: number): void; + /** + * Gets the index of the page currently being selected. + */ + GetPageIndex(): number; + /** + * Gets the number of pages to which the grid's data is divided. + */ + GetPageCount(): number; + /** + * Activates the next page. + */ + NextPage(): void; + /** + * Activates the previous page. + */ + PrevPage(): void; + /** + * Returns the index of the first record displayed within the vertical grid's active page. + */ + GetTopVisibleIndex(): number; + /** + * Saves all the changes made and switches the grid to browse mode. + */ + UpdateEdit(): void; + /** + * Cancels all the changes made and switches the ASPxVerticalGrid to browse mode. + */ + CancelEdit(): void; + /** + * Updates data displayed within the grid. + */ + Refresh(): void; + /** + * Returns the record values displayed within all selected records. + * @param fieldNames The names of data source fields separated by a semicolon, whose values within the selected records are returned. + * @param onCallback A ASPxClientVerticalGridValuesCallback object that represents the JavaScript function which receives the list of record values as a parameter. + */ + GetSelectedFieldValues(fieldNames: string, onCallback: ASPxClientVerticalGridValuesCallback): void; + /** + * Returns key values of selected records displayed within the current page. + */ + GetSelectedKeysOnPage(): Object[]; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event. + * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientVerticalGridValuesCallback object that is the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(args: string, onCallback: ASPxClientVerticalGridValuesCallback): void; + /** + * Returns the editor used to edit the specified row's values. + * @param row An ASPxClientVerticalGridRowobject that specifies the required row within the client grid. + */ + GetEditor(row: ASPxClientVerticalGridRow): ASPxClientEdit; + /** + * Returns the editor used to edit the specified row's values. + * @param rowIndex An integer value that specifies the row's position within the rows collection. + */ + GetEditor(rowIndex: number): ASPxClientEdit; + /** + * Returns the editor used to edit the specified row's values. + * @param rowFieldNameOrId A string value that specifies the row's field name or unique identifier (the row's Name property value). + */ + GetEditor(rowFieldNameOrId: string): ASPxClientEdit; + /** + * Displays the Filter Control. + */ + ShowFilterControl(): void; + /** + * Hides the Filter Control. + */ + CloseFilterControl(): void; + /** + * Enables or disables the current filter. + * @param isFilterEnabled true to enable the current filter; otherwise, false. + */ + SetFilterEnabled(isFilterEnabled: boolean): void; + /** + * Returns the client row that resides at the specified position within the row collection. + * @param rowIndex A zero-based index that identifies the row within the row collection (the row's Index property value). + */ + GetRow(rowIndex: number): ASPxClientVerticalGridRow; + /** + * Returns the row with the specified unique identifier. + * @param rowId A string value that specifies the row's unique identifier (the row's Name property value). + */ + GetRowById(rowId: string): ASPxClientVerticalGridRow; + /** + * Returns the client row which is bound to the specified data source field. + * @param rowFieldName A string value that specifies the name of the data source field to which the row is bound (the row's fieldName property value). + */ + GetRowByField(rowFieldName: string): ASPxClientVerticalGridRow; + /** + * Returns the current vertical scroll position of the grid's content. + */ + GetVerticalScrollPosition(): number; + /** + * Returns the current horizontal scroll position of the grid's content. + */ + GetHorizontalScrollPosition(): number; + /** + * Specifies the vertical scroll position for the grid's content. + * @param position An integer value specifying the vertical scroll position. + */ + SetVerticalScrollPosition(position: number): void; + /** + * Specifies the horizontal scroll position for the grid's content. + * @param position An integer value specifying the horizontal scroll position. + */ + SetHorizontalScrollPosition(position: number): void; + /** + * Gets the value that specifies whether the required row is expanded. + * @param row An ASPxClientVerticalGridRowobject that specifies the row. + */ + GetRowExpanded(row: ASPxClientVerticalGridRow): boolean; + /** + * Gets the value that specifies whether the row with the specified index is expanded. + * @param rowIndex An integer value specifying the row's index. + */ + GetRowExpanded(rowIndex: number): boolean; + /** + * Gets the value that specifies whether the row with the specified field name or ID is expanded. + * @param rowFieldNameOrId A string value specifying the row's field name or ID. + */ + GetRowExpanded(rowFieldNameOrId: string): boolean; + /** + * Sets a value indicating whether the row is expanded. + * @param row An ASPxClientVerticalGridRowobject that specifies the required row within the client grid. + * @param value true, to expand the row; otherwise, false. + */ + SetRowExpanded(row: ASPxClientVerticalGridRow, value: boolean): void; + /** + * Sets a value indicating whether the row is expanded. + * @param rowIndex An integer value specifying the index of the row. + * @param value true, to expand the row; otherwise, false. + */ + SetRowExpanded(rowIndex: number, value: boolean): void; + /** + * Sets a value indicating whether the row is expanded. + * @param rowFieldNameOrId A string value that specifies the row's field name or unique identifier (the row's Name property value). + * @param value true, to expand the row; otherwise, false. + */ + SetRowExpanded(rowFieldNameOrId: string, value: boolean): void; +} +/** + * A client grid row. + */ +interface ASPxClientVerticalGridRow extends ASPxClientGridColumnBase { + /** + * Gets the name that uniquely identifies the row. + * Value: A string value assigned to the row's Name property. + */ + name: string; + /** + * Gets the row's position within the collection. + * Value: An integer zero-bazed index that specifies the row's position within the collection. + */ + index: number; + /** + * Gets the name of the database field assigned to the current row. + * Value: A string value that specifies the name of a data field. + */ + fieldName: string; + /** + * Gets whether the row is visible. + * Value: true, to display the row; otherwise, false. + */ + visible: boolean; +} +/** + * Represents a JavaScript function which receives the list of record values when the client GetSelectedFieldValues method is called. + */ +interface ASPxClientVerticalGridValuesCallback { + /** + * Represents a JavaScript function which receives the list of record values when the client GetSelectedFieldValues method is called. + * @param result An object that represents the list of record values received from the server. + */ + (result: Object): void; +} +/** + * A method that will handle the CustomButtonClick event. + */ +interface ASPxClientVerticalGridRowCancelEventHandler { + /** + * A method that will handle the cancelable events of a client ASPxVerticalGrid row. + * @param source The event source. + * @param e An ASPxClientVerticalGridRowCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridRowCancelEventArgs): void; +} +/** + * Provides data for the cancelable events of a client ASPxVerticalGrid row. + */ +interface ASPxClientVerticalGridRowCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed client row. + * Value: An ASPxClientVerticalGridRow object that represents the processed row. + */ + row: ASPxClientVerticalGridRow; +} +/** + * A method that will handle the RecordClick event. + */ +interface ASPxClientVerticalGridRecordClickEventHandler { + /** + * A method that will handle the RecordClick event. + * @param source The event source. This parameter identifies the ASPxClientVerticalGrid object that raised the event. + * @param e An ASPxClientVerticalGridRecordClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridRecordClickEventArgs): void; +} +/** + * Provides data for the RecordClick event. + */ +interface ASPxClientVerticalGridRecordClickEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed record's visible index. + * Value: An integer zero-based index that identifies the processed record. + */ + visibleIndex: number; + /** + * Provides access to the parameters associated with the RecordClick event. + * Value: An object that contains parameters associated with the event. + */ + htmlEvent: Object; +} +/** + * A method that will handle the CustomButtonClick event. + */ +interface ASPxClientVerticalGridCustomButtonEventHandler { + /** + * A method that will handle the CustomButtonClick event. + * @param source The event source. This parameter identifies the ASPxClientVerticalGrid object that raised the event. + * @param e An ASPxClientVerticalGridCustomButtonEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridCustomButtonEventArgs): void; +} +/** + * Provides data for the CustomButtonClick event. + */ +interface ASPxClientVerticalGridCustomButtonEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the value which identifies the record whose custom button has been clicked. + * Value: An integer value that identifies the record whose custom button has been clicked. + */ + visibleIndex: number; + /** + * Gets the value which identifies the custom button. + * Value: A string value that identifies the clicked custom button. + */ + buttonID: string; +} +/** + * A method that will handle the SelectionChanged event. + */ +interface ASPxClientVerticalGridSelectionEventHandler { + /** + * A method that will handle the SelectionChanged event. + * @param source The event source. + * @param e An ASPxClientVerticalGridSelectionEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridSelectionEventArgs): void; +} +/** + * Provides data for the SelectionChanged event. + */ +interface ASPxClientVerticalGridSelectionEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the visible index of the record whose selected state has been changed. + * Value: An value that specifies the visible index of the record. + */ + visibleIndex: number; + /** + * Gets whether the record has been selected. + * Value: true, if the record has been selected; otherwise, false. + */ + isSelected: boolean; + /** + * Gets whether all records displayed within a page have been selected or unselected. + * Value: true if all records displayed within a page have been selected or unselected; otherwise, false. + */ + isAllRecordsOnPage: boolean; + /** + * Gets whether a selection has been changed on the server. + * Value: true if a selection has been changed on the server; otherwise, false. + */ + isChangedOnServer: boolean; +} +/** + * A method that will handle the RowExpandedChanged event. + */ +interface ASPxClientVerticalGridRowExpandedEventHandler { + /** + * A method that will handle the RowExpandedChanged event. + * @param source The event source. + * @param e An ASPxClientVerticalGridRowExpandedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridRowExpandedEventArgs): void; +} +/** + * Provides data for the RowExpandedChanged event. + */ +interface ASPxClientVerticalGridRowExpandedEventArgs extends ASPxClientEventArgs { + /** + * Gets the expanded row. + * Value: An ASPxClientVerticalGridRow object that represents the expanded row. + */ + row: ASPxClientVerticalGridRow; +} +/** + * A method that will handle the RowExpandedChanging event. + */ +interface ASPxClientVerticalGridRowExpandingEventHandler { + /** + * A method that will handle the RowExpandedChanging event. + * @param source The event source. + * @param e An ASPxClientVerticalGridRowExpandedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridRowExpandingEventArgs): void; +} +/** + * Provides data for the RowExpandedChanging event. + */ +interface ASPxClientVerticalGridRowExpandingEventArgs extends ASPxClientVerticalGridRowExpandedEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true, if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * Represents an object that will handle the client-side BatchEditStartEditing event. + */ +interface ASPxClientVerticalGridBatchEditStartEditingEventHandler { + /** + * A method that will handle the BatchEditStartEditing event. + * @param source The event source. + * @param e An ASPxClientVerticalGridBatchEditStartEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditStartEditingEventArgs): void; +} +/** + * Provides data for the BatchEditStartEditing event. + */ +interface ASPxClientVerticalGridBatchEditStartEditingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the visible index of the record whose cells are about to be edited. + * Value: An value that specifies the visible index of the record. + */ + visibleIndex: number; + /** + * Gets the grid row that owns a cell that is about to be edited. + * Value: An object that is the focused grid row. + */ + focusedRow: ASPxClientVerticalGridRow; + /** + * Gets a hashtable that maintains information about editable cells. + * Value: A hashtable that stores information about editable cells. + */ + recordValues: Object; +} +/** + * Represents an object that will handle the client-side BatchEditEndEditing event. + */ +interface ASPxClientVerticalGridBatchEditEndEditingEventHandler { + /** + * A method that will handle the BatchEditEndEditing event. + * @param source The event source. + * @param e An ASPxClientVerticalGridBatchEditEndEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditEndEditingEventArgs): void; +} +/** + * Provides data for the BatchEditEndEditing event. + */ +interface ASPxClientVerticalGridBatchEditEndEditingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the visible index of the record whose cells have been edited. + * Value: An value that specifies the visible index of the record. + */ + visibleIndex: number; + /** + * Gets a hashtable that maintains information about editable cells. + * Value: Gets a hashtable that maintains information about editable cells. + */ + recordValues: Object; +} +/** + * Represents an object that will handle the client-side BatchEditRecordValidating event. + */ +interface ASPxClientVerticalGridBatchEditRecordValidatingEventHandler { + /** + * A method that will handle the BatchEditRecordValidating event. + * @param source The event source. + * @param e An ASPxClientVerticalGridBatchEditRecordValidatingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditRecordValidatingEventArgs): void; +} +/** + * Provides data for the BatchEditRecordValidating event. + */ +interface ASPxClientVerticalGridBatchEditRecordValidatingEventArgs extends ASPxClientEventArgs { + /** + * Gets the processed record's visible index. + * Value: An integer value that specifies the processed record's visible index. + */ + visibleIndex: number; + /** + * Provides validation information on the record currently being validated. + * Value: An object that is a hashtable containing validation information. + */ + validationInfo: Object; +} +/** + * Represents an object that will handle the client-side BatchEditConfirmShowing event. + */ +interface ASPxClientVerticalGridBatchEditConfirmShowingEventHandler { + /** + * A method that will handle the BatchEditConfirmShowing client event. + * @param source The event source. + * @param e An ASPxClientVerticalGridBatchEditConfirmShowingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditConfirmShowingEventArgs): void; +} +/** + * Provides data for the BatchEditConfirmShowing event. + */ +interface ASPxClientVerticalGridBatchEditConfirmShowingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the client identifier of an object that initiates a send request. + * Value: A string value that specifies the object client identifier. + */ + requestTriggerID: string; +} +/** + * Represents an object that will handle the client-side BatchEditTemplateCellFocused event. + */ +interface ASPxClientVerticalGridBatchEditTemplateCellFocusedEventHandler { + /** + * A method that will handle the BatchEditTemplateCellFocused event. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientVerticalGridBatchEditTemplateCellFocusedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditTemplateCellFocusedEventArgs): void; +} +/** + * Provides data for the BatchEditTemplateCellFocused event. + */ +interface ASPxClientVerticalGridBatchEditTemplateCellFocusedEventArgs extends ASPxClientEventArgs { + /** + * Gets the currently processed row. + * Value: A object that is the client-side row object. + */ + row: ASPxClientVerticalGridRow; + /** + * Gets or sets a value specifying whether the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * Represents an object that will handle the client-side BatchEditChangesSaving event. + */ +interface ASPxClientVerticalGridBatchEditChangesSavingEventHandler { + /** + * A method that will handle the BatchEditChangesSaving event. + * @param source The event source. This parameter identifies the vertical grid object which raised the event. + * @param e An ASPxClientVerticalGridBatchEditChangesSavingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditChangesSavingEventArgs): void; +} +/** + * Provides data for the BatchEditChangesSaving event. + */ +interface ASPxClientVerticalGridBatchEditChangesSavingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets a hashtable that maintains information about inserted cells. + * Value: A hashtable that stores information about inserted cells. + */ + insertedValues: Object; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + deletedValues: Object; + /** + * Gets a hashtable that maintains information about updated cells. + * Value: A hashtable that stores information about updated cells. + */ + updatedValues: Object; +} +/** + * Represents an object that will handle the client-side BatchEditChangesCanceling event. + */ +interface ASPxClientVerticalGridBatchEditChangesCancelingEventHandler { + /** + * A method that will handle the BatchEditChangesCanceling event. + * @param source The event source. This parameter identifies the vertical grid object which raised the event. + * @param e An ASPxClientVerticalGridBatchEditChangesCancelingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditChangesCancelingEventArgs): void; +} +/** + * Provides data for the BatchEditChangesCanceling event. + */ +interface ASPxClientVerticalGridBatchEditChangesCancelingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets a hashtable that maintains information about inserted cells. + * Value: A hashtable that stores information about inserted cells. + */ + insertedValues: Object; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + deletedValues: Object; + /** + * Gets a hashtable that maintains information about updated cells. + * Value: A hashtable that stores information about updated cells. + */ + updatedValues: Object; +} +/** + * Represents an object that will handle the client-side BatchEditRecordInserting event. + */ +interface ASPxClientVerticalGridBatchEditRecordInsertingEventHandler { + /** + * A method that will handle the BatchEditRecordInserting event. + * @param source The event source. This parameter identifies the vertical grid object which raised the event. + * @param e An ASPxClientVerticalGridBatchEditRecordInsertingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditRecordInsertingEventArgs): void; +} +/** + * Provides data for the BatchEditRecordInserting event. + */ +interface ASPxClientVerticalGridBatchEditRecordInsertingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed record's visible index. + * Value: An integer value that specifies the processed record's visible index. + */ + visibleIndex: number; +} +/** + * Represents an object that will handle the client-side BatchEditRecordDeleting event. + */ +interface ASPxClientVerticalGridBatchEditRecordDeletingEventHandler { + /** + * A method that will handle the BatchEditRecordDeleting event. + * @param source The event source. This parameter identifies the vertical grid object which raised the event. + * @param e An ASPxClientVerticalGridBatchEditRecordDeletingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridBatchEditRecordDeletingEventArgs): void; +} +/** + * Provides data for the BatchEditRecordDeleting event. + */ +interface ASPxClientVerticalGridBatchEditRecordDeletingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed record's visible index. + * Value: An integer value that specifies the processed record's visible index. + */ + visibleIndex: number; + /** + * Gets a hashtable that maintains information about deleted cells. + * Value: A hashtable that stores information about deleted cells. + */ + recordValues: Object; +} +/** + * A method that will handle the FocusedCellChanging event. + */ +interface ASPxClientVerticalGridFocusedCellChangingEventHandler { + /** + * A method that will handle the FocusedCellChanging event. + * @param source The event source. + * @param e An ASPxClientVerticalGridFocusedCellChangingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientVerticalGridFocusedCellChangingEventArgs): void; +} +/** + * Provides data for the FocusedCellChanging event. + */ +interface ASPxClientVerticalGridFocusedCellChangingEventArgs extends ASPxClientCancelEventArgs { + /** + * Provides information on a cell currently being focused. + * Value: A ASPxClientVerticalGridCellInfo object that is the cell information. + */ + cellInfo: ASPxClientVerticalGridCellInfo; +} +/** + * Contains information on a cell that is being edited. + */ +interface ASPxClientVerticalGridCellInfo { + /** + * Gets the row that contains the cell currently being processed. + * Value: An object that is the row which contains the processed cell. + */ + row: ASPxClientVerticalGridRow; + /** + * Gets the visible index of the record that contains the cell currently being processed. + * Value: An value that specifies the visible index of the record. + */ + recordVisibleIndex: number; +} +/** + * Provides members related to Batch Edit Mode + */ +interface ASPxClientVerticalGridBatchEditApi { + /** + * Performs validation of grid data contained in all records when the grid operates in batch edit mode. + * @param validateOnlyModified true, if only modified records should be validated; otherwise, false. + */ + ValidateRecords(validateOnlyModified?: boolean): boolean; + /** + * Performs validation of grid data contained in the specified record when the grid operates in batch edit mode. + * @param visibleIndex An integer value specifying the visible index of the validated record. + */ + ValidateRecord(visibleIndex: number): boolean; + /** + * Returns an array of record visible indices. + * @param includeDeleted true, to include visible indices of deleted records to the returned array; otherwise, false. + */ + GetRecordVisibleIndices(includeDeleted: boolean): number[]; + /** + * Returns an array of the deleted record visible indices. + */ + GetDeletedRecordIndices(): number[]; + /** + * Returns an array of the inserted record visible indices. + */ + GetInsertedRecordIndices(): number[]; + /** + * Indicates if the record with the specified visible index is deleted. + * @param visibleIndex An integer value that identifies the record by its visible index. + */ + IsDeletedRecord(visibleIndex: number): boolean; + /** + * Indicates if the record with specified visible index is newly created. + * @param visibleIndex An integer value that identifies the record by its visible index. + */ + IsNewRecord(visibleIndex: number): boolean; + /** + * Programmatically moves the focus to the previous cell in the record. + */ + MoveFocusBackward(): boolean; + /** + * Programmatically moves the focus to the next cell in the record. + */ + MoveFocusForward(): boolean; + /** + * Sets a value of the specified cell. + * @param visibleIndex An integer zero-based index that identifies the record containing the processed cell. + * @param rowFieldNameOrId A string value that specifies the field name or unique identifier (the row's Name property value) of a row containing the processed cell. + * @param value An object that contains the new cell value. + */ + SetCellValue(visibleIndex: number, rowFieldNameOrId: string, value: Object): void; + /** + * Sets the value of the specified cell. + * @param visibleIndex An integer zero-based index that identifies the row containing the processed cell. + * @param rowFieldNameOrId A string value that specifies the field name or unique identifier (the column's Name property value) of a column containing the processed cell. + * @param value An object that contains the new cell value. + * @param displayText A string value that specifies the cell display text. + * @param cancelCellHighlighting true to cancel highlighting of the modified cell, false to highlight the modified cell. + */ + SetCellValue(visibleIndex: number, rowFieldNameOrId: string, value: Object, displayText: string, cancelCellHighlighting?: boolean): void; + /** + * Gets the value of the specified cell. + * @param visibleIndex A zero-based integer value that specifies a visible index of a record containing the processed cell. + * @param rowFieldNameOrId A string value that specifies the field name or unique identifier (the row's Name property value) of a row containing the processed cell. + * @param initial true, to return the initial (server) value; false, to return a value currently contained on the client side (modified value). + */ + GetCellValue(visibleIndex: number, rowFieldNameOrId: string, initial?: boolean): Object; + /** + * Gets a container holding the data cell content. + * @param visibleIndex An integer value that is the visible index. + * @param columnFieldNameOrId A string value that is the column's Field Name or ID. + */ + GetCellTextContainer(visibleIndex: number, columnFieldNameOrId: string): Object; + /** + * Gets information about the cell currently being edited. + */ + GetEditCellInfo(): ASPxClientVerticalGridCellInfo; + /** + * Returns a value that indicates whether the vertical grid has changed data. + */ + HasChanges(): boolean; + /** + * Returns a value that indicates whether the specified record has changed data. + * @param visibleIndex An integer value that specifies the visible index of a record. + */ + HasChanges(visibleIndex: number): boolean; + /** + * Returns a value that indicates whether the specified data cell's data has been changed. + * @param visibleIndex An integer value that specifies the visible index of a record. + * @param rowFieldNameOrId A string value that identifies the row by the name of the data source field to which the row is bound, or by the row's name. + */ + HasChanges(visibleIndex: number, rowFieldNameOrId: string): boolean; + /** + * Resets changes in the specified record. + * @param visibleIndex An integer value that specifies the visible index of a record. + */ + ResetChanges(visibleIndex: number): void; + /** + * Resets changes in the specified cell. + * @param visibleIndex An integer value that specifies the visible index of a record containing the processed cell. + * @param rowIndex A string value that specifies the field name or unique identifier (the row's Name property value) of a row containing the processed cell. + */ + ResetChanges(visibleIndex: number, rowIndex: number): void; + /** + * Switches the specified cell to batch edit mode. + * @param visibleIndex A zero-based integer value that specifies the visible index of a record containing the processed cell. + * @param rowIndex A zero-based integer value that identifies the row which contains the processed cell in the rows collection. + */ + StartEdit(visibleIndex: number, rowIndex: number): void; + /** + * Ends the cell(s) editing. + */ + EndEdit(): void; +} +/** + * Contains style settings related to media elements in ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorCommandStyleSettings { + /** + * Gets or sets a media element's CSS class name. + * Value: A string that specifies a class name. + */ + className: string; + /** + * Gets or sets an element's width. + * Value: A string that specifies an element's width in any correct format. + */ + width: string; + /** + * Gets or sets an element's height. + * Value: A string that specifies an element's height in any correct format. + */ + height: string; + /** + * Gets or sets a media element's border width. + * Value: A string that specifies a border width in any correct format. + */ + borderWidth: string; + /** + * Gets or sets a media element's border color. + * Value: A string that specifies a border color in any correct format. + */ + borderColor: string; + /** + * Gets or sets a media element's border style. + * Value: A string that specifies a border style in any correct format. + */ + borderStyle: string; + /** + * Gets or sets an element's top margin. + * Value: A string that specifies an element's top margin in any correct format. + */ + marginTop: string; + /** + * Gets or sets an element's right margin. + * Value: A string that specifies an element's right margin in any correct format. + */ + marginRight: string; + /** + * Gets or sets an element's bottom margin. + * Value: A string that specifies an element's bottom margin in any correct format. + */ + marginBottom: string; + /** + * Gets or sets an element's left margin. + * Value: A string that specifies an element's left margin in any correct format. + */ + marginLeft: string; + /** + * Gets or sets a media element's background color. + * Value: A string that specifies a background color in any correct format. + */ + backgroundColor: string; + /** + * Gets or sets the element's text alignment. + * Value: A string value that specifies the element's text alignment in any correct format. + */ + textAlign: string; + /** + * Gets or sets the element's vertical alignment. + * Value: A string value that specifies the element's vertical alignment in any correct format. + */ + verticalAlign: string; +} +/** + * The base class for parameters used in the ASPxHtmlEditor's client-side commands. + */ +interface ASPxClientHtmlEditorCommandArguments { + /** + * Gets the currently selected element in the ASPxHtmlEditor. + * Value: An HTML object which is the currently selected element. + */ + selectedElement: Object; +} +/** + * Contains settings related to the INSERTIMAGE_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertImageCommandArguments extends ASPxClientHtmlEditorCommandArguments { + /** + * Specifies the source of the target image. + * Value: A string specifying the source of the target image. + */ + src: string; + /** + * Creates an alternate text for the target image. + * Value: A string that specifies an alternate text for the target image. + */ + alt: string; + /** + * Determines if the target image is wrapped with text. + * Value: true, if the target image is wrapped with text; otherwise, false. + */ + useFloat: boolean; + /** + * Determines the position of the target image. + * Value: A string value defining the position of the target image. + */ + align: string; + /** + * Contains the style settings specifying the appearance of the target image. + * Value: An object that contains the style settings specifying the appearance of the target image. + */ + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; +} +/** + * Contains settings related to the CHANGEIMAGE_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorChangeImageCommandArguments extends ASPxClientHtmlEditorInsertImageCommandArguments { +} +/** + * Contains settings related to the INSERTLINK_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertLinkCommandArguments extends ASPxClientHtmlEditorCommandArguments { + /** + * Specifies the url of the page the target link goes to. + * Value: A string value specifying the target link url. + */ + url: string; + /** + * Specifiies the text of the target link. + * Value: A string value specifying the text of the target link. + */ + text: string; + /** + * Determines where to open the target link. + * Value: A string that specifies where to open the target link in any correct format. + */ + target: string; + /** + * Defines the title of the target link. + * Value: A string value defining the title of the target link. + */ + title: string; + /** + * Contains the style settings defining the appearance of the target link element. + * Value: An object that contains the style settings defining the appearance of the target link element. + */ + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; +} +/** + * The base class for parameters related to inserting or changing media elements in the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorChangeMediaElementCommandArguments extends ASPxClientHtmlEditorCommandArguments { + /** + * Defines the HTML "id" attribute of the target media element. + * Value: A string value which is a unique identifier for the element. + */ + id: string; + /** + * Defines the source of the target media element. + * Value: A string defining the source of the target media element. + */ + src: string; + /** + * Determines the position of the target media element. + * Value: A string value indicating the position of the target media element. + */ + align: string; + /** + * Contains the style settings defining the appearance of the target media element. + * Value: An object that contains the style settings defining the appearance of the target media element. + */ + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; + /** + * Returns the name of the client-side command corresponding to the parameter. + */ + GetCommandName(): string; +} +/** + * The base class for parameters related to inserting or changing HTML5 media elements (Audio and Video) in the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorChangeHtml5MediaElementCommandArguments extends ASPxClientHtmlEditorChangeMediaElementCommandArguments { + /** + * Determines if a media file will start playing automatically. + * Value: true, if autoplay is enabled; otherwise, false. + */ + autoPlay: boolean; + /** + * Determines if a media file repeats indefinitely, or stops when it reaches the last frame. + * Value: true, to loop playback; otherwise, false. + */ + loop: boolean; + /** + * Determines if the media player controls should be displayed. + * Value: true, if media player controls are displayed; otherwise, false. + */ + showPlayerControls: boolean; + /** + * Determines how a media file should be loaded when the page loads. + * Value: One of the ASPxClientHtmlEditorMediaPreloadMode enumeration values. + */ + preloadMode: string; +} +/** + * Contains settings related to the INSERTAUDIO_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertAudioCommandArguments extends ASPxClientHtmlEditorChangeHtml5MediaElementCommandArguments { +} +/** + * Contains settings related to the CHANGEAUDIO_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorChangeAudioCommandArguments extends ASPxClientHtmlEditorInsertAudioCommandArguments { +} +/** + * Contains settings related to the INSERTVIDEO_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertVideoCommandArguments extends ASPxClientHtmlEditorChangeHtml5MediaElementCommandArguments { + /** + * Defines the URL of an image that is shown while the video file is downloading, or until an end-user clicks the play button. + * Value: A string value that specifies the poster image URL. + */ + posterUrl: string; +} +/** + * Contains settings related to the CHANGEVIDEO_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorChangeVideoCommandArguments extends ASPxClientHtmlEditorInsertVideoCommandArguments { +} +/** + * Contains settings related to the INSERTFLASH_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertFlashCommandArguments extends ASPxClientHtmlEditorChangeMediaElementCommandArguments { + /** + * Determines if the target flash element will start playing automatically. + * Value: true, if autoplay is enabled; otherwise, false. + */ + autoPlay: boolean; + /** + * Defines if the target flash element repeats indefinitely, or stops when it reaches the last frame. + * Value: true, to loop playback; otherwise, false. + */ + loop: boolean; + /** + * Determines if the flash related items are displayed in the context menu of the target flash element. + * Value: true, if the specific context menu items are displayed; otherwise, false + */ + enableFlashMenu: boolean; + /** + * Determines if the target flash element can be displayed in the fullscreen mode. + * Value: true, if the fullscreen mode is allowed; otherwise, false. + */ + allowFullscreen: boolean; + /** + * Defines the rendering quality level used for the target flash element. + * Value: A string value that specifies the target flash element rendering quality. + */ + quality: string; +} +/** + * Contains settings related to the CHANGEFLASH_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorChangeFlashCommandArguments extends ASPxClientHtmlEditorInsertFlashCommandArguments { +} +/** + * Contains settings related to the INSERTYOUTUBEVIDEO_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments extends ASPxClientHtmlEditorChangeMediaElementCommandArguments { + /** + * Determines if suggested videos are shown after the target YouTube video finishes. + * Value: true, to show suggested videos; otherwise, false + */ + showRelatedVideos: boolean; + /** + * Determines if the target YouTube video title and player actions (Watch later, Share) are shown. + * Value: true, to display the title and player actions; otherwise, false. + */ + showVideoInfo: boolean; + /** + * Determines if the privacy-enhanced mode is enabled for the target YouTube video. + * Value: true, if the privace-enhanced mode is enabled; otherwise, false + */ + enablePrivacyEnhancedMode: boolean; + /** + * Determines if the player controls are displayed for the target YouTube video. + * Value: true, if the player controls are displayed; otherwise, false. + */ + showPlayerControls: boolean; +} +/** + * Contains settings related to the CHANGEYOUTUBEVIDEO_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorChangeYouTubeVideoCommandArguments extends ASPxClientHtmlEditorInsertYouTubeVideoCommandArguments { +} +/** + * Contains settings related to the TABLEPROPERTIES_DIALOG_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorTablePropertiesCommandArguments extends ASPxClientHtmlEditorCommandArguments { + /** + * Contains the style settings defining the appearance of the target table element. + * Value: An object that contains the style settings defining the appearance of the target table element. + */ + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; + /** + * Determines the position of the target table element. + * Value: A string value indicating the position of the target table element. + */ + align: string; + /** + * Gets or sets a table cell padding. + * Value: An integer value that is the cell padding. + */ + cellPadding: number; + /** + * Gets or sets the table cell spacing. + * Value: An integer value that is the table cell spacing. + */ + cellSpacing: number; + /** + * Gets or sets a value that is the table caption. + * Value: A string value that is the caption. + */ + caption: string; + /** + * Gets or sets a value indicating whether the first row/column serves as the table's header. + * Value: A string value that specifies whether the first row/column serves as the table's header. + */ + headers: string; + /** + * Gets or sets the table's summary. + * Value: A string value that is the table's summary. + */ + summary: string; +} +/** + * Contains settings related to the INSERTTABLE_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorInsertTableCommandArguments extends ASPxClientHtmlEditorTablePropertiesCommandArguments { + /** + * Gets or sets the count of columns in the table. + * Value: An integer value that is the count of columns. + */ + columns: number; + /** + * Gets or sets the count of rows in the table. + * Value: An integer value that is the count of rows. + */ + rows: number; + /** + * Gets or sets a value indicating whether all table columns should have equal width. + * Value: true, to create equal widths for all columns; otherwise, false. + */ + isEqualColumnWidth: boolean; +} +/** + * Contains settings related to the TABLECELLPROPERTIES_DIALOG_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorTableCellPropertiesCommandArguments extends ASPxClientHtmlEditorCommandArguments { + /** + * Contains the style settings defining the appearance of the target cell element. + * Value: An object that contains the style settings defining the appearance of the target cell element. + */ + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; + /** + * Gets or sets a value that indicates whether the cell settings should be applied to all cells in the table. + * Value: true, if the cell settings should be applied to all cells in the table; otherwise, false. + */ + applyForAll: boolean; +} +/** + * Contains settings related to the TABLEROWPROPERTIES_DIALOG_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorTableRowPropertiesCommandArguments extends ASPxClientHtmlEditorCommandArguments { + /** + * Contains the style settings specifying the appearance of the specified table row. + * Value: An object that contains the style settings specifying the appearance of the specified table row. + */ + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; +} +/** + * Contains settings related to the TABLECOLUMNPROPERTIES_DIALOG_COMMAND command parameter. + */ +interface ASPxClientHtmlEditorTableColumnPropertiesCommandArguments extends ASPxClientHtmlEditorCommandArguments { + /** + * Contains the style settings defining the appearance of the target column element. + * Value: An object that contains the style settings defining the appearance of the target column element. + */ + styleSettings: ASPxClientHtmlEditorCommandStyleSettings; +} +/** + * A method that will handle the DialogInitialized client event. + */ +interface ASPxClientHtmlEditorDialogInitializedEventHandler { + /** + * A method that will handle the client DialogInitialized event. + * @param source An object representing the event's source. + * @param e An ASPxClientHtmlEditorDialogInitializedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorDialogInitializedEventArgs): void; +} +/** + * Provides data for the DialogInitialized client event. + */ +interface ASPxClientHtmlEditorDialogInitializedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the dialog that has been initialized. + * Value: A string value that is the name of the initialized dialog. + */ + dialogName: string; + /** + * Gets a dialog object related to the event. + * Value: A ASPxClientHtmlEditorDialogBase object that is the dialog. + */ + dialog: ASPxClientHtmlEditorDialogBase; +} +/** + * Provides data for the event that fires when the HTML Editor dialogs are closed or are going to be closed. + */ +interface ASPxClientHtmlEditorDialogCloseEventArgs extends ASPxClientEventArgs { + /** + * Gets the dialog name related to the event. + * Value: A string value that is the dialog name. + */ + dialogName: string; + /** + * Gets the dialog object related to the event. + * Value: An ASPxClientHtmlEditorDialogBase object that is the dialog. + */ + dialog: ASPxClientHtmlEditorDialogBase; + /** + * Gets a string that contains specific information (if any) passed from the client side for server-side processing. + * Value: A string value representing specific information passed from the client to the server side. + */ + parameter: Object; +} +/** + * A method that will handle the DialogClosing event. + */ +interface ASPxClientHtmlEditorDialogClosingEventHandler { + /** + * A method that will handle the DialogClosing event. + * @param source The event source. + * @param e An ASPxClientHtmlEditorDialogClosingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorDialogClosingEventArgs): void; +} +/** + * Provides data for the DialogClosing event. + */ +interface ASPxClientHtmlEditorDialogClosingEventArgs extends ASPxClientHtmlEditorDialogCloseEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true, if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the DialogClosed event. + */ +interface ASPxClientHtmlEditorDialogClosedEventHandler { + /** + * A method that will handle the DialogClosed event. + * @param source The event source. + * @param e An ASPxClientHtmlEditorDialogClosedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorDialogClosedEventArgs): void; +} +/** + * Provides data for the DialogClosed event. + */ +interface ASPxClientHtmlEditorDialogClosedEventArgs extends ASPxClientHtmlEditorDialogCloseEventArgs { +} +/** + * A method that will handle the CommandExecuting event. + */ +interface ASPxClientHtmlEditorCommandExecutingEventHandler { + /** + * A method that will handle the client CommandExecuted event. + * @param source The event's source. + * @param e An ASPxClientHtmlEditorCommandExecutingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorCommandExecutingEventArgs): void; +} +/** + * Provides data for the CommandExecuting event. + */ +interface ASPxClientHtmlEditorCommandExecutingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value specifying the processed command's name. + */ + commandName: string; + /** + * Gets an optional parameter that complements the processed command. + * Value: An object containing additional information about the processed command. + */ + parameter: Object; +} +/** + * A method that will handle the client events related to command processing. + */ +interface ASPxClientHtmlEditorCommandEventHandler { + /** + * A method that will handle the corresponding client event. + * @param source The event source. This parameter identifies the editor which raised the event. + * @param e An ASPxClientHtmlEditorCommandEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorCommandEventArgs): void; +} +/** + * Provides data for client events that relate to command processing (CustomCommand). + */ +interface ASPxClientHtmlEditorCommandEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value representing the processed command's name. + */ + commandName: string; + /** + * Gets an optional parameter that complements the processed command. + * Value: A string value containing additional information about the processed command. + */ + parameter: Object; +} +/** + * A method that will handle the client events that relate to custom dialog operations. + */ +interface ASPxClientHtmlEditorCustomDialogEventHandler { + /** + * A method that will handle the client CustomDialogOpened event. + * @param source An object representing the event's source. + * @param e An ASPxClientHtmlEditorCustomDialogEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorCustomDialogEventArgs): void; +} +/** + * Provides data for client events that relate to custom dialog operations. + */ +interface ASPxClientHtmlEditorCustomDialogEventArgs extends ASPxClientEventArgs { + /** + * Gets the name that uniquely identifies the processed custom dialog. + * Value: A string value that represents the value assigned to the processed custom dialog's Name property. + */ + name: string; +} +/** + * Provides data for client events that relate to closing a custom dialog. + */ +interface ASPxClientHtmlEditorCustomDialogCloseEventArgsBase extends ASPxClientHtmlEditorCustomDialogEventArgs { + /** + * Gets the status of the closed custom dialog. + * Value: An object representing a custom dialog's closing status. By default, it's the "cancel" string if the dialog operation is canceled, or the "ok" string if a dialog is closed by submitting a file. You can also provide your custom status, if your dialog contains additional buttons. + */ + status: Object; +} +/** + * A method that will handle the CustomDialogClosing client event. + */ +interface ASPxClientHtmlEditorCustomDialogClosingEventHandler { + /** + * A method that will handle the client CustomDialogClosing event. + * @param source An object representing the event's source. + * @param e An ASPxClientHtmlEditorCustomDialogClosingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorCustomDialogClosingEventArgs): void; +} +/** + * Provides data for the CustomDialogClosing client event. + */ +interface ASPxClientHtmlEditorCustomDialogClosingEventArgs extends ASPxClientHtmlEditorCustomDialogCloseEventArgsBase { + /** + * Gets or sets a value specifying whether the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * A method that will handle the CustomDialogClosed client event. + */ +interface ASPxClientHtmlEditorCustomDialogClosedEventHandler { + /** + * A method that will handle the client CustomDialogClosed event. + * @param source An object representing the event's source. + * @param e An ASPxClientHtmlEditorCustomDialogClosedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorCustomDialogClosedEventArgs): void; +} +/** + * Provides data for the CustomDialogClosed client event. + */ +interface ASPxClientHtmlEditorCustomDialogClosedEventArgs extends ASPxClientHtmlEditorCustomDialogCloseEventArgsBase { + /** + * Gets an object associated with the closed dialog. + * Value: An object containing custom data associated with dialog closing. + */ + data: Object; +} +/** + * A method that will handle the Validation client event. + */ +interface ASPxClientHtmlEditorValidationEventHandler { + /** + * A method that will handle the client Validation event. + * @param source An object representing the event's source. + * @param e An ASPxClientHtmlEditorValidationEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorValidationEventArgs): void; +} +/** + * Provides data for the Validation client event. + */ +interface ASPxClientHtmlEditorValidationEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets the HTML markup that is the ASPxHtmlEditor's content. + * Value: A string value that specifies the HTML content to validate. + */ + html: string; + /** + * Gets or sets a value specifying whether the validated value is valid. + * Value: true if the validation has been completed successfully; otherwise, false. + */ + isValid: boolean; + /** + * Gets or sets the error text to be displayed within the editor's error frame if the editor's validation fails. + * Value: A string value specifying the error description. + */ + errorText: string; +} +/** + * A method that will handle the ActiveTabChanged event. + */ +interface ASPxClientHtmlEditorTabEventHandler { + /** + * A method that will handle the client ActiveTabChanged event. + * @param source The event's source. + * @param e An ASPxClientHtmlEditorTabEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorTabEventArgs): void; +} +/** + * Provides data for the ActiveTabChanged event that concerns manipulations on tabs. + */ +interface ASPxClientHtmlEditorTabEventArgs extends ASPxClientEventArgs { + /** + * Gets the name that uniquely identifies an editor tab. + * Value: A string value that is the tab name. + */ + name: string; +} +/** + * A method that will handle the ActiveTabChanging event. + */ +interface ASPxClientHtmlEditorTabCancelEventHandler { + /** + * A method that will handle the client ActiveTabChanging event. + * @param source The event's source. + * @param e An ASPxClientHtmlEditorTabCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorTabCancelEventArgs): void; +} +/** + * Provides data for the cancellable ActiveTabChanging event that concerns manipulations on tabs. + */ +interface ASPxClientHtmlEditorTabCancelEventArgs extends ASPxClientHtmlEditorTabEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event, should be canceled. + * Value: true, if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the BeforePaste event. + */ +interface ASPxClientHtmlEditorBeforePasteEventHandler { + /** + * A method that will handle the BeforePaste event. + * @param source The event source. This parameter identifies the HTML editor object that raised the event. + * @param e An ASPxClientHtmlEditorBeforePasteEventArgs object that contains event data. + */ + (source: S, e: ASPxClientHtmlEditorBeforePasteEventArgs): void; +} +/** + * Provides data for the BeforePaste event. + */ +interface ASPxClientHtmlEditorBeforePasteEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value identifying the command's name. + */ + commandName: string; + /** + * Gets or sets the HTML markup that is about to be pasted to the ASPxHtmlEditor's content. + * Value: A string value that specifies the HTML content to paste. + */ + html: string; +} +/** + * Represents a client-side equivalent of the ASPxHtmlEditor control. + */ +interface ASPxClientHtmlEditor extends ASPxClientControl { + /** + * Occurs on the client side after a dialog has been initialized. + */ + DialogInitialized: ASPxClientEvent>; + /** + * Fires on the client side before a dialog is going to be closed. + */ + DialogClosing: ASPxClientEvent>; + /** + * Occurs on the client side after a dialog is closed. + */ + DialogClosed: ASPxClientEvent>; + /** + * Occurs before a default or custom command has been executed and allows you to cancel the action. + */ + CommandExecuting: ASPxClientEvent>; + /** + * Enables you to implement a custom command's logic. + */ + CustomCommand: ASPxClientEvent>; + /** + * Occurs after a default or custom command has been executed on the client side. + */ + CommandExecuted: ASPxClientEvent>; + /** + * Fires on the client side when the editor's Design View Area receives input focus. + */ + GotFocus: ASPxClientEvent>; + /** + * Fires on the client side when the editor's Design View Area loses input focus. + */ + LostFocus: ASPxClientEvent>; + /** + * Occurs on the client when a selection is changed within the ASPxHtmlEditor. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Occurs on the client side when the content of the editor changes. + */ + HtmlChanged: ASPxClientEvent>; + /** + * Occurs on the client side after a custom dialog is opened. + */ + CustomDialogOpened: ASPxClientEvent>; + /** + * Fires on the client side before a custom dialog is closed. + */ + CustomDialogClosing: ASPxClientEvent>; + /** + * Occurs on the client side after a custom dialog is closed. + */ + CustomDialogClosed: ASPxClientEvent>; + /** + * Allows you to specify whether the value entered into the ASPxHtmlEditor is valid. + */ + Validation: ASPxClientEvent>; + /** + * Occurs on the client side before a context menu is shown. + */ + ContextMenuShowing: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientHtmlEditor. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires after a callback, sent by the CustomDataCallback event handler. + */ + CustomDataCallback: ASPxClientEvent>; + /** + * Occurs on the client side after the editor content is spell checked. + */ + SpellingChecked: ASPxClientEvent>; + /** + * Fires on the client side after the active tab has been changed within a control. + */ + ActiveTabChanged: ASPxClientEvent>; + /** + * Fires on the client side before the active tab is changed within a control. + */ + ActiveTabChanging: ASPxClientEvent>; + /** + * Occurs before an HTML code is pasted to editor content, and allows you to modify it. + */ + BeforePaste: ASPxClientEvent>; + /** + * Returns the document object generated by an iframe element within a design view area. + */ + GetDesignViewDocument(): Object; + /** + * Provides access to the client ASPxPopupControl object that is a Html Editor's dialog. + */ + GetDialogPopupControl(): ASPxClientPopupControl; + /** + * Returns the document object generated by an iframe element within a preview area. + */ + GetPreviewDocument(): Object; + /** + * Returns a collection of client context menu objects. + */ + GetContextMenu(): ASPxClientPopupMenu; + /** + * Returns a value indicating whether an editor is enabled. + */ + GetEnabled(): boolean; + /** + * Specifies whether an editor is enabled. + * @param value true to enable the editor; false to disable it. + */ + SetEnabled(value: boolean): void; + /** + * Sets input focus to the ASPxHtmlEditor's edit region. + */ + Focus(): void; + /** + * Gets the HTML markup that represents the editor's content. + */ + GetHtml(): string; + /** + * Specifies the HTML markup that represents the editor's content. + * @param html A string value that specifies the HTML markup. + */ + SetHtml(html: string): void; + /** + * Sets the HTML markup that represents the editor's content. + * @param html A string value that specifies the HTML markup. + * @param clearUndoHistory true to clear the undo stack; otherwise, false. + */ + SetHtml(html: string, clearUndoHistory: boolean): void; + /** + * Replaces placeholders with the specified values. + * @param html A string value that specifies the HTML code to process. + * @param placeholders An array of objects that specify the placeholders and values to replace them. + */ + ReplacePlaceholders(html: string, placeholders: Object[]): string; + /** + * Creates a parameter for ASPxHtmlEditor's client-side commands related to changing media elements. + * @param element An element that is being changed. + */ + CreateChangeMediaElementCommandArguments(element: Object): ASPxClientHtmlEditorChangeMediaElementCommandArguments; + /** + * Executes the specified command. + * @param commandName A string value that specifies the command to perform. + * @param parameter A string value specifying additional information about the command to perform. + * @param addToUndoHistory true, to add the specified command to the undo stack; otherwise, false. + */ + ExecuteCommand(commandName: string, parameter: Object, addToUndoHistory: boolean): boolean; + /** + * Adds the current editor state to the undo/redo history. + */ + SaveToUndoHistory(): void; + /** + * Returns the selection in the ASPxHtmlEditor. + */ + GetSelection(): ASPxClientHtmlEditorSelection; + /** + * Restores the selection within the ASPxHtmlEditor. + */ + RestoreSelection(): boolean; + /** + * Sets the value of the combo box within the HtmlEditor on the client side. + * @param commandName A string value that identifies the combo box's command name within the HtmlEditor's control collection. + * @param value A string value that specifies the combo box's new value. + */ + SetToolbarComboBoxValue(commandName: string, value: string): void; + /** + * Sets the value of the dropdown item picker in the HtmlEditor on the client side. + * @param commandName A string value that identifies the dropdown item picker by its command name. This value is contained in the CommandName property. + * @param value A string value that specifies the dropdown item picker's new value, i.e., the ToolbarItemPickerItem object. + */ + SetToolbarDropDownItemPickerValue(commandName: string, value: string): void; + /** + * Specifies the visibility of a ribbon context tab category specified by its name. + * @param categoryName A Name property value of the required category. + * @param active true to make a category visible; false to make it hidden. + */ + SetRibbonContextTabCategoryVisible(categoryName: string, active: string): void; + /** + * Provides access to an object implementing the HtmlEditor's ribbon UI. + */ + GetRibbon(): ASPxClientRibbon; + /** + * Gets a value that indicates whether the editor's value passes validation. + */ + GetIsValid(): boolean; + /** + * Gets the error text to be displayed within the editor's error frame if the editor's validation fails. + */ + GetErrorText(): string; + /** + * Sets a value that specifies whether the editor's value passes validation. + * @param isValid true if the editor's value passes validation; otherwise, false. + */ + SetIsValid(isValid: boolean): void; + /** + * Sets the error text to be displayed within the editor's error frame if the editor's validation fails. + * @param errorText A string value representing the error text. + */ + SetErrorText(errorText: string): void; + /** + * Performs validation of the editor's content. + */ + Validate(): void; + /** + * Set an active tab specified by its name. + * @param name A string value that is the name of the tab. + */ + SetActiveTabByName(name: string): void; + /** + * Returns the name of the active HTML editor tab. + */ + GetActiveTabName(): string; + /** + * Reconnect the control to an external ribbon. + */ + ReconnectToExternalRibbon(): void; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientDataCallback object that represents the JavaScript function which receives the callback data as a parameter. + */ + PerformDataCallback(parameter: string, onCallback: ASPxClientDataCallback): void; +} +/** + * Provides client functionality for dialogs within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorDialogBase { + /** + * Provides access to the client ASPxFormLayout object that arranges all editors in the Html Editor's dialogs. + */ + GetFormLayout(): ASPxClientFormLayout; + /** + * Provides access to the client object of the "OK" button in the Html Editor's dialogs. + */ + GetOkButton(): ASPxClientButton; + /** + * Provides access to the client object of the "Cancel" button in the Html Editor's dialogs. + */ + GetCancelButton(): ASPxClientButton; +} +/** + * Provides client functionality for Html Editor dialogs operated with its elements. + */ +interface ASPxClientHtmlEditorEditElementDialog extends ASPxClientHtmlEditorDialogBase { + /** + * Provides access to the client object of the "Border style" combo box in the Html Editor's dialogs (Style Settings). + */ + GetBorderStyleComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Border width" spin editor in the Html Editor's dialogs (Style Settings). + */ + GetBorderWidthSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the "Border color" color editor in the Html Editor's dialogs (Style Settings). + */ + GetBorderColorColorEdit(): ASPxClientColorEdit; + /** + * Provides access to the client object of the "Top margin" text box in the Html Editor's dialogs (Style Settings). + */ + GetTopMarginTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Bottom margin" text box in the Html Editor's dialogs (Style Settings). + */ + GetBottomMarginTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Left margin" text box in the Html Editor's dialogs (Style Settings). + */ + GetLeftMarginTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Right margin" text box in the Html Editor's dialogs (Style Settings). + */ + GetRightMarginTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "CSS class" combo box in the Html Editor's dialogs (Style Settings). + */ + GetCssClassNameComboBox(): ASPxClientComboBox; +} +/** + * Provides client functionality for the Change Element Properties dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorChangeElementPropertiesDialog extends ASPxClientHtmlEditorEditElementDialog { + /** + * Provides access to the client object of the "ID" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetIdTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Title" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetTitleTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Direction" combo box in the Html Editor's "Change Element Properties" dialog. + */ + GetDirectionComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Value" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetValueTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Tab index" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetTabIndexTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Disabled" check box in the Html Editor's "Change Element Properties" dialog. + */ + GetDisabledCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Input type" combo box in the Html Editor's "Change Element Properties" dialog. + */ + GetInputTypeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "For" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetForTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Name" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetNameTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Method" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetMethodTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Action" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetActionTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Checked" check box in the Html Editor's "Change Element Properties" dialog. + */ + GetCheckedCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Max length" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetMaxLengthTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Size" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetSizeTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Readonly" check box in the Html Editor's "Change Element Properties" dialog. + */ + GetReadonlyCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Src" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetSrcTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Accept" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetAcceptTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Alt" text box in the Html Editor's "Change Element Properties" dialog. + */ + GetAltTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Start" spin editor in the Html Editor's "Change Element Properties" dialog. + */ + GetStartSpinEdit(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Width" spin editor in the Html Editor's "Change Element Properties" dialog. + */ + GetWidthValueSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client ASPxComboBox object that allows you to specify the element width measurement unit in the Html Editor's "Change Element Properties" dialog. + */ + GetWidthValueTypeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Height" spin editor in the Html Editor's "Change Element Properties" dialog. + */ + GetHeightValueSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client ASPxComboBox object that allows to specify the element height measurement unit in the Html Editor's "Change Element Properties" dialog. + */ + GetHeightValueTypeComboBox(): ASPxClientComboBox; +} +/** + * Provides client functionality for the Link dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorLinkDialog extends ASPxClientHtmlEditorDialogBase { + /** + * Provides access to the client object of the "E-mail to" text box in the Html Editor's Link dialog. + */ + GetEmailTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Text" text box in the Html Editor's Link dialog. + */ + GetTextTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "ToolTip" text box in the Html Editor's Link dialog. + */ + GetTooltipTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Subject" text box in the Html Editor's Link dialog. + */ + GetSubjectTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "URL" text box in the Html Editor's Link dialog. + */ + GetUrlTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the file manager used in the Link dialog's "Select Document" popup window. + */ + GetFileManager(): ASPxClientFileManager; + /** + * Provides access to the client object of the "Cancel" button in the Link dialog's "Select Document" popup window. + */ + GetSelectDocumentPopupCancelButton(): ASPxClientButton; + /** + * Provides access to the client object of the "Select" button in the Link dialog's "Select Document" popup window. + */ + GetSelectDocumentPopupSelectButton(): ASPxClientButton; + /** + * Provides access to the client popup control object that is the "Select Document" popup window in the Html Editor's Link dialog. + */ + GetSelectDocumentPopupControl(): ASPxClientPopupControl; + /** + * Provides access to the client object of the "Open in new window" check box in the Html Editor's Link dialog. + */ + GetOpenInNewWindowCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client radio button list object used to specify the link type in the Html Editor's Link dialog. + */ + GetLinkTypeRadioButtonList(): ASPxClientRadioButtonList; +} +/** + * Provides client functionality for the Placeholder dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorPlaceholderDialog extends ASPxClientHtmlEditorDialogBase { + /** + * Provides access to the ASPxListBox client object that lists placeholder names in the Html Editor's Placeholder dialog. + */ + GetPlaceholderNameListBox(): ASPxClientListBox; +} +/** + * Provides client functionality for the Paste From Word dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorPasteFromWordDialog extends ASPxClientHtmlEditorDialogBase { + /** + * Provides access to the client object of the "Remove font family" check box in the Html Editor's Flash dialog. + */ + GetRemoveFontFamilyCheckBox(): ASPxClientCheckBox; +} +/** + * Provides client functionality for the media dialogs within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorMediaDialogBase extends ASPxClientHtmlEditorEditElementDialog { + /** + * Provides access to the client object of the media file selector that allows you to insert/change media files in the Html Editor's Audio/Video/Flash dialogs. + */ + GetMediaFileSelector(): ASPxClientMediaFileSelector; + /** + * Provides access to the client object of the "More options" check box in the Html Editor's Audio/Video/Flash/Image dialogs. + */ + GetMoreOptionsCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Width" spin editor in the Html Editor's Audio/Video/Flash dialogs. + */ + GetWidthSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the "Height" spin editor in the Html Editor's Audio/Video/Flash dialogs. + */ + GetHeightSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the "Position" combo box in the Html Editor's Audio/Video/Flash/Image dialogs. + */ + GetPositionComboBox(): ASPxClientComboBox; +} +/** + * Provides client functionality for the Image dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorImageDialog extends ASPxClientHtmlEditorMediaDialogBase { + /** + * Provides access to the client object of the "Size" combo box in the Html Editor's Image dialog. + */ + GetSizeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Create thumbnail" check box in the Html Editor's Image dialog. + */ + GetCreateThumbnailCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "New image name" text box in the Html Editor's Image dialog. + */ + GetThumbnailNameTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Wrap text around image" check box in the Html Editor's Image dialog. + */ + GetWrapTextCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Description" text box in the Html Editor's Image dialog. + */ + GetDescriptionTextBox(): ASPxClientTextBox; +} +/** + * Provides client functionality for the Flash dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorFlashDialog extends ASPxClientHtmlEditorMediaDialogBase { + /** + * Provides access to the client object of the "Quality" combo box in the Html Editor's Flash dialog. + */ + GetQualityComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Auto play" check box in the Html Editor's Flash dialog. + */ + GetAutoPlayCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Enable flash menu" check box in the Html Editor's Flash dialog. + */ + GetEnableFlashMenuCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Loop" check box in the Html Editor's Flash dialog. + */ + GetLoopCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Allow fullscreen" check box in the Html Editor's Flash dialog. + */ + GetAllowFullscreenCheckBox(): ASPxClientCheckBox; +} +/** + * Provides client functionality for the Audio dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorAudioDialog extends ASPxClientHtmlEditorMediaDialogBase { + /** + * Provides access to the client object of the "Auto play" check box in the Html Editor's Audio dialogs. + */ + GetAutoPlayCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Preload mode" combo box in the Html Editor's Audio dialogs. + */ + GetPreloadModeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Loop" check box in the Html Editor's Audio dialogs. + */ + GetLoopCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Show player controls" check box in the Html Editor's Audio dialogs. + */ + GetShowPlayerControlsCheckBox(): ASPxClientCheckBox; +} +/** + * Provides client functionality for the Video dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorVideoDialog extends ASPxClientHtmlEditorMediaDialogBase { + /** + * Provides access to the client object of the "Auto play" check box in the Html Editor's Video dialog. + */ + GetAutoPlayCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Preload mode" combo box in the Html Editor's Video dialog. + */ + GetPreloadModeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Loop" check box in the Html Editor's Video dialog. + */ + GetLoopCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Show player controls" check box in the Html Editor's Video dialog. + */ + GetShowPlayerControlsCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Poster URL" text box in the Html Editor's Video dialog. + */ + GetPosterTextBox(): ASPxClientTextBox; +} +/** + * Provides client functionality for the YouTube Video dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorYouTubeDialog extends ASPxClientHtmlEditorEditElementDialog { + /** + * Provides access to the client object of the "Enable privacy-enhanced mode" check box in the Html Editor's YouTube Video dialog. + */ + GetConfidentModeCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Show suggested videos when the video finishes" check box in the Html Editor's YouTube Video dialog. + */ + GetShowSameVideosCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Show video title and player actions" check box in the Html Editor's YouTube Video dialog. + */ + GetShowVideoNameCheckBox(): ASPxClientCheckBox; + /** + * Provides access to the client object of the "Show player controls" check box in the Html Editor's YouTube Video dialog. + */ + GetShowPlayerControlsCheckBox(): ASPxClientCheckBox; +} +/** + * Provides base client functionality for the Table dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorTableDialogBase extends ASPxClientHtmlEditorDialogBase { + /** + * Provides access to the client object of the "Background color" color editor in the Html Editor's Table dialogs. + */ + GetBackgroundColorColorEdit(): ASPxClientColorEdit; +} +/** + * Provides client functionality for the Table dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorTableDialog extends ASPxClientHtmlEditorTableDialogBase { + /** + * Provides access to the client object of the "Width" combo box in the Html Editor's Table dialogs. + */ + GetWidthTypeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the spin editor in the Html Editor's Table dialogs that allows you to specify the table width value. + */ + GetWidthValueSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the combo box in the Html Editor's Table dialogs that allows you to specify the table width measurement unit. + */ + GetWidthValueTypeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Height" combo box in the Html Editor's Table dialogs. + */ + GetHeightTypeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the spin editor in the Html Editor's Table dialogs that allows you specify the table height value. + */ + GetHeightValueSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the combo box in the Html Editor's Table dialogs that allows you to specify the table height measurement unit. + */ + GetHeightValueTypeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Cell padding" spin editor in the Html Editor's Table dialogs. + */ + GetCellPaddingSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the "Cell spacing" spin editor in the Html Editor's Table dialogs. + */ + GetCellSpacingSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the "Alignment" combo box in the Html Editor's Table dialogs. + */ + GetAlignmentComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Border Color" color editor in the Html Editor's Table dialogs. + */ + GetBorderColorColorEdit(): ASPxClientColorEdit; + /** + * Provides access to the client object of the "Border size" spin editor in the Html Editor's Table dialogs. + */ + GetBorderWidthSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the "Headers" combo box in the Html Editor's Table dialogs. + */ + GetHeadersComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Caption" text box in the Html Editor's Table dialogs. + */ + GetCaptionTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Summary" text box in the Html Editor's Table dialogs. + */ + GetSummaryTextBox(): ASPxClientTextBox; + /** + * Provides access to the client object of the "Accessibility" check box related to the Html Editor's Table dialogs. + */ + GetAccessibilityCheckBox(): ASPxClientCheckBox; +} +/** + * Provides client functionality for the Insert Table dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorInsertTableDialog extends ASPxClientHtmlEditorTableDialog { + /** + * Provides access to the client object of the "Columns" spin editor in the Html Editor's Table dialogs. + */ + GetColumnCountSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the "Rows" spin editor in the Html Editor's Table dialogs. + */ + GetRowCountSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the "Equal column widths" check box in the Html Editor's Table dialogs. + */ + GetEqualWidthCheckBox(): ASPxClientCheckBox; +} +/** + * Provides client functionality for Table dialogs within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorTableElementPropertiesDialog extends ASPxClientHtmlEditorTableDialogBase { + /** + * Provides access to the client object of the "Horizontal" combo box in the Html Editor's Row/Column/Cell Properties dialog's Alignment group. + */ + GetHorizontalAlignmentComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the "Vertical" combo box in the Html Editor's Row/Column/Cell Properties dialog's Alignment group. + */ + GetVerticalAlignmentComboBox(): ASPxClientComboBox; +} +/** + * Provides client functionality for the Cell Properties dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorTableCellPropertiesDialog extends ASPxClientHtmlEditorTableElementPropertiesDialog { + /** + * Provides access to the client object of the "Apply to all cells in the table" check box in the Html Editor's Cell Properties dialog. + */ + GetApplyToAllCellsCheckBox(): ASPxClientCheckBox; +} +/** + * Provides client functionality for the Row Properties dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorTableRowPropertiesDialog extends ASPxClientHtmlEditorTableElementPropertiesDialog { + /** + * Provides access to the client object of the "Height" combo box in the Html Editor's "Row Properties" dialog. + */ + GetHeightTypeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client ASPxSpinEdit object that allows you to specify the row height in the Html Editor's "Row Properties" dialog. + */ + GetHeightValueSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client ASPxComboBox object that allows you to specify the row height measurement unit in the Html Editor's "Row Properties" dialog. + */ + GetHeightValueTypeComboBox(): ASPxClientComboBox; +} +/** + * Provides client functionality for the Column Properties dialog within the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorTableColumnPropertiesDialog extends ASPxClientHtmlEditorTableElementPropertiesDialog { + /** + * Provides access to the client object of the "Width" combo box in the Html Editor's "Column Properties" dialog. + */ + GetWidthTypeComboBox(): ASPxClientComboBox; + /** + * Provides access to the client object of the spin editor that allows you to set the column width value in the Html Editor's "Column Properties" dialog. + */ + GetWidthValueSpinEdit(): ASPxClientSpinEdit; + /** + * Provides access to the client object of the combo box that allows you to specify the column width measurement unit in the Html Editor's "Column Properties" dialog. + */ + GetWidthValueTypeComboBox(): ASPxClientComboBox; +} +/** + * A selection in the ASPxHtmlEditor. + */ +interface ASPxClientHtmlEditorSelection { + /** + * Returns a DOM element that relates to the current selection. + */ + GetSelectedElement(): Object; + /** + * Returns the HTML markup specifying the currently selected ASPxHtmlEditor content. + */ + GetHtml(): string; + /** + * Returns the text within the currently selected ASPxHtmlEditor content. + */ + GetText(): string; + /** + * Returns an array of the currently selected elements. + */ + GetElements(): Object[]; + /** + * Sets the new HTML markup in place of the currently selected within ASPxHtmlEditor content. + * @param html A string value specifying the new HTML markup. + * @param addToHistory true to add this operation to the history; otherwise, false. + */ + SetHtml(html: string, addToHistory: boolean): void; +} +/** + * The client-side equivalent of the ASPxPivotGrid control. + */ +interface ASPxClientPivotGrid extends ASPxClientControl { + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientPivotGrid. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires after a callback that has been processed on the server returns back to the client. + */ + AfterCallback: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Fires before a callback is sent to the server for server-side processing. + */ + BeforeCallback: ASPxClientEvent>; + /** + * Fires on the client side after the customization form's visible state has been changed. + */ + CustomizationFieldsVisibleChanged: ASPxClientEvent>; + /** + * Occurs when a cell is clicked. + */ + CellClick: ASPxClientEvent>; + /** + * Occurs when a cell is double clicked. + */ + CellDblClick: ASPxClientEvent>; + /** + * Occurs when a custom menu item has been clicked. + */ + PopupMenuItemClick: ASPxClientEvent>; + /** + * Indicates whether the Defer Layout Update check box is enabled. + */ + IsDeferUpdatesChecked(): boolean; + /** + * Indicates whether the Filter Editor (Prefilter) is visible. + */ + IsPrefilterVisible(): boolean; + /** + * Shows the Filter Editor. + */ + ShowPrefilter(): void; + /** + * Hides the Filter Editor. + */ + HidePrefilter(): void; + /** + * Clears the filter expression applied using the Prefilter (Filter Editor). + */ + ClearPrefilter(): void; + /** + * Enables or disables the current filter applied by the Filter Editor (Prefilter). + */ + ChangePrefilterEnabled(): void; + /** + * Returns a value that specifies whether the customization form is visible. + */ + GetCustomizationFieldsVisibility(): boolean; + /** + * Specifies the visibility of the customization form. + * @param value true to display the customization form; false to hide the customization form. + */ + SetCustomizationFieldsVisibility(value: boolean): void; + /** + * Switches the customization form's visible state. + */ + ChangeCustomizationFieldsVisibility(): void; + /** + * 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. + */ + PerformCallback(args: string): void; + /** + * 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; +} +/** + * A method that will handle the CellDblClick event. + */ +interface ASPxClientClickEventHandler { + /** + * A method that will handle the CellDblClick event. + * @param source The event source. + * @param e An ASPxClientClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientClickEventArgs): void; +} +/** + * Provides data for the CellDblClick client events. + */ +interface ASPxClientClickEventArgs extends ASPxClientEventArgs { + /** + * Provides access to the parameters associated with the CellDblClick events. + * Value: An object that contains parameters associated with the CellDblClick events. + */ + HtmlEvent: Object; + /** + * Gets the processed cell's value. + * Value: An object that represents the processed cell's value. + */ + Value: Object; + /** + * Gets the index of a column that owns the processed cell. + * Value: An integer value that identifies a column. + */ + ColumnIndex: number; + /** + * Gets the index of a row that owns the processed cell. + * Value: An integer value that identifies a row. + */ + RowIndex: number; + /** + * Gets a column field value. + * Value: An object that represents a column field value. + */ + ColumnValue: Object; + /** + * Gets a row field value. + * Value: An object that represents a row field value. + */ + RowValue: Object; + /** + * Gets a column field name. + * Value: A String value that represents a column field name. + */ + ColumnFieldName: string; + /** + * Gets a row field name. + * Value: A String value that represents a row field name. + */ + RowFieldName: string; + /** + * Gets a column value type. + * Value: A String value that represents a column value type. + */ + ColumnValueType: string; + /** + * Gets a row value type. + * Value: A String value that represents a row value type. + */ + RowValueType: string; + /** + * Gets the index of the data field which corresponds to the clicked summary value. + * Value: An integer value that identifies the data field. + */ + DataIndex: number; +} +/** + * A method that will handle the PopupMenuItemClick event. + */ +interface ASPxClientPivotMenuItemClickEventHandler { + /** + * A method that will handle the PopupMenuItemClick event. + * @param source The event source. + * @param e An ASPxClientPivotMenuItemClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientPivotMenuItemClickEventArgs): void; +} +/** + * Provides data for the PopupMenuItemClick event. + */ +interface ASPxClientPivotMenuItemClickEventArgs extends ASPxClientEventArgs { + /** + * Gets the context menu's type. + * Value: A PivotGridPopupMenuType enumeration value that identifies the context menu. + */ + MenuType: string; + /** + * Gets the name of the menu item currently being clicked. + * Value: A String value that identifies the clicked item by its name. + */ + MenuItemName: string; + /** + * Gets the field's unique indentifier. + * Value: A string which specifies the field's unique indentifier. + */ + FieldID: string; + /** + * Gets the index of the field value for which the popup menu has been invoked. + * Value: An integer value that identifies the field value. + */ + FieldValueIndex: number; +} +/** + * A client-side equivalent of the ASPxPivotCustomizationControl control. + */ +interface ASPxClientPivotCustomization extends ASPxClientControl { + /** + * Returns an HTML element that represents the root of the control's hierarchy. + */ + GetMainContainer(): Object; + /** + * Returns a client-side equivalent of the owner Pivot Grid Control. + */ + GetPivotGrid(): ASPxClientPivotGrid; + /** + * Specifies the Customization Control's height. + * @param value An integer value that specifies the Customization Control's height. + */ + SetHeight(value: number): void; + /** + * Specifies the Customization Control's width. + * @param value An integer value that specifies the Customization Control's width. + */ + SetWidth(value: number): void; + /** + * Recalculates the Customization Control height. + */ + UpdateHeight(): void; + /** + * Specifies the Customization Control's layout. + * @param layout A string that specifies the Customization Control's layout. + */ + SetLayout(layout: string): void; +} +/** + * A method that will handle the CustomCommandExecuted event. + */ +interface ASPxClientRichEditCustomCommandExecutedEventHandler { + /** + * A method that will handle the CustomCommandExecuted event. + * @param source An object representing the event source. Identifies the RichEdit that raised the event. + * @param e A ASPxClientRichEditCustomCommandExecutedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRichEditCustomCommandExecutedEventArgs): void; +} +/** + * Provides data for the CustomCommandExecuted event. + */ +interface ASPxClientRichEditCustomCommandExecutedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value representing the processed command's name. + */ + commandName: string; + /** + * Gets an optional parameter that complements the processed command. + * Value: A string value containing additional information about the processed command. + */ + parameter: Object; +} +/** + * A method that will handle the HyperlinkClick event. + */ +interface ASPxClientRichEditHyperlinkClickEventHandler { + /** + * A method that will handle the HyperlinkClick event. + * @param source The event source. + * @param e An ASPxClientRichEditHyperlinkClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRichEditHyperlinkClickEventArgs): void; +} +/** + * Provides data for the HyperlinkClick event. + */ +interface ASPxClientRichEditHyperlinkClickEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets whether the event is handled manually, so no default processing is required. + * Value: true if the event is handled and no default processing is required; otherwise false. + */ + handled: boolean; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; + /** + * Gets a value identifying the clicked hyperlink type. + * Value: One of the values. + */ + hyperlinkType: ASPxClientOfficeDocumentLinkType; + /** + * Gets the clicked link's URI. + * Value: A sting value specifying the link's URI. + */ + targetUri: string; +} +/** + * A client-side equivalent of the ASPxRichEdit object. + */ +interface ASPxClientRichEdit extends ASPxClientControl { + /** + * Provides access to document structural elements. + * Value: A object that lists RichEdit's document structural elements. + */ + document: RichEditDocument; + /** + * Provides access to RichEdit's client-side commands. + * Value: A object that lists RichEdit's client-side commands. + */ + commands: RichEditCommands; + /** + * Provides access to the client methods that changes the selection. + * Value: A object that lists methods to work with the selection. + */ + selection: RichEditSelection; + /** + * Gets a unit converter. + * Value: A object representing a unit converter. + */ + unitConverter: RichEditUnitConverter; + /** + * Occurs after a custom command has been executed on the client side. + */ + CustomCommandExecuted: ASPxClientEvent>; + /** + * Fires after a client change has been made to the document and the client-server synchronization starts to apply the change on the server. + */ + BeginSynchronization: ASPxClientEvent>; + /** + * Fires after a document change has been applied to the server and server and client document models have been synchronized. + */ + EndSynchronization: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the RichEdit. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires if any change is made to the RichEdit's document on the client. + */ + DocumentChanged: ASPxClientEvent>; + /** + * Occurs when a hyperlink is clicked within the document. + */ + HyperlinkClick: ASPxClientEvent>; + /** + * Occurs when the selection is changed within the document. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Enables you to switch the full-screen mode of the Rich Text Editor. + * @param fullscreen true to activate full-screen mode; false to deactivate full-screen mode. + */ + SetFullscreenMode(fullscreen: boolean): void; + /** + * Provides access to an object implementing the RichEdit's ribbon UI. + */ + GetRibbon(): ASPxClientRibbon; + /** + * Sets input focus to the RichEdit. + */ + Focus(): void; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * 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; + /** + * Indicates whether any unsaved changes are contained in the current document. + */ + HasUnsavedChanges(): boolean; + /** + * Reconnects the RichEdit to an external ribbon. + */ + ReconnectToExternalRibbon(): void; +} +/** + * Contains a set of the available client commands. + */ +interface RichEditCommands { + /** + * Gets a command to create a new empty document. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileNew: FileNewCommand; + /** + * Gets a command to open the file, specifying its path. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileOpen: FileOpenCommand; + /** + * Gets a command to invoke the File Open dialog allowing one to select and load a document file into RichEdit. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileOpenDialog: FileOpenDialogCommand; + /** + * Gets a command to save the document to a file. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileSave: FileSaveCommand; + /** + * Gets a command to download the document file, specifying its extension. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileDownload: FileDownloadCommand; + /** + * Gets 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. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileSaveAs: FileSaveAsCommand; + /** + * Gets a command to open the file's Save As dialog. + * Value: A object that provides methods for executing the command and checking its state. + */ + fileSaveAsDialog: FileSaveAsDialogCommand; + /** + * Gets a command to invoke a browser-specific Print dialog allowing one to print the current document. + * Value: A object that provides methods for executing the command and checking its state. + */ + filePrint: FilePrintCommand; + /** + * Gets a command to cancel changes caused by the previous command. + * Value: A object that provides methods for executing the command and checking its state. + */ + undo: UndoCommand; + /** + * Gets a command to reverse actions of the previous undo command. + * Value: A object that provides methods for executing the command and checking its state. + */ + redo: RedoCommand; + /** + * Gets a command to copy the selected text and place it to the clipboard. + * Value: A object that provides methods for executing the command and checking its state. + */ + copy: CopyCommand; + /** + * Gets a command to paste the text from the clipboard over the selection. + * Value: A object that provides methods for executing the command and checking its state. + */ + paste: PasteCommand; + /** + * Gets a command to cut the selected text and place it to the clipboard. + * Value: A object that provides methods for executing the command and checking its state. + */ + cut: CutCommand; + /** + * Gets a command to change the font name of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontName: ChangeFontNameCommand; + /** + * Gets a command to change the font size of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontSize: ChangeFontSizeCommand; + /** + * Gets a command to increase the font size of characters in a selected range to the closest larger predefined value. + * Value: A object that provides methods for executing the command and checking its state. + */ + increaseFontSize: IncreaseFontSizeCommand; + /** + * Gets a command to decrease the selected range's font size to the closest smaller predefined value. + * Value: A object that provides methods for executing the command and checking its state. + */ + decreaseFontSize: DecreaseFontSizeCommand; + /** + * Gets a command to convert selected text to upper case. + * Value: A object that provides methods for executing the command and checking its state. + */ + makeTextUpperCase: MakeTextUpperCaseCommand; + /** + * Gets a command to convert selected text to lower case. + * Value: A object that provides methods for executing the command and checking its state. + */ + makeTextLowerCase: MakeTextLowerCaseCommand; + /** + * Gets a command to capitalize each word in the selected sentence. + * Value: A object that provides methods for executing the command and checking its state. + */ + capitalizeEachWordTextCase: CapitalizeEachWordTextCaseCommand; + /** + * Gets a command to toggle case for each character - upper case becomes lower, lower case becomes upper. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTextCase: ToggleTextCaseCommand; + /** + * Gets a command to change the bold formatting of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontBold: ChangeFontBoldCommand; + /** + * Gets a command to change the italic formatting of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontItalic: ChangeFontItalicCommand; + /** + * Gets a command to change the underline formatting of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontUnderline: ChangeFontUnderlineCommand; + /** + * Gets a command to change the strikeout formatting of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontStrikeout: ChangeFontStrikeoutCommand; + /** + * Gets a command to change the superscript formatting of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontSuperscript: ChangeFontSuperscriptCommand; + /** + * Gets a command to change the subscript formatting of characters in the selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontSubscript: ChangeFontSubscriptCommand; + /** + * Gets a command to change the font color of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontForeColor: ChangeFontForeColorCommand; + /** + * Gets a command to change the background color of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontBackColor: ChangeFontBackColorCommand; + /** + * Gets a command to reset text and paragraph formatting in the selected range to default. + * Value: A object that provides methods for executing the command and checking its state. + */ + clearFormatting: ClearFormattingCommand; + /** + * Gets a command to change the selected range's style. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeStyle: ChangeStyleCommand; + /** + * Gets a command to toggle between the bulleted paragraph and normal text. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleBulletedList: ToggleBulletedListCommand; + /** + * Gets a command to toggle between the numbered paragraph and normal text. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleNumberingList: ToggleNumberingListCommand; + /** + * Gets a command to toggle between the multilevel list style and normal text. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleMultilevelList: ToggleMultilevelListCommand; + /** + * Gets a command to increment the indent level of paragraphs in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + increaseIndent: IncreaseIndentCommand; + /** + * Gets a command to decrease the indent level of paragraphs in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + decreaseIndent: DecreaseIndentCommand; + /** + * Gets a command to toggle hidden symbol visibility. + * Value: A object that provides methods for executing the command and checking its state. + */ + showHiddenSymbols: ShowHiddenSymbolsCommand; + /** + * Gets a command to toggle left paragraph alignment on and off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleParagraphAlignmentLeft: ToggleParagraphAlignmentLeftCommand; + /** + * Gets a command to toggle centered paragraph alignment on and off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleParagraphAlignmentCenter: ToggleParagraphAlignmentCenterCommand; + /** + * Gets a command to toggle right paragraph alignment on and off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleParagraphAlignmentRight: ToggleParagraphAlignmentRightCommand; + /** + * Gets a command to toggle justified paragraph alignment on and off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleParagraphAlignmentJustify: ToggleParagraphAlignmentJustifyCommand; + /** + * Gets a command to format a current paragraph with single line spacing. + * Value: A object that provides methods for executing the command and checking its state. + */ + setSingleParagraphSpacing: SetSingleParagraphSpacingCommand; + /** + * Gets a command to format a current paragraph with one and a half line spacing. + * Value: A object that provides methods for executing the command and checking its state. + */ + setSesquialteralParagraphSpacing: SetSesquialteralParagraphSpacingCommand; + /** + * Gets a command to format a selected paragraph with double line spacing. + * Value: A object that provides methods for executing the command and checking its state. + */ + setDoubleParagraphSpacing: SetDoubleParagraphSpacingCommand; + /** + * Gets a command to add spacing before a paragraph. + * Value: A object that provides methods for executing the command and checking its state. + */ + addSpacingBeforeParagraph: AddSpacingBeforeParagraphCommand; + /** + * Gets a command to add spacing after a paragraph. + * Value: A object that provides methods for executing the command and checking its state. + */ + addSpacingAfterParagraph: AddSpacingAfterParagraphCommand; + /** + * Gets a command to remove spacing before the selected paragraph. + * Value: A object that provides methods for executing the command and checking its state. + */ + removeSpacingBeforeParagraph: RemoveSpacingBeforeParagraphCommand; + /** + * Gets a command to remove spacing after the selected paragraph. + * Value: A object that provides methods for executing the command and checking its state. + */ + removeSpacingAfterParagraph: RemoveSpacingAfterParagraphCommand; + /** + * Gets a command to change the background color of paragraphs in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeParagraphBackColor: ChangeParagraphBackColorCommand; + /** + * Gets a command to invoke the Font dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openFontFormattingDialog: OpenFontFormattingDialogCommand; + /** + * Gets a command to change the font formatting of characters in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFontFormatting: ChangeFontFormattingCommand; + /** + * Gets a command to invoke the Indents And Spacing tab of the Paragraph dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openParagraphFormattingDialog: OpenParagraphFormattingDialogCommand; + /** + * Gets a command to change the formatting of paragraphs in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeParagraphFormatting: ChangeParagraphFormattingCommand; + /** + * Gets a command to insert a page break at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertPageBreak: InsertPageBreakCommand; + /** + * Gets a command to invoke the Insert Table dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openInsertTableDialog: OpenInsertTableDialogCommand; + /** + * Gets a command to insert a rectangle table of a specified size. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTable: InsertTableCommand; + /** + * Gets a command to invoke the Insert Image dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openInsertPictureDialog: OpenInsertPictureDialogCommand; + /** + * Gets a command to insert an inline picture stored by specifed web address. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertPicture: InsertPictureCommand; + /** + * Gets a command to invoke the Bookmark dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openInsertBookmarkDialog: OpenInsertBookmarkDialogCommand; + /** + * Gets a command to insert a new bookmark that references the current selection. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertBookmark: InsertBookmarkCommand; + /** + * A command to delete a specific bookmark. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteBookmark: DeleteBookmarkCommand; + /** + * Gets a command to navigate to the specified bookmark. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToBookmark: GoToBookmarkCommand; + /** + * Gets a command to invoke the Hyperlink dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openInsertHyperlinkDialog: OpenInsertHyperlinkDialogCommand; + /** + * Gets a command to insert a hyperlink at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertHyperlink: InsertHyperlinkCommand; + /** + * Gets a command to delete the selected hyperlink. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteHyperlink: DeleteHyperlinkCommand; + /** + * Gets a command to delete all hyperlinks in the selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteHyperlinks: DeleteHyperlinksCommand; + /** + * Gets a command to navigate to the document bookmark or URI (uniform resource identifier) specified for the hyperlink. + * Value: A object that provides methods for executing the command and checking its state. + */ + openHyperlink: OpenHyperlinkCommand; + /** + * Gets a command to invoke the Symbols dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openInsertSymbolDialog: OpenInsertSymbolDialogCommand; + /** + * Gets a command to insert a character into a document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertSymbol: InsertSymbolCommand; + /** + * Gets a command to change page margin settings. + * Value: A object that provides methods for executing the command and checking its state. + */ + changePageMargins: ChangePageMarginsCommand; + /** + * Gets a command to invoke the Margins tab of the Page Setup dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openPageMarginsDialog: OpenPageMarginsDialogCommand; + /** + * Gets a command to change the page orientation. + * Value: A object that provides methods for executing the command and checking its state. + */ + changePageOrientation: ChangePageOrientationCommand; + /** + * Gets a command to define the page size dialog's settings. + * Value: A object that provides methods for executing the command and checking its state. + */ + setPageSizeDialog: SetPageSizeDialogCommand; + /** + * Gets a command to invoke the Paper tab of the Page Setup dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openPagePaperSizeDialog: OpenPagePaperSizeDialogCommand; + /** + * Gets a command to change the page size. + * Value: A object that provides methods for executing the command and checking its state. + */ + changePageSize: ChangePageSizeCommand; + /** + * Gets a command to change the number of section columns having the same width. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeSectionEqualColumnCount: ChangeSectionEqualColumnCountCommand; + /** + * Gets a command to invoke the Columns dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openSectionColumnsDialog: OpenSectionColumnsDialogCommand; + /** + * Gets a command to change the settings of individual section columns. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeSectionColumns: ChangeSectionColumnsCommand; + /** + * Gets a command to insert a column break at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertColumnBreak: InsertColumnBreakCommand; + /** + * Gets a command to insert a section break and starts a new section on the next page. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertSectionBreakNextPage: InsertSectionBreakNextPageCommand; + /** + * Gets a command to insert a section break and starts a new section on the next even-numbered page. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertSectionBreakEvenPage: InsertSectionBreakEvenPageCommand; + /** + * Gets a command to insert a section break and starts a new section on the next odd-numbered page. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertSectionBreakOddPage: InsertSectionBreakOddPageCommand; + /** + * Gets a command to set the background color of the page. + * Value: A object that provides methods for executing the command and checking its state. + */ + changePageColor: ChangePageColorCommand; + /** + * Gets a command to toggle the horizontal ruler's visibility. + * Value: A object that provides methods for executing the command and checking its state. + */ + showHorizontalRuler: ShowHorizontalRulerCommand; + /** + * Gets a command to toggle the fullscreen mode. + * Value: A object that provides methods for executing the command and checking its state. + */ + setFullscreen: SetFullscreenCommand; + /** + * Gets a command to invoke the Bulleted and Numbering dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openNumberingListDialog: OpenNumberingListDialogCommand; + /** + * Gets a command to insert a paragraph break at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertParagraph: InsertParagraphCommand; + /** + * Gets a command to insert text at the current position in a document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertText: InsertTextCommand; + /** + * Gets a command to delete the text in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + delete: DeleteCommand; + /** + * Gets a command to remove the previous word. + * Value: A object that provides methods for executing the command and checking its state. + */ + removePrevWord: RemovePrevWordCommand; + /** + * Gets a command to remove the next word. + * Value: A object that provides methods for executing the command and checking its state. + */ + removeNextWord: RemoveNextWordCommand; + /** + * Gets a command to move the cursor backwards and erase the character in that space. + * Value: A object that provides methods for executing the command and checking its state. + */ + backspace: BackspaceCommand; + /** + * Gets a command to insert the line break at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertLineBreak: InsertLineBreakCommand; + /** + * Gets a command to scale pictures in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + changePictureScale: ChangePictureScaleCommand; + /** + * Gets a command to increment the left indentation of paragraphs in a selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + incrementParagraphLeftIndent: IncrementParagraphLeftIndentCommand; + /** + * Gets a command to decrement the paragraph's left indent position. + * Value: A object that provides methods for executing the command and checking its state. + */ + decrementParagraphLeftIndent: DecrementParagraphLeftIndentCommand; + /** + * Gets a command to move the selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + moveContent: MoveContentCommand; + /** + * Gets a command to copy the selected text and place it to the specified position. + * Value: A object that provides methods for executing the command and checking its state. + */ + copyContent: CopyContentCommand; + /** + * Gets a command to insert a tab character at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTab: InsertTabCommand; + /** + * Gets a command to invoke the Tabs dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openTabsDialog: OpenTabsDialogCommand; + /** + * Gets a command to change the tab stop value of a document or selected paragraphs + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTabs: ChangeTabsCommand; + /** + * Gets a command to invoke the Customize Numbered List dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openCustomNumberingListDialog: OpenCustomNumberingListDialogCommand; + /** + * Gets a command to customize the numbered list parameters. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeCustomNumberingList: ChangeCustomNumberingListCommand; + /** + * Gets a command to restart the numbering list. + * Value: A object that provides methods for executing the command and checking its state. + */ + restartNumberingList: RestartNumberingListCommand; + /** + * Gets a command to increment the indent level of paragraphs in a selected numbered list. + * Value: A object that provides methods for executing the command and checking its state. + */ + incrementNumberingIndent: IncrementNumberingIndentCommand; + /** + * Gets a command to decrement the indent level of paragraphs in a selected numbered list. + * Value: A object that provides methods for executing the command and checking its state. + */ + decrementNumberingIndent: DecrementNumberingIndentCommand; + /** + * Gets a command to create a field with an empty code and populate it with the selection (if it is not collapsed). + * Value: A object that provides methods for executing the command and checking its state. + */ + createField: CreateFieldCommand; + /** + * Gets a command to update the field's result. + * Value: A object that provides methods for executing the command and checking its state. + */ + updateField: UpdateFieldCommand; + /** + * Gets a command to display the selected field's codes. + * Value: A object that provides methods for executing the command and checking its state. + */ + showFieldCodes: ShowFieldCodesCommand; + /** + * Get a command to display all field codes in place of the fields in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + showAllFieldCodes: ShowAllFieldCodesCommand; + /** + * Gets a command to continue the list's numbering. + * Value: A object that provides methods for executing the command and checking its state. + */ + continueNumberingList: ContinueNumberingListCommand; + /** + * Gets a command to insert numeration to a paragraph making it a numbering list item. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertNumeration: InsertNumerationCommand; + /** + * Gets a command to remove the selected numeration. + * Value: A object that provides methods for executing the command and checking its state. + */ + removeNumeration: RemoveNumerationCommand; + /** + * Gets a command to update all fields in the selected range. + * Value: A object that provides methods for executing the command and checking its state. + */ + updateAllFields: UpdateAllFieldsCommand; + /** + * Gets a command to insert and update a field with a DATE code. + * Value: A object that provides methods for executing the command and checking its state. + */ + createDateField: CreateDateFieldCommand; + /** + * Gets a command to replace the selection with a TIME field displaying the current time. + * Value: A object that provides methods for executing the command and checking its state. + */ + createTimeField: CreateTimeFieldCommand; + /** + * A command to replace the selection with a PAGE field displaying the current page number. + * Value: A object that provides methods for executing the command and checking its state. + */ + createPageField: CreatePageFieldCommand; + /** + * Gets a command to convert the text of all selected sentences to sentence case. + * Value: A object that provides methods for executing the command and checking its state. + */ + makeTextSentenceCase: MakeTextSentenceCaseCommand; + /** + * Gets a command to switch the text case at the current position in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + switchTextCase: SwitchTextCaseCommand; + /** + * Gets a command to navigate to the first data record. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToFirstDataRecord: GoToFirstDataRecordCommand; + /** + * Gets a command to navigate to the previous data record of the bound data source. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToPreviousDataRecord: GoToPreviousDataRecordCommand; + /** + * Gets a command to navigate to the next data record of the bound data source. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToNextDataRecord: GoToNextDataRecordCommand; + /** + * Gets a command to navigate to the next data record. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToDataRecord: GoToDataRecordCommand; + /** + * Gets a command to navigate to the last data record of the bound data source. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToLastDataRecord: GoToLastDataRecordCommand; + /** + * Gets a command to display or hide actual data in MERGEFIELD fields. + * Value: A object that provides methods for executing the command and checking its state. + */ + showMergedData: ShowMergedDataCommand; + /** + * Gets a command to invoke the Insert Merge Field dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + mergeFieldDialog: MergeFieldDialogCommand; + /** + * Gets a command to replace the selection with a MERGEFIELD (a data source column name is passed with a parameter). + * Value: A object that provides methods for executing the command and checking its state. + */ + createMergeField: CreateMergeFieldCommand; + /** + * Gets a command to invoke the Export Range dialog window to start a mail merge. + * Value: A object that provides methods for executing the command and checking its state. + */ + mailMergeDialog: MailMergeDialogCommand; + /** + * Gets a command to perform a mail merge and download the merged document. + * Value: A object that provides methods for executing the command and checking its state. + */ + mailMergeAndDownload: MailMergeAndDownloadCommand; + /** + * Gets a command to perform a mail merge and save the merged document to the server. + * Value: A object that provides methods for executing the command and checking its state. + */ + mailMergeAndSaveAs: MailMergeAndSaveAsCommand; + /** + * Gets a command to activate the page header and begin editing. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertHeader: InsertHeaderCommand; + /** + * Gets a command to activate the page footer and begin editing. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertFooter: InsertFooterCommand; + /** + * Gets a command to link a header/footer to the previous section, so it has the same content. + * Value: A object that provides methods for executing the command and checking its state. + */ + linkHeaderFooterToPrevious: LinkHeaderFooterToPreviousCommand; + /** + * Gets a command to navigate to the page footer from the page header in the header/footer editing mode. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToFooter: GoToFooterCommand; + /** + * Gets a command to navigate to the page header from the page footer in the header/footer editing mode. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToHeader: GoToHeaderCommand; + /** + * Gets a command to navigate to the next page header or footer in the header/footer editing mode. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToNextHeaderFooter: GoToNextHeaderFooterCommand; + /** + * Gets a command to navigate to the previous page header or footer in the header/footer editing mode. + * Value: A object that provides methods for executing the command and checking its state. + */ + goToPreviousHeaderFooter: GoToPreviousHeaderFooterCommand; + /** + * Gets a command to change the header/footer edit mode, so it allows creation of a different header or footer for the first page of a document or section. + * Value: A object that provides methods for executing the command and checking its state. + */ + setDifferentFirstPageHeaderFooter: SetDifferentFirstPageHeaderFooterCommand; + /** + * Gets a command to change the header/footer edit mode so it allows creation of a different header or footer for odd and even pages of a document or section. + * Value: A object that provides methods for executing the command and checking its state. + */ + setDifferentOddAndEvenPagesHeaderFooter: SetDifferentOddAndEvenPagesHeaderFooterCommand; + /** + * Gets a command to finish header/footer editing. + * Value: A object that provides methods for executing the command and checking its state. + */ + closeHeaderFooter: CloseHeaderFooterCommand; + /** + * Gets a command to replace the selection with a NUMPAGES field displaying the total number of pages. + * Value: A object that provides methods for executing the command and checking its state. + */ + createPageCountField: CreatePageCountFieldCommand; + /** + * Gets a command to invoke the Table tab of the Table Properties dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openTableFormattingDialog: OpenTableFormattingDialogCommand; + /** + * Gets a command to change the selected table's formatting. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableFormatting: ChangeTableFormattingCommand; + /** + * Gets a command to change the selected table rows' preferred height. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableRowPreferredHeight: ChangeTableRowPreferredHeightCommand; + /** + * Gets a command to change the preferred cell width of the selected table rows. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableCellPreferredWidth: ChangeTableCellPreferredWidthCommand; + /** + * Gets a command to toggle inside borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellInsideBorders: ToggleTableCellInsideBordersCommand; + /** + * Gets a command to change the selected table columns' preferred width. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableColumnPreferredWidth: ChangeTableColumnPreferredWidthCommand; + /** + * Gets a command to change the cell formatting of the selected table elements. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableCellFormatting: ChangeTableCellFormattingCommand; + /** + * Gets a command to insert a table column to the left of the current position in the table. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableColumnToTheLeft: InsertTableColumnToTheLeftCommand; + /** + * Gets a command to insert a table column to the right of the current position in the table. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableColumnToTheRight: InsertTableColumnToTheRightCommand; + /** + * Gets a command to insert a row in the table below the selected row. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableRowBelow: InsertTableRowBelowCommand; + /** + * Gets a command to insert a row in the table above the selected row. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableRowAbove: InsertTableRowAboveCommand; + /** + * Gets a command to delete the selected rows in the table. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteTableRows: DeleteTableRowsCommand; + /** + * Gets a command to delete the selected columns in the table. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteTableColumns: DeleteTableColumnsCommand; + /** + * Gets a command to insert table cells with a horizontal shift into the selected table. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableCellWithShiftToTheLeft: InsertTableCellWithShiftToTheLeftCommand; + /** + * Gets a command to delete the selected table cells with a horizontal shift. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteTableCellsWithShiftHorizontally: DeleteTableCellsWithShiftHorizontallyCommand; + /** + * Gets a command to delete the selected table cells with a vertical shift. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteTableCellsWithShiftVertically: DeleteTableCellsWithShiftVerticallyCommand; + /** + * Gets a command to delete the selected table. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteTable: DeleteTableCommand; + /** + * Gets a command to invoke the Insert Cells dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableCellsDialog: InsertTableCellsDialogCommand; + /** + * Gets a command to invoke the Delete Cells dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + deleteTableCellsDialog: DeleteTableCellsDialogCommand; + /** + * Gets a command to merge the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + mergeTableCells: MergeTableCellsCommand; + /** + * Gets a command to invoke the Split Cells dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + splitTableCellsDialog: SplitTableCellsDialogCommand; + /** + * Gets a command to split the selected table cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + splitTableCells: SplitTableCellsCommand; + /** + * Gets a command to insert table cells with a vertical shift into the selected table. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertTableCellsWithShiftToTheVertically: InsertTableCellsWithShiftToTheVerticallyCommand; + /** + * Gets a command to invoke the Borders tab of the Borders and Shading dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openTableBordersAndShadingDialog: OpenTableBordersAndShadingDialogCommand; + /** + * Gets a command to change the selected table's borders and shading. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableBordersAndShading: ChangeTableBordersAndShadingCommand; + /** + * Gets a command to apply top-left alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignTopLeft: ToggleTableCellAlignTopLeftCommand; + /** + * Gets a command to apply top-center alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignTopCenter: ToggleTableCellAlignTopCenterCommand; + /** + * Gets a command to apply top-right alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignTopRight: ToggleTableCellAlignTopRightCommand; + /** + * Gets a command to apply middle-left alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignMiddleLeft: ToggleTableCellAlignMiddleLeftCommand; + /** + * Gets a command to apply middle-center alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignMiddleCenter: ToggleTableCellAlignMiddleCenterCommand; + /** + * Gets a command to apply middle-right alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignMiddleRight: ToggleTableCellAlignMiddleRightCommand; + /** + * Gets a command to apply bottom-left alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignBottomLeft: ToggleTableCellAlignBottomLeftCommand; + /** + * Gets a command to apply bottom-center alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignBottomCenter: ToggleTableCellAlignBottomCenterCommand; + /** + * Gets a command to apply bottom-right alignment for the selected cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAlignBottomRight: ToggleTableCellAlignBottomRightCommand; + /** + * Gets a command to change the selected table's style. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableStyle: ChangeTableStyleCommand; + /** + * Gets a command to toggle top borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellTopBorder: ToggleTableCellTopBorderCommand; + /** + * Gets a command to toggle right borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellRightBorder: ToggleTableCellRightBorderCommand; + /** + * Gets a command to toggle bottom borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellBottomBorder: ToggleTableCellBottomBorderCommand; + /** + * Gets a command to toggle left borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellLeftBorder: ToggleTableCellLeftBorderCommand; + /** + * Gets a command to remove the borders of the selected table cells. + * Value: A object that provides methods for executing the command and checking its state. + */ + removeTableCellBorders: RemoveTableCellBordersCommand; + /** + * Gets a command to toggle all borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellAllBorders: ToggleTableCellAllBordersCommand; + /** + * Gets a command to toggle inner horizontal borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellInsideHorizontalBorders: ToggleTableCellInsideHorizontalBordersCommand; + /** + * Gets a command to toggle inner vertical borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellInsideVerticalBorders: ToggleTableCellInsideVerticalBordersCommand; + /** + * Gets a command to toggle outer borders for selected cells on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + toggleTableCellOutsideBorders: ToggleTableCellOutsideBordersCommand; + /** + * Gets a command to change the selected table's style options. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableLook: ChangeTableLookCommand; + /** + * Gets a command to change the repository item's table border style. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableBorderRepositoryItem: ChangeTableBorderRepositoryItemCommand; + /** + * Gets a command to change cell shading in the selected table elements. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTableCellShading: ChangeTableCellShadingCommand; + /** + * Gets a command to toggle the display of grid lines for a table with no borders applied - on/off. + * Value: A object that provides methods for executing the command and checking its state. + */ + showTableGridLines: ShowTableGridLinesCommand; + /** + * Gets a command to invoke the Search Panel allowing end-users to search text and navigate through search results. + * Value: A object that provides methods for executing the command and checking its state. + */ + openFindPanel: OpenFindPanelCommand; + /** + * Gets a command to invoke the Find and Replace dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openFindAndReplaceDialog: OpenFindAndReplaceDialogCommand; + /** + * Gets a command to find all matches of the specified text in the document. + * Value: A object that provides methods for executing the command and checking its state. + */ + findAll: FindAllCommand; + /** + * Gets a command to hide the results of the search. + * Value: A object that provides methods for executing the command and checking its state. + */ + hideFindResults: HideFindResultsCommand; + /** + * Gets a command to search for a specific text and replace all matches in the document with the specified string. + * Value: A object that provides methods for executing the command and checking its state. + */ + replaceAll: ReplaceAllCommand; + /** + * Gets a command to search for a specific text and replace the next match in the document with the specified string. + * Value: A object that provides methods for executing the command and checking its state. + */ + replaceNext: ReplaceNextCommand; + /** + * Gets a command to invoke the Spelling dialog window. + * Value: A object that provides methods for executing the command and checking its state. + */ + openSpellingDialog: OpenSpellingDialogCommand; + /** + * Gets a command to assign a shortcut to the specified client command. + * Value: A object that provides methods for executing the command and checking its state. + */ + assignShortcut: AssignShortcutCommand; + /** + * Gets a command to invoke the Layout dialog window to customize the settings of a floating object. + * Value: A object that provides methods for executing the command and checking its state. + */ + openLayoutOptionsDialog: OpenLayoutOptionsDialogCommand; + /** + * Gets a command to insert a floating text box. + * Value: A object that provides methods for executing the command and checking its state. + */ + insertFloatingTextBox: InsertFloatingTextBoxCommand; + /** + * Gets a command to modify a floating object's alignment position. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectAlignmentPosition: ChangeFloatingObjectAlignmentPositionCommand; + /** + * Gets a command to change a floating object's absolute position. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectAbsolutePosition: ChangeFloatingObjectAbsolutePositionCommand; + /** + * Gets a command to modify a floating object's relative position. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectRelativePosition: ChangeFloatingObjectRelativePositionCommand; + /** + * Gets a command to lock a floating object's anchor. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectLockAnchor: ChangeFloatingObjectLockAnchorCommand; + /** + * Gets a command to modify a floating object's text wrapping settings. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectTextWrapping: ChangeFloatingObjectTextWrappingCommand; + /** + * Gets a command to change a floating object's absolute size. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectAbsoluteSize: ChangeFloatingObjectAbsoluteSizeCommand; + /** + * Gets a command to modify a text box' relative size settings. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTextBoxRelativeSize: ChangeTextBoxRelativeSizeCommand; + /** + * Gets a command to rotate a floating object. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectRotation: ChangeFloatingObjectRotationCommand; + /** + * Gets a command to lock a floating object's aspect ratio. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectLockAspectRatio: ChangeFloatingObjectLockAspectRatioCommand; + /** + * Gets a command to modify a floating object's background fill color. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectFillColor: ChangeFloatingObjectFillColorCommand; + /** + * Gets a command to modify a floating object's outline color. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectOutlineColor: ChangeFloatingObjectOutlineColorCommand; + /** + * Gets a command to modify a floating object's outline width. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeFloatingObjectOutlineWidth: ChangeFloatingObjectOutlineWidthCommand; + /** + * Gets a command to modify a text box' content margins. + * Value: A object that provides methods for executing the command and checking its state. + */ + changeTextBoxContentMargins: ChangeTextBoxContentMarginsCommand; + changeTextBoxResizeShapeToFitText: ChangeTextBoxResizeShapeToFitTextCommand; +} +/** + * Serves as a base for objects that implement different client command functionalities. + */ +interface CommandBase { +} +/** + * Serves as a base for commands with a simple common command state. + */ +interface CommandWithSimpleStateBase extends CommandBase { + /** + * Gets information about the command state. + */ + getState(): SimpleCommandState; +} +/** + * Serves as a base for commands with the Boolean state. + */ +interface CommandWithBooleanStateBase extends CommandBase { + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * Defines a simple state common to most of the client commands. + */ +interface SimpleCommandState { + /** + * Gets a value indicating whether the command's UI element is enabled (within the ribbon and context menu). + * Value: true, if the command's related UI element is enabled; otherwise, false. + */ + enabled: boolean; + /** + * Gets a value indicating whether the command's UI element is visible. + * Value: true, if the command's related UI element is visible; otherwise, false. + */ + visible: boolean; +} +/** + * Defines the state of a command. + */ +interface CommandState extends SimpleCommandState { + /** + * Gets the command state value. + * Value: A T object specifying the command state value. + */ + value: T; +} +/** + * Contains a set properties providing the current information about certain document structural elements. + */ +interface RichEditDocument { + /** + * Provides the information about the active sub-document. + * Value: A object storing information about the essential document functionality. + */ + activeSubDocument: SubDocument; + /** + * Provides information about sections in the current document. + * Value: An array of Section objects storing information about sections. + */ + sectionsInfo: Section[]; + /** + * Provides information about paragraph styles in the current document. + * Value: An array of ParagraphStyle objects storing information about paragraph styles. + */ + paragraphStylesInfo: ParagraphStyle[]; + /** + * Provides information about character styles in the current document. + * Value: An array of CharacterStyle objects storing information about character styles. + */ + characterStylesInfo: CharacterStyle[]; + /** + * Provides information about numbered paragraphs in the document. + * Value: An array of AbstractNumberingList objects storing the information about numbered paragraphs. + */ + abstractNumberingListsInfo: AbstractNumberingList[]; + /** + * Provides information about table styles in the current document. + * Value: An array of TableStyle objects storing information about table styles. + */ + tableStylesInfo: TableStyle[]; + /** + * Provides information about spell checking in the current document. + * Value: A object. + */ + spellingInfo: SpellingInfo; +} +/** + * An abstract numbering list definition that defines the appearance and behavior of numbered paragraphs in a document. + */ +interface AbstractNumberingList { + deleted: boolean; +} +/** + * Defines a paragraph in the document. + */ +interface Paragraph { + /** + * Gets the paragraph's character length. + * Value: An integer value specifying the element length in characters. + */ + length: number; + /** + * Gets the paragraph's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the text buffer interval occupied by the current paragraph element. + * Value: An object specifying the interval settings. + */ + interval: Interval; + /** + * Gets the name of the paragraph style applied to the current paragraph (see name). + * Value: A string value specifying the style name. + */ + styleName: string; + /** + * Gets the index of a list applied to the paragraph. + * Value: An integer that is the index of a list to which the paragraph belongs. + */ + listIndex: number; + /** + * Gets the index of the list level applied to the current paragraph in the numbering list. + * Value: An integer that is the index of the list level of the current paragraph. + */ + listLevelIndex: number; +} +/** + * Defines a field in the document. + */ +interface Field { + /** + * Gets the field's start position in a document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the field length in a document. + * Value: An integer value specifying the field length. + */ + length: number; + /** + * Gets the text buffer interval occupied by the field code element. + * Value: An object specifying the interval settings. + */ + codeInterval: Interval; + /** + * Gets the text buffer interval occupied by the field result element. + * Value: An object specifying the interval settings. + */ + resultInterval: Interval; + /** + * Gets the text buffer interval occupied by the current field element. + * Value: An object specifying the interval settings. + */ + interval: Interval; + /** + * Gets or sets a URI to navigate to when the hyperlink (represented by the current field) is activated. + * Value: A string representing an URI. + */ + hyperlinkUri: string; + /** + * Gets or sets the text for the tooltip displayed when the mouse hovers over a hyperlink field. + * Value: A string containing the tooltip text. + */ + hyperlinkTip: string; + /** + * Gets or sets the name of a bookmark (or a hyperlink) in the current document which shall be the target of the hyperlink field. + * Value: A string representing the bookmark's name. + */ + hyperlinkAnchor: string; + /** + * Gets a value specifying whether a field's code or result is dispalyed. + * Value: true, if the field code is displayed; false, if the field result is displayed. + */ + showCode: boolean; +} +/** + * Defines a bookmark in the document. + */ +interface Bookmark { + /** + * Gets the bookmark's start position in a document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the bookmark's length. + * Value: An integer value specifying the length of the bookmark. + */ + length: number; + /** + * Gets the text buffer interval occupied by the current bookmark element. + * Value: An object specifying the interval settings. + */ + interval: Interval; + /** + * Gets the name of a bookmark in the document. + * Value: A string that is the unique bookmark's name. + */ + name: string; +} +/** + * Defines a section in the document. + */ +interface Section { + /** + * Gets the section's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the section's character length. + * Value: An integer value specifying the element length in characters. + */ + length: number; + /** + * Gets the text buffer interval occupied by the current section element. + * Value: An object specifying the interval settings. + */ + interval: Interval; + /** + * Provides access to the section's headers. + * Value: An array of HeaderFooter objects storing information about the section's headers. + */ + headers: HeaderFooter[]; + /** + * Provides access to the section's footers. + * Value: An array of HeaderFooter objects storing information about the section's footers. + */ + footers: HeaderFooter[]; +} +/** + * Contains settings defining a header or footer in a document. + */ +interface HeaderFooter { + /** + * Gets the type of the header (footer). + * Value: One of the values. + */ + type: any; + /** + * Provides access to an object implementing the basic document functionality that is common to the header, footer and the main document body. + * Value: A object exposing the basic document functionality. + */ + subDocument: SubDocument; +} +/** + * Contains in-line picture settings. + */ +interface InlinePictureInfo { + /** + * Gets the image identifier. + * Value: An integer value specifying the image identifier. + */ + id: number; + /** + * Gets the image position. + * Value: An integer value specifying the image position. + */ + position: number; + /** + * Gets the initial image width. + * Value: An integer value specifying the image width. + */ + initialWidth: number; + /** + * Gets the initial image height. + * Value: An integer value specifying the image height. + */ + initialHeight: number; + /** + * Gets the X-scaling factor of the inline image. + * Value: An integer value specifying the scaling factor for the X-axis. + */ + scaleX: number; + /** + * Gets the Y-scaling factor of the inline image. + * Value: An integer value specifying the scaling factor for the Y-axis. + */ + scaleY: number; + /** + * Gets the actual image width. + * Value: An integer value specifying the image width. + */ + actualWidth: number; + /** + * Gets the actual image height. + * Value: An integer value specifying the image height. + */ + actualHeight: number; +} +declare enum HeaderFooterType { + First=0, + Odd=1, + Primary=1, + Even=2 +} +/** + * Contains the settings defining a file to save to. + */ +interface RichEditFileInfo { + /** + * Gets or sets the file's folder name. + * Value: A string value specifying the folder name. + */ + folderPath: string; + /** + * Gets or sets the file name. + * Value: A string value specifying the file name. + */ + fileName: string; + /** + * Gets or sets the file's document format. + * Value: A DocumentFormat enumeration value. + */ + documentFormat: any; +} +declare enum DocumentFormat { + Undefined=0, + PlainText=1, + Rtf=2, + Html=3, + OpenXml=4, + Mht=5, + WordML=6, + OpenDocument=7, + ePub=9, + Doc=10 +} +/** + * Contains a set of methods and properties to work with the document selection. + */ +interface RichEditSelection { + /** + * Gets or sets an array of document intervals in the selection. + * Value: An array of Interval objects. + */ + intervals: Interval[]; + /** + * Gets or sets a value specifying whether the current selection is collapsed (and represents the cursor position). + * Value: true, if the selection is collapsed; otherwise, false. + */ + collapsed: boolean; + /** + * Gets the maximum position of a document interval in the selection. + */ + getIntervalMaxPosition(): number; + /** + * Moves the cursor to the next line. + */ + goToNextLine(): void; + /** + * Moves the cursor to the next line and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToNextLine(extendSelection: boolean): void; + /** + * Moves the cursor to the end of the line in which the cursor is located. + */ + goToLineEnd(): void; + /** + * Moves the cursor to the end of the line in which the cursor is located and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToLineEnd(extendSelection: boolean): void; + /** + * Moves the cursor to the start of the line in which the cursor is located. + */ + goToLineStart(): void; + /** + * Moves the cursor to the start of the line in which the cursor is located and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToLineStart(extendSelection: boolean): void; + /** + * Moves the cursor to the previous line. + */ + goToPreviousLine(): void; + /** + * Moves the cursor to the previous line and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToPreviousLine(extendSelection: boolean): void; + /** + * Moves the cursor to the next character. + */ + goToNextCharacter(): void; + /** + * Moves the cursor to the next character and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToNextCharacter(extendSelection: boolean): void; + /** + * Moves the cursor to the previous character. + */ + goToPreviousCharacter(): void; + /** + * Moves the cursor to the previous character and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToPreviousCharacter(extendSelection: boolean): void; + /** + * Selects the line in which the cursor is located. + */ + selectLine(): void; + /** + * Selects the line in which the cursor is located and allows you to extend the entire selection with the currently existing selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + selectLine(extendSelection: boolean): void; + /** + * Moves the cursor to the beginning of the next page. + */ + goToNextPage(): void; + /** + * Moves the cursor to the beginning of the next page and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToNextPage(extendSelection: boolean): void; + /** + * Moves the cursor to the beginning of the previous page. + */ + goToPreviousPage(): void; + /** + * Moves the cursor to the beginning of the previous page and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToPreviousPage(extendSelection: boolean): void; + /** + * Moves the cursor to the start of the document. + */ + goToDocumentStart(): void; + /** + * Moves the cursor to the start of the document and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToDocumentStart(extendSelection: boolean): void; + /** + * Moves the cursor to the end of the document. + */ + goToDocumentEnd(): void; + /** + * Moves the cursor to the end of the document and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToDocumentEnd(extendSelection: boolean): void; + /** + * Moves the cursor to the next word. + */ + goToNextWord(): void; + /** + * Moves the cursor to the next word and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToNextWord(extendSelection: boolean): void; + /** + * Moves the cursor to the previous word. + */ + goToPrevWord(): void; + /** + * Moves the cursor to the previous word and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToPrevWord(extendSelection: boolean): void; + /** + * Moves the cursor to the start of the paragraph in which the cursor is located. + */ + goToParagraphStart(): void; + /** + * Moves the cursor to the start of the paragraph in which the cursor is located and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToParagraphStart(extendSelection: boolean): void; + /** + * Moves the cursor to the end of the paragraph in which the cursor is located. + */ + goToParagraphEnd(): void; + /** + * Moves the cursor to the end of the paragraph in which the cursor is located and allows you to extend the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToParagraphEnd(extendSelection: boolean): void; + /** + * Selects the paragraph in which the cursor is located. + */ + selectParagraph(): void; + /** + * Moves the cursor to the next page break mark. + */ + goToStartNextPageCommand(): void; + /** + * Moves the cursor to the next page break mark and extends the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToStartNextPageCommand(extendSelection: boolean): void; + /** + * Moves the cursor to the previous page break mark. + */ + goToStartPrevPageCommand(): void; + /** + * Moves the cursor to the previous page break mark and extends the selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + goToStartPrevPageCommand(extendSelection: boolean): void; + /** + * Selects the table cell in which the cursor is located. + */ + selectTableCell(): void; + /** + * Selects the table cell in which the cursor is located and allows you to extend the entire selection with the currently existing selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + selectTableCell(extendSelection: boolean): void; + /** + * Selects the table row in which the cursor is located. + */ + selectTableRow(): void; + /** + * Selects the table row in which the cursor is located and allows you to extend the entire selection with the currently existing selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + selectTableRow(extendSelection: boolean): void; + /** + * Selects the entire table in which the cursor is located. + */ + selectTable(): void; + /** + * Selects the entire table in which the cursor is located and allows you to extend the entire selection with the currently existing selection. + * @param extendSelection true to extend the selection; otherwise, false. + */ + selectTable(extendSelection: boolean): void; + /** + * Selects the editor's entire content. + */ + selectAll(): void; + /** + * Makes the main sub-document active and moves the cursor to its beginning. + */ + setMainSubDocumentAsActive(): void; + /** + * Creates a footer sub-document (if it was not created before) and sets the footer as the active sub-document. Moves the cursor to the footer's start position. + * @param pageIndex An integer value specifying the active page's index. + */ + setFooterSubDocumentAsActiveByPageIndex(pageIndex: number): void; + /** + * Creates a header sub-document (if it was not created before) and sets the header as the active sub-document. Moves the cursor to the header's start position. + * @param pageIndex An integer value specifying the active page's index. + */ + setHeaderSubDocumentAsActiveByPageIndex(pageIndex: number): void; +} +/** + * Defines a document's interval. + */ +interface Interval { + /** + * Gets the interval's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the interval's character length. + * Value: An integer value specifying the element length in characters. + */ + length: number; +} +/** + * Contains spell checking related settings. + */ +interface SpellingInfo { + /** + * Gets a value specifying the spell checking state. + * Value: One of the enumeration values. + */ + spellCheckerState: any; + /** + * Provides access to an array containing misspelled intervals. + * Value: An array of objects. + */ + misspelledIntervals: MisspelledInterval[]; +} +declare enum SpellCheckerState { + Disabled=0, + InProgress=1, + Done=2 +} +/** + * Contains the settings defining a misspelled interval. + */ +interface MisspelledInterval { + /** + * Gets the start position of the misspelled word in the interval. + * Value: An integer value specifying the misspelled word's start position. + */ + start: number; + /** + * Gets the length of the misspelled interval. + * Value: An integer value specifying the misspelled interval's length. + */ + length: number; + /** + * Gets the text buffer interval occupied by the current element. + * Value: An object specifying the interval settings. + */ + interval: Interval; + /** + * Gets the spelling error type. + * Value: One of the enumeration values. + */ + errorType: any; + /** + * Gets an erroneous word found during spell check. + * Value: A string that is the erroneous or misspelled word. + */ + word: string; + /** + * Gets a list of suggested words to replace the misspelled word. + * Value: A string array containing suggested words. + */ + suggestions: string[]; +} +declare enum SpellingErrorType { + Misspelling=0, + Repeating=1 +} +/** + * Serves as a base for objects implementing different element styles. + */ +interface StyleBase { + /** + * Gets or sets the name of the style. + * Value: A string specifying the style name. + */ + name: string; + /** + * Gets whether the specified style is marked as deleted. + * Value: true, if the style is deleted; otherwise, false. + */ + isDeleted: boolean; +} +/** + * Defines the paragraph style settings. + */ +interface ParagraphStyle extends StyleBase { + /** + * Gets or sets the linked style for the current style. + * Value: A object representing a character style linked to a current style. + */ + linkedStyle: CharacterStyle; + /** + * Gets or sets the default style for a paragraph that immediately follows the current paragraph. + * Value: A object specifying the style for the next paragraph. + */ + nextStyle: ParagraphStyle; + /** + * Gets the index of the list item associated with the paragraph formatted with the current style. + * Value: An integer value specifying the list item index. + */ + listIndex: number; + /** + * Gets the index of the list level applied to the paragraph formatted with the current style. + * Value: An integer that is the list level index. + */ + listLevelIndex: number; + /** + * Gets or sets the style from which the current style inherits. + * Value: A object representing the parent style. + */ + parent: ParagraphStyle; +} +/** + * Contains characteristics of a character style in a document. + */ +interface CharacterStyle extends StyleBase { + /** + * Gets or sets the linked style for the current style. + * Value: A object representing a paragraph style linked to a current style. + */ + linkedStyle: ParagraphStyle; + /** + * Gets the style form which the current style inherits. + * Value: A object representing the parent style. + */ + parent: CharacterStyle; +} +/** + * Defines the table style settings. + */ +interface TableStyle extends StyleBase { + /** + * Gets or sets the style from which the current style inherits. + * Value: A object that is the parent style. + */ + parent: TableStyle; +} +/** + * Exposes the settings providing the information about the essential document functionality. + */ +interface SubDocument { + /** + * Gets the sub-document identifier. + * Value: An integer value specifying the sub-document identifier. + */ + id: number; + /** + * Gets a value specifying the sub-document type. + * Value: One of the enumeration values. + */ + type: any; + /** + * Provides information about paragraphs contained in the document. + * Value: An array of Paragraph objects storing information about document paragraphs. + */ + paragraphsInfo: Paragraph[]; + /** + * Provides information about fields in the current document. + * Value: An array of Field objects storing information about document fields. + */ + fieldsInfo: Field[]; + /** + * Provides information about tables contained in the document. + * Value: An array of Table objects storing information about document tables. + */ + tablesInfo: Table[]; + /** + * Provides information about document bookmarks. + * Value: An array of Bookmark objects storing information about document bookmarks. + */ + bookmarksInfo: Bookmark[]; + /** + * Provides access to an array of objects containing in-line picture settings. + * Value: An array of objects. + */ + inlinePicturesInfo: InlinePictureInfo[]; + /** + * Gets the document's textual representation. + * Value: A string value specifying the document's text. + */ + text: string; + /** + * Gets the character length of the document. + * Value: An integer that is the number of character positions in the document. + */ + length: number; +} +declare enum SubDocumentType { + Main=0, + Header=1, + Footer=2, + TextBox=3 +} +/** + * Defines a table in the document. + */ +interface Table { + /** + * Gets the table's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the table length in characters. + * Value: A integer value specifying the character length of the table. + */ + length: number; + /** + * Gets the text buffer interval occupied by the current table element. + * Value: An object specifying the interval settings. + */ + interval: Interval; + /** + * Provides access to a collection of table rows. + * Value: An array of TableRow objects storing information about individual table rows. + */ + rows: TableRow[]; + /** + * Gets the name of the style applied to the table (see name). + * Value: A string value specifying the style name. + */ + styleName: string; +} +/** + * Defines a table row in the document. + */ +interface TableRow { + /** + * Gets the table row's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the table row's character length. + * Value: An integer value specifying the element length in characters. + */ + length: number; + /** + * Gets the text buffer interval occupied by the current table row element. + * Value: An object specifying the interval settings. + */ + interval: Interval; + /** + * Provides information about the table row's cells. + * Value: An array of TableCell objects storing information about cells. + */ + cells: TableCell[]; +} +/** + * Defines a table cell in the document. + */ +interface TableCell { + /** + * Gets the table cell's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets the table cell's character length. + * Value: An integer value specifying the element length in characters. + */ + length: number; + /** + * Gets the text buffer interval occupied by the current table cell element. + * Value: An object specifying the interval settings. + */ + interval: Interval; +} +/** + * Contains the method to convert different units of measurement. + */ +interface RichEditUnitConverter { + /** + * Converts a measurement from pixels to twips. + * @param value The pixels value to be converted. + */ + pixelsToTwips(value: number): number; + /** + * Converts a measurement from inches to twips. + * @param value The inches value (floating) to be converted. + */ + inchesToTwips(value: number): number; + /** + * Converts a measurement from points to twips. + * @param value The points value to be converted. + */ + pointsToTwips(value: number): number; + /** + * Converts a value in centimeters to twips. + * @param value A floating value specifying the value in centimeters to convert. + */ + centimetersToTwips(value: number): number; + /** + * Converts a measurement from twips to centimeters. + * @param value The twips value to be converted. + */ + twipsToCentimeters(value: number): number; + /** + * Converts a measurement from pixels to centimeters. + * @param value The pixels value to be converted. + */ + pixelsToCentimeters(value: number): number; + /** + * Converts a measurement from twips to inches. + * @param value The twips value to be converted. + */ + twipsToInches(value: number): number; + /** + * Converts a measurement from pixels to inches. + * @param value The pixels value to be converted. + */ + pixelsToInches(value: number): number; + /** + * Converts a measurement from pixels to points. + * @param value The pixels value to be converted. + */ + pixelsToPoints(value: number): number; + /** + * Converts a measurement from twips to points. + * @param value The twips value to be converted. + */ + twipsToPoints(value: number): number; +} +/** + * A command to invoke the Bookmark dialog. + */ +interface OpenInsertBookmarkDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenInsertBookmarkDialogCommand 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; +} +/** + * A command to insert a new bookmark that references the current selection. + */ +interface InsertBookmarkCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertBookmarkCommand command by applying the specified settings. 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 name A string value specifying a name of the created bookmark. + * @param start An integer value specifying the start position of the bookmark's range. + * @param length An integer value specifying the length of the bookmark's range. + */ + execute(name: string, start: number, length: number): boolean; +} +/** + * A command to delete a specific bookmark. + */ +interface DeleteBookmarkCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteBookmarkCommand 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 name A string value specifying a name of the deleted bookmark. + */ + execute(name: string): boolean; +} +/** + * Gets a command to navigate to the specified bookmark in the document. + */ +interface GoToBookmarkCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToBookmarkCommand 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 name + */ + execute(name: string): boolean; +} +/** + * A command to paste the text from the clipboard over the selection. + */ +interface PasteCommand extends CommandWithSimpleStateBase { + /** + * Executes the PasteCommand 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; +} +/** + * A command to copy the selected text and place it to the clipboard. + */ +interface CopyCommand extends CommandWithSimpleStateBase { + /** + * Executes the CopyCommand 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; +} +/** + * A command to cut the selected text and place it to the clipboard. + */ +interface CutCommand extends CommandWithSimpleStateBase { + /** + * Executes the CutCommand 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; +} +/** + * A command to insert an empty document field at the current position in the document. + */ +interface CreateFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the CreateFieldCommand 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; +} +/** + * A command to update the field's result. + */ +interface UpdateFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the UpdateFieldCommand 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; +} +/** + * A command to display the selected field's field codes. + */ +interface ShowFieldCodesCommand extends CommandWithSimpleStateBase { + /** + * Executes the ShowFieldCodesCommand 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 showFieldCodes true to display field codes, false to hide field codes. + */ + execute(showFieldCodes: boolean): boolean; + /** + * Executes the ShowFieldCodesCommand 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; +} +/** + * A command to display all field codes in place of the fields in the document. + */ +interface ShowAllFieldCodesCommand extends CommandWithSimpleStateBase { + /** + * Executes the ShowAllFieldCodesCommand 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 showFieldCodes true to display field codes, false to hide field codes. + */ + execute(showFieldCodes: boolean): boolean; + /** + * Executes the ShowAllFieldCodesCommand 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; +} +/** + * A command to update all fields in the selected range. + */ +interface UpdateAllFieldsCommand extends CommandWithSimpleStateBase { + /** + * Executes the UpdateAllFieldsCommand 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; +} +/** + * A command to insert a DATE field displaying the current date. + */ +interface CreateDateFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the CreateDateFieldCommand 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; +} +/** + * A command to insert a TIME field displaying the current time. + */ +interface CreateTimeFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the CreateTimeFieldCommand 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; +} +/** + * A command to insert a PAGE field displaying the current page number. + */ +interface CreatePageFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the CreatePageFieldCommand 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; +} +/** + * A command to navigate to the next data record of the bound data source. + */ +interface GoToDataRecordCommand extends CommandBase { + /** + * Executes the GoToDataRecordCommand 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 activeRecordIndex An integer value specifying index of the next data record. + */ + execute(activeRecordIndex: number): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * Contains the settings defining a data record. + */ +interface DataRecordOptions { + /** + * Gets or sets the index of the active data record. + * Value: An integer value specifying the data record index. + */ + activeRecordIndex: number; + recordCount: number; +} +/** + * A command to navigate to the first data record of the bound data source. + */ +interface GoToFirstDataRecordCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToFirstDataRecordCommand 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; +} +/** + * A command to navigate to the previous data record of the bound data source. + */ +interface GoToPreviousDataRecordCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToPreviousDataRecordCommand 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; +} +/** + * A command to navigate to the next data record of the bound data source. + */ +interface GoToNextDataRecordCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToNextDataRecordCommand 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; +} +/** + * A command to navigate to the last data record of the bound data source. + */ +interface GoToLastDataRecordCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToLastDataRecordCommand 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; +} +/** + * A command to display or hide actual data in MERGEFIELD fields. + */ +interface ShowMergedDataCommand extends CommandWithBooleanStateBase { + /** + * Executes the ShowMergedDataCommand 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 ShowMergedDataCommand 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 showMergedData true to display merged data, false to hide merged data. + */ + execute(showMergedData: boolean): boolean; +} +/** + * A command to invoke the Insert Merge Field dialog. + */ +interface MergeFieldDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the MergeFieldDialogCommand 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; +} +/** + * A command to insert a MERGEFIELD field (with a data source column name) at the current position in the document. + */ +interface CreateMergeFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the CreateMergeFieldCommand 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 fieldName A string value specifying the name of the merge field. + */ + execute(fieldName: string): boolean; +} +/** + * Gets a command to invoke the Export Range dialog to start a mail merge. + */ +interface MailMergeDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the MailMergeDialogCommand 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; +} +/** + * A command to start the mail merge process and download the resulting document containing the merged information. + */ +interface MailMergeAndDownloadCommand extends CommandBase { + /** + * Executes the MailMergeAndDownloadCommand 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 fileExtension A string value specifying the file extension of the resulting document. + */ + execute(fileExtension: string): boolean; + /** + * Executes the MailMergeAndDownloadCommand 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 documentFormat One of the DocumentFormat enumeration values. + */ + execute(documentFormat: any): boolean; + /** + * Executes the MailMergeAndDownloadCommand command by applying the specified settings. 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 fileExtension A string value specifying the file extension of the resulting document. + * @param settings A MailMergeSettings object containing settings to set up mail merge operations. + */ + execute(fileExtension: string, settings: MailMergeSettings): boolean; + /** + * Executes the MailMergeAndDownloadCommand command by applying the specified settings. 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 documentFormat One of the DocumentFormat enumeration values. + * @param settings A MailMergeSettings object specifying the mail merge settings. + */ + execute(documentFormat: any, settings: MailMergeSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to start the mail merge process and save the resulting merged document to the server. + */ +interface MailMergeAndSaveAsCommand extends CommandBase { + /** + * Executes the MailMergeAndSaveAsCommand 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 filePath A string value specifying path to the saving file on the server. + */ + execute(filePath: string): boolean; + /** + * Executes the MailMergeAndSaveAsCommand command by applying the specified settings. 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 fileInfo A RichEditFileInfo object specifying a file to save to. + * @param settings A MailMergeSettings object specifying the mail merge settings. + */ + execute(fileInfo: RichEditFileInfo, settings: MailMergeSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to insert a NUMPAGES field displaying the total number of pages. + */ +interface CreatePageCountFieldCommand extends CommandWithSimpleStateBase { + /** + * Executes the CreatePageCountFieldCommand 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; +} +/** + * Contains settings to set up mail merge operations. + */ +interface MailMergeSettings { + /** + * Gets or sets a value specifying which data rows should be exported into a merged document. + * Value: One of the values. + */ + range: any; + /** + * Gets or sets the index of the row from which the exported range starts. + * Value: An integer value specifying the row index. + */ + exportFrom: number; + /** + * Gets or sets the number of data rows in the exported mail-merge range. + * Value: An integer value specifying the row count. + */ + exportRecordsCount: number; + /** + * Gets or sets the merge mode. + * Value: One of the values. + */ + mergeMode: any; +} +declare enum MergeMode { + NewParagraph=0, + NewSection=1, + JoinTables=2 +} +declare enum MailMergeExportRange { + AllRecords=0, + CurrentRecord=1, + Range=2 +} +/** + * A command to create a new empty document. + */ +interface FileNewCommand extends CommandWithSimpleStateBase { + /** + * Executes the FileNewCommand 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; +} +/** + * A command to open the file, specifying its path. + */ +interface FileOpenCommand extends CommandWithSimpleStateBase { + /** + * Executes the FileOpenCommand 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 opening file. + */ + execute(path: string): boolean; +} +/** + * A command to invoke the File Open dialog allowing one to select and load a document file into RichEdit. + */ +interface FileOpenDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the FileOpenDialogCommand 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; +} +/** + * A command to save the document to a file. + */ +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; +} +/** + * 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. + */ +interface FileSaveAsCommand extends CommandWithSimpleStateBase { + /** + * Executes the FileSaveAsCommand 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; + /** + * Executes the FileSaveAsCommand 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 fileInfo A object specifying a file to save to. + */ + execute(fileInfo: RichEditFileInfo): boolean; +} +/** + * A command to download the document file, specifying its extension. + */ +interface FileDownloadCommand extends CommandWithSimpleStateBase { + /** + * Executes the FileDownloadCommand 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 fileExtension A string value specifying the extension of the downloading file. + */ + execute(fileExtension: string): boolean; + /** + * Executes the FileDownloadCommand 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 documentFormat A DocumentFormat enumeration value. + */ + execute(documentFormat: any): boolean; +} +/** + * A command to open the file's Save As dialog. + */ +interface FileSaveAsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the FileSaveAsDialogCommand 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; +} +/** + * A command to invoke a browser-specific Print dialog allowing one to print the current document. + */ +interface FilePrintCommand extends CommandWithSimpleStateBase { + /** + * Executes the FilePrintCommand 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; +} +/** + * A command to invoke the Search Panel allowing end-users to search text and navigate through search results. + */ +interface OpenFindPanelCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenFindPanelCommand 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; +} +/** + * A command to invoke the Find and Replace dialog. + */ +interface OpenFindAndReplaceDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenFindAndReplaceDialogCommand 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; +} +/** + * A command to find all matches of the specified text in the document. + */ +interface FindAllCommand extends CommandWithSimpleStateBase { + /** + * Executes the FindAllCommand command by applying the specified settings. 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 text A string value specifying finding text. + * @param matchCase true, to perform a case-sensitive search; otherwise, false. + * @param highlightResults true, to highlight result of search; otherwise, false. + */ + execute(text: string, matchCase: boolean, highlightResults: boolean): boolean; + /** + * Executes the FindAllCommand command by applying the specified settings. 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 text A string value specifying text to find. + * @param matchCase true, to perform a case-sensitive search; otherwise, false. + * @param highlightResults true, to highlight result of search; otherwise, false. + * @param results An array of Interval objects containing the results of search. + */ + execute(text: string, matchCase: boolean, highlightResults: boolean, results: Interval[]): boolean; +} +/** + * A command to hide the search results. + */ +interface HideFindResultsCommand extends CommandWithSimpleStateBase { + /** + * Executes the HideFindResultsCommand 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; +} +/** + * A command to search for a specific text and replace all matches in the document with the specified string. + */ +interface ReplaceAllCommand extends CommandWithSimpleStateBase { + /** + * Executes the ReplaceAllCommand command by applying the specified settings. 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 text A string value specifying a text to replace. + * @param replaceText A string value specifying the replacing text. + * @param matchCase true, to perform a case-sensitive search; otherwise, false. + */ + execute(text: string, replaceText: string, matchCase: boolean): boolean; +} +/** + * A command to search for a specific text and replace the next match in the document with the specified string. + */ +interface ReplaceNextCommand extends CommandWithSimpleStateBase { + /** + * Executes the ReplaceNextCommand command by applying the specified settings. 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 text A string value specifying text to replace. + * @param replaceText A string value specifying replacing text. + * @param matchCase true, to perform a case-sensitive search; otherwise, false. + */ + execute(text: string, replaceText: string, matchCase: boolean): boolean; +} +interface OpenLayoutOptionsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenLayoutOptionsDialogCommand 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; +} +/** + * A command to insert a floating text box. + */ +interface InsertFloatingTextBoxCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertFloatingTextBoxCommand 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; +} +/** + * A command to lock a floating object's anchor. + */ +interface ChangeFloatingObjectLockAnchorCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectLockAnchorCommand 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 lockAnchor true to lock the anchor; false, otherwise. + */ + execute(lockAnchor: boolean): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to modify a floating object's alignment position. + */ +interface ChangeFloatingObjectAlignmentPositionCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectAlignmentPositionCommand 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 settings A FloatingObjectAlignmentPositionSettings object specifying alignment position settings. + */ + execute(settings: FloatingObjectAlignmentPositionSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change a floating object's absolute position. + */ +interface ChangeFloatingObjectAbsolutePositionCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectAbsolutePositionCommand 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 settings A FloatingObjectAbsolutePositionSettings object specifying page margin settings. + */ + execute(settings: FloatingObjectAbsolutePositionSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to modify a floating object's relative position. + */ +interface ChangeFloatingObjectRelativePositionCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectRelativePositionCommand 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 settings A FloatingObjectRelativePositionSettings object specifying relative positioin settings. + */ + execute(settings: FloatingObjectRelativePositionSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to modify a floating object's text wrapping settings. + */ +interface ChangeFloatingObjectTextWrappingCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectTextWrappingCommand 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 settings A FloatingObjectTextWrappingSettings object specifying text wrapping settings. + */ + execute(settings: FloatingObjectTextWrappingSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change a floating object's absolute size. + */ +interface ChangeFloatingObjectAbsoluteSizeCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectAbsoluteSizeCommand 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 settings A FloatingObjectAbsoluteSizeSettings object specifying absolute size settings. + */ + execute(settings: FloatingObjectAbsoluteSizeSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to modify a text box' relative size settings. + */ +interface ChangeTextBoxRelativeSizeCommand extends CommandBase { + /** + * Executes the ChangeTextBoxRelativeSizeCommand 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 settings A TextBoxRelativeSizeSettings object specifying relative size settings. + */ + execute(settings: TextBoxRelativeSizeSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to rotate a floating object. + */ +interface ChangeFloatingObjectRotationCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectRotationCommand 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 rotation An integer value specifying the angle of rotation. + */ + execute(rotation: number): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to lock a floating object's aspect ratio. + */ +interface ChangeFloatingObjectLockAspectRatioCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectLockAspectRatioCommand 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 lockAspectRatio true to lock the aspect ratio and maintain the proportions; otherwise, false. + */ + execute(lockAspectRatio: boolean): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to modify a floating object's background fill color. + */ +interface ChangeFloatingObjectFillColorCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectFillColorCommand 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 color A string value specifying the color. + */ + execute(color: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to modify a floating object's outline color. + */ +interface ChangeFloatingObjectOutlineColorCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectOutlineColorCommand 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 color A string value specifying the color. + */ + execute(color: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to modify a floating object's outline width. + */ +interface ChangeFloatingObjectOutlineWidthCommand extends CommandBase { + /** + * Executes the ChangeFloatingObjectOutlineWidthCommand 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 width An integer value specifying the outline width. + */ + execute(width: number): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to modify a text box' content margins. + */ +interface ChangeTextBoxContentMarginsCommand extends CommandBase { + /** + * Executes the ChangeTextBoxContentMarginsCommand 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 settings A Margins object specifying margin settings. + */ + execute(settings: Margins): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +interface ChangeTextBoxResizeShapeToFitTextCommand extends CommandBase { + execute(resizeShapeToFitText: boolean): boolean; + getState(): any; +} +/** + * Contains alignment position settings for floating objects. + */ +interface FloatingObjectAlignmentPositionSettings { + /** + * Gets or sets a value specifying how a floating object is horizontally aligned relative to an element specified by the horizontalPositionAlignment property. + * Value: One of the enumeration values. + */ + horizontalPositionAlignment: any; + /** + * Gets or sets a value specifying to what element the horizontal alignment of a floating object is relative. + * Value: One of the enumeration values. + */ + horizontalPositionType: any; + /** + * Gets or sets a value specifying how a floating object is vertically aligned relative to an element specified by the verticalPositionAlignment property. + * Value: One of the enumeration values. + */ + verticalPositionAlignment: any; + /** + * Gets or sets a value specifying to what element the vertical alignment of a floating object is relative. + * Value: One of the enumeration values. + */ + verticalPositionType: any; +} +/** + * Contains page margin settings. + */ +interface FloatingObjectAbsolutePositionSettings { + /** + * Gets or sets a floating object's horizontal position relative to an element specified by the horizontalPositionType property. + * Value: An integer value specifying the position. + */ + horizontalAbsolutePosition: number; + /** + * Gets or sets a value specifying to what element the horizontal position of a floating object is relative. + * Value: One of the enumeration values. + */ + horizontalPositionType: any; + /** + * Gets or sets a floating object's vertical position relative to an element specified by the verticalPositionType property. + * Value: An integer value specifying the position. + */ + verticalAbsolutePosition: number; + /** + * Gets or sets a value specifying to what element the vertical position of a floating object is relative. + * Value: One of the enumeration values. + */ + verticalPositionType: any; +} +/** + * Contains relative position settings for floating objects. + */ +interface FloatingObjectRelativePositionSettings { + /** + * Gets or sets the horizontal distance between the edge of a floating object and the element specified by the horizontalRelativePosition property + * Value: An integer value specifying the horizontal position. + */ + horizontalRelativePosition: number; + /** + * Gets or sets a value specifying to what element the horizontal position of a floating object is relative. + * Value: One of the enumeration values. + */ + horizontalPositionType: any; + /** + * Gets or sets the horizontal distance between the edge of a floating object and the element specified by the verticalRelativePosition property + * Value: An integer value specifying the vertical position. + */ + verticalRelativePosition: number; + /** + * Gets or sets a value specifying to what element the vertical position of a floating object is relative. + * Value: One of the enumeration values. + */ + verticalPositionType: any; +} +/** + * Contains text wrapping settings for floating objects. + */ +interface FloatingObjectTextWrappingSettings { + /** + * Gets or sets a value specifying how text is wrapped around a floating object. + * Value: One of the enumeration values. + */ + floatingObjectTextWrapType: any; + /** + * Gets or sets a value specifying how text can wrap around a floating object's left and right sides. + * Value: One of the enumeration values. + */ + floatingObjectTextWrapSide: any; + /** + * Gets or sets the left offset of text wrapping. + * Value: An integer value specifying the left offset. + */ + leftDistance: number; + /** + * Gets or sets the right offset of text wrapping. + * Value: An integer value specifying the right offset. + */ + rightDistance: number; + /** + * Gets or sets the top offset of text wrapping. + * Value: An integer value specifying the top offset. + */ + topDistance: number; + /** + * Gets or sets the bottom offset of text wrapping. + * Value: An integer value specifying the bottom offset. + */ + bottomDistance: number; +} +/** + * Contains absolute size settings for floating objects. + */ +interface FloatingObjectAbsoluteSizeSettings { + /** + * Gets or sets a floating object's absolute width. + * Value: An integer value specifying the width. + */ + absoluteWidth: number; + /** + * Gets or sets a floating object's absolute height. + * Value: An integer value specifying the height. + */ + absoluteHeight: number; +} +/** + * Contains relative size settings for floating objects. + */ +interface TextBoxRelativeSizeSettings { + /** + * Gets or sets the percentage specifying a floating object's width relative to the element defined by the relativeWidthType property. + * Value: An integer value specifying the relative width, as a percentage. + */ + relativeWidth: number; + /** + * Gets or sets a value specifying to what element the floating object width is relative. + * Value: One of the enumeration values. + */ + relativeWidthType: any; + /** + * Gets or sets the percentage specifying a floating object's height relative to the element defined by the relativeHeightType property. + * Value: An integer value specifying the relative height, as a percentage. + */ + relativeHeight: number; + /** + * Gets or sets a value specifying to what element the floating object height is relative. + * Value: One of the enumeration values. + */ + relativeHeightType: any; +} +declare enum FloatingObjectRelativeWidthType { + Margin=0, + Page=1, + LeftMargin=2, + RightMargin=3, + InsideMargin=4, + OutsideMargin=5 +} +declare enum FloatingObjectRelativeHeightType { + Margin=0, + Page=1, + TopMargin=2, + BottomMargin=3, + InsideMargin=4, + OutsideMargin=5 +} +declare enum FloatingObjectTextWrapType { + None=0, + TopAndBottom=1, + Tight=2, + Through=3, + Square=4 +} +declare enum FloatingObjectTextWrapSide { + Both=0, + Left=1, + Right=2, + Largest=3 +} +declare enum FloatingObjectHorizontalPositionType { + Page=0, + Character=1, + Column=2, + Margin=3, + LeftMargin=4, + RightMargin=5, + InsideMargin=6, + OutsideMargin=7 +} +declare enum FloatingObjectHorizontalPositionAlignment { + None=0, + Left=1, + Center=2, + Right=3, + Inside=4, + Outside=5 +} +declare enum FloatingObjectVerticalPositionType { + Page=0, + Line=1, + Paragraph=2, + Margin=3, + TopMargin=4, + BottomMargin=5, + InsideMargin=6, + OutsideMargin=7 +} +declare enum FloatingObjectVerticalPositionAlignment { + None=0, + Top=1, + Center=2, + Bottom=3, + Inside=4, + Outside=5 +} +/** + * A command to cancel changes caused by the previous command. + */ +interface UndoCommand extends CommandWithSimpleStateBase { + /** + * Executes the UndoCommand 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; +} +/** + * A command to reverse actions of the previous undo command. + */ +interface RedoCommand extends CommandWithSimpleStateBase { + /** + * Executes the RedoCommand 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; +} +/** + * A command to invoke the Hyperlink dialog. + */ +interface OpenInsertHyperlinkDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenInsertHyperlinkDialogCommand 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; +} +/** + * A command to insert a hyperlink at the current position in the document. + */ +interface InsertHyperlinkCommand extends CommandBase { + /** + * Executes the InsertHyperlinkCommand 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 settings A HyperLinkSettings object specifying hyperlink settings. + */ + execute(settings: HyperlinkSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to delete the selected hyperlink. + */ +interface DeleteHyperlinkCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteHyperlinkCommand 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; +} +/** + * A command to delete all hyperlinks in a selected range. + */ +interface DeleteHyperlinksCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteHyperlinksCommand 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; +} +/** + * A command to navigate to the document bookmark or URI (uniform resource identifier) specified for the hyperlink. + */ +interface OpenHyperlinkCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenHyperlinkCommand 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; +} +/** + * Contains settings to define hyperlinks. + */ +interface HyperlinkSettings { + /** + * Gets or sets a text displayed for a hyperlink. + * Value: A string value specifying the hyperlink display text. + */ + text: string; + /** + * Gets or sets a text for the tooltip displayed when the mouse hovers over a hyperlink. + * Value: A string containing the tooltip text. + */ + tooltip: string; + /** + * Gets or sets the hyperlink destination. + * Value: A string value that specifies the destination to which a hyperlink refers. + */ + url: string; + /** + * Gets or sets the associated bookmak. + * Value: A string value specifying the bookmark name. + */ + bookmark: string; +} +/** + * A command to insert a page break at the current position in the document. + */ +interface InsertPageBreakCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertPageBreakCommand 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; +} +/** + * A command to insert a column break at the current position in the document. + */ +interface InsertColumnBreakCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertColumnBreakCommand 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; +} +/** + * A command to insert a section break and start a new section on the next page. + */ +interface InsertSectionBreakNextPageCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertSectionBreakNextPageCommand 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; +} +/** + * A command to insert a section break and start a new section on the next even-numbered page. + */ +interface InsertSectionBreakEvenPageCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertSectionBreakEvenPageCommand 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; +} +/** + * A command to insert a section break and start a new section on the next odd-numbered page. + */ +interface InsertSectionBreakOddPageCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertSectionBreakOddPageCommand 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; +} +/** + * A command to insert the line break at the current position in the document. + */ +interface InsertLineBreakCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertLineBreakCommand 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; +} +/** + * A command to toggle between the bulleted paragraph and normal text. + */ +interface ToggleBulletedListCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleBulletedListCommand 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; +} +/** + * A command to toggle between the numbered paragraph and normal text. + */ +interface ToggleNumberingListCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleNumberingListCommand 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; +} +/** + * A command to toggle between the multilevel list style and normal text. + */ +interface ToggleMultilevelListCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleMultilevelListCommand 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; +} +/** + * A command to invoke the Bulleted and Numbering dialog. + */ +interface OpenNumberingListDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenNumberingListDialogCommand 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; +} +/** + * A command to invoke the Customize Numbered List dialog. + */ +interface OpenCustomNumberingListDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenCustomNumberingListDialogCommand 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 abstractNumberingListIndex An integer value specifying index of abstract numbering list. + */ + execute(abstractNumberingListIndex: number): boolean; +} +/** + * A command to customize the numbered list parameters. + */ +interface ChangeCustomNumberingListCommand extends CommandBase { + /** + * Executes the ChangeCustomNumberingListCommand command by applying the specified settings. 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 abstractNumberingListIndex An integer value specifying the numbering list index. + * @param listLevelSettings An array of ListLevelSettings objects defining settings for list levels. + */ + execute(abstractNumberingListIndex: number, listLevelSettings: ListLevelSettings[]): boolean; + /** + * Gets information about the command state. + * @param abstractNumberingListIndex An integer value specifying the index of the abstract numbering list item whose state to return. + */ + getState(abstractNumberingListIndex: number): any; +} +/** + * A command to restart the numbering list. + */ +interface RestartNumberingListCommand extends CommandWithSimpleStateBase { + /** + * Executes the RestartNumberingListCommand 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; +} +/** + * A command to increment the indent level of paragraphs in a selected numbered list. + */ +interface IncrementNumberingIndentCommand extends CommandWithSimpleStateBase { + /** + * Executes the IncrementNumberingIndentCommand 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; +} +/** + * A command to decrement the indent level of paragraphs in a selected numbered list. + */ +interface DecrementNumberingIndentCommand extends CommandWithSimpleStateBase { + /** + * Executes the DecrementNumberingIndentCommand 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; +} +/** + * A command to continue the list's numbering. + */ +interface ContinueNumberingListCommand extends CommandWithSimpleStateBase { + /** + * Executes the ContinueNumberingListCommand 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; +} +/** + * A command to insert numeration to a paragraph making it a numbering list item. + */ +interface InsertNumerationCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertNumerationCommand 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 abstractNumberingListIndex An integer value specifying index of abstract numbering list. + */ + execute(abstractNumberingListIndex: number): boolean; + /** + * Executes the InsertNumerationCommand command by applying the specified settings. 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 numberingListIndex An integer value specifying an index of the numbering list. + * @param isAbstractNumberingList true, to insert an abstract numbering list; otherwise, false. + */ + execute(numberingListIndex: number, isAbstractNumberingList: boolean): boolean; +} +/** + * A command to remove the selected numeration. + */ +interface RemoveNumerationCommand extends CommandWithSimpleStateBase { + /** + * Executes the RemoveNumerationCommand 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; +} +/** + * Contains settings to define individual bulleted or numbered list levels. + */ +interface ListLevelSettings { + /** + * Gets or sets the pattern used to format the list level for display purposes. + * Value: A string value specifying the format pattern. + */ + displayFormatString: string; + /** + * Gets or sets the numbering format used for the current list level's paragraph. + * Value: One of the values. + */ + format: any; + /** + * Gets the list level item's start position in the document. + * Value: An integer value specifying the start position. + */ + start: number; + /** + * Gets or sets the paragraph text alignment within numbered list levels. + * Value: One of the values. + */ + alignment: any; + /** + * Gets or sets the character inserted after the number for a numbered list item. + * Value: A string value that is the trailing character for the list level. + */ + separator: string; + /** + * Gets or sets the left indent for text within the current list level's paragraph. + * Value: An integer value specifying the left indent. + */ + leftIndent: number; + /** + * Gets or sets a value specifying the indent of the first line of the current list level's paragraph. + * Value: An integer value specifying the indent. + */ + firstLineIndent: number; + /** + * Gets or sets a value specifying whether and how the first line of the current list level's paragraph is indented. + * Value: One of the values. + */ + firstLineIndentType: any; + /** + * Gets or sets the font name of the current list level's paragraph. + * Value: A string value specifying the font name. + */ + fontName: string; + /** + * Gets or sets the font color of the current list level's paragraph. + * Value: A string value specifying the font color. + */ + fontColor: string; + /** + * Gets or sets the font size of the current list level's paragraph. + * Value: An integer value specifying the font size. + */ + fontSize: number; + /** + * Gets or sets whether the font formatting of the current list level's paragraph is bold. + * Value: true, if the font formatting is bold; otherwise, false. + */ + fontBold: boolean; + /** + * Gets or sets whether the font formatting of the current list level's paragraph is italic. + * Value: true, if the font formatting is italic; otherwise, false. + */ + fontItalic: boolean; +} +declare enum ListLevelFormat { + Decimal=0, + AIUEOHiragana=1, + AIUEOFullWidthHiragana=2, + ArabicAbjad=3, + ArabicAlpha=4, + Bullet=5, + CardinalText=6, + Chicago=7, + ChineseCounting=8, + ChineseCountingThousand=9, + ChineseLegalSimplified=10, + Chosung=11, + DecimalEnclosedCircle=12, + DecimalEnclosedCircleChinese=13, + DecimalEnclosedFullstop=14, + DecimalEnclosedParentheses=15, + DecimalFullWidth=16, + DecimalFullWidth2=17, + DecimalHalfWidth=18, + DecimalZero=19, + Ganada=20, + Hebrew1=21, + Hebrew2=22, + Hex=23, + HindiConsonants=24, + HindiDescriptive=25, + HindiNumbers=26, + HindiVowels=27, + IdeographDigital=28, + IdeographEnclosedCircle=29, + IdeographLegalTraditional=30, + IdeographTraditional=31, + IdeographZodiac=32, + IdeographZodiacTraditional=33, + Iroha=34, + IrohaFullWidth=35, + JapaneseCounting=36, + JapaneseDigitalTenThousand=37, + JapaneseLegal=38, + KoreanCounting=39, + KoreanDigital=40, + KoreanDigital2=41, + KoreanLegal=42, + LowerLetter=43, + LowerRoman=44, + None=45, + NumberInDash=46, + Ordinal=47, + OrdinalText=48, + RussianLower=49, + RussianUpper=50, + TaiwaneseCounting=51, + TaiwaneseCountingThousand=52, + TaiwaneseDigital=53, + ThaiDescriptive=54, + ThaiLetters=55, + ThaiNumbers=56, + UpperLetter=57, + UpperRoman=58, + VietnameseDescriptive=59 +} +declare enum ListLevelNumberAlignment { + Left=0, + Center=1, + Right=2 +} +/** + * A command to invoke the Insert Image dialog. + */ +interface OpenInsertPictureDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenInsertPictureDialogCommand 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; +} +/** + * A command to insert a picture from a file. + */ +interface InsertPictureCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertPictureCommand 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 imageUrl A string value specifying picture's Url. + */ + execute(imageUrl: string): boolean; +} +/** + * A command to invoke the Symbols dialog. + */ +interface OpenInsertSymbolDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenInsertSymbolDialogCommand 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; +} +/** + * A command to insert a character into the document. + */ +interface InsertSymbolCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertSymbolCommand command by applying the specified settings. 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 symbol A string value specifying symbols to insert. + * @param fontName A string value specifying the font of symbols to insert. + */ + execute(symbol: string, fontName: string): boolean; +} +/** + * A command to insert a paragraph break at the current position in the document. + */ +interface InsertParagraphCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertParagraphCommand 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; +} +/** + * A command to insert text at the current position in the document. + */ +interface InsertTextCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTextCommand 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 text A string value specifying a text to insert. + */ + execute(text: string): boolean; +} +/** + * A command to delete the text in a selected range. + */ +interface DeleteCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteCommand 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; +} +/** + * A command to remove the previous word. + */ +interface RemovePrevWordCommand extends CommandWithSimpleStateBase { + /** + * Executes the RemovePrevWordCommand 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; +} +/** + * A command to remove the next word. + */ +interface RemoveNextWordCommand extends CommandWithSimpleStateBase { + /** + * Executes the RemoveNextWordCommand 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; +} +/** + * A command to move the cursor backwards and erase the character in that space. + */ +interface BackspaceCommand extends CommandWithSimpleStateBase { + /** + * Executes the BackspaceCommand 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; +} +/** + * A command to scale pictures in a selected range. + */ +interface ChangePictureScaleCommand extends CommandBase { + /** + * Executes the ChangePictureScaleCommand 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 scale A Scale object specifying scaling of the picture. + */ + execute(scale: Scale): boolean; + /** + * Executes the ChangePictureScaleCommand command by applying the specified settings. 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 x An interger number specifying width of the picture + * @param y An interger number specifying height of the picture + */ + execute(x: number, y: number): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to move the selected range to a specific position in the document. + */ +interface MoveContentCommand extends CommandWithSimpleStateBase { + /** + * Executes the MoveContentCommand 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 position An integer value specifying position to insert selected text. + */ + execute(position: number): boolean; +} +/** + * A command to copy the selected text and place it to the specified position. + */ +interface CopyContentCommand extends CommandWithSimpleStateBase { + /** + * Executes the CopyContentCommand 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 position An integer number value specifying position for pasting selected text. + */ + execute(position: number): boolean; +} +/** + * A command to insert a tab character at the current position in the document. + */ +interface InsertTabCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTabCommand 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; +} +/** + * Defines the scaling settings. + */ +interface Scale { + /** + * Gets or sets the image's y-scale factor as a percent. + * Value: An integer value that is the y-scale factor as a percent. + */ + x: number; + /** + * Gets or sets the image's x-scale factor as a percent. + * Value: An integer value that is the x-scale factor as a percent. + */ + y: number; +} +/** + * A command to change page margin settings. + */ +interface ChangePageMarginsCommand extends CommandBase { + /** + * Executes the ChangePageMarginsCommand command by applying the specified settings. 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 left An integer number specifying left margin of the page. + * @param top An integer number specifying top margin of the page. + * @param right An integer number specifying right margin of the page. + * @param bottom An integer number specifying bottom margin of the page. + */ + execute(left: number, top: number, right: number, bottom: number): boolean; + /** + * Executes the ChangePageMarginsCommand 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 margins A Margins object specifying page margin settings. + */ + execute(margins: Margins): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to invoke the Margins tab of the Page Setup dialog. + */ +interface OpenPageMarginsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenPageMarginsDialogCommand 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; +} +/** + * A command to change the page orientation. + */ +interface ChangePageOrientationCommand extends CommandBase { + /** + * Executes the ChangePageOrientationCommand 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 isPortrait One of the Orientation enumeration values. + */ + execute(isPortrait: any): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to invoke the Paper tab of the Page Setup dialog. + */ +interface OpenPagePaperSizeDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenPagePaperSizeDialogCommand 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; +} +/** + * A command to set the page size. + */ +interface SetPageSizeDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the SetPageSizeDialogCommand 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; +} +/** + * A command to change the page size. + */ +interface ChangePageSizeCommand extends CommandBase { + /** + * Executes the ChangePageSizeCommand command by applying the specified settings. 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 width An integer number specifying width of the page. + * @param height An integer number specifying height of the page. + */ + execute(width: number, height: number): boolean; + /** + * Executes the ChangePageSizeCommand 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 size A Size object specifying the page size settings. + */ + execute(size: Size): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the number of section columns having the same width. + */ +interface ChangeSectionEqualColumnCountCommand extends CommandBase { + /** + * Executes the ChangeSectionEqualColumnCountCommand 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 columnCount An interger number specifying the number of section columns having the same width. + */ + execute(columnCount: number): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to invoke the Columns dialog. + */ +interface OpenSectionColumnsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenSectionColumnsDialogCommand 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; +} +/** + * A command to change the settings of individual section columns. + */ +interface ChangeSectionColumnsCommand extends CommandBase { + /** + * Executes the ChangeSectionColumnsCommand 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 columns An array of SectionColumn objects. + */ + execute(columns: SectionColumn[]): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the background color of the page. + */ +interface ChangePageColorCommand extends CommandBase { + /** + * Executes the ChangePageColorCommand 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 color A string specifying a background color the page. May be specified as a color name or a hex color value. + */ + execute(color: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to activate the page header and begin editing. + */ +interface InsertHeaderCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertHeaderCommand 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; +} +/** + * A command to activate the page footer and begin editing. + */ +interface InsertFooterCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertFooterCommand 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; +} +/** + * A command to link a header/footer to the previous section, so it has the same content. + */ +interface LinkHeaderFooterToPreviousCommand extends CommandWithSimpleStateBase { + /** + * Executes the LinkHeaderFooterToPreviousCommand 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; +} +/** + * A command to navigate to the page footer from the page header in the header/footer editing mode. + */ +interface GoToFooterCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToFooterCommand 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; +} +/** + * A command to navigate to the page header from the page footer in the header/footer editing mode. + */ +interface GoToHeaderCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToHeaderCommand 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; +} +/** + * A command to navigate to the next page header or footer in the header/footer editing mode. + */ +interface GoToNextHeaderFooterCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToNextHeaderFooterCommand 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; +} +/** + * A command to navigate to the previous page header or footer in the header/footer editing mode. + */ +interface GoToPreviousHeaderFooterCommand extends CommandWithSimpleStateBase { + /** + * Executes the GoToPreviousHeaderFooterCommand 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; +} +/** + * A command to change the header/footer edit mode, so it allows creation of a different header or footer for the first page of a document or section. + */ +interface SetDifferentFirstPageHeaderFooterCommand extends CommandWithBooleanStateBase { + /** + * Executes the SetDifferentFirstPageHeaderFooterCommand 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 SetDifferentFirstPageHeaderFooterCommand 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 differentFirstPage true to apply a different text for the first page's header and footer, false to remove the difference. + */ + execute(differentFirstPage: boolean): boolean; +} +/** + * A command to change the header/footer edit mode so it allows creation of a different header or footer for odd and even pages of a document or section. + */ +interface SetDifferentOddAndEvenPagesHeaderFooterCommand extends CommandWithBooleanStateBase { + /** + * Executes the SetDifferentOddAndEvenPagesHeaderFooterCommand 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 SetDifferentOddAndEvenPagesHeaderFooterCommand 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 differentOddAndEvenPages true to apply a different text for the header and footer of the odd and even pages , false to remove the difference. + */ + execute(differentOddAndEvenPages: boolean): boolean; +} +/** + * A command to finish header/footer editing. + */ +interface CloseHeaderFooterCommand extends CommandWithSimpleStateBase { + /** + * Executes the CloseHeaderFooterCommand 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; +} +/** + * Defines a section column in the document. + */ +interface SectionColumn { + /** + * Gets or sets the width of the section column. + * Value: An integer value specifying the section column width. + */ + width: number; + /** + * Gets or sets the amount of space between adjacent section columns. + * Value: An integer value specifying the spacing between section columns. + */ + spacing: number; +} +/** + * Defines the size settings. + */ +interface Size { + /** + * Gets or sets the width value. + * Value: An integer value specifying the width. + */ + width: number; + /** + * Gets or sets the height value. + * Value: An integer value specifying the height. + */ + height: number; +} +/** + * Defines the margin settings. + */ +interface Margins { + /** + * Gets or sets the left margin. + * Value: An integer value specifying the left margin. + */ + left: number; + /** + * Gets or sets the top margin. + * Value: An integer value specifying the top margin. + */ + top: number; + /** + * Gets or sets the right margin. + * Value: An integer value specifying the right margin. + */ + right: number; + /** + * Gets or sets the bottom margin. + * Value: An integer value specifying the bottom margin. + */ + bottom: number; +} +declare enum Orientation { + Landscape=0, + Portrait=1 +} +/** + * A command to increment the indent level of paragraphs in a selected range. + */ +interface IncreaseIndentCommand extends CommandWithSimpleStateBase { + /** + * Executes the IncreaseIndentCommand 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; +} +/** + * A command to decrement the indent level of paragraphs in a selected range. + */ +interface DecreaseIndentCommand extends CommandWithSimpleStateBase { + /** + * Executes the DecreaseIndentCommand 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; +} +/** + * A command to toggle the visibility of hidden symbols. + */ +interface ShowHiddenSymbolsCommand extends CommandWithBooleanStateBase { + /** + * Executes the ShowHiddenSymbolsCommand 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 ShowHiddenSymbolsCommand 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 show true to display hidden symbols; otherwise, false. + */ + execute(show: boolean): boolean; +} +/** + * A command to toggle left paragraph alignment on and off. + */ +interface ToggleParagraphAlignmentLeftCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleParagraphAlignmentLeftCommand 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; +} +/** + * A command to toggle centered paragraph alignment on and off. + */ +interface ToggleParagraphAlignmentCenterCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleParagraphAlignmentCenterCommand 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; +} +/** + * A command to toggle right paragraph alignment on and off. + */ +interface ToggleParagraphAlignmentRightCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleParagraphAlignmentRightCommand 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; +} +/** + * A command to toggle justified paragraph alignment on and off. + */ +interface ToggleParagraphAlignmentJustifyCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleParagraphAlignmentJustifyCommand 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; +} +/** + * A command to format a current paragraph with single line spacing. + */ +interface SetSingleParagraphSpacingCommand extends CommandWithBooleanStateBase { + /** + * Executes the SetSingleParagraphSpacingCommand 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; +} +/** + * A command to format a current paragraph with one and a half line spacing. + */ +interface SetSesquialteralParagraphSpacingCommand extends CommandWithBooleanStateBase { + /** + * Executes the SetSesquialteralParagraphSpacingCommand 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; +} +/** + * A command to format a current paragraph with double line spacing. + */ +interface SetDoubleParagraphSpacingCommand extends CommandWithBooleanStateBase { + /** + * Executes the SetDoubleParagraphSpacingCommand 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; +} +/** + * A command to add spacing before a paragraph. + */ +interface AddSpacingBeforeParagraphCommand extends CommandWithSimpleStateBase { + /** + * Executes the AddSpacingBeforeParagraphCommand 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; +} +/** + * A command to add spacing after a paragraph. + */ +interface AddSpacingAfterParagraphCommand extends CommandWithSimpleStateBase { + /** + * Executes the AddSpacingAfterParagraphCommand 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; +} +/** + * A command to remove spacing before the selected paragraph. + */ +interface RemoveSpacingBeforeParagraphCommand extends CommandWithSimpleStateBase { + /** + * Executes the RemoveSpacingBeforeParagraphCommand 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; +} +/** + * A command to remove spacing after the selected paragraph. + */ +interface RemoveSpacingAfterParagraphCommand extends CommandWithSimpleStateBase { + /** + * Executes the RemoveSpacingAfterParagraphCommand 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; +} +/** + * A command to change the background color of paragraphs in a selected range. + */ +interface ChangeParagraphBackColorCommand extends CommandBase { + /** + * Executes the ChangeParagraphBackColorCommand 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 color A string specifying a background color of the paragraphs in a selected range. May be specified as a color name or a hex color value. + */ + execute(color: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to invoke the Paragraph dialog allowing end-users to set paragraph formatting. + */ +interface OpenParagraphFormattingDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenParagraphFormattingDialogCommand 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; +} +/** + * A command to change the formatting of paragraphs in a selected range. + */ +interface ChangeParagraphFormattingCommand extends CommandBase { + /** + * Executes the ChangeParagraphFormattingCommand 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 settings A ParagraphFormattingSettings object specifying paragraph formatting settings. + */ + execute(settings: ParagraphFormattingSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to increment the left indentation of paragraphs in a selected range. + */ +interface IncrementParagraphLeftIndentCommand extends CommandWithSimpleStateBase { + /** + * Executes the IncrementParagraphLeftIndentCommand 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; +} +/** + * A command to decrement the left indentation of paragraphs in a selected range. + */ +interface DecrementParagraphLeftIndentCommand extends CommandWithSimpleStateBase { + /** + * Executes the DecrementParagraphLeftIndentCommand 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; +} +/** + * A command to invoke the Tabs paragraph dialog. + */ +interface OpenTabsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenTabsDialogCommand 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; +} +/** + * A command to change paragraph tab stops. + */ +interface ChangeTabsCommand extends CommandBase { + /** + * Executes the ChangeTabsCommand 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 settings A TabsSettings object maintaining the information about tab stops. + */ + execute(settings: TabsSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * Contains the information about tab stops. + */ +interface TabsSettings { + /** + * Gets or sets the default tab stop value. + * Value: An integer value specifying the default tab stop. + */ + defaultTabStop: number; + /** + * Gets or sets a list of tab stops. + * Value: An array of TabSettings objects containing individual tab stop settings. + */ + tabs: TabSettings[]; +} +/** + * Contains settings of a tab stop. + */ +interface TabSettings { + /** + * Gets or sets the alignment type, specifying how any text after the tab will be lined up. + * Value: One of the values. + */ + alignment: any; + /** + * Gets or sets the tab leader style, i.e., the symbol used as a tab leader. + * Value: One of the values. + */ + leader: any; + /** + * Gets or sets the position of the tab stop. + * Value: A number representing the distance from the left edge of the text area. + */ + position: number; + /** + * Gets or sets whether the individual tab stop is in effect. + * Value: true to switch off this tab stop; otherwise, false. + */ + deleted: boolean; +} +declare enum TabAlign { + Left=0, + Center=1, + Right=2, + Decimal=3 +} +declare enum TabLeaderType { + None=0, + Dots=1, + MiddleDots=2, + Hyphens=3, + Underline=4, + ThickLine=5, + EqualSign=6 +} +/** + * Contains settings to define the paragraph formatting. + */ +interface ParagraphFormattingSettings { + /** + * Gets or sets the paragraph alignment. + * Value: One of the values. + */ + alignment: any; + /** + * Gets or sets the outline level of a paragraph. + * Value: An integer specifying the level number. + */ + outlineLevel: number; + /** + * Gets or sets the right indent value for the specified paragraph. + * Value: An integer value specifying the right indent. + */ + rightIndent: number; + /** + * Gets or sets the spacing before the current paragraph. + * Value: An integer value specifying the spacing before the paragraph. + */ + spacingBefore: number; + /** + * Gets or sets the spacing after the current paragraph. + * Value: An integer value specifying the spacing after the paragraph. + */ + spacingAfter: number; + /** + * Gets or sets a value which determines the spacing between lines in a paragraph. + * Value: One of the values. + */ + lineSpacingType: any; + /** + * Gets or sets a value specifying whether and how the first line of a paragraph is indented. + * Value: One of the values. + */ + firstLineIndentType: any; + /** + * Gets or sets a value specifying the indent of the first line of a paragraph. + * Value: An integer value specifying the indent of the first line. + */ + firstLineIndent: number; + /** + * Gets or sets whether to suppress addition of additional space (contextual spacing) between paragraphs of the same style. + * Value: true to remove extra spacing between paragraphs, false to add extra space. + */ + contextualSpacing: boolean; + /** + * Gets or sets whether to prevent all page breaks that interrupt a paragraph. + * Value: true, to keep paragraph lines together; otherwise, false. + */ + keepLinesTogether: boolean; + /** + * Gets or sets whether a page break is inserted automatically before a specified paragraph(s). + * Value: true, if a page break is inserted automatically before a paragraph(s); otherwise, false. + */ + pageBreakBefore: boolean; + /** + * Gets or sets the left indent for text within a paragraph. + * Value: An integer value specifying the left indent. + */ + leftIndent: number; + /** + * Gets or sets a line spacing value. + * Value: An integer value specifying the line spacing. + */ + lineSpacing: number; + /** + * Gets or sets the paragraph background color. + * Value: A string value specifying the background color. + */ + backColor: string; +} +declare enum ParagraphAlignment { + Left=0, + Right=1, + Center=2, + Justify=3 +} +declare enum ParagraphLineSpacingType { + Single=0, + Sesquialteral=1, + Double=2, + Multiple=3, + Exactly=4, + AtLeast=5 +} +declare enum ParagraphFirstLineIndent { + None=0, + Indented=1, + Hanging=2 +} +/** + * A command to assign a shortcut to the specified client command. + */ +interface AssignShortcutCommand extends CommandWithSimpleStateBase { + /** + * Executes the AssignShortcutCommand command by applying the specified settings. 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 keyCode An integer value specifying the code uniquely identifying the key combination. + * @param callback A callback function to execute on pressing the shortcut. + */ + execute(keyCode: number, callback: (arg1: string) => void): boolean; +} +/** + * A command to invoke the Spelling dialog window. + */ +interface OpenSpellingDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenSpellingDialogCommand 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; +} +/** + * A command to invoke the Insert Table dialog. + */ +interface OpenInsertTableDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenInsertTableDialogCommand 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; +} +/** + * A command to invoke the Insert Table dialog. + */ +interface InsertTableCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableCommand command by applying the specified settings. 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 columnCount An integer value specifying a number of columns in a generated table. + * @param rowCount An integer value specifying a number of rows in a generated table. + */ + execute(columnCount: number, rowCount: number): boolean; +} +/** + * A command to invoke the Table Properties dialog. + */ +interface OpenTableFormattingDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenTableFormattingDialogCommand 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; +} +/** + * A command to change the selected table's formatting. + */ +interface ChangeTableFormattingCommand extends CommandBase { + /** + * Executes the ChangeTableFormattingCommand 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 settings A TableFormattingSettings object containing the settings to format a table. + */ + execute(settings: TableFormattingSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the selected table's preferred row height. + */ +interface ChangeTableRowPreferredHeightCommand extends CommandBase { + /** + * Executes the ChangeTableRowPreferredHeightCommand 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 preferredHeight A TableHeightUnit object specifying preferred height of the selected table rows. + */ + execute(preferredHeight: TableHeightUnit): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the preferred cell width of the selected table rows. + */ +interface ChangeTableCellPreferredWidthCommand extends CommandBase { + /** + * Executes the ChangeTableCellPreferredWidthCommand 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 preferredWidth A TableWidthUnit object specifying preferred width of the selected table rows. + */ + execute(preferredWidth: TableWidthUnit): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the selected table's preferred column width. + */ +interface ChangeTableColumnPreferredWidthCommand extends CommandBase { + /** + * Executes the ChangeTableColumnPreferredWidthCommand 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 preferredWidth A TableWidthUnit object specifying preferred width of the selected table columns. + */ + execute(preferredWidth: TableWidthUnit): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the cell formatting of the selected table elements. + */ +interface ChangeTableCellFormattingCommand extends CommandBase { + /** + * Executes the ChangeTableCellFormattingCommand 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 settings A TableFormattingSettings object specifying cell formatting of the selected table elements. + */ + execute(settings: TableCellFormattingSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to insert a table column to the left of the current position in the table. + */ +interface InsertTableColumnToTheLeftCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableColumnToTheLeftCommand 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; +} +/** + * A command to insert a table column to the right of the current position in the table. + */ +interface InsertTableColumnToTheRightCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableColumnToTheRightCommand 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; +} +/** + * A command to insert a row in a table below the selected row. + */ +interface InsertTableRowBelowCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableRowBelowCommand 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; +} +/** + * A command to insert a row in a table above the selected row. + */ +interface InsertTableRowAboveCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableRowAboveCommand 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; +} +/** + * A command to delete the selected table rows. + */ +interface DeleteTableRowsCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteTableRowsCommand 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; +} +/** + * A command to delete the selected table columns. + */ +interface DeleteTableColumnsCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteTableColumnsCommand 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; +} +/** + * A command to insert table cells with a horizontal shift into the selected table. + */ +interface InsertTableCellWithShiftToTheLeftCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableCellWithShiftToTheLeftCommand 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; +} +/** + * A command to delete the selected table cells with a horizontal shift. + */ +interface DeleteTableCellsWithShiftHorizontallyCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteTableCellsWithShiftHorizontallyCommand 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; +} +/** + * A command to delete the selected table cells with a vertical shift. + */ +interface DeleteTableCellsWithShiftVerticallyCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteTableCellsWithShiftVerticallyCommand 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; +} +/** + * A command to delete the selected table. + */ +interface DeleteTableCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteTableCommand 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; +} +/** + * A command to invoke the Insert Cells dialog. + */ +interface InsertTableCellsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableCellsDialogCommand 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; +} +/** + * A command to invoke the Delete Cells dialog. + */ +interface DeleteTableCellsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the DeleteTableCellsDialogCommand 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; +} +/** + * A command to merge the selected table cells. + */ +interface MergeTableCellsCommand extends CommandWithSimpleStateBase { + /** + * Executes the MergeTableCellsCommand 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; +} +/** + * A command to invoke the Split Cells dialog. + */ +interface SplitTableCellsDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the SplitTableCellsDialogCommand 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; +} +/** + * A command to split the selected table cells based on the specified options. + */ +interface SplitTableCellsCommand extends CommandWithSimpleStateBase { + /** + * Executes the SplitTableCellsCommand command by applying the specified settings. 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 rowCount An integer value specifying a number of rows in the split table cells. + * @param columnCount An integer value specifying a number of columns in the split table cells. + * @param mergeBeforeSplit true to merge the selected cells before the splitting; otherwise, false. + */ + execute(rowCount: number, columnCount: number, mergeBeforeSplit: boolean): boolean; +} +/** + * A command to insert table cells with a vertical shift into the selected table. + */ +interface InsertTableCellsWithShiftToTheVerticallyCommand extends CommandWithSimpleStateBase { + /** + * Executes the InsertTableCellsWithShiftToTheVerticallyCommand 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; +} +/** + * A command to invoke the Borders and Shading table dialog. + */ +interface OpenTableBordersAndShadingDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenTableBordersAndShadingDialogCommand 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; +} +/** + * A command to change borders and shading of the selected table elements. + */ +interface ChangeTableBordersAndShadingCommand extends CommandBase { + /** + * Executes the ChangeTableBordersAndShadingCommand command by applying the specified settings. 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 settings A TableBorderSettings object with settings specifying table borders. + * @param applyToWholeTable true to apply the border settings to the whole table, false to apply the border settings to the selected cells. + */ + execute(settings: TableBordersSettings, applyToWholeTable: boolean): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to apply top-left alignment for the selected table cells. + */ +interface ToggleTableCellAlignTopLeftCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignTopLeftCommand 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; +} +/** + * A command to apply top-center alignment for the selected table cells. + */ +interface ToggleTableCellAlignTopCenterCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignTopCenterCommand 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; +} +/** + * A command to apply top-right alignment for the selected table cells. + */ +interface ToggleTableCellAlignTopRightCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignTopRightCommand 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; +} +/** + * A command to apply middle-left alignment for the selected table cells. + */ +interface ToggleTableCellAlignMiddleLeftCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignMiddleLeftCommand 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; +} +/** + * A command to apply middle-center alignment for the selected table cells. + */ +interface ToggleTableCellAlignMiddleCenterCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignMiddleCenterCommand 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; +} +/** + * A command to apply middle-right alignment for the selected table cells. + */ +interface ToggleTableCellAlignMiddleRightCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignMiddleRightCommand 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; +} +/** + * A command to apply bottom-left alignment for the selected table cells. + */ +interface ToggleTableCellAlignBottomLeftCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignBottomLeftCommand 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; +} +/** + * A command to apply bottom-center alignment for the selected table cells. + */ +interface ToggleTableCellAlignBottomCenterCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignBottomCenterCommand 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; +} +/** + * A command to apply bottom-right alignment for the selected table cells. + */ +interface ToggleTableCellAlignBottomRightCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAlignBottomRightCommand 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; +} +/** + * A command to change the selected table's style. + */ +interface ChangeTableStyleCommand extends CommandBase { + /** + * Executes the ChangeTableStyleCommand 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 style A TableStyle object specifying the style applying to the table. + */ + execute(style: TableStyle): boolean; + /** + * Executes the ChangeTableStyleCommand 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 styleName A string specifying the name of style applying to the table. + */ + execute(styleName: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to toggle top borders for selected cells on/off. + */ +interface ToggleTableCellTopBorderCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellTopBorderCommand 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; +} +/** + * A command to toggle right borders for selected cells on/off. + */ +interface ToggleTableCellRightBorderCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellRightBorderCommand 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; +} +/** + * A command to toggle bottom borders for selected cells on/off. + */ +interface ToggleTableCellBottomBorderCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellBottomBorderCommand 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; +} +/** + * A command to toggle left borders for selected cells on/off. + */ +interface ToggleTableCellLeftBorderCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellLeftBorderCommand 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; +} +/** + * A command to remove the borders of the selected table cells. + */ +interface RemoveTableCellBordersCommand extends CommandWithSimpleStateBase { + /** + * Executes the RemoveTableCellBordersCommand 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; +} +/** + * A command to toggle all borders for selected cells on/off. + */ +interface ToggleTableCellAllBordersCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellAllBordersCommand 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; +} +/** + * A command to toggle inner borders for selected cells on/off. + */ +interface ToggleTableCellInsideBordersCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellInsideBordersCommand 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; +} +/** + * A command to toggle inner horizontal borders for selected cells on/off. + */ +interface ToggleTableCellInsideHorizontalBordersCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellInsideHorizontalBordersCommand 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; +} +/** + * A command to toggle inner vertical borders for selected cells on/off. + */ +interface ToggleTableCellInsideVerticalBordersCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellInsideVerticalBordersCommand 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; +} +/** + * A command to toggle outer borders for selected cells on/off. + */ +interface ToggleTableCellOutsideBordersCommand extends CommandWithBooleanStateBase { + /** + * Executes the ToggleTableCellOutsideBordersCommand 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; +} +/** + * A command to change the selected table's style options. + */ +interface ChangeTableLookCommand extends CommandBase { + /** + * Executes the ChangeTableLookCommand 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 settings A TableLookSettings object containing the settings that modify the table appearance. + */ + execute(settings: TableLookSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the repository item's table border style. + */ +interface ChangeTableBorderRepositoryItemCommand extends CommandBase { + /** + * Executes the ChangeTableBorderRepositoryItemCommand 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 settings A TableBorderSettings object specifying the repository item's table border style. + */ + execute(settings: TableBorderSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change cell shading in the selected table elements. + */ +interface ChangeTableCellShadingCommand extends CommandBase { + /** + * Executes the ChangeTableCellShadingCommand 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 color A string specifying the color of the selected cells' shading. May be specified as a color name or a hex color value. + */ + execute(color: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to toggle the display of grid lines for a table with no borders applied - on/off. + */ +interface ShowTableGridLinesCommand extends CommandWithBooleanStateBase { + /** + * Executes the ShowTableGridLinesCommand 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 ShowTableGridLinesCommand 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 showTableGridLines true to display grid lines of the table, false to hide grid lines of the table. + */ + execute(showTableGridLines: boolean): boolean; +} +/** + * Contains the table style settings that modify the table appearance. + */ +interface TableLookSettings { + /** + * Gets or sets a value specifying whether special formatting is applied to the first row of the table. + * Value: true, to apply the formatting; otherwise, false. + */ + applyFirstRow: boolean; + /** + * Gets or sets a value specifying whether special formatting is applied to the last row of the table. + * Value: true, to apply the formatting; otherwise, false. + */ + applyLastRow: boolean; + /** + * Gets or sets a value specifying whether special formatting is applied to the first column of the table. + * Value: true, to apply the formatting; otherwise, false. + */ + applyFirstColumn: boolean; + /** + * Gets or sets a value specifying whether special formatting is applied to the last column of the table. + * Value: true, to apply the formatting; otherwise, false. + */ + applyLastColumn: boolean; + /** + * Gets or sets a value specifying whether row banding formatting is not applied to the table. + * Value: true, to apply the formatting; otherwise, false. + */ + doNotApplyRowBanding: boolean; + /** + * Gets or sets a value specifying whether column banding formatting is not applied to the table. + * Value: true, to apply the formatting; otherwise, false. + */ + doNotApplyColumnBanding: boolean; +} +/** + * Contains settings to define table borders. + */ +interface TableBordersSettings { + /** + * Gets or sets the top border's settings. + * Value: A TableBorderSettings object containing the table border settings. + */ + top: TableBorderSettings; + /** + * Gets or sets the right border's settings. + * Value: A TableBorderSettings object containing the table border settings. + */ + right: TableBorderSettings; + /** + * Gets or sets the bottom border's settings. + * Value: A TableBorderSettings object containing the table border settings. + */ + bottom: TableBorderSettings; + /** + * Gets or sets the left border's settings. + * Value: A TableBorderSettings object containing the table border settings. + */ + left: TableBorderSettings; + /** + * Gets or sets the inside horizontal border's settings. + * Value: A TableBorderSettings object containing the table border settings. + */ + insideHorizontal: TableBorderSettings; + /** + * Gets or sets the inside vertical border's settings. + * Value: A TableBorderSettings object containing the table border settings. + */ + insideVertical: TableBorderSettings; + /** + * Gets or sets the background color of table borders. + * Value: A string value specifying the background color. + */ + backgroundColor: string; +} +/** + * Contains settings to define a table border. + */ +interface TableBorderSettings { + /** + * Gets or sets the border color. + * Value: A string value specifying the border color. + */ + color: string; + /** + * Gets or sets the border line width. + * Value: An integer value defining the border line width. + */ + width: number; + /** + * Gets or sets the border line style. + * Value: A object defining the border line style. + */ + style: any; +} +declare enum BorderLineStyle { + None=0, + Single=1, + Thick=2, + Double=3, + Dotted=4, + Dashed=5, + DotDash=6, + DotDotDash=7, + Triple=8, + ThinThickSmallGap=9, + ThickThinSmallGap=10, + ThinThickThinSmallGap=11, + ThinThickMediumGap=12, + ThickThinMediumGap=13, + ThinThickThinMediumGap=14, + ThinThickLargeGap=15, + ThickThinLargeGap=16, + ThinThickThinLargeGap=17, + Wave=18, + DoubleWave=19, + DashSmallGap=20, + DashDotStroked=21, + ThreeDEmboss=22, + 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 +} +/** + * Contains the settings to define the table cell formatting. + */ +interface TableCellFormattingSettings { + /** + * Gets or sets a table cell's preferred width. + * Value: A object specifying the preferred cell width. + */ + preferredWidth: TableWidthUnit; + /** + * Gets or sets the vertical alignment of a table cell's content. + * Value: One the values. + */ + verticalAlignment: any; + /** + * Gets or sets a value specifying whether text is wrapped in a table cell. + * Value: true if text is wrapped; false if text is not wrapped. + */ + noWrap: boolean; + /** + * Gets or sets a table cell's left margin. + * Value: An integer value specifying the left margin. + */ + marginLeft: number; + /** + * Gets or sets a table cell's right margin. + * Value: An integer value specifying the right margin. + */ + marginRight: number; + /** + * Gets or sets a table cell's top margin. + * Value: An integer value specifying the top margin. + */ + marginTop: number; + /** + * Gets or sets a table cell's bottom margin. + * Value: An integer value specifying the bottom margin. + */ + marginBottom: number; + /** + * Gets or sets a value specifying whether a table cell's margins are inherited from the table level settings. + * Value: true to inherit table level margins; false to use a table cell's own margin settings. + */ + marginsSameAsTable: boolean; +} +declare enum TableCellVerticalAlignment { + Top=0, + Both=1, + Center=2, + Bottom=3 +} +/** + * Contains the settings to format a table. + */ +interface TableFormattingSettings { + /** + * Gets or sets the preferred width of cells in the table. + * Value: A object specifying the width. + */ + preferredWidth: TableWidthUnit; + /** + * Gets or sets the alignment of table rows. + * Value: One of the values. + */ + alignment: any; + /** + * Gets or sets the table's left indent. + * Value: An integer value specifying the indent. + */ + indent: number; + /** + * Gets or sets the spacing between table cells. + * Value: An integer value specifying the spacing. + */ + spacingBetweenCells: number; + /** + * Gets or sets a value specifying whether spacing is allowed between table cells. + * Value: true, to allow spacing; otherwise, false. + */ + allowSpacingBetweenCells: boolean; + /** + * Gets or sets a value that specifying whether to allow automatic resizing of table cells to fit their contents. + * Value: true, to allow automatic resizing; otherwise, false. + */ + resizeToFitContent: boolean; + /** + * Gets or sets the default left margin for cells in the table. + * Value: An integer value specifying the margin value. + */ + defaultCellMarginLeft: number; + /** + * Gets or sets the default right margin for cells in the table. + * Value: An integer value specifying the margin value. + */ + defaultCellMarginRight: number; + /** + * Gets or sets the default top margin for cells in the table. + * Value: An integer value specifying the margin value. + */ + defaultCellMarginTop: number; + /** + * Gets or sets the default bottom margin for cells in the table. + * Value: An integer value specifying the margin value. + */ + defaultCellMarginBottom: number; +} +/** + * Contains settings defining the table width's measurement units and value. + */ +interface TableWidthUnit { + /** + * Gets or sets the table width value. + * Value: An integer value specifying the table width. + */ + value: number; + /** + * Gets or sets the unit type for the table width. + * Value: One of the values. + */ + type: any; +} +/** + * Contains settings defining the table height's measurement units and value. + */ +interface TableHeightUnit { + /** + * Gets or sets the table height value. + * Value: An integer value specifying the table height. + */ + value: number; + /** + * Gets or sets the unit type for the table height. + * Value: One of the enumeration values. + */ + type: any; +} +declare enum TableHeightUnitType { + Minimum=0, + Auto=1, + Exact=2 +} +declare enum TableRowAlignment { + Both=0, + Center=1, + Distribute=2, + Left=3, + NumTab=4, + Right=5 +} +declare enum TableWidthUnitType { + Nil=0, + Auto=1, + FiftiethsOfPercent=2, + ModelUnits=3 +} +/** + * A command to change the font name of characters in a selected range. + */ +interface ChangeFontNameCommand extends CommandBase { + /** + * Executes the ChangeFontNameCommand 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 fontName A string specifying the font name. + */ + execute(fontName: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the font size of characters in a selected range. + */ +interface ChangeFontSizeCommand extends CommandBase { + /** + * Executes the ChangeFontSizeCommand 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 fontSize An integer number specifying the font size. + */ + execute(fontSize: number): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to increase the font size of characters in a selected range to the closest larger predefined value. + */ +interface IncreaseFontSizeCommand extends CommandWithSimpleStateBase { + /** + * Executes the IncreaseFontSizeCommand 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; +} +/** + * A command to decrease the font size of characters in a selected range to the closest smaller predefined value. + */ +interface DecreaseFontSizeCommand extends CommandWithSimpleStateBase { + /** + * Executes the DecreaseFontSizeCommand 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; +} +/** + * A command to convert the selected text to upper case. + */ +interface MakeTextUpperCaseCommand extends CommandWithSimpleStateBase { + /** + * Executes the MakeTextUpperCaseCommand 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; +} +/** + * A command to convert the selected text to lower case. + */ +interface MakeTextLowerCaseCommand extends CommandWithSimpleStateBase { + /** + * Executes the MakeTextLowerCaseCommand 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; +} +/** + * A command to capitalize each word in the selected sentence. + */ +interface CapitalizeEachWordTextCaseCommand extends CommandWithSimpleStateBase { + /** + * Executes the CapitalizeEachWordTextCaseCommand 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; +} +/** + * A command to toggle the case for each character - upper case becomes lower, lower case becomes upper. + */ +interface ToggleTextCaseCommand extends CommandWithSimpleStateBase { + /** + * Executes the ToggleTextCaseCommand 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; +} +/** + * A command to change the bold formatting of characters in a selected range. + */ +interface ChangeFontBoldCommand extends CommandWithBooleanStateBase { + /** + * Executes the ChangeFontBoldCommand 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 ChangeFontBoldCommand 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 fontBold true to apply bold formatting to the text, false to remove bold formatting. + */ + execute(fontBold: boolean): boolean; +} +/** + * A command to change the italic formatting of characters in a selected range. + */ +interface ChangeFontItalicCommand extends CommandWithBooleanStateBase { + /** + * Executes the ChangeFontItalicCommand 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 ChangeFontItalicCommand 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 fontItalic true to apply italic formatting to the text, false to remove italic formatting. + */ + execute(fontItalic: boolean): boolean; +} +/** + * A command to change the underline formatting of characters in a selected range. + */ +interface ChangeFontUnderlineCommand extends CommandWithBooleanStateBase { + /** + * Executes the ChangeFontUnderlineCommand 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 ChangeFontUnderlineCommand 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 fontUnderline true to apply underline formatting to the text, false to remove underline formatting. + */ + execute(fontUnderline: boolean): boolean; +} +/** + * A command to change the strikeout formatting of characters in a selected range. + */ +interface ChangeFontStrikeoutCommand extends CommandWithBooleanStateBase { + /** + * Executes the ChangeFontStrikeoutCommand 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 ChangeFontStrikeoutCommand 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 fontStrikeout true to apply strikeout formatting to the text, false to remove strikeout formatting. + */ + execute(fontStrikeout: boolean): boolean; +} +/** + * A command to change the superscript formatting of characters in a selected range. + */ +interface ChangeFontSuperscriptCommand extends CommandWithBooleanStateBase { + /** + * Executes the ChangeFontSuperscriptCommand 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 ChangeFontSuperscriptCommand 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 fontSuperscript true to apply superscript formatting to the text, false to remove superscript formatting. + */ + execute(fontSuperscript: boolean): boolean; +} +/** + * A command to change the subscript formatting of characters in the selected range. + */ +interface ChangeFontSubscriptCommand extends CommandWithBooleanStateBase { + /** + * Executes the ChangeFontSubscriptCommand 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 ChangeFontSubscriptCommand 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 fontSubscript true to apply subscript formatting to the text, false to remove subscript formatting. + */ + execute(fontSubscript: boolean): boolean; +} +/** + * A command to change the font color of characters in a selected range. + */ +interface ChangeFontForeColorCommand extends CommandBase { + /** + * Executes the ChangeFontForeColorCommand 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 color A string specifying the font color. May be specified as a color name or a hex color value. + */ + execute(color: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to change the background color of characters in a selected range. + */ +interface ChangeFontBackColorCommand extends CommandBase { + /** + * Executes the ChangeFontBackColorCommand 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 color A string specifying the background font color. May be specified as a color name or a hex color value. + */ + execute(color: string): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to reset the selected text's formatting to default. + */ +interface ClearFormattingCommand extends CommandWithSimpleStateBase { + /** + * Executes the ClearFormattingCommand 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; +} +/** + * A command to change the selected range's style. + */ +interface ChangeStyleCommand extends CommandBase { + /** + * Executes the ChangeStyleCommand 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 style A StyleBase object specifying the selected range's style. + */ + execute(style: StyleBase): boolean; + /** + * Executes the ChangeStyleCommand command by applying the specified settings. 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 styleName A string specifying the applying style's name. + * @param isParagraphStyle true to apply the style to a paragraph, false to apply the style to a character. + */ + execute(styleName: string, isParagraphStyle: boolean): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * A command to invoke the Font dialog allowing end-users to change the font, size and style of the selected text. + */ +interface OpenFontFormattingDialogCommand extends CommandWithSimpleStateBase { + /** + * Executes the OpenFontFormattingDialogCommand 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; +} +/** + * A command to convert the text of all selected sentences to sentence case. + */ +interface MakeTextSentenceCaseCommand extends CommandWithSimpleStateBase { + /** + * Executes the MakeTextSentenceCaseCommand 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; +} +/** + * A command to switch the text case at the current position in the document. + */ +interface SwitchTextCaseCommand extends CommandWithSimpleStateBase { + /** + * Executes the SwitchTextCaseCommand 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; +} +/** + * A command to change the font formatting of characters in a selected range. + */ +interface ChangeFontFormattingCommand extends CommandBase { + /** + * Executes the ChangeFontFormattingCommand 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 settings A FontFormattingSettings object specifying font formatting settings. + */ + execute(settings: FontFormattingSettings): boolean; + /** + * Gets information about the command state. + */ + getState(): any; +} +/** + * Contains settings to define the font formatting. + */ +interface FontFormattingSettings { + /** + * Gets or sets the character(s) font name. + * Value: A string value specifying the font name. + */ + fontName: string; + /** + * Gets or sets the character(s) font size. + * Value: An integer value specifying the font size. + */ + size: number; + /** + * Gets or sets the foreground color of characters. + * Value: A string value specifying the foreground color. + */ + foreColor: string; + /** + * Gets or sets the character background color. + * Value: A string value specifying the background color. + */ + backColor: string; + /** + * Gets or sets the type of underline applied to the character(s). + * Value: true, if characters are underlined; otherwise, false. + */ + underline: boolean; + /** + * Gets or sets the color of the underline for the specified characters. + * Value: A string value specifying the underline color. + */ + underlineColor: string; + /** + * Gets or sets whether the character formatting is bold. + * Value: true, if characters are bold; otherwise, false. + */ + bold: boolean; + /** + * Gets or sets a value indicating whether a character(s) is italicized. + * Value: true, if characters are italicized; otherwise, false. + */ + italic: boolean; + /** + * Gets or sets a value specifying whether the strikeout formatting is applied to a character(s). + * Value: true if the strikeout formatting is applied; otherwise, false. + */ + strikeout: boolean; + /** + * Gets or sets whether only word characters are underlined. + * Value: true to underline only characters in words; false to underline all characters. + */ + underlineWordsOnly: boolean; + /** + * Gets or sets a value specifying character script formatting. + * Value: One of the values. + */ + script: any; + /** + * Gets or sets a value indicating whether all characters are capital letters. + * Value: true, if all characters are capitalized; otherwise, false. + */ + allCaps: boolean; + /** + * Gets or sets a value indicating whether a character(s) is hidden. + * Value: true, if characters are hidden; otherwise, false. + */ + hidden: boolean; +} +declare enum CharacterFormattingScript { + Normal=0, + Subscript=1, + Superscript=2 +} +/** + * A command to toggle the horizontal ruler's visibility. + */ +interface ShowHorizontalRulerCommand extends CommandWithBooleanStateBase { + /** + * Executes the ShowHorizontalRulerCommand 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 ShowHorizontalRulerCommand 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 show true to display the horizontal ruler, false to hide the horizontal ruler. + */ + execute(show: boolean): boolean; +} +/** + * A command to toggle the fullscreen mode. + */ +interface SetFullscreenCommand extends CommandWithBooleanStateBase { + /** + * Executes the SetFullscreenCommand 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 SetFullscreenCommand 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 fullscreen true to apply the fullscreen mode, false to disable the fullscreen mode. + */ + execute(fullscreen: boolean): boolean; +} +/** + * Holds the information that determines what action types can be performed for appointments. + */ +interface ASPxClientAppointmentFlags { + /** + * Gets a value that specifies whether an end-user is allowed to delete appointments. + * Value: true if an end-user can delete appointments; otherwise, false. Default is true. + */ + allowDelete: boolean; + /** + * Gets a value that specifies whether an end-user is allowed to edit appointments. + * Value: true if the end-user can edit appointments; otherwise, false. + */ + allowEdit: boolean; + /** + * Gets a value that specifies whether an end-user is allowed to change the time boundaries of appointments. + * Value: true if appointment resizing is allowed; otherwise, false. Default is true. + */ + allowResize: boolean; + /** + * Gets a value that specifies whether an end-user is allowed to copy appointments. + * Value: true if a user can copy appointments; otherwise, false. Default is true. + */ + allowCopy: boolean; + /** + * Gets a value that specifies whether an end-user is allowed to drag and drop appointments to another time slot or date. + * Value: true if the user can drag and drop appointments; otherwise, false. + */ + allowDrag: boolean; + /** + * Gets a value that specifies whether an end-user is allowed to drag and drop appointments between resources. + * Value: true if the end-user can drag appointment from one resource to another; otherwise, false. + */ + allowDragBetweenResources: boolean; + /** + * Gets a value that specifies whether an inplace editor can be activated for an appointment. + * Value: true if an inplace editor is activated; otherwise, false. Default is true. + */ + allowInplaceEditor: boolean; + /** + * Gets a value that specifies whether an end-user is allowed to share the schedule time between two or more appointments. + * Value: true if appointments with the same schedule time are allowed; otherwise, false. Default is true. + */ + allowConflicts: boolean; +} +/** + * Represents a client-side equivalent of the Appointment class. + */ +interface ASPxClientAppointment { + /** + * Gets the time interval of the appointment for client-side scripting. + * Value: An ASPxClientTimeInterval object, representing the interval assigned to an appointment. + */ + interval: ASPxClientTimeInterval; + /** + * Gets the identifiers of resources associated with the appointment for client-side scripting. + * Value: An array of string representations for resource identifiers. + */ + resources: string[]; + /** + * Gets the ID of an appointment for use in client-side scripts. + * Value: A string representation of the appointment ID. + */ + appointmentId: string; + /** + * Gets the type of appointment for use in client-side scripts. + * Value: An ASPxAppointmentType enumeration member, representing the appointment's type. + */ + appointmentType: ASPxAppointmentType; + /** + * Gets the index of the availability status object associated with the appointment. + * Value: An integer value that specifies the index of the corresponding Statuses collection. + */ + statusIndex: number; + /** + * Gets the index of the label object associated with the appointment for client-side scripting. + * Value: An integer value that specifies the index of the corresponding Labels collection. + */ + labelIndex: number; + /** + * Gets the client appointment value that is equivalent in meaning to the Subject property. + * Value: A string representing the appointment subject. + */ + subject: string; + /** + * Gets the client appointment value that is equivalent in meaning to the Description property. + * Value: A string, representing the description for an appointment. + */ + description: string; + /** + * Gets the client appointment value that is equivalent in meaning to the Location property. + * Value: A string representing the appointment location. + */ + location: string; + /** + * Gets the client appointment value that is equivalent in meaning to the AllDay property. + * Value: true indicates the all-day appointment; otherwise, false. + */ + allDay: boolean; + /** + * Adds a resource to the collection of resources associated with the client appointment. + * @param resourceId An object, representing the resource id. + */ + AddResource(resourceId: Object): void; + /** + * Gets the resource associated with the client-side appointment by its index. + * @param index An integer, representing an index of a resource in a resource collection associated with the current appointment. + */ + GetResource(index: number): Object; + /** + * Sets the property value of the client appointment, corresponding to the Start appointment property. + * @param start A JavaScript Date object representing the appointment start. + */ + SetStart(start: Date): void; + /** + * Gets the property value of the client appointment corresponding to the Start appointment property. + */ + GetStart(): Date; + /** + * Sets the property value of the client appointment, corresponding to the End appointment property. + * @param end A JavaScript Date object representing the end of the appointment. + */ + SetEnd(end: Date): void; + /** + * Gets the property value of the client appointment corresponding to the End appointment property. + */ + GetEnd(): Date; + /** + * Sets the property value of the client appointment, corresponding to the Duration appointment property. + * @param duration A TimeSpan object representing the appointment duration. + */ + SetDuration(duration: any): void; + /** + * Gets the property value of the client appointment corresponding to the Duration appointment property. + */ + GetDuration(): number; + /** + * Sets the ID of the client appointment. + * @param id An object representing the appointment identifier. + */ + SetId(id: Object): void; + /** + * Gets the ID of the client appointment. + */ + GetId(): Object; + /** + * Specifies the type of the current client appointment. + * @param type An ASPxAppointmentType enumeration value indicating the appointment type. + */ + SetAppointmentType(type: ASPxAppointmentType): void; + /** + * Gets the type of the client appointment. + */ + GetAppointmentType(): ASPxAppointmentType; + /** + * Sets the property value of the client appointment, corresponding to the StatusId appointment property. + * @param statusId An integer representing the index in the AppointmentStatusCollection. + */ + SetStatusId(statusId: number): void; + /** + * Gets the property value of the client appointment corresponding to the StatusId appointment property. + */ + GetStatusId(): number; + /** + * Sets the property value of the client appointment, corresponding to the LabelId appointment property. + * @param statusId An integer representing the index of the label in the Labels label collection. + */ + SetLabelId(statusId: number): void; + /** + * Gets the property value of the client appointment corresponding to the LabelId appointment property. + */ + GetLabelId(): number; + /** + * Sets the property value of the client appointment, corresponding to the Subject appointment property. + * @param subject A string containing the appointment subject. + */ + SetSubject(subject: string): void; + /** + * Gets the property value of the client appointment corresponding to the Subject appointment property. + */ + GetSubject(): string; + /** + * Sets the property value of the client appointment, corresponding to the Description appointment property. + * @param description A string representing the appointment description. + */ + SetDescription(description: string): void; + /** + * Gets the property value of the client appointment corresponding to the Description appointment property. + */ + GetDescription(): string; + /** + * Sets the property value of the client appointment, corresponding to the Location appointment property. + * @param location A string representing the appointment location. + */ + SetLocation(location: string): void; + /** + * Gets the property value of the client appointment corresponding to the Location appointment property. + */ + GetLocation(): string; + /** + * Specifies the property value of the client appointment corresponding to the AllDay appointment property. + * @param allDay true to indicate the all-day appointment; otherwise, false. + */ + SetAllDay(allDay: boolean): void; + /** + * Gets the property value of the client appointment corresponding to the AllDay appointment property. + */ + GetAllDay(): boolean; + /** + * Gets the appointment that is the RecurrencePattern for the current appointment. + */ + GetRecurrencePattern(): ASPxClientAppointment; + /** + * Sets the property value of the client appointment, corresponding to the RecurrenceInfo appointment property. + * @param recurrenceInfo An ASPxClientRecurrenceInfo object representing the recurrence information. + */ + SetRecurrenceInfo(recurrenceInfo: ASPxClientRecurrenceInfo): void; + /** + * Gets the property value of the client appointment corresponding to the RecurrenceInfo appointment property. + */ + GetRecurrenceInfo(): ASPxClientRecurrenceInfo; +} +/** + * A client point object. + */ +interface ASPxClientPoint { + /** + * Gets the point's X-coordinate. + */ + GetX(): number; + /** + * Gets the point's Y-coordinate. + */ + GetY(): number; +} +/** + * A client rectangle object. + */ +interface ASPxClientRect { + /** + * Gets the X-coordinate of the rectangle's left edge. + */ + GetLeft(): number; + /** + * Gets the X-coordinate of the rectangle's right edge. + */ + GetRight(): number; + /** + * Gets the Y-coordinate of the rectangle's top edge. + */ + GetTop(): number; + /** + * Gets the Y-coordinate of the rectangle's bottom edge. + */ + GetBottom(): number; + /** + * Gets the rectangle's width. + */ + GetWidth(): number; + /** + * Gets the rectangle's height. + */ + GetHeight(): number; +} +/** + * Contains information defining the occurrences of a recurring client appointment. + */ +interface ASPxClientRecurrenceInfo { + /** + * Sets the recurrence start date. + * @param start A JavaScript date object value that specifies the start date for the recurrence. + */ + SetStart(start: Date): void; + /** + * Gets the recurrence start date. + */ + GetStart(): Date; + /** + * Sets the recurrence end date. + * @param end A JavaScript Date object that specifies the end date for the recurrence. + */ + SetEnd(end: Date): void; + /** + * Gets the recurrence end date. + */ + GetEnd(): Date; + /** + * Sets the duration of the recurrence. + * @param duration A TimeSpan object representing the duration. + */ + SetDuration(duration: any): void; + /** + * Gets the duration of the recurrence. + */ + GetDuration(): number; + /** + * Sets the time base for the frequency of the corresponding appointment occurrences. + * @param type An ASPxClientRecurrenceType enumeration value that specifies the recurrence's frequency type. + */ + SetRecurrenceType(type: ASPxClientRecurrenceType): void; + /** + * Gets the time base for the frequency of the corresponding appointment reoccurrence. + */ + GetRecurrenceType(): ASPxClientRecurrenceType; + /** + * Sets the day/days in a week that the corresponding appointment recurs on. + * @param weekDays The ASPxClientWeekDays enumeration value specifying the day/days in a week. + */ + SetWeekDays(weekDays: ASPxClientWeekDays): void; + /** + * Gets the day/days in a week on which the corresponding appointment occurs. + */ + GetWeekDays(): ASPxClientWeekDays; + /** + * Sets how many times the appointment occurs. + * @param occurrenceCount An integer value that specifies how many times the appointment occurs. + */ + SetOccurrenceCount(occurrenceCount: number): void; + /** + * Gets how many times the appointment occurs. + */ + GetOccurrenceCount(): number; + /** + * Sets the frequency with which the corresponding appointment occurs (dependent on the recurrence Type). + * @param periodicity An integer value that specifies the frequency with which the corresponding appointment occurs. + */ + SetPeriodicity(periodicity: number): void; + /** + * Gets the frequency with which the corresponding appointment reoccurs (dependent on the recurrence Type). + */ + GetPeriodicity(): number; + /** + * Sets the ordinal number of a day within a defined month. + * @param dayNumber A positive integer value that specifies the day number within a month. + */ + SetDayNumber(dayNumber: number): void; + /** + * Gets the ordinal number of a day within a defined month. + */ + GetDayNumber(): number; + /** + * Sets the occurrence number of the week in a month for the recurrence pattern. + * @param weekOfMonth A ASPxClientWeekOfMonth enumeration value that specifies a particular week in every month. + */ + SetWeekOfMonth(weekOfMonth: ASPxClientWeekOfMonth): void; + /** + * Gets the occurrence number of the week in a month for the recurrence pattern. + */ + GetWeekOfMonth(): ASPxClientWeekOfMonth; + /** + * Sets the month (as a number) on which the corresponding appointment occurs. + * @param month A positive integer value that specifies the month's number. + */ + SetMonth(month: number): void; + /** + * Gets the month (as a number) on which the corresponding appointment recurs. + */ + GetMonth(): number; + /** + * Gets the type of the recurrence range. + */ + GetRange(): ASPxClientRecurrenceRange; + /** + * Sets the type of the recurrence range. + * @param range An ASPxClientRecurrenceRangeenumeration value that specifies the recurrence range type. + */ + SetRange(range: ASPxClientRecurrenceRange): void; +} +/** + * Contains types of the recurrence range. + */ +interface ASPxClientRecurrenceRange { + /** + * A recurring appointment will not have an end date, i.e. infinite recurrence + * Value: The "NoEndDate" string. + */ + NoEndDate: string; + /** + * A recurring appointment will end after its recurrence count exceeds the value specified by the SetOccurrenceCount method. + * Value: The "OccurrenceCount" string. + */ + OccurrenceCount: string; + /** + * A recurring appointment will end after the date specified by the SetEnd method. + * Value: The "EndByDate" string. + */ + EndByDate: string; +} +/** + * Contains recurrence types. + */ +interface ASPxClientRecurrenceType { + /** + * The recurring appointment occurs on a daily basis. + * Value: The "Daily" string. + */ + Daily: string; + /** + * The recurring appointment reoccurs on a weekly basis. + * Value: The "Weekly" string. + */ + Weekly: string; + /** + * The recurring appointment reoccurs on a monthly basis. + * Value: The "Monthly" string. + */ + Monthly: string; + /** + * The recurring appointment reoccurs on an yearly basis. + * Value: The "Yearly" string. + */ + Yearly: string; + /** + * The recurring appointment occurs on an hourly base. + * Value: The "Hourly" string. + */ + Hourly: string; +} +/** + * Contains days and groups of days for use in recurrence patterns. + */ +interface ASPxClientWeekDays { + /** + * Specifies Sunday. + * Value: The integer 1 value. + */ + Sunday: number; + /** + * Specifies Monday. + * Value: The integer 2 value. + */ + Monday: number; + /** + * Specifies Tuesday. + * Value: The integer 4 value. + */ + Tuesday: number; + /** + * Specifies Wednesday. + * Value: The integer 8 value. + */ + Wednesday: number; + /** + * Specifies Thursday. + * Value: The integer 16 value. + */ + Thursday: number; + /** + * Specifies Friday. + * Value: The integer 32 value. + */ + Friday: number; + /** + * Specifies Saturday. + * Value: The integer 64 value. + */ + Saturday: number; + /** + * Specifies Saturday and Sunday. + * Value: The integer 65 value. + */ + WeekendDays: number; + /** + * Specifies work days (Monday, Tuesday, Wednesday, Thursday and Friday). + * Value: The integer 62 value. + */ + WorkDays: number; + /** + * Specifies every day of the week. + * Value: The integer 127 value. + */ + EveryDay: number; +} +/** + * Contains number of weeks in a month in which the event occurs. + */ +interface ASPxClientWeekOfMonth { + /** + * There isn't any recurrence rule based on the weeks in a month. + * Value: The integer 0 value. + */ + None: number; + /** + * The recurring event will occur once a month, on the specified day or days of the first week in the month. + * Value: The integer 1 value. + */ + First: number; + /** + * The recurring event will occur once a month, on the specified day or days of the second week in the month. + * Value: The integer 2 value. + */ + Second: number; + /** + * The recurring event will occur once a month, on the specified day or days of the third week in the month. + * Value: The integer 3 value. + */ + Third: number; + /** + * The recurring event will occur once a month, on the specified day or days of the fourth week in the month. + * Value: The integer 4 value; + */ + Fourth: number; + /** + * The recurring event will occur once a month, on the specified day or days of the last week in the month. + * Value: The integer 5 value; + */ + Last: number; +} +/** + * Represents a client-side equivalent of the WeekDaysCheckEdit control. + */ +interface ASPxClientWeekDaysCheckEdit extends ASPxClientControl { + /** + * Gets the selection state of the week day check boxes. + */ + GetValue(): ASPxClientWeekDays; + /** + * Gets the selection state of the week day check boxes. + * @param value An ASPxClientWeekDays object specifying the selection state of the week day check boxes. + */ + SetValue(value: ASPxClientWeekDays): void; +} +/** + * Represents a client-side equivalent of the RecurrenceRangeControl. + */ +interface ASPxClientRecurrenceRangeControl extends ASPxClientControl { + /** + * Gets the type of the recurrence range. + */ + GetRange(): ASPxClientRecurrenceRange; + /** + * Gets how many times the appointment occurs. + */ + GetOccurrenceCount(): number; + /** + * Gets the recurrence end date. + */ + GetEndDate(): Date; + /** + * Sets the type of the recurrence range. + * @param range An ASPxClientRecurrenceRangeenumeration value that specifies the recurrence range type. + */ + SetRange(range: ASPxClientRecurrenceRange): void; + /** + * Sets how many times the appointment occurs. + * @param occurrenceCount An integer value that specifies how many times the appointment occurs. + */ + SetOccurrenceCount(occurrenceCount: number): void; + /** + * Sets the recurrence end date. + * @param date A JavaScript Date object that specifies the end date for the recurrence. + */ + SetEndDate(date: Date): void; +} +/** + * A base for client equivalents of recurrence controls available in the XtraScheduler library. + */ +interface ASPxClientRecurrenceControlBase extends ASPxClientControl { + /** + * Returns an object providing access to the ASPxClientRecurrenceControlBase control's editor values. + */ + CreateValueAccessor(): DefaultRecurrenceRuleValuesAccessor; + /** + * Updates values of editors displayed by the ASPxClientRecurrenceControlBase control. + * @param recurrenceInfo An ASPxClientRecurrenceInfo object containing new editor values. + */ + Update(recurrenceInfo: ASPxClientRecurrenceInfo): void; +} +/** + * Represents a client-side equivalent of the DailyRecurrenceControl - a control for specifying the daily recurrence. + */ +interface ASPxClientDailyRecurrenceControl extends ASPxClientRecurrenceControlBase { + /** + * Returns an object providing access to the ASPxClientDailyRecurrenceControl's editor values. + */ + CreateValueAccessor(): DefaultRecurrenceRuleValuesAccessor; + /** + * Updates values of editors displayed by the ASPxClientDailyRecurrenceControl. + * @param recurrenceInfo An ASPxClientRecurrenceInfo object containing new editor values. + */ + Update(recurrenceInfo: ASPxClientRecurrenceInfo): void; +} +/** + * Represents a client-side equivalent of the WeeklyRecurrenceControl. + */ +interface ASPxClientWeeklyRecurrenceControl extends ASPxClientRecurrenceControlBase { + /** + * Returns an object providing access to the ASPxClientWeeklyRecurrenceControl's editor values. + */ + CreateValueAccessor(): DefaultRecurrenceRuleValuesAccessor; + /** + * Updates values of editors displayed by the ASPxClientWeeklyRecurrenceControl. + * @param recurrenceInfo An ASPxClientRecurrenceInfo object containing new editor values. + */ + Update(recurrenceInfo: ASPxClientRecurrenceInfo): void; +} +/** + * Represents a client-side equivalent of the MonthlyRecurrenceControl. + */ +interface ASPxClientMonthlyRecurrenceControl extends ASPxClientRecurrenceControlBase { + /** + * Returns an object providing access to the ASPxClientMonthlyRecurrenceControl's editor values. + */ + CreateValueAccessor(): DefaultRecurrenceRuleValuesAccessor; + /** + * Updates values of editors displayed by the ASPxClientMonthlyRecurrenceControll. + * @param recurrenceInfo An ASPxClientRecurrenceInfo object containing new editor values. + */ + Update(recurrenceInfo: ASPxClientRecurrenceInfo): void; +} +/** + * Represents a client-side equivalent of the YearlyRecurrenceControl. + */ +interface ASPxClientYearlyRecurrenceControl extends ASPxClientRecurrenceControlBase { + /** + * Returns an object providing access to the ASPxClientYearlyRecurrenceControl's editor values. + */ + CreateValueAccessor(): DefaultRecurrenceRuleValuesAccessor; + /** + * Updates values of editors displayed by the ASPxClientYearlyRecurrenceControl. + * @param recurrenceInfo An ASPxClientRecurrenceInfo object containing new editor values. + */ + Update(recurrenceInfo: ASPxClientRecurrenceInfo): void; +} +/** + * An object providing access to an ASPxClientRecurrenceControlBase control's editor values. + */ +interface DefaultRecurrenceRuleValuesAccessor { + /** + * Get the frequency with which the appointment occurs with respect to the appointment's recurrence type. + */ + GetPeriodicity(): number; + /** + * Gets the number of the month's day in which the appointment is scheduled. + */ + GetDayNumber(): number; + /** + * Gets or sets the month's number. + */ + GetMonth(): number; + /** + * Gets the days of the week on which a weekly recurrent appointment is scheduled. + */ + GetWeekDays(): ASPxClientWeekDays; + /** + * Gets the number of the week in a month when an appointment is scheduled. + */ + GetWeekOfMonth(): ASPxClientWeekOfMonth; +} +/** + * An object providing access to an ASPxClientDailyRecurrenceControl's editor values. + */ +interface DailyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAccessor { + /** + * Gets the number of days between appointment occurrences. + */ + GetPeriodicity(): number; + /** + * Gets the days of the week to which a daily recurrent appointment is scheduled. + */ + GetWeekDays(): ASPxClientWeekDays; +} +/** + * An object providing access to an ASPxClientWeeklyRecurrenceControl's editor values. + */ +interface WeeklyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAccessor { + /** + * Gets the number of weeks between appointment occurrences. + */ + GetPeriodicity(): number; + /** + * Gets the days of the week on which a weekly recurrent appointment is scheduled. + */ + GetWeekDays(): ASPxClientWeekDays; +} +/** + * An object providing access to an ASPxClientMonthlyRecurrenceControl's editor values. + */ +interface MonthlyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAccessor { + /** + * Gets the day of the month on which the appointment is scheduled. + */ + GetDayNumber(): number; + /** + * Gets the number of months between appointment occurrences. + */ + GetPeriodicity(): number; + /** + * Gets the days of the week on which a monthly recurrent appointment is scheduled. + */ + GetWeekDays(): ASPxClientWeekDays; + /** + * Gets the number of the week in a month when an appointment is scheduled. + */ + GetWeekOfMonth(): ASPxClientWeekOfMonth; +} +/** + * An object providing access to an ASPxClientYearlyRecurrenceControl's editor values. + */ +interface YearlyRecurrenceValuesAccessor extends DefaultRecurrenceRuleValuesAccessor { + /** + * Gets the day of the month on which the appointment is scheduled. + */ + GetDayNumber(): number; + /** + * Gets or sets the month's number. + */ + GetMonth(): number; + /** + * Gets the days of the week on which a yearly recurrent appointment is scheduled. + */ + GetWeekDays(): ASPxClientWeekDays; + /** + * Gets or sets the number of a week in a month when an appointment is scheduled. + */ + GetWeekOfMonth(): ASPxClientWeekOfMonth; +} +/** + * Provides base functionality for ASPxClientScheduler's forms. + */ +interface ASPxClientFormBase { + /** + * Occurs when the form has been closed. + */ + FormClosed: ASPxClientEvent>; + /** + * Closes the form. + */ + Close(): void; + /** + * Sets the visibility state of the specified form element. + * @param element An object specifying the element whose visibility state should be changed. + * @param isVisible true to display the element; false to hide the element. + */ + SetVisibleCore(element: Object, isVisible: boolean): void; +} +/** + * Represents a client-side equivalent of the RecurrenceTypeEdit. + */ +interface ASPxClientRecurrenceTypeEdit extends ASPxClientRadioButtonList { + /** + * Gets the selected recurrence type. + */ + GetRecurrenceType(): ASPxClientRecurrenceType; + /** + * Sets the selected recurrence type. + * @param recurrenceType An ASPxClientRecurrenceType enumeration value. + */ + SetRecurrenceType(recurrenceType: ASPxClientRecurrenceType): void; +} +/** + * Contains lists of property names for different appointment types. + */ +interface AppointmentPropertyNames { + /** + * Gets the list of properties characteristic for appointments of the Normal type. + * Value: A string array which is composed of the appointment property names. + */ + Normal: string; + /** + * Gets the list of properties characteristic for appointments of the Pattern type. + * Value: A string array which is composed of the appointment property names. + */ + Pattern: string; +} +/** + * Represents the client-side equivalent of the TimeInterval class. + */ +interface ASPxClientTimeInterval { + /** + * Gets a value indicating if the time interval is All-Day. + */ + GetAllDay(): boolean; + /** + * Sets a value specifying if the time interval is All-Day. + * @param allDayValue true, if this is an all-day time interval; otherwise, false. + */ + SetAllDay(allDayValue: boolean): void; + /** + * Client-side function that returns the start time of the interval. + */ + GetStart(): Date; + /** + * Client-side function that returns the duration of the specified time interval. + */ + GetDuration(): number; + /** + * Client-side function that returns the end time of the interval. + */ + GetEnd(): Date; + /** + * Client-side function that sets the start time of the interval. + * @param value A DateTime value, representing the beginning of the interval. + */ + SetStart(value: Date): void; + /** + * Client-side function that returns the duration of the specified time interval. + * @param value A TimeSpan object, representing the duration of the time period. + */ + SetDuration(value: any): void; + /** + * Client-side function that sets the end time of the interval. + * @param value A DateTime value, representing the end of the interval. + */ + SetEnd(value: Date): void; + /** + * Determines whether the specified object is equal to the current ASPxClientTimeInterval instance. + * @param interval The object to compare with the current object. + */ + Equals(interval: ASPxClientTimeInterval): boolean; + /** + * Checks if the current time interval intersects with the specified time interval. + * @param interval A ASPxClientTimeInterval object which represents the time interval to be checked. + */ + IntersectsWith(interval: ASPxClientTimeInterval): boolean; + /** + * Checks if the current time interval intersects with the specified time interval. The boundaries of the time intervals are excluded from the check. + * @param interval A ASPxClientTimeInterval object which represents the time interval to be checked. + */ + IntersectsWithExcludingBounds(interval: ASPxClientTimeInterval): boolean; + /** + * Client-side function that determines whether the specified interval is contained within the current one. + * @param interval An ASPxClientTimeInterval object, representing the time interval to check. + */ + Contains(interval: ASPxClientTimeInterval): boolean; +} +/** + * Holds action types for the client-side Refresh method. + */ +interface ASPxClientSchedulerRefreshAction { + /** + * Gets the value of the action parameter which initiates a simple reload of the control. + * Value: An integer representing the action parameter value. + */ + None: number; + /** + * Gets the value of the action parameter which initiates reloading of the main ASPxScheduler control and its data-dependent satellites. + * Value: An integer representing the action parameter value. + */ + VisibleIntervalChanged: number; + /** + * Gets the value of the action parameter which initiates reloading of the main ASPxScheduler control and its satellite View controls. + * Value: An integer representing the action parameter value. + */ + ActiveViewTypeChanged: number; +} +/** + * Contains methods allowing you to perform or cancel an operation. + */ +interface ASPxClientAppointmentOperation { + /** + * Passes parameters to the corresponding callback function to accomplish the operation. + */ + Apply(): void; + /** + * Cancels the operation. + */ + Cancel(): void; +} +/** + * Represents the client-side equivalent of the ASPxScheduler control. + */ +interface ASPxClientScheduler extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientScheduler. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side when the Scheduler control is about to change its active view. + */ + ActiveViewChanging: ASPxClientEvent>; + /** + * Client-side event. Occurs after the active view of the ASPxScheduler has been changed. + */ + ActiveViewChanged: ASPxClientEvent>; + /** + * Occurs when an end-user presses a keyboard shortcut. + */ + Shortcut: ASPxClientEvent>; + /** + * Occurs when the end-user clicks an appointment. + */ + AppointmentClick: ASPxClientEvent>; + /** + * Occurs when the end-user double clicks on an appointment. + */ + AppointmentDoubleClick: ASPxClientEvent>; + /** + * Occurs when an end-user clicks a time cell. + */ + CellClick: ASPxClientEvent>; + /** + * Occurs when and end-user double-clicks a time cell. + */ + CellDoubleClick: ASPxClientEvent>; + /** + * Occurs on the client side when the user selects an appointment. + */ + AppointmentsSelectionChanged: ASPxClientEvent>; + /** + * Fires on the client side when the time cell selection is changed. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Occurs on the client side when the time cell selection is about to change. + */ + SelectionChanging: ASPxClientEvent>; + /** + * Fires on the client side when the time interval of the scheduling area is changed. + */ + VisibleIntervalChanged: ASPxClientEvent>; + /** + * Occurs when one of More Buttons is clicked. + */ + MoreButtonClicked: ASPxClientEvent>; + /** + * Client-side event that occurs when a popup menu item is clicked. + */ + MenuItemClicked: ASPxClientEvent>; + /** + * Client-side event that occurs after an appointment has been dragged and dropped. + */ + AppointmentDrop: ASPxClientEvent>; + /** + * A client-side event that occurs when an appointment is being dragged. + */ + AppointmentDrag: ASPxClientEvent>; + /** + * A client-side event that occurs when an appointment is being resized. + */ + AppointmentResizing: ASPxClientEvent>; + /** + * Client-side event that occurs when an appointment is resized. + */ + AppointmentResize: ASPxClientEvent>; + /** + * Client-side event that fires before an appointment is deleted. + */ + AppointmentDeleting: ASPxClientEvent>; + /** + * Client-side scripting method that gets the active View. + */ + GetActiveViewType(): ASPxSchedulerViewType; + /** + * Client-side scripting method to change the ASPxScheduler's active View. + * @param value A ASPxSchedulerViewType enumeration value, representing a view type to set. + */ + SetActiveViewType(value: ASPxSchedulerViewType): void; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * Client-side scripting method which initiates a round trip to the server so that the current page will be reloaded. + */ + Refresh(): void; + /** + * Client-side scripting method which initiates a round trip to the server, so that the control will be reloaded using the specified refresh action. + * @param refreshAction An ASPxClientSchedulerRefreshAction enumeration value, specifying the refresh action. + */ + Refresh(refreshAction: ASPxClientSchedulerRefreshAction): void; + /** + * Client-side function that returns the type of grouping applied to the appointments displayed in the scheduler. + */ + GetGroupType(): ASPxSchedulerGroupType; + /** + * Client-side scripting method which raises the callback command to set the GroupType. + * @param value An ASPxSchedulerGroupType enumeration value, which specifies how appointments are grouped. + */ + SetGroupType(value: ASPxSchedulerGroupType): void; + /** + * Client-side method that navigates the scheduler to the current system date. + */ + GotoToday(): void; + /** + * Client-side scripting method which raises the GotoDate callback command. + * @param date A DateTime value specifying the destination time. + */ + GotoDate(date: Date): void; + /** + * Client-side function which slides the visible interval one time span back. + */ + NavigateBackward(): void; + /** + * Client-side function which slides the visible interval one time span forward. + */ + NavigateForward(): void; + /** + * Client-side method which raises the callback command to change the ClientTimeZoneId of the scheduler. + * @param timeZoneId A string, a time zone identifier which is valid for the System.TimeZoneInfo.Id property. + */ + ChangeTimeZoneId(timeZoneId: string): void; + /** + * Displays a Selection ToolTip on a position given by the specified coordinates. + * @param x An integer representing the X-coordinate. + * @param y An integer representing the Y-coordinate. + */ + ShowSelectionToolTip(x: number, y: number): void; + /** + * Client-side function that returns the time interval, selected in the scheduler. + */ + GetSelectedInterval(): ASPxClientTimeInterval; + /** + * Client-side function that returns the ResourceId of selected time cell's resource. + */ + GetSelectedResource(): string; + /** + * Gets a collection of visible appointments. + */ + GetVisibleAppointments(): ASPxClientAppointment[]; + /** + * Client-side function that returns an appointment with the specified ID. + * @param id An appointment's identifier. + */ + GetAppointmentById(id: Object): ASPxClientAppointment; + /** + * Client-side function that returns the id's of selected appointments. + */ + GetSelectedAppointmentIds(): string[]; + /** + * Client-side function that removes the appointment specified by its client ID from a collection of selected appointments. + * @param aptId An appointment's identifier. + */ + DeselectAppointmentById(aptId: Object): void; + /** + * Client-side function that selects an appointment with the specified ID. + * @param aptId An appointment's identifier. + */ + SelectAppointmentById(aptId: Object): void; + /** + * Enables obtaining appointment property values in a client-side script. Executes the callback command with the AppointmentData identifier. + * @param aptId An integer, representing the appointment ID. + * @param propertyNames An array of strings, representing the appointment properties to query. + * @param onCallBack A handler of a function which will receive and process the properties' values. + */ + GetAppointmentProperties(aptId: number, propertyNames: string[], onCallBack: Object): string[]; + /** + * Initiates a callback to retrieve and apply the values for the specified list of properties to the specified appointment, and transfer control to the specified function. + * @param clientAppointment An ASPxClientAppointment object that is the client appointment for which the data is retrieved. + * @param propertyNames An array of strings, that are the names of appointment properties to query. + * @param onCallBack A handler of a function executed after a callback. + */ + RefreshClientAppointmentProperties(clientAppointment: ASPxClientAppointment, propertyNames: string[], onCallBack: Object): void; + /** + * Client-side function that invokes the editing form for the appointment specified by its client ID. + * @param aptClientId A string, representing the appointment client identifier. + */ + ShowAppointmentFormByClientId(aptClientId: string): void; + /** + * Client-side function that invokes the editing form for the appointment specified by its storage identifier. + * @param aptServerId A string, representing the appointment identifier. + */ + ShowAppointmentFormByServerId(aptServerId: string): void; + /** + * Sets the time of the day corresponding to the start of the topmost displayed time cell row. + * @param duration An integer, representing the number of milliseconds passed since the start of the day. + * @param viewType An ASPxSchedulerViewType enumeration member, representing the scheduler's View. It can be either 'Day' or 'WorkWeek'. + */ + SetTopRowTime(duration: number, viewType: ASPxSchedulerViewType): void; + /** + * Sets the time of the day corresponding to the start of the topmost displayed time cell row. + * @param duration An integer, representing the number of milliseconds passed since the start of the day. + */ + SetTopRowTime(duration: number): void; + /** + * Gets the time of the day corresponding to the start of the topmost displayed time cell row. + * @param viewType An ASPxSchedulerViewType enumeration member, representing the scheduler's View. It can be either "Day" or "WorkWeek", otherwise the result is undefined. + */ + GetTopRowTime(viewType: ASPxSchedulerViewType): number; + /** + * Gets the time of day corresponding to the start of the topmost displayed time cell row. + */ + GetTopRowTime(): number; + /** + * Client-side scripting method which displays the Loading Panel. + */ + ShowLoadingPanel(): void; + /** + * Client-side scripting method which hides the Loading Panel from view. + */ + HideLoadingPanel(): void; + /** + * Client-side method that invokes the inplace editor form to create a new appointment. + * @param start A date object, representing the start of the new appointment. + * @param end A date object, representing the end of the new appointment. + */ + ShowInplaceEditor(start: Date, end: Date): void; + /** + * Client-side method that invokes the inplace editor form to create a new appointment. + * @param start A date object, representing the start of the new appointment. + * @param end A date object, representing the end of the new appointment. + * @param resourceId An object representing the identifier of a resource associated with the new appointment. + */ + ShowInplaceEditor(start: Date, end: Date, resourceId: string): void; + /** + * Client-side scripting method to insert the specified appointment. + * @param apt An ASPxClientAppointment object representing the client-side appointment. + */ + InsertAppointment(apt: ASPxClientAppointment): void; + /** + * Client-side scripting method to update the specified appointment. + * @param apt An ASPxClientAppointment object representing the client-side appointment. + */ + UpdateAppointment(apt: ASPxClientAppointment): void; + /** + * Client-side scripting method to delete the specified appointment. + * @param apt An ASPxClientAppointment object representing the client-side appointment. + */ + DeleteAppointment(apt: ASPxClientAppointment): void; + /** + * Client-side method that allows retrieving a collection of time intervals displayed by the ASPxScheduler. + */ + GetVisibleIntervals(): ASPxClientTimeInterval[]; + /** + * Changes the container that the ASPxScheduler tooltip belongs to. + * @param container An object that serves as the new container for the pop-up menu. + */ + ChangeToolTipContainer(container: Object): void; + /** + * Changes the container that the ASPxScheduler pop-up menu belongs to. + * @param container An object that serves as the new container for the pop-up menu. + */ + ChangePopupMenuContainer(container: Object): void; + /** + * Returns focus to the form if the ASPxScheduler control is not visible when the reminder fires. + * @param container A DIV object that is located in such a way that it is visible on the page in situations when the ASPxScheduler control is hidden. + */ + ChangeFormContainer(container: Object): void; + /** + * Client-side scripting method that saves appointment modifications and closes the form. + */ + AppointmentFormSave(): void; + /** + * Client-side scripting method that deletes the appointment being edited. + */ + AppointmentFormDelete(): void; + /** + * Client-side scripting method that cancels changes and closes the appointment editing form. + */ + AppointmentFormCancel(): void; + /** + * Client-side scripting method that navigates the scheduler to the date selected in the GotoDate form and closes the form. + */ + GoToDateFormApply(): void; + /** + * Client-side scripting method that cancels changes and closes the GotoDate form. + */ + GoToDateFormCancel(): void; + /** + * Client-side scripting method that cancels changes and closes the form. + */ + InplaceEditFormSave(): void; + /** + * Client-side scripting method that cancels changes and closes the form. + */ + InplaceEditFormCancel(): void; + /** + * Client-side scripting method that invokes the appointment editing form for the appointment being edited in the inplace editor. + */ + InplaceEditFormShowMore(): void; + /** + * Client-side scripting method that closes the Reminder form. + */ + ReminderFormCancel(): void; + /** + * Client-side scripting method that calls the Dismiss method for the selected reminder. + */ + ReminderFormDismiss(): void; + /** + * Client-side scripting method that dismisses all reminders shown in the Reminder form. + */ + ReminderFormDismissAll(): void; + /** + * Client-side scripting method that changes the alert time for the selected reminder to the specified interval. + */ + ReminderFormSnooze(): void; +} +/** + * Represents a client-side equivalent of the SchedulerViewType object. + */ +interface ASPxSchedulerViewType { + /** + * Gets a string representation equivalent of Day enumeration for use in client scripts. + * Value: A string "Day", indicating the DayView. + */ + Day: string; + /** + * Gets a string representation equivalent of WorkWeek enumeration for use in client scripts. + * Value: A string "WorkWeek", indicating the WorkWeekView. + */ + WorkWeek: string; + /** + * Gets a string representation equivalent of Week enumeration for use in client scripts. + * Value: A string "Week", indicating the WeekView. + */ + Week: string; + /** + * Gets a string representation equivalent of Month enumeration for use in client scripts. + * Value: A string "Month", indicating the MonthView. + */ + Month: string; + /** + * Gets a string representation equivalent of Timeline enumeration for use in client scripts. + * Value: A string "Timeline", indicating the TimelineView. + */ + Timeline: string; + /** + * Gets a string representation equivalent of FullWeek enumeration for use in client scripts. + * Value: A string "FullWeek", indicating the FullWeekView. + */ + FullWeek: string; + /** + * Gets a string representation equivalent to the Agenda enumeration for use in client scripts. + * Value: A string "Agenda", indicating the AgendaView. + */ + Agenda: string; +} +/** + * Represents a client-side equivalent of the SchedulerGroupType enumeration. + */ +interface ASPxSchedulerGroupType { + /** + * Gets a string representation equivalent of None enumeration for use in client scripts. + * Value: A "None" string value. + */ + None: string; + /** + * Gets a string representation equivalent of Date enumeration for use in client scripts. + * Value: A "Date" string value. + */ + Date: string; + /** + * Gets a string representation equivalent of Resource enumeration for use in client scripts. + * Value: A "Resource" string value. + */ + Resource: string; +} +/** + * Represents a client-side equivalent of the AppointmentType enumeration. + */ +interface ASPxAppointmentType { + /** + * Gets a string representation equivalent of Normal enumeration for use in client scripts. + * Value: A "Normal" string value. + */ + Normal: string; + /** + * Gets a string representation equivalent of Pattern enumeration for use in client scripts. + * Value: A "Pattern" string value. + */ + Pattern: string; + /** + * Gets a string representation equivalent of Occurrence enumeration for use in client scripts. + * Value: An "Occurrence" string value. + */ + Occurrence: string; + /** + * Gets a string representation equivalent of ChangedOccurrence enumeration for use in client scripts. + * Value: A "ChangedOccurrence" string value. + */ + ChangedOccurrence: string; + /** + * Gets a string representation equivalent of DeletedOccurrence enumeration for use in client scripts. + * Value: A "DeletedOccurrence" string value. + */ + DeletedOccurrence: string; +} +interface ASPxClientAppointmentDeletingEventHandler { + /** + * A method that will handle the AppointmentDeleting event. + * @param source The event sender (typically an ASPxClientScheduler control). + * @param e A ASPxClientAppointmentDeletingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientAppointmentDeletingEventArgs): void; +} +/** + * Provides data for the AppointmentDeleting event. + */ +interface ASPxClientAppointmentDeletingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets client IDs of the appointments that are intended to be removed. + * Value: An array of client appointment identifiers, representing appointments passed for deletion. + */ + appointmentIds: Object[]; +} +interface AppointmentClickEventHandler { + /** + * A method that will handle the AppointmentClick event. + * @param source The event sender (typically an ASPxClientScheduler control). + * @param e A AppointmentClickEventArgs object that contains event data. + */ + (source: S, e: AppointmentClickEventArgs): void; +} +/** + * Provides data for the AppointmentDoubleClick events. + */ +interface AppointmentClickEventArgs extends ASPxClientEventArgs { + /** + * Gets the client appointment ID for the appointment being clicked. + * Value: A string, representing the client ID of the appointment. + */ + appointmentId: string; + /** + * Gets the HTML element that the event was triggered on. + * Value: An object containing event data. + */ + htmlElement: Object; + /** + * Gets or sets whether an event is handled, and that default actions are not required. + * Value: true if no default processing is required; otherwise, false. + */ + handled: boolean; +} +/** + * A method that will handle the AppointmentsSelectionChanged event. + */ +interface AppointmentsSelectionEventHandler { + /** + * A method that will handle the AppointmentsSelectionChanged event. + * @param source The ASPxScheduler control which fires the event. + * @param e A AppointmentsSelectionEventArgs object that contains event data. + */ + (source: S, e: AppointmentsSelectionEventArgs): void; +} +/** + * Provides data for the AppointmentsSelectionChanged event. + */ +interface AppointmentsSelectionEventArgs extends ASPxClientEventArgs { + /** + * Gets identifiers of the selected appointments. + * Value: A comma separated list of string values, representing appointment IDs. + */ + appointmentIds: string[]; +} +/** + * A method that will handle the Shortcut event. + */ +interface ShortcutEventHandler { + /** + * A method that will handle the Shortcut event. + * @param source The event sender (typically an ASPxClientScheduler control). + * @param e A ShortcutEventArgs object that contains event data. + */ + (source: S, e: ShortcutEventArgs): void; +} +/** + * Provides data for the client-side Shortcut event. + */ +interface ShortcutEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of a command associated with the keyboard shortcut. + * Value: A string containing a command name. + */ + commandName: string; + /** + * Gets an object containing information about a keyboard shortcut event. + * Value: An object containing event data. + */ + htmlEvent: Object; + /** + * Gets or sets whether an event is handled, and that default actions are not required. + * Value: true, if no default processing is required; otherwise, false. + */ + handled: boolean; +} +/** + * A method that will handle the ActiveViewChanging event. + */ +interface ActiveViewChangingEventHandler { + /** + * A method that will handle the ActiveViewChanging event. + * @param source The ASPxClientScheduler control which fires the event. + * @param e An ActiveViewChangingEventArgs object that contains event data + */ + (source: S, e: ActiveViewChangingEventArgs): void; +} +/** + * Provides data for the client-side ActiveViewChanging event. + */ +interface ActiveViewChangingEventArgs extends ASPxClientEventArgs { + /** + * Gets the value of the ActiveView property before modification. + * Value: A SchedulerViewType enumeration. + */ + oldView: ASPxSchedulerViewType; + /** + * Gets the new value of the ActiveView property. + * Value: A string, which is the SchedulerViewType enumeration value. + */ + newView: ASPxSchedulerViewType; + /** + * Gets or sets whether the change of active view should be canceled. + * Value: true to cancel the operation; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the MoreButtonClicked event. + */ +interface MoreButtonClickedEventHandler { + /** + * A method that will handle MoreButtonClicked event. + * @param source The ASPxClientScheduler control which fires the event. + * @param e A MoreButtonClickedEventArgs object that contains event data. + */ + (source: S, e: MoreButtonClickedEventArgs): void; +} +/** + * Provides data for the MoreButtonClicked client-side event. + */ +interface MoreButtonClickedEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the Start or End values of the target appointment. + * Value: A DateTime value representing the target appointment's boundary. + */ + targetDateTime: Date; + /** + * Gets the time interval of the cell where the button is located. + * Value: An ASPxClientTimeInterval object representing the time interval of the cell which holds the button. + */ + interval: ASPxClientTimeInterval; + /** + * Gets the resource identifier associated with the cell where the button is located. + * Value: A string, corresponding to ResourceId. + */ + resource: string; + /** + * Gets or sets whether an event is handled. If it is handled, default actions are not required. + * Value: true if no default processing is required; otherwise, false. + */ + handled: boolean; +} +/** + * A method that will handle the MenuItemClicked event. + */ +interface MenuItemClickedEventHandler { + /** + * A method that will handle the MenuItemClicked event. + * @param source The ASPxClientScheduler control which fires the event. + * @param e A MenuItemClickedEventArgs object that contains event data. + */ + (source: S, e: MenuItemClickedEventArgs): void; +} +/** + * Provides data for the MenuItemClicked event. + */ +interface MenuItemClickedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the menu item which is clicked. + * Value: A string, containing the menu item name. + */ + itemName: string; + /** + * Gets or sets whether an event is handled, and that default actions are not required. + * Value: true if no default processing is required; otherwise, false. + */ + handled: boolean; +} +/** + * A method that will handle the AppointmentDrag event. + */ +interface AppointmentDragEventHandler { + /** + * A method that will handle the AppointmentDrag event. + * @param source The event sender (typically an ASPxClientScheduler object). + * @param e A ASPxClientAppointmentDragEventArgs object that contains event data. + */ + (source: S, e: ASPxClientAppointmentDragEventArgs): void; +} +/** + * Provides data for the AppointmentDrag event. + */ +interface ASPxClientAppointmentDragEventArgs extends ASPxClientEventArgs { + /** + * Specifies whether or not appointments can be dropped into the intervals over which they are currently dragged. + * Value: true to allow dropping appointments; otherwise, false. + */ + allow: boolean; + /** + * Gets a mouse event object related to the current drag operation. + * Value: An object providing event properties specific to mouse events. + */ + mouseEvent: Object; + /** + * Provides information about dragged appointments. + * Value: An array of ASPxClientAppointmentDragInfo objects storing information about dragged appointments. + */ + dragInformation: ASPxClientAppointmentDragInfo[]; +} +/** + * A method that will handle the AppointmentDrop event. + */ +interface AppointmentDropEventHandler { + /** + * A method that will handle the AppointmentDrop event. + * @param source The event sender (typically an ASPxClientScheduler object). + * @param e A ASPxClientAppointmentDropEventArgs object that contains event data. + */ + (source: S, e: ASPxClientAppointmentDropEventArgs): void; +} +/** + * Provides data for the AppointmentDrop event. + */ +interface ASPxClientAppointmentDropEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets a value that specifies whether the event is handled, and the default processing is not required. + * Value: true, if if the event is completely handled by custom code and no default processing is required; otherwise, false. + */ + handled: boolean; + /** + * Provides access to an object that enables you to choose an operation to perform. + * Value: An ASPxClientAppointmentOperation object providing methods to perform the required operation. + */ + operation: ASPxClientAppointmentOperation; + /** + * Provides information about dropped appointments. + * Value: An array of ASPxClientAppointmentDragInfo objects storing information about dropped appointments. + */ + dragInformation: ASPxClientAppointmentDragInfo[]; +} +interface AppointmentResizeEventHandler { + /** + * A method that will handle the AppointmentResize event. + * @param source The event sender (typically an ASPxClientScheduler control). + * @param e A ASPxClientAppointmentResizeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientAppointmentResizeEventArgs): void; +} +/** + * Provides data for the AppointmentResize event. + */ +interface ASPxClientAppointmentResizeEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets whether default event processing is required. + * Value: true to process an event using only custom code; otherwise, false. + */ + handled: boolean; + /** + * Provides access to an object that enables you to choose an operation to perform. + * 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; +} +/** + * A method that will handle the AppointmentResizing event. + */ +interface AppointmentResizingEventHandler { + /** + * A method that will handle the AppointmentResizing event. + * @param source The event sender (typically an ASPxClientScheduler object). + * @param e A ASPxClientAppointmentResizingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientAppointmentResizingEventArgs): void; +} +/** + * Provides data for the AppointmentResizing event. + */ +interface ASPxClientAppointmentResizingEventArgs extends ASPxClientEventArgs { + /** + * Specifies whether or not an appointment can be resized to the new time interval. + * Value: true to allow resizing the appointment; otherwise, false. + */ + allow: boolean; + /** + * Gets a mouse event object related to the current appointment resizing operation. + * Value: An object providing event properties specific to mouse events. + */ + mouseEvent: Object; + /** + * 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[]; +} +/** + * A method that will handle the CellDoubleClick events. + */ +interface CellClickEventHandler { + /** + * A method that will handle the CellClick event. + * @param source The event sender (typically an ASPxClientScheduler control). + * @param e A CellClickEventArgs object that contains event data. + */ + (source: S, e: CellClickEventArgs): void; +} +/** + * Provides data for the CellDoubleClick events. + */ +interface CellClickEventArgs extends ASPxClientEventArgs { + /** + * Provides access to an object containing information about an HTML element representing the clicked time cell. + * Value: An object containing information about an HTML element. + */ + htmlElement: Object; + /** + * Provides access to a time interval occupied by the clicked time cell. + * Value: An object. + */ + interval: ASPxClientTimeInterval; + /** + * Gets the name of a resource to which the clicked time cell belongs. + * Value: A string containing the name of a resource. + */ + resource: string; +} +/** + * Contains information about a client tooltip. + */ +interface ASPxClientSchedulerToolTipData { + /** + * Returns the client appointment for which the tooltip is displayed. + */ + GetAppointment(): ASPxClientAppointment; + /** + * Returns the client time interval for which the tooltip is displayed. + */ + GetInterval(): ASPxClientTimeInterval; + /** + * Returns the resources associated with the appointment for which the tooltip is displayed. + */ + GetResources(): Object[]; +} +/** + * A client-side equivalent of the ASPxSchedulerToolTipBase control. + */ +interface ASPxClientToolTipBase { + /** + * Returns the value that indicates whether or not the tooltip can be displayed. + */ + CanShowToolTip(): boolean; + /** + * Ends updating the tooltip content. + * @param toolTipData An ASPxClientSchedulerToolTipData object providing data required to update the tooltip content. + */ + FinalizeUpdate(toolTipData: ASPxClientSchedulerToolTipData): void; + /** + * Updates the tooltip content. + * @param toolTipData An ASPxClientSchedulerToolTipData object providing data required to update the tooltip content. + */ + Update(toolTipData: ASPxClientSchedulerToolTipData): void; + /** + * Closes the tooltip. + */ + Close(): void; + /** + * Gets the tooltip position. + * @param bounds An object that represents the tooltip bounds. + */ + CalculatePosition(bounds: Object): ASPxClientPoint; + /** + * Displays the Appointment Menu in the position of the tooltip. + * @param eventObject An object containing information about the event on which the menu is displayed. + */ + ShowAppointmentMenu(eventObject: Object): void; + /** + * Displays the View Menu in the position of the tooltip. + * @param eventObject An object containing information about the event on which the menu is displayed. + */ + ShowViewMenu(eventObject: Object): void; + /** + * Returns the string representation of the specified interval. + * @param interval An ASPxClientTimeInterval object to convert. + */ + ConvertIntervalToString(interval: ASPxClientTimeInterval): string; +} +/** + * Represents the client-side equivalent of the ASPxSpellChecker class. + */ +interface ASPxClientSpellChecker extends ASPxClientControl { + /** + * Client-side event that occurs before the spell check starts. + */ + BeforeCheck: ASPxClientEvent>; + /** + * Client-side event that occurs before a message box informing about process completion is shown. + */ + CheckCompleteFormShowing: ASPxClientEvent>; + /** + * Client-side event that occurs when a spell check is finished. + */ + AfterCheck: ASPxClientEvent>; + /** + * Occurs after a word is changed in a checked text. + */ + WordChanged: ASPxClientEvent>; + /** + * Starts the spelling check of the text contained within the element specified by the CheckedElementID value. + */ + Check(): void; + /** + * Starts checking contents of the specified element. + * @param element An object representing the element being checked. + */ + CheckElement(element: Object): void; + /** + * Starts checking contents of the specified element. + * @param id A string representing the identifier of the element being checked. + */ + CheckElementById(id: string): void; + /** + * Starts checking the contents of controls in the specified container. + * @param containerElement An object representing a control which contains elements being checked. + */ + CheckElementsInContainer(containerElement: Object): void; + /** + * Starts checking the contents of controls in the specified container. + * @param containerId A string, specifying the control's identifier. + */ + CheckElementsInContainerById(containerId: string): void; +} +/** + * Represents an object that will handle the client-side BeforeCheck event. + */ +interface ASPxClientBeforeCheckEventHandler { + /** + * A method that will handle the BeforeCheck event. + * @param source The ASPxClientSpellChecker control which fires the event. + * @param e A ASPxClientSpellCheckerBeforeCheckEventArgs object that contains event data + */ + (source: S, e: ASPxClientSpellCheckerBeforeCheckEventArgs): void; +} +/** + * Provides data for an event that occurs before a spelling check is started. Represents the client-side equivalent of the BeforeCheckEventArgs class. + */ +interface ASPxClientSpellCheckerBeforeCheckEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the programmatic identifier assigned to the control which is going to be checked. + * Value: A string, containing the control's identifier. + */ + controlId: string; +} +/** + * Represents an object that will handle the client-side AfterCheck event. + */ +interface ASPxClientAfterCheckEventHandler { + /** + * A method that will handle the AfterCheck event. + * @param source The ASPxClientSpellChecker control which fires the event. + * @param e A ASPxClientSpellCheckerAfterCheckEventArgs object that contains event data + */ + (source: S, e: ASPxClientSpellCheckerAfterCheckEventArgs): void; +} +/** + * Provides data for the client event that occurs after a spelling check is complete. + */ +interface ASPxClientSpellCheckerAfterCheckEventArgs extends ASPxClientEventArgs { + /** + * Gets the programmatic identifier assigned to the control which has been checked. + * Value: A string, containing the control's identifier. + */ + controlId: string; + /** + * Gets the text that has been checked. + * Value: A string, containing checked text. + */ + checkedText: string; + /** + * Gets a value specifying whether spell checking is finished or stopped by the user. + * Value: A string value identifying the reason ("Default" or "User"). + */ + reason: string; +} +/** + * Represents an object that will handle the client-side WordChanged event. + */ +interface ASPxClientWordChangedEventHandler { + /** + * A method that will handle the AfterCheck event. + * @param source The event source. + * @param e An ASPxClientSpellCheckerAfterCheckEventArgs object which contains event data. + */ + (source: S, e: ASPxClientSpellCheckerAfterCheckEventArgs): void; +} +declare enum ASPxClientSpreadsheetPopupMenuType { + ColumnHeading=0, + RowHeading=1, + SheetTab=3, + Picture=4, + Chart=5, + Cell=7, + AutoFilter=8 +} +/** + * A method that will handle the CustomCommandExecuted event. + */ +interface ASPxClientSpreadsheetCustomCommandExecutedEventHandler { + /** + * A method that will handle the CustomCommandExecuted event. + * @param source An object representing the event source. Identifies the Spreadsheet that raised the event. + * @param e A ASPxClientSpreadsheetCustomCommandExecutedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSpreadsheetCustomCommandExecutedEventArgs): void; +} +/** + * Provides data for the CustomCommandExecuted event. + */ +interface ASPxClientSpreadsheetCustomCommandExecutedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value representing the processed command's name. + */ + commandName: string; + /** + * Gets an optional parameter that complements the processed command. + * Value: A string value containing additional information about the processed command. + */ + parameter: string; + /** + * This property is now obsolete. Use the commandName property instead. + */ + item: ASPxClientRibbonItem; +} +/** + * A method that will handle the DocumentChanged event. + */ +interface ASPxClientSpreadsheetDocumentChangedEventHandler { + /** + * A method that will handle the DocumentChanged event. + * @param source An object representing the event source. Identifies the Spreadsheet that raised the event. + * @param e A ASPxClientSpreadsheetDocumentChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSpreadsheetDocumentChangedEventArgs): void; +} +/** + * Provides data for the DocumentChanged event. + */ +interface ASPxClientSpreadsheetDocumentChangedEventArgs extends ASPxClientEventArgs { +} +/** + * A method that will handle the EndSynchronization events. + */ +interface ASPxClientSpreadsheetSynchronizationEventHandler { + /** + * A method that will handle the EndSynchronization events. + * @param source An object representing the event source. Identifies the Spreadsheet that raised the event. + * @param e A ASPxClientSpreadsheetSynchronizationEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSpreadsheetSynchronizationEventArgs): void; +} +/** + * Provides data for the EndSynchronization events. + */ +interface ASPxClientSpreadsheetSynchronizationEventArgs extends ASPxClientEventArgs { +} +/** + * A method that will handle the HyperlinkClick event. + */ +interface ASPxClientSpreadsheetHyperlinkClickEventHandler { + /** + * A method that will handle the HyperlinkClick event. + * @param source An object representing the event source. Identifies the Spreadsheet that raised the event. + * @param e An ASPxClientSpreadsheetHyperlinkClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSpreadsheetHyperlinkClickEventArgs): void; +} +/** + * Provides data for the HyperlinkClick event. + */ +interface ASPxClientSpreadsheetHyperlinkClickEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets a value that specifies whether the event is handled, and the default processing is not required. + * Value: true, if if the event is completely handled by custom code and no default processing is required; otherwise, false. + */ + handled: boolean; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; + /** + * Gets a value identifying the clicked hyperlink type. + * Value: One of the values. + */ + hyperlinkType: ASPxClientOfficeDocumentLinkType; + /** + * Gets the clicked link's URI. + * Value: A sting value specifying the link's URI. + */ + targetUri: string; +} +/** + * A method that will handle the PopupMenuShowing event. + */ +interface ASPxClientSpreadsheetPopupMenuShowingEventHandler { + /** + * A method that will handle the PopupMenuShowing event. + * @param source The event sender (typically an ASPxClientSpreadsheet object). + * @param e A ASPxClientSpreadsheetPopupMenuShowingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSpreadsheetPopupMenuShowingEventArgs): void; +} +/** + * Provides data for the PopupMenuShowing event. + */ +interface ASPxClientSpreadsheetPopupMenuShowingEventArgs extends ASPxClientCancelEventArgs { + /** + * Provides access to a collection of menu items in the context menu being invoked. + * Value: A object representing the context menu's item collection. + */ + menuItems: ASPxClientSpreadsheetPopupMenuItemCollection; + /** + * Gets the currently displayed context menu's type. + * Value: One of the enumeration values. + */ + menuType: any; +} +/** + * A client-side equivalent of the ASPxSpreadsheet object. + */ +interface ASPxClientSpreadsheet extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientSpreadsheet. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client when a selection is changed in the ASPxSpreadsheet. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Occurs after a custom command has been executed on the client side. + */ + CustomCommandExecuted: ASPxClientEvent>; + /** + * Fires if any change is made to the Spreadsheet's document on the client. + */ + DocumentChanged: ASPxClientEvent>; + /** + * Fires after a client change has been made to the document and the client-server synchronization starts to apply the change on the server. + */ + BeginSynchronization: ASPxClientEvent>; + /** + * Fires after a document change has been applied to the server and server and client document models have been synchronized. + */ + EndSynchronization: ASPxClientEvent>; + /** + * Occurs on the client side after a hyperlink is clicked within the Spreadsheet's document. + */ + HyperlinkClick: ASPxClientEvent>; + /** + * Occurs before the context menu is displayed and allows menu customization. + */ + PopupMenuShowing: ASPxClientEvent>; + /** + * Sets input focus to the Spreadsheet. + */ + Focus(): void; + /** + * Gets access to the client ribbon object. + */ + GetRibbon(): ASPxClientRibbon; + /** + * Enables you to switch the full-screen mode of the Spreadsheet. + * @param fullscreen true to activate full-screen mode; false to deactivate full-screen mode. + */ + SetFullscreenMode(fullscreen: boolean): void; + /** + * Returns the current selection made in a Spreadsheet. + */ + GetSelection(): ASPxClientSpreadsheetSelection; + /** + * Indicates whether any unsaved changes are contained in the current document. + */ + HasUnsavedChanges(): boolean; + /** + * Gets the value of the specified cell. + * @param colModelIndex An integer value specifying the cell's column index. + * @param rowModelIndex An integer value specifying the cell's row index. + */ + GetCellValue(colModelIndex: number, rowModelIndex: number): Object; + /** + * Returns the comment associated with the specified data cell. + * @param colModelIndex An integer value specifying the data cell's column index. + * @param rowModelIndex An integer value specifying the data cell's row index. + */ + GetCellComment(colModelIndex: number, rowModelIndex: number): Object; + /** + * Gets the value of the currently active cell. + */ + GetActiveCellValue(): Object; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * 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; + /** + * Sends a callback to the server and generates the server-side DocumentCallback event, passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side DocumentCallback event. + */ + PerformDocumentCallback(parameter: string): void; + /** + * Reconnects the Spreadsheet to an external ribbon. + */ + ReconnectToExternalRibbon(): void; +} +/** + * A method that will handle the client SelectionChanged event. + */ +interface ASPxClientSpreadsheetSelectionChangedEventHandler { + /** + * A method that will handle the SelectionChanged event. + * @param source An object representing the event source. Identifies the button editor that raised the event. + * @param e An ASPxClientSpreadsheetSelectionChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSpreadsheetSelectionChangedEventArgs): void; +} +/** + * Provides data for the SelectionChanged event. + */ +interface ASPxClientSpreadsheetSelectionChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets an object that determines the currently selected region within the Spreadsheet. + * Value: A object defining the current selection. + */ + selection: ASPxClientSpreadsheetSelection; +} +/** + * Represents the selection in the Spreadsheet. + */ +interface ASPxClientSpreadsheetSelection { + /** + * Gets the column index of the active cell. + * Value: An integer value specifying the active cell column index. + */ + activeCellColumnIndex: number; + /** + * Gets the row index of the active cell. + * Value: An integer value specifying the active cell row index. + */ + activeCellRowIndex: number; + /** + * Gets the index of the selection's left column. + * Value: An integer value specifying the index of the left column within the selection. + */ + leftColumnIndex: number; + /** + * Gets the index of the selection's top row. + * Value: An integer value specifying the index of the top row within the selection. + */ + topRowIndex: number; + /** + * Gets the index of the selection's right column. + * Value: An integer value specifying the index of the right column within the selection. + */ + rightColumnIndex: number; + /** + * Gets the index of the selection's bottom row. + * Value: An integer value specifying the index of the bottom row within the selection. + */ + bottomRowIndex: number; +} +/** + * Represents an individual item of the Spreadsheet's context menu. + */ +interface ASPxClientSpreadsheetPopupMenuItem { + /** + * Gets the immediate parent menu item to which the current menu item belongs. + * Value: A ASPxClientSpreadsheetPopupMenuItem object representing the menu item's immediate parent. + */ + parent: ASPxClientSpreadsheetPopupMenuItem; + /** + * Gets or sets the unique identifier name for the current menu item. + * Value: A string value that specifies the item's unique identifier name. + */ + name: string; + /** + * Gets or sets the text content of the current menu item. + * Value: A string value that specifies the text content of the menu item. + */ + text: string; + /** + * Gets or sets a value that indicates whether the menu item is enabled, allowing the item to respond to end-user interactions. + * Value: true if the item is enabled; otherwise, false. + */ + enabled: boolean; + /** + * Gets or sets the CSS class name defining the menu item's image. + * Value: A string value specifying the class name. + */ + imageClassName: string; + /** + * Gets or sets an URL which defines the navigation location. + * Value: A string value which represents an URL where the client web browser will navigate. + */ + navigateUrl: string; + /** + * Gets or sets the URL of the menu item's image. + * Value: A string value that specifies the location of an image. + */ + imageUrl: string; + /** + * Gets or sets a value that specifies whether the current menu item starts a group. + * Value: true if the current menu item starts a group; otherwise, false. + */ + beginGroup: boolean; + /** + * Gets or sets the current menu item's tooltip text. + * Value: A string which specifies the text content of the current menu item's tooltip. + */ + tooltip: string; + /** + * Gets or sets the window or frame at which to target the contents of the URL associated with the current menu item. + * Value: A string which identifies the window or frame at which to target the URL content. + */ + target: string; + /** + * Gets a collection that contains the submenu items of the current menu item. + */ + GetSubItems(): ASPxClientSpreadsheetPopupMenuItemCollection; + /** + * Returns the menu item's sub-item with the specified index. + * @param index An integer value specifying the index of the sub-item within a collection of the current menu item's submenu items. + */ + GetItem(index: number): ASPxClientSpreadsheetPopupMenuItem; + /** + * Returns the menu item's sub-item with the specified name property value. + * @param name A string value specifying the name property value of the sub-item to find. + */ + GetItemByName(name: string): ASPxClientSpreadsheetPopupMenuItem; + /** + * Returns the total number of the menu item's child items (submenu items). + */ + GetItemCount(): number; +} +/** + * Represents a collection of items in the Spreadhseet's context menu. + */ +interface ASPxClientSpreadsheetPopupMenuItemCollection { + /** + * Adds the specified menu item to the end of the collection. + * @param item An ASPxClientSpreadsheetPopupMenuItem object specifying the item to be added to the collection. + */ + Add(item: ASPxClientSpreadsheetPopupMenuItem): void; + /** + * Removes a menu item specified by its index within the collection. + * @param index An integer value specifying the index of the menu item to remove. + */ + Remove(index: number): void; + /** + * Removes a menu item specified by its name. + * @param name A string value specifying the name property value of a menu item to remove from the collection. + */ + RemoveByName(name: string): void; + /** + * Adds the specified item to the specified position within the collection. + * @param index An integer value that specifies the zero-based index at which the specified item should be inserted. + * @param item An ASPxClientSpreadsheetPopupMenuItem object to insert. + */ + Insert(index: number, item: ASPxClientSpreadsheetPopupMenuItem): void; + /** + * Returns the total number of menu items in the collection. + */ + GetCount(): number; + /** + * Returns an item object with the specified name property value. + * @param name A string value representing the name property value of the required item. + */ + GetByName(name: string): ASPxClientSpreadsheetPopupMenuItem; + /** + * Returns a menu item specified by its index in the collection. + * @param index An integer value that is the zero-based index of the to retrieve from the ASPxClientSpreadsheetPopupMenuItemCollection. + */ + Get(index: number): ASPxClientSpreadsheetPopupMenuItem; + /** + * Removes all menu items from the collection. + */ + Clear(): void; +} +/** + * Represents the client ASPxTreeList. + */ +interface ASPxClientTreeList extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any unhandled server error occurs during server-side processing of a callback sent by the ASPxClientTreeList. + */ + CallbackError: ASPxClientEvent>; + /** + * Enables you to display a context menu. + */ + ContextMenu: ASPxClientEvent>; + /** + * Occurs when a custom command button has been clicked. + */ + CustomButtonClick: ASPxClientEvent>; + /** + * Fires after a toolbar item has been clicked. + */ + ToolbarItemClick: ASPxClientEvent>; + /** + * Fires before the focused node has been changed. + */ + NodeFocusing: ASPxClientEvent>; + /** + * Fires in response to changing node focus. + */ + FocusedNodeChanged: ASPxClientEvent>; + /** + * Fires after the selection has been changed via end-user interaction. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Fires after the Customization Window has been closed. + */ + CustomizationWindowCloseUp: ASPxClientEvent>; + /** + * Fires after the callback has been processed in the CustomDataCallback event handler. + */ + CustomDataCallback: ASPxClientEvent>; + /** + * Fires on the client when a node is clicked. + */ + NodeClick: ASPxClientEvent>; + /** + * Fires on the client when a node is double clicked. + */ + NodeDblClick: ASPxClientEvent>; + /** + * Fires before a node is expanded. + */ + NodeExpanding: ASPxClientEvent>; + /** + * Fires before a node is collapsed. + */ + NodeCollapsing: ASPxClientEvent>; + /** + * Occurs before a node is dragged by an end-user. + */ + StartDragNode: ASPxClientEvent>; + /** + * Occurs after a node drag and drop operation is completed. + */ + EndDragNode: ASPxClientEvent>; + /** + * Enables you to prevent columns from being resized. + */ + ColumnResizing: ASPxClientEvent>; + /** + * Occurs after a column's width has been changed by an end-user. + */ + ColumnResized: ASPxClientEvent>; + /** + * Sets input focus to the ASPxTreeList. + */ + Focus(): void; + /** + * Gets the Popup Edit Form. + */ + GetPopupEditForm(): ASPxClientPopupControl; + /** + * Returns a toolbar specified by its name. + * @param name A string value specifying the toolbar name. + */ + GetToolbarByName(name: string): ASPxClientMenu; + /** + * Returns a toolbar specified by its index. + * @param index An integer value specifying the zero-based index of the toolbar object to retrieve. + */ + GetToolbar(index: number): ASPxClientMenu; + /** + * Returns the focused node's key value. + */ + GetFocusedNodeKey(): string; + /** + * Moves focus to the specified node. + * @param key A String value that uniquely identifies the node. + */ + SetFocusedNodeKey(key: string): void; + /** + * Indicates whether the specified node is selected. + * @param nodeKey A String value that identifies the node by its key value. + */ + IsNodeSelected(nodeKey: string): any; + /** + * Selects the specified node. + * @param nodeKey A string value that identifies the node. + */ + SelectNode(nodeKey: string): void; + /** + * Selects or deselects the specified node. + * @param nodeKey A string value that identifies the node. + * @param state true to select the node; otherwise, false. + */ + SelectNode(nodeKey: string, state: boolean): void; + /** + * Obtains key values of selected nodes that are displayed within the current page. + */ + GetVisibleSelectedNodeKeys(): string[]; + /** + * Indicates whether the Customization Window is displayed. + */ + IsCustomizationWindowVisible(): boolean; + /** + * Invokes the Customization Window. + */ + ShowCustomizationWindow(): void; + /** + * Invokes the Customization Window and displays it over the specified HTML element. + * @param htmlElement An object that specifies the HTML element relative to whose position the customization window is invoked. + */ + ShowCustomizationWindow(htmlElement: Object): void; + /** + * Closes the Customization Window. + */ + HideCustomizationWindow(): void; + /** + * Sends a callback to the server and generates the server-side CustomCallback event, passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side CustomCallback event. + */ + PerformCustomCallback(arg: string): void; + /** + * 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. + */ + PerformCallback(args: string): void; + /** + * 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; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side CustomDataCallback event. + */ + PerformCustomDataCallback(arg: string): void; + /** + * Obtains specified data source field values within a specified node, and submits them to the specified JavaScript function. + * @param nodeKey A string value that identifies the node. + * @param fieldNames A string value that contains the names of data source fields whose values within the specified node are returned. The field names should be separated by ';'. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + */ + GetNodeValues(nodeKey: string, fieldNames: string, onCallback: ASPxClientTreeListValuesCallback): void; + /** + * Obtains specified data source field values within a specified node, and submits them to the specified JavaScript function. + * @param nodeKey A string value that identifies the node. + * @param fieldNames The names of data source fields whose values within the specified node are returned. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + */ + GetNodeValues(nodeKey: string, fieldNames: string[], onCallback: ASPxClientTreeListValuesCallback): void; + /** + * Obtains specified data source field values within nodes that are displayed within the current page, and submits them to the specified JavaScript function. + * @param fieldNames A string value that contains the names of data source fields whose values within visible nodes are returned. The field names should be separated by ';'. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + */ + GetVisibleNodeValues(fieldNames: string, onCallback: ASPxClientTreeListValuesCallback): void; + /** + * Obtains specified data source field values within nodes that are displayed within the current page, and submits them to the specified JavaScript function. + * @param fieldNames The names of data source fields whose values within visible nodes are returned. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + */ + GetVisibleNodeValues(fieldNames: string[], onCallback: ASPxClientTreeListValuesCallback): void; + /** + * Obtains specified data source field values within selected nodes, and submits them to the specified JavaScript function. + * @param fieldNames A string value that contains the names of data source fields whose values within selected nodes are returned. The field names should be separated by ';'. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + */ + GetSelectedNodeValues(fieldNames: string, onCallback: ASPxClientTreeListValuesCallback): void; + /** + * Obtains specified data source field values within selected nodes, and submits them to the specified JavaScript function. + * @param fieldNames The names of data source fields whose values within selected nodes are returned. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + */ + GetSelectedNodeValues(fieldNames: string[], onCallback: ASPxClientTreeListValuesCallback): void; + /** + * Obtains specified data source field values within selected nodes, and submits them to the specified JavaScript function. + * @param fieldNames A string value that contains the names of data source fields whose values within selected nodes are returned. The field names should be separated by ';'. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + * @param visibleOnly true to return values within selected nodes that are displayed within the current page; false to return values within all selected nodes. + */ + GetSelectedNodeValues(fieldNames: string, onCallback: ASPxClientTreeListValuesCallback, visibleOnly: boolean): void; + /** + * Obtains specified data source field values within selected nodes, and submits them to the specified JavaScript function. + * @param fieldNames The names of data source fields whose values within selected nodes are returned. + * @param onCallback A ASPxClientTreeListValuesCallback object that represents the JavaScript function which receives the list of values as a parameter. + * @param visibleOnly true to return values within selected nodes that are displayed within the current page; false to return values within all selected nodes. + */ + GetSelectedNodeValues(fieldNames: string[], onCallback: ASPxClientTreeListValuesCallback, visibleOnly: boolean): void; + /** + * Selects the specified page. + * @param index An integer value that specifies the active page's index. + */ + GoToPage(index: number): void; + /** + * Activates the previous page. + */ + PrevPage(): void; + /** + * Activates the next page. + */ + NextPage(): void; + /** + * Gets the index of the page currently being selected. + */ + GetPageIndex(): number; + /** + * Gets the number of pages to which the ASPxTreeList's data is divided. + */ + GetPageCount(): number; + /** + * Returns the specified node's state. + * @param nodeKey A String value that identifies the node. + */ + GetNodeState(nodeKey: string): string; + /** + * Expands all nodes. + */ + ExpandAll(): void; + /** + * Collapses all Node. + */ + CollapseAll(): void; + /** + * Expands the specified node preserving the collapsed state of child nodes. + * @param key A String value that uniquely identifies the node. + */ + ExpandNode(key: string): void; + /** + * Collapses the specified node preserving the expanded state of child nodes. + * @param key A String value that uniquely identifies the node. + */ + CollapseNode(key: string): void; + /** + * Obtains key values of nodes that are displayed within the current page. + */ + GetVisibleNodeKeys(): string[]; + /** + * Returns an HTML table row that represents the specified node. + * @param nodeKey A string value that identifies the node. + */ + GetNodeHtmlElement(nodeKey: string): Object; + /** + * Returns the number of visible columns within the client ASPxTreeList. + */ + GetVisibleColumnCount(): number; + /** + * Returns the number of columns within the client ASPxTreeList. + */ + GetColumnCount(): number; + /** + * Returns the column located at the specified position within the Columns collection. + * @param index An integer value that identifies the column within the collection (the column's Index property value). + */ + GetColumnByIndex(index: number): ASPxClientTreeListColumn; + /** + * Returns the column with the specified name. + * @param name A string value that specifies the column's name (the column's Name property value). + */ + GetColumnByName(name: string): ASPxClientTreeListColumn; + /** + * Returns the client column which is bound to the specified data source field. + * @param fieldName A string value that specifies the name of the data source field to which the column is bound (the column's FieldName property value). + */ + GetColumnByFieldName(fieldName: string): ASPxClientTreeListColumn; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + */ + SortBy(columnIndex: number): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DESC' or 'NONE'). + */ + SortBy(columnIndex: number, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param columnIndex An integer value that specifies the column's position within the column collection. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DESC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(columnIndex: number, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values. + * @param nameOrFieldName A String value that specifies the column's name or field name. + */ + SortBy(nameOrFieldName: string): void; + /** + * Sorts data by the specified data column's values. + * @param nameOrFieldName A String value that specifies the column's name or field name. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DESC' or 'NONE'). + */ + SortBy(nameOrFieldName: string, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param nameOrFieldName A String value that specifies the column's name or field name. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DESC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(nameOrFieldName: string, sortOrder: string, reset: boolean): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientTreeListColumn object that represents the data column. + */ + SortBy(column: ASPxClientTreeListColumn): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientTreeListColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DESC' or 'NONE'). + */ + SortBy(column: ASPxClientTreeListColumn, sortOrder: string): void; + /** + * Sorts data by the specified data column's values. + * @param column An ASPxClientTreeListColumn object that represents the data column. + * @param sortOrder A string value that specifies the column's sort order ('ASC', 'DESC' or 'NONE'). + * @param reset true to clear any previous sorting; otherwise, false. + */ + SortBy(column: ASPxClientTreeListColumn, sortOrder: string, reset: boolean): void; + /** + * Switches the ASPxTreeList to edit mode. + * @param nodeKey A string value that identifies the node by its key value. + */ + StartEdit(nodeKey: string): void; + /** + * Saves all the changes made and switches the ASPxTreeList to browse mode. + */ + UpdateEdit(): void; + /** + * Cancels all the changes made and switches the ASPxTreeList to browse mode. + */ + CancelEdit(): void; + /** + * Indicates whether the ASPxTreeList is in edit mode. + */ + IsEditing(): boolean; + /** + * Gets the key value of the node currently being edited. + */ + GetEditingNodeKey(): string; + /** + * Moves the specified node to a new position. + * @param nodeKey A string value that identifies the target node by its key value. + * @param parentNodeKey A string value that identifies the node to whose child collection the target node is moved. An empty string to display the target node within the root. + */ + MoveNode(nodeKey: string, parentNodeKey: string): void; + /** + * Deletes the specified node. + * @param nodeKey A string value that identifies the node. + */ + DeleteNode(nodeKey: string): void; + /** + * Switches the ASPxTreeList to edit mode and allows new root node values to be edited. + */ + StartEditNewNode(): void; + /** + * Switches the ASPxTreeList to edit mode and allows new node values to be edited. + * @param parentNodeKey A String value that identifies the parent node, which owns a new node. + */ + StartEditNewNode(parentNodeKey: string): void; + /** + * Returns the editor used to edit the specified column's values. + * @param column An ASPxClientTreeListColumn object that represents the data column within the client ASPxTreeList. + */ + GetEditor(column: ASPxClientTreeListColumn): Object; + /** + * Returns the editor used to edit the specified column's values. + * @param columnIndex An integer value that identifies the column by its position within the column collection. + */ + GetEditor(columnIndex: number): Object; + /** + * Returns the editor used to edit the specified column's values. + * @param columnNameOrFieldName A String value that identifies the column by its name or field name. + */ + GetEditor(columnNameOrFieldName: string): Object; + /** + * Returns the value of the specified edit cell. + * @param column An ASPxClientTreeListColumn object that represents the data column within the client ASPxTreeList. + */ + GetEditValue(column: ASPxClientTreeListColumn): Object; + /** + * Returns the value of the specified edit cell. + * @param columnIndex An integer value that identifies the data column by its index within the ASPxTreeList's column collection. + */ + GetEditValue(columnIndex: number): Object; + /** + * Returns the value of the specified edit cell. + * @param columnNameOrFieldName A String value that identifies the column by its name or field name. + */ + GetEditValue(columnNameOrFieldName: string): Object; + /** + * Sets the value of the specified edit cell. + * @param column An ASPxClientTreeListColumn object that represents the data column within the client ASPxTreeList. + * @param value An object that specifies the edit cell's new value. + */ + SetEditValue(column: ASPxClientTreeListColumn, value: Object): void; + /** + * Sets the value of the specified edit cell. + * @param columnIndex An integer value that identifies the data column by its index within the ASPxTreeList's column collection. + * @param value An object that specifies the edit cell's new value. + */ + SetEditValue(columnIndex: number, value: Object): void; + /** + * Sets the value of the specified edit cell. + * @param columnNameOrFieldName A String value that identifies the column by its name or field name. + * @param value An object that specifies the edit cell's new value. + */ + SetEditValue(columnNameOrFieldName: string, value: Object): void; + /** + * Moves focus to the specified editor within the edited node. + * @param column A ASPxClientTreeListColumn object that represents the data column within the client ASPxTreeList. + */ + FocusEditor(column: ASPxClientTreeListColumn): void; + /** + * Moves focus to the specified editor within the edited node. + * @param columnIndex An integer value that identifies the data column. + */ + FocusEditor(columnIndex: number): void; + /** + * Moves focus to the specified editor within the edited node. + * @param columnNameOrFieldName A String value that specifies the column's name or field name. + */ + FocusEditor(columnNameOrFieldName: string): void; + /** + * Scrolls the tree list so that the specified node becomes visible. + * @param nodeKey An integer value that specifies the node index within the tree list's client item list. + */ + MakeNodeVisible(nodeKey: string): void; + /** + * Returns the current vertical scroll position of the tree list's content. + */ + GetVerticalScrollPosition(): number; + /** + * Returns the current horizontal scroll position of the tree list's content. + */ + GetHorizontalScrollPosition(): number; + /** + * Specifies the vertical scroll position for the tree list's content. + * @param position An integer value specifying the vertical scroll position. + */ + SetVerticalScrollPosition(position: number): void; + /** + * Specifies the horizontal scroll position for the tree list's content. + * @param position An integer value specifying the horizontal scroll position. + */ + SetHorizontalScrollPosition(position: number): void; +} +/** + * Represents a client column. + */ +interface ASPxClientTreeListColumn { + /** + * Gets the column's position within the collection. + * Value: An integer zero-bazed index that specifies the column's position within the collection. + */ + index: number; + /** + * Gets the name that uniquely identifies the column. + * Value: A string value assigned to the column's Name property. + */ + name: string; + /** + * Gets the name of the database field assigned to the current column. + * Value: A String value that specifies the name of a data field. + */ + fieldName: string; +} +/** + * Provides data for the CustomDataCallback event. + */ +interface ASPxClientTreeListCustomDataCallbackEventArgs extends ASPxClientEventArgs { + /** + * Gets the information that has been collected on the client-side and sent to the server-side CustomDataCallback event. + * Value: A string value that represents the information that has been collected on the client-side and sent to the server-side CustomDataCallback event. + */ + arg: string; + /** + * Gets the information passed from the server-side CustomDataCallback event. + * Value: An object that represents the information passed from the server-side CustomDataCallback event. + */ + result: Object; +} +/** + * A method that will handle the CustomDataCallback event. + */ +interface ASPxClientTreeListCustomDataCallbackEventHandler { + /** + * A method that will handle the CustomDataCallback event. + * @param source The event source. + * @param e An ASPxClientTreeListCustomDataCallbackEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListCustomDataCallbackEventArgs): void; +} +/** + * Provides data for the NodeDblClick events. + */ +interface ASPxClientTreeListNodeEventArgs extends ASPxClientEventArgs { + /** + * Gets the processed node's key value. + * Value: A String value that identifies the processed node. + */ + nodeKey: string; + /** + * Provides access to the parameters associated with the NodeDblClick events. + * Value: An object that contains parameters associated with the event. + */ + htmlEvent: Object; + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the NodeDblClick event. + */ +interface ASPxClientTreeListNodeEventHandler { + /** + * A method that will handle the NodeDblClick event. + * @param source The event source. + * @param e An ASPxClientTreeListNodeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListNodeEventArgs): void; +} +/** + * Provides data for the ContextMenu event. + */ +interface ASPxClientTreeListContextMenuEventArgs extends ASPxClientEventArgs { + /** + * Identifies which tree list element has been right-clicked. + * Value: A string value that identifies which tree list element ('Header' or 'Node') has been right-clicked. + */ + objectType: string; + /** + * Gets a value that identifies the right-clicked object. + * Value: The right-clicked object's identifier. + */ + objectKey: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that relates to the processed event. + */ + htmlEvent: Object; + /** + * Gets or sets whether to invoke the browser's context menu. + * Value: true to hide the browser's context menu; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the ContextMenu event. + */ +interface ASPxClientTreeListContextMenuEventHandler { + /** + * A method that will handle the ContextMenu event. + * @param source The event sender. + * @param e An ASPxClientTreeListContextMenuEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListContextMenuEventArgs): void; +} +/** + * Provides data for the StartDragNode event. + */ +interface ASPxClientTreeListStartDragNodeEventArgs extends ASPxClientTreeListNodeEventArgs { + /** + * Gets an array of targets where a node can be dragged. + * Value: An array of objects that represent targets for the dragged node. + */ + targets: Object[]; +} +/** + * A method that will handle the StartDragNode event. + */ +interface ASPxClientTreeListStartDragNodeEventHandler { + /** + * A method that will handle the StartDragNode event. + * @param source The event source. + * @param e An ASPxClientTreeListStartDragNodeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListStartDragNodeEventArgs): void; +} +/** + * Provides data for the EndDragNode event. + */ +interface ASPxClientTreeListEndDragNodeEventArgs extends ASPxClientTreeListNodeEventArgs { + /** + * Gets the target element. + * Value: An object that represents the target element to which the dragged node has been dropped. + */ + targetElement: Object; +} +/** + * A method that will handle the EndDragNode event. + */ +interface ASPxClientTreeListEndDragNodeEventHandler { + /** + * A method that will handle the EndDragNode event. + * @param source The event source. + * @param e An ASPxClientTreeListEndDragNodeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListEndDragNodeEventArgs): void; +} +/** + * Provides data for the CustomButtonClick event. + */ +interface ASPxClientTreeListCustomButtonEventArgs extends ASPxClientEventArgs { + /** + * Gets the key value of the node whose custom button has been clicked. + * Value: A string value that uniquely identifies the node whose custom button has been clicked. + */ + nodeKey: string; + /** + * Gets the button's index. + * Value: An integer value that specifies the button's position within the CustomButtons collection. + */ + buttonIndex: number; + /** + * Gets the value which identifies the custom button. + * Value: A String value that identifies the clicked custom button. + */ + buttonID: string; +} +/** + * A method that will handle the CustomButtonClick event. + */ +interface ASPxClientTreeListCustomButtonEventHandler { + /** + * A method that will handle the CustomButtonClick event. + * @param source The event source. + * @param e An ASPxClientTreeListCustomButtonEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListCustomButtonEventArgs): void; +} +/** + * Represents a JavaScript function which receives the list of row values when a specific client method (such as the GetSelectedNodeValues) is called. + */ +interface ASPxClientTreeListValuesCallback { + /** + * A JavaScript function which receives the list of row values when a specific client method (such as the GetSelectedNodeValues) is called. + * @param result An object that represents the list of row values received from the server. + */ + (result: Object): void; +} +/** + * Provides data for the ColumnResizing event. + */ +interface ASPxClientTreeListColumnResizingEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the processed client column. + * Value: An object that is the processed column. + */ + column: ASPxClientTreeListColumn; +} +/** + * A method that will handle the client ColumnResizing event. + */ +interface ASPxClientTreeListColumnResizingEventHandler { + /** + * A method that will handle the ColumnResizing event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientTreeListColumnResizingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListColumnResizingEventArgs): void; +} +/** + * Provides data for the ColumnResized event. + */ +interface ASPxClientTreeListColumnResizedEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the processed client column. + * Value: An object that is the processed column. + */ + column: ASPxClientTreeListColumn; +} +/** + * A method that will handle the client ColumnResized event. + */ +interface ASPxClientTreeListColumnResizedEventHandler { + /** + * A method that will handle the ColumnResized event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientTreeListColumnResizedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListColumnResizedEventArgs): void; +} +/** + * Provides data for the ToolbarItemClick event. + */ +interface ASPxClientTreeListToolbarItemClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the toolbar index related to the event. + * Value: An integer value that is the toolbar index. + */ + toolbarIndex: number; + /** + * Gets the toolbar name. + * Value: A string object that is the toolbar name. + */ + toolbarName: string; + /** + * Gets the toolbar item related to the event. + * Value: An ASPxClientMenuItem object that is the toolbar item. + */ + item: ASPxClientMenuItem; + /** + * Specifies whether a postback or a callback is used to finally process the event on the server side. + * Value: true to perform the round trip to the server side via postback; false to perform the round trip to the server side via callback. + */ + usePostBack: boolean; +} +/** + * A method that will handle the ToolbarItemClick event. + */ +interface ASPxClientTreeListToolbarItemClickEventHandler { + /** + * A method that will handle the ToolbarItemClick event. + * @param source The event source. + * @param e An ASPxClientTreeListToolbarItemClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeListToolbarItemClickEventArgs): void; +} +/** + * Represents a client-side equivalent of the BootstrapAccordion control. + */ +interface BootstrapClientAccordion extends ASPxClientNavBar { +} +interface BootstrapClientBinaryImage extends ASPxClientHyperLink { +} +/** + * Represents a client-side equivalent of the BootstrapButton control. + */ +interface BootstrapClientButton extends ASPxClientButton { + /** + * Returns the text displayed within the button. + */ + GetText(): string; + /** + * Sets the text to be displayed within the button. + * @param value A string value specifying the text to be displayed within the button. + */ + SetText(value: string): void; +} +/** + * Represents a client-side equivalent of the BootstrapCalendar control. + */ +interface BootstrapClientCalendar extends ASPxClientCalendar { +} +/** + * Represents a client-side equivalent of the BootstrapCallbackPanel control. + */ +interface BootstrapClientCallbackPanel extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the BootstrapClientCallbackPanel. + */ + CallbackError: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * 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; + /** + * Returns the HTML code that specifies the contents of the control's window. + */ + GetContentHtml(): string; + /** + * Sets the HTML markup specifying the contents of the control's window. + * @param html A string value that specifies the HTML markup. + */ + SetContentHtml(html: string): void; + /** + * Sets a value specifying whether the callback panel is enabled. + * @param enabled true, to enable the callback panel; false to disable it. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns a value specifying whether a callback panel is enabled. + */ + GetEnabled(): boolean; +} +/** + * Serves as the base type for the BootstrapClientPieChart objects. + */ +interface BootstrapClientChartBase extends ASPxClientControl { + Done: ASPxClientEvent>; + LegendClick: ASPxClientEvent>; + PointClick: ASPxClientEvent>; + PointHoverChanged: ASPxClientEvent>; + PointSelectionChanged: ASPxClientEvent>; + TooltipHidden: ASPxClientEvent>; + TooltipShown: ASPxClientEvent>; + ArgumentAxisClick: ASPxClientEvent>; + SeriesClick: ASPxClientEvent>; + SeriesHoverChanged: ASPxClientEvent>; + SeriesSelectionChanged: ASPxClientEvent>; +} +/** + * Represents a client-side equivalent of the BootstrapChart control. + */ +interface BootstrapClientChart extends BootstrapClientChartBase { + ZoomStart: ASPxClientEvent>; + ZoomEnd: ASPxClientEvent>; +} +/** + * Represents a client-side equivalent of the BootstrapPolarChart control. + */ +interface BootstrapClientPolarChart extends BootstrapClientChartBase { +} +/** + * Represents a client-side equivalent of the BootstrapPieChart control. + */ +interface BootstrapClientPieChart extends BootstrapClientChartBase { +} +interface BootstrapClientChartBaseDoneEventHandler { + (source: S, e: BootstrapUIWidgetEventArgsBase): void; +} +interface BootstrapClientChartBaseLegendClickEventHandler { + (source: S, e: BootstrapUIWidgetElementClickEventArgs): void; +} +interface BootstrapClientCoordinateSystemChartArgumentAxisClickEventHandler { + (source: S, e: BootstrapUIWidgetElementClickEventArgs): void; +} +interface BootstrapClientChartBasePointClickEventHandler { + (source: S, e: BootstrapUIWidgetElementClickEventArgs): void; +} +interface BootstrapClientChartBasePointHoverChangedEventHandler { + (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; +} +interface BootstrapClientChartBasePointSelectionChangedEventHandler { + (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; +} +interface BootstrapClientChartBaseTooltipHiddenEventHandler { + (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; +} +interface BootstrapClientChartBaseTooltipShownEventHandler { + (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; +} +interface BootstrapClientCoordinateSystemChartSeriesClickEventHandler { + (source: S, e: BootstrapUIWidgetElementClickEventArgs): void; +} +interface BootstrapClientCoordinateSystemChartSeriesHoverChangedEventHandler { + (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; +} +interface BootstrapClientCoordinateSystemChartSeriesSelectionChangedEventHandler { + (source: S, e: BootstrapUIWidgetElementActionEventArgs): void; +} +interface BootstrapClientChartZoomStartEventHandler { + (source: S, e: BootstrapUIWidgetEventArgsBase): void; +} +interface BootstrapClientChartZoomEndEventHandler { + (source: S, e: BootstrapClientChartZoomEndEventArgs): void; +} +interface BootstrapUIWidgetEventArgsBase extends ASPxClientEventArgs { + component: Object; + element: Object; +} +interface BootstrapClientChartZoomEndEventArgs extends BootstrapUIWidgetEventArgsBase { + rangeStart: Object; + rangeEnd: Object; +} +/** + * Represents a client-side equivalent of the BootstrapCheckBox control. + */ +interface BootstrapClientCheckBox extends ASPxClientEdit { + /** + * Occurs on the client side when the editor's checked state is changed. + */ + CheckedChanged: ASPxClientEvent>; + /** + * Returns a value indicating whether the check box editor is checked. + */ + GetChecked(): boolean; + /** + * Sets a value which specifies the checked status of the check box editor. + * @param isChecked + */ + SetChecked(isChecked: boolean): void; + /** + * Returns the text displayed within the editor. + */ + GetText(): string; + /** + * Returns a value which specifies a check box checked state. + */ + GetCheckState(): string; + /** + * Sets a value specifying the state of a check box. + * @param checkState + */ + SetCheckState(checkState: string): void; + /** + * Sets the text to be displayed within the editor. + * @param text + */ + SetText(text: string): void; +} +/** + * Represents a client-side equivalent of the BootstrapRadioButton control. + */ +interface BootstrapClientRadioButton extends BootstrapClientCheckBox { +} +/** + * Represents a client-side equivalent of the BootstrapComboBox control. + */ +interface BootstrapClientComboBox extends ASPxClientComboBox { + /** + * Returns the combo box editor's selected item. + */ + GetSelectedItem(): BootstrapClientListBoxItem; + /** + * Sets the combo box editor's selected item. + * @param item + */ + SetSelectedItem(item: BootstrapClientListBoxItem): void; + /** + * Returns an item specified by its index within the combo box editor's item collection. + * @param index + */ + GetItem(index: number): BootstrapClientListBoxItem; + /** + * Returns a combo box item by its text. + * @param text + */ + FindItemByText(text: string): BootstrapClientListBoxItem; + /** + * Returns a combo box item by its value. + * @param value + */ + FindItemByValue(value: Object): BootstrapClientListBoxItem; + /** + * Adds a new item to the editor, specifying the item's display text, and returns the index of the added item. + * @param texts An array of strings that specifies the item's display text. Array element positions relate to the positions of the corresponding fields within the editor's Fields collection. + */ + AddItem(texts: string[]): number; + /** + * Adds a new item to the end of the control's items collection. + * @param texts + * @param value + */ + AddItem(texts: string[], value: Object): number; + /** + * Adds a new item to the end of the control's items collection. + * @param texts + * @param value + * @param iconCssClass + */ + AddItem(texts: string[], value: Object, iconCssClass: string): number; + /** + * Adds a new item to the editor specifying the item's display text and returns the index of the added item. + * @param text + */ + AddItem(text: string): number; + /** + * Adds a new item to the editor specifying the item's display text and associated value, and returns the index of the added item. + * @param text + * @param value + */ + AddItem(text: string, value: Object): number; + /** + * Adds a new item to the editor specifying the item's display text, associated value and displayed image, and returns the index of the added item. + * @param text + * @param value + * @param iconCssClass + */ + AddItem(text: string, value: Object, iconCssClass: string): number; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index + * @param texts + * @param value + * @param iconCssClass + */ + InsertItem(index: number, texts: string[], value: Object, iconCssClass: string): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index + * @param texts + * @param value + */ + InsertItem(index: number, texts: string[], value: Object): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index + * @param texts + */ + InsertItem(index: number, texts: string[]): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index + * @param text + * @param value + * @param iconCssClass + */ + InsertItem(index: number, text: string, value: Object, iconCssClass: string): void; + /** + * Inserts a new item specified by its display text and associated value into the editor's item collection, at the position specified. + * @param index + * @param text + * @param value + */ + InsertItem(index: number, text: string, value: Object): void; + /** + * Inserts a new item specified by its display text into the editor's item collection, at the position specified. + * @param index + * @param text + */ + InsertItem(index: number, text: string): void; + /** + * Sets the list editor's selected item. + * @param item An ASPxClientListEditItem object that specifies the item to select. + */ + SetSelectedItem(item: ASPxClientListEditItem): void; +} +/** + * Represents a client-side equivalent of the BootstrapDateEdit control. + */ +interface BootstrapClientDateEdit extends ASPxClientDateEdit { +} +/** + * Represents a client-side equivalent of the BootstrapDropDownEdit control. + */ +interface BootstrapClientDropDownEdit extends ASPxClientDropDownEdit { +} +/** + * Represents a client-side equivalent of the BootstrapFormLayout control. + */ +interface BootstrapClientFormLayout extends ASPxClientFormLayout { +} +/** + * Represents a client-side equivalent of the BootstrapHyperLink control. + */ +interface BootstrapClientHyperLink extends ASPxClientHyperLink { +} +interface BootstrapClientImage extends ASPxClientImage { +} +/** + * Represents the client-side equivalent of the BootstrapListEditItem object. + */ +interface BootstrapClientListBoxItem extends ASPxClientListEditItem { + /** + * This member is not in effect for this class. It is overridden only for the purpose of preventing it from appearing in Microsoft Visual Studio designer tools. + */ + imageUrl: string; + iconCssClass: string; + /** + * + * @param columnIndex + */ + GetColumnText(columnIndex: number): string; + /** + * + * @param columnName + */ + GetColumnText(columnName: string): string; + /** + * + * @param fieldIndex + */ + GetFieldText(fieldIndex: number): string; + /** + * + * @param fieldName + */ + GetFieldText(fieldName: string): string; +} +/** + * Represents a client-side equivalent of the BootstrapListBox control. + */ +interface BootstrapClientListBox extends ASPxClientListBox { + /** + * Returns the list box editor's selected item. + */ + GetSelectedItem(): BootstrapClientListBoxItem; + /** + * Sets the list box editor's selected item. + * @param item + */ + SetSelectedItem(item: BootstrapClientListBoxItem): void; + /** + * Returns an item specified by its index within the list box editor's item collection. + * @param index + */ + GetItem(index: number): BootstrapClientListBoxItem; + /** + * Returns an array of the list editor's selected items. + */ + GetSelectedItems(): BootstrapClientListBoxItem[]; + /** + * Selects the specified items within a list box. + * @param items + */ + SelectItems(items: BootstrapClientListBoxItem[]): void; + /** + * Unselects an array of the specified list box items. + * @param items + */ + UnselectItems(items: BootstrapClientListBoxItem[]): void; + /** + * Returns a list box item by its text. + * @param text + */ + FindItemByText(text: string): BootstrapClientListBoxItem; + /** + * Returns a list box item by its value. + * @param value + */ + FindItemByValue(value: Object): BootstrapClientListBoxItem; + /** + * Adds a new item to the end of the editor's items collection, specifying the item's display text, and returns the index of the added item. + * @param texts + */ + AddItem(texts: string[]): number; + /** + * Adds a new item to the end of the control's items collection. + * @param texts + * @param value + */ + AddItem(texts: string[], value: Object): number; + /** + * Adds a new item to the end of the control's items collection. + * @param texts + * @param value + * @param iconCssClass + */ + AddItem(texts: string[], value: Object, iconCssClass: string): number; + /** + * Adds a new item to the editor, specifying the item's display text, and returns the index of the added item. + * @param text + */ + AddItem(text: string): number; + /** + * Adds a new item to the editor, specifying the item's display text and associated value, and returns the index of the added item. + * @param text + * @param value + */ + AddItem(text: string, value: Object): number; + /** + * Adds a new item to the editor, specifying the item's display text, associated value and displayed image, and returns the index of the added item. + * @param text + * @param value + * @param iconCssClass + */ + AddItem(text: string, value: Object, iconCssClass: string): number; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index + * @param texts + * @param value + * @param iconCssClass + */ + InsertItem(index: number, texts: string[], value: Object, iconCssClass: string): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index + * @param texts + * @param value + */ + InsertItem(index: number, texts: string[], value: Object): void; + /** + * Adds a new item to the control's items collection at the specified index. + * @param index + * @param texts + */ + InsertItem(index: number, texts: string[]): void; + /** + * Inserts a new item specified by its display text, associated value and displayed image into the editor's item collection, at the position specified. + * @param index + * @param text + * @param value + * @param iconCssClass + */ + InsertItem(index: number, text: string, value: Object, iconCssClass: string): void; + /** + * Inserts a new item specified by its display text and associated value into the editor's item collection, at the position specified. + * @param index + * @param text + * @param value + */ + InsertItem(index: number, text: string, value: Object): void; + /** + * Inserts a new item specified by its display text into the editor's item collection, at the position specified. + * @param index + * @param text + */ + InsertItem(index: number, text: string): void; + /** + * Selects the specified items within a list box. + * @param items An array of ASPxClientListEditItem objects that represent the items. + */ + SelectItems(items: ASPxClientListEditItem[]): void; + /** + * Unselects an array of the specified list box items. + * @param items An array of ASPxClientListEditItem objects that represent the items. + */ + UnselectItems(items: ASPxClientListEditItem[]): void; + /** + * Sets the list editor's selected item. + * @param item An ASPxClientListEditItem object that specifies the item to select. + */ + SetSelectedItem(item: ASPxClientListEditItem): void; +} +/** + * Represents a client-side equivalent of the BootstrapCheckBoxList control. + */ +interface BootstrapClientCheckBoxList extends ASPxClientCheckBoxList { +} +/** + * Represents a client-side equivalent of the BootstrapRadioButtonList control. + */ +interface BootstrapClientRadioButtonList extends ASPxClientRadioButtonList { +} +/** + * Represents a client-side equivalent of the BootstrapMenu control. + */ +interface BootstrapClientMenu extends ASPxClientMenu { +} +/** + * Represents a client-side equivalent of the BootstrapPager control. + */ +interface BootstrapClientPager extends ASPxClientPager { +} +/** + * Represents a client-side equivalent of the BootstrapPopupControl control. + */ +interface BootstrapClientPopupControl extends ASPxClientPopupControl { + /** + * + * @param selector + */ + SetPopupElementCssSelector(selector: string): void; +} +/** + * Represents a client-side equivalent of the BootstrapPopupMenu control. + */ +interface BootstrapClientPopupMenu extends ASPxClientPopupMenu { + /** + * + * @param selector + */ + SetPopupElementCssSelector(selector: string): void; +} +/** + * Represents a client-side equivalent of the BootstrapProgressBar control. + */ +interface BootstrapClientProgressBar extends ASPxClientProgressBar { +} +/** + * Represents a client-side equivalent of the BootstrapSpinEdit control. + */ +interface BootstrapClientSpinEdit extends ASPxClientSpinEdit { +} +/** + * Represents a client-side equivalent of the BootstrapTabControl control. + */ +interface BootstrapClientTabControl extends ASPxClientTabControl { +} +/** + * Represents a client-side equivalent of the BootstrapPageControl control. + */ +interface BootstrapClientPageControl extends ASPxClientPageControl { +} +/** + * Represents a client-side equivalent of the BootstrapTextBox control. + */ +interface BootstrapClientTextBox extends ASPxClientTextBox { +} +/** + * Represents a client-side equivalent of the BootstrapMemo control. + */ +interface BootstrapClientMemo extends ASPxClientMemo { +} +/** + * Represents a client-side equivalent of the BootstrapButtonEdit control. + */ +interface BootstrapClientButtonEdit extends ASPxClientButtonEdit { +} +/** + * Represents a client-side equivalent of the BootstrapTreeView control. + */ +interface BootstrapClientTreeView extends ASPxClientTreeView { +} +interface BootstrapUIWidgetBase extends ASPxClientControl { + Init: ASPxClientEvent>; + Drawn: ASPxClientEvent>; + Disposing: ASPxClientEvent>; + OptionChanged: ASPxClientEvent>; + Exporting: ASPxClientEvent>; + Exported: ASPxClientEvent>; + FileSaving: ASPxClientEvent>; + IncidentOccurred: ASPxClientEvent>; + GetInstance(): Object; + SetOptions(options: Object): void; + SetDataSource(dataSource: Object): void; + GetDataSource(): Object; + ExportTo(format: string, fileName: string): void; + Print(): void; +} +interface BootstrapUIWidgetInitializedEventHandler { + (source: S, e: BootstrapUIWidgetEventArgsBase): void; +} +interface BootstrapUIWidgetDrawnEventHandler { + (source: S, e: BootstrapUIWidgetEventArgsBase): void; +} +interface BootstrapUIWidgetDisposingEventHandler { + (source: S, e: BootstrapUIWidgetEventArgsBase): void; +} +interface BootstrapUIWidgetExportedEventHandler { + (source: S, e: BootstrapUIWidgetEventArgsBase): void; +} +interface BootstrapUIWidgetOptionChangedEventHandler { + (source: S, e: BootstrapUIWidgetOptionChangedEventArgs): void; +} +interface BootstrapUIWidgetOptionChangedEventArgs extends BootstrapUIWidgetEventArgsBase { + fullName: string; + name: string; + previousValue: Object; + value: Object; +} +interface BootstrapUIWidgetExportingEventHandler { + (source: S, e: BootstrapUIWidgetExportEventArgs): void; +} +interface BootstrapUIWidgetFileSavingEventHandler { + (source: S, e: BootstrapUIWidgetExportEventArgs): void; +} +interface BootstrapUIWidgetExportEventArgs extends BootstrapUIWidgetEventArgsBase { + cancel: boolean; + data: Object; + fileName: string; + format: string; +} +interface BootstrapUIWidgetErrorEventHandler { + (source: S, e: BootstrapUIWidgetErrorEventArgs): void; +} +interface BootstrapUIWidgetErrorEventArgs extends BootstrapUIWidgetEventArgsBase { + target: Object; +} +interface BootstrapUIWidgetElementActionEventArgs extends BootstrapUIWidgetEventArgsBase { + target: Object; +} +interface BootstrapUIWidgetElementClickEventArgs extends BootstrapUIWidgetElementActionEventArgs { + jQueryEvent: Object; +} +/** + * Represents a client-side equivalent of the BootstrapUploadControl. + */ +interface BootstrapClientUploadControl extends ASPxClientUploadControl { +} +interface BootstrapClientGridView extends ASPxClientGridView { +} +/** + * A client-side counterpart of the Calendar and CalendarFor extensions. + */ +interface MVCxClientCalendar extends ASPxClientCalendar { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; +} +/** + * A client-side counterpart of the CallbackPanel extension. + */ +interface MVCxClientCallbackPanel extends ASPxClientCallbackPanel { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * 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; +} +/** + * A client-side counterpart of the CardView extension. + */ +interface MVCxClientCardView extends ASPxClientCardView { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * Sends a callback with a parameter to process the passed information on the server, in an Action specified via the CardView's CustomDataActionRouteValues property, and then process the returned result in the specified client function. This method does not update the CardView. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomDataActionRouteValues property. + * @param onCallback A ASPxClientCardViewValuesCallback object that represents the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(data: Object, onCallback: ASPxClientCardViewValuesCallback): void; + /** + * 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. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing the specified argument to it. + * @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; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event. + * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback An ASPxClientCardViewValuesCallback object that is the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(args: string, onCallback: ASPxClientCardViewValuesCallback): void; +} +/** + * A client-side counterpart of the Chart extension. + */ +interface MVCxClientChart extends ASPxClientWebChartControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * 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. + */ + PerformCallback(args: string): void; + /** + * 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; +} +/** + * A client-side counterpart of the ComboBox and ComboBoxFor extensions. + */ +interface MVCxClientComboBox extends ASPxClientComboBox { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * 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. + */ + PerformCallback(parameter: string): void; +} +/** + * A client-side counterpart of the DataView extension. + */ +interface MVCxClientDataView extends ASPxClientDataView { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * 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; +} +/** + * A client-side counterpart of the DateEdit extension. + */ +interface MVCxClientDateEdit extends ASPxClientDateEdit { +} +/** + * A client-side counterpart of the DockManager extension. + */ +interface MVCxClientDockManager extends ASPxClientDockManager { + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * 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; +} +/** + * A client-side counterpart of the DockPanel extension. + */ +interface MVCxClientDockPanel extends ASPxClientDockPanel { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * Sends a callback to the server and generates the server-side WindowCallback event, passing the specified argument to it. + * @param parameter A string value that is any information that needs to be sent to the server-side WindowCallback event. + */ + PerformCallback(parameter: string): void; +} +/** + * A client-side counterpart of the FileManager extension. + */ +interface MVCxClientFileManager extends ASPxClientFileManager { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to update the FileManager by processing the passed information on the server, in an Action specified via the extension's CustomActionRouteValues property. + * @param data An object containing any information that needs to be passed to a handling Action specified via the file manager's CustomActionRouteValues property. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * 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. + */ + PerformCallback(args: string): void; + /** + * 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; +} +/** + * A client-side counterpart of the GridView extension. + */ +interface MVCxClientGridView extends ASPxClientGridView { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * Sends a callback with a parameter to process the passed information on the server, in an Action specified via the GridView's CustomDataActionRouteValues property, and then process the returned result in the specified client function. This method does not update the GridView. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomDataActionRouteValues property. + * @param onCallback A ASPxClientGridViewValuesCallback object that represents the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(data: Object, onCallback: ASPxClientGridViewValuesCallback): void; + /** + * 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. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing the specified argument to it. + * @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; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event. + * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientGridViewValuesCallback object that is the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(args: string, onCallback: ASPxClientGridViewValuesCallback): void; +} +/** + * A client-side counterpart of the HtmlEditor extension. + */ +interface MVCxClientHtmlEditor extends ASPxClientHtmlEditor { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Sends a callback with a parameter to process the passed information on the server, in an Action specified via the HtmlEditor's CustomDataCallback event on the client. This method does not update the HtmlEditor. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomDataActionRouteValues property. + */ + PerformDataCallback(data: Object): void; + /** + * Sends a callback with a parameter to process the passed information on the server, in an Action specified via the HtmlEditor's CustomDataCallback event on the client. This method does not update the HtmlEditor. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomDataActionRouteValues property. + * @param onCallback An ASPxClientDataCallback object that is the JavaScript function which receives the callback data as a parameter. + */ + PerformDataCallback(data: Object, onCallback: ASPxClientDataCallback): void; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event passing it the specified argument. + * @param parameter A string value that represents any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientDataCallback object that represents the JavaScript function which receives the callback data as a parameter. + */ + PerformDataCallback(parameter: string, onCallback: ASPxClientDataCallback): void; +} +/** + * A client-side counterpart of the ImageGallery extension. + */ +interface MVCxClientImageGallery extends ASPxClientImageGallery { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * 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; +} +/** + * A client-side counterpart of the ListBox and ListBoxFor extensions. + */ +interface MVCxClientListBox extends ASPxClientListBox { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * 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. + */ + PerformCallback(parameter: string): void; +} +/** + * A client-side counterpart of the NavBar extension. + */ +interface MVCxClientNavBar extends ASPxClientNavBar { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; +} +/** + * A client-side counterpart of the PivotGrid extension. + */ +interface MVCxClientPivotGrid extends ASPxClientPivotGrid { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * Passes PivotGrid callback parameters to the specified object. + * @param obj An object that receives PivotGrid callback parameters. + */ + FillStateObject(obj: Object): void; + /** + * 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. + */ + PerformCallback(args: string): void; + /** + * 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; +} +/** + * A client-side counterpart of the PopupControl extension. + */ +interface MVCxClientPopupControl extends ASPxClientPopupControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * Sends a callback with a parameters to update the popup window by processing the related popup window and the passed information on the server, in an Action specified by the PopupControl's CallbackRouteValues property. + * @param window A ASPxClientPopupWindow object identifying the processed popup window. + * @param data An object containing any information that needs to be passed to a handling Action specified by the CallbackRouteValues property. + */ + PerformWindowCallback(window: ASPxClientPopupWindow, data: Object): void; + /** + * + * @param window + * @param parameter + */ + PerformWindowCallback(window: ASPxClientPopupWindow, parameter: string): void; + /** + * 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; + /** + * Sends a callback to the server and generates the server-side WindowCallback event, passing the specified argument to it. + * @param parameter A string value that is any information that needs to be sent to the server-side WindowCallback event. + */ + PerformCallback(parameter: string): void; +} +/** + * A client-side equivalent of the MVCxDocumentViewer class. + */ +interface MVCxClientDocumentViewer extends ASPxClientDocumentViewer { + /** + * Occurs before performing a document export request. + */ + BeforeExportRequest: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; +} +/** + * Obsolete. Use the MVCxClientDocumentViewer class instead. + */ +interface MVCxClientReportViewer extends ASPxClientReportViewer { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs before performing a document export request. + */ + BeforeExportRequest: ASPxClientEvent>; +} +/** + * A method that will handle the BeforeExportRequest event. + */ +interface MVCxClientBeforeExportRequestEventHandler { + /** + * A method that will handle the BeforeExportRequest event. + * @param source An object which is the event source. Identifies the client object that raised the event. + * @param e A MVCxClientBeforeExportRequestEventArgs object that contains event data. + */ + (source: S, e: MVCxClientBeforeExportRequestEventArgs): void; +} +/** + * Provides data for client BeforeExportRequest events. + */ +interface MVCxClientBeforeExportRequestEventArgs extends ASPxClientEventArgs { + /** + * Gets an object containing specific information (if any, as name/value pairs) that should be passed as a request parameter from the client to the server side for further processing. + * Value: A hash table object containing named values to be passed from the client to the server side via request parameters. + */ + customArgs: Object; +} +/** + * A client-side equivalent of the MVCxReportDesigner class. + */ +interface MVCxClientReportDesigner extends ASPxClientReportDesigner { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs after executing the Save command on the client. + */ + SaveCommandExecuted: ASPxClientEvent>; + /** + * Sends a callback to the server with the specified argument. + * @param arg A Object value, specifying the callback argument. + */ + PerformCallback(arg: Object): void; + /** + * 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; + /** + * Sends a callback to the server with the specified argument. + * @param arg A String value, specifying the callback argument. + */ + PerformCallback(arg: string): void; + /** + * 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; +} +/** + * A method that will handle the SaveCommandExecuted event. + */ +interface MVCxClientReportDesignerSaveCommandExecutedEventHandler { + /** + * A method that will handle the SaveCommandExecuted event. + * @param source An object which is the event source. Identifies the client object that raised the event. + * @param e A MVCxClientBeforeExportRequestEventArgs object that contains event data. + */ + (source: S, e: MVCxClientReportDesignerSaveCommandExecutedEventArgs): void; +} +/** + * Provides data for the SaveCommandExecuted event. + */ +interface MVCxClientReportDesignerSaveCommandExecutedEventArgs extends ASPxClientEventArgs { + /** + * Returns the operation result. + * Value: A String value, specifying the operation result. + */ + Result: string; +} +/** + * A client-side counterpart of the RichEdit extension. + */ +interface MVCxClientRichEdit extends ASPxClientRichEdit { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * 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; +} +/** + * A client-side counterpart of the RoundPanel extension. + */ +interface MVCxClientRoundPanel extends ASPxClientRoundPanel { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * 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; +} +/** + * A client-side counterpart of the Scheduler extension. + */ +interface MVCxClientScheduler extends ASPxClientScheduler { + /** + * Occurs on the client side when the tooltip is about to be displayed. + */ + ToolTipDisplaying: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * 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. + */ + PerformCallback(parameter: string): void; +} +/** + * A template that is rendered to display a tooltip. + */ +interface MVCxClientSchedulerTemplateToolTip extends ASPxClientToolTipBase { + /** + * Gets the tooltip type. + * Value: A MVCxSchedulerToolTipType object that specifies the tooltip type. + */ + type: MVCxSchedulerToolTipType; +} +/** + * A delegate method that enables you to adjust the tooltip content before displaying. + */ +interface MVCxClientSchedulerToolTipDisplayingEventHandler { + /** + * A method that will handle the ToolTipDisplaying event. + * @param source An object which is the event source. Identifies the client object that raised the event. + * @param e A MVCxClientSchedulerToolTipDisplayingEventArgs object that contains the related arguments. + */ + (source: S, e: MVCxClientSchedulerToolTipDisplayingEventArgs): void; +} +/** + * Provides data for the ToolTipDisplaying event. + */ +interface MVCxClientSchedulerToolTipDisplayingEventArgs extends ASPxClientEventArgs { + /** + * Gets the tooltip related to the event. + * Value: A MVCxClientSchedulerTemplateToolTip object that specifies the tooltip. + */ + toolTip: MVCxClientSchedulerTemplateToolTip; + /** + * Gets information about the tooltip related to the event. + * Value: A ASPxClientSchedulerToolTipData object that specifies information about the tooltip. + */ + data: ASPxClientSchedulerToolTipData; +} +/** + * Lists available tooltip types. + */ +interface MVCxSchedulerToolTipType { +} +/** + * A client-side counterpart of the Spreadsheet extension. + */ +interface MVCxClientSpreadsheet extends ASPxClientSpreadsheet { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * 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; +} +/** + * A client-side counterpart of the PageControl extension. + */ +interface MVCxClientPageControl extends ASPxClientPageControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * 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; +} +/** + * A client-side counterpart of the TokenBox and TokenBoxFor extensions. + */ +interface MVCxClientTokenBox extends ASPxClientTokenBox { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * 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. + */ + PerformCallback(parameter: string): void; +} +/** + * A client-side counterpart of the TreeList extension. + */ +interface MVCxClientTreeList extends ASPxClientTreeList { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * Sends a callback with a parameter to process the passed information on the server, in an Action specified via the TreeList's CustomDataCallback event. This method does not update the TreeList. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomDataActionRouteValues property. + */ + PerformCustomDataCallback(data: Object): void; + /** + * 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. + */ + PerformCallback(args: string): void; + /** + * 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; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event passing it the specified argument. + * @param arg A string value that represents any information that needs to be sent to the server-side CustomDataCallback event. + */ + PerformCustomDataCallback(arg: string): void; +} +/** + * A client-side counterpart of the TreeView extension. + */ +interface MVCxClientTreeView extends ASPxClientTreeView { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; +} +/** + * A client-side counterpart of the UploadControl extension. + */ +interface MVCxClientUploadControl extends ASPxClientUploadControl { +} +/** + * A method that will handle client BeginCallback events. + */ +interface MVCxClientBeginCallbackEventHandler { + /** + * A method that will handle client BeginCallback events. + * @param source An object which is the event source. Identifies the client object that raised the event. + * @param e A MVCxClientBeginCallbackEventArgs object that contains event data. + */ + (source: S, e: MVCxClientBeginCallbackEventArgs): void; +} +/** + * Provides data for client BeginCallback events. + */ +interface MVCxClientBeginCallbackEventArgs extends ASPxClientBeginCallbackEventArgs { + /** + * Gets an object containing specific information (if any, as name/value pairs) that should be passed as a request parameter from the client to the server side for further processing. + * Value: A hash table object containing named values to be passed from the client to the server side via request parameters. + */ + customArgs: Object; +} +/** + * A method that will handle the BeginCallback event. + */ +interface MVCxClientGlobalBeginCallbackEventHandler { + /** + * A method that will handle the BeginCallback event. + * @param source An object which is the event source. Identifies the client object that raised the event. + * @param e A MVCxClientGlobalBeginCallbackEventArgs object that contains event data. + */ + (source: S, e: MVCxClientGlobalBeginCallbackEventArgs): void; +} +/** + * Provides data for the BeginCallback event. + */ +interface MVCxClientGlobalBeginCallbackEventArgs extends ASPxClientGlobalBeginCallbackEventArgs { + /** + * Gets an object containing specific information (if any, as name/value pairs) that should be passed as a request parameter from the client to the server side for further processing. + * Value: A hash table object containing named values to be passed from the client to the server side via request parameters. + */ + customArgs: Object; +} +/** + * An ASP.NET MVC equivalent of the client ASPxClientGlobalEvents component. + */ +interface MVCxClientGlobalEvents { + /** + * Occurs on the client side after client object models of all DevExpress MVC extensions contained within the page have been initialized. + */ + ControlsInitialized: ASPxClientEvent>; + /** + * Occurs on the client when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by a DevExpress MVC extension. + */ + CallbackError: ASPxClientEvent>; +} +/** + * A client-side counterpart of the VerticalGrid extension. + */ +interface MVCxClientVerticalGrid extends ASPxClientVerticalGrid { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(data: Object): void; + /** + * 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; + /** + * Sends a callback with a parameter to process the passed information on the server, in an Action specified via the VerticalGrid's CustomDataActionRouteValues property, and then process the returned result in the specified client function. This method does not update the VerticalGrid. + * @param data An object containing any information that needs to be passed to a handling Action specified via the CustomDataActionRouteValues property. + * @param onCallback A ASPxClientGridViewValuesCallback object that represents the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(data: Object, onCallback: ASPxClientGridViewValuesCallback): void; + /** + * 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. + */ + PerformCallback(args: string): void; + /** + * Sends a callback to the server and generates the server-side event, passing the specified argument to it. + * @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; + /** + * Sends a callback to the server and generates the server-side CustomDataCallback event. + * @param args A string value that is any information that needs to be sent to the server-side CustomDataCallback event. + * @param onCallback A ASPxClientVerticalGridValuesCallback object that is the JavaScript function which receives the information on the client side. + */ + GetValuesOnCustomCallback(args: string, onCallback: ASPxClientVerticalGridValuesCallback): void; +} +/** + * A client-side equivalent of the MVCxWebDocumentViewer class. + */ +interface MVCxClientWebDocumentViewer extends ASPxClientWebDocumentViewer { +} +/** + * Serves as the base type for all the objects included in the client-side object model. + */ +interface ASPxClientControlBase { + /** + * Gets the unique, hierarchically-qualified identifier for the control. + * Value: The fully-qualified identifier for the control. + */ + name: string; + /** + * Occurs on the client side after the control has been initialized. + */ + Init: ASPxClientEvent>; + /** + * Returns an HTML element that is the root of the control's hierarchy. + */ + GetMainElement(): Object; + /** + * Specifies the text that Assistive Technologies (screen readers or braille display, for example) will provide to a user. + * @param message A String value that specifies a text. + */ + SendMessageToAssistiveTechnology(message: string): void; + /** + * Returns a value specifying whether a control is displayed. + */ + GetClientVisible(): boolean; + /** + * Specifies whether a control is displayed. + * @param visible + */ + SetClientVisible(visible: boolean): void; + /** + * Returns a value specifying whether a control is displayed. + */ + GetVisible(): boolean; + /** + * Specifies whether a control is displayed. + * @param visible true to make a control visible; false to make it hidden. + */ + SetVisible(visible: boolean): void; + /** + * Returns a value that determines whether a callback request sent by a web control is being currently processed on the server side. + */ + InCallback(): boolean; +} +/** + * Serves as the base type for all the objects included in the client-side object model. + */ +interface ASPxClientControl extends ASPxClientControlBase { + /** + * Returns the control's width. + */ + GetWidth(): number; + /** + * Returns the control's height. + */ + GetHeight(): number; + /** + * Specifies the control's width. + * @param width An integer value that specifies the control's width. + */ + SetWidth(width: number): void; + /** + * Specifies the control's height. Note that this method is not in effect for some controls. + * @param height An integer value that specifies the control's height. + */ + SetHeight(height: number): void; + /** + * Modifies the control's size against the control's container. + */ + AdjustControl(): void; +} +/** + * Represents a client-side equivalent of the ASPxCallback control. + */ +interface ASPxClientCallback extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientCallback. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires on the client side when a callback initiated by the client Callback event's handler returns back to the client. + */ + CallbackComplete: ASPxClientEvent>; + /** + * 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. + */ + SendCallback(parameter: string): void; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * 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; +} +/** + * A method that will handle the client events related to completion of callback server-side processing. + */ +interface ASPxClientCallbackCompleteEventHandler { + /** + * A method that will handle the client events related to completion of callback server-side processing. + * @param source An object representing the event source. Identifies the web control that raised the event. + * @param e An ASPxClientCallbackCompleteEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCallbackCompleteEventArgs): void; +} +/** + * Serves as the base class for arguments of the web controls' client-side events. + */ +interface ASPxClientEventArgs { +} +/** + * Provides data for events concerning the final processing of a callback. + */ +interface ASPxClientCallbackCompleteEventArgs extends ASPxClientEventArgs { + /** + * Gets a string that contains specific information (if any) passed from the client side for server-side processing. + * Value: A string value representing specific information passed from the client to the server side. + */ + parameter: string; + /** + * Gets a string that contains specific information (if any) that has been passed from the server to the client side for further processing. + * Value: A string value representing specific information passed from the server back to the client side. + */ + result: string; +} +/** + * Serves as the base class for controls that implement panel functionality. + */ +interface ASPxClientPanelBase extends ASPxClientControl { + /** + * Returns the HTML code that is the content of the panel. + */ + GetContentHtml(): string; + /** + * Sets the HTML content for the panel. + * @param html A string value that is the HTML code defining the content of the panel. + */ + SetContentHtml(html: string): void; + /** + * Sets a value specifying whether the panel is enabled. + * @param enabled true to enable the panel; false to disable it. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns a value specifying whether a panel is enabled. + */ + GetEnabled(): boolean; +} +/** + * Represents a client-side equivalent of the ASPxPanel control. + */ +interface ASPxClientPanel extends ASPxClientPanelBase { + /** + * Occurs when the expanded panel is closed. + */ + Collapsed: ASPxClientEvent>; + /** + * Occurs when an end-user opens the expand panel. + */ + Expanded: ASPxClientEvent>; + /** + * Expands or collapses the client panel. + */ + Toggle(): void; + /** + * Returns a value specifying whether the panel can be expanded. + */ + IsExpandable(): boolean; + /** + * Returns a value specifying whether the panel is expanded. + */ + IsExpanded(): boolean; + /** + * Expands the collapsed panel. + */ + Expand(): void; + /** + * Collapses the expanded panel. + */ + Collapse(): void; +} +/** + * Represents a client-side equivalent of the ASPxCallbackPanel control. + */ +interface ASPxClientCallbackPanel extends ASPxClientPanel { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientCallbackPanel. + */ + CallbackError: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * 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; + /** + * Returns the text displayed within the control's loading panel. + */ + GetLoadingPanelText(): string; + /** + * Sets the text to be displayed within the control's loading panel. + * @param loadingPanelText A string value specifying the text to be displayed within the loading panel. + */ + SetLoadingPanelText(loadingPanelText: string): void; + /** + * Sets a value specifying whether the callback panel is enabled. + * @param enabled true, to enable the callback panel; false to disable it. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns a value specifying whether a callback panel is enabled. + */ + GetEnabled(): boolean; +} +/** + * Represents the event object used for client-side events. + */ +interface ASPxClientEvent { + /** + * Dynamically connects the event with an appropriate event handler function. + * @param handler An object representing the event handling function's content. + */ + AddHandler(handler: T): void; + /** + * Dynamically disconnects the event from the associated event handler function. + * @param handler An object representing the event handling function's content. + */ + RemoveHandler(handler: T): void; + /** + * Dynamically disconnects the event from all the associated event handler functions. + */ + ClearHandlers(): void; + /** + * For internal use only. + * @param source + * @param e + */ + FireEvent(source: Object, e: ASPxClientEventArgs): void; +} +/** + * A method that will handle the client-side events of a web control's client-side equivalent. + */ +interface ASPxClientEventHandler { + /** + * A method that will handle the client-side events of a web control's client-side equivalent. + * @param source An object representing the event source. Identifies the control that raised the event. + * @param e An ASPxClientEventArgs object that contains event data. + */ + (source: S, e: ASPxClientEventArgs): void; +} +/** + * A method that will handle the cancelable events of a web control's client-side equivalent. + */ +interface ASPxClientCancelEventHandler { + /** + * A method that will handle the cancelable events of a web control's client-side equivalent. + * @param source An object representing the event source. Identifies the web control that raised the event. + * @param e An ASPxClientCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCancelEventArgs): void; +} +/** + * Provides data for cancelable client events. + */ +interface ASPxClientCancelEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the client events which can't be cancelled and allow the event's processing to be passed to the server side. + */ +interface ASPxClientProcessingModeEventHandler { + /** + * A method that will handle the client events which can't be cancelled and allow the event's processing to be passed to the server side. + * @param source An object representing the event source. Identifies the web control that raised the event. + * @param e An ASPxClientProcessingModeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientProcessingModeEventArgs): void; +} +/** + * Provides data for the client events which can't be cancelled and allow the event's processing to be passed to the server side. + */ +interface ASPxClientProcessingModeEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets a value that specifies whether the event should be finally processed on the server side. + * Value: true to process the event on the server side; false to completely handle it on the client side. + */ + processOnServer: boolean; +} +/** + * A method that will handle the cancelable client-side events which allow the event's processing to be passed to the server side. + */ +interface ASPxClientProcessingModeCancelEventHandler { + /** + * A method that will handle the cancelable client-side events which allow the event's processing to be passed to the server side. + * @param source An object representing the event source. Identifies the web control that raised the event. + * @param e An ASPxClientProcessingModeCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientProcessingModeCancelEventArgs): void; +} +/** + * Provides data for the cancelable client-side events which allow the event's processing to be passed to the server side. + */ +interface ASPxClientProcessingModeCancelEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * Provides access to an observable boolean, that allows you to detect and respond to changes. + */ +interface KnockoutObservableBoolean { +} +/** + * Provides access to observable arrays that allow you to detect and respond to changes in a collection of things. + */ +interface KnockoutObservableArray { +} +/** + * Represents a JavaScript function which receives callback data obtained via a call to a specific client method (such as the PerformDataCallback). + */ +interface ASPxClientDataCallback { + /** + * A JavaScript function which receives a callback data obtained via a call to a specific client method (such as the PerformDataCallback). + * @param sender An object whose client method generated a callback. + * @param result A string value that represents the result of server-side callback processing. + */ + (sender: Object, result: string): void; +} +/** + * Represents a client-side equivalent of the ASPxCloudControl control. + */ +interface ASPxClientCloudControl extends ASPxClientControl { + /** + * Fires after an item has been clicked. + */ + ItemClick: ASPxClientEvent>; +} +/** + * A method that will handle client events involving manipulations with the control's items. + */ +interface ASPxClientCloudControlItemEventHandler { + /** + * A method that will handle client events concerning manipulations with items. + * @param source The event source. This parameter identifies the cloud control object which raised the event. + * @param e An ASPxClientCloudControlItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCloudControlItemEventArgs): void; +} +/** + * Provides data for events which involve clicking on the control's items. + */ +interface ASPxClientCloudControlItemEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the name that uniquely identifies the processed item. + * Value: A string value that represents the value assigned to the item's Name property. + */ + name: Object; + /** + * Gets the HTML object that contains the processed item. + * Value: An object representing a container for the item related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * A method that will handle the client events related to the begining of a callback processing round trip. + */ +interface ASPxClientBeginCallbackEventHandler { + /** + * A method that will handle client BeginCallback events. + * @param source An object representing the event source. Identifies the web control that raised the event. + * @param e An ASPxClientBeginCallbackEventArgs object that contains event data. + */ + (source: S, e: ASPxClientBeginCallbackEventArgs): void; +} +/** + * Provides data for client events related to the beginning of a callback processing round trip. + */ +interface ASPxClientBeginCallbackEventArgs extends ASPxClientEventArgs { + /** + * Gets a command name that identifies which client action forced a callback to be occurred. + * Value: A string value that represents the name of the command which initiated a callback. + */ + command: string; +} +/** + * A method that will handle the BeginCallback event. + */ +interface ASPxClientGlobalBeginCallbackEventHandler { + /** + * A method that will handle the BeginCallback event. + * @param source The event source. + * @param e An ASPxDataValidationEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGlobalBeginCallbackEventArgs): void; +} +/** + * Provides data for the BeginCallback event. + */ +interface ASPxClientGlobalBeginCallbackEventArgs extends ASPxClientBeginCallbackEventArgs { + /** + * Gets an object that initiated a callback. + * Value: An class descendant object that is the control that initiated a callback. + */ + control: ASPxClientControl; +} +/** + * A method that will handle the client events related to the completion of a callback processing round trip. + */ +interface ASPxClientEndCallbackEventHandler { + /** + * A method that will handle client EndCallback events. + * @param source An object representing the event source. + * @param e A MenuItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientEndCallbackEventArgs): void; +} +/** + * Provides data for client events related to the completion of a callback processing round trip. + */ +interface ASPxClientEndCallbackEventArgs extends ASPxClientEventArgs { +} +/** + * A method that will handle the EndCallback event. + */ +interface ASPxClientGlobalEndCallbackEventHandler { + /** + * A method that will handle the EndCallback event. + * @param source The event source. + * @param e An ASPxDataValidationEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGlobalEndCallbackEventArgs): void; +} +/** + * Provides data for the EndCallback event. + */ +interface ASPxClientGlobalEndCallbackEventArgs extends ASPxClientEndCallbackEventArgs { + /** + * Gets an object that initiated a callback. + * Value: An class descendant object that is the control that initiated a callback. + */ + control: ASPxClientControl; +} +/** + * A method that will handle a CustomCallback client event exposed by some DevExpress web controls. + */ +interface ASPxClientCustomDataCallbackEventHandler { + /** + * A method that will handle the client CustomCallback event of some controls. + * @param source An object representing the event source. + * @param e An ASPxClientCustomDataCallbackEventHandler object that contains event data. + */ + (source: S, e: ASPxClientCustomDataCallbackEventArgs): void; +} +/** + * Provides data for the CustomCallback event. + */ +interface ASPxClientCustomDataCallbackEventArgs extends ASPxClientEventArgs { + /** + * Gets a string that contains specific information (if any) that has been passed from the server to the client side for further processing, related to the CustomCallback event. + * Value: A string value representing specific information passed from the server back to the client side. + */ + result: string; +} +/** + * A method that will handle client events related to server-side errors that occured during callback processing. + */ +interface ASPxClientCallbackErrorEventHandler { + /** + * A method that will handle client CallbackError events. + * @param source An object representing the event source. + * @param e A ASPxClientCallbackErrorEventArgs object that contains event data. + */ + (source: S, e: ASPxClientCallbackErrorEventArgs): void; +} +/** + * Provides data for client events related to server-side errors that occured during callback processing. + */ +interface ASPxClientCallbackErrorEventArgs extends ASPxClientEventArgs { + /** + * Gets the error message that describes the server error that occurred. + * Value: A string value that represents the error message. + */ + message: string; + /** + * Gets or sets whether the event is handled and the default error handling actions are not required. + * Value: true if the error is handled and no default processing is required; otherwise false. + */ + handled: boolean; +} +/** + * A method that will handle the CallbackError event. + */ +interface ASPxClientGlobalCallbackErrorEventHandler { + /** + * A method that will handle the CallbackError event. + * @param source The event source. + * @param e An ASPxDataValidationEventArgs object that contains event data. + */ + (source: S, e: ASPxClientGlobalCallbackErrorEventArgs): void; +} +/** + * Provides data for the CallbackError event. + */ +interface ASPxClientGlobalCallbackErrorEventArgs extends ASPxClientCallbackErrorEventArgs { + /** + * Gets an object that initiated a callback. + * Value: An class descendant object that is the control that initiated a callback. + */ + control: ASPxClientControl; +} +/** + * A method that will handle the ValidationCompleted client event. + */ +interface ASPxClientValidationCompletedEventHandler { + /** + * A method that will handle the ValidationCompleted event. + * @param source An object representing the event source. Identifies the ASPxClientGlobalEvents object that raised the event. + * @param e An ASPxClientValidationCompletedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientValidationCompletedEventArgs): void; +} +/** + * Provides data for the ValidationCompleted client event that allows you to centrally validate user input within all DevExpress web controls to which validation is applied. + */ +interface ASPxClientValidationCompletedEventArgs extends ASPxClientEventArgs { + /** + * Gets a container object that holds the validated control(s). + * Value: An object that represents a container of the validated control(s). + */ + container: Object; + /** + * Gets the name of the validation group name to which validation has been applied. + * Value: A string value that represents the name of the validation group that has been validated. + */ + validationGroup: string; + /** + * Gets a value that indicates whether validation has been applied to both visible and invisible controls. + * Value: true if validation has been applied to both visible and invisible controls; false if only visible controls have been validated. + */ + invisibleControlsValidated: boolean; + /** + * Gets a value specifying whether the validation has been completed successfully. + * Value: true if the validation has been completed successfully; otherwise, false. + */ + isValid: boolean; + /** + * Gets the first control (either visible or invisible) that hasn't passed the validation applied. + * Value: An ASPxClientControl object that represents the first invalid control. + */ + firstInvalidControl: ASPxClientControl; + /** + * Gets the first visible control that hasn't passed the validation applied. + * Value: An ASPxClientControl object that represents the first visible invalid control. + */ + firstVisibleInvalidControl: ASPxClientControl; +} +/** + * A method that will handle the client ControlsInitialized event. + */ +interface ASPxClientControlsInitializedEventHandler { + /** + * A method that will handle the client ControlsInitialized event. + * @param source An object representing the event source. + * @param e An ASPxClientControlsInitializedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientControlsInitializedEventArgs): void; +} +/** + * Provides data for the client ControlsInitialized event. + */ +interface ASPxClientControlsInitializedEventArgs extends ASPxClientEventArgs { + /** + * Gets a value that specifies whether a callback is sent during a controls initialization. + * Value: true if a callback is sent; otherwise, false. + */ + isCallback: boolean; +} +/** + * A JavaScript function which returns a value specifying whether an object meets the criteria defined within the method specified by this delegate. + */ +interface ASPxClientControlPredicate { + /** + * A JavaScript function which returns a value specifying whether an object meets the criteria defined within the method specified by this delegate. + * @param control An object to compare against the criteria defined within the method. + */ + (control: Object): boolean; +} +/** + * Represents a JavaScript function which receives the action to perform for a control when the client ForEachControl method is called. + */ +interface ASPxClientControlAction { + /** + * Represents a JavaScript function which receives the action to perform for a control when the client ForEachControl method is called. + * @param control An object that specifies a control. + */ + (control: Object): void; +} +/** + * A collection object used on the client side to maintain particular client control objects + */ +interface ASPxClientControlCollection { + /** + * Occurs on the client side after client object models of all DevExpress web controls contained within the page have been initialized. + */ + ControlsInitialized: ASPxClientEvent>; + /** + * Occurs when the browser window is being resized. + */ + BrowserWindowResized: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated by any DevExpress control. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side, after server-side processing of a callback initiated by any DevExpress web control, has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by any DevExpress web control. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs after the validation initiated for a DevExpress web control (or a group of DevExpress web controls) has been completed. + */ + ValidationCompleted: ASPxClientEvent>; + /** + * Returns a collection item identified by its unique hierarchically-qualified identifier. + * @param name A string value representing the hierarchically-qualified identifier of the required control. + */ + Get(name: Object): Object; + /** + * Returns a DevExpress client control object identified by its unique hierarchically-qualified identifier (either ClientInstanceName or ClientID property value). + * @param name A string value that is the hierarchically-qualified identifier of the required DevExpress control. + */ + GetByName(name: string): Object; + /** + * Returns all controls in the collection that satisfy the specified predicate. + * @param predicate An ASPxClientControlPredicate object that is a predicate used to search for controls in the collection. + */ + GetControlsByPredicate(predicate: ASPxClientControlPredicate): Object[]; + /** + * Returns all controls of the specified type. + * @param type The object specifying the client control type. + */ + GetControlsByType(type: Object): Object[]; + /** + * Performs the specified action for each control in the collection. + * @param action An ASPxClientControlAction object specifying an action to perform. + */ + ForEachControl(action: ASPxClientControlAction): void; +} +/** + * Represents a client-side equivalent of the ASPxDataView object. + */ +interface ASPxClientDataView extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientDataView. + */ + CallbackError: ASPxClientEvent>; + /** + * Activates the specified page. + * @param pageIndex An integer value that specifies the active page's index. + */ + GotoPage(pageIndex: number): void; + /** + * Gets the index of the page that is currently active. + */ + GetPageIndex(): number; + /** + * Gets the size of a single ASPxDataView's page. + */ + GetPageSize(): number; + /** + * Sets the size of a single ASPxDataView's page. + * @param pageSize An integer value that specifies the page size. + */ + SetPageSize(pageSize: number): void; + /** + * Gets the number of pages into which the ASPxDataView's data is divided. + */ + GetPageCount(): number; + /** + * Activates the next page. + */ + NextPage(): void; + /** + * Activates the previous page. + */ + PrevPage(): void; + /** + * Activates the first page. + */ + FirstPage(): void; + /** + * Activates the last page. + */ + LastPage(): void; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * 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; +} +/** + * A JavaScript function which returns a value specifying whether an object meets the criteria defined within the method specified by this delegate. + */ +interface ASPxClientDockingFilterPredicate { + /** + * A JavaScript function which returns a value specifying whether an object meets the criteria defined within the method specified by this delegate. + * @param item An object to compare against the criteria defined within the method. + */ + (item: Object): boolean; +} +/** + * A client-side equivalent of the ASPxDockManager object. + */ +interface ASPxClientDockManager extends ASPxClientControl { + /** + * Fires on the client side before a panel is docked in a zone and allows you to cancel the action. + */ + BeforeDock: ASPxClientEvent>; + /** + * Fires on the client side after a panel is docked in a zone. + */ + AfterDock: ASPxClientEvent>; + /** + * Fires on the client side before a panel is made floating (undocked from a zone) and allows you to cancel the action. + */ + BeforeFloat: ASPxClientEvent>; + /** + * Fires on the client side after a panel is undocked from a zone. + */ + AfterFloat: ASPxClientEvent>; + /** + * Occurs when a panel dragging operation is started. + */ + StartPanelDragging: ASPxClientEvent>; + /** + * Occurs after a panel dragging operation is complete. + */ + EndPanelDragging: ASPxClientEvent>; + /** + * Occurs on the client side before a panel is closed, and allows you to cancel the action. + */ + PanelClosing: ASPxClientEvent>; + /** + * Occurs on the client side when a panel is closed. + */ + PanelCloseUp: ASPxClientEvent>; + /** + * Occurs on the client side when a panel pops up. + */ + PanelPopUp: ASPxClientEvent>; + /** + * Occurs on the client side after a panel has been invoked. + */ + PanelShown: ASPxClientEvent>; + /** + * Occurs on the client side after a panel has been resized. + */ + PanelResize: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * 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; + /** + * Returns a zone specified by its unique identifier (zoneUID). + * @param zoneUID A string value specifying the unique identifier of the zone. + */ + GetZoneByUID(zoneUID: string): ASPxClientDockZone; + /** + * Returns a panel specified by its unique identifier (panelUID). + * @param panelUID A string value specifying the unique identifier of the panel. + */ + GetPanelByUID(panelUID: string): ASPxClientDockPanel; + /** + * Returns an array of panels contained in a page. + */ + GetPanels(): ASPxClientDockPanel[]; + /** + * Returns an array of panels that are contained in a page and meet a specified criteria. + * @param filterPredicate An ASPxClientDockingFilterPredicate delegate that defines a set of criteria and determines whether a panel meets those criteria. + */ + GetPanels(filterPredicate: ASPxClientDockingFilterPredicate): ASPxClientDockPanel[]; + /** + * Returns an array of zones contained in a page. + */ + GetZones(): ASPxClientDockZone[]; + /** + * Returns an array of zones that are contained in a page and meet a specified criteria. + * @param filterPredicate An ASPxClientDockingFilterPredicate delegate that defines a set of criteria and determines whether a zone meets those criteria. + */ + GetZones(filterPredicate: ASPxClientDockingFilterPredicate): ASPxClientDockZone[]; +} +/** + * A method that will handle the client BeforeDock event. + */ +interface ASPxClientDockManagerProcessingModeCancelEventHandler { + /** + * A method that will handle the BeforeDock event. + * @param source The event source. This parameter identifies the dock manager object which raised the event. + * @param e An ASPxClientDockManagerProcessingModeCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockManagerProcessingModeCancelEventArgs): void; +} +/** + * Provides data for the BeforeDock event. + */ +interface ASPxClientDockManagerProcessingModeCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets the panel currently being processed. + * Value: An ASPxClientDockPanel object that is the processed panel. + */ + panel: ASPxClientDockPanel; + /** + * Gets the zone currently being processed. + * Value: An ASPxClientDockZone object that is the processed zone. + */ + zone: ASPxClientDockZone; +} +/** + * A method that will handle the client AfterDock event. + */ +interface ASPxClientDockManagerProcessingModeEventHandler { + /** + * A method that will handle the AfterDock event. + * @param source The event source. This parameter identifies the dock manager object which raised the event. + * @param e An ASPxClientDockManagerProcessingModeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockManagerProcessingModeEventArgs): void; +} +/** + * Provides data for the AfterDock event. + */ +interface ASPxClientDockManagerProcessingModeEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the panel currently being processed. + * Value: An ASPxClientDockPanel object that is the processed panel. + */ + panel: ASPxClientDockPanel; + /** + * Gets the zone currently being processed. + * Value: An ASPxClientDockZone object that is the processed zone. + */ + zone: ASPxClientDockZone; +} +/** + * A method that will handle client-side events concerning manipulations with panels. + */ +interface ASPxClientDockManagerEventHandler { + /** + * A method that will handle client-side events concerning manipulations with panels. + * @param source The event source. This parameter identifies the dock manager object which raised the event. + * @param e An ASPxClientDockManagerEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockManagerEventArgs): void; +} +/** + * Provides data for events which concern manipulations on panels. + */ +interface ASPxClientDockManagerEventArgs extends ASPxClientEventArgs { + /** + * Gets the panel currently being processed. + * Value: An ASPxClientDockPanel object that is the processed panel. + */ + panel: ASPxClientDockPanel; +} +/** + * A method that will handle the client BeforeDock event. + */ +interface ASPxClientDockManagerCancelEventHandler { + /** + * A method that will handle the PanelClosing event. + * @param source The event source. This parameter identifies the dock manager object which raised the event. + * @param e An ASPxClientDockManagerCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockManagerCancelEventArgs): void; +} +/** + * Provides data for the BeforeDock event. + */ +interface ASPxClientDockManagerCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the panel currently being processed. + * Value: An ASPxClientDockPanel object that is the processed panel. + */ + panel: ASPxClientDockPanel; +} +/** + * Serves as a base class for the ASPxClientPopupControl classes. + */ +interface ASPxClientPopupControlBase extends ASPxClientControl { + /** + * Occurs on the client side when window resizing initiates. + */ + BeforeResizing: ASPxClientEvent>; + /** + * Occurs on the client side when window resizing completes. + */ + AfterResizing: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the control. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side when a control's window closes or hides. + */ + CloseUp: ASPxClientEvent>; + /** + * Enables you to cancel window closing on the client side. + */ + Closing: ASPxClientEvent>; + /** + * Occurs on the client side when a control's window is invoked. + */ + PopUp: ASPxClientEvent>; + /** + * Occurs on the client side after a window has been resized. + */ + Resize: ASPxClientEvent>; + /** + * Occurs on the client side after a control's window has been invoked. + */ + Shown: ASPxClientEvent>; + /** + * Occurs on the client side when the window pin state is changed. + */ + PinnedChanged: ASPxClientEvent>; + /** + * Modifies a control's window size in accordance with the content. + */ + AdjustSize(): void; + /** + * Brings the window to the front of the z-order. + */ + BringToFront(): void; + /** + * Returns a value indicating whether the window is collapsed. + */ + GetCollapsed(): boolean; + /** + * Returns the HTML code that specifies the contents of the control's window. + */ + GetContentHtml(): string; + /** + * Returns an iframe object containing a web page specified via the control's SetContentUrl client method). + */ + GetContentIFrame(): Object; + /** + * Returns an iframe object containing a web page specified via the control's SetContentUrl client method). + */ + GetContentIFrameWindow(): Object; + /** + * Returns the URL pointing to the web page displayed within the control's window. + */ + GetContentUrl(): string; + /** + * Returns the URL pointing to the image displayed within the window footer by default. + */ + GetFooterImageUrl(): string; + /** + * Returns the URL where the web browser will navigate when the text or image is clicked within a window's footer. + */ + GetFooterNavigateUrl(): string; + /** + * Returns the text displayed within a window's footer. + */ + GetFooterText(): string; + /** + * Returns the URL pointing to the image displayed within the window header. + */ + GetHeaderImageUrl(): string; + /** + * Returns the URL where the web browser will navigate when the text or image is clicked within a window's header. + */ + GetHeaderNavigateUrl(): string; + /** + * Returns the text displayed within a window's header. + */ + GetHeaderText(): string; + /** + * Gets the width of the default window's (for ASPxPopupControl) or panel's (for ASPxDockPanel) content region. + */ + GetContentWidth(): number; + /** + * Gets the height of the default window's (for ASPxPopupControl) or panel's (for ASPxDockPanel) content region. + */ + GetContentHeight(): number; + /** + * Returns a value indicating whether the window is maximized. + */ + GetMaximized(): boolean; + /** + * Returns a value indicating whether the window is pinned. + */ + GetPinned(): boolean; + /** + * Sends a callback to the server and generates the server-side WindowCallback event, passing the specified argument to it. + * @param parameter A string value that is any information that needs to be sent to the server-side WindowCallback event. + */ + PerformCallback(parameter: string): void; + /** + * Refreshes the content of the web page displayed within the control's window. + */ + RefreshContentUrl(): void; + /** + * Sets a value indicating whether the window is collapsed. + * @param value true, to collapse the window; otherwise, false. + */ + SetCollapsed(value: boolean): void; + /** + * Sets the HTML markup specifying the contents of the control's window. + * @param html A string value that specifies the HTML markup. + */ + SetContentHtml(html: string): void; + /** + * Sets the URL to point to the web page that should be loaded into, and displayed within the control's window. + * @param url A string value specifying the URL to the web page displayed within the control's window. + */ + SetContentUrl(url: string): void; + /** + * Specifies the URL which points to the image displayed within the window footer by default. + * @param value A string value that is the URL for the image displayed within the window footer. + */ + SetFooterImageUrl(value: string): void; + /** + * Specifies the URL where the web browser will navigate when the text or image is clicked within a window's footer. + * @param value A string value which specifies the required navigation location. + */ + SetFooterNavigateUrl(value: string): void; + /** + * Specifies the text displayed within a window's footer. + * @param value A string value that specifies a window's footer text. + */ + SetFooterText(value: string): void; + /** + * Specifies the URL which points to the image displayed within the window header. + * @param value A string value that is the URL to the image displayed within the header. + */ + SetHeaderImageUrl(value: string): void; + /** + * Specifies the URL where the web browser will navigate when the text or image is clicked within a window's header. + * @param value A string value which specifies the required navigation location. + */ + SetHeaderNavigateUrl(value: string): void; + /** + * Specifies the text displayed within a window's header. + * @param value A string value that specifies a window's header text. + */ + SetHeaderText(value: string): void; + /** + * Sets a value indicating whether the window is maximized. + * @param value true. to maximize the window; otherwise, false. + */ + SetMaximized(value: boolean): void; + /** + * Sets a value indicating whether the window is pinned. + * @param value true, to pin the window; otherwise, false. + */ + SetPinned(value: boolean): void; + /** + * Invokes the control's window. + */ + Show(): void; + /** + * Invokes the control's window at the popup element with the specified index. + * @param popupElementIndex An integer value specifying the zero-based index of the popup element. + */ + Show(popupElementIndex: number): void; + /** + * Invokes the control's window and displays it over the specified HTML element. + * @param htmlElement An object specifying the HTML element relative to whose position the window is invoked. + */ + ShowAtElement(htmlElement: Object): void; + /** + * Invokes the control's window and displays it over an HTML element specified by its unique identifier. + * @param id A string value that specifies the hierarchically qualified identifier of an HTML element relative to whose position the window is invoked. + */ + ShowAtElementByID(id: string): void; + /** + * Invokes the control's window at the specified position. + * @param x A integer value specifying the x-coordinate of the window's display position. + * @param y A integer value specifying the y-coordinate of the window's display position. + */ + ShowAtPos(x: number, y: number): void; + /** + * Closes the control's window. + */ + Hide(): void; + /** + * Returns a value that specifies whether the control's window is displayed. + */ + IsVisible(): boolean; +} +/** + * A client-side equivalent of the ASPxDockPanel object. + */ +interface ASPxClientDockPanel extends ASPxClientPopupControlBase { + /** + * Gets or sets the unique identifier of a panel on a page. + * Value: A string that is the unique identifier of a panel. + */ + panelUID: string; + /** + * Fires on the client side before a panel is docked in a zone and allows you to cancel the action. + */ + BeforeDock: ASPxClientEvent>; + /** + * Fires on the client side after a panel is docked in a zone. + */ + AfterDock: ASPxClientEvent>; + /** + * Fires on the client side before a panel is made floating (undocked from a zone) and allows you to cancel the action. + */ + BeforeFloat: ASPxClientEvent>; + /** + * Fires on the client side after a panel is undocked from a zone. + */ + AfterFloat: ASPxClientEvent>; + /** + * Occurs when a panel dragging operation is started. + */ + StartDragging: ASPxClientEvent>; + /** + * Occurs after a panel dragging operation is complete. + */ + EndDragging: ASPxClientEvent>; + /** + * Retrieves a zone that owns the current panel. + */ + GetOwnerZone(): ASPxClientDockZone; + /** + * Docks the current panel in the specified zone. + * @param zone An ASPxClientDockZone object specifying the zone. + */ + Dock(zone: ASPxClientDockZone): void; + /** + * Docks the current panel in a zone at the specified position. + * @param zone An ASPxClientDockZone object specifying the zone, where the panel is docked + * @param visibleIndex An integer value specifying the visible index position. + */ + Dock(zone: ASPxClientDockZone, visibleIndex: number): void; + /** + * Undocks the current panel. + */ + MakeFloat(): void; + /** + * Undocks the current panel and place it at the specified position. + * @param x An integer value that specifies the X-coordinate of the panel's display position. + * @param y An integer value that specifies the Y-coordinate of the panel's display position. + */ + MakeFloat(x: number, y: number): void; + /** + * Gets a value specifying the position of the current panel, amongst the visible panels within a zone. + */ + GetVisibleIndex(): number; + /** + * Sets a value specifying the position of the current panel, amongst the visible panels in a zone. + * @param visibleIndex An integer value specifying the zero-based index of the panel amongst visible panels in the zone. + */ + SetVisibleIndex(visibleIndex: number): void; + /** + * Returns a value indicating whether the panel is docked. + */ + IsDocked(): boolean; +} +/** + * A method that will handle the client BeforeDock event. + */ +interface ASPxClientDockPanelProcessingModeCancelEventHandler { + /** + * A method that will handle the BeforeDock event. + * @param source A ASPxClientDockPanel object that raised the event. + * @param e A ASPxClientDockPanelProcessingModeCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockPanelProcessingModeCancelEventArgs): void; +} +/** + * Provides data for the BeforeDock event. + */ +interface ASPxClientDockPanelProcessingModeCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets the zone currently being processed. + * Value: An ASPxClientDockZone object that is the processed zone. + */ + zone: ASPxClientDockZone; +} +/** + * A method that will handle the client BeforeDock event. + */ +interface ASPxClientDockPanelProcessingModeEventHandler { + /** + * A method that will handle the AfterFloat event. + * @param source A ASPxClientDockPanel object that raised the event. + * @param e A ASPxClientDockPanelProcessingModeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockPanelProcessingModeEventArgs): void; +} +/** + * Provides data for the AfterFloat event. + */ +interface ASPxClientDockPanelProcessingModeEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the zone currently being processed. + * Value: An ASPxClientDockZone object that is the processed zone. + */ + zone: ASPxClientDockZone; +} +/** + * A client-side equivalent of the ASPxDockZone object. + */ +interface ASPxClientDockZone extends ASPxClientControl { + /** + * Gets or sets the unique identifier of a zone on a page. + * Value: A string that is the unique identifier of a zone. + */ + zoneUID: string; + /** + * Fires on the client side before a panel is docked in a zone and allows you to cancel the action. + */ + BeforeDock: ASPxClientEvent>; + /** + * Fires on the client side after a panel is docked in a zone. + */ + AfterDock: ASPxClientEvent>; + /** + * Returns a value that indicates the orientation in which panels are stacked in the current zone. + */ + IsVertical(): boolean; + /** + * Gets a value that indicates whether the zone can enlarge its size. + */ + GetAllowGrowing(): boolean; + /** + * Gets the number of panels contained in the zone. + */ + GetPanelCount(): number; + /** + * Returns a panel specified by its unique identifier (panelUID). + * @param panelUID A string value specifying the unique identifier of the panel. + */ + GetPanelByUID(panelUID: string): ASPxClientDockPanel; + /** + * Returns a panel specified by its visible index. + * @param visibleIndex An integer value specifying the panel's position among the visible panels within the current zone. + */ + GetPanelByVisibleIndex(visibleIndex: number): ASPxClientDockPanel; + /** + * Returns an array of panels docked in the current zone. + */ + GetPanels(): ASPxClientDockPanel[]; + /** + * Returns an array of panels that are docked in the current zone and meet a specified criteria. + * @param filterPredicate An ASPxClientDockingFilterPredicate delegate that defines a set of criteria and determines whether a panel meets those criteria. + */ + GetPanels(filterPredicate: ASPxClientDockingFilterPredicate): ASPxClientDockPanel[]; +} +/** + * A method that will handle the client BeforeDock event. + */ +interface ASPxClientDockZoneCancelEventHandler { + /** + * A method that will handle the BeforeDock event. + * @param source The event source. This parameter identifies the zone object which raised the event. + * @param e A ASPxClientDockZoneCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockZoneCancelEventArgs): void; +} +/** + * Provides data for the BeforeDock event. + */ +interface ASPxClientDockZoneCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets the panel currently being processed. + * Value: An ASPxClientDockPanel object that is the processed panel. + */ + panel: ASPxClientDockPanel; +} +/** + * A method that will handle the client AfterDock event. + */ +interface ASPxClientDockZoneProcessingModeEventHandler { + /** + * A method that will handle the AfterDock event. + * @param source The event source. This parameter identifies the zone object which raised the event. + * @param e An ASPxClientDockZoneProcessingModeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientDockZoneProcessingModeEventArgs): void; +} +/** + * Provides data for the AfterDock event. + */ +interface ASPxClientDockZoneProcessingModeEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the panel currently being processed. + * Value: An ASPxClientDockPanel object that is the processed panel. + */ + panel: ASPxClientDockPanel; +} +/** + * Represents the client-side equivalent of the ASPxFileManager control. + */ +interface ASPxClientFileManager extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientFileManager. + */ + CallbackError: ASPxClientEvent>; + /** + * Fires on the client side after the selected file has been changed. + */ + SelectedFileChanged: ASPxClientEvent>; + /** + * Fires on the client side when an end-user opens a file by double-clicking it or pressing the Enter key. + */ + SelectedFileOpened: ASPxClientEvent>; + /** + * Fires after the focused item has been changed. + */ + FocusedItemChanged: ASPxClientEvent>; + /** + * Fires after the selection has been changed. + */ + SelectionChanged: ASPxClientEvent>; + /** + * Fires on the client side after the current folder has been changed within a file manager. + */ + CurrentFolderChanged: ASPxClientEvent>; + /** + * Fires on the client side before the folder is created, and allows you to cancel the action. + */ + FolderCreating: ASPxClientEvent>; + /** + * Occurs on the client side after a folder has been created. + */ + FolderCreated: ASPxClientEvent>; + /** + * Fires on the client side before an item is renamed and allows you to cancel the action. + */ + ItemRenaming: ASPxClientEvent>; + /** + * Occurs on the client side after a file manager's item has been renamed. + */ + ItemRenamed: ASPxClientEvent>; + /** + * Fires on the client side before an item is deleted and allows you to cancel the action. + */ + ItemDeleting: ASPxClientEvent>; + /** + * Occurs on the client side after a file manager's item has been deleted. + */ + ItemDeleted: ASPxClientEvent>; + /** + * Occurs on the client side after all the selected items have been deleted. + */ + ItemsDeleted: ASPxClientEvent>; + /** + * Fires on the client side before an item is moved and allows you to cancel the action. + */ + ItemMoving: ASPxClientEvent>; + /** + * Occurs on the client side after a file manager's item has been moved. + */ + ItemMoved: ASPxClientEvent>; + /** + * Occurs on the client side after all the selected items have been moved . + */ + ItemsMoved: ASPxClientEvent>; + /** + * Fires on the client side before an item is copied and allows you to cancel the action. + */ + ItemCopying: ASPxClientEvent>; + /** + * Occurs on the client side after a file manager item has been copied. + */ + ItemCopied: ASPxClientEvent>; + /** + * Occurs on the client side after all the selected items have been copied. + */ + ItemsCopied: ASPxClientEvent>; + /** + * Fires on the client if any error occurs while editing an item. + */ + ErrorOccurred: ASPxClientEvent>; + /** + * Enables you to display the alert with the result error description. + */ + ErrorAlertDisplaying: ASPxClientEvent>; + /** + * Fires when a custom item is clicked, allowing you to perform custom actions. + */ + CustomCommand: ASPxClientEvent>; + /** + * Fires on the client side when the file manager updates the state of toolbar or context menu items. + */ + ToolbarUpdating: ASPxClientEvent>; + /** + * Enables you to highlight the search text, which is specified using the filter box, in templates. + */ + HighlightItemTemplate: ASPxClientEvent>; + /** + * Fires on the client side before a file upload starts, and allows you to cancel the action. + */ + FileUploading: ASPxClientEvent>; + /** + * Fires on the client side before the selected items are uploaded and allows you to cancel the action. + */ + FilesUploading: ASPxClientEvent>; + /** + * Occurs on the client side after a file has been uploaded. + */ + FileUploaded: ASPxClientEvent>; + /** + * Occurs on the client side after upload of all selected files has been completed. + */ + FilesUploaded: ASPxClientEvent>; + /** + * Enables you to specify whether the selected file(s) are valid and provide an error text. + */ + FileUploadValidationErrorOccurred: ASPxClientEvent>; + /** + * Fires on the client side before a file download starts, and allows you to cancel the action. + */ + FileDownloading: ASPxClientEvent>; + /** + * Gets the name of the currently active file manager area. + */ + GetActiveAreaName(): string; + /** + * Client-side scripting method which initiates a round trip to the server, so that the current page will be reloaded. + */ + Refresh(): void; + /** + * Executes the specified command. + * @param commandName A string value that specifies the command to perform. + */ + ExecuteCommand(commandName: string): boolean; + /** + * Returns the selected file within the ASPxFileManager control's file container. + */ + GetSelectedFile(): ASPxClientFileManagerFile; + /** + * Returns an array of the file manager's selected items. + */ + GetSelectedItems(): ASPxClientFileManagerFile[]; + /** + * Returns a list of files that are loaded on the current page. + */ + GetItems(): ASPxClientFileManagerFile[]; + /** + * Sends a callback to the server and returns a list of files that are contained within the current folder. + * @param onCallback A object that represents the JavaScript function which receives the list of row values as a parameter. + */ + GetAllItems(onCallback: ASPxClientFileManagerAllItemsCallback): void; + /** + * Returns a toolbar item specified by its command name. + * @param commandName A string value specifying the command name of the item. + */ + GetToolbarItemByCommandName(commandName: string): ASPxClientFileManagerToolbarItem; + /** + * Returns a context menu item specified by its command name. + * @param commandName A string value specifying the command name of the item. + */ + GetContextMenuItemByCommandName(commandName: string): ASPxClientFileManagerToolbarItem; + /** + * Gets the current folder's path. + */ + GetCurrentFolderPath(): string; + /** + * Gets the current folder's path with the specified separator. + * @param separator A string value that specifies the separator between the folder's name within a path. + */ + GetCurrentFolderPath(separator: string): string; + /** + * Gets the current folder's path with the specified settings. + * @param separator A string value that specifies the separator between the folder's name within the path. + * @param skipRootFolder true to skip the root folder; otherwise, false. + */ + GetCurrentFolderPath(separator: string, skipRootFolder: boolean): string; + /** + * Sets the current folder's path. + * @param path A String value that is the relative path to the folder (without the root folder). + * @param onCallback A ASPxClientFileManagerCallback object that is the JavaScript function that receives the callback data as a parameter. + */ + SetCurrentFolderPath(path: string, onCallback: ASPxClientFileManagerCallback): void; + /** + * Gets the current folder's ID. + */ + GetCurrentFolderId(): string; + /** + * 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. + */ + PerformCallback(args: string): void; + /** + * 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; +} +/** + * A JavaScript function which receives callback data obtained via a call to the client SetCurrentFolderPath method. + */ +interface ASPxClientFileManagerCallback { + /** + * A JavaScript function that receives callback data obtained via a call to the SetCurrentFolderPath method. + * @param result An object that contains a callback data. + */ + (result: Object): void; +} +/** + * A client-side equivalent of the file manager's FileManagerItem object and serves as a base class for client file and folder objects. + */ +interface ASPxClientFileManagerItem { + /** + * Gets the name of the current item. + * Value: A string value that is the item's name. + */ + name: string; + /** + * Gets the item's unique identifier. + * Value: A String value that specifies the item's unique identifier. + */ + id: string; + /** + * Gets a value that indicates if the current file manager item is a folder. + * Value: true if the current item is a folder or parent folder; false if the current item is a file. + */ + isFolder: boolean; + /** + * Specifies whether the file manager item is selected. + * @param selected true, to select the item; otherwise, false. + */ + SetSelected(selected: boolean): void; + /** + * Gets a value indicating whether the item is selected in the file manager. + */ + IsSelected(): boolean; + /** + * Gets the current item's full name. + */ + GetFullName(): string; + /** + * Gets the current item's full name with the specified separator. + * @param separator A string value that specifies the separator between the folder name inside the item's full name. + */ + GetFullName(separator: string): string; + /** + * Gets the current item's full name with the specified settings. + * @param separator A string value that specifies the separator between the folder name inside the item's full name. + * @param skipRootFolder true, to skip the root folder; otherwise, false. + */ + GetFullName(separator: string, skipRootFolder: boolean): string; +} +/** + * Represents the client-side equivalent of the FileManagerFile object. + */ +interface ASPxClientFileManagerFile extends ASPxClientFileManagerItem { + /** + * Downloads a file from a file manager. + */ + Download(): void; +} +/** + * A client-side equivalent of the FileManagerFolder object. + */ +interface ASPxClientFileManagerFolder extends ASPxClientFileManagerItem { + /** + * Gets a value specifying whether an item is a parent folder. + * Value: true if an item is a parent folder; false if an item is a file or folder. + */ + isParentFolder: boolean; +} +/** + * A JavaScript function which receives callback data obtained by a call to the client GetAllItems method. + */ +interface ASPxClientFileManagerAllItemsCallback { + /** + * A JavaScript function which receives callback data obtained by a call to the client GetAllItems method. + * @param items An array of ASPxClientFileManagerItem objects that are items contained in the current folder. + */ + (items: ASPxClientFileManagerItem[]): void; +} +/** + * A method that will handle the client SelectedFileOpened events. + */ +interface ASPxClientFileManagerFileEventHandler { + /** + * A method that will handle the SelectedFileOpened events. + * @param source An object representing the event's source. + * @param e An ASPxClientFileManagerFileEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFileEventArgs): void; +} +/** + * Provides data for the SelectedFileOpened events. + */ +interface ASPxClientFileManagerFileEventArgs extends ASPxClientEventArgs { + /** + * Gets a file related to the event. + * Value: An ASPxClientFileManagerFile object that represents a file currently being processed. + */ + file: ASPxClientFileManagerFile; +} +/** + * A method that will handle the client SelectedFileOpened event. + */ +interface ASPxClientFileManagerFileOpenedEventHandler { + /** + * A method that will handle the SelectedFileOpened event. + * @param source The event source. This parameter identifies the file manager object which raised the event. + * @param e An ASPxClientFileManagerFileOpenedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFileOpenedEventArgs): void; +} +/** + * Provides data for the SelectedFileOpened event. + */ +interface ASPxClientFileManagerFileOpenedEventArgs extends ASPxClientFileManagerFileEventArgs { + /** + * Gets or sets a value that specifies whether the event should be finally processed on the server side. + * Value: true to process the event on the server side; false to completely handle it on the client side. + */ + processOnServer: boolean; +} +/** + * Serves as a base for classes that are used as arguments for events generated on the client side. + */ +interface ASPxClientFileManagerActionEventArgsBase extends ASPxClientEventArgs { + /** + * Gets the full name of the item currently being processed. + * Value: A string value that is the item's full name. + */ + fullName: string; + /** + * Gets the name of the currently processed item. + * Value: A string value that specifies the item's name. + */ + name: string; + /** + * Gets a value specifying whether the current processed item is a folder. + * Value: true if the processed item is a folder; false if the processed item is a file. + */ + isFolder: boolean; +} +/** + * A method that will handle the client ItemRenaming events. + */ +interface ASPxClientFileManagerItemEditingEventHandler { + /** + * A method that will handle the ItemRenaming events. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemEditingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemEditingEventArgs): void; +} +/** + * Provides data for the item editing event. + */ +interface ASPxClientFileManagerItemEditingEventArgs extends ASPxClientFileManagerActionEventArgsBase { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the client ItemRenamed event. + */ +interface ASPxClientFileManagerItemRenamedEventHandler { + /** + * A method that will handle the ItemRenamed event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemRenamedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemRenamedEventArgs): void; +} +/** + * Provides data for the ItemRenamed event. + */ +interface ASPxClientFileManagerItemRenamedEventArgs extends ASPxClientFileManagerActionEventArgsBase { + /** + * Gets the previous name of the renamed item. + * Value: A string value that specifies the item name. + */ + oldName: string; +} +/** + * A method that will handle the client ItemDeleted event. + */ +interface ASPxClientFileManagerItemDeletedEventHandler { + /** + * A method that will handle the ItemDeleted event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemDeletedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemDeletedEventArgs): void; +} +/** + * Provides data for the ItemDeleted event. + */ +interface ASPxClientFileManagerItemDeletedEventArgs extends ASPxClientFileManagerActionEventArgsBase { +} +/** + * A method that will handle the client ItemsDeleted event. + */ +interface ASPxClientFileManagerItemsDeletedEventHandler { + /** + * A method that will handle the ItemsDeleted event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemsDeletedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemsDeletedEventArgs): void; +} +/** + * Provides data for the ItemsDeleted event. + */ +interface ASPxClientFileManagerItemsDeletedEventArgs extends ASPxClientEventArgs { + /** + * Gets an array of the currently processed items. + * Value: An array of ASPxClientFileManagerItem objects that are items currently being processed. + */ + items: ASPxClientFileManagerItem[]; +} +/** + * A method that will handle the client ItemMoved event. + */ +interface ASPxClientFileManagerItemMovedEventHandler { + /** + * A method that will handle the ItemMoved event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemMovedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemMovedEventArgs): void; +} +/** + * Provides data for the ItemMoved event. + */ +interface ASPxClientFileManagerItemMovedEventArgs extends ASPxClientFileManagerActionEventArgsBase { + /** + * Gets the full name of the folder from which an item is moved. + * Value: A string value that specifies the folder's full name. + */ + oldFolderFullName: string; +} +/** + * A method that will handle the client ItemsMoved event. + */ +interface ASPxClientFileManagerItemsMovedEventHandler { + /** + * A method that will handle the ItemsMoved event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemsMovedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemsMovedEventArgs): void; +} +/** + * Provides data for the ItemsMoved event. + */ +interface ASPxClientFileManagerItemsMovedEventArgs extends ASPxClientEventArgs { + /** + * Gets an array of the currently processed items. + * Value: An array of ASPxClientFileManagerItem objects that are items currently being processed. + */ + items: ASPxClientFileManagerItem[]; + /** + * Gets the full name of the folder from which items are moved. + * Value: A string value that specifies the folder's full name. + */ + oldFolderFullName: string; +} +/** + * A method that will handle the client ItemCopied event. + */ +interface ASPxClientFileManagerItemCopiedEventHandler { + /** + * A method that will handle the ItemCopied event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemCopiedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemCopiedEventArgs): void; +} +/** + * Provides data for the ItemCopied event. + */ +interface ASPxClientFileManagerItemCopiedEventArgs extends ASPxClientFileManagerActionEventArgsBase { + /** + * Gets the full name of the folder from which an item is copied. + * Value: A string value that specifies the folder's full name. + */ + oldFolderFullName: string; +} +/** + * A method that will handle the client ItemsCopied event. + */ +interface ASPxClientFileManagerItemsCopiedEventHandler { + /** + * A method that will handle the ItemsCopied event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemsCopiedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemsCopiedEventArgs): void; +} +/** + * Provides data for the ItemsCopied event. + */ +interface ASPxClientFileManagerItemsCopiedEventArgs extends ASPxClientEventArgs { + /** + * Gets an array of the currently processed items. + * Value: An array of ASPxClientFileManagerItem objects that are items currently being processed. + */ + items: ASPxClientFileManagerItem[]; + /** + * Gets the full name of the folder from which items are copied. + * Value: A string value that specifies the folder's full name. + */ + oldFolderFullName: string; +} +/** + * A method that will handle the client FolderCreated event. + */ +interface ASPxClientFileManagerItemCreatedEventHandler { + /** + * A method that will handle the FolderCreated event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerItemCreatedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerItemCreatedEventArgs): void; +} +/** + * Provides data for the FolderCreated event. + */ +interface ASPxClientFileManagerItemCreatedEventArgs extends ASPxClientFileManagerActionEventArgsBase { +} +/** + * A method that will handle the client ErrorOccurred event. + */ +interface ASPxClientFileManagerErrorEventHandler { + /** + * A method that will handle the client ErrorOccurred event. + * @param source An object representing the event's source. + * @param e An ASPxClientFileManagerErrorEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerErrorEventArgs): void; +} +/** + * Provides data for the ErrorOccurred event. + */ +interface ASPxClientFileManagerErrorEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value representing the processed command's name. + */ + commandName: string; + /** + * Gets or sets the error description. + * Value: A string value specifying the error description. + */ + errorText: string; + /** + * Gets or sets a value specifying whether an event error message is sent to the ErrorAlertDisplaying event. + * Value: true to sent an error message; otherwise, false. + */ + showAlert: boolean; + /** + * Gets a specifically generated code that uniquely identifies an error, which occurs while editing an item. + * Value: An integer value that specifies the code uniquely identifying an error. + */ + errorCode: number; +} +/** + * A method that will handle the client ErrorAlertDisplaying event. + */ +interface ASPxClientFileManagerErrorAlertDisplayingEventHandler { + /** + * A method that will handle the ErrorAlertDisplaying event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerErrorAlertDisplayingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerErrorAlertDisplayingEventArgs): void; +} +/** + * Provides data for the ErrorAlertDisplaying event. + */ +interface ASPxClientFileManagerErrorAlertDisplayingEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value that is the processed command's name. + */ + commandName: string; + /** + * Gets or sets the errors description. + * Value: A string that is the errors description. + */ + errorText: string; + /** + * Gets or sets a value specifying whether an alert message is displayed when the event fires. + * Value: true to display an alert message; otherwise, false. + */ + showAlert: boolean; +} +/** + * A method that will handle the client FileUploading event. + */ +interface ASPxClientFileManagerFileUploadingEventHandler { + /** + * A method that will handle the FileUploading event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerFileUploadingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFileUploadingEventArgs): void; +} +/** + * Provides data for the FileUploading event. + */ +interface ASPxClientFileManagerFileUploadingEventArgs extends ASPxClientEventArgs { + /** + * Gets the path to the folder where a file is being uploaded. + * Value: A string value specifying the path where a file is being uploaded. + */ + folder: string; + /** + * Gets the name of a file selected for upload. + * Value: A string value that specifies the file name. + */ + fileName: string; + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the client FilesUploading event. + */ +interface ASPxClientFileManagerFilesUploadingEventHandler { + /** + * A method that will handle the FilesUploading event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerFilesUploadingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFilesUploadingEventArgs): void; +} +/** + * Provides data for the FilesUploading event. + */ +interface ASPxClientFileManagerFilesUploadingEventArgs extends ASPxClientEventArgs { + /** + * Gets the path to the folder where files are being uploaded. + * Value: A string value specifying the folder path. + */ + folder: string; + /** + * Gets the names of files selected for upload. + * Value: An array of string values that are the file names. + */ + fileNames: string[]; + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the client FileUploaded event. + */ +interface ASPxClientFileManagerFileUploadedEventHandler { + /** + * A method that will handle the FileUploaded event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerFileUploadedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFileUploadedEventArgs): void; +} +/** + * Provides data for the FileUploaded event. + */ +interface ASPxClientFileManagerFileUploadedEventArgs extends ASPxClientEventArgs { + /** + * Gets the path to the folder where a file is uploaded. + * Value: A string value specifying the uploaded file path. + */ + folder: string; + /** + * Gets the name of the uploaded file. + * Value: A string value that specifies the file name. + */ + fileName: string; +} +/** + * A method that will handle the client FilesUploaded event. + */ +interface ASPxClientFileManagerFilesUploadedEventHandler { + /** + * A method that will handle the FilesUploaded event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerFilesUploadedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFilesUploadedEventArgs): void; +} +/** + * Provides data for the FilesUploaded event. + */ +interface ASPxClientFileManagerFilesUploadedEventArgs extends ASPxClientEventArgs { + /** + * Gets the path to the folder where files are uploaded. + * Value: A string value specifying the uploaded files path. + */ + folder: string; + /** + * Gets an array of uploaded file names. + * Value: An array of string values that are the file names. + */ + fileNames: string[]; +} +/** + * A method that will handle the client FileDownloading event. + */ +interface ASPxClientFileManagerFileDownloadingEventHandler { + /** + * A method that will handle the FileDownloading event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerFileDownloadingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFileDownloadingEventArgs): void; +} +/** + * Provides data for the FileDownloading event. + */ +interface ASPxClientFileManagerFileDownloadingEventArgs extends ASPxClientFileManagerFileEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event, should be canceled. + * Value: true, if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the client FocusedItemChanged event. + */ +interface ASPxClientFileManagerFocusedItemChangedEventHandler { + /** + * A method that will handle the FocusedItemChanged event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerFocusedItemChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerFocusedItemChangedEventArgs): void; +} +/** + * Provides data for the FocusedItemChanged event. + */ +interface ASPxClientFileManagerFocusedItemChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the file manager item object related to the event. + * Value: An object, manipulations on which forced the event to be raised. + */ + item: ASPxClientFileManagerItem; + /** + * Gets the name of the focused item. + * Value: A string value that specifies the item's name. + */ + name: string; + /** + * Gets the full name of the item currently being processed. + * Value: A string value that is the item's full name. + */ + fullName: string; +} +/** + * A method that will handle the client CurrentFolderChanged event. + */ +interface ASPxClientFileManagerCurrentFolderChangedEventHandler { + /** + * A method that will handle the CurrentFolderChanged event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerCurrentFolderChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerCurrentFolderChangedEventArgs): void; +} +/** + * Provides data for the CurrentFolderChanged event. + */ +interface ASPxClientFileManagerCurrentFolderChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the currently processed folder. + * Value: A string value that specifies the folder's name. + */ + name: string; + /** + * Gets the full name of the folder currently being processed. + * Value: A string value that is the folder's full name. + */ + fullName: string; +} +/** + * A method that will handle the client SelectionChanged event. + */ +interface ASPxClientFileManagerSelectionChangedEventHandler { + /** + * A method that will handle the SelectionChanged event. + * @param source The event source. Identifies the ASPxFileManager control that raised the event. + * @param e A ASPxClientFileManagerSelectionChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerSelectionChangedEventArgs): void; +} +/** + * Provides data for the SelectionChanged event. + */ +interface ASPxClientFileManagerSelectionChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the file manager item object related to the event. + * Value: An object, manipulations on which forced the event to be raised. + */ + item: ASPxClientFileManagerItem; + /** + * Gets the name of the currently processed file. + * Value: A string value that specifies the file's name. + */ + name: string; + /** + * Gets the full name of the file currently being processed. + * Value: A string value that is the file's full name. + */ + fullName: string; + /** + * Gets whether the item has been selected. + * Value: true if the file has been selected; otherwise, false. + */ + isSelected: boolean; +} +/** + * A method that will handle the CustomCommand event. + */ +interface ASPxClientFileManagerCustomCommandEventHandler { + /** + * A method that will handle the CustomCommand event. + * @param source The event source. + * @param e An ASPxClientFileManagerCustomCommandEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerCustomCommandEventArgs): void; +} +/** + * Provides data for the CustomCommand event. + */ +interface ASPxClientFileManagerCustomCommandEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the processed command. + * Value: A string value that is the processed command's name. + */ + commandName: string; +} +/** + * A method that will handle the ToolbarUpdating event. + */ +interface ASPxClientFileManagerToolbarUpdatingEventHandler { + /** + * A method that will handle the ToolbarUpdating event. + * @param source The event source. + * @param e An ASPxClientFileManagerToolbarUpdatingEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerToolbarUpdatingEventArgs): void; +} +/** + * Provides data for the ToolbarUpdating event. + */ +interface ASPxClientFileManagerToolbarUpdatingEventArgs extends ASPxClientEventArgs { + /** + * Gets the name of the currently active file manager area. + * Value: A string value that identifies the active area. + */ + activeAreaName: string; +} +/** + * A method that will handle the client HighlightItemTemplate event. + */ +interface ASPxClientFileManagerHighlightItemTemplateEventHandler { + /** + * A method that will handle the HighlightItemTemplate event. + * @param source The event source. This parameter identifies the file manager object that raised the event. + * @param e An ASPxClientFileManagerHighlightItemTemplateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFileManagerHighlightItemTemplateEventArgs): void; +} +/** + * Provides data for the HighlightItemTemplate event. + */ +interface ASPxClientFileManagerHighlightItemTemplateEventArgs extends ASPxClientEventArgs { + /** + * Gets a string that is a filter value specified by the filter box. + * Value: A string that is a filter value. + */ + filterValue: string; + /** + * Gets the name of the item currently being processed. + * Value: A string that is the item name. + */ + itemName: string; + /** + * Gets an element containing the item template. + * Value: An object that is an element containing the item template. + */ + templateElement: string; + /** + * Get the name of the cascading style sheet (CSS) class associated with an item in the highlighted state. + * Value: A string that is the name of a CSS class. + */ + highlightCssClassName: string; +} +/** + * Represents a client-side equivalent of the menu's MenuItem object. + */ +interface ASPxClientMenuItem { + /** + * Gets the menu object to which the current item belongs. + * Value: An ASPxClientMenuBase object representing the menu to which the item belongs. + */ + menu: ASPxClientMenuBase; + /** + * Gets the immediate parent item to which the current item belongs. + * Value: An ASPxClientMenuItem object representing the item's immediate parent. + */ + parent: ASPxClientMenuItem; + /** + * Gets the item's index within the parent's collection of items. + * Value: An integer value representing the item's zero-based index within the Items collection of the parent object (a menu or item) to which the item belongs. + */ + index: number; + /** + * Gets the name that uniquely identifies the menu item. + * Value: A string value that represents the value assigned to the item's Name property. + */ + name: string; + /** + * For internal use only. + */ + indexPath: string; + /** + * Returns the number of the current menu item's immediate child items. + */ + GetItemCount(): number; + /** + * Returns the current menu item's immediate subitem specified by its index. + * @param index An integer value specifying the zero-based index of the submenu item to be retrieved. + */ + GetItem(index: number): ASPxClientMenuItem; + /** + * Returns the current menu item's subitem specified by its name. + * @param name A string value specifying the name of the menu item. + */ + GetItemByName(name: string): ASPxClientMenuItem; + /** + * Indicates whether the menu item is checked. + */ + GetChecked(): boolean; + /** + * Specifies whether the menu item is checked. + * @param value true if the menu item is checked; otherwise, false. + */ + SetChecked(value: boolean): void; + /** + * Returns a value specifying whether a menu item is enabled. + */ + GetEnabled(): boolean; + /** + * Specifies whether the menu item is enabled. + * @param value true to enable the menu item; otherwise, false. + */ + SetEnabled(value: boolean): void; + /** + * Returns the URL pointing to the image displayed within the menu item. + */ + GetImageUrl(): string; + /** + * Sets the URL which points to the image displayed within the menu item. + * @param value A string value specifying the URL to the image displayed within the menu item. + */ + SetImageUrl(value: string): void; + /** + * Gets a URL which defines the navigation location for the menu item. + */ + GetNavigateUrl(): string; + /** + * Specifies a URL which defines the navigation location for the menu item. + * @param value A string value which specifies a URL to where the client web browser will navigate when the menu item is clicked. + */ + SetNavigateUrl(value: string): void; + /** + * Returns text displayed within the menu item. + */ + GetText(): string; + /** + * Sets the text to be displayed within the menu item. + * @param value A string value specifying the text to be displayed within the menu item. + */ + SetText(value: string): void; + /** + * Returns a value specifying whether a menu item is displayed. + */ + GetVisible(): boolean; + /** + * Specifies the menu item's visibility. + * @param value true if the menu item is visible; otherwise, false. + */ + SetVisible(value: boolean): void; +} +/** + * A client-side equivalent of the file manager's FileManagerToolbarItemBase object. + */ +interface ASPxClientFileManagerToolbarItem extends ASPxClientMenuItem { + /** + * This property is not in effect for the ASPxClientFileManagerToolbarItem class. + */ + menu: ASPxClientMenuBase; + /** + * This property is not in effect for the ASPxClientFileManagerToolbarItem class. + */ + parent: ASPxClientMenuItem; + /** + * This property is not in effect for the ASPxClientFileManagerToolbarItem class. + */ + index: number; +} +/** + * A client-side equivalent of the ASPxFormLayout's LayoutItem object. + */ +interface ASPxClientLayoutItem { + /** + * Gets the form layout object to which the current item belongs. + * Value: An object representing the form layout to which the item belongs. + */ + formLayout: ASPxClientFormLayout; + /** + * Gets the name that uniquely identifies the layout item. + * Value: A string value that represents the value assigned to the layout item's Name property. + */ + name: string; + /** + * Gets the immediate parent layout item to which the current layout item belongs. + * Value: An object representing the item's immediate parent. + */ + parent: ASPxClientLayoutItem; + /** + * Returns the current layout item's subitem specified by its name. + * @param name A string value specifying the name of the layout item. + */ + GetItemByName(name: string): ASPxClientLayoutItem; + /** + * Returns a value specifying whether a layout item is displayed. + */ + GetVisible(): boolean; + /** + * Specifies the layout item's visibility. + * @param value true, if the layout item is visible; otherwise, false. + */ + SetVisible(value: boolean): void; + /** + * Specifies the text displayed in the layout item caption. + * @param caption A string value specifying the item caption. + */ + SetCaption(caption: string): void; + /** + * Returns the text displayed in the layout item caption. + */ + GetCaption(): string; +} +/** + * Represents a client-side equivalent of the ASPxFormLayout object. + */ +interface ASPxClientFormLayout extends ASPxClientControl { + /** + * Returns an item specified by its name. + * @param name A string value specifying the name of the item. + */ + GetItemByName(name: string): ASPxClientLayoutItem; +} +/** + * Represents a client-side equivalent of the ASPxGlobalEvents component. + */ +interface ASPxClientGlobalEvents { + /** + * Occurs on the client side after client object models of all DevExpress web controls contained within the page have been initialized. + */ + ControlsInitialized: ASPxClientEvent>; + /** + * Occurs when the browser window is being resized. + */ + BrowserWindowResized: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated by any DevExpress control. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side, after server-side processing of a callback initiated by any DevExpress web control, has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by any of DevExpress web controls. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side after the validation initiated for a DevExpress web control (or a group of DevExpress web controls) has been completed. + */ + ValidationCompleted: ASPxClientEvent>; +} +/** + * Represents a client-side equivalent of the ASPxHiddenField control. + */ +interface ASPxClientHiddenField extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientHiddenField. + */ + CallbackError: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * Adds a new value to the control's collection of property name/value pairs, on the client side. + * @param propertyName A string value that specifies the property name. It can contain letters, digits, underline characters, and dollar signs. It cannot begin with a digit character. + * @param propertyValue An object that represents the value of the specified property. + */ + Add(propertyName: string, propertyValue: Object): void; + /** + * Returns the value with the specified property name. + * @param propertyName A string value that specifies the property name. + */ + Get(propertyName: string): Object; + /** + * Adds a new value to the control's collection of property name/value pairs, on the client side. + * @param propertyName A string value that specifies the property name. It can contain letters, digits, underline characters, and dollar signs. It cannot begin with a digit character. + * @param propertyValue An object that represents the property value. + */ + Set(propertyName: string, propertyValue: Object): void; + /** + * Removes the specified value from the ASPxHiddenField collection. + * @param propertyName A string value representing the property name. + */ + Remove(propertyName: string): void; + /** + * Clears the ASPxHiddenField's value collection. + */ + Clear(): void; + /** + * Returns a value indicating whether the value with the specified property name is contained within the ASPxHiddenField control's value collection. + * @param propertyName A string value that specifies the property name. + */ + Contains(propertyName: string): boolean; +} +/** + * Represents the client-side equivalent of the ASPxHint control. + */ +interface ASPxClientHint extends ASPxClientControl { + /** + * Occurs on the client side when a hint is about to be shown. + */ + Showing: ASPxClientEvent; + /** + * Occurs on the client side when a hint is about to be hidden. + */ + Hiding: ASPxClientEvent; + /** + * This method is not in effect for a ASPxClientHint object. + */ + GetMainElement(): Object; + /** + * Invokes a hint. + * @param targetElement A HTML DOM element near to which the hint is displayed in response to user interaction. + */ + Show(targetElement: Object): ASPxClientHintWindow; + /** + * Invokes a hint. + * @param targetSelector A string value that is the CSS selector used to specify for which UI elements on a web page a hint is displayed. + */ + Show(targetSelector: string): ASPxClientHintWindow; +} +/** + * Represents the client-side equivalent of the ASPxHint's window. + */ +interface ASPxClientHintWindow { + /** + * Forces the ASPxClientHint's window to recalculate its position. + */ + UpdatePosition(): void; +} +/** + * A method that will handle the Showing event. + */ +interface ASPxClientHintShowingEventHandler { + /** + * A method that will handle the Showing event. + * @param sender The event source. + * @param e A ASPxClientHintShowingEventArgs object that contains the required data. + */ + (sender: ASPxClientHintWindow, e: ASPxClientHintShowingEventArgs): void; +} +/** + * Provides data for the Showing event. + */ +interface ASPxClientHintShowingEventArgs extends ASPxClientEventArgs { + /** + * Gets the object that is the hint's target element. + * Value: An object representing the hint's target element related to the event. + */ + targetElement: Object; + /** + * Gets the object that is the hint. + * Value: An object representing the hint related to the event. + */ + hintElement: Object; + /** + * Gets the object that is the hint's content. + * Value: An object representing the hint's content element related to the event. + */ + contentElement: Object; + /** + * Gets the object that is the hint's title. + * Value: An object representing the hint's title element related to the event. + */ + titleElement: Object; + /** + * Gets or sets a value indicating whether the event should be canceled. + * Value: true, if the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that will handle the Hiding event. + */ +interface ASPxClientHintHidingEventHandler { + /** + * A method that will handle the Hiding event. + * @param sender The event source. + * @param e A ASPxClientHintHidingEventArgs object that contains the required data. + */ + (sender: ASPxClientHintWindow, e: ASPxClientHintHidingEventArgs): void; +} +/** + * Provides data for the Hiding event. + */ +interface ASPxClientHintHidingEventArgs extends ASPxClientEventArgs { + /** + * Gets the object that is the hint's target element. + * Value: An object representing the hint's target element. + */ + targetElement: Object; + /** + * Gets the object that is the hint element. + * Value: An object representing the hint related to the event. + */ + hintElement: Object; + /** + * Gets the object that is the hint's content. + * Value: An object representing the hint's content element related to the event. + */ + contentElement: Object; + /** + * Gets the object that is the hint's title. + * Value: An object representing the hint's title element related to the event. + */ + titleElement: Object; + /** + * Gets or sets a value indicating whether the event should be canceled. + * Value: true, if the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * The hint control's options. + */ +interface ASPxClientHintOptions { + /** + * Gets or sets which user action triggers a hint. + * Value: A string value that is a user action. + */ + triggerAction: string; + /** + * Gets or sets the delay in displaying the hint. + * Value: An integer value that specifies the time interval, in milliseconds, after which a hint is displayed. + */ + appearAfter: number; + /** + * Gets or sets the duration after which a hint disappears when the mouse pointer is no longer positioned over the target element. + * Value: The length of time (in milliseconds) a hint is displayed after the mouse pointer is no longer positioned over the target element. + */ + disappearAfter: number; + /** + * Gets or sets a value that specifies whether a hint is displayed in a callout box. + * Value: true, to display a hint in a callout box; otherwise, false. + */ + showCallout: boolean; + /** + * Gets or sets where a hint should be positioned. + * Value: A string value that specifies a hint position. + */ + position: string; + /** + * Gets or sets a custom CSS class name that will be assigned to the root ASPxHint element. + * Value: A string value that is the CSS class name. + */ + className: string; + /** + * Gets or sets the attribute name. + * Value: A string value that is the attribute name. + */ + contentAttribute: string; + /** + * Gets or sets the attribute name. + * Value: A string value that is the attribute name. + */ + titleAttribute: string; + /** + * Gets or sets the hint's content. + * Value: A string value that is the hint's content. + */ + content: string; + /** + * Gets or sets a value that is the hint's title. + * Value: A string value that is the title text. + */ + title: string; + /** + * Gets or sets a value that is the HTML DOM-element. + * Value: A string that is the DOM-element. + */ + container: string; + /** + * A handler for the Showing event. + * Value: An delegate method allowing you to implement custom processing. + */ + onShowing: ASPxClientHintShowingEventHandler; + /** + * A handler for the Hiding event. + * Value: An delegate method allowing you to implement custom processing. + */ + onHiding: ASPxClientHintHidingEventHandler; + /** + * Gets or sets a value that is the hint's width. + * Value: A string value that is the hint's width. + */ + width: string; + /** + * Gets or sets a value that is the hint's height. + * Value: A string value that is the hint's height. + */ + height: string; + /** + * Gets or sets the X coordinate. + * Value: An integer value that is the X coordinate. + */ + x: number; + /** + * Gets or sets the Y coordinate. + * Value: An integer value that is the Y coordinate. + */ + y: number; + /** + * Gets or sets a value that specifies whether to flip the hint to the opposite position relative to the target element. + * Value: true, to flip the hint; otherwise, false. + */ + allowFlip: boolean; + /** + * Gets or sets a value that specifies whether to shift a hint if its content and title are hidden outside of the client area. + * Value: true, to shift the hint; otherwise, false. + */ + allowShift: boolean; + /** + * Gets or sets whether it should use animation effects when a hint appears. + * Value: true if animation is enabled; otherwise false. + */ + animation: any; + /** + * Gets the offset of a hint. + * Value: An integer value. + */ + offset: number; +} +/** + * The client-side equivalent of the ASPxImageGallery control. + */ +interface ASPxClientImageGallery extends ASPxClientDataView { + /** + * Fires on the client side before the fullscreen viewer is shown and allows you to cancel the action. + */ + FullscreenViewerShowing: ASPxClientEvent>; + /** + * Occurs on the client side after an active item has been changed within the fullscreen viewer. + */ + FullscreenViewerActiveItemIndexChanged: ASPxClientEvent>; + /** + * Shows the fullscreen viewer with the specified active item. + * @param index An Int32 value that is an index of the active item. + */ + ShowFullscreenViewer(index: number): void; + /** + * Hides the fullscreen viewer. + */ + HideFullscreenViewer(): void; + /** + * Makes the specified item active within the fullscreen viewer on the client side. + * @param index An integer value specifying the index of the item to select. + * @param preventAnimation true to prevent the animation effect; false to change images using animation. + */ + SetFullscreenViewerActiveItemIndex(index: number, preventAnimation: boolean): void; + /** + * Gets the number of items contained in the control's item collection. + */ + GetFullscreenViewerItemCount(): number; + /** + * Returns the index of the active item within the fullscreen viewer. + */ + GetFullscreenViewerActiveItemIndex(): number; + /** + * Plays a slide show within a fullscreen viewer. + */ + PlaySlideShow(): void; + /** + * Pauses a slide show within a fullscreen viewer. + */ + PauseSlideShow(): void; +} +/** + * A method that will handle the client FullscreenViewerShowing event. + */ +interface ASPxClientImageGalleryCancelEventHandler { + /** + * A method that will handle the FullscreenViewerShowing event. + * @param source The event source. Identifies the ASPxImageGallery control that raised the event. + * @param e An ASPxClientImageGalleryCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientImageGalleryCancelEventArgs): void; +} +/** + * Provides data for the FullscreenViewerShowing event. + */ +interface ASPxClientImageGalleryCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the index of the item related to the event. + * Value: An value that is the related item's index. + */ + index: number; + /** + * Gets the unique identifier name of the item related to the event. + * Value: A string value that specifies the item's unique identifier name. + */ + name: string; +} +/** + * A method that will handle the client FullscreenViewerActiveItemIndexChanged event. + */ +interface ASPxClientImageGalleryFullscreenViewerEventHandler { + /** + * A method that will handle the FullscreenViewerActiveItemIndexChanged event. + * @param source The event source. Identifies the ASPxImageGallery control that raised the event. + * @param e An ASPxClientImageGalleryFullscreenViewerEventArgs object that contains event data. + */ + (source: S, e: ASPxClientImageGalleryFullscreenViewerEventArgs): void; +} +/** + * Provides data for the FullscreenViewerActiveItemIndexChanged event. + */ +interface ASPxClientImageGalleryFullscreenViewerEventArgs extends ASPxClientEventArgs { + /** + * Gets the index of the item related to the event. + * Value: An value that is the related item's index. + */ + index: number; + /** + * Gets the unique identifier name of the item related to the event. + * Value: A string value that specifies the item's unique identifier name. + */ + name: string; +} +/** + * A client-side equivalent of the ASPxImageSlider object. + */ +interface ASPxClientImageSlider extends ASPxClientControl { + /** + * Occurs after the active image, displayed within the image area, is changed. + */ + ActiveItemChanged: ASPxClientEvent>; + /** + * Fires after an image item has been clicked within the image area. + */ + ItemClick: ASPxClientEvent>; + /** + * Occurs on the client side when a thumbnail is clicked. + */ + ThumbnailItemClick: ASPxClientEvent>; + /** + * Returns an item specified by its index within the image slider's item collection. + * @param index An integer value specifying the zero-based index of the item to be retrieved. + */ + GetItem(index: number): ASPxClientImageSliderItem; + /** + * Returns an item specified by its name. + * @param name A string value specifying the name of the item. + */ + GetItemByName(name: string): ASPxClientImageSliderItem; + /** + * Returns the index of the active item within the image slider control. + */ + GetActiveItemIndex(): number; + /** + * Makes the specified item active within the image slider control on the client side. + * @param index An integer value specifying the index of the item to select. + * @param preventAnimation true to prevent the animation effect; false to change images using animation. + */ + SetActiveItemIndex(index: number, preventAnimation: boolean): void; + /** + * Returns the active item within the ASPxImageSlider control. + */ + GetActiveItem(): ASPxClientImageSliderItem; + /** + * Makes the specified item active within the image slider control on the client side. + * @param item An ASPxClientImageSliderItem object specifying the item to select. + * @param preventAnimation true to prevent animation effect; false to enable animation. + */ + SetActiveItem(item: ASPxClientImageSliderItem, preventAnimation: boolean): void; + /** + * Gets the number of items contained in the control's item collection. + */ + GetItemCount(): number; + /** + * Sets input focus to the ASPxImageSlider control. + */ + Focus(): void; + /** + * Plays a slide show within an image slider. + */ + Play(): void; + /** + * Pauses a slide show within image slider. + */ + Pause(): void; + /** + * Gets a value indicating whether the slide show is playing. + */ + IsSlideShowPlaying(): boolean; +} +/** + * A method that will handle the ItemClick events. + */ +interface ASPxClientImageSliderItemEventHandler { + /** + * A method that will handle the ItemClick events. + * @param source The event source. Identifies the ASPxImageSlider control that raised the event. + * @param e An ASPxClientImageSliderItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientImageSliderItemEventArgs): void; +} +/** + * Provides data for the ItemClick events. + */ +interface ASPxClientImageSliderItemEventArgs extends ASPxClientEventArgs { + /** + * Gets an item object related to the event. + * Value: An object, manipulations on which forced the event to be raised. + */ + item: ASPxClientImageSliderItem; +} +/** + * A client-side equivalent of the image slider's ImageSliderItem object. + */ +interface ASPxClientImageSliderItem { + /** + * Gets an image slider to which the current item belongs. + * Value: An object that is the item's owner. + */ + imageSlider: ASPxClientImageSlider; + /** + * Gets the item's index within an items collection. + * Value: An integer value is the item's zero-based index within the Items collection. + */ + index: number; + /** + * Gets the name that uniquely identifies the image slider item. + * Value: A string value that is the value assigned to the item's Name property. + */ + name: string; + /** + * Gets or sets the path to the image displayed within the ASPxClientImageSliderItem. + * Value: A value specifying the path to the image. + */ + imageUrl: string; + /** + * Gets the item's display text. + * Value: A string value that is the item's display text. + */ + text: string; +} +/** + * The client-side equivalent of the ASPxImageZoomNavigator object. + */ +interface ASPxClientImageZoomNavigator extends ASPxClientImageSlider { +} +/** + * A client-side equivalent of the ASPxImageZoom object. + */ +interface ASPxClientImageZoom extends ASPxClientControl { + /** + * Sets the properties on an image displayed in the image zoom control. + * @param imageUrl A string value specifying the path to the preview image displayed in the preview image. + * @param largeImageUrl A string value specifying the path to the preview image displayed in the zoom window and the expand window. + * @param zoomWindowText A string value specifying the text displayed in the zoom window. + * @param expandWindowText A string value specifying the text displayed in the expand window. + * @param alternateText A string value that specifies the alternate text displayed instead of the image. + */ + SetImageProperties(imageUrl: string, largeImageUrl: string, zoomWindowText: string, expandWindowText: string, alternateText: string): void; +} +/** + * Represents a client-side equivalent of the ASPxLoadingPanel control. + */ +interface ASPxClientLoadingPanel extends ASPxClientControl { + /** + * Invokes the loading panel. + */ + Show(): void; + /** + * Invokes the loading panel, displaying it over the specified HTML element. + * @param htmlElement An object that specifies the required HTML element. + */ + ShowInElement(htmlElement: Object): void; + /** + * Invokes the loading panel, displaying it over the specified element. + * @param id A string that specifies the required element's identifier. + */ + ShowInElementByID(id: string): void; + /** + * Invokes the loading panel at the specified position. + * @param x An integer value specifying the x-coordinate of the loading panel's display position. + * @param y An integer value specifying the y-coordinate of the loaidng panel's display position. + */ + ShowAtPos(x: number, y: number): void; + /** + * Sets the text to be displayed within the ASPxLoadingPanel. + * @param text A string value specifying the text to be displayed within the ASPxLoadingPanel. + */ + SetText(text: string): void; + /** + * Gets the text displayed within the ASPxLoadingPanel. + */ + GetText(): string; + /** + * Hides the loading panel. + */ + Hide(): void; +} +/** + * Represents the client-side equivalent of the area that is used within the Html Editor's media dialogs. + */ +interface ASPxClientMediaFileSelector extends ASPxClientControl { + /** + * Returns a URL text from the URL text box in Html Editor's media dialogs. + */ + GetUrl(): string; + /** + * Sets a URL text in the Html Editor's media dialogs. + * @param url A string value that is the Url text. + */ + SetUrl(url: string): void; +} +/** + * Serves as the base type for the ASPxClientPopupMenu objects. + */ +interface ASPxClientMenuBase extends ASPxClientControl { + /** + * Fires after a menu item has been clicked. + */ + ItemClick: ASPxClientEvent>; + /** + * Occurs on the client side when the mouse cursor is moved into a menu item. + */ + ItemMouseOver: ASPxClientEvent>; + /** + * Occurs on the client side when the mouse cursor moves outside a menu item. + */ + ItemMouseOut: ASPxClientEvent>; + /** + * Occurs on the client side when a submenu pops up. + */ + PopUp: ASPxClientEvent>; + /** + * Occurs on the client side when a submenu closes. + */ + CloseUp: ASPxClientEvent>; + /** + * Returns the number of menu items at the root menu level. + */ + GetItemCount(): number; + /** + * Returns the menu's root menu item specified by its index. + * @param index An integer value specifying the zero-based index of the root menu item to be retrieved. + */ + GetItem(index: number): ASPxClientMenuItem; + /** + * Returns a menu item specified by its name. + * @param name A string value specifying the name of the menu item. + */ + GetItemByName(name: string): ASPxClientMenuItem; + /** + * Returns the selected item within the menu control. + */ + GetSelectedItem(): ASPxClientMenuItem; + /** + * Selects the specified menu item within a menu control on the client side. + * @param item An ASPxClientMenuItem object specifying the menu item to select. + */ + SetSelectedItem(item: ASPxClientMenuItem): void; + /** + * Returns a root menu item. + */ + GetRootItem(): ASPxClientMenuItem; +} +/** + * 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. + */ + HideAll(): void; +} +/** + * Represents a client-side equivalent of the ASPxMenu object. + */ +interface ASPxClientMenu extends ASPxClientMenuBase { + /** + * Gets a value specifying the menu orientation. + */ + GetOrientation(): string; + /** + * Sets the menu orientation. + * @param orientation 'Vertical' to orient the menu vertically; 'Horizontal' to orient the menu horizontally. + */ + SetOrientation(orientation: string): void; +} +/** + * A method that will handle the menu's client events concerning manipulations with an item. + */ +interface ASPxClientMenuItemEventHandler { + /** + * A method that will handle the menu's client events concerning manipulations with an item. + * @param source The event source. This parameter identifies the menu object which raised the event. + * @param e An ASPxClientMenuItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientMenuItemEventArgs): void; +} +/** + * Provides data for events which concern manipulations on menu items. + */ +interface ASPxClientMenuItemEventArgs extends ASPxClientEventArgs { + /** + * Gets the menu item object related to the event. + * Value: An ASPxClientMenuItem object, manipulations on which forced the event to be raised. + */ + item: ASPxClientMenuItem; +} +/** + * A method that will handle client events which relate to mouse hovering (such as entering or leaving) over menu items. + */ +interface ASPxClientMenuItemMouseEventHandler { + /** + * A method that will handle the ItemMouseOver events. + * @param source An object representing the event source. + * @param e A MenuItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientMenuItemMouseEventArgs): void; +} +/** + * Provides data for client events which relate to mouse hovering (such as entering or leaving) over menu items. + */ +interface ASPxClientMenuItemMouseEventArgs extends ASPxClientMenuItemEventArgs { + /** + * Gets the HTML object that contains the processed item. + * Value: An HTML object representing a container for the item related to the event. + */ + htmlElement: Object; +} +/** + * A method that will handle client events concerning clicks on the control's items. + */ +interface ASPxClientMenuItemClickEventHandler { + /** + * A method that will handle client ItemClick events. + * @param source An object representing the event source. + * @param e A MenuItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientMenuItemClickEventArgs): void; +} +/** + * Provides data for events which concern clicking on the control's items. + */ +interface ASPxClientMenuItemClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the menu item object related to the event. + * Value: An ASPxClientMenuItem object, manipulations on which forced the event to be raised. + */ + item: ASPxClientMenuItem; + /** + * Gets the HTML object that contains the processed item. + * Value: An object representing a container for the item related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * Contains options affecting the touch scrolling functionality. + */ +interface ASPxClientTouchUIOptions { + /** + * Gets or sets a value that specifies whether or not the horizontal scroll bar should be displayed. + * Value: true to display the horizontal scroll bar; otherwise, false. The default value is true. + */ + showHorizontalScrollbar: boolean; + /** + * Gets or sets a value that specifies whether or not the vertical scroll bar should be displayed. + * Value: true to display the vertical scroll bar; otherwise, false. The default value is true. + */ + showVerticalScrollbar: boolean; + /** + * Gets or sets the name of the CSS class defining the vertical scroll bar's appearance. + * Value: A string value specifying the class name. + */ + vScrollClassName: string; + /** + * Gets or sets the name of the CSS class defining the horizontal scroll bar's appearance. + * Value: A string value specifying the class name. + */ + hScrollClassName: string; +} +/** + * Contains a method allowing you to apply the current scroll extender to a specific element. + */ +interface ScrollExtender { + /** + * Applies the current scroll extender to the element specified by the ID. + * @param id A string value specifying the element's ID. + */ + ChangeElement(id: string): void; + /** + * Applies the current scroll extender to the specified DOM element. + * @param element An object specifying the required DOM element. + */ + ChangeElement(element: Object): void; +} +/** + * Represents a client-side equivalent of the ASPxNavBar control. + */ +interface ASPxClientNavBar extends ASPxClientControl { + /** + * Fires after an item has been clicked. + */ + ItemClick: ASPxClientEvent>; + /** + * Fires on the client side after a group's expansion state has been changed. + */ + ExpandedChanged: ASPxClientEvent>; + /** + * Fires on the client side before the expansion state of a group is changed. + */ + ExpandedChanging: ASPxClientEvent>; + /** + * Fires when a group header is clicked. + */ + HeaderClick: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientNavBar. + */ + CallbackError: ASPxClientEvent>; + /** + * Returns the number of groups in the navbar. + */ + GetGroupCount(): number; + /** + * Returns a group specified by its index. + * @param index An integer value specifying the zero-based index of the group object to retrieve. + */ + GetGroup(index: number): ASPxClientNavBarGroup; + /** + * Returns a group specified by its name. + * @param name A string value specifying the name of the group. + */ + GetGroupByName(name: string): ASPxClientNavBarGroup; + /** + * Returns the navbar's active group. + */ + GetActiveGroup(): ASPxClientNavBarGroup; + /** + * Makes the specified group active. + * @param group A ASPxClientNavBarGroup object that specifies the active group. + */ + SetActiveGroup(group: ASPxClientNavBarGroup): void; + /** + * Returns an item specified by its name. + * @param name A string value specifying the name of the item. + */ + GetItemByName(name: string): ASPxClientNavBarItem; + /** + * Returns the selected item within the navbar control. + */ + GetSelectedItem(): ASPxClientNavBarItem; + /** + * Selects the specified item within the navbar control on the client side. + * @param item An ASPxClientNavBarItem object specifying the item to select. + */ + SetSelectedItem(item: ASPxClientNavBarItem): void; + /** + * Collapses all groups of the navbar. + */ + CollapseAll(): void; + /** + * Expands all groups of the navbar. + */ + ExpandAll(): void; +} +/** + * Represents a client-side equivalent of the navbar's NavBarGroup object. + */ +interface ASPxClientNavBarGroup { + /** + * Gets the navbar to which the current group belongs. + * Value: An ASPxClientNavBar object representing the navbar to which the group belongs. + */ + navBar: ASPxClientNavBar; + /** + * Gets the group's index within a collection of a navbar's groups. + * Value: An integer value representing the group's zero-based index within the Groups collection of the navbar to which the group belongs. + */ + index: number; + /** + * Gets the name that uniquely identifies the group. + * Value: A string value that represents the value assigned to the group's Name property. + */ + name: string; + /** + * Returns a value specifying whether a group is enabled. + */ + GetEnabled(): boolean; + /** + * Returns a value specifying whether the group is expanded. + */ + GetExpanded(): boolean; + /** + * Sets the group's expansion state. + * @param value true to expand the group; false to collapse the group. + */ + SetExpanded(value: boolean): void; + /** + * Returns a value specifying whether a group is displayed. + */ + GetVisible(): boolean; + /** + * Returns text displayed within a group. + */ + GetText(): string; + /** + * Specifies the text displayed within a group. + * @param text A string value that is the text displayed within the navbar group. + */ + SetText(text: string): void; + /** + * Specifies whether the group is visible. + * @param value true if the group is visible; otherwise, false. + */ + SetVisible(value: boolean): void; + /** + * Returns the number of items in the group. + */ + GetItemCount(): number; + /** + * Returns the group's item specified by its index. + * @param index An integer value specifying the zero-based index of the item to be retrieved. + */ + GetItem(index: number): ASPxClientNavBarItem; + /** + * Returns a group item specified by its name. + * @param name A string value specifying the name of the item. + */ + GetItemByName(name: string): ASPxClientNavBarItem; +} +/** + * Represents a client-side equivalent of the navbar's NavBarItem object. + */ +interface ASPxClientNavBarItem { + /** + * Gets the navbar to which the current item belongs. + * Value: An ASPxClientNavBar object representing the navbar to which the item belongs. + */ + navBar: ASPxClientNavBar; + /** + * Gets the group to which the current item belongs. + * Value: An ASPxClientNavBarGroup object representing the group to which the item belongs. + */ + group: ASPxClientNavBarGroup; + /** + * Gets the item's index within a collection of a group's items. + * Value: An integer value representing the item's zero-based index within the Items collection of the group to which the item belongs. + */ + index: number; + /** + * Gets the name that uniquely identifies the item. + * Value: A string value that represents the value assigned to the item's Name property. + */ + name: string; + /** + * Returns a value indicating whether an item is enabled. + */ + GetEnabled(): boolean; + /** + * Specifies whether the item is enabled. + * @param value true if the item is enabled; otherwise, false. + */ + SetEnabled(value: boolean): void; + /** + * Returns the URL which points to the image displayed within the item. + */ + GetImageUrl(): string; + /** + * Specifies the URL which points to the image displayed within the item. + * @param value A string value that specifies the URL to the image displayed within the item. + */ + SetImageUrl(value: string): void; + /** + * Gets an URL which defines the item's navigation location. + */ + GetNavigateUrl(): string; + /** + * Specifies a URL which defines the item's navigation location. + * @param value A string value which represents the URL to where the client web browser will navigate when the item is clicked. + */ + SetNavigateUrl(value: string): void; + /** + * Returns text displayed within the item. + */ + GetText(): string; + /** + * Specifies the text displayed within the item. + * @param value A string value that represents the text displayed within the item. + */ + SetText(value: string): void; + /** + * Returns a value specifying whether an item is displayed. + */ + GetVisible(): boolean; + /** + * Specifies whether the item is visible. + * @param value true is the item is visible; otherwise, false. + */ + SetVisible(value: boolean): void; +} +/** + * A method that will handle the navbar's client events concerning manipulations with an item. + */ +interface ASPxClientNavBarItemEventHandler { + /** + * A method that will handle the navbar's client events concerning manipulations with an item. + * @param source An object representing the event's source. Identifies the navbar object that raised the event. + * @param e An ASPxClientNavBarItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientNavBarItemEventArgs): void; +} +/** + * Provides data for events which concern manipulations on items. + */ +interface ASPxClientNavBarItemEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the item object related to the event. + * Value: An ASPxClientNavBarItem object, manipulations on which forced the event to be raised. + */ + item: ASPxClientNavBarItem; + /** + * Gets the HTML object that contains the processed navbar item. + * Value: An object representing a container for the navbar item related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * A method that will handle the navbar's client events concerning manipulations with a group. + */ +interface ASPxClientNavBarGroupEventHandler { + /** + * A method that will handle the navbar's client events concerning manipulations with a group. + * @param source An object representing the event's source. Identifies the navbar object that raised the event. + * @param e An ASPxClientNavBarGroupEventArgs object that contains event data. + */ + (source: S, e: ASPxClientNavBarGroupEventArgs): void; +} +/** + * Provides data for events which concern manipulations on groups. + */ +interface ASPxClientNavBarGroupEventArgs extends ASPxClientEventArgs { + /** + * Gets the group object related to the event. + * Value: An ASPxClientNavBarGroup object, manipulations on which forced the event to be raised. + */ + group: ASPxClientNavBarGroup; +} +/** + * A method that will handle the navbar's cancelable client events concerning manipulations with a group. + */ +interface ASPxClientNavBarGroupCancelEventHandler { + /** + * A method that will handle the navbar's cancelable client events concerning manipulations with a group. + * @param source An object representing the event's source. Identifies the navbar object that raised the event. + * @param e An ASPxClientNavBarGroupCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientNavBarGroupCancelEventArgs): void; +} +/** + * Provides data for cancellable events which concern manipulations on groups. + */ +interface ASPxClientNavBarGroupCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets the group object related to the event. + * Value: An ASPxClientNavBarGroup object representing the group manipulations on which forced the navbar to raise the event. + */ + group: ASPxClientNavBarGroup; +} +/** + * A method that will handle client events concerning clicks on the control's group headers. + */ +interface ASPxClientNavBarGroupClickEventHandler { + /** + * A method that will handle the navbar's client events concerning clicks on groups. + * @param source The event source. This parameter identifies the navbar object which raised the event. + * @param e An ASPxClientNavBarGroupClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientNavBarGroupClickEventArgs): void; +} +/** + * Provides data for events which concern clicking on the control's group headers. + */ +interface ASPxClientNavBarGroupClickEventArgs extends ASPxClientNavBarGroupCancelEventArgs { + /** + * Gets the HTML object that contains the processed group. + * Value: An object representing a container for the group related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * Represents a client-side equivalent of the ASPxNewsControl object. + */ +interface ASPxClientNewsControl extends ASPxClientDataView { + /** + * Fires after an item's tail has been clicked. + */ + TailClick: ASPxClientEvent>; +} +/** + * A method that will handle client events concerning manipulations with an item. + */ +interface ASPxClientNewsControlItemEventHandler { + /** + * A method that will handle the news control's client events concerning manipulations with an item. + * @param source An object representing the event's source. Identifies the news control object that raised the event. + * @param e An ASPxClientNewsControlItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientNewsControlItemEventArgs): void; +} +/** + * Provides data for events which concern tail clicking within the control's items. + */ +interface ASPxClientNewsControlItemEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the name that uniquely identifies the processed item. + * Value: A string value that represents the value assigned to the processed item's Name property. + */ + name: Object; + /** + * Gets the HTML object that contains the processed item. + * Value: An object representing a container for the item related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * Represents a client-side equivalent of the ASPxObjectContainer control. + */ +interface ASPxClientObjectContainer extends ASPxClientControl { + /** + * Occurs on the client side when the FSCommand action is called within the associated flash object's action script. + */ + FlashScriptCommand: ASPxClientEvent>; + /** + * Play the Flash movie backwards. + */ + Back(): void; + /** + * Returns the value of the Flash variable specified. + * @param name A string value that specifies the Flash variable. + */ + GetVariable(name: string): string; + /** + * Play the Flash movie forwards. + */ + Forward(): void; + /** + * Activates the specified frame in the Flash movie. + * @param frameNumber An integer value that specifies the requested frame. + */ + GotoFrame(frameNumber: number): void; + /** + * Indicates whether the Flash movie is currently playing. + */ + IsPlaying(): boolean; + /** + * Loads the Flash movie to the specified layer. + * @param layerNumber An integer value that identifies a layer in which to load the movie. + * @param url A string value that specifies the movie's URL. + */ + LoadMovie(layerNumber: number, url: string): void; + /** + * Pans a zoomed-in Flash movie to the specified coordinates. + * @param x An integer value that specifies the X-coordinate. + * @param y An integer value that specifies the Y-coordinate. + * @param mode 0 the coordinates are pixels; 1 the coordinates are a percentage of the window. + */ + Pan(x: number, y: number, mode: number): void; + /** + * Returns the percent of the Flash Player movie that has streamed into the browser so far. + */ + PercentLoaded(): string; + /** + * Starts playing the Flash movie. + */ + Play(): void; + /** + * Rewinds the Flash movie to the first frame. + */ + Rewind(): void; + /** + * Sets the value of the specified Flash variable. + * @param name A string value that specifies the Flash variable. + * @param value A string value that represents a new value. + */ + SetVariable(name: string, value: string): void; + /** + * Zooms in on the specified rectangular area of the Flash movie. + * @param left An integer value that specifies the x-coordinate of the rectangle's left side, in twips. + * @param top An integer value that specifies the y-coordinate of the rectangle's top side, in twips. + * @param right An integer value that specifies the x-coordinate of the rectangle's right side, in twips. + * @param bottom An integer value that specifies the y-coordinate of the rectangle's bottom side, in twips. + */ + SetZoomRect(left: number, top: number, right: number, bottom: number): void; + /** + * Stops playing the Flash movie. + */ + StopPlay(): void; + /** + * Returns the total number of frames in the Flash movie. + */ + TotalFrames(): number; + /** + * Zooms the Flash view by a relative scale factor. + * @param percent An integer value that specifies the relative scale factor, as a percentage. + */ + Zoom(percent: number): void; + /** + * Starts playing a Quick Time movie. + */ + QTPlay(): void; + /** + * Stops playing a Quick Time movie. + */ + QTStopPlay(): void; + /** + * Rewinds a Quick Time movie to the first frame. + */ + QTRewind(): void; + /** + * Steps through a Quick Time video stream by a specified number of frames. + * @param count An integer value that specifies the number of frames to step. + */ + QTStep(count: number): void; +} +/** + * A method that will handle the FlashScriptCommand event. + */ +interface ASPxClientFlashScriptCommandEventHandler { + /** + * A method that will handle the FlashScriptCommand event. + * @param source The event source. + * @param e A ASPxClientFlashScriptCommandEventArgs object that contains event data. + */ + (source: S, e: ASPxClientFlashScriptCommandEventArgs): void; +} +/** + * Provides data for the FlashScriptCommand client event. + */ +interface ASPxClientFlashScriptCommandEventArgs extends ASPxClientEventArgs { + /** + * Gets a command passed via the FSCommand action of the flash object. + * Value: A string that represents the value of the FSCommand action's command parameter. + */ + command: string; + /** + * Gets arguments passed via the FSCommand action of the flash object. + * Value: A string that represents the value of the FSCommand action's args parameter. + */ + args: string; +} +/** + * Lists the available link types within office documents. + */ +interface ASPxClientOfficeDocumentLinkType { +} +/** + * Represents the client-side equivalent of the ASPxPager control. + */ +interface ASPxClientPager extends ASPxClientControl { +} +/** + * Represents a client-side equivalent of the ASPxPopupControl control. + */ +interface ASPxClientPopupControl extends ASPxClientPopupControlBase { + /** + * Occurs when a popup window's close button is clicked. + */ + CloseButtonClick: ASPxClientEvent>; + /** + * This method is not in effect for a ASPxClientPopupControl object. + */ + GetMainElement(): Object; + /** + * Returns an object containing the information about a mouse event that invoked a default popup window. + */ + GetPopUpReasonMouseEvent(): Object; + /** + * Returns an object containing the information about a mouse event that invoked the specified popup window. + * @param window A ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowPopUpReasonMouseEvent(window: ASPxClientPopupWindow): Object; + /** + * + * @param window + * @param parameter + */ + PerformWindowCallback(window: ASPxClientPopupWindow, parameter: string): void; + /** + * 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; + /** + * Specifies the default popup window's size. + * @param width An integer value that specifies the default popup window's width. + * @param height An integer value that specifies the default popup window's height. + */ + SetSize(width: number, height: number): void; + /** + * Gets the width of the specified popup window's content region. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowContentWidth(window: ASPxClientPopupWindow): number; + /** + * Gets the height of the specified popup window's content region. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowContentHeight(window: ASPxClientPopupWindow): number; + /** + * Returns the height of a specific popup window. + * @param window A ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowHeight(window: ASPxClientPopupWindow): number; + /** + * Returns the width of a specific popup window. + * @param window A ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowWidth(window: ASPxClientPopupWindow): number; + /** + * Specifies the size of a specific popup window. + * @param window A ASPxClientPopupWindow object that specifies the required popup window. + * @param width An integer value that specifies the required popup window's width. + * @param height An integer value that specifies the required popup window's height. + */ + SetWindowSize(window: ASPxClientPopupWindow, width: number, height: number): void; + /** + * Returns the HTML code that is the content of the popup control's default popup window. + */ + GetContentHTML(): string; + /** + * Defines the HTML content for the popup control's default popup window. + * @param html A string value that is the HTML code defining the content of the popup window. + */ + SetContentHTML(html: string): void; + /** + * Sets the ID of a web control or HTML element (or a list of IDs) with which the current popup control's window is associated. + * @param window An ASPxClientPopupWindow object representing a popup control's window. + * @param popupElementId A string value specifying the ID (or a list of IDs) of the web control or HTML element with which the popup control's window is associated. + */ + SetWindowPopupElementID(window: ASPxClientPopupWindow, popupElementId: string): void; + /** + * Sets the ID of a web control or HTML element (or a list of IDs) with which the current popup control is associated. + * @param popupElementId A string value specifying the ID (or a list of IDs) of the web control or HTML element to which the popup control is associated. + */ + SetPopupElementID(popupElementId: string): void; + /** + * Returns an index of the object that invoked the default window within the PopupElementID list. + */ + GetCurrentPopupElementIndex(): number; + /** + * Returns an index of the object that invoked the specified popup window, within the window's PopupElementID list. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowCurrentPopupElementIndex(window: ASPxClientPopupWindow): number; + /** + * Returns an object that invoked the default window. + */ + GetCurrentPopupElement(): Object; + /** + * Returns an object that invoked the specified popup window. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowCurrentPopupElement(window: ASPxClientPopupWindow): Object; + /** + * Returns a value that specifies whether the popup control's specific window is displayed. + * @param window A ASPxClientPopupWindow object representing the popup window whose visibility is checked. + */ + IsWindowVisible(window: ASPxClientPopupWindow): boolean; + /** + * Returns a popup window specified by its index. + * @param index An integer value specifying the zero-based index of the popup window object to be retrieved. + */ + GetWindow(index: number): ASPxClientPopupWindow; + /** + * Returns a popup window specified by its name. + * @param name A string value specifying the name of the popup window. + */ + GetWindowByName(name: string): ASPxClientPopupWindow; + /** + * Returns the number of popup windows in the popup control. + */ + GetWindowCount(): number; + /** + * Invokes the popup control's specific window. + * @param window A ASPxClientPopupWindow object representing the popup window to display. + */ + ShowWindow(window: ASPxClientPopupWindow): void; + /** + * Invokes the specified popup window at the popup element with the specified index. + * @param window A ASPxClientPopupWindow object that specifies the required popup window. + * @param popupElementIndex An integer value specifying the zero-based index of the popup element within the window's PopupElementID list. + */ + ShowWindow(window: ASPxClientPopupWindow, popupElementIndex: number): void; + /** + * Invokes the popup control's specific window and displays it over the specified HTML element. + * @param window A ASPxClientPopupWindow object representing the popup window to display. + * @param htmlElement An object specifying the HTML element relative to whose position the default popup window is invoked. + */ + ShowWindowAtElement(window: ASPxClientPopupWindow, htmlElement: Object): void; + /** + * Invokes the popup control's specific window and displays it over an HTML element specified by its unique identifier. + * @param window A ASPxClientPopupWindow object representing the popup window to display. + * @param id A string value that specifies the hierarchically qualified identifier of an HTML element relative to whose position the default popup window is invoked. + */ + ShowWindowAtElementByID(window: ASPxClientPopupWindow, id: string): void; + /** + * Invokes the popup control's specific popup window at the specified position. + * @param window A ASPxClientPopupWindow object representing the popup window to display. + * @param x A integer value specifying the x-coordinate of the popup window's display position. + * @param y A integer value specifying the y-coordinate of the popup window's display position. + */ + ShowWindowAtPos(window: ASPxClientPopupWindow, x: number, y: number): void; + /** + * Brings the specified popup window to the front of the z-order. + * @param window A ASPxClientPopupWindow object representing the popup window. + */ + BringWindowToFront(window: ASPxClientPopupWindow): void; + /** + * Closes the popup control's specified window. + * @param window A ASPxClientPopupWindow object representing the popup window to close. + */ + HideWindow(window: ASPxClientPopupWindow): void; + /** + * Returns the HTML code that represents the contents of the specified popup window. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + */ + GetWindowContentHtml(window: ASPxClientPopupWindow): string; + /** + * Defines the HTML content for a specific popup window within the popup control. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + * @param html A string value that represents the HTML code defining the content of the specified popup window. + */ + SetWindowContentHtml(window: ASPxClientPopupWindow, html: string): void; + /** + * Returns an iframe object containing a web page specified via the specified popup window's SetWindowContentUrl client method). + * @param window A ASPxClientPopupWindow object representing the required popup window. + */ + GetWindowContentIFrame(window: ASPxClientPopupWindow): Object; + /** + * Returns the URL pointing to the web page displayed within the control's specific popup window. + * @param window A ASPxClientPopupWindow object representing the required popup window. + */ + GetWindowContentUrl(window: ASPxClientPopupWindow): string; + /** + * Sets the URL pointing to the web page that should be loaded into and displayed within the control's specific popup window. + * @param window A ASPxClientPopupWindow object representing the required popup window. + * @param url A string value specifying the URL to the web page to be displayed within the specified popup window. + */ + SetWindowContentUrl(window: ASPxClientPopupWindow, url: string): void; + /** + * Returns a value indicating whether the specified window is pinned. + * @param window An ASPxClientPopupWindow object specifying the popup window. + */ + GetWindowPinned(window: ASPxClientPopupWindow): boolean; + /** + * Sets a value indicating whether the specified window is pinned. + * @param window An ASPxClientPopupWindow object specifying the popup window. + * @param value true to pin the window; otherwise, false. + */ + SetWindowPinned(window: ASPxClientPopupWindow, value: boolean): void; + /** + * Returns a value indicating whether the specified window is maximized. + * @param window An ASPxClientPopupWindow object specifying the popup window. + */ + GetWindowMaximized(window: ASPxClientPopupWindow): boolean; + /** + * Sets a value indicating whether the specified window is maximized. + * @param window An ASPxClientPopupWindow object specifying the popup window. + * @param value true to maximize the window; otherwise, false. + */ + SetWindowMaximized(window: ASPxClientPopupWindow, value: boolean): void; + /** + * Returns a value indicating whether the specified window is collapsed. + * @param window An ASPxClientPopupWindow object specifying the popup window. + */ + GetWindowCollapsed(window: ASPxClientPopupWindow): boolean; + /** + * Sets a value indicating whether the specified window is collapsed. + * @param window An ASPxClientPopupWindow object specifying the popup window. + * @param value true to collapse the window; otherwise, false. + */ + SetWindowCollapsed(window: ASPxClientPopupWindow, value: boolean): void; + /** + * Refreshes the content of the web page displayed within the control's specific popup window. + * @param window A ASPxClientPopupWindow object representing the required popup window. + */ + RefreshWindowContentUrl(window: ASPxClientPopupWindow): void; + /** + * Updates the default popup window's position, to correctly align it at either the specified element, or the center of the browser's window. + */ + UpdatePosition(): void; + /** + * Updates the default popup window's position, to correctly align it at the specified HTML element. + * @param htmlElement An object specifying the HTML element to which the default popup window is aligned using the PopupVerticalAlign properties. + */ + UpdatePositionAtElement(htmlElement: Object): void; + /** + * Updates the specified popup window's position, to correctly align it at either the specified element, or the center of the browser's window. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + */ + UpdateWindowPosition(window: ASPxClientPopupWindow): void; + /** + * Updates the specified popup window's position, to correctly align it at the specified HTML element. + * @param window An ASPxClientPopupWindow object that specifies the required popup window. + * @param htmlElement An object specifying the HTML element to which the specified popup window is aligned using the PopupVerticalAlign properties. + */ + UpdateWindowPositionAtElement(window: ASPxClientPopupWindow, htmlElement: Object): void; + /** + * Refreshes the connection between the ASPxPopupControl and the popup element. + */ + RefreshPopupElementConnection(): void; +} +/** + * Represents a client-side equivalent of a popup control's PopupWindow object. + */ +interface ASPxClientPopupWindow { + /** + * Gets the popup control to which the current popup window belongs. + * Value: An ASPxClientPopupControl object representing the popup control to which the window belongs. + */ + popupControl: ASPxClientPopupControl; + /** + * Gets the index of the current popup window within the popup control's Windows collection. + * Value: An integer value representing the zero-based index of the current popup window within the Windows collection of the popup control to which the window belongs. + */ + index: number; + /** + * Gets the name that uniquely identifies the current popup window. + * Value: A string value that represents a value assigned to the popup window's Name property. + */ + name: string; + /** + * Returns the URL pointing to the image displayed within the window header. + */ + GetHeaderImageUrl(): string; + /** + * Specifies the URL which points to the image displayed within the window header. + * @param value A string value that is the URL to the image displayed within the header. + */ + SetHeaderImageUrl(value: string): void; + /** + * Returns the URL pointing to the image displayed within the window footer. + */ + GetFooterImageUrl(): string; + /** + * Specifies the URL which points to the image displayed within the window footer. + * @param value A string value that is the URL to the image displayed within the window footer. + */ + SetFooterImageUrl(value: string): void; + /** + * Returns the URL where the web browser will navigate when the text or image is clicked within the popup window's header. + */ + GetHeaderNavigateUrl(): string; + /** + * Returns the URL where the web browser will navigate when the text or image is clicked within the popup window's header. + * @param value A string value which specifies the required navigation location. + */ + SetHeaderNavigateUrl(value: string): void; + /** + * Returns the URL where the web browser will navigate when the text or image is clicked within the popup window's footer. + */ + GetFooterNavigateUrl(): string; + /** + * Specifies the URL where the web browser will navigate when the text or image is clicked within the popup window's footer. + * @param value A string value which specifies the required navigation location. + */ + SetFooterNavigateUrl(value: string): void; + /** + * Returns the text displayed within the window's header. + */ + GetHeaderText(): string; + /** + * Specifies the text displayed within the window's header. + * @param value A string value that specifies the window's header text. + */ + SetHeaderText(value: string): void; + /** + * Returns the text displayed within the popup window's footer. + */ + GetFooterText(): string; + /** + * Specifies the text displayed within the window's footer. + * @param value A string value that specifies the window's footer text. + */ + SetFooterText(value: string): void; +} +/** + * A method that will handle the popup control's client events invoked in response to manipulating a popup window. + */ +interface ASPxClientPopupWindowEventHandler { + /** + * A method that will handle the popup control's client events when a popup window is manipulated. + * @param source An object representing the event's source. Identifies the popup control object (ASPxClientPopupControl) that raised the event. + * @param e An ASPxClientPopupWindowEventArgs object that contains event data. + */ + (source: S, e: ASPxClientPopupWindowEventArgs): void; +} +/** + * Provides data for events concerning client manipulations on popup windows. + */ +interface ASPxClientPopupWindowEventArgs extends ASPxClientEventArgs { + /** + * Gets the popup window object related to the event. + * Value: An ASPxClientPopupWindow object representing the popup window that was manipulated, causing the popup control to raise the event. + */ + window: ASPxClientPopupWindow; +} +/** + * A method that will handle the popup window's cancellable client events, such as the Closing. + */ +interface ASPxClientPopupWindowCancelEventHandler { + /** + * A method that will handle the popup window's cancelable client events. + * @param source An object representing the event's source. Identifies the popup window object that raised the event. + * @param e An ASPxClientPopupWindowCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientPopupWindowCancelEventArgs): void; +} +/** + * Provides data for the popup control's cancellable client events, such as the Closing. + */ +interface ASPxClientPopupWindowCancelEventArgs extends ASPxClientCancelEventArgs { + /** + * Gets the popup window object related to the event. + * Value: An ASPxClientPopupWindow object representing the popup window that was manipulated, causing the popup control to raise the event. + */ + window: ASPxClientPopupWindow; + /** + * Gets the value that identifies the reason the popup window is about to close. + * Value: One of the ASPxClientPopupControlCloseReason enumeration values. + */ + closeReason: ASPxClientPopupControlCloseReason; +} +/** + * A method that will handle the CloseUp event. + */ +interface ASPxClientPopupWindowCloseUpEventHandler { + /** + * A method that will handle the CloseUp event. + * @param source The event source. + * @param e An ASPxClientPopupWindowCloseUpEventArgs object that contains event data. + */ + (source: S, e: ASPxClientPopupWindowCloseUpEventArgs): void; +} +/** + * Provides data for the CloseUp event. + */ +interface ASPxClientPopupWindowCloseUpEventArgs extends ASPxClientPopupWindowEventArgs { + /** + * Gets the value that identifies the reason the popup window closes. + * Value: One of the ASPxClientPopupControlCloseReason enumeration values. + */ + closeReason: ASPxClientPopupControlCloseReason; +} +/** + * A method that will handle the Resize event. + */ +interface ASPxClientPopupWindowResizeEventHandler { + /** + * A method that will handle the Resize event. + * @param source The event source. + * @param e A ASPxClientPopupWindowResizeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientPopupWindowResizeEventArgs): void; +} +/** + * Provides data for the Resize event. + */ +interface ASPxClientPopupWindowResizeEventArgs extends ASPxClientPopupWindowEventArgs { + /** + * Returns the value indicating the window state after resizing. + * Value: The integer value indicating the window resize state. + */ + resizeState: number; +} +/** + * A method that will handle the PinnedChanged event. + */ +interface ASPxClientPopupWindowPinnedChangedEventHandler { + /** + * A method that will handle the PinnedChanged event. + * @param source The event source. + * @param e A ASPxClientPopupWindowPinnedChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientPopupWindowPinnedChangedEventArgs): void; +} +/** + * Provides data for the PinnedChanged event. + */ +interface ASPxClientPopupWindowPinnedChangedEventArgs extends ASPxClientPopupWindowEventArgs { + /** + * Gets a value indicating whether the processed popup window has been pinned. + * Value: true, if the window has been pinned; otherwise, false. + */ + pinned: boolean; +} +/** + * Represents a client collection that maintains client popup control objects. + */ +interface ASPxClientPopupControlCollection extends ASPxClientControlCollection { + /** + * Hides all popup windows maintained by the collection. + */ + HideAllWindows(): void; +} +/** + * Declares client constants that identify the reason the popup window closes. + */ +interface ASPxClientPopupControlCloseReason { +} +/** + * Represents a client-side equivalent of the ASPxPopupMenu object. + */ +interface ASPxClientPopupMenu extends ASPxClientMenuBase { + /** + * Sets the ID of a web control or HTML element (or a list of IDs) with which the current popup menu is associated. + * @param popupElementId A string value specifying the ID (or a list of IDs) of the web control or HTML element with which the popup menu is associated. + */ + SetPopupElementID(popupElementId: string): void; + /** + * Returns an index of the object that invoked the popup menu within the PopupElementID list. + */ + GetCurrentPopupElementIndex(): number; + /** + * Returns an object that invoked the popup menu. + */ + GetCurrentPopupElement(): Object; + /** + * Refreshes the connection between the ASPxPopupMenu and the popup element. + */ + RefreshPopupElementConnection(): void; + /** + * Hides the popup menu. + */ + Hide(): void; + /** + * Invokes the popup menu. + */ + Show(): void; + /** + * Invokes the popup menu at the popup element with the specified index. + * @param popupElementIndex An integer value specifying the zero-based index of the popup element. + */ + Show(popupElementIndex: number): void; + /** + * Invokes the popup menu and displays it over the specified HTML element. + * @param htmlElement An object specifying the HTML element relative to which position the popup menu is invoked. + */ + ShowAtElement(htmlElement: Object): void; + /** + * Invokes the popup menu and displays it over an HTML element specified by its unique identifier. + * @param id A string value that specifies the hierarchically qualified identifier of an HTML element relative to which position the popup menu is invoked. + */ + ShowAtElementByID(id: string): void; + /** + * Invokes the popup menu at the specified position. + * @param x An integer value specifying the x-coordinate of the popup menu's display position. + * @param y An integer value specifying the y-coordinate of the popup menu's display position. + */ + ShowAtPos(x: number, y: number): void; +} +/** + * Represents the client-side equivalent of the ASPxRatingControl control. + */ +interface ASPxClientRatingControl extends ASPxClientControl { + /** + * Fires on the server after an item has been clicked. + */ + ItemClick: ASPxClientEvent>; + /** + * Occurs on the client side when the mouse cursor is moved into a rating control item. + */ + ItemMouseOver: ASPxClientEvent>; + /** + * Occurs on the client side when the mouse cursor moves outside a rating control item. + */ + ItemMouseOut: ASPxClientEvent>; + /** + * Gets the item tooltip title specified by the item index. + * @param index An integer value specifying the item index. + */ + GetTitle(index: number): string; + /** + * Returns a value indicating whether the control's status is read-only. + */ + GetReadOnly(): boolean; + /** + * Specifies whether the control's status is read-only. + * @param value true to make the control read-only; otherwise, false. + */ + SetReadOnly(value: boolean): void; + /** + * Returns the value of the ASPxRatingControl. + */ + GetValue(): number; + /** + * Modifies the value of the ASPxRatingControl on the client side. + * @param value A decimal value representing the value of the control. + */ + SetValue(value: number): void; +} +/** + * A method that will handle the client ItemClick event. + */ +interface ASPxClientRatingControlItemClickEventHandler { + /** + * A method that will handle the client ItemClick event. + * @param source An object representing the event source. + * @param e A ASPxClientRatingControlItemClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRatingControlItemClickEventArgs): void; +} +/** + * Provides data for the ItemClick event. + */ +interface ASPxClientRatingControlItemClickEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the index of the item related to the event. + * Value: An integer value that represents the clicked item's index. + */ + index: number; +} +/** + * A method that will handle the rating control's ItemMouseOver and ItemMouseOut client events (such as ItemMouseOut). + */ +interface ASPxClientRatingControlItemMouseEventHandler { + /** + * A method that will handle the ItemMouseOver events. + * @param source The event source. + * @param e An ASPxClientRatingControlItemMouseEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRatingControlItemMouseEventArgs): void; +} +/** + * Provides data for the rating control's ItemMouseOver and ItemMouseOut client events (such as ItemMouseOut). + */ +interface ASPxClientRatingControlItemMouseEventArgs extends ASPxClientEventArgs { + /** + * Gets the index of the item related to the event. + * Value: An integer value that represents the related item's index. + */ + index: number; +} +/** + * Represents the client-side equivalent of the ASPxRibbon control. + */ +interface ASPxClientRibbon extends ASPxClientControl { + /** + * Occurs after an end-user executes an action on a ribbon item. + */ + CommandExecuted: ASPxClientEvent>; + /** + * Fires on the client side after the active tab has been changed within a ribbon control. + */ + ActiveTabChanged: ASPxClientEvent>; + /** + * Occurs on the client side when the ribbon minimization state is changed by end-user actions. + */ + MinimizationStateChanged: ASPxClientEvent>; + /** + * Occurs when the file tab is clicked. + */ + FileTabClicked: ASPxClientEvent>; + /** + * Fires on the client side after a dialog box launcher has been clicked. + */ + DialogBoxLauncherClicked: ASPxClientEvent>; + /** + * Fires after key tips are closed by pressing Esc. + */ + KeyTipsClosedOnEscape: ASPxClientEvent>; + /** + * Specifies whether the ribbon control is enabled. + * @param enabled true to enable the ribbon; false to disable it. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns a value indicating whether the ribbon is enabled. + */ + GetEnabled(): boolean; + /** + * Returns a tab specified by its index. + * @param index An integer value specifying the zero-based index of the tab object to retrieve. + */ + GetTab(index: number): ASPxClientRibbonTab; + /** + * Returns a tab specified by its name. + * @param name A string value specifying the name of the tab. + */ + GetTabByName(name: string): ASPxClientRibbonTab; + /** + * Returns the number of tabs in the ribbon Tabs collection. + */ + GetTabCount(): number; + /** + * Returns the active tab within the ribbon control. + */ + GetActiveTab(): ASPxClientRibbonTab; + /** + * Makes the specified tab active in the ribbon control on the client side. + * @param tab A ASPxClientRibbonTab object specifying the tab selection. + */ + SetActiveTab(tab: ASPxClientRibbonTab): void; + /** + * Makes a tab active within the ribbon control, specifying the tab's index. + * @param index An integer value specifying the index of the tab to select. + */ + SetActiveTabIndex(index: number): void; + /** + * Returns a ribbon item specified by its name. + * @param name A string value specifying the name of the item. + */ + GetItemByName(name: string): ASPxClientRibbonItem; + /** + * Returns a value of item with the specified name. + * @param name A string value specifying the name of the item. + */ + GetItemValueByName(name: string): Object; + /** + * Sets the value of the item with the specified name. + * @param name A string value specifying the name of the item. + * @param value An object that is the new item value. + */ + SetItemValueByName(name: string, value: Object): void; + /** + * Specifies whether the ribbon is minimized. + * @param minimized true to set the ribbon state to minimized; false to set the ribbon state to normal. + */ + SetMinimized(minimized: boolean): void; + /** + * Gets a value specifying whether the ribbon is minimized. + */ + GetMinimized(): boolean; + /** + * Specifies the visibility of a context tab category specified by its name. + * @param categoryName A Name property value of the required category. + * @param visible true to make a category visible; false to make it hidden. + */ + SetContextTabCategoryVisible(categoryName: string, visible: boolean): void; + /** + * Shows ribbon key tips. + */ + ShowKeyTips(): void; +} +/** + * A client-side equivalent of the ribbon's RibbonTab object. + */ +interface ASPxClientRibbonTab { + /** + * Gets the client ribbon object to which the current tab belongs. + * Value: An object to which the tab belongs. + */ + ribbon: ASPxClientRibbon; + /** + * Gets or sets the tab's index within the collection. + * Value: An integer value that is the zero-based index of the tab within the collection. + */ + index: number; + /** + * Gets the name of the current ribbon tab. + * Value: A string value that is the tab's name. + */ + name: string; + /** + * Returns the text displayed in the tab. + */ + GetText(): string; + /** + * Sets a value specifying whether the tab is enabled. + * @param enabled true to enable the tab; false to disable it. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns a value indicating whether a ribbon tab is enabled. + */ + GetEnabled(): boolean; + /** + * Returns a value specifying whether a ribbon tab is displayed. + */ + GetVisible(): boolean; +} +/** + * A client-side equivalent of the ribbon's RibbonGroup object. + */ +interface ASPxClientRibbonGroup { + /** + * Gets the client ribbon object to which the current group belongs. + * Value: An object to which the group belongs. + */ + ribbon: ASPxClientRibbon; + /** + * Gets the client tab object to which the current group belongs. + * Value: An object to which the group belongs. + */ + tab: ASPxClientRibbonTab; + /** + * Gets or sets the group's index within the collection. + * Value: An integer value that is the zero-based index of the group within the collection. + */ + index: number; + /** + * Gets the name of the current ribbon group. + * Value: A string value that is the group's name. + */ + name: string; + /** + * Returns a value specifying whether a ribbon group is displayed. + */ + GetVisible(): boolean; +} +/** + * A client-side equivalent of the ribbon's RibbonItemBase object. + */ +interface ASPxClientRibbonItem { + /** + * Gets the client group object to which the current item belongs. + * Value: An object to which the item belongs. + */ + group: ASPxClientRibbonGroup; + /** + * Gets or sets the item's index within the collection. + * Value: An integer value that is the zero-based index of the item within the collection. + */ + index: number; + /** + * Gets the name of the current ribbon item. + * Value: A string value that is the item's name. + */ + name: string; + /** + * Gets the client ribbon object to which the current item belongs. + * Value: An object to which the item belongs. + */ + ribbon: ASPxClientRibbon; + /** + * Returns a value indicating whether a ribbon item is enabled. + */ + GetEnabled(): boolean; + /** + * Sets a value specifying whether the item is enabled. + * @param enabled true to enable the item; false to disable it. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns the item value. + */ + GetValue(): Object; + /** + * Sets the item value. + * @param value An that specifies the item value. + */ + SetValue(value: Object): void; + /** + * Returns a value specifying whether a ribbon item is displayed. + */ + GetVisible(): boolean; +} +/** + * A method that will handle the CommandExecuted event. + */ +interface ASPxClientRibbonCommandExecutedEventHandler { + /** + * A method that will handle the CommandExecuted event. + * @param source The event source. Identifies the ASPxRibbon control that raised the event. + * @param e An ASPxClientRibbonCommandExecutedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRibbonCommandExecutedEventArgs): void; +} +/** + * Provides data for the CommandExecuted event. + */ +interface ASPxClientRibbonCommandExecutedEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets an item object related to the event. + * Value: An object, manipulations on which forced the event to be raised. + */ + item: ASPxClientRibbonItem; + /** + * Gets an optional parameter that complements the processed command. + * Value: A string value containing additional information about the processed command. + */ + parameter: string; +} +/** + * A method that will handle the ActiveTabChanged event. + */ +interface ASPxClientRibbonTabEventHandler { + /** + * A method that will handle the ActiveTabChanged event. + * @param source The event source. Identifies the ASPxRibbon control that raised the event. + * @param e A ASPxClientRibbonTabEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRibbonTabEventArgs): void; +} +/** + * Provides data for the ActiveTabChanged event. + */ +interface ASPxClientRibbonTabEventArgs extends ASPxClientEventArgs { + /** + * Gets the tab object related to the event. + * Value: An object that is the tab, manipulations on which forced the ribbon control to raise the event. + */ + tab: ASPxClientRibbonTab; +} +/** + * A method that will handle the MinimizationStateChanged event. + */ +interface ASPxClientRibbonMinimizationStateEventHandler { + /** + * A method that will handle the MinimizationStateChanged event. + * @param source The event source. Identifies the ASPxRibbon control that raised the event. + * @param e An ASPxClientRibbonMinimizationStateEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRibbonMinimizationStateEventArgs): void; +} +/** + * Provides data for the MinimizationStateChanged event. + */ +interface ASPxClientRibbonMinimizationStateEventArgs extends ASPxClientEventArgs { + /** + * Returns the value indicating the new ribbon state. + * Value: The integer value indicating the ribbon minimization state. + */ + ribbonState: number; +} +/** + * A method that will handle the DialogBoxLauncherClicked event. + */ +interface ASPxClientRibbonDialogBoxLauncherClickedEventHandler { + /** + * A method that will handle the DialogBoxLauncherClicked event. + * @param source The event source. This parameter identifies the ribbon object which raised the event. + * @param e An ASPxClientRibbonDialogBoxLauncherClickedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientRibbonDialogBoxLauncherClickedEventArgs): void; +} +/** + * Provides data for the DialogBoxLauncherClicked event. + */ +interface ASPxClientRibbonDialogBoxLauncherClickedEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the client group object to which the clicked dialog box launcher belongs. + * Value: An object to which the dialog box launcher belongs. + */ + group: ASPxClientRibbonGroup; +} +/** + * Represents a client-side equivalent of the ASPxRoundPanel control. + */ +interface ASPxClientRoundPanel extends ASPxClientPanelBase { + /** + * Fires on the client side after a panel has been expanded or collapsed via end-user interactions, i.e., by clicking a panel header or collapse button. + */ + CollapsedChanged: ASPxClientEvent>; + /** + * Fires on the client side before a panel is expanded or collapsed by end-user interactions, i.e., by clicking a panel header or collapse button. + */ + CollapsedChanging: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientRoundPanel. + */ + CallbackError: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * 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; + /** + * Returns the text displayed within the panel's header. + */ + GetHeaderText(): string; + /** + * Specifies the text displayed in the panel's header. + * @param text A string value that specifies the panel header's text. + */ + SetHeaderText(text: string): void; + /** + * Returns a value indicating whether the panel is collapsed. + */ + GetCollapsed(): boolean; + /** + * Sets a value indicating whether the panel is collapsed. + * @param collapsed true, to collapse the panel; otherwise, false. + */ + SetCollapsed(collapsed: boolean): void; +} +/** + * Represents a client-side equivalent of the ASPxSplitter object. + */ +interface ASPxClientSplitter extends ASPxClientControl { + /** + * Fires before a pane is resized. + */ + PaneResizing: ASPxClientEvent>; + /** + * Fires after a pane has been resized. + */ + PaneResized: ASPxClientEvent>; + /** + * Fires before a pane is collapsed. + */ + PaneCollapsing: ASPxClientEvent>; + /** + * Fires after a pane has been collapsed. + */ + PaneCollapsed: ASPxClientEvent>; + /** + * Fires before a pane is expanded. + */ + PaneExpanding: ASPxClientEvent>; + /** + * Fires after a pane has been expanded. + */ + PaneExpanded: ASPxClientEvent>; + /** + * Occurs when a pane resize operation has been completed. + */ + PaneResizeCompleted: ASPxClientEvent>; + /** + * Fires after a specific web page has been loaded into a pane. + */ + PaneContentUrlLoaded: ASPxClientEvent>; + /** + * Returns the number of panes at the root level of a splitter. + */ + GetPaneCount(): number; + /** + * Returns the splitter's root pane specified by its index within the Panes collection. + * @param index An integer value specifying the zero-based index of the root pane to be retrieved. + */ + GetPane(index: number): ASPxClientSplitterPane; + /** + * Returns a pane specified by its name. + * @param name A string value specifying the name of the pane. + */ + GetPaneByName(name: string): ASPxClientSplitterPane; + /** + * Specifies whether the control's panes can be resized by end-users on the client side. + * @param allowResize true if pane resizing is allowed; otherwise, false. + */ + SetAllowResize(allowResize: boolean): void; + /** + * Returns a string value that represents the client state of splitter panes. + */ + GetLayoutData(): string; +} +/** + * Represents a client-side equivalent of the splitter's SplitterPane object. + */ +interface ASPxClientSplitterPane { + /** + * Gets the index of the current pane within the pane collection to which it belongs. + * Value: An integer value representing the zero-based index of the current pane within the SplitterPaneCollection collection. + */ + index: number; + /** + * Gets the name that uniquely identifies the current splitter pane. + * Value: A string value that represents the value assigned to the pane's Name property. + */ + name: string; + /** + * Returns a client splitter object that contains the current pane. + */ + GetSplitter(): ASPxClientSplitter; + /** + * Returns the immediate parent of the current pane. + */ + GetParentPane(): ASPxClientSplitterPane; + /** + * Returns the previous sibling pane of the current pane. + */ + GetPrevPane(): ASPxClientSplitterPane; + /** + * Returns the next sibling pane of the current pane. + */ + GetNextPane(): ASPxClientSplitterPane; + /** + * Determines whether the current pane is the first pane within the SplitterPaneCollection. + */ + IsFirstPane(): boolean; + /** + * Determines whether the current pane is the last pane within the SplitterPaneCollection. + */ + IsLastPane(): boolean; + /** + * Returns a value that indicates the orientation in which the current pane and its sibling panes are stacked. + */ + IsVertical(): boolean; + /** + * Returns the number of the current pane's immediate child panes. + */ + GetPaneCount(): number; + /** + * Returns the current pane's immediate child pane specified by its index. + * @param index An integer value specifying the zero-based index of the child pane to be retrieved. + */ + GetPane(index: number): ASPxClientSplitterPane; + /** + * Returns the current pane's child pane specified by its name. + * @param name A string value specifying the name of the pane. + */ + GetPaneByName(name: string): ASPxClientSplitterPane; + /** + * Gets the width of the pane's content area. + */ + GetClientWidth(): number; + /** + * Gets the height of the pane's content area. + */ + GetClientHeight(): number; + /** + * Collapses the current pane and occupies its space by maximizing the specified pane. + * @param maximizedPane A ASPxClientSplitterPane object specifying the pane to be maximized to occupy the freed space. + */ + Collapse(maximizedPane: ASPxClientSplitterPane): boolean; + /** + * Collapses the current pane in a forward direction and occupies its space by maximizing the previous adjacent pane. + */ + CollapseForward(): boolean; + /** + * Collapses the current pane in a backward direction, and occupies its space by maximizing the next adjacent pane. + */ + CollapseBackward(): boolean; + /** + * Expands the current pane object on the client side. + */ + Expand(): boolean; + /** + * Returns whether the pane is collapsed. + */ + IsCollapsed(): boolean; + /** + * Returns whether the pane's content is loaded from an external web page. + */ + IsContentUrlPane(): boolean; + /** + * Gets the URL of a web page displayed as a pane's content. + */ + GetContentUrl(): string; + /** + * Sets the URL to point to a web page that should be loaded into, and displayed within the current pane. + * @param url A string value specifying the URL to a web page displayed within the pane. + */ + SetContentUrl(url: string): void; + /** + * Sets the URL to point to a web page that should be loaded into, and displayed within the current pane, but should not be cached by a client browser. + * @param url A string value specifying the URL to a web page displayed within the pane. + * @param preventBrowserCaching true to prevent the browser to cache the loaded content; false to allow browser caching. + */ + SetContentUrl(url: string, preventBrowserCaching: boolean): void; + /** + * Refreshes the content of the web page displayed within the current pane. + */ + RefreshContentUrl(): void; + /** + * Returns an iframe object containing a web page specified via the pane's SetContentUrl client method). + */ + GetContentIFrame(): Object; + /** + * Specifies whether the current pane can be resized by end-users on the client side. + * @param allowResize true if pane resizing is allowed; otherwise, false. + */ + SetAllowResize(allowResize: boolean): void; + /** + * Forces the client PaneResized event to be generated. + */ + RaiseResizedEvent(): void; + /** + * Returns an HTML element representing a splitter pane object. + */ + GetElement(): Object; + /** + * Specifies the splitter pane's size in pixels. + * @param size An integer value that specifies the splitter pane's size. + */ + SetSize(size: number): void; + /** + * Specifies the splitter pane's size, in pixels or percents. + * @param size A string value that specifies the splitter pane's size, in pixels or percents. + */ + SetSize(size: string): void; + /** + * Returns the splitter pane's size, in pixels or percents. + */ + GetSize(): string; + /** + * Returns the distance between the top edge of the pane content and the topmost portion of the content currently visible in the pane. + */ + GetScrollTop(): number; + /** + * Specifies the distance between the top edge of the pane content and the topmost portion of the content currently visible in the pane. + * @param value An integer value that is the distance (in pixels). + */ + SetScrollTop(value: number): void; + /** + * Returns the distance between the left edge of the pane content and the leftmost portion of the content currently visible in the pane. + */ + GetScrollLeft(): number; + /** + * Specifies the distance between the left edge of the pane content and the leftmost portion of the content currently visible in the pane. + * @param value An integer value that is the distance (in pixels). + */ + SetScrollLeft(value: number): void; +} +/** + * A method that will handle the splitter's client events concerning manipulations with a pane. + */ +interface ASPxClientSplitterPaneEventHandler { + /** + * A method that will handle the splitter's client events concerning pane manipulations. + * @param source An object representing the event's source. Identifies the splitter object that raised the event. + * @param e An ASPxClientSplitterPaneEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSplitterPaneEventArgs): void; +} +/** + * A method that will handle the splitter's client events concerning manipulations with a pane. + */ +interface ASPxClientSplitterPaneEventArgs extends ASPxClientEventArgs { + /** + * Gets the pane object related to the event. + * Value: An ASPxClientSplitterPane object, manipulations on which forced the event to be raised. + */ + pane: ASPxClientSplitterPane; +} +/** + * A method that will handle a splitter control's cancelable client events concerning manipulations with a pane. + */ +interface ASPxClientSplitterPaneCancelEventHandler { + /** + * A method that will handle a splitter control's cancelable client events concerning pane manipulations. + * @param source An object representing the event's source. Identifies the splitter control object that raised the event. + * @param e An ASPxClientSplitterPaneCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientSplitterPaneCancelEventArgs): void; +} +/** + * Provides data for a splitter control's cancelable client events concerning manipulations with a pane. + */ +interface ASPxClientSplitterPaneCancelEventArgs extends ASPxClientSplitterPaneEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * Represents a base for the ASPxClientPageControl objects. + */ +interface ASPxClientTabControlBase extends ASPxClientControl { + /** + * Fires when a tab is clicked. + */ + TabClick: ASPxClientEvent>; + /** + * Fires on the client side after the active tab has been changed within a tab control. + */ + ActiveTabChanged: ASPxClientEvent>; + /** + * Fires on the client side before the active tab is changed within a tab control. + */ + ActiveTabChanging: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by a client tab control. + */ + CallbackError: ASPxClientEvent>; + /** + * Modifies a tab page's size in accordance with the content. + */ + AdjustSize(): void; + /** + * Returns the active tab within the tab control. + */ + GetActiveTab(): ASPxClientTab; + /** + * Makes the specified tab active within the tab control on the client side. + * @param tab An ASPxClientTab object specifying the tab to select. + */ + SetActiveTab(tab: ASPxClientTab): void; + /** + * Returns the index of the active tab within the tab control. + */ + GetActiveTabIndex(): number; + /** + * Makes a tab active within the tab control, specifying the tab's index. + * @param index An integer value specifying the index of the tab to select. + */ + SetActiveTabIndex(index: number): void; + /** + * Returns the number of tabs in the ASPxTabControl. + */ + GetTabCount(): number; + /** + * Returns a tab specified by its index. + * @param index An integer value specifying the zero-based index of the tab object to retrieve. + */ + GetTab(index: number): ASPxClientTab; + /** + * Returns a tab specified by its name. + * @param name A string value specifying the name of the tab. + */ + GetTabByName(name: string): ASPxClientTab; +} +/** + * Represents a client-side equivalent of the ASPxTabControl object. + */ +interface ASPxClientTabControl extends ASPxClientTabControlBase { +} +/** + * Represents a client-side equivalent of the ASPxPageControl object. + */ +interface ASPxClientPageControl extends ASPxClientTabControlBase { + /** + * Returns the HTML code that represents the contents of the specified page within the page control. + * @param tab An ASPxClientTab object that specifies the required page. + */ + GetTabContentHTML(tab: ASPxClientTab): string; + /** + * Defines the HTML content for a specific tab page within the page control. + * @param tab An ASPxClientTab object that specifies the required tab page. + * @param html A string value that represents the HTML code defining the content of the specified page. + */ + SetTabContentHTML(tab: ASPxClientTab, html: string): void; + /** + * 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. + */ + PerformCallback(parameter: string): void; + /** + * 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; +} +/** + * Represents a client-side equivalent of a tab control's TabPage object. + */ +interface ASPxClientTab { + /** + * Gets the tab control to which the current tab belongs. + * Value: An ASPxClientTabControlBase object representing the control to which the tab belongs. + */ + tabControl: ASPxClientTabControlBase; + /** + * Gets the index of the current tab (tabbed page) within the control's collection of tabs (tabbed pages). + * Value: An integer value representing the zero-based index of the current tab (tabbed page) within the TabPages) collection of the control to which the tab belongs. + */ + index: number; + /** + * Gets the name that uniquely identifies the current tab. + * Value: A string value that represents the value assigned to the tab's Name property. + */ + name: string; + /** + * Returns a value specifying whether a tab is enabled. + */ + GetEnabled(): boolean; + /** + * Specifies whether the tab is enabled. + * @param value true to enable the tab; otherwise, false. + */ + SetEnabled(value: boolean): void; + /** + * Returns the URL pointing to the image displayed within the tab. + */ + GetImageUrl(): string; + /** + * Specifies the URL which points to the image displayed within the tab. + * @param value A string value that is the URL to the image displayed within the tab. + */ + SetImageUrl(value: string): void; + /** + * Returns the URL pointing to the image displayed within the active tab. + */ + GetActiveImageUrl(): string; + /** + * Specifies the URL which points to the image displayed within the active tab. + * @param value A string value that is the URL to the image displayed within the active tab. + */ + SetActiveImageUrl(value: string): void; + /** + * Gets an URL which defines the navigation location for the tab. + */ + GetNavigateUrl(): string; + /** + * Specifies a URL which defines the navigation location for the tab. + * @param value A string value which is a URL to where the client web browser will navigate when the tab is clicked. + */ + SetNavigateUrl(value: string): void; + /** + * Returns text displayed within the tab. + */ + GetText(): string; + /** + * Specifies the text displayed within the tab. + * @param value A string value that is the text displayed within the tab. + */ + SetText(value: string): void; + /** + * Returns a value specifying whether a tab is displayed. + */ + GetVisible(): boolean; + /** + * Specifies whether the tab is visible. + * @param value true is the tab is visible; otherwise, false. + */ + SetVisible(value: boolean): void; +} +/** + * A method that will handle a tab control's client events concerning manipulations with a tab. + */ +interface ASPxClientTabControlTabEventHandler { + /** + * A method that will handle a tab control's client events concerning manipulations with a tab. + * @param source An object representing the event's source. Identifies the tab control object that raised the event. + * @param e An ASPxClientTabControlTabEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTabControlTabEventArgs): void; +} +/** + * Provides data for events which concern manipulations on tabs. + */ +interface ASPxClientTabControlTabEventArgs extends ASPxClientEventArgs { + /** + * Gets the tab object related to the event. + * Value: An ASPxClientTab object, manipulations on which forced the event to be raised. + */ + tab: ASPxClientTab; +} +/** + * A method that will handle a tab control's cancelable client events concerning manipulations with a tab. + */ +interface ASPxClientTabControlTabCancelEventHandler { + /** + * A method that will handle a tab control's cancelable client events concerning manipulations with a tab. + * @param source An object representing the event's source. Identifies the tab control object that raised the event. + * @param e An ASPxClientTabControlTabCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTabControlTabCancelEventArgs): void; +} +/** + * Provides data for cancellable events which concern manipulations on tabs. + */ +interface ASPxClientTabControlTabCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets the tab object related to the event. + * Value: An ASPxClientTab object representing the tab manipulations on which forced the tab control to raise the event. + */ + tab: ASPxClientTab; + /** + * Gets or sets a value specifying whether a callback should be sent to the server to reload the content of the page being activated. + * Value: true to reload the page's content; otherwise, false. + */ + reloadContentOnCallback: boolean; +} +/** + * A method that will handle client events concerning clicks on the control's tabs. + */ +interface ASPxClientTabControlTabClickEventHandler { + /** + * A method that will handle client events concerning clicks on tabs. + * @param source The event source. This parameter identifies the tab control object which raised the event. + * @param e An ASPxClientTabControlTabClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTabControlTabClickEventArgs): void; +} +/** + * Provides data for events which concern clicking on the control's tabs. + */ +interface ASPxClientTabControlTabClickEventArgs extends ASPxClientTabControlTabCancelEventArgs { + /** + * Gets the HTML object that contains the processed tab. + * Value: An object representing a container for the tab related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * Represents a client-side equivalent of the ASPxTimer object. + */ +interface ASPxClientTimer extends ASPxClientControl { + /** + * Fires on the client side when the specified timer interval has elapsed, and the timer is enabled. + */ + Tick: ASPxClientEvent>; + /** + * Returns a value indicating whether the timer is enabled. + */ + GetEnabled(): boolean; + /** + * Enables the timer. + * @param enabled true to turn the timer on; false, to turn the timer off. + */ + SetEnabled(enabled: boolean): void; + /** + * Gets the time before the Tick event. + */ + GetInterval(): number; + /** + * Specifies the time before the Tick event. + * @param interval An integer value that specifies the number of milliseconds before the Tick event is raised relative to the last occurrence of the Tick event. The value cannot be less than one. + */ + SetInterval(interval: number): void; +} +/** + * Represents a client-side equivalent of the ASPxTitleIndex object. + */ +interface ASPxClientTitleIndex extends ASPxClientControl { + /** + * Fires after an item has been clicked. + */ + ItemClick: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientTitleIndex. + */ + CallbackError: ASPxClientEvent>; +} +/** + * A method that will handle client events concerning manipulations with an item. + */ +interface ASPxClientTitleIndexItemEventHandler { + /** + * A method that will handle the title index control's client events concerning manipulations with an item. + * @param source An object representing the event's source. Identifies the title index control object that raised the event. + * @param e An ASPxClientTitleIndexItemEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTitleIndexItemEventArgs): void; +} +/** + * Provides data for events which concern manipulations on the control's items. + */ +interface ASPxClientTitleIndexItemEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the name that uniquely identifies the processed item. + * Value: A string value that represents the value assigned to the processed item's Name property. + */ + name: Object; + /** + * Gets the HTML object that contains the processed item. + * Value: An object representing a container for the item related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * Represents a client-side equivalent of the ASPxTreeView object. + */ +interface ASPxClientTreeView extends ASPxClientControl { + /** + * Fires on the client side after a node has been clicked. + */ + NodeClick: ASPxClientEvent>; + /** + * Fires on the client side after a node's expansion state has been changed by end-user interaction. + */ + ExpandedChanged: ASPxClientEvent>; + /** + * Fires on the client side before the expansion state of a node is changed via end-user interaction. + */ + ExpandedChanging: ASPxClientEvent>; + /** + * Occurs on the client side when the node's checked state is changed by clicking on a check box. + */ + CheckedChanged: ASPxClientEvent>; + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientTreeView. + */ + CallbackError: ASPxClientEvent>; + /** + * Returns a node specified by its index within the ASPxTreeView's node collection. + * @param index An integer value specifying the zero-based index of the node to be retrieved. + */ + GetNode(index: number): ASPxClientTreeViewNode; + /** + * Returns a node specified by its name. + * @param name A string value specifying the name of the node. + */ + GetNodeByName(name: string): ASPxClientTreeViewNode; + /** + * Returns a node specified by its text. + * @param text A string value specifying the text content of the node. + */ + GetNodeByText(text: string): ASPxClientTreeViewNode; + /** + * Returns the number of nodes at the ASPxTreeView's zero level. + */ + GetNodeCount(): number; + /** + * Returns the selected node within the ASPxTreeView control on the client side. + */ + GetSelectedNode(): ASPxClientTreeViewNode; + /** + * Selects the specified node within the ASPxTreeView control on the client side. + * @param node An ASPxClientTreeViewNode object specifying the node to select. + */ + SetSelectedNode(node: ASPxClientTreeViewNode): void; + /** + * Gets the root node of the ASPxTreeView object. + */ + GetRootNode(): ASPxClientTreeViewNode; + /** + * Collapses all nodes in the ASPxTreeView on the client side. + */ + CollapseAll(): void; + /** + * Expands all nodes in the ASPxTreeView on the client side. + */ + ExpandAll(): void; +} +/** + * Represents a client-side equivalent of the ASPxTreeView's TreeViewNode object. + */ +interface ASPxClientTreeViewNode { + /** + * Gets the client representation of the ASPxTreeView control to which the current node belongs. + * Value: An ASPxClientTreeView object representing the control to which the node belongs. + */ + treeView: ASPxClientTreeView; + /** + * Gets the current node's parent node. + * Value: An ASPxClientTreeViewNode object representing the node's immediate parent. + */ + parent: ASPxClientTreeViewNode; + /** + * Gets the node's index within the parent's collection of nodes. + * Value: An integer value representing the node's zero-based index within the Nodes collection of the node to which the node belongs. + */ + index: number; + /** + * Gets the name that uniquely identifies the node. + * Value: A string value that represents the value assigned to the node's Name property. + */ + name: string; + /** + * Returns the number of the current node's immediate child nodes. + */ + GetNodeCount(): number; + /** + * Returns the current node's immediate child node specified by its index. + * @param index An integer value specifying the zero-based index of the node to be retrieved. + */ + GetNode(index: number): ASPxClientTreeViewNode; + /** + * Returns the current node's child node specified by its name. + * @param name A string value specifying the name of the node. + */ + GetNodeByName(name: string): ASPxClientTreeViewNode; + /** + * Returns the current node's child node specified by its text. + * @param text A string value specifying the text content of the node. + */ + GetNodeByText(text: string): ASPxClientTreeViewNode; + /** + * Returns a value indicating whether the node is expanded. + */ + GetExpanded(): boolean; + /** + * Sets a value which specifies the node's expansion state. + * @param value true if the node is expanded; otherwise, false. + */ + SetExpanded(value: boolean): void; + /** + * Returns a value indicating whether the node is checked. + */ + GetChecked(): boolean; + /** + * Sets a value indicating whether the node is checked. + * @param value true if the node is checked; otherwise, false. + */ + SetChecked(value: boolean): void; + /** + * Returns a value which specifies the node's check state. + */ + GetCheckState(): string; + /** + * Returns a value specifying whether the node is enabled. + */ + GetEnabled(): boolean; + /** + * Sets a value specifying whether the node is enabled. + * @param value true to make the node enabled; false to disable it. + */ + SetEnabled(value: boolean): void; + /** + * Returns the URL pointing to the image displayed within the node. + */ + GetImageUrl(): string; + /** + * Sets the URL which points to the image displayed within the node. + * @param value A string value specifying the URL to the image displayed within the node. + */ + SetImageUrl(value: string): void; + /** + * Gets an URL which defines the navigation location for the node's hyperlink. + */ + GetNavigateUrl(): string; + /** + * Specifies a URL which defines the node's navigate URL. + * @param value A string value which specifies a URL to where the client web browser will navigate when the node is clicked. + */ + SetNavigateUrl(value: string): void; + /** + * Gets the text, displayed within the node. + */ + GetText(): string; + /** + * Specifies the text, displayed within the node. + * @param value A string value that represents the text displayed within the node. + */ + SetText(value: string): void; + /** + * Returns a value specifying whether a node is displayed. + */ + GetVisible(): boolean; + /** + * Specifies whether the node is visible. + * @param value true if the node is visible; otherwise, false. + */ + SetVisible(value: boolean): void; + /** + * Gets the HTML object that contains the current node. + */ + GetHtmlElement(): Object; +} +/** + * A method that will handle the client events concerned with node processing. + */ +interface ASPxClientTreeViewNodeProcessingModeEventHandler { + /** + * A method that will handle the client events concerned with node processing. + * @param source An object representing the event source. Identifies the ASPxClientTreeView control that raised the event. + * @param e An ASPxClientTreeViewNodeProcessingModeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeViewNodeProcessingModeEventArgs): void; +} +/** + * Provides data for the client events concerned with node processing, and that allow the event's processing to be passed to the server side. + */ +interface ASPxClientTreeViewNodeProcessingModeEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets a node object related to the event. + * Value: An ASPxClientTreeViewNode object, manipulations on which forced the event to be raised. + */ + node: ASPxClientTreeViewNode; +} +/** + * A method that will handle the ASPxClientTreeView.ItemClick event. + */ +interface ASPxClientTreeViewNodeClickEventHandler { + /** + * A method that will handle the NodeClick event. + * @param source The ASPxClientTreeView control which fires the event. + * @param e An ASPxClientTreeViewNodeClickEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeViewNodeClickEventArgs): void; +} +/** + * Provides data for the NodeClick event. + */ +interface ASPxClientTreeViewNodeClickEventArgs extends ASPxClientTreeViewNodeProcessingModeEventArgs { + /** + * Gets the HTML object that contains the processed node. + * Value: An object representing a container for the node related to the event. + */ + htmlElement: Object; + /** + * Gets a DHTML event object that relates to the processed event. + * Value: An object that maintains DHTML event-specific information. + */ + htmlEvent: Object; +} +/** + * A method that will handle the ASPxTreeView control's client events concerning manipulations with a node. + */ +interface ASPxClientTreeViewNodeEventHandler { + /** + * A method that will handle the ASPxTreeView control's client events, concerning manipulations with a node. + * @param source An object representing the event's source. Identifies the ASPxClientTreeView control object that raised the event. + * @param e An ASPxClientTreeViewNodeEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeViewNodeEventArgs): void; +} +/** + * Provides data for the ExpandedChanged events. + */ +interface ASPxClientTreeViewNodeEventArgs extends ASPxClientEventArgs { + /** + * Gets a node object related to the event. + * Value: An ASPxClientTreeViewNode object, manipulations on which forced the event to be raised. + */ + node: ASPxClientTreeViewNode; +} +/** + * A method that will handle the ASPxTreeView's cancelable client events, concerning manipulations with nodes. + */ +interface ASPxClientTreeViewNodeCancelEventHandler { + /** + * A method that will handle the ASPxTreeView's cancelable client events, concerning manipulations with nodes. + * @param source An object representing the event's source. Identifies the ASPxClientTreeView object that raised the event. + * @param e An ASPxClientTreeViewNodeCancelEventArgs object that contains event data. + */ + (source: S, e: ASPxClientTreeViewNodeCancelEventArgs): void; +} +/** + * Provides data for the ExpandedChanging event. + */ +interface ASPxClientTreeViewNodeCancelEventArgs extends ASPxClientProcessingModeCancelEventArgs { + /** + * Gets a node object related to the event. + * Value: An ASPxClientTreeViewNode object, manipulations on which forced the event to be raised. + */ + node: ASPxClientTreeViewNode; +} +/** + * Represents a client-side equivalent of the ASPxUploadControl control. + */ +interface ASPxClientUploadControl extends ASPxClientControl { + /** + * Occurs on the client after a file has been uploaded. + */ + FileUploadComplete: ASPxClientEvent>; + /** + * Occurs on the client after upload of all selected files has been completed. + */ + FilesUploadComplete: ASPxClientEvent>; + /** + * Occurs on the client side before upload of the specified files starts. + */ + FileUploadStart: ASPxClientEvent>; + /** + * Occurs on the client side before file upload is started. + */ + FilesUploadStart: ASPxClientEvent>; + /** + * Fires on the client side when the text within the control's edit box is changed while the control has focus. + */ + TextChanged: ASPxClientEvent>; + /** + * Occurs on the client side when the progress bar indicator position is changed. + */ + UploadingProgressChanged: ASPxClientEvent>; + /** + * Occurs on the client side when the file input elements count is changed. + */ + FileInputCountChanged: ASPxClientEvent>; + /** + * Enables you to specify whether the selected file(s) are valid and provide an error text. + */ + ValidationErrorOccurred: ASPxClientEvent>; + /** + * Fires when the mouse enters a drop zone or an external drop zone element while dragging a file. + */ + DropZoneEnter: ASPxClientEvent>; + /** + * Fires when the mouse leaves a drop zone or an external drop zone element while dragging a file. + */ + DropZoneLeave: ASPxClientEvent>; + /** + * Specifies whether the upload control's Advanced mode is enabled. + */ + IsAdvancedModeEnabled(): boolean; + /** + * Initiates uploading of the specified file to the web server's memory. + */ + UploadFile(): void; + /** + * Adds a new file input element to the ASPxUploadControl. + */ + AddFileInput(): void; + /** + * Removes a file input element from the ASPxUploadControl. + * @param index An integer value that represents a file input element's index. + */ + RemoveFileInput(index: number): void; + /** + * Removes a file with the specified index from the selected file list. + * @param fileIndex An integer value that is the zero-based index of an item in the file list. + */ + RemoveFileFromSelection(fileIndex: number): void; + /** + * Removes the specified file from the list of files selected for uploading in the upload control. + * @param file An ASPxClientUploadControl object that is the file to be removed from the list of files. + */ + RemoveFileFromSelection(file: ASPxClientUploadControlFile): void; + /** + * Returns files selected for uploading within the specified file input. + * @param inputIndex An integer value that specifies the index of a file input. Default value is "0". + */ + GetSelectedFiles(inputIndex: number): ASPxClientUploadControlFile[]; + /** + * Gets the text displayed within the edit box of the specified file input element. + * @param index An integer value that specifies the required file input element's index. + */ + GetText(index: number): string; + /** + * Gets the number of file input elements contained within the ASPxUploadControl. + */ + GetFileInputCount(): number; + /** + * Specifies the count of the file input elements within the upload control. + * @param count An integer value that specifies the file input elements count. + */ + SetFileInputCount(count: number): void; + /** + * Specifies whether the upload control is enabled. + * @param enabled true, to enable the upload control; otherwise, false. + */ + SetEnabled(enabled: boolean): void; + /** + * Returns a value indicating whether the upload control is enabled. + */ + GetEnabled(): boolean; + /** + * Initiates uploading of the specified file(s) to the web server's memory. + */ + Upload(): void; + /** + * Cancels the initiated file uploading process. + */ + Cancel(): void; + /** + * Clears the file selection in the upload control. + */ + ClearText(): void; + /** + * Sets the text to be displayed within the add button. + * @param text A string value specifying the text to be displayed within the button. + */ + SetAddButtonText(text: string): void; + /** + * Sets the text to be displayed within the upload button. + * @param text A string value specifying the text to be displayed within the button. + */ + SetUploadButtonText(text: string): void; + /** + * Returns the text displayed within the add button. + */ + GetAddButtonText(): string; + /** + * Returns the text displayed within the upload button. + */ + GetUploadButtonText(): string; + /** + * Sets the ID of a web control or HTML element (or a list of IDs), a click on which invokes file upload dialog. + * @param ids A string value specifying the ID or a list of IDs separated by the semicolon (;). + */ + SetDialogTriggerID(ids: string): void; +} +/** + * A method that will handle the client FilesUploadStart event. + */ +interface ASPxClientUploadControlFilesUploadStartEventHandler { + /** + * A method that will handle the FilesUploadStart event. + * @param source The event source. Identifies the ASPxUploadControl control that raised the event. + * @param e A ASPxClientUploadControlFilesUploadStartEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlFilesUploadStartEventArgs): void; +} +/** + * Provides data for the FilesUploadStart event. + */ +interface ASPxClientUploadControlFilesUploadStartEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets a value indicating whether the action which raised the event should be canceled. + * Value: true if the action that raised the event should be canceled; otherwise, false. + */ + cancel: boolean; +} +/** + * A method that handles the FileUploadComplete client event. + */ +interface ASPxClientUploadControlFileUploadCompleteEventHandler { + /** + * A method that will handle the corresponding client event. + * @param source The event source. This parameter identifies the upload control which raised the event. + * @param e An ASPxClientUploadControlFileUploadCompleteEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlFileUploadCompleteEventArgs): void; +} +/** + * Provides data for the FileUploadComplete event. + */ +interface ASPxClientUploadControlFileUploadCompleteEventArgs extends ASPxClientEventArgs { + /** + * Gets the index of a file input element within the ASPxUploadControl. + * Value: An integer value that specifies the file input element's index. + */ + inputIndex: number; + /** + * Gets or sets a value indicating whether the uploaded file passes validation. + * Value: true if the file is valid; otherwise, false. + */ + isValid: boolean; + /** + * Gets the error text to be displayed within the ASPxUploadControl's error frame. + * Value: A string value that represents the error text. + */ + errorText: string; + /** + * Gets a string that contains specific information (if any) passed from the server side for further client processing. + * Value: A string value representing callback data passed from the server. + */ + callbackData: string; +} +/** + * A method that will handle the FilesUploadComplete client event. + */ +interface ASPxClientUploadControlFilesUploadCompleteEventHandler { + /** + * A method that will handle the client FilesUploadComplete event. + * @param source The event source. This parameter identifies the upload control which raised the event. + * @param e A object that contains event data. + */ + (source: S, e: ASPxClientUploadControlFilesUploadCompleteEventArgs): void; +} +/** + * Provides data for the FilesUploadComplete client event, which enables you to perform specific actions after all selected files have been uploaded. + */ +interface ASPxClientUploadControlFilesUploadCompleteEventArgs extends ASPxClientEventArgs { + /** + * Gets the error text to be displayed within the upload control's error frame. + * Value: A string value that is the error text. + */ + errorText: string; + /** + * Gets a string that contains specific information (if any) passed from the server side for further client processing. + * Value: A string value that is the callback data passed from the server. + */ + callbackData: string; +} +/** + * A method that will handle the TextChanged client event. + */ +interface ASPxClientUploadControlTextChangedEventHandler { + /** + * A method that will handle the TextChanged client event. + * @param source The event source. This parameter identifies the upload control which raised the event. + * @param e An ASPxClientUploadControlTextChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlTextChangedEventArgs): void; +} +/** + * Provides data for the TextChanged client event that allows you to respond to an end-user changing an edit box's text. + */ +interface ASPxClientUploadControlTextChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the index of a file input element within the ASPxUploadControl. + * Value: An integer value that specifies the file input element's index. + */ + inputIndex: number; +} +/** + * A method that will handle the ASPxUploadControl's client event, concerned with changes in upload progress. + */ +interface ASPxClientUploadControlUploadingProgressChangedEventHandler { + /** + * A method that will handle the ASPxUploadControl's client event concerning the uploading process being changed. + * @param source An object representing the event's source. Identifies the ASPxUploadControl object that raised the event. + * @param e An ASPxClientUploadControlUploadingProgressChangedEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlUploadingProgressChangedEventArgs): void; +} +/** + * Provides data for the UploadingProgressChanged event. + */ +interface ASPxClientUploadControlUploadingProgressChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets the number of the files selected for upload. + * Value: An integer value that represents the total number of selected files. + */ + fileCount: number; + /** + * Gets the name of the file being currently uploaded. + * Value: A string value that represents the file name. + */ + currentFileName: string; + /** + * Gets the content length of the currently uploaded file. + * Value: An integer value specifying the content length. + */ + currentFileContentLength: number; + /** + * Gets the content length of the current file already uploaded to the server. + * Value: An integer value that is the content length. + */ + currentFileUploadedContentLength: number; + /** + * Gets the position of the current file upload progress. + * Value: An value specifying the upload progress position. + */ + currentFileProgress: number; + /** + * Gets the content length of the files selected for upload. + * Value: An integer value specifying the total content length of the selected files. + */ + totalContentLength: number; + /** + * Gets the content length of the files already uploaded to the server. + * Value: An integer value that represents the content length. + */ + uploadedContentLength: number; + /** + * Gets the current position of total upload progress. + * Value: An value specifying the total upload progress position. + */ + progress: number; +} +/** + * A method that will handle the ValidationErrorOccurred client event. + */ +interface ASPxClientUploadControlValidationErrorOccurredEventHandler { + /** + * A method that will handle the ValidationErrorOccurred event. + * @param source The event source. + * @param e An ASPxClientUploadControlValidationErrorOccurredEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlValidationErrorOccurredEventArgs): void; +} +/** + * Provides data for the ValidationErrorOccurred event. + */ +interface ASPxClientUploadControlValidationErrorOccurredEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets the error text. + * Value: A string value that represents the error text. + */ + errorText: string; + /** + * Gets or sets a value specifying whether an alert message is displayed when the ValidationErrorOccurred event fires. + * Value: true, to display an alert message; otherwise, false. + */ + showAlert: boolean; + /** + * Gets the validation settings for the selected files. + * Value: An ASPxClientUploadControlValidationSettings object that provides validation settings. + */ + validationSettings: ASPxClientUploadControlValidationSettings; + /** + * Returns an array of invalid files. + * Value: An array of the ASPxClientUploadControlInvalidFileInfo objects. + */ + invalidFiles: ASPxClientUploadControlInvalidFileInfo[]; +} +/** + * Contains settings that relate to the ValidationErrorOccurred client event. + */ +interface ASPxClientUploadControlValidationSettings { + /** + * Gets the maximum file size. + * Value: An value that specifies the maximum file size, in bytes. + */ + maxFileSize: any; + /** + * Gets the maximum count of files that can be selected for uploading at once. + * Value: An integer value that specifies the maximum count of files. + */ + maxFileCount: number; + /** + * Gets the allowed file extensions. + * Value: An array of string values that contains file extensions that are allowed. + */ + allowedFileExtensions: string[]; + /** + * Gets which characters in a file name are not allowed. + * Value: An array of string values that contains characters that are not allowed. + */ + invalidFileNameCharacters: string[]; +} +/** + * Contains settings of the file that hasn't passed validation. + */ +interface ASPxClientUploadControlInvalidFileInfo { + /** + * Gets the name of the invalid file. + * Value: A string value that specifies the file name. + */ + fileName: string; + /** + * Gets the size of the invalid file. + * Value: An integer value that specifies the file size. + */ + fileSize: number; + /** + * Gets the error type. + * Value: An ASPxClientUploadControlValidationErrorTypeConsts object that provides possible types of errors. + */ + errorType: ASPxClientUploadControlValidationErrorTypeConsts; +} +/** + * Declares client constants containing codes of validation errors that can occur while selecting files for uploading. + */ +interface ASPxClientUploadControlValidationErrorTypeConsts { +} +/** + * Represents a client file that corresponds to a particular file selected for uploading in the upload control. + */ +interface ASPxClientUploadControlFile { + /** + * Gets the name of the file selected for uploading. + * Value: A string value that specifies the file's name. + */ + name: string; + /** + * Gets the size of the file selected for uploading. + * Value: An Int64 value specifying the file's size, in bytes. + */ + size: any; + /** + * Provides access to the file as a native Javascript object. + * Value: A JavaScript object that is the file selected for uploading. + */ + sourceFileObject: any; +} +/** + * A method that will handle the DropZoneEnter event. + */ +interface ASPxClientUploadControlDropZoneEnterEventHandler { + /** + * A method that will handle the DropZoneEnter event. + * @param source The event source. This parameter identifies the upload control object which raised the event. + * @param e An ASPxClientUploadControlDropZoneEnterEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlDropZoneEnterEventArgs): void; +} +/** + * Provides data for the DropZoneEnter event. + */ +interface ASPxClientUploadControlDropZoneEnterEventArgs extends ASPxClientEventArgs { + /** + * Gets a drop zone object related to the processed event. + * Value: An object that is a drop zone related to the processed event. + */ + dropZone: Object; +} +/** + * A method that will handle the DropZoneLeave event. + */ +interface ASPxClientUploadControlDropZoneLeaveEventHandler { + /** + * A method that will handle the DropZoneLeave event. + * @param source The event source. Identifies the upload control object that raised the event. + * @param e A ASPxClientUploadControlDropZoneLeaveEventArgs object that contains event data. + */ + (source: S, e: ASPxClientUploadControlDropZoneLeaveEventArgs): void; +} +/** + * Provides data for the DropZoneLeave event. + */ +interface ASPxClientUploadControlDropZoneLeaveEventArgs extends ASPxClientEventArgs { + /** + * Gets a drop zone object related to the processed event. + * Value: An object that is a drop zone related to the processed event. + */ + dropZone: Object; +} +/** + * The JavaScript equivalent of the ASPxChartDesigner class. + */ +interface ASPxClientChartDesigner extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientChartDesigner. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs when executing the Save command on the client. + */ + SaveCommandExecute: ASPxClientEvent>; + /** + * Enables you to customize the menu actions of a Client Chart Designer. + */ + CustomizeMenuActions: ASPxClientEvent>; + /** + * 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. + */ + PerformCallback(arg: string): void; + /** + * 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; + /** + * Updates the localization settings of the ASPxClientChartDesigner properties. + * @param localization A dictionary containing the property names, along with their localized equivalents. + */ + UpdateLocalization(localization: { [key: string]: string; }): void; + /** + * Returns the model of the Client Chart Designer. + */ + GetDesignerModel(): Object; + /** + * For internal use. + */ + GetJsonChartModel(): string; +} +/** + * A method that will handle the SaveCommandExecute event. + */ +interface ASPxClientChartDesignerSaveCommandExecuteEventHandler { + /** + * Represents a method that will handle the SaveCommandExecute event. + * @param source The event source. This parameter identifies the ASPxChartDesigner which raised the event. + * @param e A ASPxClientChartDesignerSaveCommandExecuteEventArgs object which contains event data. + */ + (source: S, e: ASPxClientChartDesignerSaveCommandExecuteEventArgs): void; +} +/** + * Provides data for a chart control's SaveCommandExecute event. + */ +interface ASPxClientChartDesignerSaveCommandExecuteEventArgs extends ASPxClientEventArgs { + /** + * Gets or sets a value specifying whether an event has been handled. + * Value: true, if the event hasn't been handled by a control; otherwise, false. + */ + handled: boolean; +} +/** + * Represents a method that will handle the CustomizeMenuActions events. + */ +interface ASPxClientChartDesignerCustomizeMenuActionsEventHandler { + /** + * Represents a method that will handle the CustomizeMenuActions event. + * @param source The event source. This parameter identifies the ASPxChartDesigner which raised the event. + * @param e An ASPxClientChartDesignerCustomizeMenuActionsEventArgs object which contains event data. + */ + (source: S, e: ASPxClientChartDesignerCustomizeMenuActionsEventArgs): void; +} +/** + * An action of the Client Chart Designer's menu. + */ +interface ASPxClientChartDesignerMenuAction { + /** + * Provides access to the text for the command. + * Value: A String value. + */ + text: string; + /** + * Provides access to the CSS class of the command's glyph. + * Value: A String value. + */ + imageClassName: string; + /** + * Provides access to the action performed when the Client Chart Designer's button is clicked. + * Value: The specific action implementation. + */ + clickAction: Function; + /** + * Provides access to the value that specifies whether or not the command is disabled by default. + * Value: true, if the command is disabled by default; otherwise, false. + */ + disabled: boolean; + /** + * Provides access to the value that specifies whether or not the command is visible in the designer user interface. + * Value: true if the command is visible; otherwise false. + */ + visible: boolean; + /** + * Provides access to the keyboard shortcut used to invoke the command. + * Value: A String value. + */ + hotKey: string; + /** + * Provides access to the value that specifies whether or not the command has a visual separator. + * Value: true, if the command has a visual separator; otherwise, false. + */ + hasSeparator: string; + /** + * Provides access to the location of the displayed command. + * Value: A String value. + */ + container: string; +} +/** + * Provides data for a chart control's CustomizeMenuActions event on the client side. + */ +interface ASPxClientChartDesignerCustomizeMenuActionsEventArgs extends ASPxClientEventArgs { + /** + * Returns an array of the Client Chart Designer's menu actions. + * Value: An array of the ASPxClientChartDesignerMenuAction objects. + */ + actions: ASPxClientChartDesignerMenuAction[]; +} +/** + * A class which provides access to the entire hierarchy of chart elements on the client side. + */ +interface ASPxClientWebChartControl extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client side after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientWebChartControl. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side when any chart element is hot-tracked. + */ + ObjectHotTracked: ASPxClientEvent>; + /** + * Occurs before crosshair items are drawn when the chart's contents are being drawn. + */ + CustomDrawCrosshair: ASPxClientEvent>; + /** + * Occurs on the client side when any chart element is selected. + */ + ObjectSelected: ASPxClientEvent>; + /** + * Returns an ASPxClientWebChart object, which contains information about the hierarchy of a chart control, and provides access to the main properties of chart elements on the client side. + */ + GetChart(): ASPxClientWebChart; + /** + * Returns the printing options of the chart control. + */ + GetPrintOptions(): ASPxClientChartPrintOptions; + /** + * Changes the mouse pointer, which is shown when the mouse is over the chart control, to the pointer with the specified name. + * @param cursor A string value representing the name of the desired cursor. + */ + SetCursor(cursor: string): void; + /** + * Returns the specific chart element which is located under the test point. + * @param x An integer value that specifies the x coordinate of the test point. + * @param y An integer value that specifies the y coordinate of the test point. + */ + HitTest(x: number, y: number): ASPxClientHitObject[]; + /** + * 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. + */ + PerformCallback(args: string): void; + /** + * 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; + /** + * Prints the current chart on the client side. + */ + Print(): void; + /** + * Loads a chart which should be customized from its object model. + * @param serializedChartObjectModel A String object representing the chart model. + */ + LoadFromObjectModel(serializedChartObjectModel: string): void; + /** + * Exports a chart to the file of the specified format, and saves it to the disk. + * @param format A string value specifying the format, to which a chart should be exported. + */ + SaveToDisk(format: string): void; + /** + * Exports a chart to a file in the specified format, and saves it to disk, using the specified file name. + * @param format A string value specifying the format, to which a chart should be exported. + * @param filename A string value specifying the file name, to which a chart should be exported. If this parameter is missing or set to an empty string, then the created file will be named using the client-side name of a chart. + */ + SaveToDisk(format: string, filename: string): void; + /** + * Exports a report to the file of the specified format, and shows it in a new Web Browser window. + * @param format A string value specifying a format in which a report should be exported. + */ + SaveToWindow(format: string): void; + /** + * Gets the main DOM (Document Object Model) element on a Web Page representing this ASPxClientWebChartControl object. + */ + GetMainDOMElement(): Object; +} +/** + * A method that will handle the CustomDrawCrosshair event. + */ +interface ASPxClientWebChartControlCustomDrawCrosshairEventHandler { + /** + * A method that will handle the CustomDrawCrosshair event. + * @param source The event source. This parameter identifies the chartControl which raised the event. + * @param e An ASPxClientWebChartControlCustomDrawCrosshairEventArgs object which contains event data. + */ + (source: S, e: ASPxClientWebChartControlCustomDrawCrosshairEventArgs): void; +} +/** + * Provides data for a chart control's CustomDrawCrosshair event. + */ +interface ASPxClientWebChartControlCustomDrawCrosshairEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets crosshair elements settings to custom draw a crosshair cursor. + * Value: An ASPxClientCrosshairElement object. + */ + crosshairElements: ASPxClientCrosshairElement; + /** + * Gets the settings of crosshair axis label elements to customize their appearance. + * Value: An ASPxClientCrosshairAxisLabelElement object. + */ + cursorCrosshairAxisLabelElements: ASPxClientCrosshairAxisLabelElement; + /** + * Gets crosshair line element settings that are used to custom draw a crosshair cursor. + * Value: An ASPxClientCrosshairLineElement object that contains crosshair line element settings. + */ + cursorCrosshairLineElement: ASPxClientCrosshairLineElement; + /** + * Gets the settings of crosshair group header elements to customize their appearance. + * Value: An ASPxClientCrosshairGroupHeaderElement object. + */ + crosshairGroupHeaderElements: ASPxClientCrosshairGroupHeaderElement; + /** + * Provides access to the settings of crosshair elements and crosshair group header elements to customize their appearance. + * Value: An ASPxClientCrosshairElementGroup object. + */ + crosshairElementGroups: ASPxClientCrosshairElementGroup; +} +/** + * Represents the client-side equivalent of the CrosshairElement class. + */ +interface ASPxClientCrosshairElement { + /** + * Gets a series that a crosshair element hovers over when implementing a custom draw. + * Value: An ASPxClientSeries object which represents the series currently being painted. + */ + Series: ASPxClientSeries; + /** + * Gets the series point that a crosshair element hovers over when implementing a custom draw. + * Value: An ASPxClientSeriesPoint object, representing the series point that a crosshair element hovers over. + */ + Point: ASPxClientSeriesPoint; + /** + * Gets or sets the crosshair line element to custom draw a crosshair cursor. + * Value: An ASPxClientCrosshairLineElement object, representing the crosshair line element. + */ + LineElement: ASPxClientCrosshairLineElement; + /** + * Provides access to the crosshair axis label element. + * Value: An ASPxClientCrosshairAxisLabelElement object, representing the crosshair axis label element. + */ + AxisLabelElement: ASPxClientCrosshairAxisLabelElement; + /** + * Gets the crosshair label element. + * Value: An ASPxClientCrosshairSeriesLabelElement object, representing the crosshair label element. + */ + LabelElement: ASPxClientCrosshairSeriesLabelElement; + /** + * Specifies whether the crosshair element is visible when implementing custom drawing in the crosshair cursor. + * Value: true, if the crosshair element is visible; otherwise, false. + */ + visible: boolean; +} +/** + * Represents the client-side equivalent of the CrosshairLineElement class. + */ +interface ASPxClientCrosshairLineElement { +} +/** + * Represents the client-side equivalent of the CrosshairAxisLabelElement class. + */ +interface ASPxClientCrosshairAxisLabelElement { +} +/** + * The client-side equivalent of the CrosshairGroupHeaderElement class. + */ +interface ASPxClientCrosshairGroupHeaderElement { +} +/** + * The client-side equivalent of the CrosshairLabelElement class. + */ +interface ASPxClientCrosshairSeriesLabelElement { +} +/** + * Represents the client-side equivalent of the CrosshairElementGroup class. + */ +interface ASPxClientCrosshairElementGroup { +} +/** + * Represents a method that will handle the ObjectSelected events. + */ +interface ASPxClientWebChartControlHotTrackEventHandler { + /** + * Represents a method that will handle the ObjectSelected events. + * @param source The event source. This parameter identifies the ASPxClientWebChartControl which raised the event. + * @param e An ASPxClientWebChartControlHotTrackEventArgs object which contains event data. + */ + (source: S, e: ASPxClientWebChartControlHotTrackEventArgs): void; +} +/** + * Provides data for a chart control's ObjectSelected events on the client side. + */ +interface ASPxClientWebChartControlHotTrackEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Provides access on the client side to the chart element, for which the event was raised. + * Value: An ASPxClientWebChartElement object, which represents the chart element for which the event was raised. + */ + hitObject: ASPxClientWebChartElement; + /** + * Provides access on the client side to the object, which is in some way related to the object being hit. The returned value depends on the hitObject type and hit point location. + * Value: An ASPxClientWebChartElement object representing an additional object that relates to the one being hit. + */ + additionalHitObject: ASPxClientWebChartElement; + /** + * Gets details on the chart elements located at the point where an end-user has clicked when hot-tracking or selecting a chart element on the client side. + * Value: An ASPxClientWebChartHitInfo object, which contains information about the chart elements located at the point where an end-user has clicked. + */ + hitInfo: ASPxClientWebChartHitInfo; + /** + * Provides access on the client side to the chart and all its elements. + * Value: An ASPxClientWebChart object, which provides access to chart properties. + */ + chart: ASPxClientWebChart; + /** + * Gets the HTML object that contains the processed item. + * Value: An object representing a container for the item related to the event. + */ + htmlElement: Object; + /** + * Gets the X-coordinate of the hit test point, relative to the top left corner of the chart. + * Value: An integer value specifying X-coordinate of the hit test point (in pixels). + */ + x: number; + /** + * Gets the Y-coordinate of the hit test point, relative to the top left corner of the chart. + * Value: An integer value specifying Y-coordinate of the hit test point (in pixels). + */ + y: number; + /** + * Gets the X-coordinate of the hit test point, relative to the top left corner of the Web Page containing this chart. + * Value: An integer value specifying X-coordinate of the hit test point (in pixels). + */ + absoluteX: number; + /** + * Gets the Y-coordinate of the hit test point, relative to the top left corner of the Web Page containing this chart. + * Value: An integer value specifying Y-coordinate of the hit test point (in pixels). + */ + absoluteY: number; + /** + * Gets a value indicating whether the hot-tracking or object selection should be canceled. + * Value: true to cancel the hot-tracking or selection of an object; otherwise, false. + */ + cancel: boolean; +} +/** + * Represents an object under the hit test point within a chart control, on the client side. + */ +interface ASPxClientHitObject { + /** + * Gets the chart element for which the event was raised. + * Value: An ASPxClientWebChartElement object, representing the chart element for which the event was raised. + */ + Object: ASPxClientWebChartElement; + /** + * Provides access to an object, which is in some way related to the object being hit. The returned value depends on the Object type and hit point location. + * Value: An ASPxClientWebChartElement object that represents an additional object related to the one being hit. + */ + AdditionalObject: ASPxClientWebChartElement; +} +/** + * Contains information about a specific test point within a chart control, on the client side. + */ +interface ASPxClientWebChartHitInfo { + /** + * Gets a value indicating whether the test point is within the chart. + * Value: true if the test point is within a chart; otherwise, false. + */ + inChart: boolean; + /** + * Gets a value indicating whether the test point is within the chart title. + * Value: true if the test point is within a chart title; otherwise, false. + */ + inChartTitle: boolean; + /** + * Gets a value indicating whether the test point is within the axis. + * Value: true if the test point is within an axis; otherwise, false. + */ + inAxis: boolean; + /** + * Gets a value indicating whether the test point is within the axis label item. + * Value: true if the test point is within an axis label item; otherwise, false. + */ + inAxisLabelItem: boolean; + /** + * Gets a value indicating whether the test point is within the axis title. + * Value: true if the test point is within an axis title; otherwise, false. + */ + inAxisTitle: boolean; + /** + * Gets a value indicating whether the test point is within the constant line. + * Value: true if the test point is within a constant line; otherwise, false. + */ + inConstantLine: boolean; + /** + * Gets a value indicating whether the test point is within the diagram. + * Value: true if the test point is within a diagram; otherwise, false. + */ + inDiagram: boolean; + /** + * Gets a value indicating whether the test point is within the non-default pane. + * Value: true if the test point is within a non-default pane; otherwise, false. + */ + inNonDefaultPane: boolean; + /** + * Gets a value indicating whether the test point is within the legend. + * Value: true if the test point is within a legend; otherwise, false. + */ + inLegend: boolean; + /** + * Gets the value indicating whether or not the test point is within a custom legend item. + * Value: true if the test point is within a custom legend item; otherwise, false. + */ + inCustomLegendItem: boolean; + /** + * Gets a value indicating whether the test point is within the series. + * Value: true if the test point is within a series; otherwise, false. + */ + inSeries: boolean; + /** + * Gets a value indicating whether the test point is within the series label. + * Value: true if the test point is within a series label; otherwise, false. + */ + inSeriesLabel: boolean; + /** + * Gets a value indicating whether the test point is within the series point. + * Value: true if the test point is within a series point; otherwise, false. + */ + inSeriesPoint: boolean; + /** + * Gets a value indicating whether the test point is within the series title. + * Value: true if the test point is within a series title; otherwise, false. + */ + inSeriesTitle: boolean; + /** + * Gets a value indicating whether the test point is within the trendline. + * Value: true if the test point is within a trendline; otherwise, false. + */ + inTrendLine: boolean; + /** + * Gets a value indicating whether the test point is within the Fibonacci Indicator. + * Value: true if the test point is within a Fibonacci Indicator; otherwise, false. + */ + inFibonacciIndicator: boolean; + /** + * Gets a value indicating whether the test point is within the regression line. + * Value: true if the test point is within a regression line; otherwise, false. + */ + inRegressionLine: boolean; + /** + * Gets a value specifying whether the test point is within an indicator. + * Value: true if the test point is within an indicator; otherwise, false. + */ + inIndicator: boolean; + /** + * Gets a value indicating whether the test point is within an annotation. + * Value: true if the test point is within an annotation; otherwise, false. + */ + inAnnotation: boolean; + /** + * Gets a value indicating whether the test point is within a hyperlink. + * Value: true, if the test point is within a hyperlink; otherwise, false. + */ + inHyperlink: boolean; + /** + * Gets the client-side chart instance from under the test point. + * Value: An ASPxClientWebChart object. + */ + chart: ASPxClientWebChart; + /** + * Gets the client-side chart title instance from under the test point. + * Value: An ASPxClientChartTitle object. + */ + chartTitle: ASPxClientChartTitle; + /** + * Gets the client-side axis instance from under the test point. + * Value: An ASPxClientAxisBase descendant. + */ + axis: ASPxClientAxisBase; + /** + * Gets the client-side constant line instance from under the test point. + * Value: An ASPxClientConstantLine object. + */ + constantLine: ASPxClientConstantLine; + /** + * Gets the client-side diagram instance from under the test point. + * Value: An ASPxClientXYDiagramBase descendant. + */ + diagram: ASPxClientXYDiagramBase; + /** + * Gets the client-side non-default pane instance from under the test point. + * Value: An ASPxClientXYDiagramPane object. + */ + nonDefaultPane: ASPxClientXYDiagramPane; + /** + * Gets the client-side legend instance from under the test point. + * Value: An ASPxClientLegend object. + */ + legend: ASPxClientLegend; + /** + * Gets a custom legend item which is located under the test point. + * Value: An ASPxClientCustomLegendItem object which represents the item located under the test point. + */ + customLegendItem: ASPxClientCustomLegendItem; + /** + * Gets the client-side series instance from under the test point. + * Value: An ASPxClientSeries object. + */ + series: ASPxClientSeries; + /** + * Gets the client-side series label instance from under the test point. + * Value: An ASPxClientSeriesLabel object. + */ + seriesLabel: ASPxClientSeriesLabel; + /** + * Gets the client-side series title instance from under the test point. + * Value: An ASPxClientSeriesTitle object. + */ + seriesTitle: ASPxClientSeriesTitle; + /** + * Gets the client-side trendline instance from under the test point. + * Value: An ASPxClientTrendLine object. + */ + trendLine: ASPxClientTrendLine; + /** + * Gets the client-side Fibonacci indicator instance from under the test point. + * Value: An ASPxClientFibonacciIndicator object. + */ + fibonacciIndicator: ASPxClientFibonacciIndicator; + /** + * Gets the client-side regression line instance from under the test point. + * Value: An ASPxClientRegressionLine object. + */ + regressionLine: ASPxClientRegressionLine; + /** + * Gets the client-side indicator instance from under the test point. + * Value: An ASPxClientIndicator descendant. + */ + indicator: ASPxClientIndicator; + /** + * Gets the client-side annotation instance from under the test point. + * Value: An ASPxClientAnnotation object. + */ + annotation: ASPxClientAnnotation; + /** + * Gets the client-side series point instance from under the test point. + * Value: An ASPxClientSeriesPoint object. + */ + seriesPoint: ASPxClientSeriesPoint; + /** + * Gets the client-side axis label item instance from under the test point. + * Value: An ASPxClientAxisLabelItem object. + */ + axisLabelItem: ASPxClientAxisLabelItem; + /** + * Gets the client-side axis title instance from under the test point. + * Value: An ASPxClientAxisTitle object. + */ + axisTitle: ASPxClientAxisTitle; + /** + * Returns a hyperlink which is located under the test point. + * Value: A String object representing a hyperlink. + */ + hyperlink: string; +} +/** + * Represents the client-side equivalent of the DiagramCoordinates class. + */ +interface ASPxClientDiagramCoordinates { + /** + * Gets the type of the argument scale. + * Value: A string object which contains the current scale type. + */ + argumentScaleType: string; + /** + * Gets the type of the value scale. + * Value: A string object which contains the current scale type. + */ + valueScaleType: string; + /** + * Gets the argument of the data point as a text string. + * Value: A string object, representing a data point's argument. + */ + qualitativeArgument: string; + /** + * Gets the numerical representation of the data point's argument. + * Value: A Double value, representing the data point's argument. + */ + numericalArgument: number; + /** + * Gets the date-time representation of the data point's argument. + * Value: A date object, representing the point's argument. + */ + dateTimeArgument: Date; + /** + * Gets the numerical representation of the data point's value. + * Value: A Double value, representing the data point's value. + */ + numericalValue: number; + /** + * Gets the date-time representation of the data point's value. + * Value: A date object, representing the point's value. + */ + dateTimeValue: Date; + /** + * Gets the X-axis 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. + * Value: An ASPxClientAxisBase descendant, representing the axis of values (Y-axis). + */ + axisY: ASPxClientAxisBase; + /** + * Gets the pane of the diagram point. + * Value: An ASPxClientXYDiagramPane descendant, representing the pane. + */ + pane: ASPxClientXYDiagramPane; + /** + * Checks whether the current object represents a point outside the diagram area. + */ + IsEmpty(): boolean; + /** + * Gets the value of the client-side axis instance. + * @param axis An ASPxClientAxisBase class descendant, representing the axis that contains the requested value. + */ + GetAxisValue(axis: ASPxClientAxisBase): ASPxClientAxisValue; +} +/** + * Contains the information about an axis value. + */ +interface ASPxClientAxisValue { + /** + * Gets the axis scale type. + * Value: A String value, specifying the axis scale type. + */ + scaleType: string; + /** + * Gets the axis value, if the axis scale type is qualitative. + * Value: A String value, specifying the axis value. + */ + qualitativeValue: string; + /** + * Gets the axis value, if the axis scale type is numerical. + * Value: A Double value, specifying the axis value. + */ + numericalValue: number; + /** + * Gets the axis value, if the axis scale type is date-time. + * Value: A DateTime value, specifying the axis value. + */ + dateTimeValue: Date; +} +/** + * Represents the client-side equivalent of the ControlCoordinates class. + */ +interface ASPxClientControlCoordinates { + /** + * Gets the point's pane. + * Value: An ASPxClientXYDiagramPane object. + */ + pane: ASPxClientXYDiagramPane; + /** + * Gets the point's X-coordinate, in pixels. + * Value: An integer value, specifying the X-coordinate (in pixels). + */ + x: number; + /** + * Gets the point's Y-coordinate, in pixels. + * Value: An integer value, specifying the Y-coordinate (in pixels). + */ + y: number; + /** + * Gets the point's visibility state. + * Value: "Visible", "Hidden", or "Undefined". + */ + visibility: string; +} +/** + * Represents the client-side equivalent of the ChartElement class. + */ +interface ASPxClientWebChartElement { + /** + * Gets the chart that owns the current chart element. + * Value: An ASPxClientWebChart object, to which the chart element belongs. + */ + chart: ASPxClientWebChart; +} +/** + * Represents a base class for chart elements, which are not necessarily required to be present on the client side. + */ +interface ASPxClientWebChartEmptyElement extends ASPxClientWebChartElement { +} +/** + * Represents a base class for chart elements, which are required to be present on the client side. + */ +interface ASPxClientWebChartRequiredElement extends ASPxClientWebChartElement { +} +/** + * Represents the client-side equivalent of the ChartElementNamed class. + */ +interface ASPxClientWebChartElementNamed extends ASPxClientWebChartRequiredElement { + /** + * Gets the name of the chart element. + * Value: A string object representing the name of the chart element. + */ + name: string; +} +/** + * Represents the client-side equivalent of the WebChartControl control. + */ +interface ASPxClientWebChart extends ASPxClientWebChartRequiredElement { + /** + * Gets the client-side Chart Control that owns the current chart. + * Value: An ASPxClientWebChartControl object, to which the chart belongs. + */ + chartControl: ASPxClientWebChartControl; + /** + * Gets the chart's diagram and provides access to its settings. + * Value: An ASPxClientRadarDiagram), that represents the chart's diagram. + */ + diagram: ASPxClientWebChartElement; + /** + * Provides access to the chart's collection of series. + * Value: An array of ASPxClientSeries objects that represent the collection of series. + */ + series: ASPxClientSeries[]; + /** + * Provides access to the collection of chart titles. + * Value: An array of ASPxClientChartTitle objects, that represent the collection of chart titles. + */ + titles: ASPxClientChartTitle[]; + /** + * Provides access to the chart's collection of annotations. + * Value: An array of ASPxClientAnnotation objects, representing the collection of annotations. + */ + annotations: ASPxClientAnnotation[]; + /** + * Gets the chart's legend and provides access to its settings. + * Value: An ASPxClientLegend object that represents the chart's legend. + */ + legend: ASPxClientLegend; + /** + * Returns the collection of legends. + * Value: An array of ASPxClientLegend objects. + */ + legends: ASPxClientLegend[]; + /** + * Gets the name of the appearance, which is currently used to draw the chart's elements. + * Value: A string value that represents the appearance name. + */ + appearanceName: string; + /** + * Gets the name of the palette currently used to draw the chart's series. + * Value: A string value that represents the palette name. + */ + paletteName: string; + /** + * Gets a value indicating whether series tooltips should be shown. + * Value: true to show tooltips for series; otherwise, false. + */ + showSeriesToolTip: boolean; + /** + * Gets a value indicating whether point tooltips should be shown. + * Value: true to show tooltips for series points; otherwise, false. + */ + showPointToolTip: boolean; + /** + * Gets a value indicating whether a crosshair cursor should be shown. + * Value: true to show a crosshair cursor; otherwise, false. + */ + showCrosshair: boolean; + /** + * Gets a value that contains information on how the tooltip position is defined, for example, relative to a mouse pointer or chart element. + * Value: An ASPxClientToolTipPosition class descendant that defines the tooltip position type. + */ + toolTipPosition: ASPxClientToolTipPosition; + /** + * Returns the tooltip controller that shows tooltips for chart elements. + * Value: An ASPxClientToolTipController object. + */ + toolTipController: ASPxClientToolTipController; + /** + * Gets the settings for a crosshair cursor concerning its position and appearance on a diagram. + * Value: An ASPxClientCrosshairOptions object descendant which provides access to crosshair cursor options on a diagram. + */ + crosshairOptions: ASPxClientCrosshairOptions; + /** + * Gets a css postfix for a chart. + * Value: A string value. + */ + cssPostfix: string; + /** + * Gets or sets a value which specifies how the chart elements are selected. + * Value: A String object representing the name of the selection mode. + */ + selectionMode: string; +} +/** + * Represents the client-side equivalent of the SimpleDiagram class. + */ +interface ASPxClientSimpleDiagram extends ASPxClientWebChartEmptyElement { +} +/** + * Represents the base class for all diagram classes, which have X and Y axes. + */ +interface ASPxClientXYDiagramBase extends ASPxClientWebChartRequiredElement { + /** + * Gets the X-axis. + * Value: An ASPxClientAxisBase object which represents the X-axis. + */ + axisX: ASPxClientAxisBase; + /** + * Gets the Y-axis. + * Value: An ASPxClientAxisBase object which represents the Y-axis. + */ + axisY: ASPxClientAxisBase; +} +/** + * Represents the client-side equivalent of the XYDiagram2D class. + */ +interface ASPxClientXYDiagram2D extends ASPxClientXYDiagramBase { + /** + * Provides access to a collection of secondary X-axes for a given 2D XY-diagram. + * Value: An array of ASPxClientAxis objects, that is a collection of secondary X-axes. + */ + secondaryAxesX: ASPxClientAxis[]; + /** + * Provides access to a collection of secondary Y-axes for a given 2D XY-diagram. + * Value: An array of ASPxClientAxis objects, that is a collection of secondary X-axes. + */ + secondaryAxesY: ASPxClientAxis[]; + /** + * Provides access to a default pane 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. + * Value: An array of ASPxClientXYDiagramPane objects. + */ + panes: ASPxClientXYDiagramPane[]; + /** + * Converts the display coordinates into a diagram coordinates object. + * @param x An integer value, representing the X-coordinate of a point (measured in pixels relative to the top left corner of a chart). + * @param y An integer value, representing the Y-coordinate of a point (measured in pixels relative to the top left corner of a chart). + */ + PointToDiagram(x: number, y: number): ASPxClientDiagramCoordinates; + /** + * Converts the diagram coordinates of a point into screen coordinates. + * @param argument An object, representing the point's argument. + * @param value An object, representing the point's value. + * @param axisX An ASPxClientAxis2D descendant, representing the X-axis. + * @param axisY An ASPxClientAxis2D descendant, representing the Y-axis. + * @param pane An ASPxClientXYDiagramPane object, representing the pane. + */ + DiagramToPoint(argument: Object, value: Object, axisX: ASPxClientAxis2D, axisY: ASPxClientAxis2D, pane: ASPxClientXYDiagramPane): ASPxClientControlCoordinates; + /** + * Shows the Crosshair Cursor at the point with the specified coordinates. + * @param screenX The horizontal coordinate that is related to the top-left angle of the chart. + * @param screenY The vertical coordinate that is related to the top-left angle of the chart. + */ + ShowCrosshair(screenX: number, screenY: number): void; +} +/** + * Represents the client-side equivalent of the XYDiagram class. + */ +interface ASPxClientXYDiagram extends ASPxClientXYDiagram2D { + /** + * Gets a value indicating whether the diagram is rotated. + * Value: true if the diagram is rotated; otherwise, false. + */ + rotated: boolean; +} +/** + * Represents the client-side equivalent of the SwiftPlotDiagram class. + */ +interface ASPxClientSwiftPlotDiagram extends ASPxClientXYDiagram2D { +} +/** + * Represents the client-side equivalent of the XYDiagramPane class. + */ +interface ASPxClientXYDiagramPane extends ASPxClientWebChartElementNamed { + /** + * Gets the diagram that owns the current pane object. + * Value: An ASPxClientXYDiagram object, to which the pane belongs. + */ + diagram: ASPxClientXYDiagram; +} +/** + * Represents the client-side equivalent of the XYDiagram3D class. + */ +interface ASPxClientXYDiagram3D extends ASPxClientXYDiagramBase { +} +/** + * Represents the client-side equivalent of the RadarDiagram class. + */ +interface ASPxClientRadarDiagram extends ASPxClientXYDiagramBase { + /** + * Converts the display coordinates into a diagram coordinates object. + * @param x An integer value, representing the X-coordinate of a point (measured in pixels relative to the top left corner of a chart). + * @param y An integer value, representing the Y-coordinate of a point (measured in pixels relative to the top left corner of a chart). + */ + PointToDiagram(x: number, y: number): ASPxClientDiagramCoordinates; + /** + * Converts the diagram coordinates of a point into screen coordinates. + * @param argument An object, representing the point's argument. + * @param value An object, representing the point's value. + */ + DiagramToPoint(argument: Object, value: Object): ASPxClientControlCoordinates; +} +/** + * Represents the client-side equivalent of the AxisBase class. + */ +interface ASPxClientAxisBase extends ASPxClientWebChartElementNamed { + /** + * Provides access to the XY-diagram which contains the current axis. + * Value: An ASPxClientXYDiagramBase class descendant. + */ + diagram: ASPxClientXYDiagramBase; + /** + * Provides acess to the range of the axis coordinates. + * Value: An ASPxClientAxisRange object, which contains the common range settings of the axis coordinates. + */ + range: ASPxClientAxisRange; +} +/** + * Represents the client-side equivalent of the Axis2D class. + */ +interface ASPxClientAxis2D extends ASPxClientAxisBase { + /** + * Provides access to an axis title object. + * Value: An ASPxClientAxisTitle object which represents the axis title. + */ + axisTitle: ASPxClientAxisTitle; + /** + * Provides access to the axis strips collection. + * Value: An array of ASPxClientStrip objects. + */ + strips: ASPxClientStrip[]; + /** + * Provides access to the collection of the axis constant lines. + * Value: An array of ASPxClientConstantLine objects which represent constant lines that belong to this axis. + */ + constantLines: ASPxClientConstantLine[]; +} +/** + * Represents the client-side equivalent of the Axis class. + */ +interface ASPxClientAxis extends ASPxClientAxis2D { + /** + * Gets a value indicating whether the axis is reversed. + * Value: true if the axis is reversed; otherwise, false. + */ + reverse: boolean; +} +/** + * Represents the client-side equivalent of the SwiftPlotDiagramAxis class. + */ +interface ASPxClientSwiftPlotDiagramAxis extends ASPxClientAxis2D { +} +/** + * Represents the client-side equivalent of the Axis3D class. + */ +interface ASPxClientAxis3D extends ASPxClientAxisBase { +} +/** + * Represents the client-side equivalent of the RadarAxis class. + */ +interface ASPxClientRadarAxis extends ASPxClientAxisBase { +} +/** + * Represents the client-side equivalent of the AxisTitle class. + */ +interface ASPxClientAxisTitle extends ASPxClientWebChartRequiredElement { + /** + * Gets the axis to which the axis title belongs. + * Value: An ASPxClientAxisBase descendant, which identifies the axis. + */ + axis: ASPxClientAxisBase; + /** + * Gets the text of the axis title. + * Value: A string object which contains the axis title's text. + */ + text: string; +} +/** + * Represents the client-side equivalent of the AxisLabelItem class. + */ +interface ASPxClientAxisLabelItem extends ASPxClientWebChartRequiredElement { + /** + * Gets the axis to which an axis label item belongs. + * Value: An ASPxClientAxisBase descendant, which identifies the axis. + */ + axis: ASPxClientAxisBase; + /** + * Gets the text of an axis label item. + * Value: A string object which contains the axis label item's text. + */ + text: string; + /** + * Gets the axis value to which an axis label item corresponds. + * Value: An object that specifies the axis value. + */ + axisValue: Object; + /** + * Gets the internal representation of the axis value to which an axis label item corresponds. + * Value: A Double value which specifies the internal representation of the axis value. + */ + axisValueInternal: number; +} +/** + * Represents the client-side equivalent of the AxisRange class. + */ +interface ASPxClientAxisRange extends ASPxClientWebChartRequiredElement { + /** + * Gets the axis that owns the current axis range object. + * Value: An ASPxClientAxisBase object, to which the axis range belongs. + */ + axis: ASPxClientAxisBase; + /** + * Gets the minimum value to display on an axis. + * Value: An object representing the minimum value of the axis range. + */ + minValue: Object; + /** + * Gets the maximum value to display on an axis. + * Value: An object representing the maximum value of the axis range. + */ + maxValue: Object; + /** + * Gets the internal float representation of the range minimum value. + * Value: A Double value which specifies the internal representation of the range minimum value. + */ + minValueInternal: number; + /** + * Gets the internal float representation of the range maximum value. + * Value: A Double value which specifies the internal representation of the range maximum value. + */ + maxValueInternal: number; +} +/** + * Represents the client-side equivalent of the Strip class. + */ +interface ASPxClientStrip extends ASPxClientWebChartElementNamed { + /** + * Gets the axis that owns the current strip object. + * Value: An ASPxClientAxis object, to which the strip belongs. + */ + axis: ASPxClientAxis; + /** + * Gets the minimum value of the strip's range. + * Value: An object that represents the minimum value of the strip's range. + */ + minValue: Object; + /** + * Gets the maximum value of the strip's range. + * Value: An object that represents the maximum value of the strip's range. + */ + maxValue: Object; +} +/** + * Represents the client-side equivalent of the ConstantLine class. + */ +interface ASPxClientConstantLine extends ASPxClientWebChartElementNamed { + /** + * Gets the axis that owns the current constant line object. + * Value: An ASPxClientAxis object, to which the constant line belongs. + */ + axis: ASPxClientAxis; + /** + * Gets the constant line's position along the axis. + * Value: An object that specifies the constant line's position. + */ + value: Object; + /** + * Gets the constant line title. + * Value: A string object, representing the title's text. + */ + title: string; +} +/** + * Represents the client-side equivalent of the Series class. + */ +interface ASPxClientSeries extends ASPxClientWebChartElementNamed { + /** + * Gets a value that specifies the view type of the series. + * Value: A string object which contains the current view type. + */ + viewType: string; + /** + * Gets a value that specifies the scale type for the argument data of the series' data points. + * Value: A string object which contains the current scale type. + */ + argumentScaleType: string; + /** + * Gets a value that specifies the scale type for the value data of the series' data points. + * Value: A string object which contains the current scale type. + */ + valueScaleType: string; + /** + * Gets the X-Axis that is used to plot the current series on the XY-diagram. + * Value: A string object, which represents the X-axis name. + */ + axisX: string; + /** + * Gets the Y-Axis that is used to plot the current series on the XY-diagram. + * Value: A string object, which represents the Y-axis name. + */ + axisY: string; + /** + * Gets the pane that is used to plot the current series on the XY-diagram. + * Value: A string object, which represents the pane's name. + */ + pane: string; + /** + * Gets a value indicating whether the series is visible. + * Value: true if the series is visible; otherwise, false. + */ + visible: boolean; + /** + * Gets a value that specifies whether or not a tooltip is enabled for a chart. + * Value: true - a tooltip is enabled for a chart; false - a tooltip is disabled. + */ + toolTipEnabled: boolean; + /** + * Gets the text to be displayed within series tooltips. + * Value: A string value. + */ + toolTipText: string; + /** + * Gets an image to be displayed within series tooltips. + * Value: A string value. + */ + toolTipImage: string; + /** + * Gets the settings of series labels. + * Value: An ASPxClientSeriesLabel object, which provides the series label settings. + */ + label: ASPxClientSeriesLabel; + /** + * Gets the series' collection of data points. + * Value: An array of ASPxClientSeriesPoint objects, that represent the series' data points. + */ + points: ASPxClientSeriesPoint[]; + /** + * Provides access to the collection of series titles. + * Value: An array of ASPxClientSeriesTitle objects, that represent the collection of series titles. + */ + titles: ASPxClientSeriesTitle[]; + /** + * Gets the series' collection of indicators. + * Value: An array of ASPxClientIndicator objects, that belong to the series. + */ + indicators: ASPxClientIndicator[]; + /** + * Provides access to the collection of regression lines. + * Value: An array of ASPxClientRegressionLine objects which represent regression lines available for the series. + */ + regressionLines: ASPxClientRegressionLine[]; + /** + * Provides access to the collection of trendlines. + * Value: An array of ASPxClientTrendLine objects, that represent the collection of trendlines. + */ + trendLines: ASPxClientTrendLine[]; + /** + * Provides access to the collection of Fibonacci Indicators. + * Value: An array of ASPxClientFibonacciIndicator objects, that represent the collection of Fibonacci Indicators. + */ + fibonacciIndicators: ASPxClientFibonacciIndicator[]; + /** + * Gets the color of a series. + * Value: A string value. + */ + color: string; + /** + * Gets a value that defines a group for stacked series. + * Value: A string value. + */ + stackedGroup: string; + /** + * Gets a string which represents the pattern specifying the text to be displayed within a crosshair label for the current Series type. + * Value: A Empty. + */ + crosshairLabelPattern: string; + /** + * This property is intended for internal use only. + * Value: A String value. + */ + groupedElementsPattern: string; + /** + * Returns a collection of crosshair value items. + * Value: An array of ASPxClientCrosshairValueItem objects. + */ + crosshairValueItems: ASPxClientCrosshairValueItem[]; + /** + * Gets a value indicating whether a crosshair cursor is enabled. + * Value: true if a crosshair cursor is enabled; otherwise, false. + */ + actualCrosshairEnabled: boolean; + /** + * Gets a value indicating whether a crosshair label should be shown for this series. + * Value: true if crosshair labels are visible; otherwise, false. + */ + actualCrosshairLabelVisibility: boolean; +} +/** + * Represents the client-side equivalent of the SeriesLabelBase class. + */ +interface ASPxClientSeriesLabel extends ASPxClientWebChartElement { + /** + * Gets the series that owns the current series label object. + * Value: An ASPxClientSeries object, to which the series label belongs. + */ + series: ASPxClientSeries; + /** + * Gets the common text for all series point labels. + * Value: Returns an empty string object. + */ + text: string; +} +/** + * Represents the client-side equivalent of the SeriesPoint class. + */ +interface ASPxClientSeriesPoint extends ASPxClientWebChartRequiredElement { + /** + * Gets the series that owns the current series point object. + * Value: An ASPxClientSeries object, to which the series point belongs. + */ + series: ASPxClientSeries; + /** + * Gets the data point's argument. + * Value: An object that specifies the data point's argument. + */ + argument: Object; + /** + * Gets the point's data value(s). + * Value: An array of objects that represent the data value(s) of the series data point. + */ + values: Object[]; + /** + * Gets the text to be displayed within series points tooltips. + * Value: A string value. + */ + toolTipText: string; + /** + * Gets the color of a series point. + * Value: A string value. + */ + color: string; + /** + * Gets the percent value of a series point. + * Value: A float value. + */ + percentValue: number; + /** + * Gets a hint that is shown in series points tooltips. + * Value: A string value. + */ + toolTipHint: string; +} +/** + * Represents the client-side equivalent of the Legend class. + */ +interface ASPxClientLegend extends ASPxClientWebChartEmptyElement { + /** + * Returns a value which determines whether to use checkboxes instead of markers on a chart legend for all legend items. + * Value: true, if legend checkboxes are shown instead of markers for all legend items; otherwise, false. + */ + useCheckBoxes: boolean; + /** + * Returns a collection of custom legend items of the legend. + * Value: A collection of ASPxClientCustomLegendItem objects. + */ + customItems: ASPxClientCustomLegendItem[]; + /** + * Returns the name of the legend. + * Value: The string value representing the name of the legend. + */ + name: string; +} +/** + * Represents the base for ASPxClientSeriesTitle classes. + */ +interface ASPxClientTitleBase extends ASPxClientWebChartRequiredElement { + /** + * Gets the lines of text within a title. + * Value: An array of string values containing the text of a title. + */ + lines: string[]; + /** + * Gets the alignment of the title. + * Value: A string value containing the text, which specifies the alignment of a title. + */ + alignment: string; + /** + * Gets a value that specifies to which edges of a parent element the title should be docked. + * Value: A string value. + */ + dock: string; +} +/** + * Represents the client-side equivalent of the ChartTitle class. + */ +interface ASPxClientChartTitle extends ASPxClientTitleBase { +} +/** + * Represents the client-side equivalent of the SeriesTitle class. + */ +interface ASPxClientSeriesTitle extends ASPxClientTitleBase { + /** + * Gets the series that owns the current title object. + * Value: An ASPxClientSeries object, to which the series title belongs. + */ + series: ASPxClientSeries; +} +/** + * Represents the client-side equivalent of the Indicator class. + */ +interface ASPxClientIndicator extends ASPxClientWebChartElementNamed { + /** + * Gets the indicator's associated series. + * Value: An ASPxClientSeries object. + */ + series: ASPxClientSeries; +} +/** + * Represents the client-side equivalent of the FinancialIndicator class. + */ +interface ASPxClientFinancialIndicator extends ASPxClientIndicator { + /** + * Gets the first point of the financial indicator. + * Value: An ASPxClientFinancialIndicatorPoint object, which represents a financial indicator's first point. + */ + point1: ASPxClientFinancialIndicatorPoint; + /** + * Gets the second point of the financial indicator. + * Value: An ASPxClientFinancialIndicatorPoint object, which represents a financial indicator's second point. + */ + point2: ASPxClientFinancialIndicatorPoint; +} +/** + * Represents the client-side equivalent of the TrendLine class. + */ +interface ASPxClientTrendLine extends ASPxClientFinancialIndicator { +} +/** + * Represents the client-side equivalent of the FibonacciIndicator class. + */ +interface ASPxClientFibonacciIndicator extends ASPxClientFinancialIndicator { +} +/** + * Represents the client-side equivalent of the FinancialIndicatorPoint class. + */ +interface ASPxClientFinancialIndicatorPoint extends ASPxClientWebChartRequiredElement { + /** + * Gets the financial indicator that owns the current financial indicator point. + * Value: An ASPxClientFinancialIndicator object, to which the point belongs. + */ + financialIndicator: ASPxClientFinancialIndicator; + /** + * Gets the argument of the financial indicator's point. + * Value: An object that specifies the point argument. + */ + argument: Object; + /** + * Gets a value, indicating how the value of a financial indicator's point is obtained. + * Value: A string value, which indicates how to obtain a financial indicator point's value. + */ + valueLevel: string; +} +/** + * The client-side equivalent of the SingleLevelIndicator class. + */ +interface ASPxClientSingleLevelIndicator extends ASPxClientIndicator { + /** + * Gets a value specifying the value level to which the single-level indicator corresponds. + * Value: A string value. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the RegressionLine class. + */ +interface ASPxClientRegressionLine extends ASPxClientSingleLevelIndicator { +} +/** + * The client-side equivalent of the MovingAverage class. + */ +interface ASPxClientMovingAverage extends ASPxClientSingleLevelIndicator { + /** + * Gets the number of data points used to calculate the moving average. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value specifying whether to display a Moving Average, Envelope, or both. + * Value: A string value. + */ + kind: string; + /** + * Gets a value specifying the Envelope percent. + * Value: A double value which specifies the Envelope percent. + */ + envelopePercent: number; +} +/** + * The client-side equivalent of the SimpleMovingAverage class. + */ +interface ASPxClientSimpleMovingAverage extends ASPxClientMovingAverage { +} +/** + * The client-side equivalent of the ExponentialMovingAverage class. + */ +interface ASPxClientExponentialMovingAverage extends ASPxClientMovingAverage { +} +/** + * The client-side equivalent of the WeightedMovingAverage class. + */ +interface ASPxClientWeightedMovingAverage extends ASPxClientMovingAverage { +} +/** + * The client-side equivalent of the TriangularMovingAverage class. + */ +interface ASPxClientTriangularMovingAverage extends ASPxClientMovingAverage { +} +/** + * Represents the client-side equivalent of the TripleExponentialMovingAverageTema class. + */ +interface ASPxClientTripleExponentialMovingAverageTema extends ASPxClientMovingAverage { +} +/** + * Represents the client-side equivalent of the BollingerBands class. + */ +interface ASPxClientBollingerBands extends ASPxClientIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value, indicating whose series point values are used to calculate the indicator's values. + * Value: A string value, which indicates which series point value should be used to calculate indicator values. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the MedianPrice class. + */ +interface ASPxClientMedianPrice extends ASPxClientIndicator { +} +/** + * Represents the client-side equivalent of the TypicalPrice class. + */ +interface ASPxClientTypicalPrice extends ASPxClientIndicator { +} +/** + * Represents the client-side equivalent of the WeightedClose class. + */ +interface ASPxClientWeightedClose extends ASPxClientIndicator { +} +/** + * Represents the client-side equivalent of the SeparatePaneIndicator class. + */ +interface ASPxSeparatePaneIndicator extends ASPxClientIndicator { + /** + * Returns the name of the Y-axis that is used to plot the current indicator on a ASPxClientXYDiagram. + * Value: A string value specifying the Y-axis name. + */ + axisY: string; + /** + * Returns the name of a pane, used to plot the separate pane indicator on an XYDiagram. + * Value: A string that is the name of a pane. + */ + pane: string; +} +/** + * Represents the client-side equivalent of the AverageTrueRange class. + */ +interface ASPxClientAverageTrueRange extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; +} +/** + * Represents the client-side equivalent of the ChaikinsVolatility class. + */ +interface ASPxClientChaikinsVolatility extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; +} +/** + * Represents the client-side equivalent of the CommodityChannelIndex class. + */ +interface ASPxClientCommodityChannelIndex extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; +} +/** + * Represents the client-side equivalent of the DetrendedPriceOscillator class. + */ +interface ASPxClientDetrendedPriceOscillator extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value, indicating whose series point values are used to calculate the indicator's values. + * Value: A string value, which indicates which series point value should be used to calculate indicator values. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the MassIndex class. + */ +interface ASPxClientMassIndex extends ASPxSeparatePaneIndicator { + /** + * Returns the count of points used to calculate the exponential moving average (EMA). + * Value: An integer value, specifying the count of points used to calculate EMA. + */ + movingAveragePointsCount: number; + /** + * Returns the count of summable values. + * Value: An integer value specifying the count of summable ratios. + */ + sumPointsCount: number; +} +/** + * Represents the client-side equivalent of the MovingAverageConvergenceDivergence class. + */ +interface ASPxClientMovingAverageConvergenceDivergence extends ASPxSeparatePaneIndicator { + /** + * Returns the short period value required to calculate the indicator. + * Value: An integer value specifying the short period value. + */ + shortPeriod: number; + /** + * Returns the long period value required to calculate the indicator. + * Value: An integer value specifying the long period. + */ + longPeriod: number; + /** + * Returns the smoothing period value required to calculate the indicator. + * Value: An integer value specifying the smoothing period value. + */ + signalSmoothingPeriod: number; +} +/** + * Represents the client-side equivalent of the RateOfChange class. + */ +interface ASPxClientRateOfChange extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value, indicating whose series point values are used to calculate the indicator's values. + * Value: A string value, which indicates which series point value should be used to calculate indicator values. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the RelativeStrengthIndex class. + */ +interface ASPxClientRelativeStrengthIndex extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value, indicating whose series point values are used to calculate the indicator's values. + * Value: A string value, which indicates which series point value should be used to calculate indicator values. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the StandardDeviation class. + */ +interface ASPxClientStandardDeviation extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value, indicating whose series point values are used to calculate the indicator's values. + * Value: A string value, which indicates which series point value should be used to calculate indicator values. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the TripleExponentialMovingAverageTrix class. + */ +interface ASPxClientTripleExponentialMovingAverageTrix extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; + /** + * Gets a value, indicating whose series point values are used to calculate the indicator's values. + * Value: A string value, which indicates which series point value should be used to calculate indicator values. + */ + valueLevel: string; +} +/** + * Represents the client-side equivalent of the WilliamsR class. + */ +interface ASPxClientWilliamsR extends ASPxSeparatePaneIndicator { + /** + * Gets the number of data points used to calculate the indicator values. + * Value: An integer value, specifying the number of points. + */ + pointsCount: number; +} +/** + * Represents the client-side equivalent of the FixedValueErrorBars class. + */ +interface ASPxClientFixedValueErrorBars extends ASPxClientIndicator { + /** + * Gets or sets the fixed positive error value. + * Value: A double value specifying the positive error value. + */ + positiveError: number; + /** + * Returns the fixed negative error value. + * Value: A double value specifying the negative error value. + */ + negativeError: number; +} +/** + * Represents the client-side equivalent of the PercentageErrorBars class. + */ +interface ASPxClientPercentageErrorBars extends ASPxClientIndicator { + /** + * Returns the value specifying the percentage of error values of series point values. + * Value: A double value specifying the percentage. Values less than or equal to 0 are not allowed. + */ + percent: number; +} +/** + * Represents the client-side equivalent of the StandardDeviationErrorBars class. + */ +interface ASPxClientStandardDeviationErrorBars extends ASPxClientIndicator { + /** + * Returns the multiplier on which the standard deviation value is multiplied before display. + * Value: A double value specifying the multiplier. Values less than 0 are not allowed. + */ + multiplier: number; +} +/** + * Represents the client-side equivalent of the StandardErrorBars class. + */ +interface ASPxClientStandardErrorBars extends ASPxClientIndicator { +} +/** + * Represents the client-side equivalent of the DataSourceBasedErrorBars class. + */ +interface ASPxClientDataSourceBasedErrorBars extends ASPxClientIndicator { +} +/** + * Represents the client-side equivalent of the Annotation class. + */ +interface ASPxClientAnnotation extends ASPxClientWebChartElementNamed { +} +/** + * Represents the client-side equivalent of the TextAnnotation class. + */ +interface ASPxClientTextAnnotation extends ASPxClientAnnotation { + /** + * Gets the lines of text within an annotation. + * Value: An array of string values containing the text of a title. + */ + lines: string[]; +} +/** + * Represents the client-side equivalent of the ImageAnnotation class. + */ +interface ASPxClientImageAnnotation extends ASPxClientAnnotation { +} +/** + * The client-side equivalent of the CrosshairValueItem class. + */ +interface ASPxClientCrosshairValueItem { + /** + * Gets the value that is displayed in a crosshair label. + * Value: A float value. + */ + value: number; + /** + * Gets an index of a point for which this crosshair value item is displayed. + * Value: An integer value. + */ + pointIndex: number; +} +/** + * The client-side equivalent of the ChartToolTipController class. + */ +interface ASPxClientToolTipController extends ASPxClientWebChartEmptyElement { + /** + * Gets a value indicating whether an image should be shown in tooltips. + * Value: true to show an image in tooltips; otherwise, false. + */ + showImage: boolean; + /** + * Gets a value indicating whether it is necessary to show text in tooltips. + * Value: true to show text in tooltips; otherwise, false. + */ + showText: boolean; + /** + * Gets a value that defines the position of an image within a tooltip. + * Value: A string value. + */ + imagePosition: string; + /** + * Gets a value that defines when tooltips should be invoked. + * Value: A string value. + */ + openMode: string; +} +/** + * The client-side equivalent of the ToolTipPosition class. + */ +interface ASPxClientToolTipPosition { +} +/** + * The client-side equivalent of the ToolTipRelativePosition class. + */ +interface ASPxClientToolTipRelativePosition extends ASPxClientToolTipPosition { + /** + * Gets the horizontal offset of a tooltip. + * Value: An integer value. + */ + offsetX: number; + /** + * Gets the vertical offset of a tooltip. + * Value: An integer value. + */ + offsetY: number; +} +/** + * The client-side equivalent of the ToolTipFreePosition class. + */ +interface ASPxClientToolTipFreePosition extends ASPxClientToolTipPosition { + /** + * Gets the horizontal offset of a tooltip. + * Value: An integer value. + */ + offsetX: number; + /** + * Gets the vertical offset of a tooltip. + * Value: An integer value. + */ + offsetY: number; + /** + * Gets the ID of a pane. + * Value: An integer value. + */ + paneID: number; + /** + * Gets an object containing settings that define how a tooltip should be docked. + * Value: A string value. + */ + dockPosition: string; +} +/** + * The client-side equivalent of the CrosshairLabelPosition class. + */ +interface ASPxClientCrosshairPosition { + /** + * Gets the horizontal offset of a crosshair cursor. + * Value: An integer value that is the X-offset. + */ + offsetX: number; + /** + * Gets the vertical offset of a crosshair cursor. + * Value: An integer value that is the Y-offset. + */ + offsetY: number; +} +/** + * The client-side equivalent of the CrosshairMousePosition class. + */ +interface ASPxClientCrosshairMousePosition extends ASPxClientCrosshairPosition { +} +/** + * The client-side equivalent of the CrosshairFreePosition class. + */ +interface ASPxClientCrosshairFreePosition extends ASPxClientCrosshairPosition { + /** + * Gets a Pane's ID when the crosshair cursor is in the free position mode. + * Value: An integer value that is the pane's ID. + */ + paneID: number; + /** + * Gets a string containing information on a crosshair label's dock position when the crosshair cursor is in the free position mode. + * Value: A string value containing information on a crosshair label's dock position. + */ + dockPosition: string; +} +/** + * Defines line style settings. + */ +interface ASPxClientLineStyle extends ASPxClientWebChartElement { + /** + * Gets the dash style used to paint the line. + * Value: A string value that contains information about the style used to paint the line. + */ + dashStyle: string; + /** + * Gets the thickness that corresponds to the value of the current ASPxClientLineStyle object. + * Value: An integer value which specifies the thickness, in pixels. + */ + thickness: number; + /** + * Returns the join style for the ends of consecutive lines. + * Value: A string representing the name of the line join type. + */ + lineJoin: string; +} +/** + * The client-side equivalent of the CrosshairOptions class. + */ +interface ASPxClientCrosshairOptions extends ASPxClientWebChartEmptyElement { + /** + * Gets a value indicating whether it is necessary to show a crosshair label for the X-axis. + * Value: true to show a crosshair label for the X-axis; otherwise, false. + */ + showAxisXLabels: boolean; + /** + * Gets a value indicating whether it is necessary to show a crosshair label for the Y-axis. + * Value: true to show the crosshair label for the Y-axis; otherwise, false. + */ + showAxisYLabels: boolean; + /** + * Gets a value that defines whether a crosshair label of a series point indicated by a crosshair cursor is shown on a diagram. + * Value: true if a crosshair label indicated by a crosshair cursor is shown on a diagram; otherwise, false. + */ + showCrosshairLabels: boolean; + /** + * Gets a value that indicates whether a crosshair cursor argument line is shown for a series point on a diagram. + * Value: true if a crosshair cursor argument line is displayed on a diagram; otherwise, false. + */ + showArgumentLine: boolean; + /** + * Specifies whether to show a value line of a series point indicated by a crosshair cursor on a diagram. + * Value: true to display a value line indicated by a crosshair cursor on a diagram; otherwise, false. + */ + showValueLine: boolean; + /** + * Gets a value that specifies whether to show a crosshair cursor in a focused pane only. + * Value: true to display a crosshair cursor in a focused pane; otherwise, false. + */ + showOnlyInFocusedPane: boolean; + /** + * Specifies the current snap mode of a crosshair cursor. + * Value: A string value. + */ + snapMode: string; + /** + * Specifies the way in which the crosshair label is shown for a series on a diagram. + * Value: A string value that specifies how the crosshair label is shown for a series. + */ + crosshairLabelMode: string; + /** + * Gets a value that indicates whether to show a header for each series group in crosshair cursor labels. + * Value: true, to show a group header in crosshair cursor labels; otherwise, false. + */ + showGroupHeaders: boolean; + /** + * Gets a string which represents the pattern specifying the group header text to be displayed within the crosshair label. + * Value: A String, which represents the group header's pattern. + */ + groupHeaderPattern: string; + /** + * Gets a value that specifies whether the Crosshair cursor should show points that are out of visual range. + * Value: true if the out of visual range points should be shown in the Crosshair label; otherwise false. + */ + showOutOfRangePoints: boolean; + /** + * Gets the identifier specifying the behavior of the selection of points shown in the crosshair label. + * Value: The selection behavior identifier. + */ + valueSelectionMode: string; + /** + * Gets the color of a crosshair argument line. + * Value: A String value, specifying the color of a crosshair argument line. + */ + argumentLineColor: string; + /** + * Gets the color of a crosshair value line. + * Value: A String value, specifying the color of a crosshair value line. + */ + valueLineColor: string; +} +/** + * The chart print options storage. + */ +interface ASPxClientChartPrintOptions { + /** + * Gets the size mode used to print a chart. + */ + GetSizeMode(): string; + /** + * Sets the size mode used to print a chart. + * @param sizeMode A System.String object, specifying the name of the size mode. + */ + SetSizeMode(sizeMode: string): void; + /** + * Gets a value indicating that the landscape orientation will be used to print a chart. + */ + GetLandscape(): boolean; + /** + * Sets a value indicating that the landscape orientation will be used to print a chart. + * @param landscape A Boolean value, specifying that the landscape orientation will be used to print a chart. + */ + SetLandscape(landscape: boolean): void; + /** + * Gets the left margin which will be used to print a chart. + */ + GetMarginLeft(): number; + /** + * Sets the left margin which will be used to print a chart. + * @param marginLeft A System.Int32 value, specifying the margin in hundredths of an inch. + */ + SetMarginLeft(marginLeft: number): void; + /** + * Gets the top margin which will be used to print a chart. + */ + GetMarginTop(): number; + /** + * Sets the top margin which will be used to print a chart. + * @param marginTop A System.Int32 value, specifying the margin in hundredths of an inch. + */ + SetMarginTop(marginTop: number): void; + /** + * Gets the right margin which will be used to print a chart. + */ + GetMarginRight(): number; + /** + * Sets the right margin which will be used to print a chart. + * @param marginRight A System.Int32 value, specifying the margin in hundredths of an inch. + */ + SetMarginRight(marginRight: number): void; + /** + * Gets the bottom margin which will be used to print a chart. + */ + GetMarginBottom(): number; + /** + * Sets the bottom margin which will be used to print a chart. + * @param marginBottom A System.Int32 value, specifying the margin in hundredths of an inch. + */ + SetMarginBottom(marginBottom: number): void; + /** + * Gets the predefined size ratio of the paper which will be used to print a chart. + */ + GetPaperKind(): string; + /** + * Sets the predefined size ratio of the paper which will be used to print a chart. + * @param paperKind A System.String object, specifying the name of a size ratio. + */ + SetPaperKind(paperKind: string): void; + /** + * Gets the custom paper width which will be used to print a chart. + */ + GetCustomPaperWidth(): number; + /** + * Sets the custom paper width which will be used to print a chart. + * @param customPaperWidth A System.Int32 object, specifying the width in hundredths of an inch. + */ + SetCustomPaperWidth(customPaperWidth: number): void; + /** + * Gets the custom paper height which will be used to print a chart. + */ + GetCustomPaperHeight(): number; + /** + * Sets the custom paper height which will be used to print a chart. + * @param customPaperHeight A System.Int32 object, specifying the height in hundredths of an inch. + */ + SetCustomPaperHeight(customPaperHeight: number): void; + /** + * Gets the name of the custom paper width-height ratio used to print the chart. + */ + GetCustomPaperName(): string; + /** + * Sets the name of the custom paper width-height ratio used to print a chart. + * @param customPaperName A String object, specifying the name of the custom paper width-height ratio. + */ + SetCustomPaperName(customPaperName: string): void; +} +/** + * Represents the client-side equivalent of the CustomLegendItem class. + */ +interface ASPxClientCustomLegendItem extends ASPxClientWebChartElementNamed { + /** + * Returns the text displayed by the custom legend item. + * Value: A string value that specifies legend item text. + */ + text: string; +} +/** + * The client-side equivalent of the ASPxDocumentViewer control. + */ +interface ASPxClientDocumentViewer extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientDocumentViewer. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs when the value of an item within the Document Viewer's report toolbar is changed. + */ + ToolbarItemValueChanged: ASPxClientEvent>; + /** + * Occurs when an item within the Document Viewer's report toolbar is clicked. + */ + ToolbarItemClick: ASPxClientEvent>; + /** + * Occurs on the client side when a report page is loaded into this ASPxClientDocumentViewer instance. + */ + PageLoad: ASPxClientEvent>; + /** + * Provides access to the Splitter of the ASPxClientDocumentViewer. + */ + GetSplitter(): ASPxClientSplitter; + /** + * Provides access to the ASPxClientDocumentViewer's preview that exposes methods to print and export the document. + */ + GetViewer(): ASPxClientReportViewer; + /** + * Provides access to the Document Viewer toolbar on the client. + */ + GetToolbar(): ASPxClientReportToolbar; + /** + * Provides access to the Ribbon of the ASPxClientDocumentViewer. + */ + GetRibbonToolbar(): ASPxClientRibbon; + /** + * Provides access to the parameters panel of the ASPxClientDocumentViewer. + */ + GetParametersPanel(): ASPxClientReportParametersPanel; + /** + * Provides access to the document of the ASPxClientDocumentViewer. + */ + GetDocumentMap(): ASPxClientReportDocumentMap; + /** + * Sets focus on the report control specified by its bookmark. + * @param pageIndex An integer value, specifying the page index. + * @param bookmarkPath A String value, specifying the path to the bookmark. + */ + GotoBookmark(pageIndex: number, bookmarkPath: string): void; + /** + * Initiates a round trip to the server so that the current page will be reloaded. + */ + Refresh(): void; + /** + * Prints the current document. + */ + Print(): void; + /** + * Prints the document's page with the specified page index. + * @param pageIndex A Int32 representing the index of the page to be printed. + */ + Print(pageIndex: number): void; + /** + * Displays the specified report page. + * @param pageIndex An integer value, identifying the report page. + */ + GotoPage(pageIndex: number): void; + /** + * Invokes the Search dialog, which allows end-users to search for specific text in a report. + */ + Search(): void; + /** + * Gets a value indicating whether or not searching text across a report is permitted in the web browser. + */ + IsSearchAllowed(): boolean; + /** + * Exports a report to a file of the specified format, and shows it in a new Web Browser window. + * @param format A string specifying the format to which a report should be exported. + */ + SaveToWindow(format: string): void; + /** + * Exports a report to a file of the specified format, and saves it to the disk. + * @param format A string specifying the format to which a report should be exported. + */ + SaveToDisk(format: string): void; +} +/** + * A method that will handle the ItemValueChanged event. + */ +interface ASPxClientToolbarItemValueChangedEventHandler { + /** + * A method that will handle the ToolbarItemValueChanged event. + * @param source A Object that is the event source. + * @param e An ASPxClientToolbarItemValueChangedEventArgs object, containing the event arguments. + */ + (source: S, e: ASPxClientToolbarItemValueChangedEventArgs): void; +} +/** + * Provides data for the ItemValueChanged event. + */ +interface ASPxClientToolbarItemValueChangedEventArgs extends ASPxClientProcessingModeEventArgs { + /** + * Gets the menu item object related to the event. + * Value: An ASPxClientMenuItem object, manipulations on which forced the event to be raised. + */ + item: ASPxClientMenuItem; + /** + * Provides access to the toolbar's value editor on the client. + * Value: An ASPxClientControl descendant. + */ + editor: ASPxClientControl; +} +/** + * The client-side equivalent of the ASPxQueryBuilder control. + */ +interface ASPxClientQueryBuilder extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientQueryBuilder. + */ + CallbackError: ASPxClientEvent>; + /** + * Enables you to customize the menu actions of a Query Builder. + */ + CustomizeToolbarActions: ASPxClientEvent>; + /** + * Occurs when executing the Save command on the client. + */ + SaveCommandExecute: ASPxClientEvent>; + /** + * Sends a callback to the server with the specified argument. + * @param arg A String value, specifying the callback argument. + */ + PerformCallback(arg: string): void; + /** + * 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; + /** + * Updates the localization settings of the ASPxClientQueryBuilder properties. + * @param localization A dictionary containing the property names, along with their localized equivalents. + */ + UpdateLocalization(localization: { [key: string]: string; }): void; + /** + * Returns the object model of a Query Builder. + */ + GetDesignerModel(): Object; + /** + * Gets a client-side model of the currently opened query serialized to Json. + */ + GetJsonQueryModel(): string; + /** + * Saves the current query. + */ + Save(): void; + /** + * Invokes a Data Preview for the current query. + */ + ShowPreview(): void; + /** + * Specifies whether or not the current query is a valid SQL string. + */ + IsQueryValid(): boolean; +} +/** + * A method that will handle the SaveCommandExecute event. + */ +interface ASPxClientQueryBuilderSaveCommandExecuteEventHandler { + /** + * A method that will handle the SaveCommandExecute event. + * @param source The event sender. + * @param e An ASPxClientQueryBuilderSaveCommandExecuteEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientQueryBuilderSaveCommandExecuteEventArgs): void; +} +/** + * Provides data for the SaveCommandExecute event. + */ +interface ASPxClientQueryBuilderSaveCommandExecuteEventArgs extends ASPxClientEventArgs { + /** + * Specifies whether or not the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * A method that will handle the CustomizeToolbarActions event. + */ +interface ASPxClientQueryBuilderCustomizeToolbarActionsEventHandler { + /** + * A method that will handle the CustomizeToolbarActions event. + * @param source The event sender. + * @param e An ASPxClientCustomizeMenuActionsEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientCustomizeMenuActionsEventArgs): void; +} +/** + * The client-side equivalent of the Web Report Designer control. + */ +interface ASPxClientReportDesigner extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientReportDesigner. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs when executing the Save command on the client. + */ + SaveCommandExecute: ASPxClientEvent>; + /** + * Enables you to customize the menu actions of the Web Report Designer. + */ + CustomizeMenuActions: ASPxClientEvent>; + /** + * Occurs each time a standard editor is created for a report parameter based on a parameter type. + */ + CustomizeParameterEditors: ASPxClientEvent>; + /** + * Occurs each time a look-up editor is created for a report parameter. + */ + CustomizeParameterLookUpSource: ASPxClientEvent>; + /** + * Occurs on the client side when the Report Designer is being closed. + */ + ExitDesigner: ASPxClientEvent>; + /** + * Occurs when a report is about to be saved in the Web Report Designer. + */ + ReportSaving: ASPxClientEvent>; + /** + * Occurs when a report has been saved in the Web Report Designer. + */ + ReportSaved: ASPxClientEvent>; + /** + * Occurs when a report is about to be opened in the Web Report Designer. + */ + ReportOpening: ASPxClientEvent>; + /** + * Occurs when a report has been opened in the Web Report Designer. + */ + ReportOpened: ASPxClientEvent>; + /** + * Occurs on the client each time a server-side error raises. + */ + OnServerError: ASPxClientEvent>; + /** + * Occurs after a component has been added to the report currently being edited in the Web Report Designer. + */ + ComponentAdded: ASPxClientEvent>; + /** + * Enables you to customize UI elements of the Web Report Designer. + */ + CustomizeElements: ASPxClientEvent>; + /** + * Enables you to customize the Save dialog of the Web Report Designer. + */ + CustomizeSaveDialog: ASPxClientEvent>; + /** + * Enables you to customize the Save Report dialog of the Web Report Designer. + */ + CustomizeSaveAsDialog: ASPxClientEvent>; + /** + * Enables you to customize the Open Report dialog of the Web Report Designer. + */ + CustomizeOpenDialog: ASPxClientEvent>; + /** + * Enables you to customize the Toolbox of the Web Report Designer. + */ + CustomizeToolbox: ASPxClientEvent>; + /** + * Occurs after a report has been switched to Print Preview. + */ + PreviewDocumentReady: ASPxClientEvent>; + /** + * Occurs each time a value of an editing field changes in Print Preview. + */ + PreviewEditingFieldChanged: ASPxClientEvent>; + /** + * Enables you to customize UI elements of a Document Viewer built into a Web Report Designer. + */ + PreviewCustomizeElements: ASPxClientEvent>; + /** + * Enables you to customize the actions of a Document Viewer built into a Web Report Designer. + */ + PreviewCustomizeMenuActions: ASPxClientEvent>; + /** + * Occurs when the left mouse button has been clicked over a report document in Print Preview. + */ + PreviewClick: ASPxClientEvent>; + /** + * Occurs after report parameter values have been reset to their default values in Print Preview. + */ + PreviewParametersReset: ASPxClientEvent>; + /** + * Occurs after report parameter values have been submitted in Print Preview. + */ + PreviewParametersSubmitted: ASPxClientEvent>; + /** + * Sends a callback to the server with the specified argument. + * @param arg A String value, specifying the callback argument. + */ + PerformCallback(arg: string): void; + /** + * 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; + /** + * Updates the localization settings of the ASPxClientReportDesigner properties. + * @param localization A dictionary containing the property names, along with their localized equivalents. + */ + UpdateLocalization(localization: { [key: string]: string; }): void; + /** + * Returns the object model of a Web Report Designer. + */ + GetDesignerModel(): Object; + /** + * Provides access to the preview model of the ASPxClientReportDesigner. + */ + GetPreviewModel(): Object; + /** + * Returns information about the specified property of the specified control. + * @param controlType A string that specifies the control type. + * @param path A string that specifies the path to the property. + */ + GetPropertyInfo(controlType: string, path: string): ASPxDesignerElementSerializationInfo; + /** + * Returns information about the specified properties of the specified control. + * @param controlType A string that specifies the control type. + * @param path An array of strings that specify paths to properties. + */ + GetPropertyInfo(controlType: string, path: string[]): ASPxDesignerElementSerializationInfo; + /** + * Returns actions performed by buttons available in the menu and toolbar of the Web Report Designer. + */ + GetButtonStorage(): Object; + /** + * Gets a client-side model of the currently opened report serialized to Json. + */ + GetJsonReportModel(): string; + /** + * Indicates whether or not the current ASPxClientReportDesigner instance has been modified. + */ + IsModified(): boolean; + /** + * Resets the value returned by the IsModified method. + */ + ResetIsModified(): void; + /** + * Adds a custom property to the Properties Panel. + * @param groupName A string that specifies the name of group to which a property should be added. + * @param property An object that provides information required to serialize a property. + */ + AddToPropertyGrid(groupName: string, property: ASPxDesignerElementSerializationInfo): void; + /** + * Adds a custom parameter type to the Web End-User Report Designer. + * @param parameterInfo An object that provides information about a parameter type to be added. + * @param editorOptions An object that provides information about an editor used to specify parameter values in design mode. + */ + AddParameterType(parameterInfo: ASPxDesignerParameterType, editorOptions: ASPxDesignerEditorOptions): void; + /** + * Removes the specified parameter type from the Web End-User Report Designer. + * @param parameterType A string that specifies a parameter type to be deleted. + */ + RemoveParameterType(parameterType: string): void; + /** + * Returns an object that contains information on the specified parameter type. + * @param parameterType A string that specifies a parameter type. + */ + GetParameterInfo(parameterType: string): ASPxDesignerParameterType; + /** + * Returns a value editor associated with the specified parameter type. + * @param parameterType A string that specifies a parameter type. + */ + GetParameterEditor(parameterType: string): ASPxDesignerEditorOptions; + /** + * Returns the report layout stored in a report storage under the specified URL. + * @param url A string that specifies the report URL. + */ + ReportStorageGetData(url: string): any; + /** + * Stores the specified report to a report storage using the specified URL. + * @param reportLayout A string that specifies the report layout to be saved. + * @param url A string that specifies the URL used to save a report. + */ + ReportStorageSetData(reportLayout: string, url: string): any; + /** + * Stores the specified report to a report storage using a new URL. + * @param reportLayout A string that specifies the report layout to be saved. + * @param url A string that specifies the default report URL. + */ + ReportStorageSetNewData(reportLayout: string, url: string): any; + /** + * Saves the current report. + */ + SaveReport(): any; + /** + * Closes the report tab currently being opened in the Web Report Designer. + */ + CloseCurrentTab(): void; + /** + * Saves the current report under a new name. + * @param reportName A string that specifies the report name. + */ + SaveNewReport(reportName: string): any; + /** + * Returns the report URLs and display names existing in a report storage. + */ + ReportStorageGetUrls(): any; + /** + * Opens the specified report on the client side of the Web Report Designer. + * @param url A string that specifies the URL of a report to be opened. + */ + OpenReport(url: string): void; + /** + * Switches the Web Report Designer to the preview mode. + */ + ShowPreview(): void; +} +/** + * A method that will handle the SaveCommandExecute event. + */ +interface ASPxClientReportDesignerSaveCommandExecuteEventHandler { + /** + * A method that will handle the SaveCommandExecute event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerSaveCommandExecuteEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerSaveCommandExecuteEventArgs): void; +} +/** + * Provides data for the SaveCommandExecute event. + */ +interface ASPxClientReportDesignerSaveCommandExecuteEventArgs extends ASPxClientEventArgs { + /** + * Specifies whether or not the event was handled. + * Value: true if the event was handled and default processing should not occur; false if the event should be handled using default processing. + */ + handled: boolean; +} +/** + * Provides data for the ExitDesigner event. + */ +interface ASPxClientReportDesignerExitDesignerEventArgs extends ASPxClientEventArgs { +} +/** + * Provides data for the events related to opening and saving reports in the Web Report Designer. + */ +interface ASPxClientReportDesignerDialogEventArgs extends ASPxClientEventArgs { + /** + * Specifies the URL of the report currently being processed. + * Value: A string that specifies the URL of the report currently being processed. + */ + Url: string; + /** + * Specifies the report currently being processed. + * Value: An object that specifies the report currently being processed. + */ + Report: Object; + /** + * Specifies whether or not the operation performed with a report should be canceled. + * Value: true, if the operation should be canceled; otherwise, false. + */ + Cancel: boolean; +} +/** + * Provides data for the OnServerError event. + */ +interface ASPxClientReportDesignerErrorEventArgs extends ASPxClientEventArgs { + /** + * Provides access to information about a server-side error. + * Value: An object that provides information about an error. + */ + Error: Object; +} +/** + * Provides data for the ComponentAdded event. + */ +interface ASPxClientReportDesignerComponentAddedEventArgs extends ASPxClientEventArgs { + /** + * Gets the model of a component that has been added to a report. + * Value: An object that specifies the component model. + */ + Model: Object; + /** + * Gets the parent of a component that has been added to a report. + * Value: An object that specifies the component parent. + */ + Parent: Object; +} +/** + * Provides data for the CustomizeSaveDialog event. + */ +interface ASPxClientReportDesignerCustomizeSaveDialogEventArgs extends ASPxClientEventArgs { + /** + * Provides access to the Save dialog. + * Value: An object that specifies the Save dialog. + */ + Popup: ASPxDesignerSaveDialog; + /** + * Customizes the Save dialog based on the specified template and model. + * @param template A string that specifies the name of an HTML template for the dialog. + * @param model A model of the Save dialog. + */ + Customize(template: string, model: ASPxDesignerDialogModel): void; +} +/** + * Provides data for the CustomizeSaveAsDialog event. + */ +interface ASPxClientReportDesignerCustomizeSaveAsDialogEventArgs extends ASPxClientEventArgs { + /** + * Provides access to the Save Report dialog. + * Value: An object that specifies the Save Report dialog. + */ + Popup: ASPxDesignerSaveAsDialog; + /** + * Customizes the Save Report dialog based on the specified template and model. + * @param template A string that specifies the name of an HTML template for the dialog. + * @param model A model of the Save Report dialog. + */ + Customize(template: string, model: ASPxDesignerDialogModel): void; +} +/** + * Provides data for the CustomizeOpenDialog event. + */ +interface ASPxClientReportDesignerCustomizeOpenDialogEventArgs extends ASPxClientEventArgs { + /** + * Provides access to the Open Report dialog. + * Value: An object that specifies the Open Report dialog. + */ + Popup: ASPxDesignerOpenDialog; + /** + * Customizes the Open Report dialog based on the specified template and model. + * @param template A string that specifies the name of an HTML template for the dialog. + * @param model A model of the Open Report dialog. + */ + Customize(template: string, model: ASPxDesignerDialogModel): void; +} +/** + * Provides data for the CustomizeToolbox event. + */ +interface ASPxClientReportDesignerCustomizeToolboxEventArgs extends ASPxClientEventArgs { + /** + * Provides information about all controls available in the Toolbox. + * Value: An ASPxDesignerControlsFactory object that provides information about toolbox controls. + */ + ControlsFactory: ASPxDesignerControlsFactory; +} +/** + * A method that will handle the CustomizeMenuActions event. + */ +interface ASPxClientReportDesignerCustomizeMenuActionsEventHandler { + /** + * A method that will handle the CustomizeMenuActions event. + * @param source The event sender. + * @param e An ASPxClientCustomizeMenuActionsEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientCustomizeMenuActionsEventArgs): void; +} +/** + * A method that will handle the CustomizeParameterLookUpSource event. + */ +interface ASPxClientReportDesignerCustomizeParameterLookUpSourceEventHandler { + /** + * A method that will handle the CustomizeParameterLookUpSource event. + * @param source The event sender. + * @param e An ASPxClientCustomizeParameterLookUpSourceEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientCustomizeParameterLookUpSourceEventArgs): void; +} +/** + * A method that will handle the CustomizeParameterEditors event. + */ +interface ASPxClientReportDesignerCustomizeParameterEditorsEventHandler { + /** + * A method that will handle the CustomizeParameterEditors event. + * @param source The event sender. + * @param e An ASPxClientCustomizeParameterEditorsEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientCustomizeParameterEditorsEventArgs): void; +} +/** + * A method that will handle the CustomizeElements event. + */ +interface ASPxClientReportDesignerCustomizeElementsEventHandler { + /** + * A method that will handle the CustomizeElements event. + * @param source The event sender. + * @param e An ASPxClientCustomizeElementsEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientCustomizeElementsEventArgs): void; +} +/** + * A method that will handle the ExitDesigner event. + */ +interface ASPxClientReportDesignerExitDesignerEventHandler { + /** + * A method that will handle the ExitDesigner event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerExitDesignerEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerExitDesignerEventArgs): void; +} +/** + * A method that will handle the ReportSaving event. + */ +interface ASPxClientReportDesignerReportSavingEventHandler { + /** + * A method that will handle the ReportSaving event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerDialogEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerDialogEventArgs): void; +} +/** + * A method that will handle the ReportSaved event. + */ +interface ASPxClientReportDesignerReportSavedEventHandler { + /** + * A method that will handle the ReportSaved event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerDialogEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerDialogEventArgs): void; +} +/** + * A method that will handle the ReportOpening event. + */ +interface ASPxClientReportDesignerReportOpeningEventHandler { + /** + * A method that will handle the ReportOpening event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerDialogEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerDialogEventArgs): void; +} +/** + * A method that will handle the ReportOpened event. + */ +interface ASPxClientReportDesignerReportOpenedEventHandler { + /** + * A method that will handle the ReportOpened event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerDialogEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerDialogEventArgs): void; +} +/** + * A method that will handle the OnServerError event. + */ +interface ASPxClientReportDesignerErrorEventHandler { + /** + * A method that will handle the OnServerError event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerErrorEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerErrorEventArgs): void; +} +/** + * A method that will handle the ComponentAdded event. + */ +interface ASPxClientReportDesignerComponentAddedEventHandler { + /** + * A method that will handle the ComponentAdded event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerComponentAddedEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerComponentAddedEventArgs): void; +} +/** + * A method that will handle the CustomizeSaveDialog event. + */ +interface ASPxClientReportDesignerCustomizeSaveDialogEventHandler { + /** + * A method that will handle the CustomizeSaveDialog event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerCustomizeSaveDialogEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerCustomizeSaveDialogEventArgs): void; +} +/** + * A method that will handle the CustomizeSaveAsDialog event. + */ +interface ASPxClientReportDesignerCustomizeSaveAsDialogEventHandler { + /** + * A method that will handle the CustomizeSaveAsDialog event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerCustomizeSaveAsDialogEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerCustomizeSaveAsDialogEventArgs): void; +} +/** + * A method that will handle the CustomizeOpenDialog event. + */ +interface ASPxClientReportDesignerCustomizeOpenDialogEventHandler { + /** + * A method that will handle the CustomizeOpenDialog event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerCustomizeOpenDialogEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerCustomizeOpenDialogEventArgs): void; +} +/** + * A method that will handle the CustomizeToolbox event. + */ +interface ASPxClientReportDesignerCustomizeToolboxEventHandler { + /** + * A method that will handle the CustomizeToolbox event. + * @param source The event sender. + * @param e An ASPxClientReportDesignerCustomizeToolboxEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportDesignerCustomizeToolboxEventArgs): void; +} +/** + * Provides information about a value editor used in the Property Grid. + */ +interface ASPxDesignerEditorOptions { + /** + * Provides access to the name of an HTML template specifying the editor and header of a complex object. + * Value: A string that specifies the HTML template. + */ + header: string; + /** + * Provides access to the name of an HTML template used by a complex object's editor. + * Value: A string that specifies the name of an HTML template. + */ + content: string; + /** + * Provides access to the type of the editor model. + * Value: An object that specifies the editor type. + */ + editorType: Object; +} +/** + * Provides functionality to an undo/redo engine in the Web Report Designer. + */ +interface ASPxDesignerUndoEngine { + /** + * Provides access to a value that specifies whether or not the redo action can currently be performed. + * Value: A knockout observable boolean object, whose value is true if the redo action can be performed, and false otherwise. + */ + redoEnabled: any; + /** + * Provides access to a value that specifies whether or not the undo action can currently be performed. + * Value: A knockout observable boolean object, whose value is true if the undo action can be performed, and false otherwise. + */ + undoEnabled: any; + /** + * Provides access to a value that specifies whether or not a report has been changed. + * Value: A knockout observable boolean object, whose value is true if the report has been modified, and false otherwise. + */ + isDirty: any; + /** + * Undoes all changes made to a report. + */ + undoAll(): void; + /** + * Clears information about edit operations made to a report, so they cannot not be undone. + */ + clearHistory(): void; + /** + * Undoes the last edit action in a report. + */ + undo(): void; + /** + * Reverses the results of the last undo action. + */ + redo(): void; +} +/** + * Provides functionality for a tab displayed a report in the Web Report Designer. + */ +interface ASPxDesignerNavigateTab { + /** + * Provides access to a value that specifies the display name of the current tab. + * Value: A knockout computed string that specifies the tab's display name. + */ + displayName: any; + /** + * Provides access to a value that specifies whether or not the report in the current tab has been changed. + * Value: A knockout computed boolean object, whose value is true if the report has been modified, and false otherwise. + */ + isDirty: any; + /** + * Provides access to a report opened in the current tab. + * Value: A knockout observable object that specifies a report opened in the current tab. + */ + report: any; + /** + * Provides access to an engine that manages undo and redo operations in the Web Report Designer. + * Value: An object that specifies an undo/redo engine. + */ + undoEngine: ASPxDesignerUndoEngine; + /** + * Provides access to the URL of a report opened in the current tab. + * Value: A knockout observable string that specifies the report URL. + */ + url: any; +} +/** + * A model of dialogs used to save and open reports in the Web Report Designer. + */ +interface ASPxDesignerDialogModel { + /** + * Provides access to the collection of buttons displayed in a dialog. + * Value: An array of objects that specify buttons displayed in a dialog. + */ + popupButtons: Object[]; + /** + * Specifies a function that gets the report URL. + */ + getUrl(): string; + /** + * Specifies a function that sets the report URL. + * @param url A string that specifies the report URL. + */ + setUrl(url: string): void; + /** + * Specifies a function to be executed when showing a dialog. + * @param tab An object that specifies the report tab for which a dialog is invoked. + */ + onShow(tab: ASPxDesignerNavigateTab): void; +} +/** + * Provides the base functionality for dialogs used to open and save reports on the client side of the Web Report Designer. + */ +interface ASPxDesignerReportDialogBase { + /** + * Provides access to a dialog's width. + * Value: A knockout observable object that specifies a dialog's width. + */ + width: any; + /** + * Provides access to a dialog's height. + * Value: A knockout observable object that specifies a dialog's height. + */ + height: any; + /** + * Provides access to the name of an HTML template used by a dialog. + * Value: A knockout observable string that specifies the name of the HTML template used by a dialog. + */ + template: any; + /** + * Provides access to buttons displayed in a dialog. + * Value: An array of objects that specify buttons displayed in the dialog. + */ + buttons: Object[]; + /** + * Provides access to a dialog's model. + * Value: A knockout observable object of the ASPxDesignerDialogModel type. + */ + model: any; + /** + * Provides access to a report tab for which a dialog appears. + * Value: A knockout observable object of the ASPxDesignerNavigateTab type. + */ + tab: any; + /** + * Provides access to a value that specifies a dialog's visibility state. + * Value: true, if the dialog is visible; otherwise, false; + */ + visible: any; + /** + * Provides access to a dialog's title. + * Value: A string that specifies a dialog's title. + */ + title: string; + /** + * Shows the dialog for the specified report tab. + * @param tab A report tab for which the dialog should be shown. + */ + show(tab: ASPxDesignerNavigateTab): void; + /** + * Customizes the dialog based on the specified template and model. + * @param template A string that specifies the name of an HTML template for the dialog. + * @param model An object that specifies the dialog model. + */ + customize(template: string, model: ASPxDesignerDialogModel): void; + /** + * Cancels the dialog. + */ + cancel(): void; +} +/** + * Provides functionality for the Save dialog on the client side of the Web Report Designer. + */ +interface ASPxDesignerSaveDialog extends ASPxDesignerReportDialogBase { + /** + * Provides access to the Save Report dialog that appears if a user selected to save changes in the Save dialog. + * Value: An object that specifies the Save As dialog. + */ + saveReportDialog: ASPxDesignerSaveAsDialog; + /** + * Saves the report with the specified URL. + * @param url A string that specifies an URL of the report to be saved. + */ + save(url: string): void; + /** + * Closes the dialog without saving the current report. + */ + notSave(): void; +} +/** + * Provides functionality for the Save Report dialog on the client side of the Web Report Designer. + */ +interface ASPxDesignerSaveAsDialog extends ASPxDesignerReportDialogBase { + /** + * Saves the report with the specified URL. + * @param url A string that specifies a URL of the report to be saved. + */ + save(url: string): void; +} +/** + * Provides functionality for the Open Report dialog on the client side of the Web Report Designer. + */ +interface ASPxDesignerOpenDialog extends ASPxDesignerReportDialogBase { + /** + * Opens the report with the specified URL. + * @param url A string that specifies an URL of the report to be opened. + */ + open(url: string): void; +} +/** + * Provides information about a toolbox control item. + */ +interface ASPxDesignerToolboxItem { + /** + * Provides access to information required to serialize a toolbox control. + * Value: An array of ASPxDesignerElementSerializationInfo objects that provide information required to serialize an element. + */ + info: ASPxDesignerElementSerializationInfo[]; + /** + * Provides access to a surface type of toolbox control. + * Value: A surface type of toolbox control. + */ + surfaceType: any; + /** + * Provides access to a toolbox control type. + * Value: A toolbox control type. + */ + type: any; + /** + * Provides access to a zero-based index of a control in the toolbox. + * Value: An integer value that specifies a control index in the toolbox. + */ + toolboxIndex: number; + /** + * Provides access to the default property values used for a toolbox control. + * Value: An object that specifies default propery values. + */ + defaultVal: Object; + /** + * Provides access to popular properties of a toolbox control. + * Value: An array of strings that specify names of popular properties. + */ + popularProperties: string[]; + /** + * Gets whether a control item is displayed in a toolbox. + * Value: true, if the control is available in the toolbox; otherwise, false. + */ + isToolboxItem: boolean; +} +/** + * Enables you to customize controls available in the Toolbox of the Web Report Designer. + */ +interface ASPxDesignerControlsFactory { + /** + * Returns information about the specified toolbox control. + * @param controlType A string that specifies the control type. + */ + getControlInfo(controlType: string): ASPxDesignerToolboxItem; + /** + * Returns a control type by the specified model. + * @param model An object that specifies the control model. + */ + getControlType(model: Object): string; + /** + * Registers the specified control in the Toolbox of the Web Report Designer. + * @param typeName A string that specifies the name of a custom control. + * @param metadata An ASPxDesignerToolboxItem object that provides information about a toolbox item. + */ + registerControl(typeName: string, metadata: ASPxDesignerToolboxItem): void; + /** + * Returns information about the specified property of the specified control. + * @param controlType A string that specifies the control type. + * @param propertyDisplayName A string that specifies the property display name. + */ + getPropertyInfo(controlType: string, propertyDisplayName: string): ASPxDesignerElementSerializationInfo; +} +/** + * Provides information about a report parameter type. + */ +interface ASPxDesignerParameterType { + /** + * Provides access to an actual parameter type. + * Value: A string that specifies the parameter type. + */ + value: string; + /** + * Provides access to a text displayed to end-users when creating parameters of the current type. + * Value: A string displayed to end-users. + */ + displayValue: string; + /** + * Provides access to the default value for parameters of the current type. + * Value: An object that specifies the default value. + */ + defaultVal: Object; + /** + * Provides access to the specifics of a current parameter type. + * Value: Parameter type specifics. + */ + specifics: string; + /** + * Converts the specified parameter value to the current parameter type. + * @param val An object that specifies the parameter value to be converted. + */ + valueConverter(val: Object): Object; +} +/** + * The client-side equivalent of the ASPxClientDocumentViewer control's Document Map. + */ +interface ASPxClientReportDocumentMap extends ASPxClientControl { + /** + * Occurs after the content of the Document Viewer's document map is updated. + */ + ContentChanged: ASPxClientEvent>; +} +/** + * The client-side equivalent of the ASPxClientDocumentViewer control's Parameters Panel. + */ +interface ASPxClientReportParametersPanel extends ASPxClientControl { + /** + * Assigns a value to a parameter of the report displayed in the document viewer. + * @param parametersInfo An array of ASPxClientReportParameterInfo values specifying parameters and values to assign. + */ + AssignParameters(parametersInfo: ASPxClientReportParameterInfo[]): void; + /** + * Assigns a value to a parameter of the report displayed in the document viewer. + * @param path A System.String specifying the parameter's path. + * @param value An object specifying the parameter value. + */ + AssignParameter(path: string, value: Object): void; + /** + * Returns an array storing the names of parameters available in a report. + */ + GetParameterNames(): string[]; + /** + * Returns a value editor that is associated with a parameter with the specified name. + * @param parameterName A String value, specifying the parameter name. + */ + GetEditorByParameterName(parameterName: string): ASPxClientControl; +} +/** + * Provides information about a report parameter on the client side. + */ +interface ASPxClientReportParameterInfo { + /** + * Specifies the parameter path, relative to its parent container (e.g., "subreport1.subreportParameter1" for a subreport's parameter, or "parameter1" for a report's parameter). + * Value: A String value, specifying the parameter path (e.g., "subreport1.subreportParameter1"). + */ + Path: string; + /** + * Provides access to a parameter value on the client. + * Value: A Object value. + */ + Value: Object; +} +/** + * The client-side equivalent of the ASPxClientDocumentViewer control's toolbar. + */ +interface ASPxClientReportToolbar extends ASPxClientControl { + /** + * Provides access to the control template assigned for the specified menu item. + * @param name A String value, specifying the menu item name. + */ + GetItemTemplateControl(name: string): ASPxClientControl; +} +/** + * The client-side equivalent of the ReportViewer. + */ +interface ASPxClientReportViewer extends ASPxClientControl { + /** + * Occurs when a callback for server-side processing is initiated. + */ + BeginCallback: ASPxClientEvent>; + /** + * Occurs on the client after a callback's server-side processing has been completed. + */ + EndCallback: ASPxClientEvent>; + /** + * Fires on the client if any server error occurs during server-side processing of a callback sent by the ASPxClientReportViewer. + */ + CallbackError: ASPxClientEvent>; + /** + * Occurs on the client side when another report page is loaded into this ASPxClientReportViewer instance. + */ + PageLoad: ASPxClientEvent>; + /** + * Submits the values of the specified parameters. + * @param parameters A dictionary containing the parameter names, along with their Object values. + */ + SubmitParameters(parameters: { [key: string]: Object; }): void; + /** + * Prints a report shown in the ReportViewer. + */ + Print(): void; + /** + * Prints a report page with the specified page index. + * @param pageIndex An integer value which specifies an index of the page to be printed. + */ + Print(pageIndex: number): void; + /** + * Displays a report page with the specified page index in the ReportViewer. + * @param pageIndex An integer value which specifies the index of a page to be displayed. + */ + GotoPage(pageIndex: number): void; + /** + * Initiates a round trip to the server so that the current page will be reloaded. + */ + Refresh(): void; + /** + * Invokes the Search dialog, which allows end-users to search for specific text in a report. + */ + Search(): void; + /** + * Exports a report to a file of the specified format, and shows it in a new Web Browser window. + * @param format A string specifying the format, to which a report should be exported. + */ + SaveToWindow(format: string): void; + /** + * Exports a report to a file of the specified format, and saves it to the disk. + * @param format A string specifying the format, to which a report should be exported. + */ + SaveToDisk(format: string): void; + /** + * Gets a value indicating whether or not searching text across a report is permitted in the web browser. + */ + IsSearchAllowed(): boolean; +} +/** + * A method that will handle the PageLoad events. + */ +interface ASPxClientReportViewerPageLoadEventHandler { + /** + * A method that will handle the PageLoad event. + * @param source The event sender. + * @param e An ASPxClientReportViewerPageLoadEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientReportViewerPageLoadEventArgs): void; +} +/** + * Provides data for the PageLoad events on the client side. + */ +interface ASPxClientReportViewerPageLoadEventArgs extends ASPxClientEventArgs { + /** + * Gets a value specifying a zero-based index of a page to be displayed in a report viewer. + * Returns: $ + */ + PageIndex: number; + /** + * Gets a value specifying the total number of pages displayed in a report viewer. + * Returns: $ + */ + PageCount: number; + /** + * Gets a value indicating whether a report page, which is currently loaded into the ASPxClientReportViewer, is the first page of a report. + */ + IsFirstPage(): boolean; + /** + * Gets a value indicating whether a report page, which is currently loaded into the ASPxClientReportViewer, is the last page of a report. + */ + IsLastPage(): boolean; +} +/** + * Provides data for the CustomizeParameterEditors events. + */ +interface ASPxClientCustomizeParameterEditorsEventArgs extends ASPxClientEventArgs { + /** + * Provides access to an object that stores information about a parameter. + * Value: An ASPxDesignerElementParameterDescriptor object. + */ + parameter: ASPxDesignerElementParameterDescriptor; + /** + * Provides access to an object that stores information required to serialize a parameter editor. + * Value: An ASPxDesignerElementSerializationInfo object. + */ + info: ASPxDesignerElementSerializationInfo; +} +/** + * Provides data for the CustomizeParameterLookUpSource events. + */ +interface ASPxClientCustomizeParameterLookUpSourceEventArgs extends ASPxClientEventArgs { + /** + * Provides access to an object that stores information about a parameter. + * Value: An ASPxDesignerElementParameterDescriptor object that stores information about the parameter. + */ + parameter: ASPxDesignerElementParameterDescriptor; + /** + * Provides access to the collection of look-up parameter values. + * Value: An array of ASPxDesignerElementEditorItem objects that store information about look-up parameter values. + */ + items: ASPxDesignerElementEditorItem[]; + /** + * Specifies the data source that provides look-up values for the parameter editor. + * Value: An Object specifying the data source that provides look-up values to the parameter editor. + */ + dataSource: Object; +} +/** + * Provides information about a command available in the toolbar or menu. + */ +interface ASPxClientMenuAction { + /** + * Provides access to the text for the command. + * Value: A string that is the command text. + */ + text: string; + /** + * Provides access to the CSS class of the command's glyph. + * Value: A string that specifies the name of the CSS class. + */ + imageClassName: string; + /** + * Provides access to the action performed when a button is clicked. + * Value: The specific action implementation. + */ + clickAction: Function; + /** + * Provides access to the value that specifies whether or not the command is disabled by default. + * Value: true, if the command is disabled by default; otherwise, false. + */ + disabled: boolean; + /** + * Provides access to the value that specifies whether or not the command is visible in the user interface. + * Value: true if the command is visible; otherwise false. + */ + visible: boolean; + /** + * Provides access to the keyboard shortcut used to invoke the command. + * Value: An ASPxClientMenuActionHotKey object that specifies the keyboard shortcut. + */ + hotKey: ASPxClientMenuActionHotKey; + /** + * Provides access to the value that specifies whether or not the command has a visual separator. + * Value: true, if the command has a visual separator; otherwise, false. + */ + hasSeparator: string; + /** + * Provides access to a value that specifies the command location. + * Value: A string that specifies the command location. + */ + container: string; +} +/** + * Provides information about a hot key used to perform an action assigned to a menu item. + */ +interface ASPxClientMenuActionHotKey { + /** + * Provides access to a hot key code. + * Value: An integer value that specifies the hot key code. + */ + keyCode: number; + /** + * Provides access to a value that specifies whether the CTRL key is used in combination with a hot key. + * Value: true, if the CTRL key is included into the key combination; otherwise, false. + */ + ctrlKey: boolean; +} +/** + * Provides data for the CustomizeMenuActions. + */ +interface ASPxClientCustomizeMenuActionsEventArgs extends ASPxClientEventArgs { + /** + * Provides access to the collection of actions available in the toolbar and menu. + * Value: An array of ASPxClientMenuAction objects. + */ + Actions: ASPxClientMenuAction[]; + /** + * Returns a menu action with the specified ID. + * @param actionId A String value that specifies the action ID. + */ + GetById(actionId: string): ASPxClientMenuAction; +} +/** + * Provides data for the CustomizeElements events. + */ +interface ASPxClientCustomizeElementsEventArgs extends ASPxClientEventArgs { + /** + * Provides access to the collection of UI elements. + * Value: An array of the ASPxReportUIElement objects. + */ + Elements: ASPxReportUIElement[]; + /** + * Returns UI elements with the specified ID. + * @param templateId A string that specifies the element ID. + */ + GetById(templateId: string): ASPxReportUIElement[]; +} +/** + * Provides general information about a report parameter. + */ +interface ASPxDesignerElementParameterDescriptor { + /** + * Provides access to the parameter description. + * Value: A String value, specifying the parameter description. + */ + description: string; + /** + * Provides access to the parameter name. + * Value: A String value, specifying the parameter name. + */ + name: string; + /** + * Provides access to the parameter type. + * Value: A String value, specifying the parameter type. + */ + type: string; + /** + * Provides access to the parameter value. + * Value: A Object, specifying the parameter value. + */ + value: Object; + /** + * Provides access to the parameter visibility state. + * Value: true if the parameter is visible; otherwise false. + */ + visible: boolean; +} +/** + * Provides information required to serialize an element. + */ +interface ASPxDesignerElementSerializationInfo { + /** + * Gets the property name that will be used in the model to store the property value. + * Value: A String value. + */ + propertyName: string; + /** + * Gets the property name in the model that is displayed in the Property grid. + * Value: A String value. + */ + displayName: string; + /** + * Gets the property name that will be used during serialization to store the property value. + * Value: A String value. + */ + modelName: string; + /** + * Gets the default property value used for serialization. + * Value: A Object value. + */ + defaultVal: Object; + /** + * Gets the information about a complex object's content. + * Value: An array of ASPxDesignerElementSerializationInfo objects. + */ + info: ASPxDesignerElementSerializationInfo[]; + /** + * Gets a value indicating whether or not the property returns an array. + * Value: true if the property returns an array; otherwise false. + */ + array: boolean; + /** + * Gets a value indicating whether an object should be serialized to the ComponentStorage property. + * Value: true to serialize an object to the ObjectStorage; otherwise false. + */ + link: boolean; + /** + * Gets a value specifying the type of value editor for the Property Grid. + * Value: An ASPxDesignerElementEditor object. + */ + editor: ASPxDesignerElementEditor; + /** + * Gets the collection of values displayed in the Property grid. + * Value: An array of ASPxDesignerElementEditorItem objects. + */ + valuesArray: ASPxDesignerElementEditorItem[]; + /** + * Gets the rules for validating the property value entered into its editor. + * Value: An array of Object values. + */ + validationRules: Object[]; + /** + * Gets the visibility state of the value editor in the Property Grid. + * Value: A Object value. + */ + visible: Object; + /** + * Gets a value, indicating whether or not the property value can be edited. + * Value: true to disable the property editing; otherwise false. + */ + disabled: Object; +} +/** + * Provides information about a serialized property's value editor used in the Property Grid. + */ +interface ASPxDesignerElementEditor { + /** + * Gets the name of an HTML template specifying the editor and header of a complex object (i.e., an object having its content properties specified). + * Value: A String value. + */ + header: string; + /** + * Gets a nullable value, specifying the name of an HTML template used by a complex object's editor. + * Value: A String value. + */ + content: string; + /** + * Gets additional options for DevExtreme UI widgets. + * Value: An object that provides editor options. + */ + extendedOptions: Object; + /** + * Gets a nullable value, specifying the type of the editor's model. + * Value: A Object value. + */ + editorType: Object; +} +/** + * Provides information about property values. + */ +interface ASPxDesignerElementEditorItem { + /** + * Gets an actual property value. + * Value: A Object value. + */ + value: Object; + /** + * Gets a value displayed by a property editor. + * Value: A String value. + */ + displayValue: string; +} +/** + * Provides information about a UI element of the Web Report Designer or Web Document Viewer. + */ +interface ASPxReportUIElement { + /** + * Provides access to an element model. + * Value: An object that specifies the element model. + */ + model: Object; + /** + * Provides access to the name of an HTML template used by an element. + * Value: A string that specifies the name of the HTML template. + */ + templateName: string; +} +/** + * Provides data for the PreviewDocumentReady events. + */ +interface ASPxClientWebDocumentViewerDocumentReadyEventArgs extends ASPxClientEventArgs { + /** + * Specifies the report ID. + */ + ReportId: string; + /** + * Specifies the report document ID. + */ + DocumentId: string; + /** + * Specifies the total number of pages in a report document. + */ + PageCount: number; +} +/** + * Provides data for the PreviewEditingFieldChanged events. + */ +interface ASPxClientWebDocumentViewerEditingFieldChangedEventArgs extends ASPxClientEventArgs { + /** + * Gets an editing field whose value has been changed. + * Value: An object that specifies an editing field whose content has been changed. + */ + Field: ASPxClientWebDocumentViewerEditingField; + /** + * Provides access to a previous value of an editing field. + * Value: An object that specifies an editing field's previous value. + */ + OldValue: Object; + /** + * Provides access to a new value of an editing field. + * Value: An object that specifies an editing field's new value. + */ + NewValue: Object; +} +/** + * Provides functionality for a field whose content can be edited in the Web Document Viewer. + */ +interface ASPxClientWebDocumentViewerEditingField { + /** + * Provides access to a value that specifies whether or not an editing field's content can be customized in Print Preview. + * Returns: true, if a field cannot be edited in Print Preview; otherwise, false. + */ + readOnly: any; + /** + * Provides access to the current value of an editing field. + * Returns: An object that specifies the current field value. + */ + editValue: any; + /** + * Returns the unique identifier of an editing field. + */ + id(): string; + /** + * Returns the ID of a logical group to which an editing field for a check box belongs. + */ + groupID(): string; + /** + * Returns the name of an editor used to change a field value in Print Preview. + */ + editorName(): string; + /** + * Returns the index of the page on which an editing field is located. + */ + pageIndex(): number; +} +/** + * Provides data for the PreviewParametersSubmitted events. + */ +interface ASPxClientParametersSubmittedEventArgs extends ASPxClientEventArgs { + /** + * Provides access to a View Model for report parameters. + * Value: A View Model object. + */ + ParametersViewModel: Object; + /** + * Provides access to report parameters and their submitted values. + * Value: A dictionary containing the parameter names along with their values. + */ + Parameters: { [key: string]: Object; }; +} +/** + * Provides data for the PreviewParametersReset events. + */ +interface ASPxClientParametersResetEventArgs extends ASPxClientEventArgs { + /** + * Provides access to a View Model for report parameters. + * Value: A View Model object. + */ + ParametersViewModel: Object; + /** + * Provides access to report parameters whose values have been reset. + * Value: An ASPxClientWebDocumentViewerParameter array. + */ + Parameters: ASPxClientWebDocumentViewerParameter[]; +} +/** + * Provides general information about a report parameter on the client-side of the Web Document Viewer. + */ +interface ASPxClientWebDocumentViewerParameter { + /** + * Provides access to the current value of a report parameter. + * Value: An object that specifies the report parameter's current value. + */ + value: Object; + /** + * Provides access to a report parameter's value type. + * Value: An object that specifies the report parameter type. + */ + type: Object; + /** + * Provides access to a value that specifies whether or not a parameter can have multiple values. + * Value: true, if a parameter can have multiple values; otherwise, false. + */ + isMultiValue: boolean; + /** + * Returns an object that provides general information about a report parameter. + */ + getParameterDescriptor(): ASPxDesignerElementParameterDescriptor; +} +/** + * Provides data for the PreviewClick events. + */ +interface ASPxClientPreviewClickEventArgs extends ASPxClientEventArgs { + /** + * Gets a value specifying the zero-based index of the page that has been clicked. + * Value: An integer value that specifies a page index. + */ + PageIndex: number; + /** + * Provides information on a visual brick representing content of a report control that has been clicked. + * Value: An object that provides information on a visual brick. + */ + Brick: ASPxClientWebDocumentViewerBrick; + /** + * Specifies whether or not the event was handled and no default processing is required. + * Value: true, if the event is completely handled by custom code and no default processing is required; otherwise, false. + */ + Handled: boolean; + /** + * Specifies the default function used to handle the PreviewClick event. + */ + DefaultHandler(): void; + /** + * Returns the text displayed by the Brick. + */ + GetBrickText(): string; + /** + * Returns a string providing additional information on the Brick. + */ + GetBrickValue(): string; +} +/** + * Provides information about a visual brick used to render a report control to construct a document in the Web Document Viewer. + */ +interface ASPxClientWebDocumentViewerBrick { + /** + * Provides access to a brick's content. + * Value: A dictionary that stores content keys along with the corresponding contents. + */ + content: { [key: string]: string; }; + /** + * Provides access to navigation settings of the current brick. + * Value: An object that provides a brick's navigation settings. + */ + navigation: ASPxClientWebDocumentViewerBrickNavigation; + /** + * Provides access to a brick's top vertical coordinate. + * Value: An integer value that specifies the brick's top coordinate. + */ + top: number; + /** + * Provides access to a brick's left horizontal coordinate. + * Value: An integer value that specifies the brick's left coordinate. + */ + left: number; + /** + * Provides access to a brick's width. + * Value: An integer value that specifies the brick width. + */ + width: number; + /** + * Provides access to a brick's height. + * Value: An integer value that specifies the brick height. + */ + height: number; + /** + * Provides access to a value that specifies whether or not the right-to-left feature is enabled for a brick. + * Value: true, if the right-to-left feature is enabled; otherwise, false. + */ + rtl: boolean; +} +/** + * Provides navigation settings for a brick used to construct a document in the Web Document Viewer. + */ +interface ASPxClientWebDocumentViewerBrickNavigation { + /** + * Provides access to the URL to navigate to when a brick is a clicked. + * Value: A string that specifies the URL. + */ + url: string; + /** + * Provides access to a value that specifies the target window or frame in which to display the linked Web page's content when the brick is clicked. + * Value: A string that specifies the window or frame to which to target the URL's content. + */ + target: string; + /** + * Provides access to a drill-down key. + * Value: A string that specifies a drill-down key. + */ + drillDownKey: string; +} +/** + * A client-side equivalent of the ASPxWebDocumentViewer class. + */ +interface ASPxClientWebDocumentViewer extends ASPxClientControl { + /** + * Occurs after a report document has been loaded to the Web Document Viewer. + */ + DocumentReady: ASPxClientEvent>; + /** + * Occurs each time a value of an editing field changes. + */ + EditingFieldChanged: ASPxClientEvent>; + /** + * Enables you to customize UI elements of the Web Document Viewer. + */ + CustomizeElements: ASPxClientEvent>; + /** + * Enables you to customize the menu actions of a Web Document Viewer. + */ + CustomizeMenuActions: ASPxClientEvent>; + /** + * Occurs each time a standard editor is created for a report parameter based on a parameter type. + */ + CustomizeParameterEditors: ASPxClientEvent>; + /** + * Occurs each time a look-up editor is created for a report parameter. + */ + CustomizeParameterLookUpSource: ASPxClientEvent>; + /** + * Occurs when the left mouse button has been clicked over a report document. + */ + PreviewClick: ASPxClientEvent>; + /** + * Occurs after report parameter values have been reset to their default values. + */ + ParametersReset: ASPxClientEvent>; + /** + * Occurs after report parameter values have been submitted. + */ + ParametersSubmitted: ASPxClientEvent>; + /** + * Provides access to the preview model of the ASPxClientWebDocumentViewer. + */ + GetPreviewModel(): Object; + /** + * Returns a model for a report parameter. + */ + GetParametersModel(): Object; + /** + * Opens the specified report on the client side of the Web Document Viewer. + * @param url A string that specifies the URL of a report to be opened. + */ + OpenReport(url: string): any; + /** + * Prints the current document. + */ + Print(): void; + /** + * Prints the document's page with the specified index. + * @param pageIndex An index of the page to be printed. + */ + Print(pageIndex: number): void; + /** + * Exports the document to a PDF file. + */ + ExportTo(): void; + /** + * Exports the document to a specified file format. + * @param format A String value, specifying the export format. The following formats are currently supported: 'csv', 'html', 'image', 'mht', 'pdf', 'rtf', 'docx', 'txt', 'xls', and 'xlsx'. + */ + ExportTo(format: string): void; + /** + * Exports the document to a specified file format. + * @param format A String value that specifies the export format. The following formats are currently supported: 'csv', 'html', 'image', 'mht', 'pdf', 'rtf', 'docx', 'txt', 'xls', and 'xlsx'. + * @param inlineResult true, to try opening the result file in a new browser tab without a download; otherwise, false. + */ + ExportTo(format: string, inlineResult: boolean): void; + /** + * Returns the zero-based index of the currently displayed page. + */ + GetCurrentPageIndex(): number; + /** + * Displays the report page with the specified page index. + * @param pageIndex A zero-based integer value that specifies the index of a page to be displayed. + */ + GoToPage(pageIndex: number): void; + /** + * Closes the document currently being opened in the Web Document Viewer. + */ + Close(): void; + /** + * Resets the values of report parameters to their default values. + */ + ResetParameters(): void; + /** + * Starts building a report document. + */ + StartBuild(): void; + /** + * Updates the localization settings of the ASPxClientWebDocumentViewer properties. + * @param localization A dictionary containing the property names, along with their localized equivalents. + */ + UpdateLocalization(localization: { [key: string]: string; }): void; +} +/** + * A method that will handle the EditingFieldChanged event. + */ +interface ASPxClientWebDocumentViewerEditingFieldChangedEventHandler { + /** + * A method that will handle the PreviewEditingFieldChanged event. + * @param source The event sender. + * @param e An ASPxClientWebDocumentViewerEditingFieldChangedEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientWebDocumentViewerEditingFieldChangedEventArgs): void; +} +/** + * A method that will handle the DocumentReady event. + */ +interface ASPxClientWebDocumentViewerDocumentReadyEventHandler { + /** + * A method that will handle the PreviewDocumentReady event. + * @param source The event sender. + * @param e An ASPxClientWebDocumentViewerDocumentReadyEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientWebDocumentViewerDocumentReadyEventArgs): void; +} +/** + * A method that will handle the CustomizeElements event. + */ +interface ASPxClientWebDocumentViewerCustomizeElementsEventHandler { + /** + * A method that will handle the PreviewCustomizeElements event. + * @param source The event sender. + * @param e An ASPxClientCustomizeElementsEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientCustomizeElementsEventArgs): void; +} +/** + * A method that will handle the CustomizeMenuActions event. + */ +interface ASPxClientWebDocumentViewerCustomizeMenuActionsEventHandler { + /** + * A method that will handle the CustomizeMenuActions event. + * @param source The event sender. + * @param e An ASPxClientCustomizeMenuActionsEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientCustomizeMenuActionsEventArgs): void; +} +/** + * A method that will handle the CustomizeParameterEditors event. + */ +interface ASPxClientWebDocumentViewerCustomizeParameterEditorsEventHandler { + /** + * A method that will handle the CustomizeParameterEditors event. + * @param source The event sender. + * @param e An ASPxClientCustomizeParameterEditorsEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientCustomizeParameterEditorsEventArgs): void; +} +/** + * A method that will handle the CustomizeParameterLookUpSource event. + */ +interface ASPxClientWebDocumentViewerCustomizeParameterLookUpSourceEventHandler { + /** + * A method that will handle the CustomizeParameterLookUpSource event. + * @param source The event sender. + * @param e An ASPxClientCustomizeParameterLookUpSourceEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientCustomizeParameterLookUpSourceEventArgs): void; +} +/** + * A method that will handle the PreviewClick event. + */ +interface ASPxClientWebDocumentViewerPreviewClickEventHandler { + /** + * A method that will handle the PreviewClick event. + * @param source The event sender. + * @param e An ASPxClientPreviewClickEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientPreviewClickEventArgs): void; +} +/** + * A method that will handle the ParametersReset event. + */ +interface ASPxClientWebDocumentViewerParametersResetEventHandler { + /** + * A method that will handle the PreviewParametersReset event. + * @param source The event sender. + * @param e An ASPxClientParametersResetEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientParametersResetEventArgs): void; +} +/** + * A method that will handle the ParametersSubmitted event. + */ +interface ASPxClientWebDocumentViewerParametersSubmittedEventHandler { + /** + * A method that will handle the PreviewParametersSubmitted event. + * @param source The event sender. + * @param e An ASPxClientParametersSubmittedEventArgs object that contains data related to the event. + */ + (source: S, e: ASPxClientParametersSubmittedEventArgs): void; +} + +interface MVCxClientDashboardViewerStatic extends ASPxClientDashboardViewerStatic { +} +interface DashboardDataAxisNamesStatic { + /** + * Identifies a default axis in all data-bound dashboard items. + */ + DefaultAxis: string; + /** + * Identifies a series axis in a chart and pie. + */ + ChartSeriesAxis: string; + /** + * Identifies an argument axis in a chart, scatter chart and pie. + */ + ChartArgumentAxis: string; + /** + * Identifies a sparkline axis in a grid and cards. + */ + SparklineAxis: string; + /** + * Identifies a pivot column axis. + */ + PivotColumnAxis: string; + /** + * Identifies a pivot row axis. + */ + PivotRowAxis: string; +} +interface DashboardSpecialValuesStatic { + /** + * Represents a null value. + */ + NullValue: string; + /** + * Represents a null value in OLAP mode. + */ + OlapNullValue: string; + /** + * Represents an Others value. + */ + OthersValue: string; + /** + * Represents an error value for calculated fields. + */ + ErrorValue: string; + /** + * Returns whether or not the specified value is an NullValue. + * @param value The specified value. + */ + IsNullValue(value: Object): boolean; + /** + * Returns whether or not the specified value is an OlapNullValue. + * @param value The specified value. + */ + IsOlapNullValue(value: Object): boolean; + /** + * Returns whether or not the specified value is an OthersValue. + * @param value The specified value. + */ + IsOthersValue(value: Object): boolean; + /** + * Returns whether or not the specified value is an ErrorValue. + * @param value The specified value. + */ + IsErrorValue(value: Object): boolean; +} +interface DashboardExportPageLayoutStatic { + /** + * The page orientation used to export a dashboard (dashboard item) is portrait. + */ + Portrait: string; + /** + * The page orientation used to export a dashboard (dashboard item) is landscape. + */ + Landscape: string; +} +interface DashboardExportPaperKindStatic { + /** + * Letter paper (8.5 in. by 11 in.). + */ + Letter: string; + /** + * Legal paper (8.5 in. by 14 in.). + */ + Legal: string; + /** + * Executive paper (7.25 in. by 10.5 in.). + */ + Executive: string; + /** + * A5 paper (148 mm by 210 mm). + */ + A5: string; + /** + * A4 paper (210 mm by 297 mm). + */ + A4: string; + /** + * A3 paper (297 mm by 420 mm). + */ + A3: string; +} +interface DashboardExportScaleModeStatic { + /** + * The dashboard (dashboard item) on the exported page retains its original size. + */ + None: string; + /** + * The size of the dashboard (dashboard item) on the exported page is changed according to the scale factor value. + */ + UseScaleFactor: string; + /** + * The size of the dashboard (dashboard item) is changed according to the width of the exported page. + */ + AutoFitToPageWidth: string; + /** + * The size of the dashboard (dashboard item) is changed to fit its content on a single page. + */ + AutoFitWithinOnePage: string; +} +interface DashboardExportFilterStateStatic { + /** + * The filter state is not included in the exported document. + */ + None: string; + /** + * The filter state is placed below the dashboard (dashboard item) in the exported document. + */ + Below: string; + /** + * The filter state is placed on a separate page in the exported document. + */ + SeparatePage: string; +} +interface DashboardStateExportPositionStatic { + /** + * The dashboard state is placed below the exported dashboard/dashboard item. + */ + Below: string; + /** + * The dashboard state is placed on a separate page. + */ + SeparatePage: string; +} +interface DashboardStateExcelExportPositionStatic { + /** + * The dashboard state is placed below the exported data. + */ + Below: string; + /** + * The dashboard state is placed on a separate sheet. + */ + SeparateSheet: string; +} +interface DashboardExportImageFormatStatic { + /** + * The PNG image format. + */ + Png: string; + /** + * The GIF image format. + */ + Gif: string; + /** + * The JPG image format. + */ + Jpg: string; +} +interface ExcelExportFilterStateStatic { + none: string; + below: string; + separatePage: string; +} +interface DashboardExportExcelFormatStatic { + /** + * The Excel 97 - Excel 2003 (XLS) file format. + */ + Xls: string; + /** + * The Office Excel 2007 XML-based (XLSX) file format. + */ + Xlsx: string; + /** + * A comma-separated values (CSV) file format. + */ + Csv: string; +} +interface ChartExportSizeModeStatic { + /** + * A chart dashboard item is exported in a size identical to that shown on the dashboard. + */ + None: string; + /** + * A chart dashboard item is stretched or shrunk to fit the page to which it is exported. + */ + Stretch: string; + /** + * A chart dashboard item is resized proportionally to best fit the exported page. + */ + Zoom: string; +} +interface MapExportSizeModeStatic { + /** + * A map dashboard item is exported in a size identical to that shown on the dashboard + */ + None: string; + /** + * A map dashboard item is resized proportionally to best fit the exported page. + */ + Zoom: string; +} +interface TreemapExportSizeModeStatic { + /** + * For internal use. + */ + none: string; + /** + * For internal use. + */ + zoom: string; +} +interface RangeFilterExportSizeModeStatic { + /** + * A Range Filter dashboard item is exported in a size identical to that shown on the dashboard. + */ + None: string; + /** + * A Range Filter dashboard item is stretched or shrunk to fit the page to which it is exported. + */ + Stretch: string; + /** + * A Range Filter dashboard item is resized proportionally to best fit the printed page. + */ + Zoom: string; +} +interface DashboardSelectionModeStatic { + None: string; + Single: string; + Multiple: string; +} +interface ASPxClientDashboardStatic extends ASPxClientControlStatic { +} +interface ASPxClientDashboardViewerStatic 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): ASPxClientDashboardViewer; +} +interface ASPxClientEditBaseStatic extends ASPxClientControlStatic { +} +interface ASPxClientEditStatic extends ASPxClientEditBaseStatic { + /** + * Assigns a null value to all editors in a specified visibility state, which are located within a specified container and belong to a specific validation group. + * @param container An HTML element specifying the container of editors to be validated. + * @param validationGroup A string value specifying the validation group's name. + * @param clearInvisibleEditors true to clear both visible and invisible editors that belong to the specified container and group; false to clear only visible editors. + */ + ClearEditorsInContainer(container: Object, validationGroup: string, clearInvisibleEditors: boolean): void; + /** + * Assigns a null value to all visible editors located within a specified container, and belonging to a specific validation group. + * @param container An HTML element specifying the container of editors to be validated. + * @param validationGroup A string value specifying the validation group's name. + */ + ClearEditorsInContainer(container: Object, validationGroup: string): void; + /** + * Assigns a null value to all visible editors located within a specified container. + * @param container An HTML element specifying the container of editors to be validated. + */ + ClearEditorsInContainer(container: Object): void; + /** + * Assigns a null value to all editors which are located within the specified container object, and belonging to a specific validation group, dependent on the visibility state specified. + * @param containerId A string value specifying the editor container's identifier. + * @param validationGroup A string value specifying the validatiion group's name. + * @param clearInvisibleEditors true to clear both visible and invisible editors that belong to the specified container and group; false to clear only visible editors. + */ + ClearEditorsInContainerById(containerId: string, validationGroup: string, clearInvisibleEditors: boolean): void; + /** + * Assigns a null value to all visible editors that are located within the specified container object, and belonging to a specific validation group. + * @param containerId A string value specifying the editor container's identifier. + * @param validationGroup A string value specifying the validatiion group's name. + */ + ClearEditorsInContainerById(containerId: string, validationGroup: string): void; + /** + * Assigns a null value to all visible editors that are located within the specified container object. + * @param containerId A string value specifying the editor container's identifier. + */ + ClearEditorsInContainerById(containerId: string): void; + /** + * Assigns a null value to all editors which belong to a specific validation group, dependent on the visibility state specified. + * @param validationGroup A string value specifying the validation group's name. + * @param clearInvisibleEditors true to clear both visible and invisible editors that belong to the specified validation group; false to clear only visible editors. + */ + ClearGroup(validationGroup: string, clearInvisibleEditors: boolean): void; + /** + * Assigns a null value to all visible editors which belong to a specific validation group. + * @param validationGroup A string value specifying the validation group's name. + */ + ClearGroup(validationGroup: string): void; + /** + * Performs validation of all editors in a specified visibility state, which are located within a specified container and belong to a specific validation group. + * @param container An HTML element specifying the container of editors to be validated. + * @param validationGroup A string value that specifies the validation group's name. + * @param validateInvisibleEditors true to validate both visible and invisible editors that belong to the specified container and group; false to validate only visible editors. + */ + ValidateEditorsInContainer(container: Object, validationGroup: string, validateInvisibleEditors: boolean): boolean; + /** + * Performs validation of visible editors that are located within the specified container and belong to a specific validation group. + * @param container An HTML element specifying the container of editors to be validated. + * @param validationGroup A string value that specifies the validation group's name. + */ + ValidateEditorsInContainer(container: Object, validationGroup: string): boolean; + /** + * Performs validation of visible editors that are located within the specified container. + * @param container An HTML element specifying the container of editors to be validated. + */ + ValidateEditorsInContainer(container: Object): boolean; + /** + * Performs validation of the editors which are located within the specified container and belong to a specific validation group, dependent on the visibility state specified. + * @param containerId A string value specifying the editor container's identifier. + * @param validationGroup A string value that specifies the validation group's name. + * @param validateInvisibleEditors true to validate both visible and invisible editors that belong to the specified container and group; false to validate only visible editors. + */ + ValidateEditorsInContainerById(containerId: string, validationGroup: string, validateInvisibleEditors: boolean): boolean; + /** + * Performs validation of visible editors that are located within the specified container and belong to a specific validation group. + * @param containerId A string value that specifies the container's unique identifier. + * @param validationGroup A string value that specifies the validation group's name. + */ + ValidateEditorsInContainerById(containerId: string, validationGroup: string): boolean; + /** + * Performs validation of visible editors which are located within the specified container. + * @param containerId A string value that specifies the container's unique identifier. + */ + ValidateEditorsInContainerById(containerId: string): boolean; + /** + * Performs validation of editors contained within the specified validation group, dependent on the editor visibility state specified. + * @param validationGroup A string value specifying the validation group's name. + * @param validateInvisibleEditors true to validate both visible and invisible editors that belong to the specified validation group; false to validate only visible editors. + */ + ValidateGroup(validationGroup: string, validateInvisibleEditors: boolean): boolean; + /** + * Performs validation of visible editors contained within the specified validation group. + * @param validationGroup A string value specifying the validation group's name. + */ + ValidateGroup(validationGroup: string): boolean; + /** + * Verifies whether the editors in a specified visibility state, which are located within a specified container and belong to a specific validation group, are valid. + * @param container An HTML element specifying the container of editors to be validated. + * @param validationGroup A string value that specifies the validation group's name. + * @param checkInvisibleEditors true to check both visible and invisible editors that belong to the specified container; false to check only visible editors. + */ + AreEditorsValid(container: Object, validationGroup: string, checkInvisibleEditors: boolean): boolean; + /** + * Verifies whether visible editors, which are located within a specified container and belong to a specific validation group, are valid. + * @param container An HTML element specifying the container of editors to be validated. + * @param validationGroup A string value that specifies the validation group's name. + */ + AreEditorsValid(container: Object, validationGroup: string): boolean; + /** + * Verifies whether visible editors located in a specified container are valid. + * @param container An HTML element specifying the container of editors to be validated. + */ + AreEditorsValid(container: Object): boolean; + /** + * Verifies whether the editors with the specified settings are valid. + * @param containerId A string value that specifies the container's unique identifier. + * @param validationGroup A string value that specifies the validation group's name. + * @param checkInvisibleEditors true to check both visible and invisible editors that belong to the specified container; false to check only visible editors. + */ + AreEditorsValid(containerId: string, validationGroup: string, checkInvisibleEditors: boolean): boolean; + /** + * Verifies whether visible editors with the specified settings are valid. + * @param containerId A string value that specifies the container's unique identifier. + * @param validationGroup A string value that specifies the validation group's name. + */ + AreEditorsValid(containerId: string, validationGroup: string): boolean; + /** + * Verifies whether visible editors with the specified settings are valid. + * @param containerId A string value that specifies the container's unique identifier. + */ + AreEditorsValid(containerId: string): boolean; + /** + * Verifies whether visible editors on a page are valid. + */ + AreEditorsValid(): boolean; +} +interface ASPxClientBinaryImageStatic extends ASPxClientEditStatic { + /** + * 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): ASPxClientBinaryImage; +} +interface ASPxClientButtonStatic 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): ASPxClientButton; +} +interface ASPxClientCalendarStatic extends ASPxClientEditStatic { + /** + * 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): ASPxClientCalendar; +} +interface ASPxClientCaptchaStatic 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): ASPxClientCaptcha; +} +interface ASPxClientCheckBoxStatic extends ASPxClientEditStatic { + /** + * 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): ASPxClientCheckBox; +} +interface ASPxClientRadioButtonStatic extends ASPxClientCheckBoxStatic { + /** + * 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): ASPxClientRadioButton; +} +interface ASPxClientTextEditStatic extends ASPxClientEditStatic { +} +interface ASPxClientTextBoxBaseStatic extends ASPxClientTextEditStatic { +} +interface ASPxClientButtonEditBaseStatic extends ASPxClientTextBoxBaseStatic { +} +interface ASPxClientDropDownEditBaseStatic extends ASPxClientButtonEditBaseStatic { +} +interface ASPxClientColorEditStatic extends ASPxClientDropDownEditBaseStatic { + /** + * 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): ASPxClientColorEdit; +} +interface ASPxClientComboBoxStatic extends ASPxClientDropDownEditBaseStatic { + /** + * 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): ASPxClientComboBox; +} +interface ASPxClientDateEditStatic extends ASPxClientDropDownEditBaseStatic { + /** + * 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): ASPxClientDateEdit; +} +interface ASPxClientDropDownEditStatic extends ASPxClientDropDownEditBaseStatic { + /** + * 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): ASPxClientDropDownEdit; +} +interface ASPxClientFilterControlStatic 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): ASPxClientFilterControl; +} +interface ASPxClientListEditStatic extends ASPxClientEditStatic { +} +interface ASPxClientListBoxStatic extends ASPxClientListEditStatic { + /** + * 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): ASPxClientListBox; +} +interface ASPxClientCheckListBaseStatic extends ASPxClientListEditStatic { +} +interface ASPxClientRadioButtonListStatic extends ASPxClientCheckListBaseStatic { + /** + * 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): ASPxClientRadioButtonList; +} +interface ASPxClientCheckBoxListStatic extends ASPxClientCheckListBaseStatic { + /** + * 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): ASPxClientCheckBoxList; +} +interface ASPxClientProgressBarStatic extends ASPxClientEditBaseStatic { + /** + * 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): ASPxClientProgressBar; +} +interface ASPxClientSpinEditBaseStatic extends ASPxClientButtonEditBaseStatic { +} +interface ASPxClientSpinEditStatic extends ASPxClientSpinEditBaseStatic { + /** + * 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): ASPxClientSpinEdit; +} +interface ASPxClientTimeEditStatic extends ASPxClientSpinEditBaseStatic { + /** + * 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): ASPxClientTimeEdit; +} +interface ASPxClientStaticEditStatic extends ASPxClientEditBaseStatic { +} +interface ASPxClientHyperLinkStatic extends ASPxClientStaticEditStatic { + /** + * 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): ASPxClientHyperLink; +} +interface ASPxClientImageBaseStatic extends ASPxClientStaticEditStatic { +} +interface ASPxClientImageStatic extends ASPxClientImageBaseStatic { + /** + * 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): ASPxClientImage; +} +interface ASPxClientLabelStatic extends ASPxClientStaticEditStatic { + /** + * 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): ASPxClientLabel; +} +interface ASPxClientTextBoxStatic extends ASPxClientTextBoxBaseStatic { + /** + * 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): ASPxClientTextBox; +} +interface ASPxClientMemoStatic extends ASPxClientTextEditStatic { + /** + * 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): ASPxClientMemo; +} +interface ASPxClientButtonEditStatic extends ASPxClientButtonEditBaseStatic { + /** + * 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): ASPxClientButtonEdit; +} +interface ASPxClientTokenBoxStatic extends ASPxClientComboBoxStatic { + /** + * 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): ASPxClientTokenBox; +} +interface ASPxClientTrackBarStatic extends ASPxClientEditStatic { + /** + * 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): ASPxClientTrackBar; +} +interface ASPxClientValidationSummaryStatic extends ASPxClientControlStatic { +} +interface ASPxClientGaugeControlStatic 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): ASPxClientGaugeControl; +} +interface ASPxClientGridBaseStatic extends ASPxClientControlStatic { +} +interface ASPxClientGridViewCallbackCommandStatic { + /** + * Default value: "NEXTPAGE" + */ + NextPage: string; + /** + * Default value: "PREVPAGE" + */ + PreviousPage: string; + /** + * Default value: "GOTOPAGE" + */ + GotoPage: string; + /** + * Default value: "SELECTROWS" + */ + SelectRows: string; + /** + * Default value: "SELECTROWSKEY" + */ + SelectRowsKey: string; + /** + * Default value: "SELECTION" + */ + Selection: string; + /** + * Default value: "FOCUSEDROW" + */ + FocusedRow: string; + /** + * Default value: "GROUP" + */ + Group: string; + /** + * Default value: "UNGROUP" + */ + UnGroup: string; + /** + * Default value: "SORT" + */ + Sort: string; + /** + * Default value: "COLUMNMOVE" + */ + ColumnMove: string; + /** + * Default value: "COLLAPSEALL" + */ + CollapseAll: string; + /** + * Default value: "EXPANDALL" + */ + ExpandAll: string; + /** + * Default value: "EXPANDROW" + */ + ExpandRow: string; + /** + * Default value: "COLLAPSEROW" + */ + CollapseRow: string; + /** + * Default value: "HIDEALLDETAIL" + */ + HideAllDetail: string; + /** + * Default value: "SHOWALLDETAIL" + */ + ShowAllDetail: string; + /** + * Default value: "SHOWDETAILROW" + */ + ShowDetailRow: string; + /** + * Default value: "HIDEDETAILROW" + */ + HideDetailRow: string; + /** + * Default value: "PAGERONCLICK" + */ + PagerOnClick: string; + /** + * Default value: "APPLYFILTER" + */ + ApplyFilter: string; + /** + * Default value: "APPLYCOLUMNFILTER" + */ + ApplyColumnFilter: string; + /** + * Default value: "APPLYMULTICOLUMNFILTER" + */ + ApplyMultiColumnFilter: string; + /** + * Default value: "APPLYHEADERCOLUMNFILTER" + */ + ApplyHeaderColumnFilter: string; + /** + * Default value: "APPLYSEARCHPANELFILTER" + */ + ApplySearchPanelFilter: string; + /** + * Default value: "APPLYCUSTOMIZATIONDIALOGCHANGES" + */ + ApplyCustomizationDialogChanges: string; + /** + * Default value: "FILTERROWMENU" + */ + FilterRowMenu: string; + /** + * Default value: "STARTEDIT" + */ + StartEdit: string; + /** + * Default value: "CANCELEDIT" + */ + CancelEdit: string; + /** + * Default value: "UPDATEEDIT" + */ + UpdateEdit: string; + /** + * Default value: "ADDNEWROW" + */ + AddNewRow: string; + /** + * Default value: "DELETEROW" + */ + DeleteRow: string; + /** + * Default value: "CUSTOMBUTTON" + */ + CustomButton: string; + /** + * Default value: "CUSTOMCALLBACK" + */ + CustomCallback: string; + /** + * Default value: "SHOWFILTERCONTROL" + */ + ShowFilterControl: string; + /** + * Default value: "CLOSEFILTERCONTROL" + */ + CloseFilterControl: string; + /** + * Default value: "SETFILTERENABLED" + */ + SetFilterEnabled: string; + /** + * Default value: "REFRESH" + */ + Refresh: string; + /** + * Default value: "SELFIELDVALUES" + */ + SelFieldValues: string; + /** + * Default value: "ROWVALUES" + */ + RowValues: string; + /** + * Default value: "PAGEROWVALUES" + */ + PageRowValues: string; + /** + * Default value: "FILTERPOPUP" + */ + FilterPopup: string; + /** + * Default value: "CONTEXTMENU" + */ + ContextMenu: string; + /** + * Default value: "TOOLBAR" + */ + Toolbar: string; + /** + * Default value: "CUSTOMVALUES" + */ + CustomValues: string; +} +interface ASPxClientGridLookupStatic extends ASPxClientDropDownEditBaseStatic { + /** + * 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): ASPxClientGridLookup; +} +interface ASPxClientCardViewStatic extends ASPxClientGridBaseStatic { + /** + * 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): ASPxClientCardView; +} +interface ASPxClientGridViewStatic extends ASPxClientGridBaseStatic { + /** + * 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): ASPxClientGridView; +} +interface ASPxClientVerticalGridStatic extends ASPxClientGridBaseStatic { + /** + * 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): ASPxClientVerticalGrid; +} +interface ASPxClientVerticalGridCallbackCommandStatic { + /** + * Default value: "EXPANDROW" + */ + ExpandRow: string; +} +interface ASPxClientCommandConstsStatic { + /** + * Identifies a command that shows a search panel. + * Value: "showsearchpanel" + */ + SHOWSEARCHPANEL_COMMAND: string; + /** + * Identifies a command that invokes the Find and Replace dialog. + * Value: "findandreplacedialog" + */ + FINDANDREPLACE_DIALOG_COMMAND: string; + /** + * Identifies a command that applies the bold text formatting to the selected text. If it's already applied, cancels it. + * Value: "bold" + */ + BOLD_COMMAND: string; + /** + * Identifies a command that makes the selected text italic or regular type depending on the current state. + * Value: "italic" + */ + ITALIC_COMMAND: string; + /** + * Identifies a command that applies the underline text formatting to the selected text. If it's already applied, cancels it. + * Value: "underline" + */ + UNDERLINE_COMMAND: string; + /** + * Identifies a command that applies the strike through text formatting to the selected text. If it's already applied, cancels it. + * Value: "strikethrough" + */ + STRIKETHROUGH_COMMAND: string; + /** + * Identifies a command that applies the superscript text formatting to the selected text. If it's already applied, cancels it. + * Value: "superscript" + */ + SUPERSCRIPT_COMMAND: string; + /** + * Identifies a command that applies the subscript text formatting to the selected text. If it's already applied, cancels it. + * Value: "subscript" + */ + SUBSCRIPT_COMMAND: string; + /** + * Identifies a command that centers the content of the currently focused paragraph. + * Value: "justifycenter" + */ + JUSTIFYCENTER_COMMAND: string; + /** + * Identifies a command that left justifies the content of the currently focused paragraph. + * Value: "justifyleft" + */ + JUSTIFYLEFT_COMMAND: string; + /** + * Identifies a command that creates an indent for the selected paragarph. + * Value: "indent" + */ + INDENT_COMMAND: string; + /** + * Identifies a command that creates an outdent for the focused paragarph. + * Value: "outdent" + */ + OUTDENT_COMMAND: string; + /** + * Identifies a command that right justifies the content of the currently focused paragraph. + * Value: "justifyright" + */ + JUSTIFYRIGHT_COMMAND: string; + /** + * Identifies a command that fully justifies the content of the currently focused paragraph (aligned with both the left and right margines). + * Value: "justifyfull" + */ + JUSTIFYFULL_COMMAND: string; + /** + * Identifies a command that changes the size of the selected text. + * Value: "fontsize" + */ + FONTSIZE_COMMAND: string; + /** + * Identifies a command that changes the font of the selected text. + * Value: "fontname" + */ + FONTNAME_COMMAND: string; + /** + * Identifies a command that changes the color of a fore color pickers and sets the selected text fore color. + * Value: "forecolor" + */ + FONTCOLOR_COMMAND: string; + /** + * Identifies a command that changes the color of a back color pickers and sets the selected text back color. + * Value: "backcolor" + */ + BACKCOLOR_COMMAND: string; + /** + * Identifies a command that wraps the selected paragraph in the specified html tag. + * Value: "formatblock" + */ + FORMATBLOCK_COMMAND: string; + /** + * Identifies a command that wraps the currently selected text content in a specific html tag with a css class assigned to it. + * Value: "applycss" + */ + APPLYCSS_COMMAND: string; + /** + * Identifies a command that removes all formatting from the selected content. + * Value: "removeformat" + */ + REMOVEFORMAT_COMMAND: string; + /** + * Identifies a command that cancels the last action. + * Value: "undo" + */ + UNDO_COMMAND: string; + /** + * Identifies a command that returns a previously canceled action. + * Value: "redo" + */ + REDO_COMMAND: string; + /** + * Identifies a command that copies the selected content. + * Value: "copy" + */ + COPY_COMMAND: string; + /** + * Identifies a command that pastes the content of the clipboard at the current cursor position. + * Value: "paste" + */ + PASTE_COMMAND: string; + /** + * Identifies a command that pastes a specified content taking into account that it was copied from Word. + * Value: "pastefromword" + */ + PASTEFROMWORD_COMMAND: string; + /** + * Identifies a command that invokes the Paste from Word dialog. + * Value: "pastefromworddialog" + */ + PASTEFROMWORDDIALOG_COMMAND: string; + /** + * Identifies a command that cuts the selected content. + * Value: "cut" + */ + CUT_COMMAND: string; + /** + * Identifies a command that selects all content inside the html editor. + * Value: "selectall" + */ + SELECT_ALL: string; + /** + * Identifies a command that deletes the selected content. + * Value: "delete" + */ + DELETE_COMMAND: string; + /** + * Identifies a command that can be used to correctly insert HTML code into the editor. + * Value: "pastehtml" + */ + PASTEHTML_COMMAND: string; + /** + * Identifies a command that inserts a new ordered list. + * Value: "insertorderedlist" + */ + INSERTORDEREDLIST_COMMAND: string; + /** + * Identifies a command that inserts a new unordered list. + * Value: "insertunorderedlist" + */ + INSERTUNORDEREDLIST_COMMAND: string; + /** + * Identifies a command that restarts the current ordered list. + * Value: "restartorderedlist" + */ + RESTARTORDEREDLIST_COMMAND: string; + /** + * Identifies a command that continues a disrupted ordered list. + * Value: "continueorderedlist" + */ + CONTINUEORDEREDLIST_COMMAND: string; + /** + * Identifies a command that removes a hyperlink from the selected text or image. + * Value: "unlink" + */ + UNLINK_COMMAND: string; + /** + * Identifies a command that inserts a new hyperlink. + * Value: "insertlink" + */ + INSERTLINK_COMMAND: string; + /** + * Identifies a command that inserts a new image. + * Value: "insertimage" + */ + INSERTIMAGE_COMMAND: string; + /** + * Identifies a command that changes the selected image. + * Value: "changeimage" + */ + CHANGEIMAGE_COMMAND: string; + /** + * Identifies a command that initiates spell checking. + * Value: "checkspelling" + */ + CHECKSPELLING_COMMAND: string; + /** + * Identifies a command that invokes the Insert Image dialog. + * Value: "insertimagedialog" + */ + INSERTIMAGE_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change Image dialog. + * Value: "changeimagedialog" + */ + CHANGEIMAGE_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Insert Link dialog. + * Value: "insertlinkdialog" + */ + INSERTLINK_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change Link dialog. + * Value: "changelinkdialog" + */ + CHANGELINK_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Insert Table dialog. + * Value: "inserttabledialog" + */ + INSERTTABLE_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Table Properties dialog. + * Value: "tablepropertiesdialog" + */ + TABLEPROPERTIES_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Cell Properties dialog. + * Value: "tablecellpropertiesdialog" + */ + TABLECELLPROPERTIES_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Column Properties dialog. + * Value: "tablecolumnpropertiesdialog" + */ + TABLECOLUMNPROPERTIES_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Row Properties dialog. + * Value: "tablerowpropertiesdialog" + */ + TABLEROWPROPERTIES_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes a default browser Print dialog, allowing an end-user to print the content of the html editor. + * Value: "print" + */ + PRINT_COMMAND: string; + /** + * Identifies a command that toggles the full-screen mode. + * Value: "fullscreen" + */ + FULLSCREEN_COMMAND: string; + /** + * Identifies a command that inserts a new table. + * Value: "inserttable" + */ + INSERTTABLE_COMMAND: string; + /** + * Identifies a command that changes the selected table. + * Value: "changetable" + */ + CHANGETABLE_COMMAND: string; + /** + * Identifies a command that changes the selected table cell. + * Value: "changetablecell" + */ + CHANGETABLECELL_COMMAND: string; + /** + * Identifies a command that changes the selected table row. + * Value: "changetablerow" + */ + CHANGETABLEROW_COMMAND: string; + /** + * Identifies a command that changes the selected table column. + * Value: "changetablecolumn" + */ + CHANGETABLECOLUMN_COMMAND: string; + /** + * Identifies a command that deletes the currently selected table. + * Value: "deletetable" + */ + DELETETABLE_COMMAND: string; + /** + * Identifies a command that deletes the currently selected table row. + * Value: "deletetablerow" + */ + DELETETABLEROW_COMMAND: string; + /** + * Identifies a command that deletes the currently selected table column. + * Value: "deletetablecolumn" + */ + DELETETABLECOLUMN_COMMAND: string; + /** + * Identifies a command that inserts a new column to the left from the currently focused one. + * Value: "inserttablecolumntoleft" + */ + INSERTTABLECOLUMNTOLEFT_COMMAND: string; + /** + * Identifies a command that inserts a new column to the right from the currently focused one. + * Value: "inserttablecolumntoright" + */ + INSERTTABLECOLUMNTORIGHT_COMMAND: string; + /** + * Identifies a command that inserts a new row below the currently focused one. + * Value: "inserttablerowbelow" + */ + INSERTTABLEROWBELOW_COMMAND: string; + /** + * Identifies a command that inserts a new row above the currently focused one. + * Value: "inserttablerowabove" + */ + INSERTTABLEROWABOVE_COMMAND: string; + /** + * Identifies a command that splits the current table cell horizontally. + * Value: "splittablecellhorizontally" + */ + SPLITTABLECELLHORIZONTALLY_COMMAND: string; + /** + * Identifies a command that splits the current table cell vertically. + * Value: "splittablecellvertically" + */ + SPLITTABLECELLVERTICALLY_COMMAND: string; + /** + * Identifies a command that merges the focused table cell with the one to the right. + * Value: "mergetablecellright" + */ + MERGETABLECELLRIGHT_COMMAND: string; + /** + * Identifies a command that merges the focused table cell with the one below. + * Value: "mergetablecelldown" + */ + MERGETABLECELLDOWN_COMMAND: string; + /** + * Identifies a command that invokes a custom dialog. + * Value: "customdialog" + */ + CUSTOMDIALOG_COMMAND: string; + /** + * Identifies a command that exports the html editor content. + * Value: "export" + */ + EXPORT_COMMAND: string; + /** + * Identifies a command that inserts a new audio element. + * Value: "insertaudio" + */ + INSERTAUDIO_COMMAND: string; + /** + * Identifies a command that inserts a new video. + * Value: "insertvideo" + */ + INSERTVIDEO_COMMAND: string; + /** + * Identifies a command that inserts a new flash element. + * Value: "insertflash" + */ + INSERTFLASH_COMMAND: string; + /** + * Identifies a command that inserts a new YouTube video. + * Value: "insertyoutubevideo" + */ + INSERTYOUTUBEVIDEO_COMMAND: string; + /** + * Identifies a command that changes the selected audio element. + * Value: "changeaudio" + */ + CHANGEAUDIO_COMMAND: string; + /** + * Identifies a command that changes the selected video element. + * Value: "changevideo" + */ + CHANGEVIDEO_COMMAND: string; + /** + * Identifies a command that changes the selected flash element. + * Value: "changeflash" + */ + CHANGEFLASH_COMMAND: string; + /** + * Identifies a command that changes the selected YouTube video element. + * Value: "changeyoutubevideo" + */ + CHANGEYOUTUBEVIDEO_COMMAND: string; + /** + * Identifies a command that invokes the Insert Audio dialog. + * Value: "insertaudiodialog" + */ + INSERTAUDIO_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Insert Video dialog. + * Value: "insertvideodialog" + */ + INSERTVIDEO_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Insert Flash dialog. + * Value: "insertflashdialog" + */ + INSERTFLASH_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Insert YouTube Video dialog. + * Value: "insertyoutubevideodialog" + */ + INSERTYOUTUBEVIDEO_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change Audio dialog. + * Value: "changeaudiodialog" + */ + CHANGEAUDIO_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change Video dialog. + * Value: "changevideodialog" + */ + CHANGEVIDEO_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change Flash dialog. + * Value: "changeflash" + */ + CHANGEFLASH_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change YouTube Video dialog. + * Value: "changeyoutubevideodialog" + */ + CHANGEYOUTUBEVIDEO_DIALOG_COMMAND: string; + /** + * Identifies a command that pastes the content of the clipboard to the current cursor position, taking into account that the PasteMode property is set to SourceFormatting. + * Value: "pastehtmlsourceformatting" + */ + PASTEHTMLSOURCEFORMATTING_COMMAND: string; + /** + * Identifies a command that pastes the content of the clipboard to the current cursor position, taking into account that the PasteMode property is set to PlainText. + * Value: "pastehtmlplaintext" + */ + PASTEHTMLPLAINTEXT_COMMAND: string; + /** + * Identifies a command that pastes the content of the clipboard to the current cursor position, taking into account that the PasteMode property is set to MergeFormatting. + * Value: "pastehtmlmergeformatting" + */ + PASTEHTMLMERGEFORMATTING_COMMAND: string; + /** + * Identifies a command that inserts a new placeholder. + * Value: "insertplaceholder" + */ + INSERTPLACEHOLDER_COMMAND: string; + /** + * Identifies a command that changes the selected placeholder. + * Value: "changeplaceholder" + */ + CHANGEPLACEHOLDER_COMMAND: string; + /** + * Identifies a command that invokes the Insert Placeholder dialog. + * Value: "insertplaceholderdialog" + */ + INSERTPLACEHOLDER_DIALOG_COMMAND: string; + /** + * Identifies a command that invokes the Change Placeholder dialog. + * Value: "changeplaceholderdialog" + */ + CHANGEPLACEHOLDER_DIALOG_COMMAND: string; + /** + * Identifies a command that updates the editor content. + * Value: "updatedocument" + */ + UPDATEDOCUMENT_COMMAND: string; + /** + * Identifies a command that changes properties of the element selected in the tag inspector. + * Value: "changeelementproperties" + */ + CHANGEELEMENTPROPERTIES_COMMAND: string; + /** + * Identifies a command that invokes the Change Element Properties dialog. + * Value: "changeelementpropertiesdialog" + */ + CHANGEELEMENTPROPERTIES_DIALOG_COMMAND: string; + /** + * Identifies a command that comments the selected HTML code. If no code is selected, it comments the focused tag. + * Value: "comment" + */ + COMMENT_COMMAND: string; + /** + * Identifies a command that uncomments the selected HTML code. If no code is selected, the command uncomments the currently focused tag. + * Value: "uncomment" + */ + UNCOMMENTHTML_COMMAND: string; + /** + * Identifies a command that formats the current HTML document. + * Value: "formatdocument" + */ + FORMATDOCUMENT_COMMAND: string; + /** + * Identifies a command that applies the indent formatting to the selected content. + * Value: "indent" + */ + INDENTLINE_COMMAND: string; + /** + * Identifies a command that applies the outdent formatting to the focused content. + * Value: "outdent" + */ + OUTDENTLINE_COMMAND: string; + /** + * Identifies a command that collapses the selected HTML tag. + * Value: "collapsetag" + */ + COLLAPSETAG_COMMAND: string; + /** + * Identifies a command that expands the selected HTML tag. + * Value: "expandtag" + */ + EXPANDTAG_COMMAND: string; + /** + * Identifies a command that shows intellisense for the HTML code editor. + * Value: "showintellisense" + */ + SHOWINTELLISENSE_COMMAND: string; +} +interface ASPxClientHtmlEditorStatic 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): ASPxClientHtmlEditor; + /** + * Programmatically closes a custom dialog, supplying it with specific parameters. + * @param status An object representing a custom dialog's closing status. + * @param data An object representing custom data associated with a custom dialog. + */ + CustomDialogComplete(status: Object, data: Object): void; +} +interface ASPxClientHtmlEditorMediaPreloadModeStatic { + /** + * The browser does not load a media file when the page loads. + */ + None: string; + /** + * The browser loads the entire video when the page loads. + */ + Auto: string; + /** + * The browser loads only metadata when the page loads. + */ + Metadata: string; +} +interface ASPxClientPivotGridStatic 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): ASPxClientPivotGrid; +} +interface ASPxClientPivotCustomizationStatic extends ASPxClientControlStatic { +} +interface ASPxClientRichEditStatic 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): ASPxClientRichEdit; +} +interface ASPxSchedulerDateTimeHelperStatic { + /** + * Returns the date part of the specified DateTime value. + * @param date A DateTime object from which to extract the date. + */ + TruncToDate(date: Date): Date; + /** + * Returns the day time part of the specified DateTime value. + * @param date A DateTime object from which to extract the day time. + */ + 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 dayCount The number of days to add. + */ + 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. + * @param timeSpan A TimeSpan object specifying the timespan to add. + */ + AddTimeSpan(date: Date, timeSpan: any): Date; + /** + * Rounds a DateTime value up to the nearest interval. + * @param date A DateTime object containing a value to round. + * @param spanInMs A TimeSpan object specifying an interval to which to round. + */ + CeilDateTime(date: Date, spanInMs: any): Date; +} +interface ASPxClientWeekDaysCheckEditStatic extends ASPxClientControlStatic { +} +interface ASPxClientRecurrenceRangeControlStatic extends ASPxClientControlStatic { +} +interface ASPxClientRecurrenceControlBaseStatic extends ASPxClientControlStatic { +} +interface ASPxClientDailyRecurrenceControlStatic extends ASPxClientRecurrenceControlBaseStatic { +} +interface ASPxClientWeeklyRecurrenceControlStatic extends ASPxClientRecurrenceControlBaseStatic { +} +interface ASPxClientMonthlyRecurrenceControlStatic extends ASPxClientRecurrenceControlBaseStatic { +} +interface ASPxClientYearlyRecurrenceControlStatic extends ASPxClientRecurrenceControlBaseStatic { +} +interface ASPxClientRecurrenceTypeEditStatic extends ASPxClientRadioButtonListStatic { +} +interface ASPxClientTimeIntervalStatic { + /** + * Gets the duration of a time interval between two points in time. + * @param start A DateTime object specifying the starting point of the time interval. + * @param end A DateTime object specifying the ending point of the time interval. + */ + CalculateDuration(start: Date, end: Date): number; +} +interface ASPxClientSchedulerStatic 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): ASPxClientScheduler; +} +interface ASPxClientSpellCheckerStatic 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): ASPxClientSpellChecker; +} +interface ASPxClientSpellCheckerStopCheckingReasonStatic { + /** + * Spell checking is finished normally. + */ + Default: string; + /** + * The user stopped spell checking. + */ + User: string; +} +interface ASPxClientSpreadsheetStatic 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): ASPxClientSpreadsheet; +} +interface ASPxClientTreeListStatic 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): ASPxClientTreeList; +} +interface BootstrapClientAccordionStatic extends ASPxClientNavBarStatic { +} +interface BootstrapClientBinaryImageStatic extends ASPxClientHyperLinkStatic { +} +interface BootstrapClientButtonStatic extends ASPxClientButtonStatic { +} +interface BootstrapClientCalendarStatic extends ASPxClientCalendarStatic { +} +interface BootstrapClientCallbackPanelStatic extends ASPxClientControlStatic { +} +interface BootstrapClientChartBaseStatic extends ASPxClientControlStatic { +} +interface BootstrapClientChartStatic extends BootstrapClientChartBaseStatic { +} +interface BootstrapClientPolarChartStatic extends BootstrapClientChartBaseStatic { +} +interface BootstrapClientPieChartStatic extends BootstrapClientChartBaseStatic { +} +interface BootstrapClientCheckBoxStatic extends ASPxClientEditStatic { +} +interface BootstrapClientRadioButtonStatic extends BootstrapClientCheckBoxStatic { +} +interface BootstrapClientComboBoxStatic extends ASPxClientComboBoxStatic { +} +interface BootstrapClientDateEditStatic extends ASPxClientDateEditStatic { +} +interface BootstrapClientDropDownEditStatic extends ASPxClientDropDownEditStatic { +} +interface BootstrapClientFormLayoutStatic extends ASPxClientFormLayoutStatic { +} +interface BootstrapClientHyperLinkStatic extends ASPxClientHyperLinkStatic { +} +interface BootstrapClientImageStatic extends ASPxClientImageStatic { +} +interface BootstrapClientListBoxStatic extends ASPxClientListBoxStatic { +} +interface BootstrapClientCheckBoxListStatic extends ASPxClientCheckBoxListStatic { +} +interface BootstrapClientRadioButtonListStatic extends ASPxClientRadioButtonListStatic { +} +interface BootstrapClientMenuStatic extends ASPxClientMenuStatic { +} +interface BootstrapClientPagerStatic extends ASPxClientPagerStatic { +} +interface BootstrapClientPopupControlStatic extends ASPxClientPopupControlStatic { +} +interface BootstrapClientPopupMenuStatic extends ASPxClientPopupMenuStatic { +} +interface BootstrapClientProgressBarStatic extends ASPxClientProgressBarStatic { +} +interface BootstrapClientSpinEditStatic extends ASPxClientSpinEditStatic { +} +interface BootstrapClientTabControlStatic extends ASPxClientTabControlStatic { +} +interface BootstrapClientPageControlStatic extends ASPxClientPageControlStatic { +} +interface BootstrapClientTextBoxStatic extends ASPxClientTextBoxStatic { +} +interface BootstrapClientMemoStatic extends ASPxClientMemoStatic { +} +interface BootstrapClientButtonEditStatic extends ASPxClientButtonEditStatic { +} +interface BootstrapClientTreeViewStatic extends ASPxClientTreeViewStatic { +} +interface BootstrapUIWidgetBaseStatic extends ASPxClientControlStatic { +} +interface BootstrapClientUploadControlStatic extends ASPxClientUploadControlStatic { +} +interface BootstrapClientGridViewStatic extends ASPxClientGridViewStatic { +} +interface MVCxClientCalendarStatic extends ASPxClientCalendarStatic { + /** + * 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): MVCxClientCalendar; +} +interface MVCxClientCallbackPanelStatic extends ASPxClientCallbackPanelStatic { + /** + * 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): MVCxClientCallbackPanel; +} +interface MVCxClientCardViewStatic extends ASPxClientCardViewStatic { + /** + * 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): MVCxClientCardView; +} +interface MVCxClientChartStatic extends ASPxClientWebChartControlStatic { + /** + * 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): MVCxClientChart; +} +interface MVCxClientComboBoxStatic extends ASPxClientComboBoxStatic { + /** + * 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): MVCxClientComboBox; +} +interface MVCxClientDataViewStatic extends ASPxClientDataViewStatic { + /** + * 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): MVCxClientDataView; +} +interface MVCxClientDateEditStatic extends ASPxClientDateEditStatic { + /** + * 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): MVCxClientDateEdit; +} +interface MVCxClientDockManagerStatic extends ASPxClientDockManagerStatic { + /** + * 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): MVCxClientDockManager; +} +interface MVCxClientDockPanelStatic extends ASPxClientDockPanelStatic { + /** + * 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): MVCxClientDockPanel; +} +interface MVCxClientFileManagerStatic extends ASPxClientFileManagerStatic { + /** + * 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): MVCxClientFileManager; +} +interface MVCxClientGridViewStatic extends ASPxClientGridViewStatic { + /** + * 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): MVCxClientGridView; +} +interface MVCxClientHtmlEditorStatic extends ASPxClientHtmlEditorStatic { + /** + * 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): MVCxClientHtmlEditor; +} +interface MVCxClientImageGalleryStatic extends ASPxClientImageGalleryStatic { + /** + * 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): MVCxClientImageGallery; +} +interface MVCxClientListBoxStatic extends ASPxClientListBoxStatic { + /** + * 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): MVCxClientListBox; +} +interface MVCxClientNavBarStatic extends ASPxClientNavBarStatic { + /** + * 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): MVCxClientNavBar; +} +interface MVCxClientPivotGridStatic extends ASPxClientPivotGridStatic { + /** + * 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): MVCxClientPivotGrid; +} +interface MVCxClientPopupControlStatic extends ASPxClientPopupControlStatic { + /** + * 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): MVCxClientPopupControl; +} +interface MVCxClientDocumentViewerStatic extends ASPxClientDocumentViewerStatic { +} +interface MVCxClientReportViewerStatic extends ASPxClientReportViewerStatic { +} +interface MVCxClientReportDesignerStatic extends ASPxClientReportDesignerStatic { +} +interface MVCxClientRichEditStatic extends ASPxClientRichEditStatic { + /** + * 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): MVCxClientRichEdit; +} +interface MVCxClientRoundPanelStatic extends ASPxClientRoundPanelStatic { + /** + * 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): MVCxClientRoundPanel; +} +interface MVCxClientSchedulerStatic extends ASPxClientSchedulerStatic { + /** + * 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): MVCxClientScheduler; +} +interface MVCxSchedulerToolTipTypeStatic { + /** + * The tooltip is displayed for a selected appointment. + */ + Appointment: number; + /** + * The tooltip is displayed for a dragged appointment. + */ + AppointmentDrag: number; + /** + * The tooltip is displayed for a selected time interval. + */ + Selection: number; +} +interface MVCxClientSpreadsheetStatic extends ASPxClientSpreadsheetStatic { + /** + * 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): MVCxClientSpreadsheet; +} +interface MVCxClientPageControlStatic extends ASPxClientPageControlStatic { + /** + * 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): MVCxClientPageControl; +} +interface MVCxClientTokenBoxStatic extends ASPxClientTokenBoxStatic { + /** + * 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): MVCxClientTokenBox; +} +interface MVCxClientTreeListStatic extends ASPxClientTreeListStatic { + /** + * 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): MVCxClientTreeList; +} +interface MVCxClientTreeViewStatic extends ASPxClientTreeViewStatic { + /** + * 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): MVCxClientTreeView; +} +interface MVCxClientUploadControlStatic extends ASPxClientUploadControlStatic { + /** + * 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): MVCxClientUploadControl; +} +interface MVCxClientUtilsStatic { + /** + * Loads service resources (such as scripts, CSS files, etc.) required for DevExpress functionality to work properly after a non DevExpress callback has been processed on the server and returned back to the client. + */ + FinalizeCallback(): void; + /** + * Returns values of editors placed in the specified container. + * @param containerOrId A container of editors, or its ID. + */ + GetSerializedEditorValuesInContainer(containerOrId: Object): Object; + /** + * Returns values of editors placed in the specified container. + * @param containerOrId A container of editors, or its ID. + * @param processInvisibleEditors true to process both visible and invisible editors that belong to the specified container; false to process only visible editors. + */ + GetSerializedEditorValuesInContainer(containerOrId: Object, processInvisibleEditors: boolean): Object; +} +interface MVCxClientGlobalEventsStatic { + /** + * Dynamically connects the ControlsInitialized client event with an appropriate event handler function. + * @param handler A object representing the event handling function's content. + */ + AddControlsInitializedEventHandler(handler: ASPxClientControlsInitializedEventHandler): void; + /** + * Dynamically connects the BeginCallback client event with an appropriate event handler function. + * @param handler A object containing the event handling function's content. + */ + AddBeginCallbackEventHandler(handler: MVCxClientBeginCallbackEventHandler): void; + /** + * Dynamically connects the EndCallback client event with an appropriate event handler function. + * @param handler A object containing the event handling function's content. + */ + AddEndCallbackEventHandler(handler: ASPxClientEndCallbackEventHandler): void; + /** + * Dynamically connects the CallbackError client event with an appropriate event handler function. + * @param handler A object containing the event handling function's content. + */ + AddCallbackErrorHandler(handler: ASPxClientCallbackErrorEventHandler): void; +} +interface MVCxClientVerticalGridStatic extends ASPxClientVerticalGridStatic { + /** + * 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): MVCxClientVerticalGrid; +} +interface MVCxClientWebDocumentViewerStatic extends ASPxClientWebDocumentViewerStatic { +} +interface ASPxClientControlBaseStatic { + /** + * 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): ASPxClientControlBase; +} +interface ASPxClientControlStatic extends ASPxClientControlBaseStatic { + /** + * 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): ASPxClientControl; + /** + * Modifies the controls size on the page. + */ + AdjustControls(): void; + /** + * Modifies the controls size within the specified container. + * @param container An HTML element that is the container of the controls. + */ + AdjustControls(container: Object): void; + /** + * Returns a collection of client web control objects. + */ + GetControlCollection(): ASPxClientControlCollection; +} +interface ASPxClientCallbackStatic 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): ASPxClientCallback; +} +interface ASPxClientPanelBaseStatic 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): ASPxClientPanelBase; +} +interface ASPxClientPanelStatic extends ASPxClientPanelBaseStatic { + /** + * 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): ASPxClientPanel; +} +interface ASPxClientCallbackPanelStatic extends ASPxClientPanelStatic { + /** + * 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): ASPxClientCallbackPanel; +} +interface ASPxClientCloudControlStatic 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): ASPxClientCloudControl; +} +interface ASPxClientDataViewStatic 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): ASPxClientDataView; +} +interface ASPxClientDockManagerStatic 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): ASPxClientDockManager; +} +interface ASPxClientPopupControlBaseStatic extends ASPxClientControlStatic { +} +interface ASPxClientDockPanelStatic extends ASPxClientPopupControlBaseStatic { + /** + * 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): ASPxClientDockPanel; +} +interface ASPxClientDockZoneStatic 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): ASPxClientDockZone; +} +interface ASPxClientFileManagerStatic 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): ASPxClientFileManager; +} +interface ASPxClientFileManagerCommandConstsStatic { + /** + * The name of a command that is executed when an end-user renames an item. + */ + Rename: string; + /** + * The name of a command that is executed when an end-user moves an item. + */ + Move: string; + /** + * The name of a command that is executed when an end-user deletes an item. + */ + Delete: string; + /** + * The name of a command that is executed when an end-user creates a folder. + */ + Create: string; + /** + * The name of a command that is executed when an end-user uploads a file. + */ + Upload: string; + /** + * The name of a command that is executed when an end-user downloads an item. + */ + Download: string; + /** + * The name of a command that is executed when an end-user copies an item. + */ + Copy: string; + /** + * The name of a command that is executed when an end-user opens an item. + */ + Open: string; +} +interface ASPxClientFileManagerErrorConstsStatic { + /** + * The specified file is not found. Return Value: 0 + */ + FileNotFound: number; + /** + * The specified folder is not found. Return Value: 1 + */ + FolderNotFound: number; + /** + * Access is denied. Return Value: 2 + */ + AccessDenied: number; + /** + * Unspecified IO error occurs. Return Value: 3 + */ + UnspecifiedIO: number; + /** + * Unspecified error occurs. Return Value: 4 + */ + Unspecified: number; + /** + * The file/folder name is empty. Return Value: 5 + */ + EmptyName: number; + /** + * The operation was canceled. Return Value: 6 + */ + CanceledOperation: number; + /** + * The specified name contains invalid characters. Return Value: 7 + */ + InvalidSymbols: number; + /** + * The specified file extension is not allowed. Return Value: 8 + */ + WrongExtension: number; + /** + * The file/folder is being used by another process. Return Value: 9 + */ + UsedByAnotherProcess: number; + /** + * The specified file/folder already exists. Return Value: 10 + */ + 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 { + /** + * 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): ASPxClientHiddenField; +} +interface ASPxClientHintStatic extends ASPxClientControlStatic { + /** + * Forces the hint to reselect target UI elements according to the specified CSS selector. + */ + Update(): void; + /** + * Forces the hint to recalculate its position. + */ + UpdatePosition(): void; + /** + * Forces the hint to recalculate its position. + * @param hintElementOrTargetElement An object that is the hint element or the target element. + */ + UpdatePosition(hintElementOrTargetElement: Object): void; + /** + * Registers a hint's functionality with the specified settings. + * @param targetSelector A string value that is the CSS selector. Specifies to which UI elements the hint is displayed. + * @param options An ASPxClientHintOptions object that is the hint's options. + */ + Register(targetSelector: string, options: ASPxClientHintOptions): ASPxClientHint; + /** + * Registers a hint's functionality with the specified settings. + * @param targetSelector A string value that is the CSS selector. Specifies to which UI elements the hint is displayed. + * @param contentAttribute A string value that is the attribute name. Specifies from which target element's attribute a hint obtains its content. + */ + Register(targetSelector: string, contentAttribute: string): ASPxClientHint; + /** + * Registers a hint's functionality with the specified settings. + * @param targetSelector A string value that is the CSS selector. Specifies for which UI elements the hint is displayed. + * @param onShowing An ASPxClientHintShowingEventHandler object that is a handler for the displayed event. + */ + Register(targetSelector: string, onShowing: ASPxClientHintShowingEventHandler): ASPxClientHint; + /** + * Invokes a hint. + * @param targetSelector A string value that is the CSS selector. + * @param options An ASPxClientHintOptions object that is the hint's options. + */ + Show(targetSelector: string, options: ASPxClientHintOptions): void; + /** + * Invokes a hint. + * @param targetSelector A string value that is the CSS selector used to specify for which UI elements on a web page a hint is displayed. + * @param content A string value that is the hint's content. + */ + Show(targetSelector: string, content: string): void; + /** + * Invokes a hint. + * @param targetElement An object that is the target element. + * @param options An ASPxClientHintOptions object that is the hint's options. + */ + Show(targetElement: Object, options: ASPxClientHintOptions): void; + /** + * Invokes a hint. + * @param targetElement A HTML DOM element near to which the hint is displayed in response to user interaction. + * @param content A string value that is the hint's content. + */ + Show(targetElement: Object, content: string): void; + /** + * Invokes a hint. + * @param options An ASPxClientHintOptions object that is the hint's options. + */ + Show(options: ASPxClientHintOptions): void; + /** + * Hides a hint window. + * @param targetSelector A string value that is the CSS selector. + */ + Hide(targetSelector: string): void; + /** + * Hides a hint window. + * @param targetElementOrHintElement An object that is the target element or hint element. + */ + Hide(targetElementOrHintElement: Object): void; + /** + * Hides all hints. + */ + HideAll(): void; +} +interface ASPxClientImageGalleryStatic extends ASPxClientDataViewStatic { + /** + * 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): ASPxClientImageGallery; +} +interface ASPxClientImageSliderStatic 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): ASPxClientImageSlider; +} +interface ASPxClientImageZoomNavigatorStatic extends ASPxClientImageSliderStatic { +} +interface ASPxClientImageZoomStatic extends ASPxClientControlStatic { +} +interface ASPxClientLoadingPanelStatic 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): ASPxClientLoadingPanel; +} +interface ASPxClientMediaFileSelectorStatic extends ASPxClientControlStatic { +} +interface ASPxClientMenuBaseStatic extends ASPxClientControlStatic { + /** + * Returns a collection of client menu objects. + */ + GetMenuCollection(): ASPxClientMenuCollection; +} +interface ASPxClientMenuStatic extends ASPxClientMenuBaseStatic { + /** + * 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): ASPxClientMenu; +} +interface ASPxClientTouchUIStatic { + /** + * Extends the specified element's functionality with scrolling via touch behavior (one finger) and the ability to display vertical and horizontal scroll bars. + * @param id A string value specifying the element's ID. + */ + MakeScrollable(id: string): ScrollExtender; + /** + * Extends the specified element's functionality with scrolling via touch behavior (one finger) and the ability to display vertical and horizontal scroll bars. + * @param element An object that specifies the required DOM element. + */ + MakeScrollable(element: Object): ScrollExtender; + /** + * Extends the specified element's functionality with scrolling via touch behavior (one finger) and customized scrollbar-related options. + * @param id A string value specifying the name of a DOM element that should be extended with the touch scrolling functionality. + * @param options An ASPxClientTouchUIOptions object that provides options affecting the touch scrolling functionality. + */ + MakeScrollable(id: string, options: ASPxClientTouchUIOptions): ScrollExtender; + /** + * Extends the specified element's functionality with scrolling via touch behavior (one finger) and customized scrollbar-related options. + * @param element An object specifying the DOM element to extend with the touch scrolling functionality. + * @param options An ASPxClientTouchUIOptions object that provides options affecting the touch scrolling functionality. + */ + MakeScrollable(element: Object, options: ASPxClientTouchUIOptions): ScrollExtender; +} +interface ASPxClientNavBarStatic 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): ASPxClientNavBar; +} +interface ASPxClientNewsControlStatic extends ASPxClientDataViewStatic { + /** + * 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): ASPxClientNewsControl; +} +interface ASPxClientObjectContainerStatic 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): ASPxClientObjectContainer; +} +interface ASPxClientPagerStatic extends ASPxClientControlStatic { +} +interface ASPxClientPopupControlStatic extends ASPxClientPopupControlBaseStatic { + /** + * 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): ASPxClientPopupControl; + /** + * Returns a collection of client popup control objects. + */ + GetPopupControlCollection(): ASPxClientPopupControlCollection; +} +interface ASPxClientPopupControlResizeStateStatic { + /** + * A window has been resized. Returns 0. + */ + Resized: number; + /** + * A window has been collapsed. Returns 1. + */ + Collapsed: number; + /** + * A window has been expanded. Returns 2. + */ + Expanded: number; + /** + * A window has been maximized. Returns 3. + */ + Maximized: number; + /** + * A window has been restored after maximizing. Returns 4. + */ + RestoredAfterMaximized: number; +} +interface ASPxClientPopupControlCloseReasonStatic { + /** + * The window has been closed by an API. + */ + API: string; + /** + * An end-user clicks the close header button. + */ + CloseButton: string; + /** + * An end-user clicks outside the window's region + */ + OuterMouseClick: string; + /** + * An end-user moves the mouse pointer out of the window region. + */ + MouseOut: string; + /** + * An end-user presses the ESC key. + */ + Escape: string; +} +interface ASPxClientPopupMenuStatic extends ASPxClientMenuBaseStatic { + /** + * 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): ASPxClientPopupMenu; +} +interface ASPxClientRatingControlStatic 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): ASPxClientRatingControl; +} +interface ASPxClientRibbonStatic 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): ASPxClientRibbon; +} +interface ASPxClientRibbonStateStatic { + /** + * A ribbon is in the normal state. Returns 0 + */ + Normal: number; + /** + * A ribbon is minimized. Returns 1 + */ + Minimized: number; + /** + * A ribbon is temporarily shown. Returns 2 + */ + TemporaryShown: number; +} +interface ASPxClientRoundPanelStatic extends ASPxClientPanelBaseStatic { + /** + * 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): ASPxClientRoundPanel; +} +interface ASPxClientSplitterStatic 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): ASPxClientSplitter; +} +interface ASPxClientTabControlBaseStatic extends ASPxClientControlStatic { +} +interface ASPxClientTabControlStatic extends ASPxClientTabControlBaseStatic { + /** + * 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): ASPxClientTabControl; +} +interface ASPxClientPageControlStatic extends ASPxClientTabControlBaseStatic { + /** + * 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): ASPxClientPageControl; +} +interface ASPxClientTimerStatic 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): ASPxClientTimer; +} +interface ASPxClientTitleIndexStatic 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): ASPxClientTitleIndex; +} +interface ASPxClientTreeViewStatic 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): ASPxClientTreeView; +} +interface ASPxClientUploadControlStatic 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): ASPxClientUploadControl; +} +interface ASPxClientUploadControlValidationErrorTypeConstsStatic { + /** + * The allowed maximum file size is exceeded. Return Value: 1 + */ + MaxFileSizeExceeded: number; + /** + * The file's extension is not allowed. Return Value: 2 + */ + NotAllowedFileExtension: number; + /** + * The allowed maximum count of the files is exceeded. Return Value: 3 + */ + MaxFileCountExceeded: number; + /** + * A file name contains invalid character.Return Value: 4 + */ + FileNameContainsInvalidCharacter: number; +} +interface ASPxClientUtilsStatic { + /** + * Gets the user-agent string, which identifies the client browser and provides certain system details of the client computer. + * Value: A string value representing the browser's user-agent string. + */ + agent: string; + /** + * Gets a value that specifies whether the client browser is Opera. + * Value: true if the client browser is Opera; otherwise, false. + */ + opera: boolean; + /** + * Gets a value that specifies whether the client browser is Opera version 9. + * Value: true if the client browser is Opera version 9; otherwise, false. + */ + opera9: boolean; + /** + * Gets a value that specifies whether the client browser is Safari. + * Value: true if the client browser is Safari; otherwise, false. + */ + safari: boolean; + /** + * Gets a value that specifies whether the client browser is Safari version 3. + * Value: true if the client browser is Safari version 3; otherwise, false. + */ + safari3: boolean; + /** + * Gets a value that specifies whether the client browser is Safari, running under a MacOS operating system. + * Value: true if the client browser is Safari, running under a MacOS operating system; otherwise, false. + */ + safariMacOS: boolean; + /** + * Gets a value that specifies whether the client browser is Google Chrome. + * Value: true if the client browser is Google Chrome; otherwise, false. + */ + chrome: boolean; + /** + * Gets a value that specifies whether the client browser is Internet Explorer. + * Value: true if the client browser is Intenet Explorer; otherwise, false. + */ + ie: boolean; + /** + * Gets a value that specifies whether the client browser is Internet Explorer version 7. + * Value: true if the client browser is Intenet Explorer version 7; otherwise, false. + */ + ie7: boolean; + /** + * Gets a value that specifies whether the client browser is Firefox. + * Value: true if the client browser is Firefox; otherwise, false. + */ + firefox: boolean; + /** + * Gets a value that specifies whether the client browser is Firefox version 3. + * Value: true if the client browser is Firefox version 3; otherwise, false. + */ + firefox3: boolean; + /** + * Gets a value that specifies whether the client browser is Mozilla. + * Value: true if the client browser is Mozilla; otherwise, false. + */ + mozilla: boolean; + /** + * Gets a value that specifies whether the client browser is Netscape. + * Value: true if the client browser is Netscape; otherwise, false. + */ + netscape: boolean; + /** + * Gets a value that specifies a client browser's full version. + * Value: A double precision floating-point value that specifies a client browser's version. + */ + browserVersion: number; + /** + * Gets a value that specifies a client browser's major version. + * Value: An integer value that specifies a client browser's major version. + */ + browserMajorVersion: number; + /** + * Gets a value that specifies whether the application is run under a MacOS platform. + * Value: true if the application is run under the MacOS platform; otherwise, false. + */ + macOSPlatform: boolean; + /** + * Gets a value that specifies whether the application is run under the Windows platform. + * Value: true if the application is run under the Windows platform; otherwise, false. + */ + windowsPlatform: boolean; + /** + * Gets a value that specifies whether a client browser is based on WebKit. + * Value: true if the client browser is based on WebKit; otherwise, false. + */ + webKitFamily: boolean; + /** + * Gets a value that specifies whether a client browser is based on Netscape. + * Value: true if client browser is based on Netscape; otherwise, false. + */ + netscapeFamily: boolean; + /** + * Gets a value that specifies whether the client browser supports touch. + * Value: true if the client browser supports touch; otherwise, false. + */ + touchUI: boolean; + /** + * Gets a value that specifies whether the client browser supports the WebKit touch user interface. + * Value: true if the client browser supports the WebKit touch user interface; otherwise, false. + */ + webKitTouchUI: boolean; + /** + * Gets a value that specifies whether the client browser supports the Microsoft touch user interface. + * Value: true if the client browser supports the Microsoft touch user interface; otherwise, false. + */ + msTouchUI: boolean; + /** + * Gets a value that specifies whether the application is run under an iOS platform. + * Value: true if the application is run under the iOS platform; otherwise, false. + */ + iOSPlatform: boolean; + /** + * Gets a value that specifies whether the application is run under the Android platform. + * Value: true if the application is run under the Android platform; otherwise, false. + */ + androidPlatform: boolean; + /** + * Inserts the specified item into the specified array object. + * @param array An object that specifies the array to manipulate. + * @param element An object that specifies the array item to insert. + */ + ArrayInsert(array: Object[], element: Object): void; + /** + * Removes the specified item from the specified array object. + * @param array An object that specifies the array to manipulate. + * @param element An object that specifies the array item to remove. + */ + ArrayRemove(array: Object[], element: Object): void; + /** + * Removes an item at the specified index location from the specified array object. + * @param array An object that specifies the array to manipulate. + * @param index The zero-based index location of the array item to remove. + */ + ArrayRemoveAt(array: Object[], index: number): void; + /** + * Removes all items from the specified array object. + * @param array An object that specifies the array to manipulate. + */ + ArrayClear(array: Object[]): void; + /** + * Searches for the specified array item and returns the zero-based index of its first occurrence within the specified array object. + * @param array An object that specifies the array to manipulate. + * @param element An object that specifies the array item to locate. + */ + ArrayIndexOf(array: Object[], element: Object): number; + /** + * Binds the specified function to a specific element's event, so that the function gets called whenever the event fires on the element. + * @param element An object specifying the required element. + * @param eventName A string value that specifies the required event name without the "on" prefix. + * @param method An object that specifies the event's handling function. + */ + AttachEventToElement(element: Object, eventName: string, method: Object): void; + /** + * Unbinds the specified function from a specific element's event, so that the function stops receiving notifications when the event fires. + * @param element An object specifying the required element. + * @param eventName A string value that specifies the required event name. + * @param method An object that specifies the event's handling function. + */ + DetachEventFromElement(element: Object, eventName: string, method: Object): void; + /** + * Returns the object that fired the event. + * @param htmlEvent An object that represents the current event. + */ + GetEventSource(htmlEvent: Object): Object; + /** + * Gets the x-coordinate of the event-related mouse pointer position relative to an end-user's screen. + * @param htmlEvent An object specifying the required HTML event. + */ + GetEventX(htmlEvent: Object): number; + /** + * Gets the y-coordinate of the event-related mouse pointer position relative to an end-user's screen. + * @param htmlEvent An object specifying the required HTML event. + */ + GetEventY(htmlEvent: Object): number; + /** + * Gets the keyboard code for the specified event. + * @param htmlEvent An object specifying the required HTML event. + */ + GetKeyCode(htmlEvent: Object): number; + /** + * Cancels the default action of the specified event. + * @param htmlEvent An object that specifies the required HTML event. + */ + PreventEvent(htmlEvent: Object): boolean; + /** + * Cancels both the specified event's default action and the event's bubbling upon the hierarchy of event handlers. + * @param htmlEvent An object that specifies the required HTML event. + */ + PreventEventAndBubble(htmlEvent: Object): boolean; + /** + * Removes mouse capture from the specified event's source object. + * @param htmlEvent An object that specifies the required HTML event. + */ + PreventDragStart(htmlEvent: Object): boolean; + /** + * Clears any text selection made within the window's client region. + */ + ClearSelection(): void; + /** + * Gets a value that indicates whether the specified object exists on the client side. + * @param obj The object to test. + */ + IsExists(obj: Object): boolean; + /** + * Gets a value that indicates whether the specified object is a function. + * @param obj The object to test. + */ + IsFunction(obj: Object): boolean; + /** + * Gets the x-coordinate of the specified element's top left corner relative to the client area of the window, excluding scroll bars. + * @param element An object identifying the HTML element whose position should be obtained. + */ + GetAbsoluteX(element: Object): number; + /** + * Gets the y-coordinate of the specified element's top left corner relative to the client area of the window, excluding scroll bars. + * @param element An object identifying the HTML element whose position should be obtained. + */ + GetAbsoluteY(element: Object): number; + /** + * Sets the x-coordinate of the specified element's top left corner relative to the client area of the window, excluding scroll bars. + * @param element An object identifying the HTML element whose position should be defined. + * @param x An integer value specifying the required element's x-coordinate, in pixels. + */ + SetAbsoluteX(element: Object, x: number): void; + /** + * Sets the y-coordinate of the specified element's top left corner relative to the client area of the window, excluding scroll bars. + * @param element An object identifying the HTML element whose position should be defined. + * @param y An integer value specifying the required element's y-coordinate, in pixels. + */ + SetAbsoluteY(element: Object, y: number): void; + /** + * Returns the distance between the top edge of the document and the topmost portion of the content currently visible in the window. + */ + GetDocumentScrollTop(): number; + /** + * Returns the distance between the left edge of the document and the leftmost portion of the content currently visible in the window. + */ + GetDocumentScrollLeft(): number; + /** + * Gets the width of the window's client region. + */ + GetDocumentClientWidth(): number; + /** + * Gets the height of the window's client region. + */ + GetDocumentClientHeight(): number; + /** + * Gets a value indicating whether the object passed via the parentElement parameter is a parent of the object passed via the element parameter. + * @param parentElement An object specifying the parent HTML element. + * @param element An object specifying the child HTML element. + */ + GetIsParent(parentElement: Object, element: Object): boolean; + /** + * Returns a reference to the specified HTML element's first parent object which has an ID that matches the specified value. + * @param element An object specifying the child HTML element whose parent elements are searched. + * @param id A string specifying the required parent's ID. + */ + GetParentById(element: Object, id: string): Object; + /** + * Returns a reference to the specified HTML element's first parent object whose element name matches the specified value. + * @param element An object specifying the child HTML element whose parent elements are searched. + * @param tagName A string value specifying the element name (tag name) of the desired HTML element. + */ + GetParentByTagName(element: Object, tagName: string): Object; + /** + * Returns a reference to the specified HTML element's first parent object whose class name matches the specified value. + * @param element An object specifying the child HTML element whose parent elements are searched. + * @param className A string value specifying the class name of the desired HTML element. + */ + GetParentByClassName(element: Object, className: string): Object; + /** + * Returns a reference to the first element that has the specified ID in the parent HTML element specified. + * @param element An object identifying the parent HTML element to search. + * @param id A string specifying the ID attribute value of the desired child element. + */ + GetChildById(element: Object, id: string): Object; + /** + * Returns a reference to the particular element that has the specified element name and is contained within the specified parent HTML element. + * @param element An object specifying the parent HTML element to search. + * @param tagName A string value specifying the element name (tag name) of the desired HTML element. + * @param index An integer value specifying the zero-based index of the desired element amongst all the matching elements found. + */ + GetChildByTagName(element: Object, tagName: string, index: number): Object; + /** + * Creates or updates the HTTP cookie for the response. + * @param name A string value that represents the name of a cookie. + * @param value A string representing the cookie value. + */ + SetCookie(name: string, value: string): void; + /** + * Creates or updates the HTTP cookie for the response. + * @param name A string value that represents the name of a cookie. + * @param value A string representing the cookie value. + * @param expirationDate A date-time object that represents the expiration date and time for the cookie. + */ + SetCookie(name: string, value: string, expirationDate: Date): void; + /** + * Retrieves a cookie with the specified name. + * @param name A string value that represents the name of a cookie. + */ + GetCookie(name: string): string; + /** + * Deletes a cookie with the specified name. + * @param name A string value that represents the name of a cookie. + */ + DeleteCookie(name: string): void; + /** + * Returns a specifically generated code that uniquely identifies the combination of keys specified via the parameters. + * @param keyCode An integer value that specifies the code of the key. + * @param isCtrlKey true if the CTRL key should be included into the key combination; otherwise, false. + * @param isShiftKey true if the SHIFT key should be included into the key combination; otherwise, false. + * @param isAltKey true if the ALT key should be included into the key combination; otherwise, false. + */ + GetShortcutCode(keyCode: number, isCtrlKey: boolean, isShiftKey: boolean, isAltKey: boolean): number; + /** + * Returns a specifically generated code that uniquely identifies the pressed key combination, which is specified by the related HTML event. + * @param htmlEvent A DHTML event object that relates to a key combination being pressed. + */ + GetShortcutCodeByEvent(htmlEvent: Object): number; + /** + * Returns a specifically generated code that uniquely identifies the combination of keys specified via the parameter. + * @param shortcutString A string value that specifies the key combination. + */ + StringToShortcutCode(shortcutString: string): number; + /** + * Trims all leading and trailing whitespaces from the string. + * @param str A string value representing the string for trimming. + */ + Trim(str: string): string; + /** + * Trims all leading whitespaces from the string. + * @param str A string value representing the string for trimming. + */ + TrimStart(str: string): string; + /** + * Trims all trailing whitespaces from the string. + * @param str A string value representing the string for trimming. + */ + TrimEnd(str: string): string; + /** + * Specifies the text that Assistive Technologies (screen readers or braille display, for example) will provide to a user. + * @param message A String value that specifies a text. + */ + SendMessageToAssistiveTechnology(message: string): void; +} +interface ASPxClientChartDesignerStatic 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): ASPxClientChartDesigner; +} +interface ASPxClientWebChartControlStatic 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): ASPxClientWebChartControl; +} +interface ASPxClientDocumentViewerStatic 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): ASPxClientDocumentViewer; +} +interface ASPxClientQueryBuilderStatic 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): ASPxClientQueryBuilder; +} +interface ASPxClientReportDesignerStatic 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): ASPxClientReportDesigner; +} +interface ASPxClientReportDocumentMapStatic extends ASPxClientControlStatic { +} +interface ASPxClientReportParametersPanelStatic extends ASPxClientControlStatic { +} +interface ASPxClientReportToolbarStatic 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): ASPxClientReportToolbar; +} +interface ASPxClientReportViewerStatic 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): ASPxClientReportViewer; +} +interface ASPxClientWebDocumentViewerStatic 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): ASPxClientWebDocumentViewer; +} + +declare var MVCxClientDashboardViewer: MVCxClientDashboardViewerStatic; +declare var DashboardDataAxisNames: DashboardDataAxisNamesStatic; +declare var DashboardSpecialValues: DashboardSpecialValuesStatic; +declare var DashboardExportPageLayout: DashboardExportPageLayoutStatic; +declare var DashboardExportPaperKind: DashboardExportPaperKindStatic; +declare var DashboardExportScaleMode: DashboardExportScaleModeStatic; +declare var DashboardExportFilterState: DashboardExportFilterStateStatic; +declare var DashboardStateExportPosition: DashboardStateExportPositionStatic; +declare var DashboardStateExcelExportPosition: DashboardStateExcelExportPositionStatic; +declare var DashboardExportImageFormat: DashboardExportImageFormatStatic; +declare var ExcelExportFilterState: ExcelExportFilterStateStatic; +declare var DashboardExportExcelFormat: DashboardExportExcelFormatStatic; +declare var ChartExportSizeMode: ChartExportSizeModeStatic; +declare var MapExportSizeMode: MapExportSizeModeStatic; +declare var TreemapExportSizeMode: TreemapExportSizeModeStatic; +declare var RangeFilterExportSizeMode: RangeFilterExportSizeModeStatic; +declare var DashboardSelectionMode: DashboardSelectionModeStatic; +declare var ASPxClientDashboard: ASPxClientDashboardStatic; +declare var ASPxClientDashboardViewer: ASPxClientDashboardViewerStatic; +declare var ASPxClientEditBase: ASPxClientEditBaseStatic; +declare var ASPxClientEdit: ASPxClientEditStatic; +declare var ASPxClientBinaryImage: ASPxClientBinaryImageStatic; +declare var ASPxClientButton: ASPxClientButtonStatic; +declare var ASPxClientCalendar: ASPxClientCalendarStatic; +declare var ASPxClientCaptcha: ASPxClientCaptchaStatic; +declare var ASPxClientCheckBox: ASPxClientCheckBoxStatic; +declare var ASPxClientRadioButton: ASPxClientRadioButtonStatic; +declare var ASPxClientTextEdit: ASPxClientTextEditStatic; +declare var ASPxClientTextBoxBase: ASPxClientTextBoxBaseStatic; +declare var ASPxClientButtonEditBase: ASPxClientButtonEditBaseStatic; +declare var ASPxClientDropDownEditBase: ASPxClientDropDownEditBaseStatic; +declare var ASPxClientColorEdit: ASPxClientColorEditStatic; +declare var ASPxClientComboBox: ASPxClientComboBoxStatic; +declare var ASPxClientDateEdit: ASPxClientDateEditStatic; +declare var ASPxClientDropDownEdit: ASPxClientDropDownEditStatic; +declare var ASPxClientFilterControl: ASPxClientFilterControlStatic; +declare var ASPxClientListEdit: ASPxClientListEditStatic; +declare var ASPxClientListBox: ASPxClientListBoxStatic; +declare var ASPxClientCheckListBase: ASPxClientCheckListBaseStatic; +declare var ASPxClientRadioButtonList: ASPxClientRadioButtonListStatic; +declare var ASPxClientCheckBoxList: ASPxClientCheckBoxListStatic; +declare var ASPxClientProgressBar: ASPxClientProgressBarStatic; +declare var ASPxClientSpinEditBase: ASPxClientSpinEditBaseStatic; +declare var ASPxClientSpinEdit: ASPxClientSpinEditStatic; +declare var ASPxClientTimeEdit: ASPxClientTimeEditStatic; +declare var ASPxClientStaticEdit: ASPxClientStaticEditStatic; +declare var ASPxClientHyperLink: ASPxClientHyperLinkStatic; +declare var ASPxClientImageBase: ASPxClientImageBaseStatic; +declare var ASPxClientImage: ASPxClientImageStatic; +declare var ASPxClientLabel: ASPxClientLabelStatic; +declare var ASPxClientTextBox: ASPxClientTextBoxStatic; +declare var ASPxClientMemo: ASPxClientMemoStatic; +declare var ASPxClientButtonEdit: ASPxClientButtonEditStatic; +declare var ASPxClientTokenBox: ASPxClientTokenBoxStatic; +declare var ASPxClientTrackBar: ASPxClientTrackBarStatic; +declare var ASPxClientValidationSummary: ASPxClientValidationSummaryStatic; +declare var ASPxClientGaugeControl: ASPxClientGaugeControlStatic; +declare var ASPxClientGridBase: ASPxClientGridBaseStatic; +declare var ASPxClientGridViewCallbackCommand: ASPxClientGridViewCallbackCommandStatic; +declare var ASPxClientGridLookup: ASPxClientGridLookupStatic; +declare var ASPxClientCardView: ASPxClientCardViewStatic; +declare var ASPxClientGridView: ASPxClientGridViewStatic; +declare var ASPxClientVerticalGrid: ASPxClientVerticalGridStatic; +declare var ASPxClientVerticalGridCallbackCommand: ASPxClientVerticalGridCallbackCommandStatic; +declare var ASPxClientCommandConsts: ASPxClientCommandConstsStatic; +declare var ASPxClientHtmlEditor: ASPxClientHtmlEditorStatic; +declare var ASPxClientHtmlEditorMediaPreloadMode: ASPxClientHtmlEditorMediaPreloadModeStatic; +declare var ASPxClientPivotGrid: ASPxClientPivotGridStatic; +declare var ASPxClientPivotCustomization: ASPxClientPivotCustomizationStatic; +declare var ASPxClientRichEdit: ASPxClientRichEditStatic; +declare var ASPxSchedulerDateTimeHelper: ASPxSchedulerDateTimeHelperStatic; +declare var ASPxClientWeekDaysCheckEdit: ASPxClientWeekDaysCheckEditStatic; +declare var ASPxClientRecurrenceRangeControl: ASPxClientRecurrenceRangeControlStatic; +declare var ASPxClientRecurrenceControlBase: ASPxClientRecurrenceControlBaseStatic; +declare var ASPxClientDailyRecurrenceControl: ASPxClientDailyRecurrenceControlStatic; +declare var ASPxClientWeeklyRecurrenceControl: ASPxClientWeeklyRecurrenceControlStatic; +declare var ASPxClientMonthlyRecurrenceControl: ASPxClientMonthlyRecurrenceControlStatic; +declare var ASPxClientYearlyRecurrenceControl: ASPxClientYearlyRecurrenceControlStatic; +declare var ASPxClientRecurrenceTypeEdit: ASPxClientRecurrenceTypeEditStatic; +declare var ASPxClientTimeInterval: ASPxClientTimeIntervalStatic; +declare var ASPxClientScheduler: ASPxClientSchedulerStatic; +declare var ASPxClientSpellChecker: ASPxClientSpellCheckerStatic; +declare var ASPxClientSpellCheckerStopCheckingReason: ASPxClientSpellCheckerStopCheckingReasonStatic; +declare var ASPxClientSpreadsheet: ASPxClientSpreadsheetStatic; +declare var ASPxClientTreeList: ASPxClientTreeListStatic; +declare var BootstrapClientAccordion: BootstrapClientAccordionStatic; +declare var BootstrapClientBinaryImage: BootstrapClientBinaryImageStatic; +declare var BootstrapClientButton: BootstrapClientButtonStatic; +declare var BootstrapClientCalendar: BootstrapClientCalendarStatic; +declare var BootstrapClientCallbackPanel: BootstrapClientCallbackPanelStatic; +declare var BootstrapClientChartBase: BootstrapClientChartBaseStatic; +declare var BootstrapClientChart: BootstrapClientChartStatic; +declare var BootstrapClientPolarChart: BootstrapClientPolarChartStatic; +declare var BootstrapClientPieChart: BootstrapClientPieChartStatic; +declare var BootstrapClientCheckBox: BootstrapClientCheckBoxStatic; +declare var BootstrapClientRadioButton: BootstrapClientRadioButtonStatic; +declare var BootstrapClientComboBox: BootstrapClientComboBoxStatic; +declare var BootstrapClientDateEdit: BootstrapClientDateEditStatic; +declare var BootstrapClientDropDownEdit: BootstrapClientDropDownEditStatic; +declare var BootstrapClientFormLayout: BootstrapClientFormLayoutStatic; +declare var BootstrapClientHyperLink: BootstrapClientHyperLinkStatic; +declare var BootstrapClientImage: BootstrapClientImageStatic; +declare var BootstrapClientListBox: BootstrapClientListBoxStatic; +declare var BootstrapClientCheckBoxList: BootstrapClientCheckBoxListStatic; +declare var BootstrapClientRadioButtonList: BootstrapClientRadioButtonListStatic; +declare var BootstrapClientMenu: BootstrapClientMenuStatic; +declare var BootstrapClientPager: BootstrapClientPagerStatic; +declare var BootstrapClientPopupControl: BootstrapClientPopupControlStatic; +declare var BootstrapClientPopupMenu: BootstrapClientPopupMenuStatic; +declare var BootstrapClientProgressBar: BootstrapClientProgressBarStatic; +declare var BootstrapClientSpinEdit: BootstrapClientSpinEditStatic; +declare var BootstrapClientTabControl: BootstrapClientTabControlStatic; +declare var BootstrapClientPageControl: BootstrapClientPageControlStatic; +declare var BootstrapClientTextBox: BootstrapClientTextBoxStatic; +declare var BootstrapClientMemo: BootstrapClientMemoStatic; +declare var BootstrapClientButtonEdit: BootstrapClientButtonEditStatic; +declare var BootstrapClientTreeView: BootstrapClientTreeViewStatic; +declare var BootstrapUIWidgetBase: BootstrapUIWidgetBaseStatic; +declare var BootstrapClientUploadControl: BootstrapClientUploadControlStatic; +declare var BootstrapClientGridView: BootstrapClientGridViewStatic; +declare var MVCxClientCalendar: MVCxClientCalendarStatic; +declare var MVCxClientCallbackPanel: MVCxClientCallbackPanelStatic; +declare var MVCxClientCardView: MVCxClientCardViewStatic; +declare var MVCxClientChart: MVCxClientChartStatic; +declare var MVCxClientComboBox: MVCxClientComboBoxStatic; +declare var MVCxClientDataView: MVCxClientDataViewStatic; +declare var MVCxClientDateEdit: MVCxClientDateEditStatic; +declare var MVCxClientDockManager: MVCxClientDockManagerStatic; +declare var MVCxClientDockPanel: MVCxClientDockPanelStatic; +declare var MVCxClientFileManager: MVCxClientFileManagerStatic; +declare var MVCxClientGridView: MVCxClientGridViewStatic; +declare var MVCxClientHtmlEditor: MVCxClientHtmlEditorStatic; +declare var MVCxClientImageGallery: MVCxClientImageGalleryStatic; +declare var MVCxClientListBox: MVCxClientListBoxStatic; +declare var MVCxClientNavBar: MVCxClientNavBarStatic; +declare var MVCxClientPivotGrid: MVCxClientPivotGridStatic; +declare var MVCxClientPopupControl: MVCxClientPopupControlStatic; +declare var MVCxClientDocumentViewer: MVCxClientDocumentViewerStatic; +declare var MVCxClientReportViewer: MVCxClientReportViewerStatic; +declare var MVCxClientReportDesigner: MVCxClientReportDesignerStatic; +declare var MVCxClientRichEdit: MVCxClientRichEditStatic; +declare var MVCxClientRoundPanel: MVCxClientRoundPanelStatic; +declare var MVCxClientScheduler: MVCxClientSchedulerStatic; +declare var MVCxSchedulerToolTipType: MVCxSchedulerToolTipTypeStatic; +declare var MVCxClientSpreadsheet: MVCxClientSpreadsheetStatic; +declare var MVCxClientPageControl: MVCxClientPageControlStatic; +declare var MVCxClientTokenBox: MVCxClientTokenBoxStatic; +declare var MVCxClientTreeList: MVCxClientTreeListStatic; +declare var MVCxClientTreeView: MVCxClientTreeViewStatic; +declare var MVCxClientUploadControl: MVCxClientUploadControlStatic; +declare var MVCxClientUtils: MVCxClientUtilsStatic; +declare var MVCxClientGlobalEvents: MVCxClientGlobalEventsStatic; +declare var MVCxClientVerticalGrid: MVCxClientVerticalGridStatic; +declare var MVCxClientWebDocumentViewer: MVCxClientWebDocumentViewerStatic; +declare var ASPxClientControlBase: ASPxClientControlBaseStatic; +declare var ASPxClientControl: ASPxClientControlStatic; +declare var ASPxClientCallback: ASPxClientCallbackStatic; +declare var ASPxClientPanelBase: ASPxClientPanelBaseStatic; +declare var ASPxClientPanel: ASPxClientPanelStatic; +declare var ASPxClientCallbackPanel: ASPxClientCallbackPanelStatic; +declare var ASPxClientCloudControl: ASPxClientCloudControlStatic; +declare var ASPxClientDataView: ASPxClientDataViewStatic; +declare var ASPxClientDockManager: ASPxClientDockManagerStatic; +declare var ASPxClientPopupControlBase: ASPxClientPopupControlBaseStatic; +declare var ASPxClientDockPanel: ASPxClientDockPanelStatic; +declare var ASPxClientDockZone: ASPxClientDockZoneStatic; +declare var ASPxClientFileManager: ASPxClientFileManagerStatic; +declare var ASPxClientFileManagerCommandConsts: ASPxClientFileManagerCommandConstsStatic; +declare var ASPxClientFileManagerErrorConsts: ASPxClientFileManagerErrorConstsStatic; +declare var ASPxClientFormLayout: ASPxClientFormLayoutStatic; +declare var ASPxClientHiddenField: ASPxClientHiddenFieldStatic; +declare var ASPxClientHint: ASPxClientHintStatic; +declare var ASPxClientImageGallery: ASPxClientImageGalleryStatic; +declare var ASPxClientImageSlider: ASPxClientImageSliderStatic; +declare var ASPxClientImageZoomNavigator: ASPxClientImageZoomNavigatorStatic; +declare var ASPxClientImageZoom: ASPxClientImageZoomStatic; +declare var ASPxClientLoadingPanel: ASPxClientLoadingPanelStatic; +declare var ASPxClientMediaFileSelector: ASPxClientMediaFileSelectorStatic; +declare var ASPxClientMenuBase: ASPxClientMenuBaseStatic; +declare var ASPxClientMenu: ASPxClientMenuStatic; +declare var ASPxClientTouchUI: ASPxClientTouchUIStatic; +declare var ASPxClientNavBar: ASPxClientNavBarStatic; +declare var ASPxClientNewsControl: ASPxClientNewsControlStatic; +declare var ASPxClientObjectContainer: ASPxClientObjectContainerStatic; +declare var ASPxClientPager: ASPxClientPagerStatic; +declare var ASPxClientPopupControl: ASPxClientPopupControlStatic; +declare var ASPxClientPopupControlResizeState: ASPxClientPopupControlResizeStateStatic; +declare var ASPxClientPopupControlCloseReason: ASPxClientPopupControlCloseReasonStatic; +declare var ASPxClientPopupMenu: ASPxClientPopupMenuStatic; +declare var ASPxClientRatingControl: ASPxClientRatingControlStatic; +declare var ASPxClientRibbon: ASPxClientRibbonStatic; +declare var ASPxClientRibbonState: ASPxClientRibbonStateStatic; +declare var ASPxClientRoundPanel: ASPxClientRoundPanelStatic; +declare var ASPxClientSplitter: ASPxClientSplitterStatic; +declare var ASPxClientTabControlBase: ASPxClientTabControlBaseStatic; +declare var ASPxClientTabControl: ASPxClientTabControlStatic; +declare var ASPxClientPageControl: ASPxClientPageControlStatic; +declare var ASPxClientTimer: ASPxClientTimerStatic; +declare var ASPxClientTitleIndex: ASPxClientTitleIndexStatic; +declare var ASPxClientTreeView: ASPxClientTreeViewStatic; +declare var ASPxClientUploadControl: ASPxClientUploadControlStatic; +declare var ASPxClientUploadControlValidationErrorTypeConsts: ASPxClientUploadControlValidationErrorTypeConstsStatic; +declare var ASPxClientUtils: ASPxClientUtilsStatic; +declare var ASPxClientChartDesigner: ASPxClientChartDesignerStatic; +declare var ASPxClientWebChartControl: ASPxClientWebChartControlStatic; +declare var ASPxClientDocumentViewer: ASPxClientDocumentViewerStatic; +declare var ASPxClientQueryBuilder: ASPxClientQueryBuilderStatic; +declare var ASPxClientReportDesigner: ASPxClientReportDesignerStatic; +declare var ASPxClientReportDocumentMap: ASPxClientReportDocumentMapStatic; +declare var ASPxClientReportParametersPanel: ASPxClientReportParametersPanelStatic; +declare var ASPxClientReportToolbar: ASPxClientReportToolbarStatic; +declare var ASPxClientReportViewer: ASPxClientReportViewerStatic; +declare var ASPxClientWebDocumentViewer: ASPxClientWebDocumentViewerStatic; + diff --git a/types/bingmaps/tsconfig.json b/types/devexpress-web/v171/tsconfig.json similarity index 50% rename from types/bingmaps/tsconfig.json rename to types/devexpress-web/v171/tsconfig.json index 421876221b..af3cbffe0a 100644 --- a/types/bingmaps/tsconfig.json +++ b/types/devexpress-web/v171/tsconfig.json @@ -9,29 +9,24 @@ "noImplicitThis": true, "strictNullChecks": false, "strictFunctionTypes": true, - "baseUrl": "../", + "baseUrl": "../../", "typeRoots": [ - "../" + "../../" ], "types": [], + "paths": { + "devexpress-web": [ + "devexpress-web/v171" + ], + "devexpress-web/*": [ + "devexpress-web/v171/*" + ] + }, "noEmit": true, "forceConsistentCasingInFileNames": true }, "files": [ "index.d.ts", - "Autosuggest.d.ts", - "Clustering.d.ts", - "Contour.d.ts", - "DataBinning.d.ts", - "Directions.d.ts", - "DrawingTools.d.ts", - "GeoJson.d.ts", - "HeatMapLayer.d.ts", - "Search.d.ts", - "SpatialDataService.d.ts", - "SpatialMath.d.ts", - "Traffic.d.ts", - "WellKnownText.d.ts", - "bingmaps-tests.ts" + "devexpress-web-tests.ts" ] } \ No newline at end of file diff --git a/types/bingmaps/tslint.json b/types/devexpress-web/v171/tslint.json similarity index 100% rename from types/bingmaps/tslint.json rename to types/devexpress-web/v171/tslint.json diff --git a/types/diff/diff-tests.ts b/types/diff/diff-tests.ts index e787c44f48..0dea2a305e 100644 --- a/types/diff/diff-tests.ts +++ b/types/diff/diff-tests.ts @@ -3,11 +3,17 @@ const one = 'beep boop'; const other = 'beep boob blah'; let diff = jsdiff.diffChars(one, other); +printDiff(diff); -diff.forEach(part => { - const mark = part.added ? '+' : - part.removed ? '-' : ' '; - console.log(`${mark} ${part.value}`); +const diffArraysResult = jsdiff.diffArrays(['a', 'b', 'c'], ['a', 'c', 'd']); +diffArraysResult.forEach(result => { + if (result.added) { + console.log(`added ${result.value.length} line(s):`, ...result.value); + } else if (result.removed) { + console.log(`removed ${result.value.length} line(s):`, ...result.value); + } else { + console.log(`no changes`); + } }); // -------------------------- @@ -22,13 +28,13 @@ class LineDiffWithoutWhitespace extends jsdiff.Diff { } } -const obj = new LineDiffWithoutWhitespace(true); +const obj = new LineDiffWithoutWhitespace(); diff = obj.diff(one, other); printDiff(diff); function printDiff(diff: jsdiff.IDiffResult[]) { - function addLineHeader(decorator: string, str: string) { - return str.split("\n").map((line, index, array) => { + function addLineHeader(decorator: string, str: string | string[]) { + return (typeof str === 'string' ? str.split("\n") : str).map((line, index, array) => { if (index === array.length - 1 && line === "") { return line; } else { @@ -52,7 +58,8 @@ function verifyPatchMethods(oldStr: string, newStr: string, uniDiff: jsdiff.IUni const verifyPatch = jsdiff.parsePatch( jsdiff.createTwoFilesPatch("oldFile.ts", "newFile.ts", oldStr, newStr, "old", "new", { context: 1 })); - if (JSON.stringify(verifyPatch) !== JSON.stringify(uniDiff)) { + + if (JSON.stringify(verifyPatch[0], Object.keys(verifyPatch[0]).sort()) !== JSON.stringify(uniDiff, Object.keys(uniDiff).sort())) { console.error("Patch did not match uniDiff"); } } @@ -82,7 +89,11 @@ function verifyApplyMethods(oldStr: string, newStr: string, uniDiff: jsdiff.IUni }); } -const uniDiff = jsdiff.structuredPatch("oldFile.ts", "newFile.ts", one, other, +const uniDiffPatch = jsdiff.structuredPatch("oldFile.ts", "newFile.ts", one, other, "old", "new", { context: 1 }); -verifyPatchMethods(one, other, uniDiff); -verifyApplyMethods(one, other, uniDiff); +verifyPatchMethods(one, other, uniDiffPatch); + +const uniDiffStr = jsdiff.createPatch("file.ts", one, other, "old", "new", + { context: 1 }); +const uniDiffApply = jsdiff.parsePatch(uniDiffStr)[0]; +verifyApplyMethods(one, other, uniDiffApply); diff --git a/types/diff/index.d.ts b/types/diff/index.d.ts index 720a8d3270..33d337d1b7 100644 --- a/types/diff/index.d.ts +++ b/types/diff/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for diff 3.2 +// Type definitions for diff 3.5 // Project: https://github.com/kpdecker/jsdiff // Definitions by: vvakame +// szdc // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -8,15 +9,19 @@ export = JsDiff; export as namespace JsDiff; declare namespace JsDiff { - interface ICaseOptions { + interface IOptions { ignoreCase: boolean; } - interface ILinesOptions { + interface ILinesOptions extends IOptions { ignoreWhitespace?: boolean; newlineIsToken?: boolean; } + interface IArrayOptions extends IOptions { + comparator?: (left: any, right: any) => number; + } + interface IDiffResult { value: string; count?: number; @@ -24,6 +29,13 @@ declare namespace JsDiff { removed?: boolean; } + interface IDiffArraysResult { + value: T[]; + count?: number; + added?: boolean; + removed?: boolean; + } + interface IBestPath { newPos: number; componenets: IDiffResult[]; @@ -42,38 +54,45 @@ declare namespace JsDiff { newFileName: string; oldHeader: string; newHeader: string; + index: string; hunks: IHunk[]; } class Diff { - ignoreWhitespace: boolean; + diff(oldString: string, newString: string, options?: IOptions): IDiffResult[]; - constructor(ignoreWhitespace?: boolean); - - diff(oldString: string, newString: string): IDiffResult[]; - - pushComponent(components: IDiffResult[], value: string, added: boolean, removed: boolean): void; + pushComponent(components: IDiffResult[], added: boolean, removed: boolean): void; extractCommon(basePath: IBestPath, newString: string, oldString: string, diagonalPath: number): number; equals(left: string, right: string): boolean; - join(left: string, right: string): string; + removeEmpty(array: any[]): any[]; + + castInput(value: any): any; + + join(chars: string[]): string; tokenize(value: string): any; // return types are string or string[] } - function diffChars(oldStr: string, newStr: string, options?: ICaseOptions): IDiffResult[]; + function diffChars(oldStr: string, newStr: string, options?: IOptions): IDiffResult[]; - function diffWords(oldStr: string, newStr: string, options?: ICaseOptions): IDiffResult[]; + function diffWords(oldStr: string, newStr: string, options?: IOptions): IDiffResult[]; - function diffWordsWithSpace(oldStr: string, newStr: string): IDiffResult[]; + function diffWordsWithSpace(oldStr: string, newStr: string, options?: IOptions): IDiffResult[]; - function diffJson(oldObj: object, newObj: object): IDiffResult[]; + function diffJson(oldObj: object, newObj: object, options?: IOptions): IDiffResult[]; function diffLines(oldStr: string, newStr: string, options?: ILinesOptions): IDiffResult[]; - function diffCss(oldStr: string, newStr: string): IDiffResult[]; + function diffCss(oldStr: string, newStr: string, options?: IOptions): IDiffResult[]; + + function diffTrimmedLines(oldStr: string, newStr: string, options?: ILinesOptions): IDiffResult[]; + + function diffSentences(oldStr: string, newStr: string, options?: IOptions): IDiffResult[]; + + function diffArrays(oldArr: T[], newArr: T[], options?: IArrayOptions): Array>; function createPatch(fileName: string, oldStr: string, newStr: string, oldHeader: string, newHeader: string, options?: {context: number}): string; @@ -94,4 +113,8 @@ declare namespace JsDiff { function convertChangesToXML(changes: IDiffResult[]): string; function convertChangesToDMP(changes: IDiffResult[]): Array<{0: number; 1: string; }>; + + function merge(mine: string, theirs: string, base: string): IUniDiff; + + function canonicalize(obj: any, stack: any[], replacementStack: any[]): any; } diff --git a/types/dispatchr/addons/BaseStore.d.ts b/types/dispatchr/addons/BaseStore.d.ts new file mode 100644 index 0000000000..6507a7fcf4 --- /dev/null +++ b/types/dispatchr/addons/BaseStore.d.ts @@ -0,0 +1,16 @@ +/// + +import { Dispatcher, DispatcherInterface, DispatcherContext, Store } from '../index'; +import { EventEmitter } from 'events'; + +declare class BaseStore extends EventEmitter implements Store { + constructor(dispatcher: DispatcherInterface); + initialize?(): void; + getContext(): DispatcherContext; + addChangeListener(callback: () => void): void; + removeChangeListener(callback: () => void): void; + shouldDehydrate(): boolean; + emitChange(): void; +} + +export = BaseStore; diff --git a/types/dispatchr/addons/createStore.d.ts b/types/dispatchr/addons/createStore.d.ts new file mode 100644 index 0000000000..86a1f24fbb --- /dev/null +++ b/types/dispatchr/addons/createStore.d.ts @@ -0,0 +1,20 @@ +import { StoreClass, Store } from '../index'; + +type Diff = ({ [P in T]: P } & { [P in U]: never } & { [x: string]: never })[T]; +type Omit = Pick>; + +interface StoreOptions { + storeName: string; + handlers: { [event: string]: string }; + statics?: { [prop: string]: any }; + mixins?: object[]; + initialize?(): void; + dehydrate?(): any; + rehydrate?(state: any): void; +} + +// see: https://github.com/yahoo/fluxible/blob/dispatchr-v1.2.0/packages/dispatchr/addons/createStore.js#L9 +type StoreThis = Omit & Store; + +declare function createStore(options: T & ThisType>): StoreClass; +export = createStore; diff --git a/types/dispatchr/dispatchr-tests.ts b/types/dispatchr/dispatchr-tests.ts new file mode 100644 index 0000000000..fcf0490f44 --- /dev/null +++ b/types/dispatchr/dispatchr-tests.ts @@ -0,0 +1,46 @@ +import { createDispatcher, Store } from 'dispatchr'; +import createStore = require('dispatchr/addons/createStore'); +import BaseStore = require('dispatchr/addons/BaseStore'); + +const TestStore = createStore({ + storeName: 'TestStore', + + handlers: { + ACTION_NAME: 'actionHandler' + }, + + statics: { + staticMethod() {} + }, + + initialize() { }, + + actionHandler() { + this.emitChange(); + this.additionalMethod(); + }, + + additionalMethod() {} +}); + +class ExtendedStore extends BaseStore { + static handlers = { + ACTION_NAME: 'actionHandler' + }; + + actionHandler() { + this.emitChange(); + } +} + +const dispatcher = createDispatcher({ + errorHandler(e, context) { + e.meta; + e.type; + e.message; + }, + stores: [TestStore] +}); + +const context = dispatcher.createContext({}); +context.dispatch('ACTION_NAME', {}); diff --git a/types/dispatchr/index.d.ts b/types/dispatchr/index.d.ts new file mode 100644 index 0000000000..b5cf63009d --- /dev/null +++ b/types/dispatchr/index.d.ts @@ -0,0 +1,66 @@ +// Type definitions for dispatchr 1.2 +// Project: https://github.com/yahoo/fluxible#readme +// Definitions by: Ragg +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.5 +/// +import { EventEmitter } from 'events'; + +export interface DispatcherState { + stores: { [storeName: string]: any }; +} + +export interface DispatcherOption { + stores?: StoreClass[]; + errorHandler?: (e: DispatcherError, context: DispatcherContext) => void; +} + +export interface StoreClass { + storeName: string; + new(): Store; +} + +export interface Store extends EventEmitter { + dehydrate?(): S; + rehydrate?(state: S): void; + shouldDehydrate?(): boolean; + emitChange(): void; +} + +export interface Dispatcher { + createContext(context: object): DispatcherContext; + registerStore(store: StoreClass): void; + isRegistered(store: StoreClass | string): boolean; + getStoreName(store: StoreClass | string): string; +} + +export interface DispatcherInterface { + getContext(): DispatcherContext; + getStore: DispatcherContext['getStore']; + waitFor: DispatcherContext['waitFor']; +} + +export interface DispatcherContext { + getStore(name: string): Store; + getStore(name: T): T; + + dispatch(actionName: string, payload: any): void; + + dehydrate(): DispatcherState; + rehydrate(dispatcherState: DispatcherState): void; + + waitFor(stores: ReadonlyArray, callback: () => void): void; + dispatcherInterface: DispatcherInterface; +} + +export interface DispatcherError { + message: string; + type: string; + meta: { + actionName?: string, + payload?: any, + error: Error + }; +} + +export function createDispatcher(options: DispatcherOption): Dispatcher; diff --git a/types/dispatchr/tsconfig.json b/types/dispatchr/tsconfig.json new file mode 100644 index 0000000000..e94ec73c3c --- /dev/null +++ b/types/dispatchr/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "esModuleInterop": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "addons/createStore.d.ts", + "addons/BaseStore.d.ts", + "dispatchr-tests.ts" + ] +} diff --git a/types/dispatchr/tslint.json b/types/dispatchr/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/dispatchr/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/dnssd/dnssd-tests.ts b/types/dnssd/dnssd-tests.ts new file mode 100644 index 0000000000..14b637d384 --- /dev/null +++ b/types/dnssd/dnssd-tests.ts @@ -0,0 +1,6 @@ +import * as dnssd from 'dnssd'; + +const serviceType = new dnssd.ServiceType(dnssd.tcp('_mqtt'), dnssd.udp('_mqtt')); + +const advertisement = new dnssd.Advertisement(serviceType, 1883, { name: 'broker' }); +const browser: dnssd.Browser = new dnssd.Browser(serviceType); diff --git a/types/dnssd/index.d.ts b/types/dnssd/index.d.ts new file mode 100644 index 0000000000..9c66a6d6a4 --- /dev/null +++ b/types/dnssd/index.d.ts @@ -0,0 +1,79 @@ +// Type definitions for dnssd 0.3 +// Project: https://github.com/DeMille/dnssd.js#readme +// Definitions by: Angel Merino +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +import { EventEmitter } from 'events'; + +/** Declaration file generated by dts-gen */ + +export class Advertisement { + constructor(type: any, port: any, ...args: any[]); + + start(): any; + + stop(forceImmediate: any, callback: any): void; + + updateTXT(txtObj: any): void; +} + +/** + * A service entry as returned by serviceUp + */ +export class Service { + fullname: string; // 'InstanceName._googlecast._tcp.local.' + name: string; // 'InstanceName' + type: SType; // { name: 'googlecast'; protocol: 'tcp' } + domain: string; // 'local' + host: string; // 'Hostname.local.' + port: number; // 8009 + addresses: string[]; // ['192.168.1.15'] + txt: any; // { id: 'strings' } + txtRaw: any; +} + +export class SType { + name: string; + protocol: string; +} + +export class Browser extends EventEmitter { + constructor(type: any, ...args: any[]); + + list(): any; + + start(): any; + + stop(): any; +} + +export class ServiceType { + constructor(...args: any[]); + + toString(): any; + + static all(): any; + + static tcp(...args: any[]): any; + + static udp(...args: any[]): any; +} + +export const resolveA: any; + +export const resolveAAAA: any; + +export function all(): any; + +export function resolve(name: any, type: any, ...args: any[]): any; + +export function resolveSRV(name: any, opts: any): any; + +export function resolveService(name: any, ...args: any[]): any; + +export function resolveTXT(name: any, opts: any): any; + +export function tcp(...args: any[]): any; + +export function udp(...args: any[]): any; diff --git a/types/dnssd/tsconfig.json b/types/dnssd/tsconfig.json new file mode 100644 index 0000000000..88346a63fd --- /dev/null +++ b/types/dnssd/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "dnssd-tests.ts" + ] +} diff --git a/types/dnssd/tslint.json b/types/dnssd/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/dnssd/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/document-promises/document-promises-tests.ts b/types/document-promises/document-promises-tests.ts new file mode 100644 index 0000000000..5e45dffd5f --- /dev/null +++ b/types/document-promises/document-promises-tests.ts @@ -0,0 +1,16 @@ +import { parsed, contentLoaded, loaded } from 'document-promises'; + +let promise: Promise; +promise = parsed; +promise = contentLoaded; +promise = loaded; + +parsed.then(() => { + // Document parsed +}); +contentLoaded.then(() => { + // Document is ready +}); +loaded.then(() => { + // Document loaded +}); diff --git a/types/document-promises/index.d.ts b/types/document-promises/index.d.ts new file mode 100644 index 0000000000..2202c0d7ab --- /dev/null +++ b/types/document-promises/index.d.ts @@ -0,0 +1,23 @@ +// Type definitions for document-promises 3.1 +// Project: https://github.com/jonathantneal/document-promises#readme +// Definitions by: Tiger Oakes +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * document.parsed is a promise that fulfills when the document is parsed + * and `readyState` is `interactive`, before deferred and async scripts have run. + */ +export const parsed: Promise; + +/** + * document.contentLoaded is a promise that fulfills when the document is + * parsed, blocking scripts have completed, and `DOMContentLoaded` fires. + */ +export const contentLoaded: Promise; + +/** + * document.loaded is a promise that fulfills when the document is parsed, + * blocking scripts have completed, images, scripts, links and sub-frames + * have finished loading, and `readyState` is `complete`. + */ +export const loaded: Promise; diff --git a/types/document-promises/tsconfig.json b/types/document-promises/tsconfig.json new file mode 100644 index 0000000000..6b1ddaaa6b --- /dev/null +++ b/types/document-promises/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "document-promises-tests.ts" + ] +} diff --git a/types/document-promises/tslint.json b/types/document-promises/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/document-promises/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/dotenv-safe/dotenv-safe-tests.ts b/types/dotenv-safe/dotenv-safe-tests.ts index eca6c0937a..a204a4fc6c 100644 --- a/types/dotenv-safe/dotenv-safe-tests.ts +++ b/types/dotenv-safe/dotenv-safe-tests.ts @@ -5,3 +5,9 @@ env.load({ path: "/foo/bar/baz.env", sample: "/foo/bar/qux.env" }) + +env.config({ + allowEmptyValues: true, + path: "/foo/bar/baz.env", + sample: "/foo/bar/qux.env" +}) diff --git a/types/dotenv-safe/index.d.ts b/types/dotenv-safe/index.d.ts index 2c696ae1b5..114edce926 100644 --- a/types/dotenv-safe/index.d.ts +++ b/types/dotenv-safe/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for dotenv-safe 4.0 +// Type definitions for dotenv-safe 5.0 // Project: https://github.com/rolodato/dotenv-safe // Definitions by: Stan Goldmann // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -18,12 +18,11 @@ export interface MissingEnvVarsError extends Error { missing: string[] } -/** - * Loads environment variables file into 'process.env'. - * - * @throws MissingEnvVarsError - */ -export function load(options?: { +export interface DotenvSafeOptions { + /** + * You can specify a custom path if your file containing environment variables is named or located differently. + * @default '.env' + */ path?: string, /** * Path to example environment file. @@ -45,4 +44,18 @@ export function load(options?: { * @default false */ allowEmptyValues?: boolean, -}): env.DotenvResult +} + +/** + * Loads environment variables file into 'process.env'. + * + * @throws MissingEnvVarsError + */ +export function load(options?: DotenvSafeOptions): env.DotenvResult + +/** + * Loads environment variables file into 'process.env'. + * + * @throws MissingEnvVarsError + */ +export function config(options?: DotenvSafeOptions): env.DotenvResult diff --git a/types/dotenv-webpack/dotenv-webpack-tests.ts b/types/dotenv-webpack/dotenv-webpack-tests.ts new file mode 100644 index 0000000000..6605550529 --- /dev/null +++ b/types/dotenv-webpack/dotenv-webpack-tests.ts @@ -0,0 +1,21 @@ +import * as webpack from 'webpack'; +import DotenvWebpackPlugin = require('dotenv-webpack'); + +new DotenvWebpackPlugin(); // $ExpectType DotenvWebpackPlugin + +const options: DotenvWebpackPlugin.Options = { + path: './some.other.env', + safe: true, + systemvars: true, + silent: true +}; + +const config: webpack.Configuration = { + plugins: [ + new DotenvWebpackPlugin(), + new DotenvWebpackPlugin({ + path: './some.other.env', + }), + new DotenvWebpackPlugin(options), + ] +}; diff --git a/types/dotenv-webpack/index.d.ts b/types/dotenv-webpack/index.d.ts new file mode 100644 index 0000000000..2d330ace45 --- /dev/null +++ b/types/dotenv-webpack/index.d.ts @@ -0,0 +1,37 @@ +// Type definitions for dotenv-webpack 1.5 +// Project: https://github.com/mrsteele/dotenv-webpack +// Definitions by: Karol Majewski +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.7 + +import * as webpack from 'webpack'; + +declare class DotenvWebpackPlugin extends webpack.Plugin { + constructor(options?: DotenvWebpackPlugin.Options); +} + +declare namespace DotenvWebpackPlugin { + interface Options { + /** + * The path to your environment variables. Default: `'./.env'`. + */ + path?: string; + + /** + * If `false` ignore safe-mode, if `true` load `'./.env.example'`, if a `string` load that file as the sample. Default: `false`. + */ + safe?: boolean; + + /** + * Set to `true` if you would rather load all system variables as well (useful for CI purposes). Default: `false`. + */ + systemvars?: boolean; + + /** + * If `true`, all warnings will be surpressed. Default: `false`. + */ + silent?: boolean; + } +} + +export = DotenvWebpackPlugin; diff --git a/types/dotenv-webpack/tsconfig.json b/types/dotenv-webpack/tsconfig.json new file mode 100644 index 0000000000..f87dcd737b --- /dev/null +++ b/types/dotenv-webpack/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "dotenv-webpack-tests.ts" + ] +} diff --git a/types/dotenv-webpack/tslint.json b/types/dotenv-webpack/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/dotenv-webpack/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/dotenv/dotenv-tests.ts b/types/dotenv/dotenv-tests.ts index df05475c17..613da3b056 100644 --- a/types/dotenv/dotenv-tests.ts +++ b/types/dotenv/dotenv-tests.ts @@ -11,6 +11,8 @@ dotenv.config({ encoding: 'utf8' }); +dotenv.load(); + const parsed = dotenv.parse("ENVIRONMENT=production\nDEBUG=no\n"); const debug: string = parsed['DEBUG']; diff --git a/types/dotenv/index.d.ts b/types/dotenv/index.d.ts index 831790138c..4dd67b15c0 100644 --- a/types/dotenv/index.d.ts +++ b/types/dotenv/index.d.ts @@ -20,6 +20,7 @@ export function parse(src: string | Buffer): {[name: string]: string}; * Example: 'KEY=value' becomes { parsed: { KEY: 'value' } } */ export function config(options?: DotenvOptions): DotenvResult; +export const load: typeof config; export interface DotenvOptions { /** diff --git a/types/download/index.d.ts b/types/download/index.d.ts index cffc282832..5d19321fb0 100644 --- a/types/download/index.d.ts +++ b/types/download/index.d.ts @@ -2,41 +2,31 @@ // Project: https://github.com/kevva/download // Definitions by: Nico Jansen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 /// +import { DecompressOptions } from 'decompress'; +import { GotBodyOptions, TimeoutOptions } from 'got'; -interface TimeoutOptions { - connect?: number; - socket?: number; - request?: number; -} -type RetryFunction = (retry: number, error: any) => number; +declare namespace download { + type RetryFunction = (retry: number, error: any) => number; -interface DownloadOptions { - body?: string | Buffer | NodeJS.ReadableStream; - encoding?: string | null; - query?: string | object; - timeout?: number | TimeoutOptions; - retries?: number | RetryFunction; - followRedirect?: boolean; - decompress?: boolean; - useElectronNet?: boolean; - /** - * If set to true, try extracting the file using decompress. - */ - extract?: boolean; - /** - * Name of the saved file. - */ - filename?: string; - /** - * Proxy endpoint - */ - proxy?: string; + interface DownloadOptions extends DecompressOptions, GotBodyOptions { + /** + * If set to true, try extracting the file using decompress. + */ + extract?: boolean; + /** + * Name of the saved file. + */ + filename?: string; + /** + * Proxy endpoint + */ + proxy?: string; + } } -declare namespace download {} -declare function download(url: string, destination?: string, options?: DownloadOptions): Promise & NodeJS.WritableStream & NodeJS.ReadableStream; +declare function download(url: string, destination?: string, options?: download.DownloadOptions): Promise & NodeJS.WritableStream & NodeJS.ReadableStream; export = download; diff --git a/types/draft-js/draft-js-tests.tsx b/types/draft-js/draft-js-tests.tsx index 63821eda98..857671d13d 100644 --- a/types/draft-js/draft-js-tests.tsx +++ b/types/draft-js/draft-js-tests.tsx @@ -22,7 +22,8 @@ import { DraftEntityMutability, DraftEntityType, convertFromHTML, - convertToRaw + convertToRaw, + CompositeDecorator, } from 'draft-js'; const SPLIT_HEADER_BLOCK = 'split-header-block'; @@ -38,6 +39,14 @@ export const KEYCODES: Record = { type SyntheticKeyboardEvent = React.KeyboardEvent<{}>; +const HANDLE_REGEX = /\@[\w]+/g; + +class HandleSpan extends React.Component { + render() { + return {this.props.children} + } +} + class RichEditorExample extends React.Component<{}, { editorState: EditorState }> { constructor() { super({}); @@ -51,8 +60,22 @@ class RichEditorExample extends React.Component<{}, { editorState: EditorState } blocksFromHTML.contentBlocks, blocksFromHTML.entityMap, ); - - this.state = { editorState: EditorState.createWithContent(state) }; + const decorator = new CompositeDecorator([{ + strategy: ( + block: ContentBlock, + callback: (start: number, end: number) => void, + contentState: ContentState + ) => { + const text = block.getText(); + let matchArr, start; + while ((matchArr = HANDLE_REGEX.exec(text)) !== null) { + start = matchArr.index; + callback(start, start + matchArr[0].length); + } + }, + component: HandleSpan, + }]); + this.state = { editorState: EditorState.createWithContent(state, decorator) }; } onChange: (editorState: EditorState) => void = (editorState: EditorState) => this.setState({ editorState }); diff --git a/types/draft-js/index.d.ts b/types/draft-js/index.d.ts index e545fa347d..e83de2b303 100644 --- a/types/draft-js/index.d.ts +++ b/types/draft-js/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Draft.js v0.10.4 +// Type definitions for Draft.js v0.10.5 // Project: https://facebook.github.io/draft-js/ // Definitions by: Dmitry Rogozhny // Eelco Lempsink @@ -7,6 +7,7 @@ // Michael Wu // Willis Plummer // Santiago Vilar +// Ulf Schwekendiek // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 @@ -398,7 +399,7 @@ declare namespace Draft { /** * Given a `ContentBlock`, return an immutable List of decorator keys. */ - getDecorations(block: ContentBlock): Immutable.List; + getDecorations(block: ContentBlock, contentState: ContentState): Immutable.List; /** * Given a decorator key, return the component to use when rendering @@ -456,7 +457,7 @@ declare namespace Draft { class CompositeDraftDecorator { constructor(decorators: Array); - getDecorations(block: ContentBlock): Immutable.List; + getDecorations(block: ContentBlock, contentState: ContentState): Immutable.List; getComponentForKey(key: string): Function; getPropsForKey(key: string): Object; } @@ -957,6 +958,7 @@ import ContentBlock = Draft.Model.ImmutableData.ContentBlock; import ContentState = Draft.Model.ImmutableData.ContentState; import SelectionState = Draft.Model.ImmutableData.SelectionState; import DraftInlineStyle = Draft.Model.ImmutableData.DraftInlineStyle; +import BlockMap = Draft.Model.ImmutableData.BlockMap; import AtomicBlockUtils = Draft.Model.Modifier.AtomicBlockUtils; import KeyBindingUtil = Draft.Component.Utils.KeyBindingUtil; @@ -1005,6 +1007,7 @@ export { ContentState, SelectionState, DraftInlineStyle, + BlockMap, AtomicBlockUtils, KeyBindingUtil, diff --git a/types/dragula/index.d.ts b/types/dragula/index.d.ts index f91e8b70ac..51998fb583 100644 --- a/types/dragula/index.d.ts +++ b/types/dragula/index.d.ts @@ -13,7 +13,7 @@ declare namespace dragula { interface DragulaOptions { containers?: Element[]; isContainer?: (el?: Element) => boolean; - moves?: (el?: Element, container?: Element, handle?: Element) => boolean; + moves?: (el?: Element, container?: Element, handle?: Element, sibling?: Element) => boolean; accepts?: (el?: Element, target?: Element, source?: Element, sibling?: Element) => boolean; invalid?: (el?: Element, target?: Element) => boolean; direction?: string; diff --git a/types/duplicate-package-checker-webpack-plugin/index.d.ts b/types/duplicate-package-checker-webpack-plugin/index.d.ts index fd2906aa46..1eff56e9d5 100644 --- a/types/duplicate-package-checker-webpack-plugin/index.d.ts +++ b/types/duplicate-package-checker-webpack-plugin/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/darrenscerri/duplicate-package-checker-webpack-plugin#readme // Definitions by: Matt Traynham // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import { Plugin } from 'webpack'; diff --git a/types/dwt/addon.pdf.d.ts b/types/dwt/addon.pdf.d.ts new file mode 100644 index 0000000000..2e7b1d5a84 --- /dev/null +++ b/types/dwt/addon.pdf.d.ts @@ -0,0 +1,79 @@ +/*! +* Dynamsoft WebTwain PDF Addon +* Based on Dynamsoft WebTwain JavaScript Intellisense +* Product: Dynamsoft Web Twain +* Web Site: http://www.dynamsoft.com +* +* Copyright 2018, Dynamsoft Corporation +* Author: Dynamsoft Support Team +* Version: 13.4 +*/ + +declare enum EnumDWT_ConvertMode { + CM_DEFAULT = 0, + CM_RENDERALL = 1 +} + +declare enum EnumDWT_ConverMode { + CM_DEFAULT = 0, + CM_RENDERALL = 1 +} + +/** + * @class + */ +interface PDF { + /** + * Download and install pdf rasterizer add-on on the local system. + * @method Dynamsoft.WebTwain#Download + * @param {string} remoteFile specifies the value of which frame to get. + * @param {function} optionalAsyncSuccessFunc optional. + * The function to call when the download succeeds. Please refer to the function prototype OnSuccess. + * @param {function} optionalAsyncFailureFunc optional. + * The function to call when the download fails. Please refer to the function prototype OnFailure. + * @return {boolean} + */ + Download(remoteFile: string, + optionalAsyncSuccessFunc?: () => void, + optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; + + /** + * Input the password to decrypt PDF files using PDF Rasterizer add-on. + * @method Dynamsoft.WebTwain#SetPassword + * @param {string} password Specifies the PDF password. + * @return {boolean} + */ + SetPassword(password: string): boolean; + + /** + * Set the image convert mode for PDF Rasterizer in Dynamic Web TWAIN. + * @method Dynamsoft.WebTwain#SetConvertMode + * @param {EnumDWT_ConvertMode | EnumDWT_ConverMode} convertMode Specifies the image convert mode. + * @return {boolean} + */ + SetConvertMode(convertMode: EnumDWT_ConvertMode | EnumDWT_ConverMode): boolean; + + /** + * Set the output resolution for the PDF Rasterizer in Dynamic Web TWAIN. + * @method Dynamsoft.WebTwain#ReadRect + * @param {float} fResolution Specifies the resolution for convert image from PDF file. + * @return {boolean} + */ + SetResolution(fResolution: number): boolean; + + /** + * Judges whether the local PDF is text-based or not. + * @method Dynamsoft.WebTwain#ReadRect + * @param {string} localFile specifies the local path of the target PDF. + * @return {boolean} + */ + IsTextBasedPDF(localFile: string): boolean; +} + +interface WebTwainAddon { + PDF: PDF; +} + +interface WebTwain { + Addon: WebTwainAddon; +} diff --git a/types/dwt/dwt-tests.ts b/types/dwt/dwt-tests.ts index b1a5cc6b09..1be94acca1 100644 --- a/types/dwt/dwt-tests.ts +++ b/types/dwt/dwt-tests.ts @@ -99,3 +99,13 @@ function downloadImage() { DWObject.HTTPDownload("www.dynamsoft.com", "img.png", () => {}, (errorCode: number, errorString: string) => {}); } } + +function loadPDF() { + const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer'); + if (DWObject) { + DWObject.Addon.PDF.SetResolution(200); + DWObject.Addon.PDF.SetConvertMode(1); + DWObject.IfShowFileDialog = true; + DWObject.LoadImageEx(" ", 5); + } +} diff --git a/types/dwt/index.d.ts b/types/dwt/index.d.ts index b19980603e..0656236f08 100644 --- a/types/dwt/index.d.ts +++ b/types/dwt/index.d.ts @@ -1,126 +1,122 @@ -// Type definitions for dwt 13.3 +// Type definitions for dwt 13.4 // Project: http://www.dynamsoft.com/Products/WebTWAIN_Overview.aspx // Definitions by: Xiao Ling // Josh Hall +// Lincoln Hu +// Tom Kent // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 /*! -* Dynamsoft WebTwain JavaScript Intellisense +* Based on Dynamsoft WebTwain JavaScript Intellisense * Product: Dynamsoft Web Twain * Web Site: http://www.dynamsoft.com * -* Copyright 2017, Dynamsoft Corporation +* Copyright 2018, Dynamsoft Corporation * Author: Dynamsoft Support Team -* Version: 13.3 +* Version: 13.4 */ -/** - * Dynamsoft WebTwain Addon PDF - */ -declare enum EnumDWT_ConverMode { - CM_DEFAULT = 0, - TWPT_CM_RENDERALLGRAY = 1 -} - -/** - * @class - */ -interface PDF { - /** - * Download and install pdf rasterizer add-on on the local system. - * @method Dynamsoft.WebTwain#Download - * @param {string} remoteFile specifies the value of which frame to get. - * @param {function} optionalAsyncSuccessFunc optional. The function to call when the download succeeds. Please refer to the function prototype OnSuccess. - * @param {function} optionalAsyncFailureFunc optional. The function to call when the download fails. Please refer to the function prototype OnFailure. - * @return {bool} - */ - Download(remoteFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; - - /** - * Input the password to decrypt PDF files using PDF Rasterizer add-on. - * @method Dynamsoft.WebTwain#SetPassword - * @param {string} password Specifies the PDF password. - * @return {bool} - */ - SetPassword(password: string): boolean; - - /** - * Set the image convert mode for PDF Rasterizer in Dynamic Web TWAIN. - * @method Dynamsoft.WebTwain#SetConvertMode - * @param {EnumDWT_ConverMode} convertMode Specifies the image convert mode. - * @return {bool} - */ - SetConvertMode(convertMode: EnumDWT_ConverMode): boolean; - - /** - * Set the output resolution for the PDF Rasterizer in Dynamic Web TWAIN. - * @method Dynamsoft.WebTwain#ReadRect - * @param {float} fResolution Specifies the resolution for convert image from PDF file. - * @return {bool} - */ - SetResolution(fResolution: number): boolean; - - /** - * Judges whether the local PDF is text-based or not. - * @method Dynamsoft.WebTwain#ReadRect - * @param {string} localFile specifies the local path of the target PDF. - * @return {bool} - */ - IsTextBasedPDF(localFile: string): boolean; -} - -///////////////////////////////////////////////////////////////////////////////////////////////////// - /** * @namespace Dynamsoft */ declare namespace Dynamsoft { + namespace Lib { + /*ignored + Addon_Events Addon_Sendback_Events AttachAndShowImage BIO DOM DynamicLoadAddonFuns DynamicWebTwain EnumMouseButton + Errors Events IntToColorStr LS OnGetImageByURL OnGetImageFromServer Path ProgressBar UI Uri + addEventListener ajax all appendMessage appendRichMessage aryControlLoadImage attachAddon attachProperty + base64 bio cancelFrome clearMessage closeAll closeProgress colorStrToInt config css currentStyle + debug*/ + + let detect: { + /*ignored + OnCreatWS OnDetectNext OnWebTwainPostExecute OnWebTwainPreExecute StartWSByIPTimeoutId StartWSTimeoutId + aryReconnectSTwains arySTwains arySTwainsByIP bFirst bNeedUpgradeEvent bNoControlEvent bOK bPromptJSOrServerOutdated + cUrlIndex dcpCallbackType dcpStatus detectType getVersionArray global_dlg hideMask isDWTVersionLatest onNoControl + onNotAllowedForChrome ports scriptLoaded showMask starting tryTimes*/ + ssl: boolean; + }; + + /*ignored + detectButton dialog dialogShowStatus dlgProgress dlgRef drawBoxBorder drawImageWithHermite + each empty endsWith + */ + + let env: { + WSSession: number, WSVersion: string, + bChrome: boolean, bEdge: boolean, bFileSystem: boolean, bFirefox: boolean, + bIE: boolean, bLinux: boolean, bMac: boolean, bSafari: boolean, bWin: boolean, bWin64: boolean, + basePath: string, iPluginLength: number, isX64: boolean, pathType: number, + strChromeVersion: string, strFirefoxVersion: string, strIEVersion: string + }; + + /*ignored + error escapeHtml escapeRegExp extend filter fireEvent fromUnicode get getColor getCss + getElDimensions getHex getHexColor getHttpUrl getLogger getOffset getRandom getRealPath getScript + getWS getWSUrl getWheelDelta globalEval guid hide html5 imageControlCount indexOf install + io isArray isBoolean isDef isFunction isLocalIP isNaN isNull isNumber isObject + isPlainObject isString isUndef isUndefined isWindow keys log main makeArray mix + needShowTwiceShowDialog nil noop now obj one page param parse parseHTML parser + product progressMessage ready removeEventListener replaceAll replaceControl show showProgress startWS + startWSByIP startsWith stopPropagation stringify style support switchEvent tmp toggle trim + type unEscapeHtml unparam upperCaseFirst urlDecode urlEncode utf8 win + ...other internal ones + */ + } namespace WebTwainEnv { - function GetWebTwain (cid: string): WebTwain; - function RegisterEvent(event: string, fn: (...args: any[]) => void): void; - function Load(): void; - function Unload(): void; + let ActiveXInstallWithCAB: boolean; + let ActiveXVersion: string; let AutoLoad: boolean; + function CloseDialog(): void; + let ContainerMap: {}; let Containers: Container[]; + function CreateDWTObject(newObjID: string, successFn: (dwtObject: WebTwain) => void, failurefn: (...args: any[]) => void): void; + function CreateDWTObject(newObjID: string, ip: number | string, port: number | string, portSSL: number | string, successFn: (dwtObject: WebTwain) => void, failurefn: (...args: any[]) => void): void; + let Debug: boolean; + function DeleteDWTObject(objID: string): void; + let DynamicContainers: string[]; + let DynamicDWTMap: {}; + function GetWebTwain(cid: string): WebTwain; + let IfUpdateService: boolean; + let IfUseActiveXForIE10Plus: boolean; + let JSVersion: string; + function Load(): void; + + /*ignored + OnWebTwainInitMessage OnWebTwainNeedUpgrade OnWebTwainNeedUpgradeWebJavascript OnWebTwainNotFound OnWebTwainOldPluginNotAllowed + */ + + function OnWebTwainPostExecute(): void; + function OnWebTwainPreExecute(): void; + + /*ignored + OnWebTwainReady + */ + + let PluginVersion: string; + let ProductKey: string; + function RegisterEvent(event: string, fn: (...args: any[]) => void): void; + function RemoveAllAuthorizations(): void; + let ResourcesPath: string; + let ServerVersionInfo: string; + function ShowDialog(_dialogWidth: number, _dialogHeight: number, _strDialogMessageWithHtmlFormat: string, _bChangeImage: boolean, bHideCloseButton: boolean): void; + let Trial: boolean; + function Unload(): void; + let UseDefaultInstallUI: boolean; + let initQueue: any[]; + let inited: boolean; } } -/** ICAP_PIXELTYPE values (PT_ means Pixel Type) */ -declare enum EnumDWT_PixelType { - TWPT_BW = 0, - TWPT_GRAY = 1, - TWPT_RGB = 2, - TWPT_PALLETE = 3, - TWPT_CMY = 4, - TWPT_CMYK = 5, - TWPT_YUV = 6, - TWPT_YUVK = 7, - TWPT_CIEXYZ = 8, - TWPT_LAB = 9, - TWPT_SRGB = 10, - TWPT_SCRGB = 11, - TWPT_INFRARED = 16 -} - +/** Border Styles */ declare enum EnumDWT_BorderStyle { - /** No border. */ - TWBS_NONE = 0, - /** Flat border. */ - TWBS_SINGLEFLAT = 1, - /** 3D border. */ - TWBS_SINGLE3D = 2 -} - -/** For query the operation that are supported by the data source on a capability . - * Application gets these through DG_CONTROL/DAT_CAPABILITY/MSG_QUERYSUPPORT - */ -declare enum EnumDWT_MessageType { - TWQC_GET = 1, - TWQC_SET = 2, - TWQC_GETDEFAULT = 4, - TWQC_GETCURRENT = 8, - TWQC_RESET = 16 + /** No border. */ + TWBS_NONE = 0, + /** Flat border. */ + TWBS_SINGLEFLAT = 1, + /** 3D border. */ + TWBS_SINGLE3D = 2 } /** Capabilities */ @@ -328,45 +324,45 @@ declare enum EnumDWT_Cap { * any frames with a left offset of zero. * TWFA_RIGHT: The alignment is to the right. */ - CAP_FEEDERALIGNMENT = 4141, + CAP_FEEDERALIGNMENT = 4141, /** TWFO_FIRSTPAGEFIRST if the feeder starts with the top of the first page. * TWFO_LASTPAGEFIRST is the feeder starts with the top of the last page. */ - CAP_FEEDERORDER = 4142, + CAP_FEEDERORDER = 4142, /** Indicates whether the physical hardware (e.g. scanner, digital camera) is capable of acquiring * multiple images of the same page without changes to the physical registration of that page. */ - CAP_REACQUIREALLOWED = 4144, + CAP_REACQUIREALLOWED = 4144, /** The minutes of battery power remaining to the device. */ - CAP_BATTERYMINUTES = 4146, + CAP_BATTERYMINUTES = 4146, /** When used with CapGet(), return the percentage of battery power level on camera. If -1 is returned, it indicates that the battery is not present. */ - CAP_BATTERYPERCENTAGE = 4147, + CAP_BATTERYPERCENTAGE = 4147, /** Added 1.91 */ - CAP_CAMERASIDE = 4148, + CAP_CAMERASIDE = 4148, /** Added 1.91 */ - CAP_SEGMENTED = 4149, + CAP_SEGMENTED = 4149, /** Added 2.0 */ - CAP_CAMERAENABLED = 4150, + CAP_CAMERAENABLED = 4150, /** Added 2.0 */ - CAP_CAMERAORDER = 4151, + CAP_CAMERAORDER = 4151, /** Added 2.0 */ - CAP_MICRENABLED = 4152, + CAP_MICRENABLED = 4152, /** Added 2.0 */ - CAP_FEEDERPREP = 4153, + CAP_FEEDERPREP = 4153, /** Added 2.0 */ - CAP_FEEDERPOCKET = 4154, + CAP_FEEDERPOCKET = 4154, /** Added 2.1 */ - CAP_AUTOMATICSENSEMEDIUM = 4155, + CAP_AUTOMATICSENSEMEDIUM = 4155, /** Added 2.1 */ - CAP_CUSTOMINTERFACEGUID = 4156, + CAP_CUSTOMINTERFACEGUID = 4156, /** TRUE enables and FALSE disables the Source's Auto-brightness function (if any). */ - ICAP_AUTOBRIGHT = 4352, + ICAP_AUTOBRIGHT = 4352, /** The brightness values available within the Source. */ - ICAP_BRIGHTNESS = 4353, + ICAP_BRIGHTNESS = 4353, /** The contrast values available within the Source. */ - ICAP_CONTRAST = 4355, + ICAP_CONTRAST = 4355, /** Specifies the square-cell halftone (dithering) matrix the Source should use to halftone the image. */ - ICAP_CUSTHALFTONE = 4356, + ICAP_CUSTHALFTONE = 4356, /** Specifies the exposure time used to capture the image, in seconds. */ ICAP_EXPOSURETIME = 4357, /** Describes the color characteristic of the subtractive filter applied to the image data. Multiple @@ -623,204 +619,85 @@ declare enum EnumDWT_Cap { ICAP_SUPPORTEDEXTIMAGEINFO = 4446 } -/** Capabilities exist in many varieties but all have a Default Value, Current Value, and may have other values available that can be supported if selected. - * To help categorize the supported values into clear structures, TWAIN defines four types of containers for capabilities = - * TW_ONEVALUE, TW_ARRAY, TW_RANGE and TW_ENUMERATION. - */ -declare enum EnumDWT_CapType { - /** Nothing. */ - TWON_NONE = 0, - /** A rectangular array of values that describe a logical item. It is similar to the TW_ONEVALUE because the current and default values are the same and - * there are no other values to select from. For example, a list of the names, such as the supported capabilities list returned by the CAP_SUPPORTEDCAPS - * capability, would use this type of container. +/** ICAP_BITORDER values. */ +declare enum EnumDWT_CapBitOrder { + TWBO_LSBFIRST = 0, + /** Indicates that the leftmost bit in the byte (usually bit 7) is the byte's Most Significant Bit. */ + TWBO_MSBFIRST = 1 +} + +/** ICAP_BITDEPTHREDUCTION values. */ +declare enum EnumDWT_CapBitdepthReduction { + TWBR_THRESHOLD = 0, + TWBR_HALFTONE = 1, + TWBR_CUSTHALFTONE = 2, + TWBR_DIFFUSION = 3 +} + +/** CAP_FEEDERALIGNMENT values. */ +declare enum EnumDWT_CapFeederAlignment { + /** The alignment is free-floating. Applications should assume that the origin for frames is on the left. */ + TWFA_NONE = 0, + /** The alignment is to the left. */ + TWFA_LEFT = 1, + /** The alignment is centered. This means that the paper will be fed in the middle of the ICAP_PHYSICALWIDTH of the + * device. If this is set, then the Application should calculate any frames with a left offset of zero. */ - TWON_ARRAY = 3, - /** This is the most general type because it defines a list of values from which the Current Value can be chosen. - * The values do not progress uniformly through a range and there is not a consistent step size between the values. - * For example, if a Source's resolution options do not occur in even step sizes then an enumeration would be used (for example, 150, 400, and 600). - */ - TWON_ENUMERATION = 4, - /** A single value whose current and default values are coincident. The range of available values for this type of capability is simply this single value. - * For example, a capability that indicates the presence of a document feeder could be of this type. - */ - TWON_ONEVALUE = 5, - /** Many capabilities allow users to select their current value from a range of regularly spaced values. - * The capability can specify the minimum and maximum acceptable values and the incremental step size between the values. - * For example, resolution might be supported from 100 to 600 in steps of 50 (100, 150, 200, ..., 550, 600). - */ - TWON_RANGE = 6 + TWFA_CENTER = 2, + /** The alignment is to the right. */ + TWFA_RIGHT = 3 } -/** ICAP_XFERMECH values. */ -declare enum EnumDWT_TransferMode { - /** Native transfers require the data to be transferred to a single large block of RAM. Therefore, - * they always face the risk of having an inadequate amount of RAM available to perform the transfer successfully. - */ - TWSX_NATIVE = 0, - /** Disk File Mode Transfers. */ - TWSX_FILE = 1, - /** Buffered Memory Mode Transfers. */ - TWSX_MEMORY = 2, - /** added 1.91 */ - TWSX_MEMFILE = 4 +/** CAP_FEEDERORDER values. */ +declare enum EnumDWT_CapFeederOrder { + /** The feeder starts with the top of the first page. */ + TWFO_FIRSTPAGEFIRST = 0, + /** The feeder starts with the top of the last page. */ + TWFO_LASTPAGEFIRST = 1 } -/** ICAP_IMAGEFILEFORMAT values. */ -declare enum EnumDWT_FileFormat { - /** Used for document imaging. Tagged Image File Format */ - TWFF_TIFF = 0, - /** Native Macintosh format. Macintosh PICT */ - TWFF_PICT = 1, - /** Native Microsoft format. Windows Bitmap */ - TWFF_BMP = 2, - /** Used for document imaging. X-Windows Bitmap */ - TWFF_XBM = 3, - /** Wrapper for JPEG images. JPEG File Interchange Format */ - TWFF_JFIF = 4, - /** FlashPix, used with digital cameras. Flash Pix */ - TWFF_FPX = 5, - /** Multi-page TIFF files. Multi-page tiff file */ - TWFF_TIFFMULTI = 6, - /** An image format standard intended for use on the web, replaces GIF. */ - TWFF_PNG = 7, - /** A standard from JPEG, intended to replace JFIF, also supports JBIG. */ - TWFF_SPIFF = 8, - /** File format for use with digital cameras. */ - TWFF_EXIF = 9, - /** A file format from Adobe. 1.91 NB: this is not PDF/A */ - TWFF_PDF = 10, - /** A file format from the Joint Photographic Experts Group. 1.91 */ - TWFF_JP2 = 11, - /** 1.91 */ - TWFF_JPN = 12, - /** 1.91 */ - TWFF_JPX = 13, - /** A file format from LizardTech. 1.91 */ - TWFF_DEJAVU = 14, - /** A file format from Adobe. 2.0 */ - TWFF_PDFA = 15, - /** 2.1 Adobe PDF/A, Version 2 */ - TWFF_PDFA2 = 16 +/** ICAP_FILTER values. */ +declare enum EnumDWT_CapFilterType { + TWFT_RED = 0, + TWFT_GREEN = 1, + TWFT_BLUE = 2, + TWFT_NONE = 3, + TWFT_WHITE = 4, + TWFT_CYAN = 5, + TWFT_MAGENTA = 6, + TWFT_YELLOW = 7, + TWFT_BLACK = 8 } -/** TIFF file compression type. */ -declare enum EnumDWT_TIFFCompressionType { - /** Auto mode. */ - TIFF_AUTO = 0, - /** Dump mode. */ - TIFF_NONE = 1, - /** CCITT modified Huffman RLE. */ - TIFF_RLE = 2, - /** CCITT Group 3 fax encoding. */ - TIFF_FAX3 = 3, - /** CCITT T.4 (TIFF 6 name). */ - TIFF_T4 = 3, - /** CCITT Group 4 fax encoding */ - TIFF_FAX4 = 4, - /** CCITT T.6 (TIFF 6 name). */ - TIFF_T6 = 4, - /** Lempel Ziv and Welch */ - TIFF_LZW = 5, - TIFF_JPEG = 7, - TIFF_PACKBITS = 32773 +/** ICAP_FLASHUSED2 values. */ +declare enum EnumDWT_CapFlash { + TWFL_NONE = 0, + TWFL_OFF = 1, + TWFL_ON = 2, + TWFL_AUTO = 3, + TWFL_REDEYE = 4 } -/** The method to do interpolation. */ -declare enum EnumDWT_InterpolationMethod { - IM_NEARESTNEIGHBOUR = 1, - IM_BILINEAR = 2, - IM_BICUBIC = 3, - IM_BESTQUALITY = 5 +/** ICAP_FLIPROTATION values. */ +declare enum EnumDWT_CapFlipRotation { + /** The images to be scanned are viewed in book form, flipping each page from left to right or right to left. */ + TWFR_BOOK = 0, + /** The images to be scanned are viewed in fanfold paper style, flipping each page up or down. */ + TWFR_FANFOLD = 1 } -/** Image type */ -declare enum EnumDWT_ImageType { - /** Native Microsoft format. */ - IT_BMP = 0, - /** JPEG format. */ - IT_JPG = 1, - /** Tagged Image File Format. */ - IT_TIF = 2, - /** An image format standard intended for use on the web, replaces GIF. */ - IT_PNG = 3, - /** A file format from Adobe. */ - IT_PDF = 4, - IT_ALL = 5 -} - -/** PDF file compression type. */ -declare enum EnumDWT_PDFCompressionType { - /** Auto mode. */ - PDF_AUTO = 0, - /** CCITT Group 3 fax encoding. */ - PDF_FAX3 = 1, - /** CCITT Group 4 fax encoding */ - PDF_FAX4 = 2, - /** Lempel Ziv and Welch */ - PDF_LZW = 3, - /** CCITT modified Huffman RLE. */ - PDF_RLE = 4, - PDF_JPEG = 5 -} - -declare enum EnumDWT_ShowMode { - /** Activates the window and displays it in its current size and position. */ - SW_ACTIVE = 0, - /** Maximizes the window */ - SW_MAX = 1, - /** Minimize the window */ - SW_MIN = 2, - /** Close the latest opened editor window */ - SW_CLOSE = 3, - /** Check whether a window exists */ - SW_IFLIVE = 4 -} - -/** The kind of data stored in the container. */ -declare enum EnumDWT_CapValueType { - TWTY_INT8 = 0, - /** Means Item is a TW_INT16 */ - TWTY_INT16 = 1, - /** Means Item is a TW_INT32 */ - TWTY_INT32 = 2, - /** Means Item is a TW_UINT8 */ - TWTY_UINT8 = 3, - /** Means Item is a TW_UINT16 */ - TWTY_UINT16 = 4, - /** Means Item is a TW_int */ - TWTY_int = 5, - /** Means Item is a TW_BOOL */ - TWTY_BOOL = 6, - /** Means Item is a TW_FIX32 */ - TWTY_FIX32 = 7, - /** Means Item is a TW_FRAME */ - TWTY_FRAME = 8, - /** Means Item is a TW_STR32 */ - TWTY_STR32 = 9, - /** Means Item is a TW_STR64 */ - TWTY_STR64 = 10, - /** Means Item is a TW_STR128 */ - TWTY_STR128 = 11, - /** Means Item is a TW_STR255 */ - TWTY_STR255 = 12 -} - -/** ICAP_UNITS values. */ -declare enum EnumDWT_UnitType { - TWUN_INCHES = 0, - TWUN_CENTIMETERS = 1, - TWUN_PICAS = 2, - TWUN_POINTS = 3, - TWUN_TWIPS = 4, - TWUN_PIXELS = 5, - TWUN_MILLIMETERS = 6 -} - -/** ICAP_DUPLEX values. */ -declare enum EnumDWT_DUPLEX { - TWDX_NONE = 0, - TWDX_1PASSDUPLEX = 1, - TWDX_2PASSDUPLEX = 2 +/** ICAP_IMAGEFILTER values. */ +declare enum EnumDWT_CapImageFilter { + TWIF_NONE = 0, + TWIF_AUTO = 1, + /** Good for halftone images. */ + TWIF_LOWPASS = 2, + /** Good for improving text. */ + TWIF_BANDPASS = 3, + /** Good for improving fine lines. */ + TWIF_HIGHPASS = 4, + TWIF_TEXT = 3, + TWIF_FINELINE = 4 } /** CAP_LANGUAGE values. */ @@ -974,6 +851,92 @@ declare enum EnumDWT_CapLanguage { TWLG_VIETNAMESE = 113 } +/** ICAP_LIGHTPATH values. */ +declare enum EnumDWT_CapLightPath { + TWLP_REFLECTIVE = 0, + TWLP_TRANSMISSIVE = 1 +} + +/** ICAP_LIGHTSOURCE values. */ +declare enum EnumDWT_CapLightSource { + TWLS_RED = 0, + TWLS_GREEN = 1, + TWLS_BLUE = 2, + TWLS_NONE = 3, + TWLS_WHITE = 4, + TWLS_UV = 5, + TWLS_IR = 6 +} + +/** ICAP_NOISEFILTER values. */ +declare enum EnumDWT_CapNoiseFilter { + TWNF_NONE = 0, + TWNF_AUTO = 1, + TWNF_LONEPIXEL = 2, + TWNF_MAJORITYRULE = 3 +} + +/** ICAP_ORIENTATION values. */ +declare enum EnumDWT_CapORientation { + TWOR_ROT0 = 0, + TWOR_ROT90 = 1, + TWOR_ROT180 = 2, + TWOR_ROT270 = 3, + TWOR_PORTRAIT = 0, + TWOR_LANDSCAPE = 3, + /** 2.0 */ + TWOR_AUTO = 4, + /** 2.0 */ + TWOR_AUTOTEXT = 5, + /** 2.0 */ + TWOR_AUTOPICTURE = 6 +} + +/** ICAP_OVERSCAN values. */ +declare enum EnumDWT_CapOverscan { + TWOV_NONE = 0, + TWOV_AUTO = 1, + TWOV_TOPBOTTOM = 2, + TWOV_LEFTRIGHT = 3, + TWOV_ALL = 4 +} + +/** ICAP_PIXELFLAVOR values. */ +declare enum EnumDWT_CapPixelFlavor { + /** Zero pixel represents darkest shade. zero pixel represents darkest shade */ + TWPF_CHOCOLATE = 0, + /** Zero pixel represents lightest shade. zero pixel represents lightest shade */ + TWPF_VANILLA = 1 +} + +/** ICAP_PLANARCHUNKY values. */ +declare enum EnumDWT_CapPlanarChunky { + TWPC_CHUNKY = 0, + TWPC_PLANAR = 1 +} + +/** CAP_PRINTER values. */ +declare enum EnumDWT_CapPrinter { + TWPR_IMPRINTERTOPBEFORE = 0, + TWPR_IMPRINTERTOPAFTER = 1, + TWPR_IMPRINTERBOTTOMBEFORE = 2, + TWPR_IMPRINTERBOTTOMAFTER = 3, + TWPR_ENDORSERTOPBEFORE = 4, + TWPR_ENDORSERTOPAFTER = 5, + TWPR_ENDORSERBOTTOMBEFORE = 6, + TWPR_ENDORSERBOTTOMAFTER = 7 +} + +/** CAP_PRINTERMODE values. */ +declare enum EnumDWT_CapPrinterMode { + /** Specifies that the printed text will consist of a single string. */ + TWPM_SINGLESTRING = 0, + /** Specifies that the printed text will consist of an enumerated list of strings to be printed in order. */ + TWPM_MULTISTRING = 1, + /** Specifies that the printed string will consist of a compound of a String followed by a value followed by a suffix string. */ + TWPM_COMPOUNDSTRING = 2 +} + /** TWAIN Supported sizes. */ declare enum EnumDWT_CapSupportedSizes { /** 0 */ @@ -1102,180 +1065,68 @@ declare enum EnumDWT_CapSupportedSizes { TWSS_MAXSIZE = 54 } -/** CAP_FEEDERALIGNMENT values. */ -declare enum EnumDWT_CapFeederAlignment { - /** The alignment is free-floating. Applications should assume that the origin for frames is on the left. */ - TWFA_NONE = 0, - /** The alignment is to the left. */ - TWFA_LEFT = 1, - /** The alignment is centered. This means that the paper will be fed in the middle of the ICAP_PHYSICALWIDTH of the - * device. If this is set, then the Application should calculate any frames with a left offset of zero. +/** Capabilities exist in many varieties but all have a Default Value, Current Value, and may have other values available that can be supported if selected. + * To help categorize the supported values into clear structures, TWAIN defines four types of containers for capabilities = + * TW_ONEVALUE, TW_ARRAY, TW_RANGE and TW_ENUMERATION. + */ +declare enum EnumDWT_CapType { + /** Nothing. */ + TWON_NONE = 0, + /** A rectangular array of values that describe a logical item. It is similar to the TW_ONEVALUE because the current and default values are the same and + * there are no other values to select from. For example, a list of the names, such as the supported capabilities list returned by the CAP_SUPPORTEDCAPS + * capability, would use this type of container. */ - TWFA_CENTER = 2, - /** The alignment is to the right. */ - TWFA_RIGHT = 3 -} -/** CAP_FEEDERORDER values. */ -declare enum EnumDWT_CapFeederOrder { - /** The feeder starts with the top of the first page. */ - TWFO_FIRSTPAGEFIRST = 0, - /** The feeder starts with the top of the last page. */ - TWFO_LASTPAGEFIRST = 1 + TWON_ARRAY = 3, + /** This is the most general type because it defines a list of values from which the Current Value can be chosen. + * The values do not progress uniformly through a range and there is not a consistent step size between the values. + * For example, if a Source's resolution options do not occur in even step sizes then an enumeration would be used (for example, 150, 400, and 600). + */ + TWON_ENUMERATION = 4, + /** A single value whose current and default values are coincident. The range of available values for this type of capability is simply this single value. + * For example, a capability that indicates the presence of a document feeder could be of this type. + */ + TWON_ONEVALUE = 5, + /** Many capabilities allow users to select their current value from a range of regularly spaced values. + * The capability can specify the minimum and maximum acceptable values and the incremental step size between the values. + * For example, resolution might be supported from 100 to 600 in steps of 50 (100, 150, 200, ..., 550, 600). + */ + TWON_RANGE = 6 } -/** CAP_PRINTER values. */ -declare enum EnumDWT_CapPrinter { - TWPR_IMPRINTERTOPBEFORE = 0, - TWPR_IMPRINTERTOPAFTER = 1, - TWPR_IMPRINTERBOTTOMBEFORE = 2, - TWPR_IMPRINTERBOTTOMAFTER = 3, - TWPR_ENDORSERTOPBEFORE = 4, - TWPR_ENDORSERTOPAFTER = 5, - TWPR_ENDORSERBOTTOMBEFORE = 6, - TWPR_ENDORSERBOTTOMAFTER = 7 +/** The kind of data stored in the container. */ +declare enum EnumDWT_CapValueType { + TWTY_INT8 = 0, + /** Means Item is a TW_INT16 */ + TWTY_INT16 = 1, + /** Means Item is a TW_INT32 */ + TWTY_INT32 = 2, + /** Means Item is a TW_UINT8 */ + TWTY_UINT8 = 3, + /** Means Item is a TW_UINT16 */ + TWTY_UINT16 = 4, + /** Means Item is a TW_int */ + TWTY_int = 5, + /** Means Item is a TW_BOOL */ + TWTY_BOOL = 6, + /** Means Item is a TW_FIX32 */ + TWTY_FIX32 = 7, + /** Means Item is a TW_FRAME */ + TWTY_FRAME = 8, + /** Means Item is a TW_STR32 */ + TWTY_STR32 = 9, + /** Means Item is a TW_STR64 */ + TWTY_STR64 = 10, + /** Means Item is a TW_STR128 */ + TWTY_STR128 = 11, + /** Means Item is a TW_STR255 */ + TWTY_STR255 = 12 } -/** CAP_PRINTERMODE values. */ -declare enum EnumDWT_CapPrinterMode { - /** Specifies that the printed text will consist of a single string. */ - TWPM_SINGLESTRING = 0, - /** Specifies that the printed text will consist of an enumerated list of strings to be printed in order. */ - TWPM_MULTISTRING = 1, - /** Specifies that the printed string will consist of a compound of a String followed by a value followed by a suffix string. */ - TWPM_COMPOUNDSTRING = 2 -} - -/** ICAP_BITDEPTHREDUCTION values. */ -declare enum EnumDWT_CapBitdepthReduction { - TWBR_THRESHOLD = 0, - TWBR_HALFTONE = 1, - TWBR_CUSTHALFTONE = 2, - TWBR_DIFFUSION = 3 -} - -/** ICAP_BITORDER values. */ -declare enum EnumDWT_CapBitOrder { - TWBO_LSBFIRST = 0, - /** Indicates that the leftmost bit in the byte (usually bit 7) is the byte's Most Significant Bit. */ - TWBO_MSBFIRST = 1 -} - -/** ICAP_FILTER values. */ -declare enum EnumDWT_CapFilterType { - TWFT_RED = 0, - TWFT_GREEN = 1, - TWFT_BLUE = 2, - TWFT_NONE = 3, - TWFT_WHITE = 4, - TWFT_CYAN = 5, - TWFT_MAGENTA = 6, - TWFT_YELLOW = 7, - TWFT_BLACK = 8 -} - -/** ICAP_FLASHUSED2 values. */ -declare enum EnumDWT_CapFlash { - TWFL_NONE = 0, - TWFL_OFF = 1, - TWFL_ON = 2, - TWFL_AUTO = 3, - TWFL_REDEYE = 4 -} - -/** ICAP_FLIPROTATION values. */ -declare enum EnumDWT_CapFlipRotation { - /** The images to be scanned are viewed in book form, flipping each page from left to right or right to left. */ - TWFR_BOOK = 0, - /** The images to be scanned are viewed in fanfold paper style, flipping each page up or down. */ - TWFR_FANFOLD = 1 -} - -/** ICAP_IMAGEFILTER values. */ -declare enum EnumDWT_CapImageFilter { - TWIF_NONE = 0, - TWIF_AUTO = 1, - /** Good for halftone images. */ - TWIF_LOWPASS = 2, - /** Good for improving text. */ - TWIF_BANDPASS = 3, - /** Good for improving fine lines. */ - TWIF_HIGHPASS = 4, - TWIF_TEXT = 3, - TWIF_FINELINE = 4 -} - -/** ICAP_LIGHTPATH values. */ -declare enum EnumDWT_CapLightPath { - TWLP_REFLECTIVE = 0, - TWLP_TRANSMISSIVE = 1 -} - -/** ICAP_LIGHTSOURCE values. */ -declare enum EnumDWT_CapLightSource { - TWLS_RED = 0, - TWLS_GREEN = 1, - TWLS_BLUE = 2, - TWLS_NONE = 3, - TWLS_WHITE = 4, - TWLS_UV = 5, - TWLS_IR = 6 -} - -/** TWEI_MAGTYPE values. (MD_ means Mag Type) Added 2.0 */ -declare enum EnumDWT_MagType { - /** Added 2.0 */ - TWMD_MICR = 0, - /** added 2.1 */ - TWMD_RAW = 1, - /** added 2.1 */ - TWMD_INVALID = 2 -} - -/** ICAP_NOISEFILTER values. */ -declare enum EnumDWT_CapNoiseFilter { - TWNF_NONE = 0, - TWNF_AUTO = 1, - TWNF_LONEPIXEL = 2, - TWNF_MAJORITYRULE = 3 -} - -/** ICAP_ORIENTATION values. */ -declare enum EnumDWT_CapORientation { - TWOR_ROT0 = 0, - TWOR_ROT90 = 1, - TWOR_ROT180 = 2, - TWOR_ROT270 = 3, - TWOR_PORTRAIT = 0, - TWOR_LANDSCAPE = 3, - /** 2.0 */ - TWOR_AUTO = 4, - /** 2.0 */ - TWOR_AUTOTEXT = 5, - /** 2.0 */ - TWOR_AUTOPICTURE = 6 -} - -/** ICAP_OVERSCAN values. */ -declare enum EnumDWT_CapOverscan { - TWOV_NONE = 0, - TWOV_AUTO = 1, - TWOV_TOPBOTTOM = 2, - TWOV_LEFTRIGHT = 3, - TWOV_ALL = 4 -} - -/** ICAP_PIXELFLAVOR values. */ -declare enum EnumDWT_CapPixelFlavor { - /** Zero pixel represents darkest shade. zero pixel represents darkest shade */ - TWPF_CHOCOLATE = 0, - /** Zero pixel represents lightest shade. zero pixel represents lightest shade */ - TWPF_VANILLA = 1 -} - -/** ICAP_PLANARCHUNKY values. */ -declare enum EnumDWT_CapPlanarChunky { - TWPC_CHUNKY = 0, - TWPC_PLANAR = 1 +/** ICAP_DUPLEX values. */ +declare enum EnumDWT_DUPLEX { + TWDX_NONE = 0, + TWDX_1PASSDUPLEX = 1, + TWDX_2PASSDUPLEX = 2 } /** Data source status. */ @@ -1290,6 +1141,48 @@ declare enum EnumDWT_DataSourceStatus { TWDSS_ACQUIRING = 3 } +declare enum EnumDWT_Error { + ModuleNotExists = -2371 +} + +/** ICAP_IMAGEFILEFORMAT values. */ +declare enum EnumDWT_FileFormat { + /** Used for document imaging. Tagged Image File Format */ + TWFF_TIFF = 0, + /** Native Macintosh format. Macintosh PICT */ + TWFF_PICT = 1, + /** Native Microsoft format. Windows Bitmap */ + TWFF_BMP = 2, + /** Used for document imaging. X-Windows Bitmap */ + TWFF_XBM = 3, + /** Wrapper for JPEG images. JPEG File Interchange Format */ + TWFF_JFIF = 4, + /** FlashPix, used with digital cameras. Flash Pix */ + TWFF_FPX = 5, + /** Multi-page TIFF files. Multi-page tiff file */ + TWFF_TIFFMULTI = 6, + /** An image format standard intended for use on the web, replaces GIF. */ + TWFF_PNG = 7, + /** A standard from JPEG, intended to replace JFIF, also supports JBIG. */ + TWFF_SPIFF = 8, + /** File format for use with digital cameras. */ + TWFF_EXIF = 9, + /** A file format from Adobe. 1.91 NB: this is not PDF/A */ + TWFF_PDF = 10, + /** A file format from the Joint Photographic Experts Group. 1.91 */ + TWFF_JP2 = 11, + /** 1.91 */ + TWFF_JPN = 12, + /** 1.91 */ + TWFF_JPX = 13, + /** A file format from LizardTech. 1.91 */ + TWFF_DEJAVU = 14, + /** A file format from Adobe. 2.0 */ + TWFF_PDFA = 15, + /** 2.1 Adobe PDF/A, Version 2 */ + TWFF_PDFA2 = 16 +} + /** Fit window type */ declare enum EnumDWT_FitWindowType { /** Fit the image to the width and height of the window */ @@ -1300,26 +1193,225 @@ declare enum EnumDWT_FitWindowType { enumFitWindowWidth = 2 } -declare enum EnumDWT_UploadDataFormat { - Binary = 0, - Base64 = 1 +/** Image type */ +declare enum EnumDWT_ImageType { + /** Native Microsoft format. */ + IT_BMP = 0, + /** JPEG format. */ + IT_JPG = 1, + /** Tagged Image File Format. */ + IT_TIF = 2, + /** An image format standard intended for use on the web, replaces GIF. */ + IT_PNG = 3, + /** A file format from Adobe. */ + IT_PDF = 4, + /** All supported formats which are bmp, jpg, tif, png and pdf */ + IT_ALL = 5 +} + +declare enum EnumDWT_InitMsg { + Info = 1, + Error = 2, + NotInstalledError = 3, + DownloadError = 4, + DownloadNotRestartError = 5 +} + +/** The method to do interpolation. */ +declare enum EnumDWT_InterpolationMethod { + IM_NEARESTNEIGHBOUR = 1, + IM_BILINEAR = 2, + IM_BICUBIC = 3, + IM_BESTQUALITY = 5 +} + +declare enum EnumDWT_Language { + English = 0, + French = 1, + Arabic = 2, + Spanish = 3, + Portuguese = 4, + German = 5, + Italian = 6, + Russian = 7, + Chinese = 8 +} + +/** TWEI_MAGTYPE values. (MD_ means Mag Type) Added 2.0 */ +declare enum EnumDWT_MagType { + /** Added 2.0 */ + TWMD_MICR = 0, + /** added 2.1 */ + TWMD_RAW = 1, + /** added 2.1 */ + TWMD_INVALID = 2 +} + +/** For query the operation that are supported by the data source on a capability . + * Application gets these through DG_CONTROL/DAT_CAPABILITY/MSG_QUERYSUPPORT + */ +declare enum EnumDWT_MessageType { + TWQC_GET = 1, + TWQC_SET = 2, + TWQC_GETDEFAULT = 4, + TWQC_GETCURRENT = 8, + TWQC_RESET = 16 } declare enum EnumDWT_MouseShape { - Default = 0, - Hand = 1, - Crosshair = 2, - Zoom = 3 + Default = 0, + Hand = 1, + Crosshair = 2, + Zoom = 3 } +/** PDF file compression type. */ +declare enum EnumDWT_PDFCompressionType { + /** Auto mode. */ + PDF_AUTO = 0, + /** CCITT Group 3 fax encoding. */ + PDF_FAX3 = 1, + /** CCITT Group 4 fax encoding */ + PDF_FAX4 = 2, + /** Lempel Ziv and Welch */ + PDF_LZW = 3, + /** CCITT modified Huffman RLE. */ + PDF_RLE = 4, + /** JPEG compression. */ + PDF_JPEG = 5 +} + +/** ICAP_PIXELTYPE values (PT_ means Pixel Type) */ +declare enum EnumDWT_PixelType { + TWPT_BW = 0, + TWPT_GRAY = 1, + TWPT_RGB = 2, + TWPT_PALLETE = 3, + TWPT_CMY = 4, + TWPT_CMYK = 5, + TWPT_YUV = 6, + TWPT_YUVK = 7, + TWPT_CIEXYZ = 8, + TWPT_LAB = 9, + TWPT_SRGB = 10, + TWPT_SCRGB = 11, + TWPT_INFRARED = 16 +} + +declare enum EnumDWT_PlatformType { + /// Fit the image to the width and height of the window + enumWindow = 0, + /// Fit the image to the height of the window + enumMac = 1, + /// Fit the image to the width of the window + enumLinux = 2 +} + +declare enum EnumDWT_ShowMode { + /** Activates the window and displays it in its current size and position. */ + SW_ACTIVE = 0, + /** Maximizes the window */ + SW_MAX = 1, + /** Minimize the window */ + SW_MIN = 2, + /** Close the latest opened editor window */ + SW_CLOSE = 3, + /** Check whether a window exists */ + SW_IFLIVE = 4 +} + +/** TIFF file compression type. */ +declare enum EnumDWT_TIFFCompressionType { + /** Auto mode. */ + TIFF_AUTO = 0, + /** Dump mode. */ + TIFF_NONE = 1, + /** CCITT modified Huffman RLE. */ + TIFF_RLE = 2, + /** CCITT Group 3 fax encoding. */ + TIFF_FAX3 = 3, + /** CCITT T.4 (TIFF 6 name). */ + TIFF_T4 = 3, + /** CCITT Group 4 fax encoding */ + TIFF_FAX4 = 4, + /** CCITT T.6 (TIFF 6 name). */ + TIFF_T6 = 4, + /** Lempel Ziv and Welch */ + TIFF_LZW = 5, + TIFF_JPEG = 7, + TIFF_PACKBITS = 32773 +} + +/** ICAP_XFERMECH values. */ +declare enum EnumDWT_TransferMode { + /** Native transfers require the data to be transferred to a single large block of RAM. Therefore, + * they always face the risk of having an inadequate amount of RAM available to perform the transfer successfully. + */ + TWSX_NATIVE = 0, + /** Disk File Mode Transfers. */ + TWSX_FILE = 1, + /** Buffered Memory Mode Transfers. */ + TWSX_MEMORY = 2/*,*/ + /** added 1.91 , not supported in DWT yet*/ + /** TWSX_MEMFILE = 4*/ +} + +/** ICAP_UNITS values. */ +declare enum EnumDWT_UnitType { + TWUN_INCHES = 0, + TWUN_CENTIMETERS = 1, + TWUN_PICAS = 2, + TWUN_POINTS = 3, + TWUN_TWIPS = 4, + TWUN_PIXELS = 5, + TWUN_MILLIMETERS = 6 +} + +declare enum EnumDWT_UploadDataFormat { + Binary = 0, + Base64 = 1 +} + +/** + * interface for a DWT container which basically defines a DIV on the page + */ interface Container { ContainerId: string; Width: string | number; Height: string | number; } -interface WebTwainAddon { - PDF: PDF; +/** + * interface for a base64 result + */ +interface Base64Result { + getLength(): number; + getData(offset: number, length: number): string; + getMD5(): string; +} + +/** + * Copied from lib.d.ts (Typescript) + */ +interface Blob { + readonly size: number; + readonly type: string; + msClose(): void; + msDetachStream(): any; + slice(start?: number, end?: number, contentType?: string): Blob; +} + +/** + * Details for each license + */ +interface LicenseDetailItem { + readonly Browser: string; + readonly EnumLicenseType: string; + readonly ExpireDate: string; + readonly LicenseType: string; + readonly OS: string; + readonly Trial: string; + readonly Version: string; } /** @@ -1328,68 +1420,85 @@ interface WebTwainAddon { // properties (get/set) / sync functions interface WebTwain { /** - * Returns addon. - * @type {WebTwainAddon} + * Returns whether the instance of a DWT is initialized + * @type {boolean} */ - Addon: WebTwainAddon; + bReady: boolean; /** - * Returns or sets whether multi-page selection is supported. - * @type {bool} + * Returns the runtime id of the dwt object + * @type {string} */ + readonly clientId: string; + + /** + * Returns the runtime class for the dwt container DIV + * @type {string} + */ + containerClass: string; + + /*ignored + httpUrl + objectName + + ...other internal ones + */ + + /* + * Properties + */ + + /** + * Returns or sets whether multi-page selection is supported. + * @type {boolean} + */ AllowMultiSelect: boolean; /** * [Deprecated.] Returns or sets whether allowing the plugin to send authentication request. The default value of this property is TRUE. - * @type {bool} + * @type {boolean} */ AllowPluginAuthentication: boolean; /** * [Deprecated.] Returns or sets whether the async mode is activated. With this mode, Dynamic Web TWAIN is able to upload/download files via HTTP/FTP asynchronously. The default value is false. - * @type {bool} + * @type {boolean} */ AsyncMode: boolean; /** * Returns or sets the background color of the main control. It is a value specifying the 24-bit RGB value. - * @type {int} + * @type {number} */ BackgroundColor: number; /** * Returns or sets the fill color of the selected area of an image when it is cut, erased or rotated. It is a value specifying the 24-bit RGB value. - * @type {int} + * @type {number} */ BackgroundFillColor: number; - /** - * [Deprecated.] Returns the number of barcode detected in an image. - * @type {int} - */ - BarcodeCount: number; - /** * Returns or sets the pixel bit depths for the current value of PixelType property. This is a runtime property. - * @type {short} + * @type {number} */ BitDepth: number; /** * Returns the current deviation of the pixels in the image. - * @type {float} + * @type {number} */ - BlankImageCurrentStdDev: number; + readonly BlankImageCurrentStdDev: number; /** * Returns or sets the standard deviation of the pixels in the image. - * @type {float} + * @type {number} */ BlankImageMaxStdDev: number; /** * Returns or sets the dividing line between black and white. The default value is 128. - * @type {int} + * @type {number} */ BlankImageThreshold: number; @@ -1401,79 +1510,73 @@ interface WebTwain { /** * Returns or sets the brightness values available within the Source. This is a runtime property. - * @type {float} + * @type {number} */ Brightness: number; /** * [Deprecated.] Sets or returns whether brokerprocess is enabled for scanning. - * @type {int} + * @type {number} */ BrokerProcessType: number; /** * Sets or returns how much physical memory is allowed for storing images currently loaded in Dynamic Web TWAIN. Once the limit is reached, images will be cached on the hard disk. - * @type {int} + * @type {number} */ BufferMemoryLimit: number; - /** - * Specifies the capabiltiy to be negotiated. This is a runtime property. - * @type {EnumDWT_Cap} - */ - Capability: EnumDWT_Cap; - /** * Sets or returns the index (0-based) of a list to indicate the Current Value when the value of the CapType property is TWON_ENUMERATION. If the data type of the capability is String, the list is in CapItemsString property. For other data types, the list is in CapItems property. This is a runtime property. - * @type {int} + * @type {number} */ CapCurrentIndex: number; /** * Sets or returns the current value in a range when the value of the CapType property is TWON_RANGE. This is a runtime property. - * @type {double} + * @type {number} */ CapCurrentValue: number; /** * Returns the index (0-based) of a list to indicate the Default Value when the value of the CapType property is TWON_ENUMERATION. If the data type of the capability is String, the list is in CapItemsString property. For other data types, the list is in CapItems property. This is a runtime, read-only property. - * @type {int} + * @type {number} */ - CapDefaultIndex: number; + readonly CapDefaultIndex: number; /** * Returns the default value in a range when the value of the CapType property is TWON_RANGE. This is a runtime, read-only property. - * @type {double} + * @type {number} */ CapDefaultValue: number; + /** + * Retruns the description for a capability + * @type {string} + */ + CapDescription: string; + /** * Sets or returns the maximum value in a range when the value of the CapType property is TWON_RANGE. This is a runtime property. - * @type {double} + * @type {number} */ CapMaxValue: number; /** * Sets or returns the minimum value in a range when the value of the CapType property is TWON_RANGE. This is a runtime property. - * @type {double} + * @type {number} */ CapMinValue: number; /** * [Deprecated.] Sets or returns how many items are in the list when the value of the CapType property is TWON_ARRAY or TWON_ENUMERATION. For String data type, the list is in CapItemsString property. For other data types, the list is in CapItems property. This is a runtime property. - * @type {int} + * @type {number} */ CapNumItems: number; - /** - * [Deprecated.] Replaced by GetCapItemsString method and SetCapItemsString method. - * @type {string} - */ - CapItemsString: string; - /** * Sets or returns the step size in a range when the value of the CapType property is TWON_RANGE. This is a runtime property. - * @type {double} + * @type {number} */ CapStepSize: number; @@ -1485,7 +1588,7 @@ interface WebTwain { /** * Returns or sets the value of the capability specified by Capability property when the value of the CapType property is TWON_ONEVALUE. This is a runtime property. - * @type {double} + * @type {number} */ CapValue: number; @@ -1497,25 +1600,25 @@ interface WebTwain { /** * Sets or returns the value type for reading the value of a capability. This is a runtime property. - * @type {short} + * @type {number} */ CapValueType: number; + /** + * Specifies the capabiltiy to be negotiated. This is a runtime property. + * @type {EnumDWT_Cap} + */ + Capability: EnumDWT_Cap; + /** * Returns or sets the contrast values available within the Source. This is a runtime property. - * @type {float} + * @type {number} */ Contrast: number; - /** - * Sets or returns the product name string for the application identity. - * @type {string} - */ - ProductName: string; - /** * Returns or sets current index of image in buffer. This is a runtime property. - * @type {short} + * @type {number} */ CurrentImageIndexInBuffer: number; @@ -1523,49 +1626,43 @@ interface WebTwain { * Returns the device name of current source. This is a runtime, read-only property. * @type {string} */ - CurrentSourceName: string; + readonly CurrentSourceName: string; /** * Returns the value indicating the data source status. This is a runtime, read-only property. - * @type {int} + * @type {number} */ - DataSourceStatus: number; + readonly DataSourceStatus: number; /** * Returns the device name of default source. This is a runtime, read-only property. * @type {string} */ - DefaultSourceName: string; + readonly DefaultSourceName: string; /** * Returns whether the source supports duplex. If so, it further returns the level of duplex the Source supports (one pass or two pass duplex). This is a runtime, read-only property. - * @type {int} + * @type {EnumDWT_DUPLEX} */ - Duplex: number; + readonly Duplex: EnumDWT_DUPLEX; /** * [Deprecated.] Returns or sets whether the user can zoom image using hot key. - * @type {bool} + * @type {boolean} */ EnableInteractiveZoom: boolean; /** * Returns the error code. This is a runtime, read-only property. - * @type {int} + * @type {number} */ - ErrorCode: number; + readonly ErrorCode: number; /** * Returns the error string. This is a runtime, read-only property. * @type {string} */ - ErrorString: string; - - /** - * Returns or sets whether to resize the image to fit the image to the width or height of the window. To use the property, the view mode should be set to -1 by -1. You can use SetViewMode method to set the view mode. - * @type {EnumDWT_FitWindowType} - */ - FitWindowType: EnumDWT_FitWindowType; + readonly ErrorString: string; /** * Returns or sets the password used to log into the FTP server. @@ -1575,7 +1672,7 @@ interface WebTwain { /** * Returns or sets the port number of the FTP server. - * @type {int} + * @type {number} */ FTPPort: number; @@ -1586,10 +1683,40 @@ interface WebTwain { FTPUserName: string; /** - * Returns how many images are in buffer. This is a runtime, read-only property. - * @type {short} + * Returns or sets whether to resize the image to fit the image to the width or height of the window. To use the property, the view mode should be set to -1 by -1. You can use SetViewMode method to set the view mode. + * @type {EnumDWT_FitWindowType} */ - HowManyImagesInBuffer: number; + FitWindowType: EnumDWT_FitWindowType; + + /** + * Returns the response string from the HTTP server if an error occurs for HTTPUploadThroughPost() method. This is a runtime, read-only property. + * @type {string} + */ + readonly HTTPPostResponseString: string; + + /** + * Returns whether a HTTP request has credentials + * @type {boolean} + */ + HTTPRequestswithCredentials: boolean; + + /** + * Returns or sets the height of the dwt viewer object + * @type {string|number} + */ + Height: string | number; + + /** + * Returns how many images are in buffer. This is a runtime, read-only property. + * @type {number} + */ + readonly HowManyImagesInBuffer: number; + + /** + * Specifies the content type of a http upload. + * @type {string} + */ + HttpContentTypeFieldValue: string; /** * Specifies the field name of uploaded image through POST. @@ -1605,15 +1732,9 @@ interface WebTwain { /** * Returns or sets the port number of the HTTP server. - * @type {int} + * @type {number|string} */ - HTTPPort: number; - - /** - * Returns the response string from the HTTP server if an error occurs for HTTPUploadThroughPost() method. This is a runtime, read-only property. - * @type {string} - */ - HTTPPostResponseString: string; + HTTPPort: number | string; /** * [Deprecated.] Returns or sets the user name used to log into the HTTP server. @@ -1623,205 +1744,211 @@ interface WebTwain { /** * Returns or sets whether the feature of disk caching is enabled. - * @type {bool} + * @type {boolean} */ IfAllowLocalCache: boolean; /** * Returns or sets whether insert or append new scanned images. - * @type {bool} + * @type {boolean} */ IfAppendImage: boolean; /** * Returns or sets whether the Source's Auto-brightness function is enabled. This is a runtime property. - * @type {bool} + * @type {boolean} */ IfAutoBright: boolean; /** * Returns or sets whether the data source (scanner) will discard blank images during scanning. The property works only if the device and its driver support discarding blank pages. You can find whether your device supports this capbility from its user manual. Or, you can use the built-in methods of Dynamic Web TWAIN to detect blank images: IsBlankImage, IsBlankImageEx. - * @type {bool} + * @type {boolean} */ IfAutoDiscardBlankpages: boolean; /** * Returns or sets whether the Source enable automatic document feeding process. This is a runtime property. - * @type {bool} + * @type {boolean} */ IfAutoFeed: boolean; + /** + * Returns or sets whether the Source enables the automatic document scanning process. This is a runtime property. + * @type {boolean} + */ + IfAutoScan: boolean; + + /** + * Specifies whether or not to automatically scroll to the last image or stay on the current image when loading or acquiring images + * @type {boolean} + */ + IfAutoScroll: boolean; + /** * Turns automatic border detection on and off. The property works only if the device and its driver support detecting the border automatically. You can find whether your device supports this capbility from its user manual. - * @type {bool} + * @type {boolean} */ IfAutomaticBorderDetection: boolean; /** * Turns automatic skew correction on and off. - * @type {bool} + * @type {boolean} */ IfAutomaticDeskew: boolean; - /** - * Returns or sets whether the Source enables the automatic document scanning process. This is a runtime property. - * @type {bool} - */ - IfAutoScan: boolean; - /** * Returns or sets whether close the Data Source User Interface after acquire all images. Default value of this property is FALSE. - * @type {bool} + * @type {boolean} */ IfDisableSourceAfterAcquire: boolean; /** * Returns or sets whether the Source supports duplex. If TRUE, the scanner scans both sides of a paper; otherwise, the scanner will scan only one side of the image. This is a runtime property. - * @type {bool} + * @type {boolean} */ IfDuplexEnabled: boolean; /** * Returns or sets whether the Automatic Document Feeder (ADF) is enabled. This is a runtime property. - * @type {bool} + * @type {boolean} */ IfFeederEnabled: boolean; /** * Returns whether or not there are documents loaded in the Source's feeder when IfFeederEnabled and IfPaperDetectable are TRUE. This is a runtime, read-only property. - * @type {bool} + * @type {boolean} */ - IfFeederLoaded: boolean; + readonly IfFeederLoaded: boolean; /** * Returns or sets whether to resize the image to fit the size of window when the view mode is set to -1 by -1. You can use SetViewMode method to set the view mode. - * @type {bool} + * @type {boolean} */ IfFitWindow: boolean; /** * [Deprecated.] Returns or sets whether the UI (User Interface) of Source runs in modal state. Default value of this property is TRUE. - * @type {bool} + * @type {boolean} */ IfModalUI: boolean; /** * Sets or returns whether Dynamic Web TWAIN uses Graphics Device Interface (GDI) when decoding images. - * @type {bool} + * @type {boolean} */ IfOpenImageWithGDIPlus: boolean; - /** - * Returns the value whether the Source has a paper sensor that can detect documents on the ADF or Flatbed. This is a runtime, read-only property. - * @type {bool} - */ - IfPaperDetectable: boolean; - /** * Returns or sets whether FTP passive mode is enabled. - * @type {bool} + * @type {boolean} */ IfPASVMode: boolean; + /** + * Returns the value whether the Source has a paper sensor that can detect documents on the ADF or Flatbed. This is a runtime, read-only property. + * @type {boolean} + */ + readonly IfPaperDetectable: boolean; + + /** + * Returns or sets whether SSL is used when uploading or downloading images. + * @type {boolean} + */ + IfSSL: boolean; + /** * [Deprecated.] Returns or sets whether communicate with device in a separate thread. Default value of this property is FALSE. - * @type {bool} + * @type {boolean} */ IfScanInNewThread: boolean; /** * Sets or returns whether to show the cancel dialog when uploading images to server. - * @type {bool} + * @type {boolean} */ IfShowCancelDialogWhenImageTransfer: boolean; /** * Returns or sets whether to show the file dialog box when saving scanned images or loading images from local folder. - * @type {bool} + * @type {boolean} */ IfShowFileDialog: boolean; /** * Returns or sets whether the Source displays a progress indicator during acquisition and transfer, regardless of whether the Source's user interface is active. This is a runtime property. - * @type {bool} + * @type {boolean} */ IfShowIndicator: boolean; /** * [Deprecated.] Returns or sets whether the driver of the printer displays the User Interface. - * @type {bool} + * @type {boolean} */ IfShowPrintUI: boolean; /** * Returns or sets whether the progress bar will be displayed during the transaction. This is a runtime property. - * @type {bool} + * @type {boolean} */ IfShowProgressBar: boolean; /** * Returns or sets whether the Source displays the User Interface. - * @type {bool} + * @type {boolean} */ IfShowUI: boolean; /** - * Returns or sets whether SSL is used when uploading or downloading images. - * @type {bool} + * Returns or sets whether to throw exceptions + * @type {boolean} */ - IfSSL: boolean; + IfThrowException: boolean; /** * Return or sets whether the Source allows to save many images in one TIFF file. The default value is FALSE. - * @type {bool} + * @type {boolean} */ IfTiffMultiPage: boolean; /** * Returns whether the Source supports acquisition with the UI (User Interface) disabled. If FALSE, indicates that this Source can only support acquisition with the UI enabled. This is a runtime, read-only property. - * @type {bool} + * @type {boolean} */ - IfUIControllable: boolean; + readonly IfUIControllable: boolean; /** * Sets or returns whether Dynamic Web TWAIN uses the new TWAIN Data Source Manager (TWAINDSM.dll) when acquiring images from TWAIN devices. - * @type {bool} + * @type {boolean} */ IfUseTwainDSM: boolean; - /** - * Specifies whether or not to automatically scroll to the last image or stay on the current image when loading or acquiring images - * @type {bool} - */ - IfAutoScroll: boolean; - /** * [Deprecated.] The number of bits in each image pixel (or bit depth). This is a runtime, read-only property. - * @type {short} + * @type {number} */ ImageBitsPerPixel: number; /** * Returns or sets whether a TWAIN driver or Native Scan of Mac OS X is used for document scanning. This property works for Mac edition only. - * @type {int} + * @type {number} */ ImageCaptureDriverType: number; /** * [Deprecated.] Returns or sets whether the image enumerator is enabled in Image Editor. - * @type {bool} + * @type {boolean} */ ImageEditorIfEnableEnumerator: boolean; /** * [Deprecated.] Returns or sets whether the Image Editor is a modal window. - * @type {bool} + * @type {boolean} */ ImageEditorIfModal: boolean; /** * [Deprecated.] Returns or sets whether the Image Editor is read-only. - * @type {bool} + * @type {boolean} */ ImageEditorIfReadonly: boolean; @@ -1833,55 +1960,55 @@ interface WebTwain { /** * Returns the document number of the current image. This is a runtime, read-only property. - * @type {int} + * @type {number} */ - ImageLayoutDocumentNumber: number; + readonly ImageLayoutDocumentNumber: number; /** * Returns the value of the bottom-most edge of the current image frame (in Unit). This is a read-only runtime property. - * @type {float} + * @type {number} */ - ImageLayoutFrameBottom: number; + readonly ImageLayoutFrameBottom: number; /** * Returns the value of the left-most edge of the current image frame (in Unit). This is a runtime, read-only property. - * @type {float} + * @type {number} */ - ImageLayoutFrameLeft: number; + readonly ImageLayoutFrameLeft: number; /** * Returns the frame number of the current image. This is a runtime, read-only property. - * @type {int} + * @type {number} */ - ImageLayoutFrameNumber: number; + readonly ImageLayoutFrameNumber: number; /** * Returns the value of the right-most edge of the current image frame (in Unit). This is a runtime, read-only property. - * @type {float} + * @type {number} */ - ImageLayoutFrameRight: number; + readonly ImageLayoutFrameRight: number; /** * Returns the value of the top-most edge of the current image frame (in Unit). This is a runtime, read-only property. - * @type {float} + * @type {number} */ - ImageLayoutFrameTop: number; + readonly ImageLayoutFrameTop: number; /** * Returns the page number of the current image. This is a runtime, read-only property. * @type {Long} */ - ImageLayoutPageNumber: number; + readonly ImageLayoutPageNumber: number; /** * [Deprecated.] Returns how tall/long, in pixels, the image is. This is a runtime, read-only property. - * @type {int} + * @type {number} */ ImageLength: number; /** * Returns or sets the margin between images when multiple images are displayed in Dynamic Web TWAIN. - * @type {short} + * @type {number} */ ImageMargin: number; @@ -1889,35 +2016,35 @@ interface WebTwain { * Returns the pixel type of the current image. This is a runtime, read-only property. Please note the property is only valid in OnPreTransfer and OnPostTransfer event. * @type {EnumDWT_PixelType} */ - ImagePixelType: EnumDWT_PixelType; + readonly ImagePixelType: EnumDWT_PixelType; /** * [Deprecated.] Returns how width, in pixels, the image is. This is a runtime, read-only property. - * @type {int} + * @type {number} */ ImageWidth: number; /** * [Deprecated.] Returns the X resolution of the current image. X resolution is the number of pixels per Unit in the horizontal direction. This is a runtime, read-only property. - * @type {float} + * @type {number} */ ImageXResolution: number; /** * [Deprecated.] Returns the Y resolution of the current image. Y resolution is the number of pixels per Unit in the vertical direction. This is a runtime, read-only property. - * @type {float} + * @type {number} */ ImageYResolution: number; /** * Returns or sets the quality of JPEG files and PDF files using JPEG compression. - * @type {short} + * @type {number} */ JPEGQuality: number; /** * Returns or sets the log level for debugging. - * @type {short} + * @type {number} */ LogLevel: number; @@ -1925,13 +2052,13 @@ interface WebTwain { * Return the magnetic data if the scanner support magnetic data recognition. * @type {string} */ - MagData: string; + readonly MagData: string; /** * Return the magnetic type if the scanner support magnetic data recognition. - * @type {short} + * @type {number} */ - MagType: number; + readonly MagType: number; /** * Sets or returns the manufacture string for the application identity. @@ -1941,45 +2068,39 @@ interface WebTwain { /** * Returns or sets the maximum number of images can be held in buffer. - * @type {short} + * @type {number} */ MaxImagesInBuffer: number; /** * [Deprecated.] Returns or sets how many threads can be used when you upload files through POST. - * @type {int} + * @type {number} */ MaxInternetTransferThreads: number; /** * Sets or returns the maximum allowed size when Dynamic Web TWAIN uploads a document. - * @type {int} + * @type {number} */ MaxUploadImageSize: number; /** * Returns or sets the shape of the mouse. - * @type {bool} + * @type {boolean} */ MouseShape: boolean; /** * Returns the X co-ordinate of the mouse. This is a runtime property. - * @type {int} + * @type {number} */ - MouseX: number; + readonly MouseX: number; /** * Returns the Y co-ordinate of the mouse. This is a runtime property. - * @type {int} + * @type {number} */ - MouseY: number; - - /** - * Returns or sets the page size(s) the Source can/should use to acquire image data. This is a runtime property. - * @type {short} - */ - PageSize: number; + readonly MouseY: number; /** * Returns or sets the name of the person who creates the PDF document. @@ -2042,14 +2163,20 @@ interface WebTwain { PDFVersion: string; /** - * Returns the number of transfers the Source is ready to supply, upon demand. This is a runtime, read-only property. - * @type {short} + * Returns or sets the page size(s) the Source can/should use to acquire image data. This is a runtime property. + * @type {EnumDWT_CapSupportedSizes} */ - PendingXfers: number; + PageSize: EnumDWT_CapSupportedSizes; + + /** + * Returns the number of transfers the Source is ready to supply, upon demand. This is a runtime, read-only property. + * @type {number} + */ + readonly PendingXfers: number; /** * Returns or sets the pixel flavor for acquired images. This is a runtime property. - * @type {short} + * @type {number} */ PixelFlavor: number; @@ -2071,6 +2198,12 @@ interface WebTwain { */ ProductKey: string; + /** + * Sets or returns the product name string for the application identity. + * @type {string} + */ + ProductName: string; + /** * [Deprecated.] Returns or sets the name of the proxy server. * @type {string} @@ -2079,45 +2212,39 @@ interface WebTwain { /** * Returns or sets the current resolution for acquired images. This is a runtime property. - * @type {float} + * @type {number} */ Resolution: number; /** * Returns or sets how many scanned images are selected. - * @type {short} + * @type {number} */ SelectedImagesCount: number; /** * Returns or sets the border color of the selected image. It is a value specifying the 24-bit RGB value. - * @type {int} + * @type {number} */ SelectionImageBorderColor: number; /** * Specifies a fixed aspect ratio to be used for selecting an area. - * @type {float} + * @type {number} */ SelectionRectAspectRatio: number; + /** + * Specifies whether to show the page number + * @type {boolean} + */ + ShowPageNumber: boolean; + /** * Returns how many sources are installed in the system. This is a runtime, read-only property. - * @type {int} + * @type {number} */ - SourceCount: number; - - /** - * [Deprecated.] Replaced by GetSourceNameItems method. - * @type {string} - */ - SourceNameItems: string; - - /** - * [Deprecated.] - * @type {string} - */ - GetSourceNames: string; + readonly SourceCount: number; /** * Returns or sets the compression type of TIFF files. This is a runtime property. @@ -2133,160 +2260,199 @@ interface WebTwain { /** * Returns or sets the unit of measure. This is a runtime property. - * @type {short} + * @type {EnumDWT_UnitType} */ - Unit: number; + Unit: EnumDWT_UnitType; + + /** + * Specifies whether to show the vertical scroll bar + * @type {boolean} + */ + VScrollBar: boolean; /** * Sets or returns the version info string for the application identity. * @type {string} */ - VersionInfo: string; + readonly VersionInfo: string; + + /** + * Returns or sets the width of the dwt object viewer + * @type {string|number} + */ + Width: string | number; /** * Returns and sets the number of images you are willing to transfer per session. This is a runtime property. - * @type {short} + * @type {number} */ XferCount: number; /** * Returns or sets zoom factor for the image, only valid When the view mode is set to -1 by -1. - * @type {float} + * @type {number} */ Zoom: number; - /** - * Binds a specified function to an event, so that the function gets called whenever the event fires. - * @method WebTwain#RegisterEvent - * @param {string} name the name of the event that the function is bound to. - * @param {object} evt specifies the function to call when event fires. - * @return {bool} - */ - RegisterEvent(name: string, evt: object): boolean; + /* ignored + style + _AutoCropMethod + */ - // --- SCAN start -- + /* + *Methods + */ + + /** + * Displays the source's built-in interface to acquire image. + * @method WebTwain#AcquireImage + * @param {object} optionalDeviceConfig a JS object used to set up the device for image acquisition. + * @param {function} asyncSuccessFunc the function to call when the upload succeeds. Please refer to the function prototype OnSuccess. + * @param {function} asyncFailureFunc the function to call when the upload fails. Please refer to the function prototype OnFailure. + * @return {boolean} + */ + AcquireImage(optionalDeviceConfig?: object, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; + + /** + * Add text on an image. + * @method WebTwain#AddText + * @param {number} sImageIndex the index of the image that you want to add text to. + * @param {number} x the x coordinate for the text. + * @param {number} y the y coordinate for the text. + * @param {string} text the content of the text that you want to add. + * @param {number} txtColor the color for the text. + * @param {number} backgroundColor the background color. + * @param {number} backgroundRoundRadius ranging from 0 to 0.5. Please NOTE that MAC version does not support this parameter. + * @param {number} backgroundOpacity specifies the opacity of the background of the added text, it ranges from 0 to 1.0. Please NOTE that Mac version only supports value 0 and 1 + * @return {boolean} + */ + AddText(sImageIndex: number, x: number, y: number, text: string, txtColor: number, backgroundColor: number, backgroundRoundRadius: number, backgroundOpacity: number): boolean; /** * Cancels all pending transfers. * @method WebTwain#CancelAllPendingTransfers - * @return {bool} + * @return {boolean} */ CancelAllPendingTransfers(): boolean; /** - * Closes Data Source. - * @method WebTwain#CloseSource - * @return {bool} + * Gets information of the capability specified by the Capability property. + * @method WebTwain#CapGet + * @return {boolean} */ - CloseSource(): boolean; + CapGet(): boolean; /** - * Closes and unloads Data Source Manager. - * @method WebTwain#CloseSourceManager - * @return {bool} + * Returns the Source's current Value for the specified capability. + * @method WebTwain#CapGetCurrent + * @return {boolean} */ - CloseSourceManager(): boolean; + CapGetCurrent(): boolean; /** - * Disable the source. If the source's user interface is displayed when the source is enabled, it will be closed. - * @method WebTwain#DisableSource - * @return {bool} + * Returns the Source's Default Value for the specified capability. This is the Source's preferred default value. + * @method WebTwain#CapGetDefault + * @return {boolean} */ - DisableSource(): boolean; + CapGetDefault(): boolean; /** - * Sets the Source to eject the current page and advance the next page in the document feeder into the feeder acquire area when IfFeederEnabled is TRUE. - * @method WebTwain#FeedPage - * @return {bool} + * Returns the value of the bottom-most edge of the specified frame. + * @method WebTwain#CapGetFrameBottom + * @param {number} index specifies the value of which frame to get. The index is 0-based. + * @return {number} */ - FeedPage(): boolean; + CapGetFrameBottom(index: number): number; /** - * Retrieve the device type of the currently selected data source, it might be a scanner, a web camera, etc. - * @method WebTwain#GetDeviceType - * @return {int} + * Returns the value (in Unit) of the left-most edge of the specified frame. + * @method WebTwain#CapGetFrameLeft + * @param {number} index specifies the value of which frame to get. The index is 0-based. + * @return {number} */ - GetDeviceType(): number; + CapGetFrameLeft(index: number): number; /** - * Get the source name according to the source index. - * @method WebTwain#GetSourceNameItems - * @param {short} index int index. Index is 0-based and can not be greater than SourceCount property. - * @return {string} + * Returns the value (in Unit) of the left-most edge of the specified frame. + * @method WebTwain#CapGetFrameRight + * @param {number} index specifies the value of which frame to get. The index is 0-based. + * @return {number} */ - GetSourceNameItems(index: number): string; + CapGetFrameRight(index: number): number; /** - * Loads the specified Source into main memory and causes its initialization, - * placing Dynamic Web TWAIN into Capability Negotiation state. If no source is - * specified (no SelectSource() or SelectSourceByIndex() is called), opens the default source. - * @method WebTwain#OpenSource - * @return {bool} + * Returns the value (in Unit) of the top-most edge of the specified frame. + * @method WebTwain#CapGetFrameTop + * @param {number} index specifies the value of which frame to get. The index is 0-based. + * @return {number} */ - OpenSource(): boolean; + CapGetFrameTop(index: number): number; + + /* ignored + * CapGetHelp + * CapGetLabel + * CapGetLabels + */ /** - * Loads and opens Data Source Manager. - * @method WebTwain#OpenSourceManager - * @return {bool} + * Queries whether the Source supports a particular operation on the capability. + * @method WebTwain#CapIfSupported + * @param {EnumDWT_MessageType} messageType specifies the type of capability operation. + * @return {boolean} */ - OpenSourceManager(): boolean; + CapIfSupported(messageType: EnumDWT_MessageType): boolean; /** - * Reverts the current image layout to the Data Source's default. - * @method WebTwain#ResetImageLayout - * @return {bool} + * Changes the Current Value of the capability specified by Capability property back to its power-on value. + * @method WebTwain#CapReset + * @return {boolean} */ - ResetImageLayout(): boolean; + CapReset(): boolean; /** - * Sets the Source to return the current page to the input side of the document feeder and - * feed the last page from the outside of the feeder back into the acquisition area if IfFeederEnabled is TRUE. - * @method WebTwain#RewindPage - * @return {bool} + * Sets the current capability using the container type specified by CapType property. The current capability is specified by Capability property. + * @method WebTwain#CapSet + * @return {boolean} */ - RewindPage(): boolean; + CapSet(): boolean; /** - * Brings up the TWAIN Data Source Manager's Source Selection User Interface (UI) - * so that user can choose which Data Source to be the current Source. - * @method WebTwain#SelectSource - * @return {bool} + * Sets the values of the specified frame. + * @method WebTwain#CapSetFrame + * @param {number} index specifies the values of which frame to set. The index is 0-based. + * @param {number} left the value (in Unit) of the left-most edge of the specified frame. + * @param {number} top the value (in Unit) of the top-most edge of the specified frame. + * @param {number} right the value (in Unit) of the right-most edge of the specified frame. + * @param {number} bottom the value (in Unit) of the bottom-most edge of the specified frame. + * @return {boolean} */ - SelectSource(): boolean; + CapSetFrame(index: number, left: number, top: number, right: number, bottom: number): boolean; /** - * Selects the index-the source in SourceNameItems property as the current source. - * @method WebTwain#SelectSourceByIndex - * @param {short} index It is the index of SourceNameItems property. - * @return {bool} + * Changes the bitdepth of a specified image. + * @method WebTwain#ChangeBitDepth + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @param {number} sBitDepth specifies the target bit depth. + * @param {boolean} bHighQuality specifies whether or not to keep high quality while changing the bit depth. When it's true, it takes more time. + * @return {boolean} */ - SelectSourceByIndex(index: number): boolean; + ChangeBitDepth(sImageIndex: number, sBitDepth: number, bHighQuality: boolean): boolean; /** - * Sets file name and file format information used in File Transfer Mode. - * @method WebTwain#SetFileXferInfo - * @param {string} fileName the name of the file to be used in transfer. - * @param {EnumDWT_FileFormat} fileFormat an enumerated value indicates the format of the image. - * @return {bool} + * Changes width and height of the image of a specified index in the buffer. Please note the file size of the image will be changed proportionately. + * @method WebTwain#ChangeImageSize + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @param {number} iNewWidth specifies the pixel width of the new image. + * @param {number} iNewHeight specifies the pixel height of the new image. + * @param {EnumDWT_InterpolationMethod} newVal specifies the method to do interpolation. + * @return {boolean} */ - SetFileXferInfo(fileName: string, fileFormat: EnumDWT_FileFormat): boolean; - - /** - * Sets the left, top, right, and bottom sides of the image layout rectangle for the current Data Source. - * @method WebTwain#SetImageLayout - * @param {float} left specifies the floating point number for the left side of the image layout rectangle. - * @param {float} top specifies the floating point number for the top side of the image layout rectangle. - * @param {float} right specifies the floating point number for the right side of the image layout rectangle. - * @param {float} bottom specifies the floating point number for the bottom side of the image layout rectangle. - * @return {bool} - */ - SetImageLayout(left: number, top: number, right: number, bottom: number): boolean; + ChangeImageSize(sImageIndex: number, iNewWidth: number, iNewHeight: number, newVal: EnumDWT_InterpolationMethod): boolean; /** * Clears all the web forms which are used for image uploading. * @method WebTwain#ClearAllHTTPFormField - * @return {bool} + * @return {boolean} */ ClearAllHTTPFormField(): boolean; @@ -2298,12 +2464,173 @@ interface WebTwain { ClearTiffCustomTag(): void; /** - * Check whether a certain file exists on the local disk. - * @method WebTwain#FileExists - * @param {string} localFile specifies the absolute path of the local file. - * @return {bool} + * Closes Data Source. + * @method WebTwain#CloseSource + * @return {boolean} */ - FileExists(localFile: string): boolean; + CloseSource(): boolean; + + /** + * Closes and unloads Data Source Manager. + * @method WebTwain#CloseSourceManager + * @return {boolean} + */ + CloseSourceManager(): boolean; + + /** + * Closes the current process used to scan + * @method WebTwain#CloseWorkingProcess + * @return {boolean} + */ + CloseWorkingProcess(): boolean; + + /** + * Converts the images specified by the indices to base64 synchronously. + * @method WebTwain#ConvertToBase64 + * @param {Array} indices indices specifies which images are to be converted to base64. + * @param {EnumDWT_ImageType} enumImageType the image format in which the images are to be converted to base64. + * @return {Base64Result} + + ConvertToBase64(indices: number[], enumImageType: EnumDWT_ImageType): Base64Result; + */ + + /** + * Converts the images specified by the indices to base64 asynchronously. + * @method WebTwain#ConvertToBase64 + * @param {Array} indices indices specifies which images are to be converted to base64. + * @param {EnumDWT_ImageType} enumImageType the image format in which the images are to be converted to base64. + * @param {function} asyncSuccessFunc the function to call when the upload succeeds. Please refer to the function prototype OnSuccess. + * @param {function} asyncFailureFunc the function to call when the upload fails. Please refer to the function prototype OnFailure. + * @return {boolean} + */ + ConvertToBase64(indices: number[], enumImageType: EnumDWT_ImageType, asyncSuccessFunc: (result: Base64Result) => void, asyncFailureFunc: (errorCode: number, errorString: string) => void): boolean; + + /** + * Converts the images specified by the indices to blob synchronously. + * @method WebTwain#ConvertToBlob + * @param {Array} indices indices specifies which images are to be converted to base64. + * @param {EnumDWT_ImageType} enumImageType the image format in which the images are to be converted to base64. + * @return {Blob} + */ + ConvertToBlob(indices: number[], enumImageType: EnumDWT_ImageType): Blob; + + /** + * Converts the images specified by the indices to blob asynchronously. + * @method WebTwain#ConvertToBlob + * @param {Array} indices indices specifies which images are to be converted to base64. + * @param {EnumDWT_ImageType} enumImageType the image format in which the images are to be converted to base64. + * @param {function} asyncSuccessFunc the function to call when the upload succeeds. Please refer to the function prototype OnSuccess. + * @param {function} asyncFailureFunc the function to call when the upload fails. Please refer to the function prototype OnFailure. + * @return {boolean} + */ + ConvertToBlob(indices: number[], enumImageType: EnumDWT_ImageType, asyncSuccessFunc: (result: any) => void, asyncFailureFunc: (errorCode: number, errorString: string) => void): boolean; + + /** + * Changes a specified image to gray scale. + * @method WebTwain#ConvertToGrayScale + * @param {number} sIndex specifies the index of image in buffer. The index is 0-based. + * @return {boolean} + */ + ConvertToGrayScale(sIndex: number): boolean; + + /** + * Copies the image of a specified index in buffer to clipboard in DIB format. + * @method WebTwain#CopyToClipboard + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @return {boolean} + */ + CopyToClipboard(sImageIndex: number): boolean; + + /** + * Create the font for adding text using the method AddText. + * @method WebTwain#CreateTextFont + * @param {number} height Specifies the desired height (in logical units) of the font.The absolute value of nHeight must not exceed 16,384 device units after it is converted.For all height comparisons, the font mapper looks for the largest font that does not exceed the requested size or the smallest font if all the fonts exceed the requested size. + * @param {number} width Specifies the average width (in logical units) of characters in the font. If Width is 0, the aspect ratio of the device will be matched against the digitization aspect ratio of the available fonts to find the closest match, which is determined by the absolute value of the difference. + * @param {number} escapement Specifies the angle (in 0.1-degree units) between the escapement vector and the x-axis of the display surface. The escapement vector is the line through the origins of the first and last characters on a line. The angle is measured counterclockwise from the x-axis. + * @param {number} orientation Specifies the angle (in 0.1-degree units) between the baseline of a character and the x-axis.The angle is measured counterclockwise from the x-axis for coordinate systems in which the y-direction is down and clockwise from the x-axis for coordinate systems in which the y-direction is up. + * @param {number} weight Specifies the font weight (in inked pixels per 1000). The described valuesare approximate; the actual appearance depends on the typeface. Some fonts haveonly FW_NORMAL, FW_REGULAR, and FW_BOLD weights. If FW_DONTCARE is specified, a default weight is used. + * @param {number} italic Specifies an italic font if set to TRUE. + * @param {number} underline Specifies an underlined font if set to TRUE. + * @param {number} strikeOut A strikeout font if set to TRUE. + * @param {number} charSet Specifies the font's character set. The OEM character set is system-dependent. Fonts with other character sets may exist in the system. An application that uses a font with an unknown character set must not attempt to translate or interpret strings that are to be rendered with that font. + * @param {number} outputPrecision Specifies the desired output precision. The output precision defines how closely the output must match the requested font's height, width, character orientation, escapement, and pitch. + * @param {number} clipPrecision Specifies the desired clipping precision. The clipping precision defines how to clip characters that are partially outside the clipping region. + * @param {number} quality Specifies the font's output quality, which defines how carefully the GDI must attempt to match the logical-font attributes to those of an actual physical font. + * @param {number} pitchAndFamily The pitch and family of the font. + * @param {string} faceName the typeface name, the length of this string must not exceed 32 characters, including the terminating null character. + * @return {boolean} + */ + CreateTextFont(height: number, width: number, escapement: number, orientation: number, weight: number, italic: number, underline: number, strikeOut: number, charSet: number, outputPrecision: number, clipPrecision: number, quality: number, pitchAndFamily: number, faceName: string): boolean; + + /** + * Crops the image of a specified index in buffer. + * @method WebTwain#Crop + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @param {number} left specifies the x-coordinate of the upper-left corner of the rectangle. + * @param {number} top specifies the y-coordinate of the upper-left corner of the rectangle. + * @param {number} right specifies the x-coordinate of the lower-right corner of the rectangle. + * @param {number} bottom specifies the y-coordinate of the lower-right corner of the rectangle. + * @return {boolean} + */ + Crop(sImageIndex: number, left: number, top: number, right: number, bottom: number): boolean; + + /** + * Crops the image of a specified index in buffer to clipboard in DIB format. + * @method WebTwain#CropToClipboard + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @param {number} left specifies the x-coordinate of the upper-left corner of the rectangle. + * @param {number} top specifies the y-coordinate of the upper-left corner of the rectangle. + * @param {number} right specifies the x-coordinate of the lower-right corner of the rectangle. + * @param {number} bottom specifies the y-coordinate of the lower-right corner of the rectangle. + * @return {boolean} + */ + CropToClipboard(sImageIndex: number, left: number, top: number, right: number, bottom: number): boolean; + + /** + * Cuts the image data in the specified area to the system clipboard in DIB format. + * @method WebTwain#CutFrameToClipboard + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @param {number} left specifies the x-coordinate of the upper-left corner of the rectangle. + * @param {number} top specifies the y-coordinate of the upper-left corner of the rectangle. + * @param {number} right specifies the x-coordinate of the lower-right corner of the rectangle. + * @param {number} bottom specifies the y-coordinate of the lower-right corner of the rectangle. + * @return {boolean} + */ + CutFrameToClipboard(sImageIndex: number, left: number, top: number, right: number, bottom: number): boolean; + + /** + * Cuts the image of a specified index in buffer to clipboard in DIB format. + * @method WebTwain#CutToClipboard + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @return {boolean} + */ + CutToClipboard(sImageIndex: number): boolean; + + /** + * Disable the source. If the source's user interface is displayed when the source is enabled, it will be closed. + * @method WebTwain#DisableSource + * @return {boolean} + */ + DisableSource(): boolean; + + /** + * Enables the source to accept image. + * @method WebTwain#EnableSource + * @return {boolean} + */ + EnableSource(): boolean; + + /** + * Clears the specified area of a specified image, and fill the area with the fill color. + * @method WebTwain#Erase + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @param {number} left specifies the x-coordinate of the upper-left corner of the rectangle. + * @param {number} top specifies the y-coordinate of the upper-left corner of the rectangle. + * @param {number} right specifies the x-coordinate of the lower-right corner of the rectangle. + * @param {number} bottom specifies the y-coordinate of the lower-right corner of the rectangle. + * @return {boolean} + */ + Erase(sImageIndex: number, left: number, top: number, right: number, bottom: number): boolean; /** * Downloads an image from the FTP server. @@ -2312,7 +2639,7 @@ interface WebTwain { * @param {string} FTPRemoteFile the name of the file to be downloaded. It should be the relative path of the file on the FTP server. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the download succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the download fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ FTPDownload(FTPServer: string, FTPRemoteFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; @@ -2324,7 +2651,7 @@ interface WebTwain { * @param {string} localFile specify a full path to store the file. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the download succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the download fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ FTPDownloadDirectly(FTPServer: string, FTPRemoteFile: string, localFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; @@ -2336,7 +2663,7 @@ interface WebTwain { * @param {EnumDWT_ImageType} lImageType simage format of the file to be downloaded. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the download succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the download fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ FTPDownloadEx(FTPServer: string, FTPRemoteFile: string, lImageType: EnumDWT_ImageType, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; @@ -2344,11 +2671,11 @@ interface WebTwain { * Uploads the image of a specified index in the buffer to the FTP server. * @method WebTwain#FTPUpload * @param {string} FTPServer the name of the FTP server. - * @param {short} sImageIndex specifies the index of the image in the buffer. The index is 0-based. + * @param {number} sImageIndex specifies the index of the image in the buffer. The index is 0-based. * @param {string} FTPRemoteFile the name of the file to be created on the FTP server. It should be a relative path on the FTP server. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ FTPUpload(FTPServer: string, sImageIndex: number, FTPRemoteFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; @@ -2360,7 +2687,7 @@ interface WebTwain { * @param {string} FTPRemoteFile the name of the file to be created on the FTP server. It should be a relative path on the FTP server. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ FTPUploadDirectly(FTPServer: string, localFile: string, FTPRemoteFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; @@ -2368,12 +2695,12 @@ interface WebTwain { * Uploads the image of a specified index in the buffer to the FTP server as a specified image format. * @method WebTwain#FTPUploadEx * @param {string} FTPServer the name of the FTP server. - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. * @param {string} FTPRemoteFile the name of the file to be created on the FTP server. It should be a relative path on the FTP server. * @param {EnumDWT_ImageType} lImageType the image format of the file to be created on the FTP server. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ FTPUploadEx(FTPServer: string, sImageIndex: number, FTPRemoteFile: string, lImageType: EnumDWT_ImageType, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; @@ -2384,7 +2711,7 @@ interface WebTwain { * @param {string} FTPRemoteFile the name of the image to be uploaded. It should be a relative path on the FTP server. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ FTPUploadAllAsMultiPageTIFF(FTPServer: string, FTPRemoteFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; @@ -2395,7 +2722,7 @@ interface WebTwain { * @param {string} FTPRemoteFile the name of the image to be uploaded. It should be a relative path on the FTP server. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ FTPUploadAllAsPDF(FTPServer: string, FTPRemoteFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; @@ -2406,7 +2733,7 @@ interface WebTwain { * @param {string} FTPRemoteFile the name of the image to be uploaded. It should be a relative path on the FTP server. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ FTPUploadAsMultiPagePDF(FTPServer: string, FTPRemoteFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; @@ -2417,10 +2744,208 @@ interface WebTwain { * @param {string} FTPRemoteFile the name of the image to be uploaded. It should be a relative path on the FTP server. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ FTPUploadAsMultiPageTIFF(FTPServer: string, FTPRemoteFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; + /** + * Sets the Source to eject the current page and advance the next page in the document feeder into the feeder acquire area when IfFeederEnabled is TRUE. + * @method WebTwain#FeedPage + * @return {boolean} + */ + FeedPage(): boolean; + + /** + * Check whether a certain file exists on the local disk. + * @method WebTwain#FileExists + * @param {string} localFile specifies the absolute path of the local file. + * @return {boolean} + */ + FileExists(localFile: string): boolean; + + /** + * Flips the image of a specified index in buffer. + * @method WebTwain#Flip + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @return {boolean} + */ + Flip(sImageIndex: number): boolean; + + /** + * Get the cap item value of the capability specified by Capability property, when the value of the CapType property is TWON_ARRAY or TWON_ENUMERATION. + * @method WebTwain#GetCapItems + * @param {number} index Index is 0-based. It is the index of the cap item. + * @return {number} + */ + GetCapItems(index: number): number; + + /** + * Returns the cap item value of the capability specified by Capability property, when the value of the CapType property is TWON_ARRAY or TWON_ENUMERATION. + * @method WebTwain#GetCapItemsString + * @param {number} index Index is 0-based. It is the index of the cap item. + * @return {string} + */ + GetCapItemsString(index: number): string; + + // Get custom DS data, and returned string is encoded with base64 + /** + * Gets custom DS data, the returned string is base64 encoded. + * @method WebTwain#GetCustomDSDataEx + * @return {string | boolean} + */ + GetCustomDSDataEx(): string | boolean; + + // Get custom DS data, and save the data to the specified file + /** + * Gets custom DS data and save the data in a specified file. + * @method WebTwain#GetCustomDSData + * @param {string} fileName the path of the file used for storing custom DS data. + * @return {boolean} + */ + GetCustomDSData(fileName: string): boolean; + + /** + * Retrieve the device type of the currently selected data source, it might be a scanner, a web camera, etc. + * @method WebTwain#GetDeviceType + * @return {number | boolean} + */ + GetDeviceType(): number | boolean; + + /** + * Returns the pixel bit depth of the selected image. + * @method WebTwain#GetImageBitDepth + * @param {number} sImageIndex specifies the index of image. The index is 0-based. + * @return {number} + */ + GetImageBitDepth(sImageIndex: number): number; + + /** + * Returns the height (pixels) of the selected image. This is a read-only property. + * @method WebTwain#GetImageHeight + * @param {number} sImageIndex specifies the index of image. The index is 0-based. + * @return {number} + */ + GetImageHeight(sImageIndex: number): number; + + /** + * Returns the direct URL of an image specified by index, if iWidth and iHeight are not specified, you get the original image, otherwise you get the image with specified iWidth or iHeight while keeping the same aspect ratio. The returned string is like this 'dwt://dwt_trial_13000404/img?id=306159652&index=0&t=1502184632022' + * @method WebTwain#GetImagePartURL + * @param {number} index the index of the image. + * @param {number} iWidth the width of the image, it must be 150 or bigger + * @param {number} iHeight the height of the image, it must be 150 or bigger + * @return {string} + */ + GetImagePartURL(index: number, iWidth?: number, iHeight?: number): string; + + /** + * Returns the file size of the new image resized from the image of a specified index in buffer. + * @method WebTwain#GetImageSize + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @param {number} iWidth specifies the pixel width of the new image. + * @param {number} iHeight specifies the pixel height of the new image. + * @return {number} + */ + GetImageSize(sImageIndex: number, iWidth: number, iHeight: number): number; + + /** + * Pre-calculate the file size of the local image file that is saved from an image of a specified index in buffer. + * @method WebTwain#GetImageSizeWithSpecifiedType + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @param {EnumDWT_ImageType} sImageType specifies the type of an image file.. + * @return {number} + */ + GetImageSizeWithSpecifiedType(sImageIndex: number, sImageType: EnumDWT_ImageType): number; + + /** + * Returns the direct URL of an image specified by index, if iWidth or iHeight is set to -1, you get the original image, otherwise you get the image with specified iWidth or iHeight while keeping the same aspect ratio. + * @method WebTwain#GetImageURL + * @param {number} index the index of the image. + * @param {number} iWidth the width of the image. + * @param {number} iHeight the height of the image. + * @return {string} + */ + GetImageURL(index: number, iWidth: number, iHeight: number): string; + + /** + * Returns the width (pixels) of the selected image. This is a read-only property. + * @method WebTwain#GetImageWidth + * @param {number} sImageIndex specifies the index of image. The index is 0-based. + * @return {number} + */ + GetImageWidth(sImageIndex: number): number; + + /** + * Return the horizontal resolution of the specified image. + * @method WebTwain#GetImageXResolution + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @return {number} + */ + GetImageXResolution(sImageIndex: number): number; + + /** + * Return the vertical resolution of the specified image. + * @method WebTwain#GetImageYResolution + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @return {number} + */ + GetImageYResolution(sImageIndex: number): number; + + /** + * Return the runtime license info. + * @method WebTwain#GetLicenseInfo + */ + GetLicenseInfo(): { Domain: string, Detail: LicenseDetailItem[] }; + + /** + * Returns the index of the selected image. + * @method WebTwain#GetSelectedImageIndex + * @param {number} sSelectedIndex specifies the index of the selected image. + * @return {number} + */ + GetSelectedImageIndex(sSelectedIndex: number): number; + + /** + * Pre-calculate the file size of the local image file that is saved from the selected images in buffer. + * @method WebTwain#GetSelectedImagesSize + * @param {EnumDWT_ImageType} iImageType specifies the type of an image file. + * @return {number} + */ + GetSelectedImagesSize(iImageType: EnumDWT_ImageType): number; + + /** + * Check the skew angle of an image by its index in buffer. + * @method WebTwain#GetSkewAngle + * @param {number} sImageIndex the index of the image in the buffer. + * @return {number} + */ + GetSkewAngle(sImageIndex: number): number; + + /** + * Check the skew angle of a rectangular part of an image by its index in buffer. + * @method WebTwain#GetSkewAngleEx + * @param {number} sImageIndex the index of the image in the buffer. + * @param {number} left specifies the x-coordinate of the upper-left corner of the rectangle. + * @param {number} top specifies the y-coordinate of the upper-left corner of the rectangle. + * @param {number} right specifies the x-coordinate of the lower-right corner of the rectangle. + * @param {number} bottom specifies the y-coordinate of the lower-right corner of the rectangle. + * @return {number} + */ + GetSkewAngleEx(sImageIndex: number, left: number, top: number, right: number, bottom: number): number; + + /** + * Get the source name according to the source index. + * @method WebTwain#GetSourceNameItems + * @param {number} index number index. Index is 0-based and can not be greater than SourceCount property. + * @return {string} + */ + GetSourceNameItems(index: number): string; + + /*ignored + GetSourceNames + GetSourceType + GetVersionInfoAsync + */ + /** * Downloads an image from the HTTP server. * @method WebTwain#HTTPDownload @@ -2428,7 +2953,7 @@ interface WebTwain { * @param {string} HTTPRemoteFile the name of the image to be downloaded. It should be the relative path of the file on the HTTP server. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the download succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the download fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ HTTPDownload(HTTPServer: string, HTTPRemoteFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; @@ -2440,7 +2965,7 @@ interface WebTwain { * @param {string} localFile specify the location to store the downloaded file. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the download succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the download fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ HTTPDownloadDirectly(HTTPServer: string, HTTPRemoteFile: string, localFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; @@ -2452,10 +2977,15 @@ interface WebTwain { * @param {EnumDWT_ImageType} lImageType the image format of the file to be downloaded. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the download succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the download fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ HTTPDownloadEx(HTTPServer: string, HTTPRemoteFile: string, lImageType: EnumDWT_ImageType, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; + /*ignored + HTTPDownloadStreamThroughPost + HTTPDownloadThroughGet + */ + /** * Download an image from the server using a HTTP Post call. * @method WebTwain#HTTPDownloadThroughPost @@ -2464,187 +2994,19 @@ interface WebTwain { * @param {EnumDWT_ImageType} lImageType the image format of the file to be downloaded. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the download succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the download fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ - HTTPDownloadThroughPost(HTTPServer: string, HTTPRemoteFile: string, lImageType: EnumDWT_ImageType, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; + HTTPDownloadThroughPost(HTTPServer: string, HTTPRemoteFile: string, lImageType: EnumDWT_ImageType, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string, httppostresponsestring: string) => void): boolean; /** - * Uploads the image of a specified index in the buffer to the HTTP server through the HTTP POST method. - * @method WebTwain#HTTPUploadThroughPost - * @param {string} HTTPServer the name of the HTTP server. - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @param {string} ActionPage the specified page for posting image files. This is the relative path of the page, not the absolute path. For example: "upload.asp", not "http://www.webserver.com/upload.asp". - * @param {string} fileName the name of the image to be uploaded. - * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnHttpUploadSuccess. - * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnHttpUploadFailure. - * @return {bool} + * Uploads just a form created by SetHTTPFormField and SetHTTPHeader + * @method WebTwain#HTTPUpload + * @param {string} url the url where the images are sent in a POST request. + * @param {function} asyncSuccessFunc the function to call when the upload succeeds. Please refer to the function prototype OnSuccess. + * @param {function} asyncFailureFunc the function to call when the upload fails. Please refer to the function prototype OnFailure. + * @return {boolean} */ - HTTPUploadThroughPost(HTTPServer: string, sImageIndex: number, ActionPage: string, fileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; - - /** - * Directly upload a specific local file to the HTTP server through the HTTP POST method without loading it into Dynamic Web TWAIN. - * @method WebTwain#HTTPUploadThroughPostDirectly - * @param {string} HTTPServer the name of the HTTP server. - * @param {string} localFile specifies the path of a local file . - * @param {string} ActionPage the specified page for posting files. This is the relative path of the page, not the absolute path. For example: "upload.asp", not "http://www.webserver.com/upload.asp". - * @param {string} fileName the name of the file to be uploaded. - * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnHttpUploadSuccess. - * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnHttpUploadFailure. - * @return {bool} - */ - HTTPUploadThroughPostDirectly(HTTPServer: string, localFile: string, ActionPage: string, fileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; - - /** - * Uploads the image of a specified index in the buffer to the HTTP server as a specified image format through the HTTP POST method. - * @method WebTwain#HTTPUploadThroughPostEx - * @param {string} HTTPServer the name of the HTTP server. - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @param {string} ActionPage the specified page for posting image files. This is the relative path of the page, not the absolute path. For example: "upload.asp", not "http://www.webserver.com/upload.asp". - * @param {string} fileName the name of the image to be uploaded. - * @param {EnumDWT_ImageType} lImageType the image format of the file to be created on the HTTP server.s - * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnHttpUploadSuccess. - * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnHttpUploadFailure. - * @return {bool} - */ - HTTPUploadThroughPostEx(HTTPServer: string, sImageIndex: number, ActionPage: string, fileName: string, lImageType: EnumDWT_ImageType, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; - - /** - * Uploads all images in the buffer to the HTTP server through the HTTP Post method as a Multi-Page TIFF. - * @method WebTwain#HTTPUploadAllThroughPostAsMultiPageTIFF - * @param {string} HTTPServer the name of the HTTP server. - * @param {string} ActionPage the specified page for posting image files. This is the relative path of the page, not the absolute path. For example: "upload.asp", not "http://www.webserver.com/upload.asp". - * @param {string} fileName the name of the image to be uploaded. - * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnHttpUploadSuccess. - * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnHttpUploadFailure. - * @return {bool} - */ - HTTPUploadAllThroughPostAsMultiPageTIFF(HTTPServer: string, ActionPage: string, fileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; - - /** - * Uploads the selected images in the buffer to the HTTP server through the HTTP Post method as a Multi-Page TIFF. - * @method WebTwain#HTTPUploadThroughPostAsMultiPageTIFF - * @param {string} HTTPServer the name of the HTTP server. - * @param {string} ActionPage the specified page for posting image files. This is the relative path of the page, not the absolute path. For example: "upload.asp", not "http://www.webserver.com/upload.asp". - * @param {string} fileName the name of the image to be uploaded. - * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnHttpUploadSuccess. - * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnHttpUploadFailure. - * @return {bool} - */ - HTTPUploadThroughPostAsMultiPageTIFF(HTTPServer: string, ActionPage: string, fileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; - - /** - * Uploads all images in the buffer to the HTTP server through HTTP Post method as a Multi-Page PDF. - * @method WebTwain#HTTPUploadAllThroughPostAsPDF - * @param {string} HTTPServer the name of the HTTP server. - * @param {string} ActionPage the specified page for posting image files. This is the relative path of the page, not the absolute path. For example: "upload.asp", not "http://www.webserver.com/upload.asp". - * @param {string} fileName the name of the image to be uploaded. - * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnHttpUploadSuccess. - * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnHttpUploadFailure. - * @return {bool} - */ - HTTPUploadAllThroughPostAsPDF(HTTPServer: string, ActionPage: string, fileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; - - /** - * Uploads the selected images in the buffer to the HTTP server through the HTTP Post method as a Multi-Page PDF. - * @method WebTwain#HTTPUploadThroughPostAsMultiPagePDF - * @param {string} HTTPServer the name of the HTTP server. - * @param {string} ActionPage the specified page for posting image files. This is the relative path of the page, not the absolute path. For example: "upload.asp", not "http://www.webserver.com/upload.asp". - * @param {string} fileName the name of the image to be uploaded. - * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnHttpUploadSuccess. - * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnHttpUploadFailure. - * @return {bool} - */ - HTTPUploadThroughPostAsMultiPagePDF(HTTPServer: string, ActionPage: string, fileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; - - /** - * [Deprecated.] Directly uploads a specific local file to the HTTP server through the HTTP PUT method without loading it into Dynamic Web TWAIN. - * @method WebTwain#HTTPUploadThroughPutDirectly - * @param {string} HTTPServer the name of the HTTP server. - * @param {string} localFile specifies the path of a local file. - * @param {string} RemoteFileName the name of the file to be created on the HTTP server. It should a relative path on the web server. - * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. - * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. - * @return {bool} - */ - HTTPUploadThroughPutDirectly(HTTPServer: string, localFile: string, RemoteFileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; - - /** - * [Deprecated.] Uploads the image of a specified index in the buffer to the HTTP server through the HTTP PUT method. - * @method WebTwain#HTTPUploadThroughPut - * @param {string} HTTPServer the name of the HTTP server. - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @param {string} RemoteFileName the name of the image to be created on the HTTP server. It should a relative path on the web server. - * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. - * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. - * @return {bool} - */ - HTTPUploadThroughPut(HTTPServer: string, sImageIndex: number, RemoteFileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; - - /** - * [Deprecated.] Uploads the image of a specified index in the buffer to the HTTP server as a specified image format through the HTTP PUT method. - * @method WebTwain#HTTPUploadThroughPutEx - * @param {string} HTTPServer the name of the HTTP server. - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @param {string} RemoteFileName the name of the file to be created on the HTTP server. It should a relative path on the web server. - * @param {EnumDWT_ImageType} lImageType the image format of the file to be created on the HTTP server. - * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. - * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. - * @return {bool} - */ - HTTPUploadThroughPutEx(HTTPServer: string, sImageIndex: number, RemoteFileName: string, lImageType: EnumDWT_ImageType, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; - - /** - * [Deprecated.] Uploads all images in the buffer to the HTTP server through the HTTP Put method as a Multi-Page TIFF. - * @method WebTwain#HTTPUploadAllThroughPutAsMultiPageTIFF - * @param {string} HTTPServer the name of the HTTP server. - * @param {string} RemoteFileName the name of the image to be uploaded. - * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. - * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. - * @return {bool} - */ - HTTPUploadAllThroughPutAsMultiPageTIFF(HTTPServer: string, RemoteFileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; - - /** - * [Deprecated.] Uploads the selected images in the buffer to the HTTP server through the HTTP Put method as a Multi-Page TIFF. - * @method WebTwain#HTTPUploadThroughPutAsMultiPageTIFF - * @param {string} HTTPServer the name of the HTTP server. - * @param {string} RemoteFileName the name of the image to be uploaded. - * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. - * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. - * @return {bool} - */ - HTTPUploadThroughPutAsMultiPageTIFF(HTTPServer: string, RemoteFileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; - - /** - * [Deprecated.] Uploads all images in the buffer to the HTTP server through the HTTP Put method as a Multi-Page PDF. - * @method WebTwain#HTTPUploadAllThroughPutAsPDF - * @param {string} HTTPServer the name of the HTTP server. - * @param {string} RemoteFileName the name of the image to be uploaded. - * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. - * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. - * @return {bool} - */ - HTTPUploadAllThroughPutAsPDF(HTTPServer: string, RemoteFileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; - - /** - * [Deprecated.] Uploads the selected images in the buffer to the HTTP server through the HTTP Put method as a Multi-Page PDF. - * @method WebTwain#HTTPUploadThroughPutAsMultiPagePDF - * @param {string} HTTPServer the name of the HTTP server. - * @param {string} RemoteFileName the name of the image to be uploaded. - * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. - * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. - * @return {bool} - */ - HTTPUploadThroughPutAsMultiPagePDF(HTTPServer: string, RemoteFileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; - - /** - * Configures how segmented upload is done. - * @method WebTwain#SetUploadSegment - * @param {int} segmentUploadThreshold specifies the threshold (in MB) over which segmented upload will be invoked. - * @param {int} moduleSize specifies the size of each segment (in KB). - * @return {bool} - */ - SetUploadSegment (segmentUploadThreshold: number, moduleSize: number): boolean; + HTTPUpload(url: string, asyncSuccessFunc: (httppostresponsestring: string) => void, asyncFailureFunc: (errorCode: number, errorString: string, httppostresponsestring: string) => void): boolean; /** * Uploads the images specified by the indices to the HTTP server. @@ -2655,16 +3017,218 @@ interface WebTwain { * @param {EnumDWT_UploadDataFormat} dataFormat whether to upload the images as binary or a base64-based string. * @param {function} asyncSuccessFunc the function to call when the upload succeeds. Please refer to the function prototype OnSuccess. * @param {function} asyncFailureFunc the function to call when the upload fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ - HTTPUpload (url: string, indices: number[], enumImageType: EnumDWT_ImageType, dataFormat: EnumDWT_UploadDataFormat, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; + HTTPUpload(url: string, indices: number[], enumImageType: EnumDWT_ImageType, dataFormat: EnumDWT_UploadDataFormat, asyncSuccessFunc: (httppostresponsestring: string) => void, asyncFailureFunc: (errorCode: number, errorString: string, httppostresponsestring: string) => void): boolean; + + /** + * Uploads all images in the buffer to the HTTP server through the HTTP Post method as a Multi-Page TIFF. + * @method WebTwain#HTTPUploadAllThroughPostAsMultiPageTIFF + * @param {string} HTTPServer the name of the HTTP server. + * @param {string} ActionPage the specified page for posting image files. This is the relative path of the page, not the absolute path. For example: "upload.asp", not "http://www.webserver.com/upload.asp". + * @param {string} fileName the name of the image to be uploaded. + * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnHttpUploadSuccess. + * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnHttpUploadFailure. + * @return {boolean} + */ + HTTPUploadAllThroughPostAsMultiPageTIFF(HTTPServer: string, ActionPage: string, fileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string, httppostresponsestring: string) => void): boolean; + + /** + * Uploads all images in the buffer to the HTTP server through HTTP Post method as a Multi-Page PDF. + * @method WebTwain#HTTPUploadAllThroughPostAsPDF + * @param {string} HTTPServer the name of the HTTP server. + * @param {string} ActionPage the specified page for posting image files. This is the relative path of the page, not the absolute path. For example: "upload.asp", not "http://www.webserver.com/upload.asp". + * @param {string} fileName the name of the image to be uploaded. + * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnHttpUploadSuccess. + * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnHttpUploadFailure. + * @return {boolean} + */ + HTTPUploadAllThroughPostAsPDF(HTTPServer: string, ActionPage: string, fileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string, httppostresponsestring: string) => void): boolean; + + /** + * [Deprecated.] Uploads all images in the buffer to the HTTP server through the HTTP Put method as a Multi-Page TIFF. + * @method WebTwain#HTTPUploadAllThroughPutAsMultiPageTIFF + * @param {string} HTTPServer the name of the HTTP server. + * @param {string} RemoteFileName the name of the image to be uploaded. + * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. + * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. + * @return {boolean} + */ + HTTPUploadAllThroughPutAsMultiPageTIFF(HTTPServer: string, RemoteFileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; + + /** + * [Deprecated.] Uploads all images in the buffer to the HTTP server through the HTTP Put method as a Multi-Page PDF. + * @method WebTwain#HTTPUploadAllThroughPutAsPDF + * @param {string} HTTPServer the name of the HTTP server. + * @param {string} RemoteFileName the name of the image to be uploaded. + * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. + * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. + * @return {boolean} + */ + HTTPUploadAllThroughPutAsPDF(HTTPServer: string, RemoteFileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; + + /*ignored + HTTPUploadStreamThroughPost + */ + + /** + * Uploads the image of a specified index in the buffer to the HTTP server through the HTTP POST method. + * @method WebTwain#HTTPUploadThroughPost + * @param {string} HTTPServer the name of the HTTP server. + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @param {string} ActionPage the specified page for posting image files. This is the relative path of the page, not the absolute path. For example: "upload.asp", not "http://www.webserver.com/upload.asp". + * @param {string} fileName the name of the image to be uploaded. + * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnHttpUploadSuccess. + * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnHttpUploadFailure. + * @return {boolean} + */ + HTTPUploadThroughPost(HTTPServer: string, sImageIndex: number, ActionPage: string, fileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string, httppostresponsestring: string) => void): boolean; + + /** + * Uploads the selected images in the buffer to the HTTP server through the HTTP Post method as a Multi-Page TIFF. + * @method WebTwain#HTTPUploadThroughPostAsMultiPageTIFF + * @param {string} HTTPServer the name of the HTTP server. + * @param {string} ActionPage the specified page for posting image files. This is the relative path of the page, not the absolute path. For example: "upload.asp", not "http://www.webserver.com/upload.asp". + * @param {string} fileName the name of the image to be uploaded. + * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnHttpUploadSuccess. + * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnHttpUploadFailure. + * @return {boolean} + */ + HTTPUploadThroughPostAsMultiPageTIFF(HTTPServer: string, ActionPage: string, fileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string, httppostresponsestring: string) => void): boolean; + + /** + * Uploads the selected images in the buffer to the HTTP server through the HTTP Post method as a Multi-Page PDF. + * @method WebTwain#HTTPUploadThroughPostAsMultiPagePDF + * @param {string} HTTPServer the name of the HTTP server. + * @param {string} ActionPage the specified page for posting image files. This is the relative path of the page, not the absolute path. For example: "upload.asp", not "http://www.webserver.com/upload.asp". + * @param {string} fileName the name of the image to be uploaded. + * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnHttpUploadSuccess. + * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnHttpUploadFailure. + * @return {boolean} + */ + HTTPUploadThroughPostAsMultiPagePDF(HTTPServer: string, ActionPage: string, fileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string, httppostresponsestring: string) => void): boolean; + + /** + * Directly upload a specific local file to the HTTP server through the HTTP POST method without loading it into Dynamic Web TWAIN. + * @method WebTwain#HTTPUploadThroughPostDirectly + * @param {string} HTTPServer the name of the HTTP server. + * @param {string} localFile specifies the path of a local file . + * @param {string} ActionPage the specified page for posting files. This is the relative path of the page, not the absolute path. For example: "upload.asp", not "http://www.webserver.com/upload.asp". + * @param {string} fileName the name of the file to be uploaded. + * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnHttpUploadSuccess. + * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnHttpUploadFailure. + * @return {boolean} + */ + HTTPUploadThroughPostDirectly(HTTPServer: string, localFile: string, ActionPage: string, fileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string, httppostresponsestring: string) => void): boolean; + + /** + * Uploads the image of a specified index in the buffer to the HTTP server as a specified image format through the HTTP POST method. + * @method WebTwain#HTTPUploadThroughPostEx + * @param {string} HTTPServer the name of the HTTP server. + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @param {string} ActionPage the specified page for posting image files. This is the relative path of the page, not the absolute path. For example: "upload.asp", not "http://www.webserver.com/upload.asp". + * @param {string} fileName the name of the image to be uploaded. + * @param {EnumDWT_ImageType} lImageType the image format of the file to be created on the HTTP server.s + * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnHttpUploadSuccess. + * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnHttpUploadFailure. + * @return {boolean} + */ + HTTPUploadThroughPostEx(HTTPServer: string, sImageIndex: number, ActionPage: string, fileName: string, lImageType: EnumDWT_ImageType, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string, httppostresponsestring: string) => void): boolean; + + /** + * [Deprecated.] Uploads the image of a specified index in the buffer to the HTTP server through the HTTP PUT method. + * @method WebTwain#HTTPUploadThroughPut + * @param {string} HTTPServer the name of the HTTP server. + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @param {string} RemoteFileName the name of the image to be created on the HTTP server. It should a relative path on the web server. + * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. + * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. + * @return {boolean} + */ + HTTPUploadThroughPut(HTTPServer: string, sImageIndex: number, RemoteFileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; + + /** + * [Deprecated.] Uploads the selected images in the buffer to the HTTP server through the HTTP Put method as a Multi-Page TIFF. + * @method WebTwain#HTTPUploadThroughPutAsMultiPageTIFF + * @param {string} HTTPServer the name of the HTTP server. + * @param {string} RemoteFileName the name of the image to be uploaded. + * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. + * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. + * @return {boolean} + */ + HTTPUploadThroughPutAsMultiPageTIFF(HTTPServer: string, RemoteFileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; + + /** + * [Deprecated.] Uploads the selected images in the buffer to the HTTP server through the HTTP Put method as a Multi-Page PDF. + * @method WebTwain#HTTPUploadThroughPutAsMultiPagePDF + * @param {string} HTTPServer the name of the HTTP server. + * @param {string} RemoteFileName the name of the image to be uploaded. + * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. + * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. + * @return {boolean} + */ + HTTPUploadThroughPutAsMultiPagePDF(HTTPServer: string, RemoteFileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; + + /** + * [Deprecated.] Directly uploads a specific local file to the HTTP server through the HTTP PUT method without loading it into Dynamic Web TWAIN. + * @method WebTwain#HTTPUploadThroughPutDirectly + * @param {string} HTTPServer the name of the HTTP server. + * @param {string} localFile specifies the path of a local file. + * @param {string} RemoteFileName the name of the file to be created on the HTTP server. It should a relative path on the web server. + * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. + * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. + * @return {boolean} + */ + HTTPUploadThroughPutDirectly(HTTPServer: string, localFile: string, RemoteFileName: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; + + /** + * [Deprecated.] Uploads the image of a specified index in the buffer to the HTTP server as a specified image format through the HTTP PUT method. + * @method WebTwain#HTTPUploadThroughPutEx + * @param {string} HTTPServer the name of the HTTP server. + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @param {string} RemoteFileName the name of the file to be created on the HTTP server. It should a relative path on the web server. + * @param {EnumDWT_ImageType} lImageType the image format of the file to be created on the HTTP server. + * @param {function} optionalAsyncSuccessFunc optional. The function to call when the upload succeeds. Please refer to the function prototype OnSuccess. + * @param {function} optionalAsyncFailureFunc optional. The function to call when the upload fails. Please refer to the function prototype OnFailure. + * @return {boolean} + */ + HTTPUploadThroughPutEx(HTTPServer: string, sImageIndex: number, RemoteFileName: string, lImageType: EnumDWT_ImageType, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; + + /** + * [Deprecated.] Detects whether an image is blank. + * @method WebTwain#IsBlankImage + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @return {boolean} + */ + IsBlankImage(sImageIndex: number): boolean; + + /** + * [Deprecated.] Detects whether a certain area on an image is blank. + * @method WebTwain#IsBlankImageEx + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @param {number} left specifies the x-coordinate of the upper-left corner of the rectangle. + * @param {number} top specifies the y-coordinate of the upper-left corner of the rectangle. + * @param {number} right specifies the x-coordinate of the lower-right corner of the rectangle. + * @param {number} bottom specifies the y-coordinate of the lower-right corner of the rectangle. + * @param {boolean} bFuzzyMatch specifies whether use fuzzy matching when detecting. + * @return {boolean} + */ + IsBlankImageEx(sImageIndex: number, left: number, top: number, right: number, bottom: number, bFuzzyMatch: boolean): boolean; + + /** + * Detects whether a specific image is blank. + * @method WebTwain#IsBlankImageExpress + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @return {boolean} + */ + IsBlankImageExpress(sImageIndex: number): boolean; /** * Loads a DIB format image from Clipboard into the Dynamic Web TWAIN. * @method WebTwain#LoadDibFromClipboard * @param {function} optionalAsyncSuccessFunc optional. The function to call when the loading succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the loading fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ LoadDibFromClipboard(optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; @@ -2674,7 +3238,7 @@ interface WebTwain { * @param {string} localFile the name of the image to be loaded. It should be the absolute path of the image file on the local disk. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the loading succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the loading fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ LoadImage(localFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; @@ -2685,7 +3249,7 @@ interface WebTwain { * @param {EnumDWT_ImageType} lImageType the image format of the file to be loaded. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the loading succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the loading fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ LoadImageEx(localFile: string, lImageType: EnumDWT_ImageType, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; @@ -2694,27 +3258,169 @@ interface WebTwain { * @method WebTwain#LoadImageFromBase64Binary * @param {string} bry specifies the base64 string data. * @param {EnumDWT_ImageType} lImageType specifies the file format. - * @return {bool} + * @return {boolean} */ - LoadImageFromBase64Binary(bry: string, lImageType: EnumDWT_ImageType): boolean; + LoadImageFromBase64Binary(bry: string, lImageType: EnumDWT_ImageType, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; /** * [Deprecated.] Loads image from a byte array with the specified file format. * @method WebTwain#LoadImageFromBytes - * @param {int} lBufferSize Specifies the buffer size. + * @param {number} lBufferSize Specifies the buffer size. * @param {Array} buffer A byte array of the image data. * @param {EnumDWT_ImageType} lImageType Specifies the file format. - * @return {bool} + * @return {boolean} */ LoadImageFromBytes(lBufferSize: number, buffer: number[], lImageType: EnumDWT_ImageType): boolean; + /** + * Mirrors the image of a specified index in buffer. + * @method WebTwain#Mirror + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @return {boolean} + */ + Mirror(sImageIndex: number): boolean; + + /** + * Moves a specified image. + * @method WebTwain#MoveImage + * @param {number} sSourceImageIndex Specifies the source index of image in buffer. The index is 0-based. + * @param {number} sTargetImageIndex Specifies the target index of image in buffer. The index is 0-based. + * @return {boolean} + */ + MoveImage(sSourceImageIndex: number, sTargetImageIndex: number): boolean; + + /*ignored + OnRefreshUI + */ + + /** + * Loads the specified Source into main memory and causes its initialization, + * placing Dynamic Web TWAIN into Capability Negotiation state. If no source is + * specified (no SelectSource() or SelectSourceByIndex() is called), opens the default source. + * @method WebTwain#OpenSource + * @return {boolean} + */ + OpenSource(): boolean; + + /** + * Loads and opens Data Source Manager. + * @method WebTwain#OpenSourceManager + * @return {boolean} + */ + OpenSourceManager(): boolean; + + /** + * Decorates image of a specified index in buffer with rectangles of transparent color. + * @method WebTwain#OverlayRectangle + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @param {number} left specifies the x-coordinate of the upper-left corner of the rectangle. + * @param {number} top specifies the y-coordinate of the upper-left corner of the rectangle. + * @param {number} right specifies the x-coordinate of the lower-right corner of the rectangle. + * @param {number} bottom specifies the y-coordinate of the lower-right corner of the rectangle. + * @param {number} color Specifies the fill color of the rectangle. The byte-ordering of the RGB value is 0xBBGGRR. BB represents blue, GG represents green, RR represents red. + * @param {number} fOpacity Specifies the opacity of the rectangle. The value represents opacity. 1.0 is 100% opaque and 0.0 is totally transparent. + * @return {boolean} + */ + OverlayRectangle(sImageIndex: number, left: number, top: number, right: number, bottom: number, color: number, fOpacity: number): boolean; + + /** + * Shows the GUI of Image Printer. + * @method WebTwain#Print + * @param {boolean} bUseSystemDefaultPrintUI specifies whether to use the system Print UI or not. + * @return {boolean} + */ + Print(bUseSystemDefaultPrintUI: boolean): boolean; + + /** + * Binds a specified function to an event, so that the function gets called whenever the event fires. + * @method WebTwain#RegisterEvent + * @param {string} name the name of the event that the function is bound to. + * @param {any} evt specifies the function to call when event fires. + * @return {boolean} + */ + RegisterEvent(name: string, evt: any): boolean; + + /** + * Removes all images in buffer. + * @method WebTwain#RemoveAllImages + * @return {boolean} + */ + RemoveAllImages(): boolean; + + /** + * Removes selected images in buffer. + * @method WebTwain#RemoveAllSelectedImages + * @return {boolean} + */ + RemoveAllSelectedImages(): boolean; + + /** + * Removes the image of a specified index in buffer. + * @method WebTwain#RemoveImage + * @param {number} sImageIndexToBeDeleted specifies the index of the image to be deleted in buffer. The index is 0-based. + * @return {boolean} + */ + RemoveImage(sImageIndexToBeDeleted: number): boolean; + + /** + * Reverts the current image layout to the Data Source's default. + * @method WebTwain#ResetImageLayout + * @return {boolean} + */ + ResetImageLayout(): boolean; + + /** + * Sets the Source to return the current page to the input side of the document feeder and + * feed the last page from the outside of the feeder back into the acquisition area if IfFeederEnabled is TRUE. + * @method WebTwain#RewindPage + * @return {boolean} + */ + RewindPage(): boolean; + + /** + * Rotates the image of a specified index in buffer by specified angle. + * @method WebTwain#Rotate + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @param {number} fAngle Specifies the rotation angle. + * @param {boolean} bKeepSize Keep size or not. + * @return {boolean} + */ + Rotate(sImageIndex: number, fAngle: number, bKeepSize: boolean): boolean; + + /** + * Rotates the image of a specified index in buffer by specified angle. + * @method WebTwain#RotateEx + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @param {number} fAngle Specifies the rotation angle. + * @param {boolean} bKeepSize Keep size or not. + * @param {EnumDWT_InterpolationMethod} newVal specifies the method to do interpolation. + * @return {boolean} + */ + RotateEx(sImageIndex: number, fAngle: number, bKeepSize: boolean, newVal: EnumDWT_InterpolationMethod): boolean; + + /** + * Rotates the image of a specified index in buffer by 90 degrees counter-clockwise. + * @method WebTwain#RotateLeft + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @return {boolean} + */ + RotateLeft(sImageIndex: number): boolean; + + /** + * Rotates the image of a specified index in buffer by 90 degrees clockwise. + * @method WebTwain#RotateRight + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @return {boolean} + */ + RotateRight(sImageIndex: number): boolean; + /** * Saves all images in buffer as a MultiPage TIFF file. * @method WebTwain#SaveAllAsMultiPageTIFF * @param {string} localFile the name of the MultiPage TIFF file to be saved. It should be an absolute path on the local disk. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the saving succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the saving fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ SaveAllAsMultiPageTIFF(localFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; @@ -2724,7 +3430,7 @@ interface WebTwain { * @param {string} localFile the name of the Multi-Page PDF file to be saved. It should be an absolute path on the local disk. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the saving succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the saving fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ SaveAllAsPDF(localFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; @@ -2732,46 +3438,50 @@ interface WebTwain { * Saves the image of a specified index in buffer as a BMP file. * @method WebTwain#SaveAsBMP * @param {string} localFile the name of the BMP file to be saved. It should be an absolute path on the local disk. - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @return {bool} + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @return {boolean} */ - SaveAsBMP(localFile: string, sImageIndex: number): boolean; + SaveAsBMP(localFile: string, sImageIndex: number, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; + + /*ignored + SaveAsGIF + */ /** * Saves the image of a specified index in buffer as a JPEG file. * @method WebTwain#SaveAsJPEG * @param {string} localFile the name of the JPEG file to be saved. It should be an absolute path on the local disk. - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @return {bool} + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @return {boolean} */ - SaveAsJPEG(localFile: string, sImageIndex: number): boolean; + SaveAsJPEG(localFile: string, sImageIndex: number, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; /** * Saves the image of a specified index in buffer as a PDF file. * @method WebTwain#SaveAsPDF * @param {string} localFile the name of the JPEG file to be saved. It should be an absolute path on the local disk. - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @return {bool} + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @return {boolean} */ - SaveAsPDF(localFile: string, sImageIndex: number): boolean; + SaveAsPDF(localFile: string, sImageIndex: number, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; /** * Saves the image of a specified index in buffer as a PNG file. * @method WebTwain#SaveAsPNG * @param {string} localFile the name of the JPEG file to be saved. It should be an absolute path on the local disk. - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @return {bool} + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @return {boolean} */ - SaveAsPNG(localFile: string, sImageIndex: number): boolean; + SaveAsPNG(localFile: string, sImageIndex: number, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; /** * Saves the image of a specified index in buffer as a TIFF file. * @method WebTwain#SaveAsTIFF * @param {string} localFile the name of the JPEG file to be saved. It should be an absolute path on the local disk. - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @return {bool} + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @return {boolean} */ - SaveAsTIFF(localFile: string, sImageIndex: number): boolean; + SaveAsTIFF(localFile: string, sImageIndex: number, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; /** * Saves the selected images in buffer as a Multipage PDF file. @@ -2779,7 +3489,7 @@ interface WebTwain { * @param {string} localFile the name of the MultiPage PDF file to be saved. It should be an absolute path on the local disk. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the saving succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the saving fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ SaveSelectedImagesAsMultiPagePDF(localFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; @@ -2789,26 +3499,64 @@ interface WebTwain { * @param {string} localFile the name of the MultiPage TIFF file to be saved. It should be an absolute path on the local disk. * @param {function} optionalAsyncSuccessFunc optional. The function to call when the saving succeeds. Please refer to the function prototype OnSuccess. * @param {function} optionalAsyncFailureFunc optional. The function to call when the saving fails. Please refer to the function prototype OnFailure. - * @return {bool} + * @return {boolean} */ SaveSelectedImagesAsMultiPageTIFF(localFile: string, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; /** * Saves the selected images in buffer to base64 string. * @method WebTwain#SaveSelectedImagesToBase64Binary - * @return {string} + * @return {string|boolean} */ - SaveSelectedImagesToBase64Binary(): string; + SaveSelectedImagesToBase64Binary(optionalAsyncSuccessFunc?: (result: string[]) => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): string | boolean; /** * [Deprecated.] Saves the selected images in buffer to a byte array in the specified file format. * @method WebTwain#SaveSelectedImagesToBytes - * @param {int} bufferSize specified the buffer size. + * @param {number} bufferSize specified the buffer size. * @param {Array} buffer A byte array of the image data. - * @return {int} + * @return {number} */ SaveSelectedImagesToBytes(bufferSize: number, buffer: number[]): number; + /** + * Brings up the TWAIN Data Source Manager's Source Selection User Interface (UI) + * so that user can choose which Data Source to be the current Source. + * @method WebTwain#SelectSource + * @return {boolean} + */ + SelectSource(): boolean; + + /** + * Selects the index-the source in SourceNameItems property as the current source. + * @method WebTwain#SelectSourceByIndex + * @param {number} index It is the index of SourceNameItems property. + * @return {boolean} + */ + SelectSourceByIndex(index: number): boolean; + + /*ignored + SetCancel + */ + + /** + * Set the value of the specified cap item. + * @method WebTwain#SetCapItems + * @param {number} index Index is 0-based. It is the index of the cap item. + * @param {number} newVal For string type, please use CapItemsstring property. + * @return {void} + */ + SetCapItems(index: number, newVal: number): void; + + /** + * Set the cap item value of the capability specified by Capability property, when the value of the CapType property is TWON_ARRAY or TWON_ENUMERATION. + * @method WebTwain#SetCapItemsString + * @param {number} index Index is 0-based. It is the index of the cap item. + * @param {string} newVal The new value to be set. + * @return {void} + */ + SetCapItemsString(index: number, newVal: string): void; + /** * [Deprecated.] Sets current cookie into the Http Header to be used when uploading scanned images through POST. * @method WebTwain#SetCookie @@ -2817,582 +3565,12 @@ interface WebTwain { */ SetCookie(cookie: string): void; - /** - * Sets a text parameter as a filed in a web form. This form is maintained by the component itself (meaning it's not on the page). All fields in this form will be passed to the server when uploading images. - * @method WebTwain#SetHTTPFormField - * @param {string} FieldName specifies the name of a text field in web form. - * @param {string} FieldValue specifies the value of a text field in web form. - * @return {bool} - */ - SetHTTPFormField(FieldName: string, FieldValue: string): boolean; - - /** - * Sets a custom tiff tag. Currently you can set up to 32 tags. The string to be set in a tag can be encoded with base64. - * @method WebTwain#SetTiffCustomTag - * @param {int} tag specifies the tag identifier. The value should be between 600 and 700. - * @param {string} content the string to be set for this tag. The string will be written to the .tiff file when you save/upload it. If the string is base64 encoded, we'll decode it before writing it. - * @param {bool} base64Str if you'd like to encode the string with base64, set this to true. Otherwise, the string will be plin text. - * @return {bool} - */ - SetTiffCustomTag(tag: number, content: string, base64Str: boolean): boolean; - - /** - * Show save file dialog or show open file dialog. - * @method WebTwain#ShowFileDialog - * @param {bool} SaveDialog True -- show save file dialog, False -- show open file dialog. - * @param {string} Filter The filter name specifies the filter pattern (for example, "*.TXT"). To specify multiple filter patterns for a single display string, use a semicolon to separate the patterns (for example, "*.TXT;*.DOC;*.BAK"). A pattern string can be a combination of valid file name characters and the asterisk (*) wildcard character. Do not include spaces in the pattern string. To retrieve a shortcut's target without filtering, use the string "All Files\0*.*\0\0", but the program will replace "\0" with "|" automatically. - * @param {int} FilterIndex The index of the currently selected filter in the File Types control. The buffer pointed to by Filter contains pairs of strings that define the filters. The index is 0-based. - * @param {string} DefExtension Define the default extension. GetOpenFileName and GetSaveFileName append this extension to the file name only if the user fails to type an extension. If this member is NULL and the user fails to type an extension, no extension is appended. - * @param {string} InitialDir The initial directory. The algorithm for selecting the initial directory varies on different platforms. - * @param {bool} AllowMultiSelect True -- allows users to select more than one file, False -- only allows to select one file. - * @param {bool} OverwritePrompt True -- If a file already exists with the same name, the old file will be simply overwritten, False -- not allows to save and overwrite a same name file. - * @param {int} Flags If this parameter equals 0, the program will be initiated with the default flags, otherwise initiated with the cumstom value and paramters "AllowMultiSelect" and "OverwritePrompt" will be useless. - * @return {bool} - */ - ShowFileDialog(SaveDialog: boolean, Filter: string, FilterIndex: number, DefExtension: string, InitialDir: string, AllowMultiSelect: boolean, OverwritePrompt: boolean, Flags: number): boolean; - - /** - * Gets information of the capability specified by the Capability property. - * @method WebTwain#CapGet - * @return {bool} - */ - CapGet(): boolean; - - /** - * Returns the Source's current Value for the specified capability. - * @method WebTwain#CapGetCurrent - * @return {bool} - */ - CapGetCurrent(): boolean; - - /** - * Returns the Source's Default Value for the specified capability. This is the Source's preferred default value. - * @method WebTwain#CapGetDefault - * @return {bool} - */ - CapGetDefault(): boolean; - - /** - * Returns the value of the bottom-most edge of the specified frame. - * @method WebTwain#CapGetFrameBottom - * @param {short} index specifies the value of which frame to get. The index is 0-based. - * @return {float} - */ - CapGetFrameBottom(index: number): number; - - /** - * Returns the value (in Unit) of the left-most edge of the specified frame. - * @method WebTwain#CapGetFrameLeft - * @param {short} index specifies the value of which frame to get. The index is 0-based. - * @return {float} - */ - CapGetFrameLeft(index: number): number; - - /** - * Returns the value (in Unit) of the left-most edge of the specified frame. - * @method WebTwain#CapGetFrameRight - * @param {short} index specifies the value of which frame to get. The index is 0-based. - * @return {float} - */ - CapGetFrameRight(index: number): number; - - /** - * Returns the value (in Unit) of the top-most edge of the specified frame. - * @method WebTwain#CapGetFrameTop - * @param {short} index specifies the value of which frame to get. The index is 0-based. - * @return {float} - */ - CapGetFrameTop(index: number): number; - - /** - * Queries whether the Source supports a particular operation on the capability. - * @method WebTwain#CapIfSupported - * @param {EnumDWT_MessageType} messageType specifies the type of capability operation. - * @return {bool} - */ - CapIfSupported(messageType: EnumDWT_MessageType): boolean; - - /** - * Changes the Current Value of the capability specified by Capability property back to its power-on value. - * @method WebTwain#CapReset - * @return {bool} - */ - CapReset(): boolean; - - /** - * Sets the current capability using the container type specified by CapType property. The current capability is specified by Capability property. - * @method WebTwain#CapSet - * @return {bool} - */ - CapSet(): boolean; - - /** - * Sets the values of the specified frame. - * @method WebTwain#CapSetFrame - * @param {short} index specifies the values of which frame to set. The index is 0-based. - * @param {float} left the value (in Unit) of the left-most edge of the specified frame. - * @param {float} top the value (in Unit) of the top-most edge of the specified frame. - * @param {float} right the value (in Unit) of the right-most edge of the specified frame. - * @param {float} bottom the value (in Unit) of the bottom-most edge of the specified frame. - * @return {bool} - */ - CapSetFrame(index: number, left: number, top: number, right: number, bottom: number): boolean; - - /** - * Get the cap item value of the capability specified by Capability property, when the value of the CapType property is TWON_ARRAY or TWON_ENUMERATION. - * @method WebTwain#GetCapItems - * @param {int} index Index is 0-based. It is the index of the cap item. - * @return {double} - */ - GetCapItems(index: number): number; - - /** - * Returns the cap item value of the capability specified by Capability property, when the value of the CapType property is TWON_ARRAY or TWON_ENUMERATION. - * @method WebTwain#GetCapItemsString - * @param {int} index Index is 0-based. It is the index of the cap item. - * @return {string} - */ - GetCapItemsString(index: number): string; - - /** - * Set the value of the specified cap item. - * @method WebTwain#SetCapItems - * @param {int} index Index is 0-based. It is the index of the cap item. - * @param {double} newVal The Double type of CapItems property is used to present Double, Single(float), Long, int and even boolean types. For string type, please use CapItemsstring property. - * @return {void} - */ - SetCapItems(index: number, newVal: number): void; - - /** - * Set the cap item value of the capability specified by Capability property, when the value of the CapType property is TWON_ARRAY or TWON_ENUMERATION. - * @method WebTwain#SetCapItemsString - * @param {int} index Index is 0-based. It is the index of the cap item. - * @param {string} newVal The new value to be set. - * @return {void} - */ - SetCapItemsString(index: number, newVal: string): void; - // --- SCAN end -- - - // --- View & Edit start -- - - /** - * Add text on an image. - * @method WebTwain#AddText - * @param {short} sImageIndex the index of the image that you want to add text to. - * @param {int} x the x coordinate for the text. - * @param {int} y the y coordinate for the text. - * @param {string} text the content of the text that you want to add. - * @param {int} txtColor the color for the text. - * @param {int} backgroundColor the background color. - * @param {float} backgroundRoundRadius ranging from 0 to 0.5. Please NOTE that MAC version does not support this parameter. - * @param {float} backgroundOpacity specifies the opacity of the background of the added text, it ranges from 0 to 1.0. Please NOTE that Mac version only supports value 0 and 1 - * @return {bool} - */ - AddText(sImageIndex: number, x: number, y: number, text: string, txtColor: number, backgroundColor: number, backgroundRoundRadius: number, backgroundOpacity: number): boolean; - - /** - * Create the font for adding text using the method AddText. - * @method WebTwain#CreateTextFont - * @param {int} height Specifies the desired height (in logical units) of the font.The absolute value of nHeight must not exceed 16,384 device units after it is converted.For all height comparisons, the font mapper looks for the largest font that does not exceed the requested size or the smallest font if all the fonts exceed the requested size. - * @param {int} width Specifies the average width (in logical units) of characters in the font. If Width is 0, the aspect ratio of the device will be matched against the digitization aspect ratio of the available fonts to find the closest match, which is determined by the absolute value of the difference. - * @param {int} escapement Specifies the angle (in 0.1-degree units) between the escapement vector and the x-axis of the display surface. The escapement vector is the line through the origins of the first and last characters on a line. The angle is measured counterclockwise from the x-axis. - * @param {int} orientation Specifies the angle (in 0.1-degree units) between the baseline of a character and the x-axis.The angle is measured counterclockwise from the x-axis for coordinate systems in which the y-direction is down and clockwise from the x-axis for coordinate systems in which the y-direction is up. - * @param {int} weight Specifies the font weight (in inked pixels per 1000). The described valuesare approximate; the actual appearance depends on the typeface. Some fonts haveonly FW_NORMAL, FW_REGULAR, and FW_BOLD weights. If FW_DONTCARE is specified, a default weight is used. - * @param {short} italic Specifies an italic font if set to TRUE. - * @param {short} underline Specifies an underlined font if set to TRUE. - * @param {short} strikeOut A strikeout font if set to TRUE. - * @param {short} charSet Specifies the font's character set. The OEM character set is system-dependent. Fonts with other character sets may exist in the system. An application that uses a font with an unknown character set must not attempt to translate or interpret strings that are to be rendered with that font. - * @param {short} outputPrecision Specifies the desired output precision. The output precision defines how closely the output must match the requested font's height, width, character orientation, escapement, and pitch. - * @param {short} clipPrecision Specifies the desired clipping precision. The clipping precision defines how to clip characters that are partially outside the clipping region. - * @param {short} quality Specifies the font's output quality, which defines how carefully the GDI must attempt to match the logical-font attributes to those of an actual physical font. - * @param {short} pitchAndFamily The pitch and family of the font. - * @param {string} faceName the typeface name, the length of this string must not exceed 32 characters, including the terminating null character. - * @return {bool} - */ - CreateTextFont(height: number, width: number, escapement: number, orientation: number, weight: number, italic: number, underline: number, strikeOut: number, charSet: number, outputPrecision: number, clipPrecision: number, quality: number, pitchAndFamily: number, faceName: string): boolean; - - /** - * Copies the image of a specified index in buffer to clipboard in DIB format. - * @method WebTwain#CopyToClipboard - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @return {bool} - */ - CopyToClipboard(sImageIndex: number): boolean; - - /** - * Clears the specified area of a specified image, and fill the area with the fill color. - * @method WebTwain#Erase - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @param {int} left specifies the x-coordinate of the upper-left corner of the rectangle. - * @param {int} top specifies the y-coordinate of the upper-left corner of the rectangle. - * @param {int} right specifies the x-coordinate of the lower-right corner of the rectangle. - * @param {int} bottom specifies the y-coordinate of the lower-right corner of the rectangle. - * @return {bool} - */ - Erase(sImageIndex: number, left: number, top: number, right: number, bottom: number): boolean; - - /** - * Returns the pixel bit depth of the selected image. - * @method WebTwain#GetImageBitDepth - * @param {short} sImageIndex specifies the index of image. The index is 0-based. - * @return {short} - */ - GetImageBitDepth(sImageIndex: number): number; - - /** - * Returns the width (pixels) of the selected image. This is a read-only property. - * @method WebTwain#GetImageWidth - * @param {short} sImageIndex specifies the index of image. The index is 0-based. - * @return {int} - */ - GetImageWidth(sImageIndex: number): number; - - /** - * Returns the height (pixels) of the selected image. This is a read-only property. - * @method WebTwain#GetImageHeight - * @param {short} sImageIndex specifies the index of image. The index is 0-based. - * @return {int} - */ - GetImageHeight(sImageIndex: number): number; - - /** - * Returns the file size of the new image resized from the image of a specified index in buffer. - * @method WebTwain#GetImageSize - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @param {int} iWidth specifies the pixel width of the new image. - * @param {int} iHeight specifies the pixel height of the new image. - * @return {double} - */ - GetImageSize(sImageIndex: number, iWidth: number, iHeight: number): number; - - /** - * Pre-calculate the file size of the local image file that is saved from an image of a specified index in buffer. - * @method WebTwain#GetImageSizeWithSpecifiedType - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @param {short} sImageType specifies the type of an image file.. - * @return {int} - */ - GetImageSizeWithSpecifiedType(sImageIndex: number, sImageType: number): number; - - /** - * Return the horizontal resolution of the specified image. - * @method WebTwain#GetImageXResolution - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @return {int} - */ - GetImageXResolution(sImageIndex: number): number; - - /** - * Return the vertical resolution of the specified image. - * @method WebTwain#GetImageYResolution - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @return {int} - */ - GetImageYResolution(sImageIndex: number): number; - - /** - * Returns the index of the selected image. - * @method WebTwain#GetSelectedImageIndex - * @param {short} sSelectedIndex specifies the index of the selected image. - * @return {short} - */ - GetSelectedImageIndex(sSelectedIndex: number): number; - - /** - * You can use the method to select images programatically which is ususally done by mouse clicking. - * @method WebTwain#SetSelectedImageIndex - * @param {short} sSelectedIndex this is the index of an array that holds the indices of selected images. - * @param {short} newVal specifies the index of an image that you want to select. - * @return {void} - */ - SetSelectedImageIndex(selectedIndex: number, newVal: number): void; - - /** - * Pre-calculate the file size of the local image file that is saved from the selected images in buffer. - * @method WebTwain#GetSelectedImagesSize - * @param {int} iImageType specifies the type of an image file. - * @return {int} - */ - GetSelectedImagesSize(iImageType: number): number; - - /** - * Check the skew angle of an image by its index in buffer. - * @method WebTwain#GetSkewAngle - * @param {short} sImageIndex the index of the image in the buffer. - * @return {double} - */ - GetSkewAngle(sImageIndex: number): number; - - /** - * Check the skew angle of a rectangular part of an image by its index in buffer. - * @method WebTwain#GetSkewAngleEx - * @param {short} sImageIndex the index of the image in the buffer. - * @param {int} left specifies the x-coordinate of the upper-left corner of the rectangle. - * @param {int} top specifies the y-coordinate of the upper-left corner of the rectangle. - * @param {int} right specifies the x-coordinate of the lower-right corner of the rectangle. - * @param {int} bottom specifies the y-coordinate of the lower-right corner of the rectangle. - * @return {double} - */ - GetSkewAngleEx(sImageIndex: number, left: number, top: number, right: number, bottom: number): number; - - /** - * [Deprecated.] Detects whether a certain area on an image is blank. - * @method WebTwain#IsBlankImageEx - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @param {int} left specifies the x-coordinate of the upper-left corner of the rectangle. - * @param {int} top specifies the y-coordinate of the upper-left corner of the rectangle. - * @param {int} right specifies the x-coordinate of the lower-right corner of the rectangle. - * @param {int} bottom specifies the y-coordinate of the lower-right corner of the rectangle. - * @param {bool} bFuzzyMatch specifies whether use fuzzy matching when detecting. - * @return {bool} - */ - IsBlankImageEx(sImageIndex: number, left: number, top: number, right: number, bottom: number, bFuzzyMatch: boolean): boolean; - - /** - * Mirrors the image of a specified index in buffer. - * @method WebTwain#Mirror - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @return {bool} - */ - Mirror(sImageIndex: number): boolean; - - /** - * Decorates image of a specified index in buffer with rectangles of transparent color. - * @method WebTwain#OverlayRectangle - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @param {int} left specifies the x-coordinate of the upper-left corner of the rectangle. - * @param {int} top specifies the y-coordinate of the upper-left corner of the rectangle. - * @param {int} right specifies the x-coordinate of the lower-right corner of the rectangle. - * @param {int} bottom specifies the y-coordinate of the lower-right corner of the rectangle. - * @param {int} color Specifies the fill color of the rectangle. The byte-ordering of the RGB value is 0xBBGGRR. BB represents blue, GG represents green, RR represents red. - * @param {float} fOpacity Specifies the opacity of the rectangle. The value represents opacity. 1.0 is 100% opaque and 0.0 is totally transparent. - * @return {bool} - */ - OverlayRectangle(sImageIndex: number, left: number, top: number, right: number, bottom: number, color: number, fOpacity: number): boolean; - - /** - * Removes all images in buffer. - * @method WebTwain#RemoveAllImages - * @return {void} - */ - RemoveAllImages(): void; - - /** - * Removes selected images in buffer. - * @method WebTwain#RemoveAllSelectedImages - * @return {bool} - */ - RemoveAllSelectedImages(): boolean; - - /** - * Removes the image of a specified index in buffer. - * @method WebTwain#RemoveImage - * @param {short} sImageIndexToBeDeleted specifies the index of the image to be deleted in buffer. The index is 0-based. - * @return {bool} - */ - RemoveImage(sImageIndexToBeDeleted: number): boolean; - - // Image Operate - /** - * Rotates the image of a specified index in buffer by specified angle. - * @method WebTwain#Rotate - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @param {float} fAngle Specifies the rotation angle. - * @param {bool} bKeepSize Keep size or not. - * @return {bool} - */ - Rotate(sImageIndex: number, fAngle: number, bKeepSize: boolean): boolean; - - /** - * Rotates the image of a specified index in buffer by specified angle. - * @method WebTwain#RotateEx - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @param {float} fAngle Specifies the rotation angle. - * @param {bool} bKeepSize Keep size or not. - * @param {EnumDWT_InterpolationMethod} newVal specifies the method to do interpolation. - * @return {bool} - */ - RotateEx(sImageIndex: number, fAngle: number, bKeepSize: boolean, newVal: EnumDWT_InterpolationMethod): boolean; - - /** - * Rotates the image of a specified index in buffer by 90 degrees counter-clockwise. - * @method WebTwain#RotateLeft - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @return {bool} - */ - RotateLeft(sImageIndex: number): boolean; - - /** - * Rotates the image of a specified index in buffer by 90 degrees clockwise. - * @method WebTwain#RotateRight - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @return {bool} - */ - RotateRight(sImageIndex: number): boolean; - - /** - * Changes width and height of the image of a specified index in the buffer. Please note the file size of the image will be changed proportionately. - * @method WebTwain#ChangeImageSize - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @param {int} iNewWidth specifies the pixel width of the new image. - * @param {int} iNewHeight specifies the pixel height of the new image. - * @param {EnumDWT_InterpolationMethod} newVal specifies the method to do interpolation. - * @return {bool} - */ - ChangeImageSize(sImageIndex: number, iNewWidth: number, iNewHeight: number, newVal: EnumDWT_InterpolationMethod): boolean; - - /** - * Flips the image of a specified index in buffer. - * @method WebTwain#Flip - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @return {bool} - */ - Flip(sImageIndex: number): boolean; - - /** - * Crops the image of a specified index in buffer. - * @method WebTwain#Crop - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @param {int} left specifies the x-coordinate of the upper-left corner of the rectangle. - * @param {int} top specifies the y-coordinate of the upper-left corner of the rectangle. - * @param {int} right specifies the x-coordinate of the lower-right corner of the rectangle. - * @param {int} bottom specifies the y-coordinate of the lower-right corner of the rectangle. - * @return {bool} - */ - Crop(sImageIndex: number, left: number, top: number, right: number, bottom: number): boolean; - - /** - * Crops the image of a specified index in buffer to clipboard in DIB format. - * @method WebTwain#CropToClipboard - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @param {int} left specifies the x-coordinate of the upper-left corner of the rectangle. - * @param {int} top specifies the y-coordinate of the upper-left corner of the rectangle. - * @param {int} right specifies the x-coordinate of the lower-right corner of the rectangle. - * @param {int} bottom specifies the y-coordinate of the lower-right corner of the rectangle. - * @return {bool} - */ - CropToClipboard(sImageIndex: number, left: number, top: number, right: number, bottom: number): boolean; - - /** - * Cuts the image data in the specified area to the system clipboard in DIB format. - * @method WebTwain#CutFrameToClipboard - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @param {int} left specifies the x-coordinate of the upper-left corner of the rectangle. - * @param {int} top specifies the y-coordinate of the upper-left corner of the rectangle. - * @param {int} right specifies the x-coordinate of the lower-right corner of the rectangle. - * @param {int} bottom specifies the y-coordinate of the lower-right corner of the rectangle. - * @return {bool} - */ - CutFrameToClipboard(sImageIndex: number, left: number, top: number, right: number, bottom: number): boolean; - - /** - * Cuts the image of a specified index in buffer to clipboard in DIB format. - * @method WebTwain#CutToClipboard - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @return {bool} - */ - CutToClipboard(sImageIndex: number): boolean; - - /** - * Change the DPI (dots per inch) for the specified image. - * @method WebTwain#SetDPI - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @param {int} xResolution The horizontal resolution. - * @param {int} yResolution The vertical resolution. - * @param {bool} bResampleImage Whether to resample the image. (The image size will be changed if this is set to true). - * @param {EnumDWT_InterpolationMethod} newVal specifies the method to do interpolation. - * @return {bool} - */ - SetDPI(sImageIndex: number, xResolution: number, yResolution: number, bResampleImage: boolean, newVal: EnumDWT_InterpolationMethod): boolean; - - /** - * Sets the view mode that images are displayed in Dynamic Web TWAIN. You can use this method to display multiple images in Dynamic Web TWAIN. - * @method WebTwain#SetViewMode - * @param {short} sHorizontalImageCount specifies how many columns can be displayed in Dynamic Web TWAIN. - * @param {short} sVerticalImageCount specifies how many rows can be displayed in Dynamic Web TWAIN.. - * @return {void} - */ - SetViewMode(sHorizontalImageCount: number, sVerticalImageCount: number): void; - - /** - * Moves a specified image. - * @method WebTwain#MoveImage - * @param {short} sSourceImageIndex Specifies the source index of image in buffer. The index is 0-based. - * @param {short} sTargetImageIndex Specifies the target index of image in buffer. The index is 0-based. - * @return {bool} - */ - MoveImage(sSourceImageIndex: number, sTargetImageIndex: number): boolean; - - /** - * Switchs two images of specified indices in buffer. - * @method WebTwain#SwitchImage - * @param {short} sImageIndex1 specifies the index of image in buffer. The index is 0-based. - * @param {short} sImageIndex2 specifies the index of image in buffer. The index is 0-based. - * @return {bool} - */ - SwitchImage(sImageIndex1: number, sImageIndex2: number): boolean; - - /** - * Shows the GUI of Image Printer. - * @method WebTwain#Print - * @return {bool} - */ - Print(): boolean; - // --- View & Edit end -- - - // --- Upload & Save end -- - - // --- Others --- - /** - * Shows the GUI of Image Editor. - * @method WebTwain#ShowImageEditor - * @return {bool} - */ - ShowImageEditor(): boolean; - - /** - * Unbinds an event from the specified function, so that the function stops receiving notifications when the event fires. - * @method WebTwain#UnregisterEvent - * @param {string} name the name of the event. - * @param {object} evt specified the function to be unbound. - * @return {bool} - */ - UnregisterEvent(name: string, evt: object): boolean; - // --- Others end --- - - /** - * Enables the source to accept image. - * @method WebTwain#EnableSource - * @return {bool} - */ - EnableSource(): boolean; - - /** - * Displays the source's built-in interface to acquire image. - * @method WebTwain#AcquireImage - * @param {object} optionalDeviceConfig a JS object used to set up the device for image acquisition. - * @param {function} asyncSuccessFunc the function to call when the upload succeeds. Please refer to the function prototype OnSuccess. - * @param {function} asyncFailureFunc the function to call when the upload fails. Please refer to the function prototype OnFailure. - * @return {bool} - */ - AcquireImage(optionalDeviceConfig?: object, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; - - // start from 10.0 - /** - * Change the width of an image in buffer. - * @method WebTwain#SetImageWidth - * @param {short} sImageIndex specifies which image you'd like to change. - * @param {int} iNewWidth specifies how wide you'd like to change the image. - * @return {bool} - */ - SetImageWidth(sImageIndex: number, iNewWidth: number): boolean; - // Set custom DS data (DAT_CUSTOMDSDATA), the input string is encoded with base64 /** * Sets custom DS data to be used for scanning, the input string is encoded with base64. Custom DS data means a specific scanning profile. * @method WebTwain#SetCustomDSDataEx * @param {string} value the input string which is encoded with base64. - * @return {bool} + * @return {boolean} */ SetCustomDSDataEx(value: string): boolean; @@ -3401,137 +3579,210 @@ interface WebTwain { * Sets custom DS data to be used for scanning, the data is stored in a file. Custom DS data means a specific scanning profile. * @method WebTwain#SetCustomDSData * @param {string} fileName the absolute path of the file where the custom data source data is stored. - * @return {bool} + * @return {boolean} */ SetCustomDSData(fileName: string): boolean; - // Get custom DS data, and returned string is encoded with base64 /** - * Gets custom DS data, the returned string is base64 encoded. - * @method WebTwain#GetCustomDSDataEx - * @return {string} + * Change the DPI (dots per inch) for the specified image. + * @method WebTwain#SetDPI + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @param {number} xResolution The horizontal resolution. + * @param {number} yResolution The vertical resolution. + * @param {boolean} bResampleImage Whether to resample the image. (The image size will be changed if this is set to true). + * @param {EnumDWT_InterpolationMethod} newVal specifies the method to do interpolation. + * @return {boolean} */ - GetCustomDSDataEx(): string; - - // Get custom DS data, and save the data to the specified file - /** - * Gets custom DS data and save the data in a specified file. - * @method WebTwain#GetCustomDSData - * @param {string} fileName the path of the file used for storing custom DS data. - * @return {bool} - */ - GetCustomDSData(fileName: string): boolean; + SetDPI(sImageIndex: number, xResolution: number, yResolution: number, bResampleImage: boolean, newVal: EnumDWT_InterpolationMethod): boolean; /** - * Changes the bitdepth of a specified image. - * @method WebTwain#ChangeBitDepth - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @param {short} sBitDepth specifies the target bit depth. - * @param {bool} bHighQuality specifies whether or not to keep high quality while changing the bit depth. When it's true, it takes more time. - * @return {bool} + * Sets file name and file format information used in File Transfer Mode. + * @method WebTwain#SetFileXferInfo + * @param {string} fileName the name of the file to be used in transfer. + * @param {EnumDWT_FileFormat} fileFormat an enumerated value indicates the format of the image. + * @return {boolean} */ - ChangeBitDepth(sImageIndex: number, sBitDepth: number, bHighQuality: boolean): boolean; + SetFileXferInfo(fileName: string, fileFormat: EnumDWT_FileFormat): boolean; /** - * Changes a specified image to gray scale. - * @method WebTwain#ConvertToGrayScale - * @param {short} sIndex specifies the index of image in buffer. The index is 0-based. - * @return {bool} + * Sets a text parameter as a filed in a web form. This form is maintained by the component itself (meaning it's not on the page). All fields in this form will be passed to the server when uploading images. + * @method WebTwain#SetHTTPFormField + * @param {string} FieldName specifies the name of a text field in web form. + * @param {string} FieldValue specifies the value of a text field in web form. + * @return {boolean} */ - ConvertToGrayScale(sIndex: number): boolean; + SetHTTPFormField(FieldName: string, FieldValue: string): boolean; /** - * [Deprecated.] Shows the GUI of Image Editor with custom settings. - * @method WebTwain#ShowImageEditorEx - * @param {int} x specifies the new position of the left top corner of the window. - * @param {int} y specifies the new position of the left top corner of the window. - * @param {int} cx specifies the width of the window. - * @param {int} cy specifies the height of the window. - * @param {int} nCmdShow specifices how the window should be shown. - * @return {bool} + * Sets a text parameter as a filed in a web form. This form is maintained by the component itself (meaning it's not on the page). All fields in this form will be passed to the server when uploading images. + * @method WebTwain#SetHTTPFormField + * @param {string} FieldName specifies the name of the field which could later be used to retrieve the blob + * @param {Blob} blobValue specifies the blob to be put in the form. + * @param {string} optionalFileName specifies the file name for the blob + * @return {boolean} */ - ShowImageEditorEx(x: number, y: number, cx: number, cy: number, nCmdShow: number): boolean; - - /** - * [Deprecated.] Detects whether an image is blank. - * @method WebTwain#IsBlankImage - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @return {bool} - */ - IsBlankImage(sImageIndex: number): boolean; - - /** - * Detects whether a specific image is blank. - * @method WebTwain#IsBlankImageExpress - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @return {bool} - */ - IsBlankImageExpress(sImageIndex: number): boolean; - - /** - * [Deprecated.] Detects whether a specific image is blank. - * @method WebTwain#GetBarcodeInfo - * @param {int} barcodeInfoType Defined in TWAIN Specification. - * @param {int} barcodeIndex Specifies which barcode to check. The index is 0-based. - * @return {object} - */ - GetBarcodeInfo(barcodeInfoType: number, barcodeIndex: number): object; - - /** - * [Deprecated.] Gets the content from a specified barcode. - * @method WebTwain#GetBarcodeText - * @param {int} barcodeIndex Specifies which barcode to check. The index is 0-based. - * @return {bool} - */ - GetBarcodeText(barcodeIndex: number): boolean; - - /** - * Sets the default source to use. It's only valid when IfUseTWAINDSM is set to true. - * @method WebTwain#SetDefaultSource - * @param {short} sImageIndex specifies the index of the default source. The index is 0-based. - * @return {bool} - */ - SetDefaultSource(sImageIndex: number): boolean; - - /** - * Draws a rectangle on the viewer which represents the selected area. - * @method WebTwain#SetSelectedImageArea - * @param {short} sImageIndex specifies the index of image in buffer. The index is 0-based. - * @param {int} left The X axis of the left border. - * @param {int} top The Y axis of the top border. - * @param {int} right The X axis of the right border. - * @param {int} bottom The Y axis of the bottom border. - * @return {bool} - */ - SetSelectedImageArea(sImageIndex: number, left: number, top: number, right: number, bottom: number): boolean; - - /** - * Converts the images specified by the indices to base64. - * @method WebTwain#ConvertToBase64 - * @param {Array} indices indices specifies which images are to be converted to base64. - * @param {EnumDWT_ImageType} enumImageType the image format in which the images are to be converted to base64. - * @param {function} asyncSuccessFunc the function to call when the upload succeeds. Please refer to the function prototype OnSuccess. - * @param {function} asyncFailureFunc the function to call when the upload fails. Please refer to the function prototype OnFailure. - * @return {bool} - */ - ConvertToBase64(indices: number[], enumImageType: EnumDWT_ImageType, optionalAsyncSuccessFunc?: () => void, optionalAsyncFailureFunc?: (errorCode: number, errorString: string) => void): boolean; - - /** - * Returns the direct URL of an image specified by index, if iWidth or iHeight is set to -1, you get the original image, otherwise you get the image with specified iWidth or iHeight while keeping the same aspect ratio. - * @method WebTwain#GetImageURL - * @param {short} index the index of the image. - * @param {int} iWidth the width of the image. - * @param {int} iHeight the height of the image. - * @return {string} - */ - GetImageURL(index: number, iWidth: number, iHeight: number): string; + SetHTTPFormField(FieldName: string, blobValue: Blob, optionalFileName?: string): boolean; /** * Sets a header for the current HTTP Post request. * @method WebTwain#SetHTTPHeader * @param {string} key the key of the header. * @param {string} value the value of the header. - * @return {bool} + * @return {boolean} */ SetHTTPHeader(key: string, value: string): boolean; + + /** + * Sets the left, top, right, and bottom sides of the image layout rectangle for the current Data Source. + * @method WebTwain#SetImageLayout + * @param {number} left specifies the floating point number for the left side of the image layout rectangle. + * @param {number} top specifies the floating point number for the top side of the image layout rectangle. + * @param {number} right specifies the floating point number for the right side of the image layout rectangle. + * @param {number} bottom specifies the floating point number for the bottom side of the image layout rectangle. + * @return {boolean} + */ + SetImageLayout(left: number, top: number, right: number, bottom: number): boolean; + + /** + * Change the width of an image in buffer. + * @method WebTwain#SetImageWidth + * @param {number} sImageIndex specifies which image you'd like to change. + * @param {number} iNewWidth specifies how wide you'd like to change the image. + * @return {boolean} + */ + SetImageWidth(sImageIndex: number, iNewWidth: number): boolean; + + /** + * Set the language for the authorization dialogs. + * @method WebTwain#SetLanguage + * @param {EnumDWT_Language} language specify the language + * @return {boolean} + */ + SetLanguage(language: EnumDWT_Language): boolean; + + /** + * Sets the time-out used to open a specified Data Source. + * @method WebTwain#SetOpenSourceTimeout + * @param {number} iMilliseconds specifies the number of milliseconds. + * @return {boolean} + */ + SetOpenSourceTimeout(iMilliseconds: number): boolean; + + /** + * Draws a rectangle on the viewer which represents the selected area. + * @method WebTwain#SetSelectedImageArea + * @param {number} sImageIndex specifies the index of image in buffer. The index is 0-based. + * @param {number} left The X axis of the left border. + * @param {number} top The Y axis of the top border. + * @param {number} right The X axis of the right border. + * @param {number} bottom The Y axis of the bottom border. + * @return {boolean} + */ + SetSelectedImageArea(sImageIndex: number, left: number, top: number, right: number, bottom: number): boolean; + + /** + * You can use the method to select images programatically which is ususally done by mouse clicking. + * @method WebTwain#SetSelectedImageIndex + * @param {number} sSelectedIndex this is the index of an array that holds the indices of selected images. + * @param {number} newVal specifies the index of an image that you want to select. + * @return {boolean} + */ + SetSelectedImageIndex(selectedIndex: number, newVal: number): boolean; + + /** + * Sets a custom tiff tag. Currently you can set up to 32 tags. The string to be set in a tag can be encoded with base64. + * @method WebTwain#SetTiffCustomTag + * @param {number} tag specifies the tag identifier. The value should be between 600 and 700. + * @param {string} content the string to be set for this tag. The string will be written to the .tiff file when you save/upload it. If the string is base64 encoded, we'll decode it before writing it. + * @param {boolean} base64Str if you'd like to encode the string with base64, set this to true. Otherwise, the string will be plin text. + * @return {boolean} + */ + SetTiffCustomTag(tag: number, content: string, base64Str: boolean): boolean; + + /** + * Configures how segmented upload is done. + * @method WebTwain#SetUploadSegment + * @param {number} segmentUploadThreshold specifies the threshold (in MB) over which segmented upload will be invoked. + * @param {number} moduleSize specifies the size of each segment (in KB). + * @return {boolean} + */ + SetUploadSegment(segmentUploadThreshold: number, moduleSize: number): boolean; + + /** + * Sets the view mode that images are displayed in Dynamic Web TWAIN. You can use this method to display multiple images in Dynamic Web TWAIN. + * @method WebTwain#SetViewMode + * @param {number} sHorizontalImageCount specifies how many columns can be displayed in Dynamic Web TWAIN. + * @param {number} sVerticalImageCount specifies how many rows can be displayed in Dynamic Web TWAIN.. + * @return {void} + */ + SetViewMode(sHorizontalImageCount: number, sVerticalImageCount: number): void; + + /** + * Show save file dialog or show open file dialog. + * @method WebTwain#ShowFileDialog + * @param {boolean} SaveDialog True -- show save file dialog, False -- show open file dialog. + * @param {string} Filter The filter name specifies the filter pattern (for example, "*.TXT"). To specify multiple filter patterns for a single display string, use a semicolon to separate the patterns (for example, "*.TXT;*.DOC;*.BAK"). A pattern string can be a combination of valid file name characters and the asterisk (*) wildcard character. Do not include spaces in the pattern string. To retrieve a shortcut's target without filtering, use the string "All Files\0*.*\0\0", but the program will replace "\0" with "|" automatically. + * @param {number} FilterIndex The index of the currently selected filter in the File Types control. The buffer pointed to by Filter contains pairs of strings that define the filters. The index is 0-based. + * @param {string} DefExtension Define the default extension. GetOpenFileName and GetSaveFileName append this extension to the file name only if the user fails to type an extension. If this member is NULL and the user fails to type an extension, no extension is appended. + * @param {string} InitialDir The initial directory. The algorithm for selecting the initial directory varies on different platforms. + * @param {boolean} AllowMultiSelect True -- allows users to select more than one file, False -- only allows to select one file. + * @param {boolean} OverwritePrompt True -- If a file already exists with the same name, the old file will be simply overwritten, False -- not allows to save and overwrite a same name file. + * @param {number} Flags If this parameter equals 0, the program will be initiated with the default flags, otherwise initiated with the cumstom value and paramters "AllowMultiSelect" and "OverwritePrompt" will be useless. + * @return {boolean} + */ + ShowFileDialog(SaveDialog: boolean, Filter: string, FilterIndex: number, DefExtension: string, InitialDir: string, AllowMultiSelect: boolean, OverwritePrompt: boolean, Flags: number): boolean; + + /** + * Shows the GUI of Image Editor. + * @method WebTwain#ShowImageEditor + * @return {boolean} + */ + ShowImageEditor(): boolean; + + /** + * [Deprecated.] Shows the GUI of Image Editor with custom settings. + * @method WebTwain#ShowImageEditorEx + * @param {number} x specifies the new position of the left top corner of the window. + * @param {number} y specifies the new position of the left top corner of the window. + * @param {number} cx specifies the width of the window. + * @param {number} cy specifies the height of the window. + * @param {number} nCmdShow specifices how the window should be shown. + * @return {boolean} + */ + ShowImageEditorEx(x: number, y: number, cx: number, cy: number, nCmdShow: number): boolean; + + /*ingored + SourceNameItems + */ + + /** + * Switchs two images of specified indices in buffer. + * @method WebTwain#SwitchImage + * @param {number} sImageIndex1 specifies the index of image in buffer. The index is 0-based. + * @param {number} sImageIndex2 specifies the index of image in buffer. The index is 0-based. + * @return {boolean} + */ + SwitchImage(sImageIndex1: number, sImageIndex2: number): boolean; + + /** + * Unbinds an event from the specified function, so that the function stops receiving notifications when the event fires. + * @method WebTwain#UnregisterEvent + * @param {string} name the name of the event. + * @param {object} evt specified the function to be unbound. + * @return {boolean} + */ + UnregisterEvent(name: string, evt: object): boolean; + + /*ignored + checkErrorString + first + getInstance + last + next + on + onEvent + previous + + ...other internal ones + */ } diff --git a/types/dwt/tsconfig.json b/types/dwt/tsconfig.json index db2ac6bbf4..13f35fcfbf 100644 --- a/types/dwt/tsconfig.json +++ b/types/dwt/tsconfig.json @@ -18,6 +18,7 @@ }, "files": [ "index.d.ts", + "addon.pdf.d.ts", "dwt-tests.ts" ] } \ No newline at end of file diff --git a/types/dynogels/dynogels-tests.ts b/types/dynogels/dynogels-tests.ts index ca16707256..a7634548e7 100644 --- a/types/dynogels/dynogels-tests.ts +++ b/types/dynogels/dynogels-tests.ts @@ -148,12 +148,14 @@ dynogels.dynamoDriver(dynamodb); // Saving Models To DynamoDB Account.create({ email: 'foo@example.com', name: 'Foo Bar', age: 21 }, (err, acc) => { - acc.get('email'); + const email = acc.get('email') as string; + console.log(`Created account ${email}`); }); const acc = new Account({ email: 'test@example.com', name: 'Test Example' }); acc.save((err) => { - acc.get('email'); + const email = acc.get('email') as string; + console.log(`Created account ${email}`); }); BlogPost.create({ diff --git a/types/dynogels/index.d.ts b/types/dynogels/index.d.ts index 2e4c5acbf4..dd6aedf907 100644 --- a/types/dynogels/index.d.ts +++ b/types/dynogels/index.d.ts @@ -1,6 +1,8 @@ -// Type definitions for dynogels 8.0 +// Type definitions for dynogels 9.0 // Project: https://github.com/clarkie/dynogels#readme // Definitions by: Spartan Labs +// Ramon de Klein +// Stephen Tuso // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 @@ -76,7 +78,7 @@ export interface Model { getItems(items: string[] | Array<{ [key: string]: string }>, options: GetItemOptions, callback: (err: Error, items: any[]) => void): void; batchGetItems(items: string[] | Array<{ [key: string]: string }>, callback: (err: Error, items: any[]) => void): void; batchGetItems(items: string[] | Array<{ [key: string]: string }>, options: GetItemOptions, callback: (err: Error, items: any[]) => void): void; - createTable(options: { [key: string]: CreateTablesOptions } | DynogelsGlobalOptions, callback: (err: Error, data: AWS.DynamoDB.CreateTableOutput) => void): void; + createTable(options: CreateTablesOptions, callback: (err: Error, data: AWS.DynamoDB.CreateTableOutput) => void): void; createTable(callback: (err: Error, data: AWS.DynamoDB.CreateTableOutput) => void): void; updateTable(throughput: Throughput, callback: (err: Error, data: AWS.DynamoDB.UpdateTableOutput) => void): void; updateTable(callback: (err: Error, data: AWS.DynamoDB.UpdateTableOutput) => void): void; @@ -152,7 +154,8 @@ export interface ModelConfig { // Dynogels Item export interface Item { - get(key?: string): { [key: string]: any }; + get(): { [key: string]: any }; + get(key: string): any; set(params: {}): Item; save(callback?: DynogelsItemCallback): void; update(options: UpdateItemOptions, callback?: DynogelsItemCallback): void; diff --git a/types/ej.web.all/index.d.ts b/types/ej.web.all/index.d.ts index 03f6b12c24..e95fb94b2b 100644 --- a/types/ej.web.all/index.d.ts +++ b/types/ej.web.all/index.d.ts @@ -8,7 +8,7 @@ /*! * filename: ej.web.all.d.ts -* version : 16.1.0.24 +* version : 16.1.0.32 * Copyright Syncfusion Inc. 2001 - 2018. 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 @@ -378,7 +378,7 @@ declare namespace ej { update(dm: ej.DataManager, keyField: string, value: any, tableName: string): any; } class ForeignKeyAdaptor extends ej.JsonAdaptor { - constructor(); + constructor(data: any, type: string); processQuery(ds: any, query: ej.Query): any; insert(dm: ej.DataManager, data: any, tableName: string): { url: string; data: any }; update(dm: ej.DataManager, keyField: string, value: any, tableName: string): { url: string; type: string; data: any }; @@ -9567,8 +9567,8 @@ declare namespace ej { */ cssClass?: string; - /** Sets the separator when the multiSelectMode with delimiter option or checkbox is enabled.When you enter the delimiter value, the text after the delimiter is considered as a - * separateword or query. The delimiter string is a single character and must be a symbol. Mostly,the delimiter symbol is used as comma (,), semi-colon (;), or any other special + /** Sets the separator when the multiSelectMode with delimiter option or checkbox is enabled. When you enter the delimiter value, the text after the delimiter is 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 (,), semi-colon (;), or any other special * character. * @Default {,} */ @@ -9628,12 +9628,12 @@ declare namespace ej { */ readOnly?: boolean; - /** The DropDownTree’s textbox is displayed with rounded corner style. + /** The DropDownTree's textbox is displayed with rounded corner style. * @Default {false} */ showRoundedCorner?: boolean; - /** Specifies the targetID for the DropDownTree’s items. + /** Specifies the targetID for the DropDownTree's items. * @Default {null} */ targetID?: string; @@ -9653,8 +9653,8 @@ declare namespace ej { */ validationRules?: any; - /** Specifies the value (text content) for the DropDownTree control. For the single selection mode, the selected item’s value will be returned in its data type, and for - * MultiSelectMode, returns the selected items’ values separated by delimiter in string type. + /** Specifies the value (text content) for the DropDownTree control. For the single selection mode, the selected item's value will be returned in its data type, and for + * MultiSelectMode, returns the selected items values separated by delimiter in string type. * @Default {null} */ value?: string; @@ -9678,7 +9678,7 @@ declare namespace ej { */ blur?(e: BlurEventArgs): void; - /** Fires the action when the DropDownTree control’s value is changed. + /** Fires the action when the DropDownTree control's value is changed. */ change?(e: ChangeEventArgs): void; @@ -9744,15 +9744,15 @@ declare namespace ej { */ model?: any; - /** Selected item’s text. + /** Selected item's text. */ selectedText?: string; - /** Selected item’s text. + /** Selected item's text. */ text?: string; - /** Selected item’s value. + /** Selected item's value. */ value?: string; @@ -9779,11 +9779,11 @@ declare namespace ej { */ model?: any; - /** Selected item’s text. + /** Selected item's text. */ text?: string; - /** Selected item’s value. + /** Selected item's value. */ value?: string; @@ -9810,11 +9810,11 @@ declare namespace ej { */ model?: any; - /** Selected item’s text. + /** Selected item's text. */ text?: string; - /** Selected item’s value. + /** Selected item's value. */ value?: string; } @@ -9863,7 +9863,7 @@ declare namespace ej { */ model?: any; - /** Selected item’s text. + /** Selected item's text. */ selectedText?: string; @@ -9905,11 +9905,11 @@ declare namespace ej { */ model?: any; - /** Selected item’s text. + /** Selected item's text. */ text?: string; - /** Selected item’s value. + /** Selected item's value. */ value?: string; } @@ -9928,11 +9928,11 @@ declare namespace ej { */ model?: any; - /** Selected item’s text. + /** Selected item's text. */ text?: string; - /** Selected item’s value. + /** Selected item's value. */ value?: string; @@ -9961,7 +9961,7 @@ declare namespace ej { } } enum Textmode { - //When TextMode property is set to none, only selected/checked node’s text is presented. + //When TextMode property is set to none, only selected/checked node's text is presented. None, //When FullPath option is selected, the full path of the selected node is shown in the control. FullPath, @@ -19622,6 +19622,11 @@ declare namespace ej { */ value?: string|Date; + /** Specifies the water mark text to be displayed in input text. + * @Default {select a time} + */ + watermarkText?: string; + /** Defines the width of the TimePicker textbox. */ width?: string|number; @@ -30758,6 +30763,11 @@ declare namespace ej { */ operationalMode?: ej.Pivot.OperationalMode|string; + /** 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. + * @Default {[]} + */ + axes?: any[]; + /** This is a horizontal axis that contains options to configure the axis and it is the primary x-axis for all series in the series array. To override x-axis for particular series, * create an axis object by providing a unique name by using the name property and add it to the axes array. Then, assign the name to the series’s xAxisName property to link both * the axis and the series. @@ -30818,10 +30828,6 @@ declare namespace ej { */ beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; - /** Triggers before the pivot engine starts to populate. - */ - beforePivotEnginePopulate?(e: BeforePivotEnginePopulateEventArgs): void; - /** Triggers when performing drill up/down operation in the pivot chart control. */ drillSuccess?(e: DrillSuccessEventArgs): void; @@ -30888,13 +30894,6 @@ declare namespace ej { element?: any; } - export interface BeforePivotEnginePopulateEventArgs { - - /** returns the current instance of PivotChart. - */ - chartObj?: any; - } - export interface DrillSuccessEventArgs { /** returns the current instance of PivotChart. @@ -33505,6 +33504,11 @@ declare namespace ej { */ allowInline?: boolean; + /** When set to false, disables the appointment delete option on the Scheduler. + * @Default {true} + */ + allowDelete?: boolean; + /** When set to true, Scheduler allows interaction through keyboard shortcut keys. * @Default {true} */ @@ -37077,6 +37081,11 @@ declare namespace ej { * @Default {0} */ weekStartDay?: number; + + /** Enable or disable the automatic timescale update on cell editing, dialog editing and taskbar editing. + * @Default {true} + */ + updateTimescaleView?: boolean; } export interface SelectedCellIndex { @@ -38114,6 +38123,14 @@ declare namespace ej { */ sortColumn(fieldName: string, columnSortDirection: string): void; + /** To move the TreeGrid rows programmatically with from index ,to index and position. + * @param {number} you can pass drag Index of the row + * @param {number} you can pass target Index of the row. + * @param {string} you can pass the drop position as above,below,child + * @returns {void} + */ + moveRow(fromIndex: number, toIndex: number, position: string): void; + /** To reorder the column with field name and target index values * @param {string} you can pass a name of column to reorder. * @param {string} you can pass a target column index to be inserted. @@ -38651,6 +38668,10 @@ declare namespace ej { */ rowDragStop?(e: RowDragStopEventArgs): void; + /** Triggered before row drop action begins. + */ + rowDropActionBegin?(e: RowDropActionBeginEventArgs): void; + /** Triggered before selecting a cell */ cellSelecting?(e: CellSelectingEventArgs): void; @@ -39378,6 +39399,45 @@ declare namespace ej { type?: string; } + export interface RowDropActionBeginEventArgs { + + /** 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 multiple dragged row collection for multiple reorder + */ + draggedRecords?: any[]; + + /** Returns the drop position. + */ + dropPosition?: string; + + /** 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 the name of the event. + */ + type?: string; + } + export interface CellSelectingEventArgs { /** Returns the cancel option value. @@ -42693,6 +42753,8 @@ declare namespace ej { XLSort: Spreadsheet.XLSort; + XLSparkline: Spreadsheet.XLSparkline; + XLValidate: Spreadsheet.XLValidate; } export namespace Spreadsheet { @@ -43547,6 +43609,35 @@ declare namespace ej { sortByRange(range: any[]|string, columnName: string, direction: any): boolean; } + export interface XLSparkline { + + /** This method used for creating the sparkline chart for specified range in spreadsheet. + * @param {string} Pass the data range + * @param {string} Pass the location range + * @param {string} Pass the sparkline chart type + * @param {any} Pass the sparkline chart options + * @param {number} Pass the sheetIndex + * @returns {void} + */ + createSparkline(dataRange: string, locationRange: string, type: string, options: any, sheetIndex: number): void; + + /** This method used to change the sparkline color and marker point color in the spreadsheet. + * @param {string} Pass the sparkline ID + * @param {any} Pass the sparkline options + * @param {number} Optional. Pass the sheet index + * @returns {void} + */ + changePointColor(sparklineId: string, option: any, sheetIdx: number): void; + + /** This method used to change the sparkline type in the spreadsheet. + * @param {string} Pass the sparkline ID + * @param {string} Pass the sparkline type + * @param {number} Optional. Pass the sheet index + * @returns {void} + */ + changeType(sparklineId: string, type: string, sheetIdx: number): 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. @@ -43737,6 +43828,11 @@ declare namespace ej { */ allowSorting?: boolean; + /** Gets or sets a value that indicates whether to enable the sparkline feature in the Spreadsheet. + * @Default {false} + */ + allowSparkline?: boolean; + /** Gets or sets a value that indicates whether to enable or disable undo and redo feature in the Spreadsheet. * @Default {true} */ diff --git a/types/ejs/index.d.ts b/types/ejs/index.d.ts index e785f2c6ae..e56ad1a8ec 100644 --- a/types/ejs/index.d.ts +++ b/types/ejs/index.d.ts @@ -108,7 +108,7 @@ export function escapeRegexChars(s: string): string; export function escapeXML(markup: string): string; export interface Cache { set(key: string, val: TemplateFunction): void; - get(key: string): TemplateFunction; + get(key: string): TemplateFunction | undefined; } export let delimiter: string; diff --git a/types/elasticsearch/elasticsearch-tests.ts b/types/elasticsearch/elasticsearch-tests.ts index 10c4659998..e21f84dc48 100644 --- a/types/elasticsearch/elasticsearch-tests.ts +++ b/types/elasticsearch/elasticsearch-tests.ts @@ -266,6 +266,30 @@ client.search({ } }); +client.updateByQuery({ + index: 'myIndex', + type: 'mytype', +}, (error, response) => { + const { + took, + timed_out, + updated, + deleted, + batches, + version_conflicts, + noops, + retries, + throttled_millis, + throttled_until_millis, + total, + failures + } = response; + + const { bulk, search } = retries; + + // ... +}); + client.indices.updateAliases({ body: { actions: [ diff --git a/types/elasticsearch/index.d.ts b/types/elasticsearch/index.d.ts index c6b05da9a0..e60e8d86c3 100644 --- a/types/elasticsearch/index.d.ts +++ b/types/elasticsearch/index.d.ts @@ -89,8 +89,8 @@ export class Client { termvectors(params: TermvectorsParams, callback: (error: any, response: any) => void): void; update(params: UpdateDocumentParams): Promise; update(params: UpdateDocumentParams, callback: (error: any, response: any) => void): void; - updateByQuery(params: UpdateDocumentByQueryParams): Promise; - updateByQuery(params: UpdateDocumentByQueryParams, callback: (error: any, response: any) => void): void; + updateByQuery(params: UpdateDocumentByQueryParams): Promise; + updateByQuery(params: UpdateDocumentByQueryParams, callback: (error: any, response: UpdateDocumentByQueryResponse) => void): void; close(): void; } @@ -785,6 +785,25 @@ export interface UpdateDocumentByQueryParams extends GenericParams { type: NameList; } +export interface UpdateDocumentByQueryResponse { + took: number; + timed_out: boolean; + updated: number; + deleted: number; + batches: number; + version_conflicts: number; + noops: number; + retries: { + bulk: number; + search: number; + }; + throttled_millis: number; + requests_per_second: number; + throttled_until_millis: number; + total: number; + failures: any[]; +} + export interface Cat { aliases(params: CatAliasesParams, callback: (error: any, response: any) => void): void; aliases(params: CatAliasesParams): Promise; diff --git a/types/electron-devtools-installer/electron-devtools-installer-tests.ts b/types/electron-devtools-installer/electron-devtools-installer-tests.ts index a453221698..798e6ad223 100644 --- a/types/electron-devtools-installer/electron-devtools-installer-tests.ts +++ b/types/electron-devtools-installer/electron-devtools-installer-tests.ts @@ -3,6 +3,8 @@ import installExtension, { BACKBONE_DEBUGGER, JQUERY_DEBUGGER, ANGULARJS_BATARANG, VUEJS_DEVTOOLS, REDUX_DEVTOOLS, REACT_PERF, + CYCLEJS_DEVTOOL, APOLLO_DEVELOPER_TOOLS, + MOBX_DEVTOOLS } from 'electron-devtools-installer'; @@ -14,4 +16,7 @@ installExtension(ANGULARJS_BATARANG); installExtension(VUEJS_DEVTOOLS); installExtension(REDUX_DEVTOOLS); installExtension(REACT_PERF); +installExtension(CYCLEJS_DEVTOOL); +installExtension(APOLLO_DEVELOPER_TOOLS); +installExtension(MOBX_DEVTOOLS); installExtension('abcdefghijkl'); \ No newline at end of file diff --git a/types/electron-devtools-installer/index.d.ts b/types/electron-devtools-installer/index.d.ts index 8a108c1d2f..88649cd0a8 100644 --- a/types/electron-devtools-installer/index.d.ts +++ b/types/electron-devtools-installer/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for electron-devtools-installer v2.0.1 // Project: https://github.com/MarshallOfSound/electron-devtools-installer // Definitions by: Robin Van den Broeck +// M. Fatih Mar // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module "electron-devtools-installer" { @@ -21,4 +22,7 @@ declare module "electron-devtools-installer" { export const VUEJS_DEVTOOLS: ExtensionReference; export const REDUX_DEVTOOLS: ExtensionReference; export const REACT_PERF: ExtensionReference; + export const CYCLEJS_DEVTOOL: ExtensionReference; + export const APOLLO_DEVELOPER_TOOLS: ExtensionReference; + export const MOBX_DEVTOOLS: ExtensionReference; } \ No newline at end of file diff --git a/types/email-templates/email-templates-tests.ts b/types/email-templates/email-templates-tests.ts index a3311d6e81..3d828281af 100644 --- a/types/email-templates/email-templates-tests.ts +++ b/types/email-templates/email-templates-tests.ts @@ -2,13 +2,20 @@ import EmailTemplates = require('email-templates'); const email = new EmailTemplates({ message: { - from: 'Test@tesitng.com' + from: 'Test@testing.com' }, transport: { jsonTransport: true - }} -); + } +}); + +const emailNoTransporter = new EmailTemplates({ + message: { + from: 'test@testing.com' + }, +}); email.juiceResources('

bob

'); email.render('mars/html.pug', {name: 'elon'}); email.send({template: 'mars', message: {to: 'elon@spacex.com'}, locals: {name: 'Elon'}}); +emailNoTransporter.render('mars/html.pug', {name: 'elon'}); diff --git a/types/email-templates/index.d.ts b/types/email-templates/index.d.ts index 12dceb181d..1cdd43c36e 100644 --- a/types/email-templates/index.d.ts +++ b/types/email-templates/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for node-email-templates 3.1 +// Type definitions for node-email-templates 3.5 // Project: https://github.com/niftylettuce/node-email-templates // Definitions by: Cyril Schumacher // Matus Gura @@ -13,7 +13,7 @@ interface EmailConfig { /** * The nodemailer Transport created via nodemailer.createTransport */ - transport: any; + transport?: any; /** * The email template directory and engine information */ @@ -34,10 +34,19 @@ interface EmailConfig { * Pass a custom render function if necessary */ render?: { view: string, locals: any }; + /** + * force text-only rendering of template (disregards template folder) + */ + textOnly?: boolean; /** * */ htmlToText?: any; + /** + * You can pass an option to prefix subject lines with a string + * env === 'production' ? false : `[${env.toUpperCase()}] `; // <--- HERE + */ + subjectPrefix?: any; /** * */ diff --git a/types/ember-data/index.d.ts b/types/ember-data/index.d.ts index 7b78770489..5e4fa4eb60 100644 --- a/types/ember-data/index.d.ts +++ b/types/ember-data/index.d.ts @@ -23,6 +23,9 @@ declare module 'ember-data' { type AttributesFor = keyof Model; // TODO: filter to attr properties only (TS 2.8) type RelationshipsFor = keyof Model; // TODO: filter to hasMany/belongsTo properties only (TS 2.8) + export interface ChangedAttributes { + [key: string]: [any, any] | undefined; + } interface AttributeMeta { type: keyof TransformRegistry; options: object; @@ -68,7 +71,7 @@ declare module 'ember-data' { inverse?: string | null; polymorphic?: boolean; } - ): Ember.ComputedProperty>; + ): Ember.ComputedProperty, ModelRegistry[K]>; /** * `DS.hasMany` is used to define One-To-Many and Many-To-Many * relationships on a [DS.Model](/api/data/classes/DS.Model.html). @@ -88,7 +91,7 @@ declare module 'ember-data' { inverse?: string | null; polymorphic?: boolean; } - ): Ember.ComputedProperty>; + ): Ember.ComputedProperty, Ember.Array>; /** * This method normalizes a modelName into the format Ember Data uses * internally. @@ -500,7 +503,7 @@ declare module 'ember-data' { * Returns an object, whose keys are changed properties, and value is * an [oldProp, newProp] array. */ - changedAttributes(): {}; + changedAttributes(): ChangedAttributes; /** * If the model `hasDirtyAttributes` this function will discard any unsaved * changes. If the model `isNew` it will be removed from the store. @@ -518,11 +521,11 @@ declare module 'ember-data' { /** * Get the reference for the specified belongsTo relationship. */ - belongsTo(name: keyof ModelRegistry): BelongsToReference; + belongsTo(name: RelationshipsFor): BelongsToReference; /** * Get the reference for the specified hasMany relationship. */ - hasMany(name: keyof ModelRegistry): HasManyReference; + hasMany(name: RelationshipsFor): HasManyReference; /** * Given a callback, iterates over each of the relationships in the model, * invoking the callback with the name of each relationship and its relationship diff --git a/types/ember-data/test/belongs-to.ts b/types/ember-data/test/belongs-to.ts index bd1037a65e..31977c148c 100644 --- a/types/ember-data/test/belongs-to.ts +++ b/types/ember-data/test/belongs-to.ts @@ -1,6 +1,8 @@ import DS from 'ember-data'; import { assertType } from './lib/assert'; +declare const store: DS.Store; + class Folder extends DS.Model { name = DS.attr('string'); children = DS.hasMany('folder', { inverse: 'parent' }); @@ -19,4 +21,9 @@ assertType(folder.get('parent').get('name')); folder.get('parent').then(parent => { assertType(parent); assertType(parent.get('name')); + folder.set('parent', parent); }); + +folder.set('parent', folder); +folder.set('parent', folder.get('parent')); +folder.set('parent', store.findRecord('folder', 3)); diff --git a/types/ember-data/test/has-many.ts b/types/ember-data/test/has-many.ts index e24fb1b814..480a6bd56d 100644 --- a/types/ember-data/test/has-many.ts +++ b/types/ember-data/test/has-many.ts @@ -1,3 +1,4 @@ +import Ember from 'ember'; import DS from 'ember-data'; import { assertType } from './lib/assert'; @@ -44,6 +45,10 @@ blogPost.get('commentsAsync').then(comments => { assertType(comments.get('firstObject')!.get('text')); }); +blogPost.set('commentsAsync', blogPost.get('commentsAsync')); +blogPost.set('commentsAsync', Ember.A()); +blogPost.set('commentsAsync', Ember.A([ comment! ])); + class PaymentMethod extends DS.Model {} declare module 'ember-data' { interface ModelRegistry { diff --git a/types/ember-data/test/model.ts b/types/ember-data/test/model.ts index a18167dbee..63bda2588e 100644 --- a/types/ember-data/test/model.ts +++ b/types/ember-data/test/model.ts @@ -1,5 +1,5 @@ import Ember from 'ember'; -import DS from 'ember-data'; +import DS, { ChangedAttributes } from 'ember-data'; import { assertType } from "./lib/assert"; const Person = DS.Model.extend({ @@ -30,3 +30,7 @@ assertType(user.get('createdAt')); user.serialize(); user.serialize({ includeId: true }); +user.serialize({ includeId: true }); + +const attributes = user.changedAttributes(); +assertType(attributes); diff --git a/types/ember-data/test/relationships.ts b/types/ember-data/test/relationships.ts index fb89d4410c..df43387bb4 100644 --- a/types/ember-data/test/relationships.ts +++ b/types/ember-data/test/relationships.ts @@ -16,17 +16,23 @@ class Comment extends DS.Model { author = DS.attr('string'); } +class Series extends DS.Model { + title = DS.attr('string'); +} + class RelationalPost extends DS.Model { title = DS.attr('string'); tag = DS.attr('string'); comments = DS.hasMany('comment', { async: true }); relatedPosts = DS.hasMany('post'); + series = DS.belongsTo('series'); } declare module 'ember-data' { interface ModelRegistry { 'relational-post': RelationalPost; comment: Comment; + series: Series; } } @@ -35,3 +41,6 @@ blogPost!.get('comments').then((comments) => { // now we can work with the comments let author: string = comments.get('firstObject')!.get('author'); }); + +blogPost!.hasMany('relatedPosts'); +blogPost!.belongsTo('series'); diff --git a/types/ember-mocha/index.d.ts b/types/ember-mocha/index.d.ts index f43982fda8..1d24564e31 100644 --- a/types/ember-mocha/index.d.ts +++ b/types/ember-mocha/index.d.ts @@ -62,17 +62,4 @@ declare module 'mocha' { // augment test callback context interface ITestCallbackContext extends TestContext {} interface IHookCallbackContext extends TestContext {} - - // re-export mocha globals as named exports - export const describe: Mocha.IContextDefinition; - export const context: Mocha.IContextDefinition; - export const it: Mocha.ITestDefinition; - export const setup: mochaSetup; - export const teardown: mochaTeardown; - export const suiteSetup: mochaSuiteSetup; - export const suiteTeardown: mochaSuiteTeardown; - export const before: mochaBefore; - export const after: mochaAfter; - export const beforeEach: mochaBeforeEach; - export const afterEach: mochaAfterEach; } diff --git a/types/ember-qunit/index.d.ts b/types/ember-qunit/index.d.ts index a669b977e1..9dc93b980b 100644 --- a/types/ember-qunit/index.d.ts +++ b/types/ember-qunit/index.d.ts @@ -44,6 +44,20 @@ declare module 'ember-qunit' { */ export function setResolver(resolver: Ember.Resolver): void; + /** + * Sets up acceptance tests. + * + * The `setupApplicationTest` function is used for all acceptance tests. It + * is invoked in the callback scope of a QUnit module (aka "nested module"). + * + * Once invoked, all subsequent hooks.beforeEach and test invocations will + * have access to the following: + * * `this.owner` - the owner object that been set on the test context. + * * `this.pauseTest` and `this.resumeTest` - allow easy pausing/resuming of tests. + * * `this.element` which returns the DOM element representing the application's root element. + */ + export function setupApplicationTest(hooks: NestedHooks): void; + /** * Sets up tests that need to render snippets of templates. * @@ -80,7 +94,7 @@ declare module 'ember-qunit' { */ export function setupTest(hooks: NestedHooks): void; - export class QUnitAdapter extends Ember.Test.Adapter {} + export class QUnitAdapter extends Ember.Test.Adapter { } export { module, test, skip, only, todo } from 'qunit'; } @@ -147,9 +161,10 @@ declare module 'qunit' { * ignoring the callback argument and the respective global and module's * hooks. * - * @param Title of unit being tested + * @param name Title of unit being tested + * @param callback Function to close over assertions */ - export const skip: typeof QUnit.skip; + export function skip(name: string, callback?: (this: TestContext, assert: Assert) => void): void; export default QUnit; } diff --git a/types/ember/index.d.ts b/types/ember/index.d.ts index a89d6bcc6f..81d3bd69e6 100755 --- a/types/ember/index.d.ts +++ b/types/ember/index.d.ts @@ -6,6 +6,7 @@ // Chris Krycho // Theron Cross // Martin Feckie +// Alex LaFroscia // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 @@ -28,7 +29,8 @@ declare module 'ember' { /** * Deconstructs computed properties into the types which would be returned by `.get()`. */ - type ComputedProperties = { [K in keyof T]: Ember.ComputedProperty | ModuleComputed | T[K] }; + type ComputedPropertyGetters = { [K in keyof T]: Ember.ComputedProperty | ModuleComputed | T[K] }; + type ComputedPropertySetters = { [K in keyof T]: Ember.ComputedProperty | ModuleComputed | T[K] }; /** * Check that any arguments to `create()` match the type's properties. @@ -69,13 +71,13 @@ declare module 'ember' { * * Generally you would use `EmberClass.create()` instead of `new EmberClass()`. * - * The no-arg constructor is required by the typescript compiler. + * The single-arg constructor is required by the typescript compiler. * The multi-arg constructor is included for better ergonomics. * * Implementation is carefully chosen for the reasons described in * https://github.com/typed-ember/ember-typings/pull/29 */ - type EmberClassConstructor = (new () => T) & (new (...args: any[]) => T); + type EmberClassConstructor = (new (properties?: object) => T) & (new (...args: any[]) => T); type ComputedPropertyGetterFunction = (this: any, key: string) => T; @@ -323,7 +325,7 @@ declare module 'ember' { * `inject`) or for service lookup. Each factory is registered with * a full name including two parts: `type:name`. */ - register(fullName: string, factory: Function, options: {}): any; + register(fullName: string, factory: Function, options?: { singleton?: boolean, instantiate?: boolean }): any; /** * Unregister a factory. */ @@ -683,7 +685,7 @@ declare module 'ember' { will be cached. You can specify various properties that your computed property is dependent on. This will force the cached result to be recomputed if the dependencies are modified. **/ - class ComputedProperty { + class ComputedProperty { /** * Call on a computed property to set it into non-cached mode. When in this * mode the computed property will not automatically cache the return value. @@ -759,6 +761,12 @@ declare module 'ember' { } const Copyable: Ember.Mixin; class CoreObject { + /** + * As of Ember 3.1, CoreObject constructor takes initial object properties as an argument. + * See: https://github.com/emberjs/ember.js/commit/4709935854d4c29b0d2c054614d53fa2c55309b1 + **/ + constructor(properties?: object); + _super(...args: any[]): any; /** @@ -812,7 +820,7 @@ declare module 'ember' { static create(this: EmberClassConstructor): Fix; static create>( - this: EmberClassConstructor>, + this: EmberClassConstructor>, arg1: T1 & ThisType> ): Fix; @@ -822,7 +830,7 @@ declare module 'ember' { T1 extends EmberInstanceArguments, T2 extends EmberInstanceArguments >( - this: EmberClassConstructor>, + this: EmberClassConstructor>, arg1: T1 & ThisType>, arg2: T2 & ThisType> ): Fix; @@ -834,7 +842,7 @@ declare module 'ember' { T2 extends EmberInstanceArguments, T3 extends EmberInstanceArguments >( - this: EmberClassConstructor>, + this: EmberClassConstructor>, arg1: T1 & ThisType>, arg2: T2 & ThisType>, arg3: T3 & ThisType> @@ -1235,7 +1243,7 @@ declare module 'ember' { * Returns a new enumerable that contains only items containing a unique property value. * The default implementation returns an array regardless of the receiver type. */ - uniqBy(): NativeArray; + uniqBy(property: string): NativeArray; /** * Returns `true` if the passed object can be found in the enumerable. */ @@ -1641,27 +1649,27 @@ declare module 'ember' { /** * Retrieves the value of a property from the object. */ - get(this: ComputedProperties, key: K): T[K]; + get(this: ComputedPropertyGetters, key: K): T[K]; /** * To get the values of multiple properties at once, call `getProperties` * with a list of strings or an array: */ - getProperties(this: ComputedProperties, list: K[]): Pick; + getProperties(this: ComputedPropertyGetters, list: K[]): Pick; getProperties( - this: ComputedProperties, + this: ComputedPropertyGetters, ...list: K[] ): Pick; /** * Sets the provided key or path to the value. */ - set(this: ComputedProperties, key: K, value: T[K]): T[K]; + set(this: ComputedPropertySetters, key: K, value: T[K]): T[K]; /** * Sets a list of properties at once. These properties are set inside * a single `beginPropertyChanges` and `endPropertyChanges` batch, so * observers will be buffered. */ setProperties( - this: ComputedProperties, + this: ComputedPropertySetters, hash: Pick ): Pick; /** @@ -1692,7 +1700,7 @@ declare module 'ember' { * property returns `undefined`. */ getWithDefault( - this: ComputedProperties, + this: ComputedPropertyGetters, key: K, defaultValue: T[K] ): T[K]; @@ -1715,7 +1723,7 @@ declare module 'ember' { * without accidentally invoking it if it is intended to be * generated lazily. */ - cacheFor(this: ComputedProperties, key: K): T[K] | undefined; + cacheFor(this: ComputedPropertyGetters, key: K): T[K] | undefined; } const Observable: Mixin; /** @@ -2078,6 +2086,7 @@ declare module 'ember' { * Transition the application into another route. The route may * be either a single route or route path: */ + transitionTo(name: string, options?: {}): Transition; transitionTo(name: string, ...models: any[]): Transition; transitionTo(name: string, options: {}): Transition; } @@ -2988,7 +2997,7 @@ declare module 'ember' { * it to be created. */ function cacheFor( - obj: ComputedProperties, + obj: ComputedPropertyGetters, key: K ): T[K] | undefined; /** @@ -3027,12 +3036,12 @@ declare module 'ember' { * with an object followed by a list of strings or an array: */ function getProperties( - obj: ComputedProperties, + obj: ComputedPropertyGetters, list: K[] ): Pick; function getProperties(obj: T, list: K[]): Pick; // for dynamic K function getProperties( - obj: ComputedProperties, + obj: ComputedPropertyGetters, ...list: K[] ): Pick; function getProperties(obj: T, ...list: K[]): Pick; // for dynamic K @@ -3119,14 +3128,14 @@ declare module 'ember' { * the function will be invoked. If the property is not defined but the * object implements the `unknownProperty` method then that will be invoked. */ - function get(obj: ComputedProperties, key: K): T[K]; + function get(obj: ComputedPropertyGetters, key: K): T[K]; function get(obj: T, key: K): T[K]; // for dynamic K /** * Retrieves the value of a property from an Object, or a default value in the * case that the property returns `undefined`. */ function getWithDefault( - obj: ComputedProperties, + obj: ComputedPropertyGetters, key: K, defaultValue: T[K] ): T[K]; @@ -3138,7 +3147,7 @@ declare module 'ember' { * method then that will be invoked as well. */ function set( - obj: ComputedProperties, + obj: ComputedPropertySetters, key: K, value: V ): V; @@ -3154,7 +3163,7 @@ declare module 'ember' { * observers will be buffered. */ function setProperties( - obj: ComputedProperties, + obj: ComputedPropertySetters, hash: Pick ): Pick; function setProperties(obj: T, hash: Pick): Pick; // for dynamic K @@ -3305,6 +3314,7 @@ declare module 'ember' { * @param options optional hash with a queryParams property containing a * mapping of query parameters */ + isActive(routeName: string, options?: { queryParams: object }): boolean; isActive(routeName: string, models: RouteModel, options?: { queryParams: object }): boolean; isActive(routeName: string, modelsA: RouteModel, modelsB: RouteModel, options?: { queryParams: object }): boolean; isActive(routeName: string, modelsA: RouteModel, modelsB: RouteModel, modelsC: RouteModel, options?: { queryParams: object }): boolean; @@ -3322,6 +3332,7 @@ declare module 'ember' { * containing a mapping of query parameters * @returns the Transition object associated with this attempted transition */ + replaceWith(routeNameOrUrl: string, options?: { queryParams: object }): Ember.Transition; replaceWith(routeNameOrUrl: string, models: RouteModel, options?: { queryParams: object }): Ember.Transition; replaceWith(routeNameOrUrl: string, modelsA: RouteModel, modelsB: RouteModel, options?: { queryParams: object }): Ember.Transition; replaceWith(routeNameOrUrl: string, modelsA: RouteModel, modelsB: RouteModel, modelsC: RouteModel, options?: { queryParams: object }): Ember.Transition; @@ -3339,6 +3350,7 @@ declare module 'ember' { * containing a mapping of query parameters * @returns the Transition object associated with this attempted transition */ + transitionTo(routeNameOrUrl: string, options?: { queryParam: object }): Ember.Transition; transitionTo(routeNameOrUrl: string, models: RouteModel, options?: { queryParams: object }): Ember.Transition; transitionTo(routeNameOrUrl: string, modelsA: RouteModel, modelsB: RouteModel, options?: { queryParams: object }): Ember.Transition; transitionTo(routeNameOrUrl: string, modelsA: RouteModel, modelsB: RouteModel, modelsC: RouteModel, options?: { queryParams: object }): Ember.Transition; @@ -3355,6 +3367,7 @@ declare module 'ember' { * a mapping of query parameters * @returns the string representing the generated URL */ + urlFor(routeName: string, options?: { queryParams: object }): string; urlFor(routeName: string, models: RouteModel, options?: { queryParams: object }): string; urlFor(routeName: string, modelsA: RouteModel, modelsB: RouteModel, options?: { queryParams: object }): string; urlFor(routeName: string, modelsA: RouteModel, modelsB: RouteModel, modelsC: RouteModel, options?: { queryParams: object }): string; @@ -3402,6 +3415,7 @@ declare module '@ember/application/resolver' { declare module '@ember/array' { import Ember from 'ember'; + type EmberArray = Ember.Array; const EmberArray: typeof Ember.Array; export default EmberArray; export const A: typeof Ember.A; @@ -3411,6 +3425,7 @@ declare module '@ember/array' { declare module '@ember/array/mutable' { import Ember from 'ember'; + type MutableArray = Ember.MutableArray; const MutableArray: typeof Ember.MutableArray; export default MutableArray; } @@ -3433,7 +3448,20 @@ declare module '@ember/component/checkbox' { declare module '@ember/component/helper' { import Ember from 'ember'; export default class Helper extends Ember.Helper { } - export const helper: typeof Ember.Helper.helper; + /** + * In many cases, the ceremony of a full `Helper` class is not required. + * The `helper` method create pure-function helpers without instances. For + * example: + * ```app/helpers/format-currency.js + * import { helper } from '@ember/component/helper'; + * export default helper(function(params, hash) { + * let cents = params[0]; + * let currency = hash.currency; + * return `${currency}${cents * 0.01}`; + * }); + * ``` + */ + export function helper(helperFn: (params: any[], hash?: any) => string): any; } declare module '@ember/component/text-area' { @@ -3490,10 +3518,17 @@ declare module '@ember/engine/instance' { declare module '@ember/enumerable' { import Ember from 'ember'; + type Enumerable = Ember.Enumerable; const Enumerable: typeof Ember.Enumerable; export default Enumerable; } +declare module '@ember/error' { + import Ember from 'ember'; + const Error: typeof Ember.Error; + export default Error; +} + declare module '@ember/instrumentation' { import Ember from 'ember'; export const instrument: typeof Ember.instrument; @@ -3529,7 +3564,7 @@ declare module '@ember/object' { declare module '@ember/object/computed' { import Ember from 'ember'; - export default class ComputedProperty extends Ember.ComputedProperty { } + export default class ComputedProperty extends Ember.ComputedProperty { } export const alias: typeof Ember.computed.alias; export const and: typeof Ember.computed.and; export const bool: typeof Ember.computed.bool; @@ -3572,6 +3607,7 @@ declare module '@ember/object/core' { declare module '@ember/object/evented' { import Ember from 'ember'; + type Evented = Ember.Evented; const Evented: typeof Ember.Evented; export default Evented; export const on: typeof Ember.on; @@ -3598,6 +3634,7 @@ declare module '@ember/object/mixin' { declare module '@ember/object/observable' { import Ember from 'ember'; + type Observable = Ember.Observable; const Observable: typeof Ember.Observable; export default Observable; } @@ -3610,6 +3647,7 @@ declare module '@ember/object/observers' { declare module '@ember/object/promise-proxy-mixin' { import Ember from 'ember'; + type PromiseProxyMixin = Ember.PromiseProxyMixin; const PromiseProxyMixin: typeof Ember.PromiseProxyMixin; export default PromiseProxyMixin; } diff --git a/types/ember/test/application-instance.ts b/types/ember/test/application-instance.ts new file mode 100644 index 0000000000..dfda446463 --- /dev/null +++ b/types/ember/test/application-instance.ts @@ -0,0 +1,17 @@ +import ApplicationInstance from '@ember/application/instance'; + +const appInstance = ApplicationInstance.create(); +appInstance.register('some:injection', class Foo {}); + +appInstance.register('some:injection', class Foo {}, { + singleton: true, +}); + +appInstance.register('some:injection', class Foo {}, { + instantiate: false, +}); + +appInstance.register('some:injection', class Foo {}, { + singleton: false, + instantiate: true, +}); diff --git a/types/ember/test/array-ext.ts b/types/ember/test/array-ext.ts index 86e84fd7c5..059d60c00c 100755 --- a/types/ember/test/array-ext.ts +++ b/types/ember/test/array-ext.ts @@ -16,3 +16,6 @@ assertType(array.get('length')); assertType(array.get('firstObject')); assertType(array.mapBy('name')); assertType(array.map(p => p.get('name'))); +assertType(array.sortBy('name')); +assertType(array.uniq()); +assertType(array.uniqBy('name')); diff --git a/types/ember/test/error.ts b/types/ember/test/error.ts new file mode 100644 index 0000000000..ad3c2ee8c3 --- /dev/null +++ b/types/ember/test/error.ts @@ -0,0 +1,6 @@ +import { assertType } from "./lib/assert"; + +import Ember from "ember"; +import EmberError from "@ember/error"; + +assertType(EmberError); diff --git a/types/ember/test/helper.ts b/types/ember/test/helper.ts index efe3ce33d7..cba5709b10 100755 --- a/types/ember/test/helper.ts +++ b/types/ember/test/helper.ts @@ -25,3 +25,11 @@ const CurrentUserEmailHelper = Ember.Helper.extend({ .get('email'); }, }); + +import { helper } from '@ember/component/helper'; + +function typedHelp(/*params, hash*/) { + return 'my type of help'; +} + +export default helper(typedHelp); diff --git a/types/ember/test/object.ts b/types/ember/test/object.ts index cfe2c9380f..e1eefb75e9 100755 --- a/types/ember/test/object.ts +++ b/types/ember/test/object.ts @@ -13,3 +13,15 @@ const LifetimeHooks = Ember.Object.extend({ this._super(); } }); + +class MyObject30 extends Ember.Object { + constructor() { + super(); + } +} + +class MyObject31 extends Ember.Object { + constructor(properties: object) { + super(properties); + } +} diff --git a/types/ember/test/router.ts b/types/ember/test/router.ts index 9ec79ce281..c663083679 100755 --- a/types/ember/test/router.ts +++ b/types/ember/test/router.ts @@ -22,3 +22,21 @@ AppRouter.map(function() { this.mount('my-engine'); this.mount('my-engine', { as: 'some-other-engine', path: '/some-other-engine'}); }); + +const RouterServiceConsumer = Ember.Service.extend({ + router: Ember.inject.service('router'), + transitionWithoutModel() { + Ember.get(this, 'router') + .transitionTo('some-route'); + }, + transitionWithModel() { + const model = Ember.Object.create(); + Ember.get(this, 'router') + .transitionTo('some.other.route', model); + }, + transitionWithModelAndOptions() { + const model = Ember.Object.create(); + Ember.get(this, 'router') + .transitionTo('index', model, { queryParams: { search: 'ember' }}); + } +}); diff --git a/types/ember/tsconfig.json b/types/ember/tsconfig.json index 19c8cf4b50..b4bc966044 100755 --- a/types/ember/tsconfig.json +++ b/types/ember/tsconfig.json @@ -22,7 +22,9 @@ "index.d.ts", "test/lib/assert.ts", "test/application.ts", + "test/application-instance.ts", "test/ember-tests.ts", + "test/error.ts", "test/event.ts", "test/extend.ts", "test/create.ts", @@ -49,4 +51,4 @@ "test/route.ts", "test/view-utils.ts" ] -} \ No newline at end of file +} diff --git a/types/enhanced-resolve/index.d.ts b/types/enhanced-resolve/index.d.ts index 5a39b4f6d0..1cf3a3397a 100644 --- a/types/enhanced-resolve/index.d.ts +++ b/types/enhanced-resolve/index.d.ts @@ -1,7 +1,8 @@ // Type definitions for enhanced-resolve v3.0.0 // Project: https://github.com/webpack/enhanced-resolve.git -// Definitions by: e-cloud , Onigoetz +// Definitions by: e-cloud , Onigoetz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// /// diff --git a/types/enhanced-resolve/tsconfig.json b/types/enhanced-resolve/tsconfig.json index 9c87f7e7a1..c2716adaa1 100644 --- a/types/enhanced-resolve/tsconfig.json +++ b/types/enhanced-resolve/tsconfig.json @@ -14,7 +14,10 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "paths": { + "tapable": ["tapable/v0"] + } }, "files": [ "index.d.ts", diff --git a/types/enquire.js/enquire.js-tests.ts b/types/enquire.js/enquire.js-tests.ts new file mode 100644 index 0000000000..a11ba053c2 --- /dev/null +++ b/types/enquire.js/enquire.js-tests.ts @@ -0,0 +1,17 @@ +import enquire = require('enquire.js'); + +enquire + .register('(min-width: 300px) and (max-width: 600px)', { + deferSetup: true, + match: () => {}, + unmatch: () => {}, + setup: () => {}, + destroy: () => {} + }) + .register('(min-width: 300px) and (max-width: 600px)', {}); + +enquire.register('(min-width: 300px) and (max-width: 600px)', [{}, {}], true); + +enquire.register('(min-width: 300px) and (max-width: 600px)', () => {}, true); + +enquire.unregister('(min-width: 300px) and (max-width: 600px)'); diff --git a/types/enquire.js/index.d.ts b/types/enquire.js/index.d.ts new file mode 100644 index 0000000000..d7dcafdc30 --- /dev/null +++ b/types/enquire.js/index.d.ts @@ -0,0 +1,43 @@ +// Type definitions for enquire.js 2.1 +// Project: https://github.com/WickyNilliams/enquire.js/ +// Definitions by: Christian Rackerseder +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +interface Options { + /** + * If set to true, defers execution of the setup function until the first time the media query is matched + */ + deferSetup?: boolean; + /** + * If supplied, triggered when a media query matches. + */ + match?(): void; + /** + * If supplied, triggered when the media query transitions from a matched state to an unmatched state. + */ + unmatch?(): void; + /** + * If supplied, triggered once, when the handler is registered. + */ + setup?(): void; + + /** + * If supplied, triggered when handler is unregistered. Place cleanup code here + */ + destroy?(): void; +} + +type Callback = () => void; + +interface EnquireJs { + register( + mediaQuery: string, + options: Options | Options[] | Callback, + shouldDegrade?: boolean, + ): EnquireJs; + unregister(mediaQuery: string, handler?: Callback | Options): void; +} + +declare const enquire: EnquireJs; +export = enquire; diff --git a/types/enquire.js/tsconfig.json b/types/enquire.js/tsconfig.json new file mode 100644 index 0000000000..ffbd13d6e2 --- /dev/null +++ b/types/enquire.js/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "enquire.js-tests.ts" + ] +} diff --git a/types/enquire.js/tslint.json b/types/enquire.js/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/enquire.js/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/enzyme-redux/enzyme-redux-tests.tsx b/types/enzyme-redux/enzyme-redux-tests.tsx new file mode 100644 index 0000000000..ecd196dfd8 --- /dev/null +++ b/types/enzyme-redux/enzyme-redux-tests.tsx @@ -0,0 +1,9 @@ +import { mountWithState, mountWithStore, shallowWithState, shallowWithStore } from 'enzyme-redux'; +import * as React from 'react'; + +const Component = () =>
component
; +const shallowWithStateWrapper = shallowWithState(, {}); +const shallowWithStoreWrapper = shallowWithStore(, {}); + +const mountWithStateWrapper = mountWithState(, {}); +const mountWithStoreWrapper = mountWithStore(, {}); diff --git a/types/enzyme-redux/index.d.ts b/types/enzyme-redux/index.d.ts new file mode 100644 index 0000000000..ad312d6d1f --- /dev/null +++ b/types/enzyme-redux/index.d.ts @@ -0,0 +1,25 @@ +// Type definitions for enzyme-redux 0.2 +// Project: https://github.com/Knegusen/enzyme-redux#readme +// Definitions by: Dennis Axelsson +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import { ReactWrapper, ShallowWrapper } from 'enzyme'; +import { ReactElement } from 'react'; + +export function shallowWithStore

( + Component: ReactElement

, + store: any +): ShallowWrapper

; +export function mountWithStore

( + Component: ReactElement

, + store: any +): ReactWrapper

; +export function shallowWithState

( + Component: ReactElement

, + state: any +): ShallowWrapper

; +export function mountWithState

( + Component: ReactElement

, + state: any +): ReactWrapper

; diff --git a/types/enzyme-redux/tsconfig.json b/types/enzyme-redux/tsconfig.json new file mode 100644 index 0000000000..7cc21814b3 --- /dev/null +++ b/types/enzyme-redux/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "jsx": "react", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "enzyme-redux-tests.tsx" + ] +} diff --git a/types/enzyme-redux/tslint.json b/types/enzyme-redux/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/enzyme-redux/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/enzyme/enzyme-tests.tsx b/types/enzyme/enzyme-tests.tsx index 50f9bf3f38..bbdd8f404f 100644 --- a/types/enzyme/enzyme-tests.tsx +++ b/types/enzyme/enzyme-tests.tsx @@ -8,13 +8,14 @@ import { configure, EnzymeAdapter, ShallowRendererProps, + ComponentClass as EnzymeComponentClass } from "enzyme"; import { Component, ReactElement, HTMLAttributes, ComponentClass, StatelessComponent } from "react"; // Help classes/interfaces interface MyComponentProps { - stringProp?: string; - numberProp?: number; + stringProp: string; + numberProp: number; } interface AnotherComponentProps { @@ -65,27 +66,27 @@ function configureTest() { // ShallowWrapper function ShallowWrapperTest() { let shallowWrapper: ShallowWrapper = - shallow(); + shallow(); let reactElement: ReactElement; let reactElements: Array>; let domElement: Element; let boolVal: boolean; let stringVal: string; - let numOrStringVal: number | string; + let numOrStringVal: number | string | undefined; let elementWrapper: ShallowWrapper>; let anotherStatelessWrapper: ShallowWrapper; let anotherComponentWrapper: ShallowWrapper; function test_props_state_inferring() { let wrapper: ShallowWrapper; - wrapper = shallow(); + wrapper = shallow(); wrapper.state().stateProperty; wrapper.props().stringProp.toUpperCase(); } function test_shallow_options() { - shallow(, { + shallow(, { context: { test: "a", }, @@ -99,6 +100,9 @@ function ShallowWrapperTest() { anotherStatelessWrapper = shallowWrapper.find(AnotherStatelessComponent); shallowWrapper = shallowWrapper.find({ prop: 'value' }); elementWrapper = shallowWrapper.find('.selector'); + // Since AnotherComponent does not have a constructor, it cannot match the + // previous selector overload of ComponentClass { new(props?, contenxt? ) } + const s1: EnzymeComponentClass = AnotherComponent; } function test_findWhere() { @@ -155,7 +159,7 @@ function ShallowWrapperTest() { } function test_hostNodes() { - shallowWrapper.hostNodes(); + shallowWrapper.hostNodes(); } function test_equals() { @@ -411,20 +415,19 @@ function ShallowWrapperTest() { function test_constructor() { let anyWrapper: ShallowWrapper; - anyWrapper = new ShallowWrapper(); - anyWrapper = new ShallowWrapper(); - shallowWrapper = new ShallowWrapper(); - shallowWrapper = new ShallowWrapper([, ]); - shallowWrapper = new ShallowWrapper(, shallowWrapper); - shallowWrapper = new ShallowWrapper(, null, { lifecycleExperimental: true }); - shallowWrapper = new ShallowWrapper(, shallowWrapper, { lifecycleExperimental: true }); + anyWrapper = new ShallowWrapper(); + shallowWrapper = new ShallowWrapper(); + shallowWrapper = new ShallowWrapper([, ]); + shallowWrapper = new ShallowWrapper(, shallowWrapper); + shallowWrapper = new ShallowWrapper(, undefined, { lifecycleExperimental: true }); + shallowWrapper = new ShallowWrapper(, shallowWrapper, { lifecycleExperimental: true }); } } // ReactWrapper function ReactWrapperTest() { let reactWrapper: ReactWrapper = - mount(); + mount(); let reactElement: ReactElement; let reactElements: Array>; @@ -437,7 +440,7 @@ function ReactWrapperTest() { function test_prop_state_inferring() { let wrapper: ReactWrapper; - wrapper = mount(); + wrapper = mount(); wrapper.state().stateProperty; wrapper.props().stringProp.toUpperCase(); } @@ -449,7 +452,7 @@ function ReactWrapperTest() { function test_mount() { reactWrapper = reactWrapper.mount(); - mount(, { + mount(, { attachTo: document.getElementById('test'), context: { a: "b" @@ -685,7 +688,7 @@ function ReactWrapperTest() { } function test_setProps() { - reactWrapper = reactWrapper.setProps({ stringProp: 'foo' }, () => {}); + reactWrapper = reactWrapper.setProps({ stringProp: 'foo' }, () => { }); } function test_setContext() { @@ -764,13 +767,12 @@ function ReactWrapperTest() { function test_constructor() { let anyWrapper: ReactWrapper; - anyWrapper = new ReactWrapper(); - anyWrapper = new ReactWrapper(); - reactWrapper = new ReactWrapper(); - reactWrapper = new ReactWrapper([, ]); - reactWrapper = new ReactWrapper(, reactWrapper); - reactWrapper = new ReactWrapper(, null, { attachTo: document.createElement('div') }); - reactWrapper = new ReactWrapper(, reactWrapper, { attachTo: document.createElement('div') }); + anyWrapper = new ReactWrapper(); + reactWrapper = new ReactWrapper(); + reactWrapper = new ReactWrapper([, ]); + reactWrapper = new ReactWrapper(, reactWrapper); + reactWrapper = new ReactWrapper(, undefined, { attachTo: document.createElement('div') }); + reactWrapper = new ReactWrapper(, reactWrapper, { attachTo: document.createElement('div') }); } } diff --git a/types/enzyme/index.d.ts b/types/enzyme/index.d.ts index fbb953e167..0a741460f6 100644 --- a/types/enzyme/index.d.ts +++ b/types/enzyme/index.d.ts @@ -23,7 +23,7 @@ export class ElementClass extends Component { * all specified in the implementation. TS chooses the EnzymePropSelector overload and loses the generics */ export interface ComponentClass { - new(props?: Props, context?: any): Component; + new(props: Props, context?: any): Component; } export type StatelessComponent = (props: Props, context?: any) => JSX.Element; @@ -354,7 +354,7 @@ export interface CommonWrapper

{ } // tslint:disable-next-line no-empty-interface -export interface ShallowWrapper

extends CommonWrapper {} +export interface ShallowWrapper

extends CommonWrapper { } export class ShallowWrapper

{ constructor(nodes: JSX.Element[] | JSX.Element, root?: ShallowWrapper, options?: ShallowRendererProps); shallow(options?: ShallowRendererProps): ShallowWrapper; @@ -440,7 +440,7 @@ export class ShallowWrapper

{ } // tslint:disable-next-line no-empty-interface -export interface ReactWrapper

extends CommonWrapper {} +export interface ReactWrapper

extends CommonWrapper { } export class ReactWrapper

{ constructor(nodes: JSX.Element | JSX.Element[], root?: ReactWrapper, options?: MountRendererProps); @@ -577,7 +577,7 @@ export interface MountRendererProps { /** * DOM Element to attach the component to */ - attachTo?: HTMLElement; + attachTo?: HTMLElement | null; /** * Merged contextTypes for all children of the wrapper */ diff --git a/types/enzyme/tsconfig.json b/types/enzyme/tsconfig.json index 096b64a111..c04256e39a 100644 --- a/types/enzyme/tsconfig.json +++ b/types/enzyme/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "jsx": "react", diff --git a/types/es6-shim/index.d.ts b/types/es6-shim/index.d.ts index 51824fc932..2cf61a9362 100644 --- a/types/es6-shim/index.d.ts +++ b/types/es6-shim/index.d.ts @@ -500,7 +500,7 @@ interface PromiseConstructor { /** * Creates a new Promise. * @param executor A callback used to initialize the promise. This callback is passed two arguments: - * a resolve callback used resolve the promise with a value or the result of another promise, + * a resolve callback used to resolve the promise with a value or the result of another promise, * and a reject callback used to reject the promise with a provided reason or error. */ new (executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; diff --git a/types/escape-regexp/escape-regexp-tests.ts b/types/escape-regexp/escape-regexp-tests.ts new file mode 100644 index 0000000000..086ff36348 --- /dev/null +++ b/types/escape-regexp/escape-regexp-tests.ts @@ -0,0 +1,22 @@ +import escapeRegExp = require('escape-regexp'); + +// $ExpectType string +escapeRegExp('aaa'); + +// $ExpectError +escapeRegExp(); + +// $ExpectError +escapeRegExp({}); + +// $ExpectError +escapeRegExp(1); + +// $ExpectError +escapeRegExp([]); + +// $ExpectError +escapeRegExp(null); + +// $ExpectError +escapeRegExp(undefined); diff --git a/types/escape-regexp/index.d.ts b/types/escape-regexp/index.d.ts new file mode 100644 index 0000000000..b1a0ff1edf --- /dev/null +++ b/types/escape-regexp/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for escape-regexp 0.0 +// Project: https://www.npmjs.com/package/escape-regexp +// Definitions by: Vilim Stubičan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +declare function escapeRegExp(str: string): string; + +export = escapeRegExp; diff --git a/types/escape-regexp/tsconfig.json b/types/escape-regexp/tsconfig.json new file mode 100644 index 0000000000..1037db1961 --- /dev/null +++ b/types/escape-regexp/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "escape-regexp-tests.ts" + ] +} diff --git a/types/escape-regexp/tslint.json b/types/escape-regexp/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/escape-regexp/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/estree/estree-tests.ts b/types/estree/estree-tests.ts index 5cd065d03f..24e92ddc38 100644 --- a/types/estree/estree-tests.ts +++ b/types/estree/estree-tests.ts @@ -223,7 +223,8 @@ boolean = memberExpression.computed; // Declarations var functionDeclaration: ESTree.FunctionDeclaration; -identifier = functionDeclaration.id; +var identifierOrNull: ESTree.Identifier | null = functionDeclaration.id; +functionDeclaration.id = null; var params: Array = functionDeclaration.params; blockStatement = functionDeclaration.body; booleanMaybe = functionDeclaration.generator; @@ -237,6 +238,10 @@ var variableDeclarator: ESTree.VariableDeclarator; pattern = variableDeclarator.id; // Pattern expressionMaybe = variableDeclarator.init; +var classDeclaration: ESTree.ClassDeclaration; +identifierOrNull = classDeclaration.id; +classDeclaration.id = null; + // Clauses // SwitchCase string = switchCase.type; diff --git a/types/estree/index.d.ts b/types/estree/index.d.ts index 068cbfd8ce..0133991c9f 100644 --- a/types/estree/index.d.ts +++ b/types/estree/index.d.ts @@ -196,7 +196,8 @@ interface BaseDeclaration extends BaseStatement { } export interface FunctionDeclaration extends BaseFunction, BaseDeclaration { type: "FunctionDeclaration"; - id: Identifier; + /** It is null when a function declaration is a part of the `export default function` statement */ + id: Identifier | null; body: BlockStatement; } @@ -473,7 +474,8 @@ export interface MethodDefinition extends BaseNode { export interface ClassDeclaration extends BaseClass, BaseDeclaration { type: "ClassDeclaration"; - id: Identifier; + /** It is null when a class declaration is a part of the `export default class` statement */ + id: Identifier | null; } export interface ClassExpression extends BaseClass, BaseExpression { diff --git a/types/ethereumjs-util/ethereumjs-util-tests.ts b/types/ethereumjs-util/ethereumjs-util-tests.ts new file mode 100644 index 0000000000..5159dcf758 --- /dev/null +++ b/types/ethereumjs-util/ethereumjs-util-tests.ts @@ -0,0 +1,4 @@ +import * as assert from "assert"; +import * as etherUtil from "ethereumjs-util"; + +assert.ok(etherUtil.isValidAddress("0x0bfe6d9a4d4a73857db6fac276669ba45ee69b48")); diff --git a/types/ethereumjs-util/index.d.ts b/types/ethereumjs-util/index.d.ts new file mode 100644 index 0000000000..eb47d3a6a9 --- /dev/null +++ b/types/ethereumjs-util/index.d.ts @@ -0,0 +1,83 @@ +// Type definitions for ethereumjs-util 5.1 +// Project: https://github.com/ethereumjs/ethereumjs-util#readme +// Definitions by: Juan J. Jimenez-Anca +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +// TODO: import types for [`BN`](https://github.com/indutny/bn.js) +// TODO: MAX_INTEGER as type of BN +// TODO: import types for [`rlp`](https://github.com/ethereumjs/rlp) +// TODO: import types for [`secp256k1`](https://github.com/cryptocoinjs/secp256k1-node/) + +export const SHA3_NULL_S: string; + +export const SHA3_RLP_ARRAY_S: string; + +export const SHA3_RLP_S: string; + +export function addHexPrefix(str: string): string; + +export function arrayContainsArray(superset: any, subset: any, some: any): any; + +export function baToJSON(ba: Buffer | Uint8Array | string[]): Buffer | Uint8Array | string[]; + +export function bufferToHex(buf: Buffer | Uint8Array): string; + +export function bufferToInt(buf: Buffer | Uint8Array): string; + +export function defineProperties(self: {[k: string]: any}, fields: string[], data: {[k: string]: any}): {[k: string]: any}; + +export function ecrecover(msgHash: Buffer | Uint8Array, v: number, r: Buffer | Uint8Array, s: Buffer | Uint8Array): Buffer | Uint8Array; + +export function ecsign(msgHash: Buffer | Uint8Array, privateKey: Buffer | Uint8Array): {[k: string]: any}; + +export function fromRpcSig(sig: string): {[k: string]: any}; + +export function fromSigned(num: Buffer | Uint8Array): any; + +export function generateAddress(from: Buffer | Uint8Array, nonce: Buffer | Uint8Array): Buffer | Uint8Array; + +export function hashPersonalMessage(message: string): Buffer | Uint8Array; + +export function importPublic(publicKey: Buffer | Uint8Array): Buffer | Uint8Array; + +export function isValidAddress(address: string): boolean; + +export function isValidChecksumAddress(address: Buffer | Uint8Array): boolean; + +export function isValidPrivate(privateKey: Buffer | Uint8Array): boolean; + +export function isValidPublic(publicKey: Buffer | Uint8Array, sanitize?: boolean): any; + +export function isValidSignature(v: Buffer | Uint8Array, r: Buffer | Uint8Array, s: Buffer | Uint8Array, homestead?: boolean): boolean; + +export function privateToAddress(privateKey: Buffer | Uint8Array): Buffer | Uint8Array; + +export function privateToPublic(privateKey: Buffer | Uint8Array): Buffer | Uint8Array; + +export function pubToAddress(pubKey: Buffer | Uint8Array, sanitize: boolean): Buffer | Uint8Array; + +export function ripemd160(a: Buffer | Uint8Array | any[] | string | number, padded: boolean): Buffer | Uint8Array; + +export function rlphash(a: Buffer | Uint8Array | any[] | string | number): Buffer | Uint8Array; + +export function setLengthLeft(msg: Buffer | Uint8Array | any[], length: number, right?: boolean): Buffer | Uint8Array | any[]; + +export function setLengthRight(msg: Buffer | Uint8Array | any[], length: number): Buffer | Uint8Array | any[]; + +export function sha256(a: Buffer | Uint8Array | any[] | string | number): Buffer | Uint8Array; + +export function sha3(a: Buffer | Uint8Array | any[] | string | number, bits?: number): Buffer | Uint8Array; + +export function toBuffer(v: any): Buffer | Uint8Array; + +export function toChecksumAddress(address: string): string; + +export function toRpcSig(v: number, r: Buffer | Uint8Array, s: Buffer | Uint8Array): string; + +export function toUnsigned(num: any): Buffer | Uint8Array; + +export function unpad(a: T): T; + +export function zeros(bytes: number): Buffer | Uint8Array; diff --git a/types/ethereumjs-util/tsconfig.json b/types/ethereumjs-util/tsconfig.json new file mode 100644 index 0000000000..53f8c15b5b --- /dev/null +++ b/types/ethereumjs-util/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "ethereumjs-util-tests.ts" + ] +} \ No newline at end of file diff --git a/types/ethereumjs-util/tslint.json b/types/ethereumjs-util/tslint.json new file mode 100644 index 0000000000..a0051c9352 --- /dev/null +++ b/types/ethereumjs-util/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/event-emitter-es6/event-emitter-es6-tests.ts b/types/event-emitter-es6/event-emitter-es6-tests.ts new file mode 100644 index 0000000000..8001d2605e --- /dev/null +++ b/types/event-emitter-es6/event-emitter-es6-tests.ts @@ -0,0 +1,17 @@ +import EventEmitter = require("event-emitter-es6"); + +const ee = new EventEmitter(); +const ee1 = new EventEmitter({ emitDelay: 50 }); +const ee2 = new EventEmitter({ strictMode: true }); +const ee3 = new EventEmitter({ strictMode: false, emitDelay: 5 }); +const ee4 = new EventEmitter({}); + +ee.on("test", () => {}); +ee.once("test", () => {}); +ee.off("test", () => {}); +ee.off("test"); +ee.emit("test"); +ee.emit("test", 1, 2, 3, "a", "b", "c"); +ee.emitSync("test"); +ee.emitSync("test", 1, 2, 3, "a", "b", "c"); +ee.destroy(); diff --git a/types/event-emitter-es6/index.d.ts b/types/event-emitter-es6/index.d.ts new file mode 100644 index 0000000000..840f2ddf38 --- /dev/null +++ b/types/event-emitter-es6/index.d.ts @@ -0,0 +1,23 @@ +// Type definitions for event-emitter-es6 1.1 +// Project: https://github.com/insane-jo/event-emitter#readme +// Definitions by: Anton Strömkvist +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface Options { + emitDelay?: number; + strictMode?: boolean; +} + +type Listener = (...args: any[]) => void; + +declare class EventEmitter { + constructor(options?: Options); + on(type: string, listener: Listener): void; + once(type: string, listener: Listener): void; + off(type: string, listener?: Listener): void; + emit(type: string, ...eventArgs: any[]): void; + emitSync(type: string, ...eventArgs: any[]): void; + destroy(): void; +} + +export = EventEmitter; diff --git a/types/event-emitter-es6/tsconfig.json b/types/event-emitter-es6/tsconfig.json new file mode 100644 index 0000000000..f450ea2a8a --- /dev/null +++ b/types/event-emitter-es6/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "event-emitter-es6-tests.ts" + ] +} diff --git a/types/event-emitter-es6/tslint.json b/types/event-emitter-es6/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/event-emitter-es6/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/event-hooks-webpack-plugin/event-hooks-webpack-plugin-tests.ts b/types/event-hooks-webpack-plugin/event-hooks-webpack-plugin-tests.ts new file mode 100644 index 0000000000..b55f55d85f --- /dev/null +++ b/types/event-hooks-webpack-plugin/event-hooks-webpack-plugin-tests.ts @@ -0,0 +1,32 @@ +import EventHooksPlugin = require('event-hooks-webpack-plugin'); + +new EventHooksPlugin({}); +new EventHooksPlugin({ + done: () => {}, +}); +new EventHooksPlugin({ + shouldEmit: () => {}, + done: () => {}, + additionalPass: () => {}, + beforeRun: () => {}, + run: () => {}, + emit: () => {}, + afterEmit: () => {}, + thisCompilation: () => {}, + compilation: () => {}, + normalModuleFactory: () => {}, + contextModuleFactory: () => {}, + beforeCompile: () => {}, + compile: () => {}, + make: () => {}, + afterCompile: () => {}, + watchRun: () => {}, + failed: () => {}, + invalid: () => {}, + watchClose: () => {}, + environment: () => {}, + afterEnvironment: () => {}, + afterPlugins: () => {}, + afterResolvers: () => {}, + entryOption: () => {}, +}); diff --git a/types/event-hooks-webpack-plugin/index.d.ts b/types/event-hooks-webpack-plugin/index.d.ts new file mode 100644 index 0000000000..ceb78cd3e6 --- /dev/null +++ b/types/event-hooks-webpack-plugin/index.d.ts @@ -0,0 +1,42 @@ +// Type definitions for event-hooks-webpack-plugin 2.0 +// Project: https://github.com/cascornelissen/event-hooks-webpack-plugin +// Definitions by: Pine Mizune +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import { Plugin } from 'webpack'; + +export = EventHooksPlugin; + +declare namespace EventHooksPlugin { + interface Options { + shouldEmit?: () => void; + done?: () => void; + additionalPass?: () => void; + beforeRun?: () => void; + run?: () => void; + emit?: () => void; + afterEmit?: () => void; + thisCompilation?: () => void; + compilation?: () => void; + normalModuleFactory?: () => void; + contextModuleFactory?: () => void; + beforeCompile?: () => void; + compile?: () => void; + make?: () => void; + afterCompile?: () => void; + watchRun?: () => void; + failed?: () => void; + invalid?: () => void; + watchClose?: () => void; + environment?: () => void; + afterEnvironment?: () => void; + afterPlugins?: () => void; + afterResolvers?: () => void; + entryOption?: () => void; + } +} + +declare class EventHooksPlugin extends Plugin { + constructor(options?: EventHooksPlugin.Options); +} diff --git a/types/event-hooks-webpack-plugin/tsconfig.json b/types/event-hooks-webpack-plugin/tsconfig.json new file mode 100644 index 0000000000..51562ab223 --- /dev/null +++ b/types/event-hooks-webpack-plugin/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "event-hooks-webpack-plugin-tests.ts" + ] +} diff --git a/types/event-hooks-webpack-plugin/tslint.json b/types/event-hooks-webpack-plugin/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/event-hooks-webpack-plugin/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/event-kit/index.d.ts b/types/event-kit/index.d.ts index 2208ffaae3..aa0275d8a8 100644 --- a/types/event-kit/index.d.ts +++ b/types/event-kit/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for event-kit 2.x +// Type definitions for event-kit 2.4 // Project: https://github.com/atom/event-kit // Definitions by: GlenCFL // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -69,7 +69,8 @@ export class CompositeDisposable implements DisposableLike { * for handlers registered via ::on to be invoked with calls to ::emit. */ // tslint:disable-next-line:no-any -export class Emitter implements DisposableLike { +export class Emitter + implements DisposableLike { disposed: boolean; /** Construct an emitter. */ @@ -83,31 +84,58 @@ export class Emitter implements DisposableLi // Event Subscription /** Registers a handler to be invoked whenever the given event is emitted. */ - on(eventName: T, handler: (value?: Emissions[T]) => void): - Disposable; + on(eventName: T, handler: (value?: + OptionalEmissions[T]) => void): Disposable; + /** Registers a handler to be invoked whenever the given event is emitted. */ + on(eventName: T, handler: (value: + RequiredEmissions[T]) => void): Disposable; /** * Register the given handler function to be invoked the next time an event * with the given name is emitted via ::emit. */ - once(eventName: T, handler: (value?: Emissions[T]) => void): - Disposable; + once(eventName: T, handler: (value?: + OptionalEmissions[T]) => void): Disposable; + /** + * Register the given handler function to be invoked the next time an event + * with the given name is emitted via ::emit. + */ + once(eventName: T, handler: (value: + RequiredEmissions[T]) => void): Disposable; /** * Register the given handler function to be invoked before all other * handlers existing at the time of subscription whenever events by the * given name are emitted via ::emit. */ - preempt(eventName: T, handler: (value?: Emissions[T]) => void): - Disposable; + preempt(eventName: T, handler: (value?: + OptionalEmissions[T]) => void): Disposable; + /** + * Register the given handler function to be invoked before all other + * handlers existing at the time of subscription whenever events by the + * given name are emitted via ::emit. + */ + preempt(eventName: T, handler: (value: + RequiredEmissions[T]) => void): Disposable; // Event Emission /** Invoke the handlers registered via ::on for the given event name. */ - emit(eventName: T, value?: Emissions[T]): void; + emit(eventName: T, value?: + OptionalEmissions[T]): void; + /** Invoke the handlers registered via ::on for the given event name. */ + emit(eventName: T, value: + RequiredEmissions[T]): void; /** * Asynchronously invoke the handlers registered via ::on for the given event name. * @return A promise that will be fulfilled once all handlers have been invoked. */ - emitAsync(eventName: T, value?: Emissions[T]): Promise; + emitAsync(eventName: T, value?: + OptionalEmissions[T]): Promise; + /** + * Asynchronously invoke the handlers registered via ::on for the given event name. + * @return A promise that will be fulfilled once all handlers have been invoked. + */ + emitAsync(eventName: T, value: + RequiredEmissions[T]): Promise; } diff --git a/types/eventsource/eventsource-tests.ts b/types/eventsource/eventsource-tests.ts new file mode 100644 index 0000000000..d081e87e42 --- /dev/null +++ b/types/eventsource/eventsource-tests.ts @@ -0,0 +1,15 @@ +import EventSource = require("eventsource"); + +const eventSource = new EventSource("http://foobar"); +eventSource.onmessage = (x: any) => {}; +eventSource.onerror = (x: any) => {}; +eventSource.onopen = (x: any) => {}; +eventSource.close(); + +import EventSourcePolyfill = require("eventsource/lib/eventsource-polyfill"); + +const eventSourcePolyfill = new EventSourcePolyfill("http://foobar"); +eventSourcePolyfill.onmessage = (x: any) => {}; +eventSourcePolyfill.onerror = (x: any) => {}; +eventSourcePolyfill.onopen = (x: any) => {}; +eventSourcePolyfill.close(); diff --git a/types/eventsource/index.d.ts b/types/eventsource/index.d.ts new file mode 100644 index 0000000000..3620b6116f --- /dev/null +++ b/types/eventsource/index.d.ts @@ -0,0 +1,35 @@ +// Type definitions for eventsource 1.0 +// Project: http://github.com/EventSource/eventsource +// Definitions by: Scott Lee Davis +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +declare class EventSource { + constructor(url: string, eventSourceInitDict?: EventSource.EventSourceInitDict); + + static CLOSED: EventSource.ReadyState; + static CONNECTING: EventSource.ReadyState; + static OPEN: EventSource.ReadyState; + + url: string; + readyState: EventSource.ReadyState; + onopen: EventListener; + onmessage: EventListener; + onerror: EventListener; + close(): void; +} + +declare namespace EventSource { + enum ReadyState {CONNECTING = 0, OPEN = 1, CLOSED = 2} + + interface EventSourceInitDict { + withCredentials?: boolean; + headers?: object; + proxy?: string; + https?: object; + rejectUnauthorized?: boolean; + } +} + +export = EventSource; +export as namespace EventSource; diff --git a/types/eventsource/lib/eventsource-polyfill/index.d.ts b/types/eventsource/lib/eventsource-polyfill/index.d.ts new file mode 100644 index 0000000000..6246355dfe --- /dev/null +++ b/types/eventsource/lib/eventsource-polyfill/index.d.ts @@ -0,0 +1,29 @@ +declare class EventSource { + constructor(url: string, eventSourceInitDict?: EventSource.EventSourceInitDict); + + static CLOSED: EventSource.ReadyState; + static CONNECTING: EventSource.ReadyState; + static OPEN: EventSource.ReadyState; + + url: string; + readyState: EventSource.ReadyState; + onopen: EventListener; + onmessage: EventListener; + onerror: EventListener; + close(): void; +} + +declare namespace EventSource { + enum ReadyState {CONNECTING = 0, OPEN = 1, CLOSED = 2} + + interface EventSourceInitDict { + withCredentials?: boolean; + headers?: object; + proxy?: string; + https?: object; + rejectUnauthorized?: boolean; + } +} + +export = EventSource; +export as namespace EventSource; diff --git a/types/eventsource/tsconfig.json b/types/eventsource/tsconfig.json new file mode 100644 index 0000000000..4a714cf00a --- /dev/null +++ b/types/eventsource/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "eventsource-tests.ts", + "lib/eventsource-polyfill/index.d.ts" + ] +} diff --git a/types/eventsource/tslint.json b/types/eventsource/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/eventsource/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/excel-style-dataformatter/excel-style-dataformatter-tests.ts b/types/excel-style-dataformatter/excel-style-dataformatter-tests.ts new file mode 100644 index 0000000000..828771242e --- /dev/null +++ b/types/excel-style-dataformatter/excel-style-dataformatter-tests.ts @@ -0,0 +1,33 @@ +import * as DataFormatter from "excel-style-dataformatter"; +import * as enLocales from "excel-style-dataformatter/lib/locales/en-US"; +import * as ruLocales from "excel-style-dataformatter/lib/locales/ru"; + +const localesOptions: DataFormatter.LocalesOptions = { + name: "test", + months: ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'], + monthsShort: ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'], + days: ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'], + daysShort: ['su', 'mo', 'tu', 'we', 'th', 'fr', 'sa'], + thousandSeparator: ',', + decimalSeparator: '.', + formats: { + 'Test format 1': '#.#', + 'Test format 2': '$ #,##0.00;[Red]$ -#,##0.00', + } +}; +const formatterOptions: DataFormatter.FormatterOptions = { + debug: true, + UTCOffset: 100, + locale: "test", + transformCode: (code: string): string => { + return code + "string"; + }, + locales: [localesOptions, ruLocales] +}; +const dataFormatter1 = new DataFormatter(formatterOptions); +const dataFormatter2 = new DataFormatter(); +dataFormatter2.defineLocales([enLocales, ruLocales]); +dataFormatter2.setLocale("ru"); +dataFormatter2.setUTCOffset(null); +dataFormatter2.setUTCOffset(100); +const result: DataFormatter.FormatResult = dataFormatter2.format("testValue", "testType", "testFormat"); diff --git a/types/excel-style-dataformatter/index.d.ts b/types/excel-style-dataformatter/index.d.ts new file mode 100644 index 0000000000..7f76ee6987 --- /dev/null +++ b/types/excel-style-dataformatter/index.d.ts @@ -0,0 +1,63 @@ +// Type definitions for excel-style-dataformatter 2.0 +// Project: https://github.com/fakundo/Excel-Style-Javascript-DataFormatter +// Definitions by: SanderDeWaal1992 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare class DataFormatter { + constructor(options?: DataFormatter.FormatterOptions); + + /** + * Format a value + * @param value + * @param type value type + * @param format format preset + */ + format(value: any, type: string, format: string): DataFormatter.FormatResult; + /** + * Defines locales + * @param locales + */ + defineLocales(locales: DataFormatter.LocalesOptions[]): void; + /** + * Sets locale + * If locale doesn't exist, sets default + * @param locale + */ + setLocale(locale: string): void; + /** + * Sets UTC offset for dates + * @param offset in minutes + */ + setUTCOffset(offset: number | null): void; +} + +declare namespace DataFormatter { + interface LocalesOptions { + name: string; + months: string[]; + monthsShort: string[]; + days: string[]; + daysShort: string[]; + thousandSeparator: string; + decimalSeparator: string; + formats: { + [index: string]: string + }; + } + interface FormatterOptions { + debug?: boolean; + UTCOffset?: number | null; + locale?: string; + transformCode?: (code: any) => any; + locales?: LocalesOptions[]; + } + + interface FormatResult { + value: string; + align: string; + color: string; + pattern: string; + } +} + +export = DataFormatter; diff --git a/types/excel-style-dataformatter/lib/locales/en-US.d.ts b/types/excel-style-dataformatter/lib/locales/en-US.d.ts new file mode 100644 index 0000000000..591678aea8 --- /dev/null +++ b/types/excel-style-dataformatter/lib/locales/en-US.d.ts @@ -0,0 +1,4 @@ +import * as DataFormatter from "../../index"; + +declare const locale: DataFormatter.LocalesOptions; +export = locale; diff --git a/types/excel-style-dataformatter/lib/locales/ru.d.ts b/types/excel-style-dataformatter/lib/locales/ru.d.ts new file mode 100644 index 0000000000..591678aea8 --- /dev/null +++ b/types/excel-style-dataformatter/lib/locales/ru.d.ts @@ -0,0 +1,4 @@ +import * as DataFormatter from "../../index"; + +declare const locale: DataFormatter.LocalesOptions; +export = locale; diff --git a/types/excel-style-dataformatter/tsconfig.json b/types/excel-style-dataformatter/tsconfig.json new file mode 100644 index 0000000000..563681d3ac --- /dev/null +++ b/types/excel-style-dataformatter/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "lib/locales/en-US.d.ts", + "lib/locales/ru.d.ts", + "excel-style-dataformatter-tests.ts" + ] +} diff --git a/types/excel-style-dataformatter/tslint.json b/types/excel-style-dataformatter/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/excel-style-dataformatter/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/execa/execa-tests.ts b/types/execa/execa-tests.ts index 2525091f2a..ecc966d3d5 100644 --- a/types/execa/execa-tests.ts +++ b/types/execa/execa-tests.ts @@ -1,46 +1,38 @@ import assert = require('assert'); import execa = require('execa'); -import { PassThrough } from "stream"; +import { PassThrough } from 'stream'; -execa('unicorns') - .then(result => { - assert(result.cmd === 'unicorns'); - assert(result.code === 0); - assert(result.failed === false); - assert(result.killed === false); - assert(result.signal === null); - assert(result.stderr === 'bad unicorns'); - assert(result.stdout === 'good unicorns'); - assert(result.timedOut === false); - }); +execa('unicorns').then(result => { + assert(result.cmd === 'unicorns'); + assert(result.code === 0); + assert(result.failed === false); + assert(result.killed === false); + assert(result.signal === null); + assert(result.stderr === 'bad unicorns'); + assert(result.stdout === 'good unicorns'); + assert(result.timedOut === false); +}); -execa('foo') - .catch(error => { - assert(error.cmd === 'foo'); - assert(error.code === 128); - assert(error.failed === true); - assert(error.killed === false); - assert(error.signal === 'SIGINT'); - assert(error.stderr === 'stderr'); - assert(error.stdout === 'stdout'); - assert(error.timedOut === false); - }); +execa('foo').catch(error => { + assert(error.cmd === 'foo'); + assert(error.code === 128); + assert(error.failed === true); + assert(error.killed === false); + assert(error.signal === 'SIGINT'); + assert(error.stderr === 'stderr'); + assert(error.stdout === 'stdout'); + assert(error.timedOut === false); +}); -execa('noop', ['foo']) - .then(result => result.stderr.toLocaleLowerCase()); +execa('noop', ['foo']).then(result => result.stderr.toLocaleLowerCase()); -execa.stdout('unicorns') - .then(stdout => stdout.toLocaleLowerCase()); -execa.stdout('echo', ['unicorns']) - .then(stdout => stdout.toLocaleLowerCase()); +execa.stdout('unicorns').then(stdout => stdout.toLocaleLowerCase()); +execa.stdout('echo', ['unicorns']).then(stdout => stdout.toLocaleLowerCase()); -execa.stderr('unicorns') - .then(stderr => stderr.toLocaleLowerCase()); -execa.stderr('echo', ['unicorns']) - .then(stderr => stderr.toLocaleLowerCase()); +execa.stderr('unicorns').then(stderr => stderr.toLocaleLowerCase()); +execa.stderr('echo', ['unicorns']).then(stderr => stderr.toLocaleLowerCase()); -execa.shell('echo unicorns') - .then(result => result.stdout.toLocaleLowerCase()); +execa.shell('echo unicorns').then(result => result.stdout.toLocaleLowerCase()); { let result: string; @@ -54,14 +46,14 @@ execa.shell('echo unicorns') execa('echo', ['unicorns']).stdout.pipe(process.stdout); execa('echo', ['unicorns']).stderr.pipe(process.stderr); -execa('forever', {extendEnv: false}).pid; -execa('forever', {argv0: 'hi'}).pid; -execa('forever', {localDir: '~'}).pid; -execa('forever', {reject: false}).pid; -execa('forever', {cleanup: false}).pid; -execa('forever', {stdin: 1}).pid; -execa('forever', {stdout: 'ignore'}).pid; -execa('forever', {stderr: undefined}).pid; +execa('forever', { extendEnv: false }).pid; +execa('forever', { argv0: 'hi' }).pid; +execa('forever', { localDir: '~' }).pid; +execa('forever', { reject: false }).pid; +execa('forever', { cleanup: false }).pid; +execa('forever', { stdin: 1 }).pid; +execa('forever', { stdout: 'ignore' }).pid; +execa('forever', { stderr: undefined }).pid; async () => { const { stdout } = await execa('noop', ['foo'], { stripEof: false }); @@ -119,7 +111,9 @@ async () => { } async () => { - const { timedOut, code } = await execa('delay', ['3000', '22'], { timeout: 9000 }); + const { timedOut, code } = await execa('delay', ['3000', '22'], { + timeout: 9000 + }); assert(timedOut === true); assert(code === 22); }; @@ -131,3 +125,10 @@ async () => { assert(stdout === 'foo'); }; + +const args: ReadonlyArray = ['bar']; +const stdio: ReadonlyArray<'ignore'> = ['ignore']; +execa('foo', args); +execa('foo', args, { + stdio +}); diff --git a/types/execa/index.d.ts b/types/execa/index.d.ts index c3aced26ee..067d36c368 100644 --- a/types/execa/index.d.ts +++ b/types/execa/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for execa 0.8 +// Type definitions for execa 0.9 // Project: https://github.com/sindresorhus/execa#readme // Definitions by: Douglas Duteil // BendingBender @@ -23,7 +23,11 @@ declare namespace execa { * Think of this as a mix of `child_process.execFile` and `child_process.spawn`. * @returns a `child_process` instance which is enhanced to also be a `Promise` for a result `Object` with `stdout` and `stderr` properties. */ - (file: string, args?: string[], options?: Options): ExecaChildProcess; + ( + file: string, + args?: ReadonlyArray, + options?: Options + ): ExecaChildProcess; (file: string, options?: Options): ExecaChildProcess; /** @@ -32,7 +36,11 @@ declare namespace execa { * Think of this as a mix of `child_process.execFile` and `child_process.spawn`. * @returns a `child_process` instance which is enhanced to also be a `Promise` for `stdout`. */ - stdout(file: string, args?: string[], options?: Options): Promise; + stdout( + file: string, + args?: ReadonlyArray, + options?: Options + ): Promise; stdout(file: string, options?: Options): Promise; /** @@ -41,7 +49,11 @@ declare namespace execa { * Think of this as a mix of `child_process.execFile` and `child_process.spawn`. * @returns a `child_process` instance which is enhanced to also be a `Promise` for `stderr`. */ - stderr(file: string, args?: string[], options?: Options): Promise; + stderr( + file: string, + args?: ReadonlyArray, + options?: Options + ): Promise; stderr(file: string, options?: Options): Promise; /** @@ -59,7 +71,11 @@ declare namespace execa { * @returns the same result object as `child_process.spawnSync`. * @throws an `Error` if the command fails. */ - sync(file: string, args?: string[], options?: SyncOptions): ExecaReturns; + sync( + file: string, + args?: ReadonlyArray, + options?: SyncOptions + ): ExecaReturns; sync(file: string, options?: SyncOptions): ExecaReturns; /** @@ -71,7 +87,15 @@ declare namespace execa { shellSync(command: string, options?: Options): ExecaReturns; } - type StdIOOption = 'pipe' | 'ipc' | 'ignore' | Stream | number | null | undefined; + type StdIOOption = + | 'pipe' + | 'ipc' + | 'ignore' + | 'inherit' + | Stream + | number + | null + | undefined; interface CommonOptions { /** @@ -103,7 +127,7 @@ declare namespace execa { * * @see https://nodejs.org/api/child_process.html#child_process_options_stdio */ - stdio?: 'pipe' | 'ignore' | 'inherit' | StdIOOption[]; + stdio?: 'pipe' | 'ignore' | 'inherit' | ReadonlyArray; /** * Prepare child to run independently of its parent process. * Specific behavior depends on the platform. @@ -253,10 +277,16 @@ declare namespace execa { type ExecaError = Error & ExecaReturns; interface ExecaChildPromise { - catch(onrejected?: ((reason: ExecaError) => TResult | PromiseLike) | null): Promise; + catch( + onrejected?: + | ((reason: ExecaError) => TResult | PromiseLike) + | null + ): Promise; } - type ExecaChildProcess = ChildProcess & ExecaChildPromise & Promise; + type ExecaChildProcess = ChildProcess & + ExecaChildPromise & + Promise; } declare var execa: execa.ExecaStatic; diff --git a/types/exenv/exenv-tests.ts b/types/exenv/exenv-tests.ts new file mode 100644 index 0000000000..d13633b4a6 --- /dev/null +++ b/types/exenv/exenv-tests.ts @@ -0,0 +1,6 @@ +import * as ExecutionEnvironment from 'exenv'; + +JSON.stringify(ExecutionEnvironment.canUseDOM); +JSON.stringify(ExecutionEnvironment.canUseEventListeners); +JSON.stringify(ExecutionEnvironment.canUseViewport); +JSON.stringify(ExecutionEnvironment.canUseWorkers); diff --git a/types/exenv/index.d.ts b/types/exenv/index.d.ts new file mode 100644 index 0000000000..701494f6d8 --- /dev/null +++ b/types/exenv/index.d.ts @@ -0,0 +1,10 @@ +// Type definitions for exenv 1.2 +// Project: https://github.com/JedWatson/exenv +// Definitions by: Christian Chown +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +export const canUseDOM: boolean; +export const canUseEventListeners: boolean; +export const canUseViewport: boolean; +export const canUseWorkers: boolean; diff --git a/types/exenv/tsconfig.json b/types/exenv/tsconfig.json new file mode 100644 index 0000000000..d8825637a1 --- /dev/null +++ b/types/exenv/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "exenv-tests.ts" + ] +} \ No newline at end of file diff --git a/types/exenv/tslint.json b/types/exenv/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/exenv/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file diff --git a/types/expect-puppeteer/expect-puppeteer-tests.ts b/types/expect-puppeteer/expect-puppeteer-tests.ts new file mode 100644 index 0000000000..84a7e65486 --- /dev/null +++ b/types/expect-puppeteer/expect-puppeteer-tests.ts @@ -0,0 +1,32 @@ +import { ElementHandle, Page } from "puppeteer"; + +const testGlobal = async (instance: ElementHandle | Page) => { + await expect(instance).toClick("selector"); + await expect(instance).toClick("selector", { polling: "mutation", text: "text" }); + await expect(instance).toClick("selector", { polling: "raf", timeout: 777 }); + + await expect(instance).toDisplayDialog(async () => {}); + + await expect(instance).toFill("selector", "value"); + await expect(instance).toFill("selector", "value", { polling: 777 }); + + await expect(instance).toMatch("selector"); + await expect(instance).toMatch("selector", { timeout: 777 }); + + await expect(instance).toMatchElement("selector", "value"); + await expect(instance).toMatchElement("selector", "value", { polling: "mutation" }); + + await expect(instance).toSelect("selector", "valueOrText"); + await expect(instance).toSelect("selector", "valueOrText", { polling: "raf" }); + + await expect(instance).toUploadFile("selector", "filePath"); + await expect(instance).toUploadFile("selector", "filePath", { timeout: 777 }); +}; + +const testImported = async (instance: ElementHandle | Page) => { + const expectPuppeteer = await import("expect-puppeteer"); + + await expectPuppeteer(instance).toClick("selector"); + await expect(instance).toClick("selector", { polling: "mutation", text: "text" }); + await expect(instance).toClick("selector", { polling: "raf", timeout: 777 }); +}; diff --git a/types/expect-puppeteer/index.d.ts b/types/expect-puppeteer/index.d.ts new file mode 100644 index 0000000000..ce20675d37 --- /dev/null +++ b/types/expect-puppeteer/index.d.ts @@ -0,0 +1,68 @@ +// Type definitions for expect-puppeteer 2.2 +// Project: https://github.com/smooth-code/jest-puppeteer/tree/master/packages/expect-puppeteer +// Definitions by: Josh Goldberg +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + +import { ElementHandle, Page } from "puppeteer"; + +/** + * Interval at which pageFunctions may be executed. + */ +type ExpectPolling = number | "mutation" | "raf"; + +/** + * Configures how to poll for an element. + */ +interface ExpectTimingActions { + /** + * An interval at which the pageFunction is executed. Defaults to "raf". + */ + polling?: ExpectPolling; + + /** + * Maximum time to wait for in milliseconds. Defaults to 500. + */ + timeout?: number; +} + +interface ExpectToClickOptions extends ExpectTimingActions { + /** + * A text or a RegExp to match in element textContent. + */ + text?: string | RegExp; +} + +interface ExpectPuppeteer { + // These must all match the ExpectPuppeteer interface above. + // We can't extend from it directly because some method names conflict in type-incompatible ways. + toClick(selector: string, options?: ExpectToClickOptions): Promise; + toDisplayDialog(block: () => Promise): Promise; + toFill(selector: string, value: string, options?: ExpectTimingActions): Promise; + toMatch(selector: string, options?: ExpectTimingActions): Promise; + toMatchElement(selector: string, value: string, options?: ExpectTimingActions): Promise; + toSelect(selector: string, valueOrText: string, options?: ExpectTimingActions): Promise; + toUploadFile(selector: string, filePath: string, options?: ExpectTimingActions): Promise; +} + +declare global { + namespace jest { + // tslint:disable-next-line no-empty-interface + interface Matchers { + // These must all match the ExpectPuppeteer interface above. + // We can't extend from it directly because some method names conflict in type-incompatible ways. + toClick(selector: string, options?: ExpectToClickOptions): Promise; + toDisplayDialog(block: () => Promise): Promise; + toFill(selector: string, value: string, options?: ExpectTimingActions): Promise; + toMatch(selector: string, options?: ExpectTimingActions): Promise; + toMatchElement(selector: string, value: string, options?: ExpectTimingActions): Promise; + toSelect(selector: string, valueOrText: string, options?: ExpectTimingActions): Promise; + toUploadFile(selector: string, filePath: string, options?: ExpectTimingActions): Promise; + } + } +} + +declare function expectPuppeteer(instance: ElementHandle | Page): ExpectPuppeteer; +export = expectPuppeteer; diff --git a/types/expect-puppeteer/tsconfig.json b/types/expect-puppeteer/tsconfig.json new file mode 100644 index 0000000000..7ca516e3c2 --- /dev/null +++ b/types/expect-puppeteer/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "expect-puppeteer-tests.ts" + ] +} diff --git a/types/expect-puppeteer/tslint.json b/types/expect-puppeteer/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/expect-puppeteer/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/expect/expect-tests.ts b/types/expect/expect-tests.ts index fea4a3d4d9..5df83340cb 100644 --- a/types/expect/expect-tests.ts +++ b/types/expect/expect-tests.ts @@ -1,8 +1,11 @@ -/// - import { Expectation, Extension, Spy, createSpy, isSpy, assert, spyOn, extend, restoreSpies } from 'expect'; import * as expect from 'expect'; +// Stub mocha functions +const {describe, it, before, after, beforeEach, afterEach} = null as any as { + [s: string]: ((s: string, cb: (done: any) => void) => void) & ((cb: (done: any) => void) => void) & {only: any, skip: any}; +}; + describe('chaining assertions', () => { it('should allow chaining for array-like applications', () => { expect([ 1, 2, 'foo', 3 ]) diff --git a/types/expectations/expectations-tests.ts b/types/expectations/expectations-tests.ts index b0cef0aa0f..4e994e7546 100644 --- a/types/expectations/expectations-tests.ts +++ b/types/expectations/expectations-tests.ts @@ -1,9 +1,12 @@ -/// - // transplant from https://github.com/spmason/expectations/blob/695c25bd35bb1751533a8082a5aa378e3e1b381f/test/expect.tests.js var root = this; +// Stub mocha functions +const {describe, it, before, after, beforeEach, afterEach} = null as any as { + [s: string]: ((s: string, cb: (done: any) => void) => void) & ((cb: (done: any) => void) => void) & {only: any, skip: any}; +}; + describe('expect', ()=> { describe('toEqual', ()=> { it('can expect true to be true', ()=> { diff --git a/types/expo/expo-tests.tsx b/types/expo/expo-tests.tsx index 187d62b2ee..d1b543c591 100644 --- a/types/expo/expo-tests.tsx +++ b/types/expo/expo-tests.tsx @@ -199,10 +199,7 @@ async () => { onError={(error) => console.log(error)} /> ); () => ( - + ); const barcodeReadCallback = () => {}; @@ -292,14 +289,37 @@ async () => { }; async () => { + // Video test const result = await ImagePicker.launchImageLibraryAsync({ - mediaTypes: ImagePicker.MediaTypeOptions.Videos + mediaTypes: ImagePicker.MediaTypeOptions.Videos, }); if (!result.cancelled) { result.uri; result.width; result.height; + result.duration; + result.type; + } +}; + +async () => { + // Image test + const result = await ImagePicker.launchImageLibraryAsync({ + mediaTypes: ImagePicker.MediaTypeOptions.Images, + base64: true, + aspect: [4, 3], + quality: 1, + exif: true, + }); + + if (!result.cancelled) { + result.uri; + result.width; + result.height; + result.exif; + result.base64; + result.type; } }; diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index a747a881e6..8e35cb8631 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -5,6 +5,7 @@ // Jan Aagaard // Sergio Sánchez // Fernando Helwanger +// Umidbek Karimov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 @@ -99,20 +100,16 @@ export namespace Amplitude { // #region AppLoading /** The following props are recommended, but optional for the sake of backwards compatibility (they were introduced in SDK21). If you do not provide any props, you are responsible for coordinating loading assets, handling errors, and updating state to unmount the `AppLoading` component. */ -export type AppLoadingProps = { +export interface AppLoadingProps { /** A `function` that returns a `Promise`. The `Promise` should resolve when the app is done loading data and assets. */ - startAsync: () => Promise; + startAsync?: () => Promise; /** Required if you provide `startAsync`. Called when `startAsync` resolves or rejects. This should be used to set state and unmount the `AppLoading` component. */ - onFinish: () => void; + onFinish?: () => void; /** If `startAsync` throws an error, it is caught and passed into the function provided to `onError`. */ onError?: (error: Error) => void; -} | { - startAsync: null; - onFinish: null; - onError?: null; -}; +} /** * A React component that tells Expo to keep the app loading screen open if it is the first and only component rendered in your app. When it is removed, the loading screen will disappear and your app will be visible. @@ -1421,6 +1418,10 @@ export namespace ImagePicker { uri: string; width: number; height: number; + type: 'video' | 'image'; + base64?: string; + exif?: object; + duration?: number; } type ImageResult = { cancelled: true } | ({ cancelled: false } & ImageInfo); @@ -1437,6 +1438,8 @@ export namespace ImagePicker { allowsEditing?: boolean; aspect?: [number, number]; quality?: number; + base64?: boolean; + exif?: boolean; mediaTypes?: keyof _MediaTypeOptions; } @@ -1698,7 +1701,7 @@ export namespace Pedometer { */ export namespace Permissions { type PermissionType = 'remoteNotifications' | 'location' | - 'camera' | 'contacts' | 'audioRecording'; + 'camera' | 'contacts' | 'audioRecording' | 'calendar'; type PermissionStatus = 'undetermined' | 'granted' | 'denied'; type PermissionExpires = 'never'; @@ -1730,6 +1733,7 @@ export namespace Permissions { const NOTIFICATIONS: RemoteNotificationPermission; const CONTACTS: 'contacts'; const SYSTEM_BRIGHTNESS: 'systemBrightness'; + const CALENDAR: 'calendar'; } /** @@ -1869,6 +1873,7 @@ export namespace SQLite { export interface SvgCommonProps { fill?: string; fillOpacity?: number | string; + fillRule?: 'nonzero' | 'evenodd'; stroke?: string; strokeWidth?: number | string; strokeOpacity?: number | string; @@ -1879,6 +1884,7 @@ export interface SvgCommonProps { x?: number | string; y?: number | string; rotate?: number | string; + rotation?: number | string; scale?: number | string; origin?: number | string; originX?: number | string; diff --git a/types/expo/tsconfig.json b/types/expo/tsconfig.json index 03b9c139b1..7711f49776 100644 --- a/types/expo/tsconfig.json +++ b/types/expo/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "module": "commonjs", "lib": [ + "dom", "es6" ], "jsx": "react", @@ -21,4 +22,4 @@ "index.d.ts", "expo-tests.tsx" ] -} \ No newline at end of file +} diff --git a/types/expo/v23/expo-tests.tsx b/types/expo/v23/expo-tests.tsx index 0764a4d53e..51b3f30d39 100644 --- a/types/expo/v23/expo-tests.tsx +++ b/types/expo/v23/expo-tests.tsx @@ -106,10 +106,7 @@ async () => { onError={(error) => console.log(error)} /> ); () => ( - + ); const barcodeReadCallback = () => {}; diff --git a/types/expo/v23/index.d.ts b/types/expo/v23/index.d.ts index 54154d8d6b..78de7bf415 100644 --- a/types/expo/v23/index.d.ts +++ b/types/expo/v23/index.d.ts @@ -330,15 +330,12 @@ export class Video extends Component { /** * AppLoading */ -export type AppLoadingProperties = { - startAsync: () => Promise; - onFinish: () => void; +export interface AppLoadingProperties { + startAsync?: () => Promise; + onFinish?: () => void; onError?: (error: Error) => void; -} | { - startAsync: null; - onFinish: null; - onError?: null; -}; +} + export class AppLoading extends Component { } /** diff --git a/types/expo/v23/tsconfig.json b/types/expo/v23/tsconfig.json index 3d85e281ed..295d9da342 100644 --- a/types/expo/v23/tsconfig.json +++ b/types/expo/v23/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6" + "es6", + "dom" ], "jsx": "react", "noImplicitAny": true, @@ -29,4 +30,4 @@ "index.d.ts", "expo-tests.tsx" ] -} \ No newline at end of file +} diff --git a/types/expo/v24/expo-tests.tsx b/types/expo/v24/expo-tests.tsx index 77f9bbba87..8749a5993c 100644 --- a/types/expo/v24/expo-tests.tsx +++ b/types/expo/v24/expo-tests.tsx @@ -196,10 +196,7 @@ async () => { onError={(error) => console.log(error)} /> ); () => ( - + ); const barcodeReadCallback = () => {}; diff --git a/types/expo/v24/index.d.ts b/types/expo/v24/index.d.ts index 4bf5e48dc9..829e9730a7 100644 --- a/types/expo/v24/index.d.ts +++ b/types/expo/v24/index.d.ts @@ -99,20 +99,16 @@ export namespace Amplitude { // #region AppLoading /** The following props are recommended, but optional for the sake of backwards compatibility (they were introduced in SDK21). If you do not provide any props, you are responsible for coordinating loading assets, handling errors, and updating state to unmount the `AppLoading` component. */ -export type AppLoadingProps = { +export interface AppLoadingProps { /** A `function` that returns a `Promise`. The `Promise` should resolve when the app is done loading data and assets. */ - startAsync: () => Promise; + startAsync?: () => Promise; /** Required if you provide `startAsync`. Called when `startAsync` resolves or rejects. This should be used to set state and unmount the `AppLoading` component. */ - onFinish: () => void; + onFinish?: () => void; /** If `startAsync` throws an error, it is caught and passed into the function provided to `onError`. */ onError?: (error: Error) => void; -} | { - startAsync: null; - onFinish: null; - onError?: null; -}; +} /** * A React component that tells Expo to keep the app loading screen open if it is the first and only component rendered in your app. When it is removed, the loading screen will disappear and your app will be visible. diff --git a/types/expo/v24/tsconfig.json b/types/expo/v24/tsconfig.json index 87b7b33224..dffdd0aa8c 100644 --- a/types/expo/v24/tsconfig.json +++ b/types/expo/v24/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6" + "es6", + "dom" ], "jsx": "react", "noImplicitAny": true, @@ -29,4 +30,4 @@ "index.d.ts", "expo-tests.tsx" ] -} \ No newline at end of file +} diff --git a/types/express-bunyan-logger/express-bunyan-logger-tests.ts b/types/express-bunyan-logger/express-bunyan-logger-tests.ts new file mode 100644 index 0000000000..daac949c0e --- /dev/null +++ b/types/express-bunyan-logger/express-bunyan-logger-tests.ts @@ -0,0 +1,24 @@ +import Bunyan = require('bunyan'); +import expressBunyan = require('express-bunyan-logger'); + +// works with no options +const middleware = expressBunyan({}); +const middleware2 = expressBunyan.errorLogger({}); + +// format accepts both string and function +const middleware3 = expressBunyan({ + format: ':name' +}); +const middleware4 = expressBunyan({ + format(meta: any) { + return 'foo'; + } +}); + +// works when provided a bunyan logger +const logger = Bunyan.createLogger({ + name: 'myLogger' +}); +const middleware5 = expressBunyan({ + logger +}); diff --git a/types/express-bunyan-logger/index.d.ts b/types/express-bunyan-logger/index.d.ts new file mode 100644 index 0000000000..6697a26a20 --- /dev/null +++ b/types/express-bunyan-logger/index.d.ts @@ -0,0 +1,35 @@ +// Type definitions for express-bunyan-logger 1.3 +// Project: https://github.com/villadora/express-bunyan-logger +// Definitions by: Shrey Jain +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +import Bunyan = require('bunyan'); +import express = require('express'); + +export = Factory; + +declare function Factory(options?: Factory.Options): express.RequestHandler; + +declare namespace Factory { + type FormatFunction = (meta: any) => string; + type IncludesFunction = (req: express.Request, res: express.Response) => any; + type RequestIdGenFunction = (req: express.Request) => string; + type LevelFunction = (status: number, err: Error | null, meta: any) => string; + + interface Options { + logger?: Bunyan; + format?: string | FormatFunction; + parseUA?: boolean; + levelFn?: LevelFunction; + includesFn?: IncludesFunction; + excludes?: string[]; + obfuscate?: string[]; + obfuscatePlaceholder?: string; + serializers?: { [field: string]: Bunyan.Serializer }; + immediate?: boolean; + genReqId?: RequestIdGenFunction; + } + + function errorLogger(options?: Options): express.ErrorRequestHandler; +} diff --git a/types/express-bunyan-logger/tsconfig.json b/types/express-bunyan-logger/tsconfig.json new file mode 100644 index 0000000000..8079293b99 --- /dev/null +++ b/types/express-bunyan-logger/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "express-bunyan-logger-tests.ts" + ] +} diff --git a/types/express-bunyan-logger/tslint.json b/types/express-bunyan-logger/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/express-bunyan-logger/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/express-flash/express-flash-tests.ts b/types/express-flash/express-flash-tests.ts new file mode 100644 index 0000000000..c6212c6906 --- /dev/null +++ b/types/express-flash/express-flash-tests.ts @@ -0,0 +1,12 @@ +import express = require('express'); +import flash = require('express-flash'); + +const app = express(); + +app.use(flash()); + +app.use((req) => { + req.flash(); + req.flash('message'); + req.flash('event', 'message'); +}); diff --git a/types/express-flash/index.d.ts b/types/express-flash/index.d.ts new file mode 100644 index 0000000000..e0b00b8d80 --- /dev/null +++ b/types/express-flash/index.d.ts @@ -0,0 +1,11 @@ +// Type definitions for express-flash 0.0 +// Project: https://github.com/RGBboy/express-flash +// Definitions by: Ian Mobley +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/// + +import express = require('express'); +declare function flash(): express.RequestHandler; +export = flash; diff --git a/types/express-flash/tsconfig.json b/types/express-flash/tsconfig.json new file mode 100644 index 0000000000..5fbfc5aefd --- /dev/null +++ b/types/express-flash/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "express-flash-tests.ts" + ] +} diff --git a/types/express-flash/tslint.json b/types/express-flash/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/express-flash/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/express-formidable/index.d.ts b/types/express-formidable/index.d.ts index 75a34d0350..ee38be639e 100644 --- a/types/express-formidable/index.d.ts +++ b/types/express-formidable/index.d.ts @@ -22,6 +22,7 @@ interface ExpressFormidableOptions { uploadDir?: string; keepExtensions?: boolean; type?: "multipart" | "urlencoded"; + maxFileSize?: number; maxFieldsSize?: number; maxFields?: number; hash?: boolean | "sha1" | "md5"; diff --git a/types/express-graphql/express-graphql-tests.ts b/types/express-graphql/express-graphql-tests.ts index 482b15c186..52071cea07 100644 --- a/types/express-graphql/express-graphql-tests.ts +++ b/types/express-graphql/express-graphql-tests.ts @@ -1,38 +1,42 @@ -import express = require('express'); -import 'express-session'; -import graphqlHTTP = require('express-graphql'); +import express = require("express"); +import "express-session"; +import graphqlHTTP = require("express-graphql"); +import { buildSchema } from "graphql"; const app = express(); -const schema = {}; +const schema = buildSchema(`type Query { hello: String }`); -const graphqlOption: graphqlHTTP.OptionsObj = { +const graphqlOption: graphqlHTTP.OptionsData = { graphiql: true, - schema: schema, + schema, formatError: (error: Error) => ({ - message: error.message + message: error.message, }), - extensions: (args) => { } + validationRules: [() => false, () => true], + extensions: ({ document, variables, operationName, result }) => ({ key: "value", key2: "value" }), }; -const graphqlOptionRequest = (request: express.Request): graphqlHTTP.OptionsObj => ({ +const graphqlOptionRequest = (request: express.Request): graphqlHTTP.OptionsData => ({ graphiql: true, - schema: schema, - context: request.session + schema, + context: request.session, + validationRules: [() => false, () => true], }); -const graphqlOptionRequestAsync = async (request: express.Request): Promise => { +const graphqlOptionRequestAsync = async (request: express.Request): Promise => { return { graphiql: true, schema: await Promise.resolve(schema), context: request.session, - extensions: async (args) => { } + extensions: async args => {}, + validationRules: [() => false, () => true], }; }; -app.use('/graphql1', graphqlHTTP(graphqlOption)); +app.use("/graphql1", graphqlHTTP(graphqlOption)); -app.use('/graphql2', graphqlHTTP(graphqlOptionRequest)); +app.use("/graphql2", graphqlHTTP(graphqlOptionRequest)); -app.use('/graphqlasync', graphqlHTTP(graphqlOptionRequestAsync)); +app.use("/graphqlasync", graphqlHTTP(graphqlOptionRequestAsync)); -app.listen(8080, () => console.log('GraphQL Server running on localhost:8080')); +app.listen(8080, () => console.log("GraphQL Server running on localhost:8080")); diff --git a/types/express-graphql/index.d.ts b/types/express-graphql/index.d.ts index 166bdae6e7..78c988204f 100644 --- a/types/express-graphql/index.d.ts +++ b/types/express-graphql/index.d.ts @@ -1,75 +1,119 @@ -// Type definitions for express-graphql -// Project: https://www.npmjs.org/package/express-graphql +// Type definitions for express-graphql 0.6 +// Project: https://github.com/graphql/express-graphql // Definitions by: Isman Usoh // Nitin Tutlani // Daniel Fader // Ehsan Ziya +// Margus Lamp +// Firede // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 import { Request, Response } from "express"; - +import { DocumentNode, GraphQLSchema, GraphQLError } from "graphql"; export = graphqlHTTP; declare namespace graphqlHTTP { /** - * Used to configure the graphQLHTTP middleware by providing a schema + * Used to configure the graphqlHTTP middleware by providing a schema * and other configuration options. + * + * Options can be provided as an Object, a Promise for an Object, or a Function + * that returns an Object or a Promise for an Object. */ - export type Options = ((req: Request) => OptionsObj) | ((req: Request) => Promise) | OptionsObj - export type OptionsObj = { + export type Options = + | ((request: Request, response: Response, params?: GraphQLParams) => OptionsResult) + | OptionsResult; + export type OptionsResult = OptionsData | Promise; + export interface OptionsData { /** * A GraphQL schema from graphql-js. */ - schema: Object, + schema: GraphQLSchema; /** * A value to pass as the context to the graphql() function. */ - context?: Object, + context?: any; /** * An object to pass as the rootValue to the graphql() function. */ - rootValue?: Object, + rootValue?: any; /** * A boolean to configure whether the output should be pretty-printed. */ - pretty?: boolean, + pretty?: boolean | null; /** * An optional function which will be used to format any errors produced by * fulfilling a GraphQL operation. If no function is provided, GraphQL's * default spec-compliant `formatError` function will be used. */ - formatError?: Function, + formatError?: ((error: GraphQLError) => any) | null; + + /** + * An optional array of validation rules that will be applied on the document + * in additional to those defined by the GraphQL spec. + */ + validationRules?: any[] | null; + + /** + * An optional function for adding additional metadata to the GraphQL response + * as a key-value object. The result will be added to "extensions" field in + * the resulting JSON. This is often a useful place to add development time + * info such as the runtime of a query or the amount of resources consumed. + * + * Information about the request is provided to be used. + * + * This function may be async. + */ + extensions?: ((info: RequestInfo) => { [key: string]: any }) | null; /** * A boolean to optionally enable GraphiQL mode. */ - graphiql?: boolean, - - /** - * An optional function for adding additional metadata to the GraphQL response as a key-value object. - * The result will be added to "extensions" field in the resulting JSON. - */ - extensions?: ((args: ExtenstionsArgs) => any) | ((args: ExtenstionsArgs) => Promise); - - }; - - interface ExtenstionsArgs { - document: object, - variables: object, - operationName: any, - result: object + graphiql?: boolean | null; } - type Middleware = (request: Request, response: Response) => void; + /** + * All information about a GraphQL request. + */ + export interface RequestInfo { + /** + * The parsed GraphQL document. + */ + document: DocumentNode | null | undefined; + + /** + * The variable values used at runtime. + */ + variables: { [name: string]: any } | null | undefined; + + /** + * The (optional) operation name requested. + */ + operationName: string | null | undefined; + + /** + * The result of executing the operation. + */ + result: any; + } + + export interface GraphQLParams { + query: string | null | undefined; + variables: { [name: string]: any } | null | undefined; + operationName: string | null | undefined; + raw: boolean | null | undefined; + } + + type Middleware = (request: Request, response: Response) => Promise; } /** -* Middleware for express; takes an options object or function as input to -* configure behavior, and returns an express middleware. -*/ + * Middleware for express; takes an options object or function as input to + * configure behavior, and returns an express middleware. + */ declare function graphqlHTTP(options: graphqlHTTP.Options): graphqlHTTP.Middleware; diff --git a/types/express-graphql/tslint.json b/types/express-graphql/tslint.json index a41bf5d19a..4c4fc86ace 100644 --- a/types/express-graphql/tslint.json +++ b/types/express-graphql/tslint.json @@ -1,79 +1,6 @@ { "extends": "dtslint/dt.json", "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false + "strict-export-declare-modifiers": false } } diff --git a/types/express-jwt/express-jwt-tests.ts b/types/express-jwt/express-jwt-tests.ts index 798818b728..a4d4d11845 100644 --- a/types/express-jwt/express-jwt-tests.ts +++ b/types/express-jwt/express-jwt-tests.ts @@ -13,6 +13,25 @@ app.use(jwt({ userProperty: 'auth' })); +app.use(jwt({ + secret: (req: express.Request, + payload: any, + done: (err: any, secret: string) => void) => { + done(null, 'shhhhhhared-secret'); + }, + userProperty: 'auth' +})); + +app.use(jwt({ + secret: (req: express.Request, + header: any, + payload: any, + done: (err: any, secret: string) => void) => { + done(null, 'shhhhhhared-secret'); + }, + userProperty: 'auth' +})); + var jwtCheck = jwt({ secret: 'shhhhhhared-secret' }); @@ -26,6 +45,6 @@ app.use(function (err: any, req: express.Request, res: express.Response, next: e res.end(); } } else { - next(err); + next(new jwt.UnauthorizedError('invalid_token', new Error('error-message'))); } -}); \ No newline at end of file +}); diff --git a/types/express-jwt/index.d.ts b/types/express-jwt/index.d.ts index de0a2dd337..1187f4fbca 100644 --- a/types/express-jwt/index.d.ts +++ b/types/express-jwt/index.d.ts @@ -1,6 +1,9 @@ // Type definitions for express-jwt // Project: https://www.npmjs.org/package/express-jwt -// Definitions by: Wonshik Kim , Kacper Polak , Sl1MBoy +// Definitions by: Wonshik Kim +// Kacper Polak +// Sl1MBoy +// Milan Mimra // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -12,20 +15,27 @@ export = jwt; declare function jwt(options: jwt.Options): jwt.RequestHandler; declare namespace jwt { export type secretType = string | Buffer + export type ErrorCode = + "revoked_token" | + "invalid_token" | + "credentials_bad_scheme" | + "credentials_bad_format" | + "credentials_required" + + export interface SecretCallbackLong { + (req: express.Request, header: any, payload: any, done: (err: any, secret?: secretType) => void): void; + } export interface SecretCallback { - (req: express.Request, header: any, payload: any, done: (err: any, secret?: boolean) => void): void; (req: express.Request, payload: any, done: (err: any, secret?: secretType) => void): void; } - export interface IsRevokedCallback { (req: express.Request, payload: any, done: (err: any, revoked?: boolean) => void): void; } - export interface GetTokenCallback { (req: express.Request): any; } export interface Options { - secret: secretType | SecretCallback; + secret: secretType | SecretCallback | SecretCallbackLong; userProperty?: string; skip?: string[]; credentialsRequired?: boolean; @@ -39,11 +49,13 @@ declare namespace jwt { } export class UnauthorizedError extends Error { - name: string; - message: string; - code: string; status: number; - inner: Error + message: string; + name: 'UnauthorizedError'; + code: ErrorCode; + inner: { message: string }; + + constructor(code: ErrorCode, error: { message: string }); } } declare global { diff --git a/types/express-minify/tsconfig.json b/types/express-minify/tsconfig.json index 65c999883e..20480fc428 100644 --- a/types/express-minify/tsconfig.json +++ b/types/express-minify/tsconfig.json @@ -14,10 +14,15 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "paths": { + "uglify-js": [ + "uglify-js/v2" + ] + } }, "files": [ "index.d.ts", "express-minify-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/express-winston/express-winston-tests.ts b/types/express-winston/express-winston-tests.ts index 297b7afc49..5671160de0 100644 --- a/types/express-winston/express-winston-tests.ts +++ b/types/express-winston/express-winston-tests.ts @@ -6,19 +6,20 @@ const app = express(); // Logger with all options app.use(expressWinston.logger({ - baseMeta: { foo: 'foo' }, - bodyBlacklist: [ 'foo' ], - bodyWhitelist: [ 'bar' ], + baseMeta: { foo: 'foo', nested: { bar: 'baz' } }, + bodyBlacklist: ['foo'], + bodyWhitelist: ['bar'], colorize: true, dynamicMeta: (req, res, err) => ({ foo: 'bar' }), expressFormat: true, ignoreRoute: (req, res) => true, - ignoredRoutes: [ 'foo' ], - level: 'level', + ignoredRoutes: ['foo'], + level: (req, res) => 'level', + meta: true, metaField: 'metaField', msg: 'msg', requestFilter: (req, prop) => true, - requestWhitelist: [ 'foo', 'bar' ], + requestWhitelist: ['foo', 'bar'], skip: (req, res) => false, statusLevels: ({ error: 'error', success: 'success', warn: 'warn' }), transports: [ @@ -46,13 +47,13 @@ app.use(expressWinston.logger({ // Error Logger with all options app.use(expressWinston.errorLogger({ - baseMeta: { foo: 'foo' }, + baseMeta: { foo: 'foo', nested: { bar: 'baz' } }, dynamicMeta: (req, res, err) => ({ foo: 'bar' }), - level: 'level', + level: (req, res) => 'level', metaField: 'metaField', msg: 'msg', requestFilter: (req, prop) => true, - requestWhitelist: [ 'foo', 'bar' ], + requestWhitelist: ['foo', 'bar'], transports: [ new winston.transports.Console({ json: true, @@ -87,8 +88,8 @@ expressWinston.responseWhitelist.push('body'); const router = express.Router(); router.post('/user/register', (req, res, next) => { - const expressWinstonReq = req as expressWinston.ExpressWinstonRequest; - expressWinstonReq._routeWhitelists.body = [ 'username', 'email', 'age' ]; - expressWinstonReq._routeWhitelists.req = [ 'userId' ]; - expressWinstonReq._routeWhitelists.res = [ '_headers' ]; + const expressWinstonReq = req as expressWinston.ExpressWinstonRequest; + expressWinstonReq._routeWhitelists.body = ['username', 'email', 'age']; + expressWinstonReq._routeWhitelists.req = ['userId']; + expressWinstonReq._routeWhitelists.res = ['_headers']; }); diff --git a/types/express-winston/index.d.ts b/types/express-winston/index.d.ts index 21e7ead653..e6184f64b9 100644 --- a/types/express-winston/index.d.ts +++ b/types/express-winston/index.d.ts @@ -7,17 +7,14 @@ import { ErrorRequestHandler, Handler, Request, Response } from 'express'; import { TransportInstance, Winston } from 'winston'; -export interface MetaObject { - [field: string]: string; -} - -export type DynamicMetaFunction = (req: Request, res: Response, err: Error) => MetaObject | undefined; +export type DynamicMetaFunction = (req: Request, res: Response, err: Error) => object; +export type DynamicLevelFunction = (req: Request, res: Response, err: Error) => string; export type RequestFilter = (req: Request, propName: string) => boolean; export type ResponseFilter = (res: Response, propName: string) => boolean; export type RouteFilter = (req: Request, res: Response) => boolean; export interface BaseLoggerOptions { - baseMeta?: MetaObject; + baseMeta?: object; bodyBlacklist?: string[]; bodyWhitelist?: string[]; colorize?: boolean; @@ -25,7 +22,8 @@ export interface BaseLoggerOptions { expressFormat?: boolean; ignoreRoute?: RouteFilter; ignoredRoutes?: string[]; - level?: string; + level?: string | DynamicLevelFunction; + meta?: boolean; metaField?: string; msg?: string; requestFilter?: RequestFilter; @@ -53,9 +51,9 @@ export type LoggerOptions = LoggerOptionsWithTransports | LoggerOptionsWithWinst export function logger(options: LoggerOptions): Handler; export interface BaseErrorLoggerOptions { - baseMeta?: MetaObject; + baseMeta?: object; dynamicMeta?: DynamicMetaFunction; - level?: string; + level?: string | DynamicLevelFunction; metaField?: string; msg?: string; requestFilter?: RequestFilter; @@ -91,9 +89,9 @@ export let defaultResponseFilter: ResponseFilter; export function defaultSkip(): boolean; export interface ExpressWinstonRequest extends Request { - _routeWhitelists: { - body: string[]; - req: string[]; - res: string[]; - }; + _routeWhitelists: { + body: string[]; + req: string[]; + res: string[]; + }; } diff --git a/types/express-ws/express-ws-tests.ts b/types/express-ws/express-ws-tests.ts new file mode 100644 index 0000000000..a37f315dfb --- /dev/null +++ b/types/express-ws/express-ws-tests.ts @@ -0,0 +1,72 @@ +import http = require('http'); +import https = require('https'); +import express = require('express'); +import expressWs = require('express-ws'); + +const dummyApp = express(); +const httpServer = http.createServer(dummyApp); +const httpsServer = https.createServer({}, dummyApp); + +expressWs(dummyApp); // optional server argument +expressWs(dummyApp, httpsServer); // https server allowed +expressWs(dummyApp, httpServer, { + leaveRouterUntouched: false, + // ws server options + wsOptions: { + clientTracking: true + } +}); + +const { app, getWss, applyTo } = expressWs(express()); + +/** + * applyTo accepts router object + */ +applyTo(express.Router()); + +/** + * applyTo accepts router-like objects + */ +applyTo({ + get() { return this; } +}); + +/** + * getWss function returns ws server + */ +getWss().clients.forEach(ws => { + if (ws.readyState !== ws.OPEN) { + ws.terminate(); + return; + } + ws.ping(); +}); + +/** + * ws method is added to express app instance + */ +app.ws('/', (ws, req) => { + ws.on('message', msg => { + console.log(msg); + }); +}); + +/** + * ws method is added to express.Router prototype + */ +const router = express.Router(); + +router.ws( + '/:id', + (ws, req, next) => { next(); }, + (ws, req, next) => { + ws.send(req.params.id); + + ws.on('close', (code, reason) => { + console.log('code:', code); + console.log('reason:', reason); + }); + } +); + +app.use(router); diff --git a/types/express-ws/index.d.ts b/types/express-ws/index.d.ts new file mode 100644 index 0000000000..81cf85c6d3 --- /dev/null +++ b/types/express-ws/index.d.ts @@ -0,0 +1,47 @@ +// Type definitions for express-ws 3.0 +// Project: https://github.com/HenningM/express-ws +// Definitions by: AJ Livingston +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import * as core from 'express-serve-static-core'; +import * as express from 'express'; +import * as http from 'http'; +import * as https from 'https'; +import * as ws from 'ws'; + +declare module 'express' { + function Router(options?: RouterOptions): expressWs.Router; +} + +declare function expressWs(app: express.Application, server?: http.Server | https.Server, options?: expressWs.Options): expressWs.Instance; +declare namespace expressWs { + type Application = express.Application & WithWebsocketMethod; + type Router = express.Router & WithWebsocketMethod; + + interface Options { + leaveRouterUntouched?: boolean; + wsOptions?: ws.ServerOptions; + } + + interface RouterLike { + get: express.IRouterMatcher; + [key: string]: any; + [key: number]: any; + } + + interface Instance { + app: Application; + applyTo(target: RouterLike): void; + getWss(): ws.Server; + } + + type WebsocketRequestHandler = (ws: ws, req: express.Request, next: express.NextFunction) => void; + type WebsocketMethod = (route: core.PathParams, ...middlewares: WebsocketRequestHandler[]) => T; + + interface WithWebsocketMethod { + ws: WebsocketMethod; + } +} + +export = expressWs; diff --git a/types/express-ws/tsconfig.json b/types/express-ws/tsconfig.json new file mode 100644 index 0000000000..e2d5677145 --- /dev/null +++ b/types/express-ws/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "express-ws-tests.ts" + ] +} diff --git a/types/express-ws/tslint.json b/types/express-ws/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/express-ws/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/express-xml-bodyparser/express-xml-bodyparser-tests.ts b/types/express-xml-bodyparser/express-xml-bodyparser-tests.ts new file mode 100644 index 0000000000..e8deca25e3 --- /dev/null +++ b/types/express-xml-bodyparser/express-xml-bodyparser-tests.ts @@ -0,0 +1,10 @@ +import express = require('express'); +import xmlparser = require('express-xml-bodyparser'); + +const app: express.Express = express(); + +app.use(xmlparser()); + +app.post("/auth", xmlparser({explicitArray: false}), (req, res, next) => { + res.send("Success!"); +}); diff --git a/types/express-xml-bodyparser/index.d.ts b/types/express-xml-bodyparser/index.d.ts new file mode 100644 index 0000000000..1c674d71fb --- /dev/null +++ b/types/express-xml-bodyparser/index.d.ts @@ -0,0 +1,23 @@ +// Type definitions for express-xml-bodyparser 0.3 +// Project: https://github.com/macedigital/express-xml-bodyparser +// Definitions by: Notice Maker +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import { Request, Response, NextFunction } from 'express'; + +declare function xmlparser(options?: xmlparser.XmlparserOptions): (req: Request, res: Response, next: NextFunction) => void; + +declare namespace xmlparser { + let regexp: RegExp; + + interface XmlparserOptions { + async?: boolean; + explicitArray?: boolean; + normalize?: boolean; + normalizeTags?: boolean; + trim?: boolean; + } +} + +export = xmlparser; diff --git a/types/express-xml-bodyparser/tsconfig.json b/types/express-xml-bodyparser/tsconfig.json new file mode 100644 index 0000000000..49f0ac53bc --- /dev/null +++ b/types/express-xml-bodyparser/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "express-xml-bodyparser-tests.ts" + ] +} \ No newline at end of file diff --git a/types/express-xml-bodyparser/tslint.json b/types/express-xml-bodyparser/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/express-xml-bodyparser/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file diff --git a/types/extract-text-webpack-plugin/extract-text-webpack-plugin-tests.ts b/types/extract-text-webpack-plugin/extract-text-webpack-plugin-tests.ts index 06fc528cff..aefadf29a4 100644 --- a/types/extract-text-webpack-plugin/extract-text-webpack-plugin-tests.ts +++ b/types/extract-text-webpack-plugin/extract-text-webpack-plugin-tests.ts @@ -52,17 +52,6 @@ configuration = { ] }; -configuration = { - // ... - plugins: [ - new webpack.optimize.CommonsChunkPlugin({ - name: "commons", - filename: "commons.js", - }), - new ExtractTextPlugin("[name].css") - ] -}; - configuration = { // ... module: { diff --git a/types/extract-text-webpack-plugin/index.d.ts b/types/extract-text-webpack-plugin/index.d.ts index 9f17a66da0..61b381d253 100644 --- a/types/extract-text-webpack-plugin/index.d.ts +++ b/types/extract-text-webpack-plugin/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/webpack-contrib/extract-text-webpack-plugin // Definitions by: flying-sheep , kayo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import { Plugin, NewLoader, OldLoader } from 'webpack'; diff --git a/types/ez-plus/ez-plus-tests.ts b/types/ez-plus/ez-plus-tests.ts new file mode 100644 index 0000000000..df442607f4 --- /dev/null +++ b/types/ez-plus/ez-plus-tests.ts @@ -0,0 +1,14 @@ +import { Options } from "ez-plus"; + +$(document).ready(() => { + // basic usage + $('#image').ezPlus(); + + // with options + const options: Options = { + zoomLens: true, + zoomType: 'lens', + cursor: 'crosshair' + }; + $('#image').ezPlus(options); +}); diff --git a/types/ez-plus/index.d.ts b/types/ez-plus/index.d.ts new file mode 100644 index 0000000000..3a372108d3 --- /dev/null +++ b/types/ez-plus/index.d.ts @@ -0,0 +1,214 @@ +// Type definitions for jQuery ElevateZoom Plus Plugin 1.2 +// Project: https://github.com/igorlino/elevatezoom-plus +// Definitions by: Anderson Friaça +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +export interface Options { + /** + * Activate responsivenes + */ + responsive?: boolean; + + /** + * Activate zoom on mouse scroll + */ + scrollZoom?: boolean; + + /** + * Activate simultaneous crossfade of images on gallery change + */ + imageCrossfade?: boolean; + + /** + * Activate spinner icon or url + */ + loadingIcon?: boolean | string; + + /** + * Activate easing + */ + easing?: boolean; + easingType?: string; + easingDuration?: number; + + /** + * Used when zoomType set to lens + */ + lensSize?: number; + + /** + * Width of the zoomWindow + */ + zoomWindowWidth?: number; + + /** + * Height of the zoomWindow + */ + zoomWindowHeight?: number; + + /** + * x-axis offset of the zoom window + */ + zoomWindowOffsetX?: number; + + /** + * y-axis offset of the zoom window + */ + zoomWindowOffsetY?: number; + zoomWindowPosition?: number | string; + + /** + * Speed of Lens fadeIn + */ + lensFadeIn?: number; + + /** + * Speed of Lens fadeOut + */ + lensFadeOut?: number; + + /** + * Speed of Window fadeIn + */ + zoomWindowFadeIn?: number; + + /** + * Speed of Window fadeOut + */ + zoomWindowFadeOut?: number; + + /** + * Speed of Tint fadeIn + */ + zoomTintFadeIn?: number; + + /** + * Speed of Tint fadeOut + */ + zoomTintFadeOut?: number; + + /** + * Border Size of the ZoomBox + */ + borderSize?: number; + + /** + * Enable Lens + */ + zoomLens?: boolean; + + /** + * Border Colour + */ + borderColour?: string; + + /** + * Width in pixels of the lens border + */ + lensBorder?: number; + + /** + * Type of lens + */ + lensShape?: 'square' | 'round'; + + /** + * Type of zoom + */ + zoomType?: 'lens' | 'window' | 'inner'; + containLensZoom?: boolean; + + /** + * Colour of the lens background + */ + lensColour?: string; + + /** + * Opacity of lens + */ + lensOpacity?: number; + lenszoom?: boolean; + + /** + * Enable a tint overlay + */ + tint?: boolean; + + /** + * Colour of the tin + */ + tintColour?: string; + + /** + * Opacity of the tint + */ + tintOpacity?: number; + + /** + * This assigns a set of gallery links to the zoom image + */ + gallery?: string; + + /** + * Type of cursor + */ + cursor?: 'default' | 'cursor' | 'crosshair'; + container?: string; + + /** + * Attribute to plugin use for zoom + */ + attrImageZoomSrc?: string; + + /** + * In pixels the dimensions you want to constrain on + */ + constrainSize?: number | false; + constrainType?: 'width' | 'height'; + debug?: boolean; + easingAmount?: number; + enabled?: boolean; + galleryActiveClass?: string; + gallerySelector?: string | false; + galleryItem?: string; + galleryEvent?: string; + mantainZoomAspectRatio?: boolean; + maxZoomLevel?: number | false; + minZoomLevel?: number; + preloading?: 0 | 1; + respond?: any[]; + + /** + * Steps of the scrollzoom + */ + scrollZoomIncrement?: number; + touchEnabled?: boolean; + zoomActivation?: 'click' | 'hover'; + + /** + * Zoom container parent selector + */ + zoomContainerAppendTo?: string; + + /** + * Identifier for the zoom container + */ + zoomId?: number; + + /** + * Zoom level of image + */ + zoomLevel?: number; + zIndex?: number; +} +declare global { + interface JQuery { + /** + * Initialize ElevateZoom Plugin + */ + ezPlus(options?: Options): JQuery; + } +} diff --git a/types/ez-plus/tsconfig.json b/types/ez-plus/tsconfig.json new file mode 100644 index 0000000000..14e9266312 --- /dev/null +++ b/types/ez-plus/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "ez-plus-tests.ts" + ] +} \ No newline at end of file diff --git a/types/ez-plus/tslint.json b/types/ez-plus/tslint.json new file mode 100644 index 0000000000..d04fe2e1fa --- /dev/null +++ b/types/ez-plus/tslint.json @@ -0,0 +1 @@ +{"extends": "dtslint/dt.json"} \ No newline at end of file diff --git a/types/fabric/fabric-impl.d.ts b/types/fabric/fabric-impl.d.ts index 397ea8984a..369856130c 100644 --- a/types/fabric/fabric-impl.d.ts +++ b/types/fabric/fabric-impl.d.ts @@ -1427,6 +1427,11 @@ export class Canvas { * @return active object */ getActiveObject(): Object; + /** + * Returns an array with the current selected objects + * @return {Object[]} array of active objects + */ + getActiveObjects(): Object[]; /** * Returns pointer coordinates relative to canvas. * @return object with "x" and "y" number values @@ -1705,6 +1710,47 @@ export class Group { static fromObject(object: any, callback: (group: Group) => any): void; } +/////////////////////////////////////////////////////////////////////////////// +// ActiveSelection +////////////////////////////////////////////////////////////////////////////// +export interface ActiveSelection extends Object, ICollection {} +export class ActiveSelection { + /** + * Constructor + * @param objects ActiveSelection objects + * @param [options] Options object + */ + constructor(items?: Object[], options?: IObjectOptions); + + /** + * Change te activeSelection to a normal group, + * High level function that automatically adds it to canvas as + * active object. no events fired. + */ + toGroup(): Group; + + /** + * Removes objects from a collection, then renders canvas (if `renderOnAddRemove` is not `false`) + * @param object Zero or more fabric instances + * @return thisArg + * @chainable + */ + remove(...object: Object[]): Group; + + /** + * Returns string represenation of a group + */ + toString(): string; + + /** + * Returns {@link fabric.ActiveSelection} instance from an object representation + * @memberOf fabric.ActiveSelection + * @param object Object to create a group from + * @param [callback] Callback to invoke when an ActiveSelection instance is created + */ + static fromObject(object: Group, callback: (activeSelection: ActiveSelection) => void): void; +} + interface IImageOptions extends IObjectOptions { /** * crossOrigin value (one of "", "anonymous", "allow-credentials") diff --git a/types/fabric/index.d.ts b/types/fabric/index.d.ts index a0fa06629e..38277c5708 100644 --- a/types/fabric/index.d.ts +++ b/types/fabric/index.d.ts @@ -4,6 +4,7 @@ // Joseph Livecchi // Michael Randolph // Tiger Oakes +// Brian Martinson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 export import fabric = require("./fabric-impl"); diff --git a/types/fabric/test/index.ts b/types/fabric/test/index.ts index 0f51499c0b..dfdaafce06 100644 --- a/types/fabric/test/index.ts +++ b/types/fabric/test/index.ts @@ -1032,3 +1032,32 @@ function sample9() { canvas.setBackgroundImage('yolo.jpg', () => { "a"; }, { opacity: 45 }); canvas.setBackgroundImage('yolo.jpg', () => { "a"; }); } + +function sample10() { + const canvas = new fabric.Canvas('c'); + const objR = new fabric.Rect({ + top: 10, + left: 10, + width: 10, + height: 10, + fill: "#FF0000", + }); + const objG = new fabric.Rect({ + top: 15, + left: 15, + width: 10, + height: 10, + fill: "#00FF00", + }); + const objB = new fabric.Rect({ + top: 20, + left: 20, + width: 10, + height: 10, + fill: "#0000FF", + }); + canvas.add(objR); + canvas.add(objG); + canvas.add(objB); + const objArray = canvas.getActiveObjects(); +} diff --git a/types/facebook-instant-games/facebook-instant-games-tests.ts b/types/facebook-instant-games/facebook-instant-games-tests.ts new file mode 100644 index 0000000000..8d33e2c970 --- /dev/null +++ b/types/facebook-instant-games/facebook-instant-games-tests.ts @@ -0,0 +1,58 @@ +class FBInstantTest { + winStreak: number; + + init() { + FBInstant.initializeAsync().then(() => { + FBInstant.setLoadingProgress(100); + FBInstant.startGameAsync().then(() => { + this.startGame(); + }); + }); + } + + startGame() { + const contextId = FBInstant.context.getID(); + const contextType = FBInstant.context.getType(); + + const playerName = FBInstant.player.getName(); + const playerPic = FBInstant.player.getPhoto(); + const playerId = FBInstant.player.getID(); + } + + saveState() { + FBInstant.player.setDataAsync({ + score: this.winStreak + }); + } + + getState() { + FBInstant.player.getDataAsync(['score']) + .then((data) => { + if (typeof data['score'] !== 'undefined') { + this.winStreak = +data['score']; + } + }); + } + + update() { + FBInstant.updateAsync({ + action: 'CUSTOM', + cta: 'Play', + image: '', + text: { + default: 'Edgar played their move', + localizations: { + en_US: 'Edgar played their move', + es_LA: '\u00A1Edgar jug\u00F3 su jugada!' + } + }, + template: 'play_turn', + data: { myReplayData: '...' }, + strategy: 'IMMEDIATE', + notification: 'NO_PUSH' + }).then(() => { + // closes the game after the update is posted. + FBInstant.quit(); + }); + } +} diff --git a/types/facebook-instant-games/index.d.ts b/types/facebook-instant-games/index.d.ts new file mode 100644 index 0000000000..1e8a8d76fd --- /dev/null +++ b/types/facebook-instant-games/index.d.ts @@ -0,0 +1,221 @@ +// Type definitions for facebook-instant-games 6.1 +// Project: https://developers.facebook.com/docs/games/instant-games +// Definitions by: Menushka Weeratunga +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace FBInstant { + let player: Player; + let context: Context; + let payments: Payments; + + function getLocale(): string; + function getPlatform(): string; + function getSDKVersion(): string; + function initializeAsync(): Promise; + function setLoadingProgress(progress: number): void; + function getSupportedAPIs(): string[]; + function getEntryPointData(): any; + function getEntryPointAsync(): Promise; + function setSessionData(sessionData: any): void; + function startGameAsync(): Promise; + function shareAsync(payload: SharePayload): Promise; + function updateAsync(payload: UpdatePayload | LeaderboardUpdatePayload): Promise; + function switchGameAsync(appID: string, data?: string): Promise; + function canCreateShortcutAsync(): Promise; + function createShortcutAsync(): Promise; + function quit(): void; + function logEvent(eventName: string, valueToSum?: number, parameter?: any): APIError; + function onPause(func: () => void): void; + function getInterstitialAdAsync(placementID: string): Promise; + function getRewardedVideoAsync(placementID: string): Promise; + function matchPlayerAsync(matchTag?: string, switchContextWhenMatched?: boolean): Promise; + function checkCanPlayerMatchAsync(): Promise; + function getLeaderboardAsync(name: string): Promise; + + interface Player { + getID(): string; + getSignedPlayerInfoAsync(requestPayload: string): Promise; + canSubscribeBotAsync(): Promise; + subscribeBotAsync(): Promise; + getName(): string; + getPhoto(): string; + getDataAsync(keys?: string[]): Promise; + setDataAsync(data: DataObject): Promise; + flushDataAsync(): Promise; + getStatsAsync(keys?: string[]): Promise; + setStatsAsync(stats: StatsObject): Promise; + incrementStatsAsync(increments: IncrementObject): Promise; + getConnectedPlayersAsync(): Promise; + } + + interface Context { + getID(): string; + getType(): Type; + isSizeBetween(minSize: number, maxSize: number): ContextSizeResponse; + switchAsync(id: string): Promise; + chooseAsync(options: ContextOptions): Promise; + createAsync(playerID: string): Promise; + getPlayersAsync(): Promise; + } + + interface Leaderboard { + getName(): string; + getContextID(): string; + getEntryCountAsync(): Promise; + setScoreAsync(score: number, extraData: string): Promise; + getPlayerEntryAsync(): Promise; + getEntriesAsync(count: number, offset: number): Promise; + } + + interface LeaderboardEntry { + getScore(): number; + getFormattedScore(): string; + getTimestamp(): number; + getRank(): number; + getExtraData(): string; + getPlayer(): LeaderboardPlayer; + } + + interface LeaderboardPlayer { + getName(): string; + getPhoto(): string; + getID(): string; + } + + interface ConnectedPlayer { + getID(): string; + getName(): string; + getPhoto(): string; + } + + interface SignedPlayerInfo { + getPlayerID(): string; + getSignature(): string; + } + + interface ContextPlayer { + getID(): string; + getName(): string; + getPhoto(): string; + } + + interface AdInstance { + getPlacementID(): string; + loadAsync(): Promise; + showAsync(): Promise; + } + + interface Payments { + purchaseAsync(purchaseConfig: PurchaseConfig): Promise; + getPurchasesAsync(): Promise; + consumePurchaseAsync(purchaseToken: string): Promise; + onReady(callback: () => void): void; + } + + interface Product { + title: string; + productID: string; + description?: string; + imageURI?: string; + price: string; + priceCurrencyCode: string; + } + + interface ContextSizeResponse { + answer: boolean; + minSize?: number; + maxSize?: number; + } + + interface Purchase { + developerPayload?: string; + paymentID: string; + productID: string; + purchaseTime: string; + purchaseToken: string; + signedRequest: SignedPurchaseRequest; + } + + interface ContextOptions { + filters?: ContextFilter[]; + maxSize?: number; + minSize?: number; + } + + interface SharePayload { + intent?: Intent; + image?: string; + text?: string; + data?: any; + } + + interface APIError { + code: ErrorCodeType; + message: string; + } + + interface PurchaseConfig { + productID: string; + developerPayload?: string; + } + + interface UpdatePayload { + action?: UpdateAction; + template?: string; + cta?: (string | LocalizableContent); + image?: string; + text?: (string | LocalizableContent); + data?: any; + strategy?: string; + notification?: string; + } + + interface LeaderboardUpdatePayload { + action: UpdateAction; + name: string; + text?: string; + } + + interface LocalizableContent { + default: string; + localizations: LocalizationsDict; + } + + interface DataObject { [ key: string ]: string | number; } + + interface StatsObject { [ key: string ]: number; } + + interface IncrementObject { [ key: string ]: number; } + + type LocalizationsDict = any; + + type SignedPurchaseRequest = string; + + type ContextFilter = "NEW_CONTEXT_ONLY" | "INCLUDE_EXISTING_CHALLENGES" | "NEW_PLAYERS_ONLY"; + + type UpdateAction = "CUSTOM" | "LEADERBOARD"; + + type Platform = "IOS" | "ANDROID" | "WEB" | "MOBILE_WEB"; + + type Type = "POST" | "THREAD" | "GROUP" | "SOLO"; + + type Intent = "INVITE" | "REQUEST" | "CHALLENGE" | "SHARE"; + + type ErrorCodeType = "ADS_FREQUENT_LOAD" | + "ADS_NO_FILL" | + "ADS_NOT_LOADED" | + "ADS_TOO_MANY_INSTANCES" | + "ANALYTICS_POST_EXCEPTION" | + "CLIENT_REQUIRES_UPDATE" | + "CLIENT_UNSUPPORTED_OPERATION" | + "INVALID_OPERATION" | + "INVALID_PARAM" | + "LEADERBOARD_NOT_FOUND" | + "LEADERBOARD_WRONG_CONTEXT" | + "NETWORK_FAILURE" | + "PENDING_REQUEST" | + "RATE_LIMITED" | + "SAME_CONTEXT" | + "UNKNOWN" | + "USER_INPUT"; +} diff --git a/types/facebook-instant-games/tsconfig.json b/types/facebook-instant-games/tsconfig.json new file mode 100644 index 0000000000..5f1b7e6ccd --- /dev/null +++ b/types/facebook-instant-games/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "facebook-instant-games-tests.ts" + ] +} diff --git a/types/facebook-instant-games/tslint.json b/types/facebook-instant-games/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/facebook-instant-games/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/facebook-js-sdk/facebook-js-sdk-tests.ts b/types/facebook-js-sdk/facebook-js-sdk-tests.ts index f919e3290f..9652dbb86f 100644 --- a/types/facebook-js-sdk/facebook-js-sdk-tests.ts +++ b/types/facebook-js-sdk/facebook-js-sdk-tests.ts @@ -72,6 +72,15 @@ FB.ui({ console.log(data.payment_id); }); +FB.ui({ + method: 'pay', + action: 'purchaseiap', + product_id: 'com.fb.friendsmash.coins.10', + developer_payload: 'this_is_a_test_payload' +}, response => { + console.log(response); +}); + FB.ui({ method: 'pagetab', redirect_uri: 'YOUR_URL' diff --git a/types/facebook-js-sdk/index.d.ts b/types/facebook-js-sdk/index.d.ts index c380ee004d..be9f71f6c9 100644 --- a/types/facebook-js-sdk/index.d.ts +++ b/types/facebook-js-sdk/index.d.ts @@ -66,6 +66,11 @@ declare namespace facebook { */ ui(params: PayDialogParams, callback: (response: PayDialogResponse) => void): void; + /** + * @see https://developers.facebook.com/docs/games_payments/payments_lite + */ + ui(params: PaymentsLiteDialogParams, callback: (response: PaymentsLiteDialogResponse) => void): void; + /** * @see https://developers.facebook.com/docs/videos/live-video/exploring-live */ @@ -154,6 +159,14 @@ declare namespace facebook { request_id?: string; test_currency?: string; } + + interface PaymentsLiteDialogParams extends DialogParams { + method: 'pay'; + action: 'purchaseiap'; + product_id: string; + developer_payload?: string; + quantity?: number; + } interface LiveDialogParams extends DialogParams { method: 'live_broadcast'; @@ -173,7 +186,7 @@ declare namespace facebook { authResponse: { accessToken: string; expiresIn: number; - grantedScopes: string; + grantedScopes: string; signedRequest: string; userID: string; }; @@ -199,6 +212,17 @@ declare namespace facebook { signed_request: string; } + interface PaymentsLiteDialogResponse { + developer_payload?: string; + payment_id: number; + product_id?: string; + purchase_time?: number; + purchase_token?: string; + signed_request?: string; + error_code?: number; + error_message?: string; + } + interface LiveDialogResponse { id: string; stream_url: string; diff --git a/types/fb-watchman/fb-watchman-tests.ts b/types/fb-watchman/fb-watchman-tests.ts new file mode 100644 index 0000000000..9b1aeb387b --- /dev/null +++ b/types/fb-watchman/fb-watchman-tests.ts @@ -0,0 +1,14 @@ +import { Client } from "fb-watchman"; + +const client = new Client(); +const clientB = new Client({}); + +client.capabilityCheck({ optional: [], required: ['relative_root'] }, e => { + if (e) { + client.end(); + return; + } +}); +client.connect(); + +client.command(['watch-project', '/tmp'], () => {}); diff --git a/types/fb-watchman/index.d.ts b/types/fb-watchman/index.d.ts new file mode 100644 index 0000000000..a009cbe247 --- /dev/null +++ b/types/fb-watchman/index.d.ts @@ -0,0 +1,38 @@ +// Type definitions for fb-watchman 2.0 +// Project: https://facebook.github.io/watchman/ +// Definitions by: Wu Haotian +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { EventEmitter } from 'events'; + +// Emit the responses to these when they get sent down to us +export type UnilateralTags = 'unilateralTags' | 'log'; + +export interface ClientOptions { + /** + * Absolute path to the watchman binary. + * If not provided, the Client locates the binary using the PATH specified + * by the node child_process's default env. + */ + watchmanBinaryPath?: string; +} + +export interface Capabilities { + optional: any[]; + required: any[]; +} + +export type doneCallback = (error?: Error | null, resp?: any) => any; + +export class Client extends EventEmitter { + constructor(options?: ClientOptions) + sendNextCommand(): void; + cancelCommands(why: string): void; + connect(): void; + command(args: any, done: doneCallback): void; + capabilityCheck( + caps: Capabilities, + done: doneCallback, + ): void; + end(): void; +} diff --git a/types/fb-watchman/tsconfig.json b/types/fb-watchman/tsconfig.json new file mode 100644 index 0000000000..83ad2335ea --- /dev/null +++ b/types/fb-watchman/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "fb-watchman-tests.ts" + ] +} diff --git a/types/fb-watchman/tslint.json b/types/fb-watchman/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/fb-watchman/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/fbemitter/fbemitter-tests.ts b/types/fbemitter/fbemitter-tests.ts index 1a4983242f..22424fc442 100644 --- a/types/fbemitter/fbemitter-tests.ts +++ b/types/fbemitter/fbemitter-tests.ts @@ -1,5 +1,4 @@ /// -/// 'use strict'; @@ -11,6 +10,11 @@ import { EventEmitter, EventSubscription } from 'fbemitter'; import * as util from 'util'; import * as assert from 'assert'; +// Stub mocha functions +const {describe, it, before, after, beforeEach, afterEach} = null as any as { + [s: string]: ((s: string, cb: (done: any) => void) => void) & ((cb: (done: any) => void) => void) & {only: any, skip: any}; +}; + describe('EventEmitter', function tests() { 'use strict'; diff --git a/types/feathersjs__authentication-client/index.d.ts b/types/feathersjs__authentication-client/index.d.ts index 16f4f4a415..9d1972bebc 100644 --- a/types/feathersjs__authentication-client/index.d.ts +++ b/types/feathersjs__authentication-client/index.d.ts @@ -2,8 +2,11 @@ // Project: http://feathersjs.com/ // Definitions by: Abraao Alves , Jan Lohage // Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript +// TypeScript Version: 2.3 +import * as self from '@feathersjs/authentication-client'; -export default function feathersAuthClient(config?: FeathersAuthClientConfig): () => void; +declare const feathersAuthClient: ((config?: FeathersAuthClientConfig) => () => void) & typeof self; +export default feathersAuthClient; export interface FeathersAuthClientConfig { storage?: Storage; diff --git a/types/feathersjs__authentication-jwt/index.d.ts b/types/feathersjs__authentication-jwt/index.d.ts index cc9e58be0d..ab6a7f6dbe 100644 --- a/types/feathersjs__authentication-jwt/index.d.ts +++ b/types/feathersjs__authentication-jwt/index.d.ts @@ -2,12 +2,14 @@ // Project: http://feathersjs.com/ // Definitions by: Jan Lohage // Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import { Application } from '@feathersjs/feathers'; import { Request } from 'express'; +import * as self from '@feathersjs/authentication-jwt'; -export default function feathersAuthenticationJwt(options?: FeathersAuthenticationJWTOptions): () => void; +declare const feathersAuthenticationJwt: ((options?: FeathersAuthenticationJWTOptions) => () => void) & typeof self; +export default feathersAuthenticationJwt; export interface FeathersAuthenticationJWTOptions { /** @@ -45,7 +47,7 @@ export interface FeathersAuthenticationJWTOptions { } export class JWTVerifier { - constructor(app: Application, options: any); // the class constructor + constructor(app: Application, options: any); // the class constructor verify(req: Request, payload: any, done: (error: any, user?: any, info?: any) => void): void; } diff --git a/types/feathersjs__authentication-local/index.d.ts b/types/feathersjs__authentication-local/index.d.ts index 8b6af17a33..e15b101258 100644 --- a/types/feathersjs__authentication-local/index.d.ts +++ b/types/feathersjs__authentication-local/index.d.ts @@ -2,7 +2,7 @@ // Project: http://feathersjs.com/ // Definitions by: Jan Lohage // Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import { Application, @@ -10,8 +10,10 @@ import { Paginated } from '@feathersjs/feathers'; import { Request } from 'express'; +import * as self from '@feathersjs/authentication-local'; -export default function feathersAuthenticationLocal(options?: FeathersAuthenticationLocalOptions): () => void; +declare const feathersAuthenticationLocal: ((options?: FeathersAuthenticationLocalOptions) => () => void) & typeof self; +export default feathersAuthenticationLocal; export interface FeathersAuthenticationLocalOptions { /** @@ -57,7 +59,7 @@ export interface FeathersAuthenticationLocalOptions { } export class LocalVerifier { - constructor(app: Application, options: any); + constructor(app: Application, options: any); _comparePassword(entity: T, password: string): Promise; // compares password using bcrypt _normalizeResult(results: T[] | Paginated): Promise; // normalizes result from service to account for pagination diff --git a/types/feathersjs__authentication-oauth1/index.d.ts b/types/feathersjs__authentication-oauth1/index.d.ts index 54d4d2614a..fa993c1cd0 100644 --- a/types/feathersjs__authentication-oauth1/index.d.ts +++ b/types/feathersjs__authentication-oauth1/index.d.ts @@ -2,15 +2,17 @@ // Project: http://feathersjs.com/ // Definitions by: Jan Lohage // Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import { Application, Paginated } from '@feathersjs/feathers'; import { Request } from 'express'; +import * as self from '@feathersjs/authentication-oauth1'; -export default function feathersAuthenticationOAuth1(options?: FeathersAuthenticationOAuth1Options): () => void; +declare const feathersAuthenticationOAuth1: ((options?: FeathersAuthenticationOAuth1Options) => () => void) & typeof self; +export default feathersAuthenticationOAuth1; export interface FeathersAuthenticationOAuth1Options { /** @@ -60,7 +62,7 @@ export interface FeathersAuthenticationOAuth1Options { } export class OAuth1Verifier { - constructor(app: Application, options: any); + constructor(app: Application, options: any); _updateEntity(entity: any, data: { profile: any, accessToken: string, refreshToken: string }): Promise; // updates an existing entity _createEntity(data: { profile: any, accessToken: string, refreshToken: string }): Promise; // creates an entity if they didn't exist already diff --git a/types/feathersjs__authentication-oauth2/feathersjs__authentication-oauth2-tests.ts b/types/feathersjs__authentication-oauth2/feathersjs__authentication-oauth2-tests.ts index f5ebaa4c1a..34dba17062 100644 --- a/types/feathersjs__authentication-oauth2/feathersjs__authentication-oauth2-tests.ts +++ b/types/feathersjs__authentication-oauth2/feathersjs__authentication-oauth2-tests.ts @@ -1,4 +1,10 @@ import feathers, { Application } from '@feathersjs/feathers'; -import feathersAuthenticationOAuth2 from '@feathersjs/authentication-oauth2'; +import feathersAuthenticationOAuth2, { Verifier } from '@feathersjs/authentication-oauth2'; const app: Application<{}> = feathers().configure(feathersAuthenticationOAuth2()); + +class CustomVerifier extends Verifier { + constructor(app: Application<{}>, options: any = {}) { + super(app, options); + } +} diff --git a/types/feathersjs__authentication-oauth2/index.d.ts b/types/feathersjs__authentication-oauth2/index.d.ts index 5ac6976dac..b2bf133c68 100644 --- a/types/feathersjs__authentication-oauth2/index.d.ts +++ b/types/feathersjs__authentication-oauth2/index.d.ts @@ -2,15 +2,17 @@ // Project: http://feathersjs.com/ // Definitions by: Jan Lohage // Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import { Application, Paginated } from '@feathersjs/feathers'; import { Request } from 'express'; +import * as self from '@feathersjs/authentication-oauth2'; -export default function feathersAuthenticationOAuth2(options?: FeathersAuthenticationOAuth2Options): () => void; +declare const feathersAuthenticationOAuth2: ((options?: FeathersAuthenticationOAuth2Options) => () => void) & typeof self; +export default feathersAuthenticationOAuth2; export interface FeathersAuthenticationOAuth2Options { /** @@ -58,11 +60,11 @@ export interface FeathersAuthenticationOAuth2Options { /** * A Verifier class. Defaults to the built-in one but can be a custom one. See below for details. */ - Verifier: OAuth2Verifier; + Verifier: Verifier; } -export class OAuth2Verifier { - constructor(app: Application, options: any) +export class Verifier { + constructor(app: Application, options: any) _updateEntity(entity: any, data: { profile: any, accessToken: string, refreshToken: string }): Promise; // updates an existing entity _createEntity(data: { profile: any, accessToken: string, refreshToken: string }): Promise; // creates an entity if they didn't exist already diff --git a/types/feathersjs__authentication/index.d.ts b/types/feathersjs__authentication/index.d.ts index 3a4722f12e..f451b0deda 100644 --- a/types/feathersjs__authentication/index.d.ts +++ b/types/feathersjs__authentication/index.d.ts @@ -4,8 +4,10 @@ // Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript import { Hook } from '@feathersjs/feathers'; +import * as self from '@feathersjs/authentication'; -export default function feathersAuthentication(config?: FeathersAuthenticationOptions): () => void; +declare const feathersAuthentication: ((config?: FeathersAuthenticationOptions) => () => void) & typeof self; +export default feathersAuthentication; export const hooks: AuthHooks.Hooks; diff --git a/types/feathersjs__configuration/index.d.ts b/types/feathersjs__configuration/index.d.ts index fe597c8360..abd7e53d70 100644 --- a/types/feathersjs__configuration/index.d.ts +++ b/types/feathersjs__configuration/index.d.ts @@ -2,6 +2,7 @@ // Project: http://feathersjs.com/ // Definitions by: Jan Lohage // Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript +// TypeScript Version: 2.3 import { Application } from '@feathersjs/feathers'; diff --git a/types/feathersjs__express/feathersjs__express-tests.ts b/types/feathersjs__express/feathersjs__express-tests.ts index 687191d0c6..1bd1f5221a 100644 --- a/types/feathersjs__express/feathersjs__express-tests.ts +++ b/types/feathersjs__express/feathersjs__express-tests.ts @@ -1,8 +1,11 @@ import feathers, { Application } from '@feathersjs/feathers'; -import feathersExpress, { original, rest, notFound, errorHandler } from '@feathersjs/express'; +import feathersExpress, * as express from '@feathersjs/express'; const app = feathersExpress(feathers()); -app.configure(rest()); -app.use(notFound()); -app.use(errorHandler()); +app.use(express.json()); +app.use(express.urlencoded({ extended: true })); +app.use('/', express.static('./public')); +app.configure(express.rest()); +app.use(express.notFound()); +app.use(express.errorHandler({ logger: console })); diff --git a/types/feathersjs__express/index.d.ts b/types/feathersjs__express/index.d.ts index eb49f00a78..4dfaa0f8ee 100644 --- a/types/feathersjs__express/index.d.ts +++ b/types/feathersjs__express/index.d.ts @@ -1,19 +1,28 @@ // Type definitions for @feathersjs/express 1.1 // Project: http://feathersjs.com/ // Definitions by: Jan Lohage +// Aleksey Klimenko // Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import { Application as FeathersApplication } from '@feathersjs/feathers'; import * as express from 'express'; +import * as self from '@feathersjs/express'; -export default function feathersExpress(app: FeathersApplication): Application; +declare const feathersExpress: ((app: FeathersApplication) => Application) & typeof self; +export default feathersExpress; export type Application = express.Application & FeathersApplication; -export function errorHandler(options?: any): express.ErrorRequestHandler; +export function errorHandler(options?: { + public?: string, + logger?: { error?: (msg: string) => void }, + html?: any, + json?: any, +}): express.ErrorRequestHandler; export function notFound(): express.RequestHandler; + export const rest: { - (): () => void; + (handler?: express.RequestHandler): () => void; formatter: express.RequestHandler; }; diff --git a/types/feathersjs__feathers/index.d.ts b/types/feathersjs__feathers/index.d.ts index 6ae7b22238..c0fa3d9946 100644 --- a/types/feathersjs__feathers/index.d.ts +++ b/types/feathersjs__feathers/index.d.ts @@ -8,8 +8,10 @@ /// import { EventEmitter } from 'events'; +import * as self from '@feathersjs/feathers'; -export default function feathers(): Application; +declare const feathers: (() => Application) & typeof self; +export default feathers; export const version: string; diff --git a/types/feathersjs__primus-client/index.d.ts b/types/feathersjs__primus-client/index.d.ts index 4e51cd159c..fb348379ea 100644 --- a/types/feathersjs__primus-client/index.d.ts +++ b/types/feathersjs__primus-client/index.d.ts @@ -2,6 +2,7 @@ // Project: http://feathersjs.com/ // Definitions by: Jan Lohage // Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript +// TypeScript Version: 2.3 // primus removed its typings from the repo https://github.com/primus/primus/pull/623, as of 01/2018 there are none on DT export default function feathersPrimusClient(socket: any, options?: FeathersPrimusClientOptions): () => void; diff --git a/types/feathersjs__socketio-client/index.d.ts b/types/feathersjs__socketio-client/index.d.ts index f155bc50de..83fd71b0ed 100644 --- a/types/feathersjs__socketio-client/index.d.ts +++ b/types/feathersjs__socketio-client/index.d.ts @@ -2,6 +2,7 @@ // Project: http://feathersjs.com/ // Definitions by: Jan Lohage // Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript +// TypeScript Version: 2.3 /// diff --git a/types/feathersjs__socketio/index.d.ts b/types/feathersjs__socketio/index.d.ts index 7ba889dfbe..f0e082bf45 100644 --- a/types/feathersjs__socketio/index.d.ts +++ b/types/feathersjs__socketio/index.d.ts @@ -4,8 +4,8 @@ // Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript // TypeScript Version: 2.3 -/// /// +import SocketIO = require("socket.io"); export default function feathersSocketIO(callback?: (io: SocketIO.Server) => void): () => void; export default function feathersSocketIO(options: number | SocketIO.ServerOptions, callback?: (io: SocketIO.Server) => void): () => void; diff --git a/types/fetch-mock/fetch-mock-tests.ts b/types/fetch-mock/fetch-mock-tests.ts index 1d4b706105..84218fb9e1 100644 --- a/types/fetch-mock/fetch-mock-tests.ts +++ b/types/fetch-mock/fetch-mock-tests.ts @@ -61,6 +61,7 @@ fetchMock.patch("http://test.com", 200); fetchMock.patchOnce("http://test.com", 200); fetchMock.get("http://test.com", 200, {method: "GET"}); +fetchMock.get("http://test.com", 200, {method: "GET", overwriteRoutes: true}); fetchMock.post("http://test.com", 200, {method: "POST"}); fetchMock.put("http://test.com", 200, {method: "PUT"}); fetchMock.delete("http://test.com", 200, {method: "DELETE"}); diff --git a/types/fetch-mock/index.d.ts b/types/fetch-mock/index.d.ts index 15babcba34..fc94b18106 100644 --- a/types/fetch-mock/index.d.ts +++ b/types/fetch-mock/index.d.ts @@ -5,6 +5,7 @@ // Risto Keravuori // Chris Sinclair // Matt Tennison +// Quentin Bouygues // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -120,6 +121,12 @@ declare namespace fetchMock { * as specified above */ matcher?: MockMatcher; + /** + * This option allows for existing routes in a mock to be overwritten. + * It’s also possible to define multiple routes with ‘the same’ matcher. + * Default behaviour is to error + */ + overwriteRoutes?: boolean; /** * as specified above */ diff --git a/types/find-root/index.d.ts b/types/find-root/index.d.ts index b2fe6f572a..050781eacf 100644 --- a/types/find-root/index.d.ts +++ b/types/find-root/index.d.ts @@ -10,7 +10,7 @@ type FindRootCheckFn = (dir: string) => boolean; /** * Returns the path for the nearest directory to startingPath containing a package.json file. If a check function is * provided, then this will return the nearest directory for which the function returns true. - * @param startingPath The path to start searching form, e.g. __dirname + * @param startingPath The path to start searching from, e.g. __dirname * @param check The check predicate * @throws {Error} if package.json cannot be found or if the function never returns true */ diff --git a/types/firefox-webext-browser/firefox-webext-browser-tests.ts b/types/firefox-webext-browser/firefox-webext-browser-tests.ts index 01d9cf9f3d..38169d573a 100644 --- a/types/firefox-webext-browser/firefox-webext-browser-tests.ts +++ b/types/firefox-webext-browser/firefox-webext-browser-tests.ts @@ -8,3 +8,7 @@ browser.manifest; // $ExpectError browser._manifest; // $ExpectType typeof _manifest browser._manifest.WebExtensionLangpackManifest; // $ExpectError browser._manifest.NativeManifest; // $ExpectError + +// browser.runtime +const port = browser.runtime.connect(); +port.postMessage(); // $ExpectError diff --git a/types/firefox-webext-browser/index.d.ts b/types/firefox-webext-browser/index.d.ts index dcbfb48648..d04b7f6aca 100644 --- a/types/firefox-webext-browser/index.d.ts +++ b/types/firefox-webext-browser/index.d.ts @@ -2296,10 +2296,10 @@ declare namespace browser.runtime { /** An object which allows two way communication with other pages. */ interface Port { name: string; - disconnect: () => void; + disconnect(): void; onDisconnect: events.Event; onMessage: events.Event; - postMessage: () => void; + postMessage(message: object): void; /** This property will **only** be present on ports passed to onConnect/onConnectExternal listeners. */ sender?: MessageSender; } diff --git a/types/fnv-lite/fnv-lite-tests.ts b/types/fnv-lite/fnv-lite-tests.ts new file mode 100644 index 0000000000..33d9133a27 --- /dev/null +++ b/types/fnv-lite/fnv-lite-tests.ts @@ -0,0 +1,20 @@ +import FNV = require('fnv-lite'); + +let result: string; +result = FNV.hex(''); +result = FNV.base64(''); +result = FNV.base64Url(''); +result = FNV.base36(''); + +result = FNV.hex([1, 2, 3]); +result = FNV.base64([1, 2, 3]); +result = FNV.base64Url([1, 2, 3]); +result = FNV.base36([1, 2, 3]); + +const fnv = new FNV(); +fnv.update([1, 2, 3]).update("abc"); +result = fnv.digest('hex'); +result = fnv.digest('base36'); +result = fnv.digest('base64'); +result = fnv.digest('base64Url'); +const resultArray: number[] = fnv.digest(); diff --git a/types/fnv-lite/index.d.ts b/types/fnv-lite/index.d.ts new file mode 100644 index 0000000000..0cbd3553d6 --- /dev/null +++ b/types/fnv-lite/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for fnv-lite 1.2 +// Project: https://github.com/casetext/fnv-lite +// Definitions by: MarcinD +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +type Input = string | ArrayLike; + +declare class FNV { + static hex(input: Input): string; + static base64(input: Input): string; + static base64Url(input: Input): string; + static base36(input: Input): string; + + update(input: Input): this; + digest(): number[]; + digest(type: "hex" | "base36" | "base64" | "base64Url"): string; +} + +export = FNV; diff --git a/types/fnv-lite/tsconfig.json b/types/fnv-lite/tsconfig.json new file mode 100644 index 0000000000..d04f5527ef --- /dev/null +++ b/types/fnv-lite/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "fnv-lite-tests.ts" + ] +} diff --git a/types/fnv-lite/tslint.json b/types/fnv-lite/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/fnv-lite/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/focus-within/index.d.ts b/types/focus-within/index.d.ts new file mode 100644 index 0000000000..4a8778fe05 --- /dev/null +++ b/types/focus-within/index.d.ts @@ -0,0 +1,16 @@ +// Type definitions for focus-within 1.0 +// Project: https://github.com/jonathantneal/focus-within#readme +// Definitions by: Damien Erambert +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace focusWithin { + interface FocusWithinOpts { + attr?: boolean; + className?: string; + } +} + +declare function focusWithin(document: HTMLDocument, opts?: focusWithin.FocusWithinOpts): void; + +export as namespace focusWithin; +export = focusWithin; diff --git a/types/focus-within/test/focus-within-global-tests.ts b/types/focus-within/test/focus-within-global-tests.ts new file mode 100644 index 0000000000..51ddc6aad5 --- /dev/null +++ b/types/focus-within/test/focus-within-global-tests.ts @@ -0,0 +1,10 @@ +/* + * This file tests the typings of the global export of `focus-within` + */ + +focusWithin(document); + +focusWithin(document, { + attr: false, + className: 'foo' +}); diff --git a/types/focus-within/test/focus-within-import-default-tests.ts b/types/focus-within/test/focus-within-import-default-tests.ts new file mode 100644 index 0000000000..627dce9660 --- /dev/null +++ b/types/focus-within/test/focus-within-import-default-tests.ts @@ -0,0 +1,11 @@ +/* + * This file tests the typings of the default export of `focus-within` + */ +import focusWithin = require("focus-within"); + +focusWithin(document); + +focusWithin(document, { + attr: false, + className: 'foo' +}); diff --git a/types/focus-within/tsconfig.json b/types/focus-within/tsconfig.json new file mode 100644 index 0000000000..976335025f --- /dev/null +++ b/types/focus-within/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "test/focus-within-global-tests.ts", + "test/focus-within-import-default-tests.ts" + ] +} diff --git a/types/focus-within/tslint.json b/types/focus-within/tslint.json new file mode 100644 index 0000000000..e60c15844f --- /dev/null +++ b/types/focus-within/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file diff --git a/types/formidable/index.d.ts b/types/formidable/index.d.ts index 8163fa5894..da5c730ae8 100644 --- a/types/formidable/index.d.ts +++ b/types/formidable/index.d.ts @@ -14,6 +14,7 @@ export declare class IncomingForm extends events.EventEmitter { encoding: string; uploadDir: string; keepExtensions: boolean; + maxFileSize: number; maxFieldsSize: number; maxFields: number; hash: string | boolean; diff --git a/types/frisby/index.d.ts b/types/frisby/index.d.ts index 366a3998d7..9057edae6d 100644 --- a/types/frisby/index.d.ts +++ b/types/frisby/index.d.ts @@ -18,16 +18,27 @@ export import Joi = require("joi"); // #region Frisby FrisbySpec Methods // Reference file: https://github.com/vlucas/frisby/blob/master/src/frisby/spec.js + +// **************************************CHANGE LOG************************************** +// C.E.W. This is an attempt to create some sort of changelog for these types. +// If you make any changes, please try and note those changes in this section. +// If this section gets too long we can always trim it. +// ## 2018-03-05 +// ### Changed +// - Update _Frisbyspec.get_, _Frisbyspec.post_, _Frisbyspec.put_, _Frisbyspec.del_, _Frisbyspec.patch_, _Frisbyspec.fetch_ to allow _params_ to be optional. +// - Update _FrisbySpec.then_ to allow _onRejected_ to be optional. +// **************************************CHANGE LOG************************************** + export class FrisbySpec { constructor(...args: any[]); catch(onRejected?: (error: Error) => void): FrisbySpec; - del(url: string, params: {}): FrisbySpec; + del(url: string, params?: {}): FrisbySpec; done(doneFn: (...args: any[]) => void): FrisbySpec; expect(expectName: string, ...args: any[]): FrisbySpec; expectNot(expectName: string): FrisbySpec; - fetch(url: string, params: {}, options?: {}): FrisbySpec; + fetch(url: string, params?: {}, options?: {}): FrisbySpec; fromJSON(json: {}): FrisbySpec; - get(url: string, params: {}): FrisbySpec; + get(url: string, params?: {}): FrisbySpec; getBaseUrl(): string | boolean; inspectBody(): FrisbySpec; inspectHeaders(): FrisbySpec; @@ -37,12 +48,12 @@ export class FrisbySpec { inspectRequestHeaders(): FrisbySpec; inspectResponse(): FrisbySpec; inspectStatus(): FrisbySpec; - patch(url: string, params: {}): FrisbySpec; - post(url: string, params: {}): FrisbySpec; + patch(url: string, params?: {}): FrisbySpec; + post(url: string, params?: {}): FrisbySpec; promise(): Promise; - put(url: string, params: {}): FrisbySpec; + put(url: string, params?: {}): FrisbySpec; setup(opts: {}, replace: boolean): FrisbySpec; - then(onFulfilled: {} | ((...args: any[]) => void), onRejected: (...args: any[]) => void): FrisbySpec; + then(onFulfilled: {} | ((...args: any[]) => void), onRejected?: (...args: any[]) => void): FrisbySpec; timeout(timeout: number): number; use(fn: (...args: any[]) => void): FrisbySpec; static addExpectHandler(expectName: string, expectFn: (...args: any[]) => any): void; diff --git a/types/fs-extra/fs-extra-tests.ts b/types/fs-extra/fs-extra-tests.ts index 50d594e1a4..dbe48cf971 100644 --- a/types/fs-extra/fs-extra-tests.ts +++ b/types/fs-extra/fs-extra-tests.ts @@ -48,7 +48,7 @@ fs.copy(src, dest, { overwrite: true, preserveTimestamps: true, - filter: (src: string, dest: string) => false + filter: (src: string, dest: string) => Promise.resolve(false) }, errorCallback ); diff --git a/types/fs-extra/index.d.ts b/types/fs-extra/index.d.ts index 6183dce393..adf236955b 100644 --- a/types/fs-extra/index.d.ts +++ b/types/fs-extra/index.d.ts @@ -3,7 +3,8 @@ // Definitions by: Alan Agius , // midknight41 , // Brendan Forster , -// Mees van Dijk +// Mees van Dijk , +// Justin Rockwood // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -16,7 +17,7 @@ export * from "fs"; export function copy(src: string, dest: string, options?: CopyOptions): Promise; export function copy(src: string, dest: string, callback: (err: Error) => void): void; export function copy(src: string, dest: string, options: CopyOptions, callback: (err: Error) => void): void; -export function copySync(src: string, dest: string, options?: CopyOptions): void; +export function copySync(src: string, dest: string, options?: CopyOptionsSync): void; export function move(src: string, dest: string, options?: MoveOptions): Promise; export function move(src: string, dest: string, callback: (err: Error) => void): void; @@ -254,7 +255,8 @@ export interface PathEntryStream { read(): PathEntry | null; } -export type CopyFilter = (src: string, dest: string) => boolean; +export type CopyFilterSync = (src: string, dest: string) => boolean; +export type CopyFilterAsync = (src: string, dest: string) => Promise; export type SymlinkType = "dir" | "file"; @@ -263,10 +265,14 @@ export interface CopyOptions { overwrite?: boolean; preserveTimestamps?: boolean; errorOnExist?: boolean; - filter?: CopyFilter; + filter?: CopyFilterSync | CopyFilterAsync; recursive?: boolean; } +export interface CopyOptionsSync extends CopyOptions { + filter?: CopyFilterSync; +} + export interface MoveOptions { overwrite?: boolean; limit?: number; diff --git a/types/gapi.client.drive/gapi.client.drive-tests.ts b/types/gapi.client.drive/gapi.client.drive-tests.ts index f9fa0ce332..002b5e7eb6 100644 --- a/types/gapi.client.drive/gapi.client.drive-tests.ts +++ b/types/gapi.client.drive/gapi.client.drive-tests.ts @@ -43,15 +43,15 @@ gapi.load('client', () => { async function run() { /** Gets information about the user, the user's Drive, and system capabilities. */ - await gapi.client.about.get({ + await gapi.client.drive.about.get({ }); /** Gets the starting pageToken for listing future changes. */ - await gapi.client.changes.getStartPageToken({ + await gapi.client.drive.changes.getStartPageToken({ supportsTeamDrives: true, teamDriveId: "teamDriveId", }); /** Lists the changes for a user or Team Drive. */ - await gapi.client.changes.list({ + await gapi.client.drive.changes.list({ includeCorpusRemovals: true, includeRemoved: true, includeTeamDriveItems: true, @@ -63,7 +63,7 @@ gapi.load('client', () => { teamDriveId: "teamDriveId", }); /** Subscribes to changes for a user. */ - await gapi.client.changes.watch({ + await gapi.client.drive.changes.watch({ includeCorpusRemovals: true, includeRemoved: true, includeTeamDriveItems: true, @@ -75,25 +75,25 @@ gapi.load('client', () => { teamDriveId: "teamDriveId", }); /** Stop watching resources through this channel */ - await gapi.client.channels.stop({ + await gapi.client.drive.channels.stop({ }); /** Creates a new comment on a file. */ - await gapi.client.comments.create({ + await gapi.client.drive.comments.create({ fileId: "fileId", }); /** Deletes a comment. */ - await gapi.client.comments.delete({ + await gapi.client.drive.comments.delete({ commentId: "commentId", fileId: "fileId", }); /** Gets a comment by ID. */ - await gapi.client.comments.get({ + await gapi.client.drive.comments.get({ commentId: "commentId", fileId: "fileId", includeDeleted: true, }); /** Lists a file's comments. */ - await gapi.client.comments.list({ + await gapi.client.drive.comments.list({ fileId: "fileId", includeDeleted: true, pageSize: 3, @@ -101,12 +101,12 @@ gapi.load('client', () => { startModifiedTime: "startModifiedTime", }); /** Updates a comment with patch semantics. */ - await gapi.client.comments.update({ + await gapi.client.drive.comments.update({ commentId: "commentId", fileId: "fileId", }); /** Creates a copy of a file and applies any requested updates with patch semantics. */ - await gapi.client.files.copy({ + await gapi.client.drive.files.copy({ fileId: "fileId", ignoreDefaultVisibility: true, keepRevisionForever: true, @@ -114,7 +114,7 @@ gapi.load('client', () => { supportsTeamDrives: true, }); /** Creates a new file. */ - await gapi.client.files.create({ + await gapi.client.drive.files.create({ ignoreDefaultVisibility: true, keepRevisionForever: true, ocrLanguage: "ocrLanguage", @@ -125,31 +125,31 @@ gapi.load('client', () => { * Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a Team Drive the user must be an organizer on the * parent. If the target is a folder, all descendants owned by the user are also deleted. */ - await gapi.client.files.delete({ + await gapi.client.drive.files.delete({ fileId: "fileId", supportsTeamDrives: true, }); /** Permanently deletes all of the user's trashed files. */ - await gapi.client.files.emptyTrash({ + await gapi.client.drive.files.emptyTrash({ }); /** Exports a Google Doc to the requested MIME type and returns the exported content. Please note that the exported content is limited to 10MB. */ - await gapi.client.files.export({ + await gapi.client.drive.files.export({ fileId: "fileId", mimeType: "mimeType", }); /** Generates a set of file IDs which can be provided in create requests. */ - await gapi.client.files.generateIds({ + await gapi.client.drive.files.generateIds({ count: 1, space: "space", }); /** Gets a file's metadata or content by ID. */ - await gapi.client.files.get({ + await gapi.client.drive.files.get({ acknowledgeAbuse: true, fileId: "fileId", supportsTeamDrives: true, }); /** Lists or searches files. */ - await gapi.client.files.list({ + await gapi.client.drive.files.list({ corpora: "corpora", corpus: "corpus", includeTeamDriveItems: true, @@ -162,7 +162,7 @@ gapi.load('client', () => { teamDriveId: "teamDriveId", }); /** Updates a file's metadata and/or content with patch semantics. */ - await gapi.client.files.update({ + await gapi.client.drive.files.update({ addParents: "addParents", fileId: "fileId", keepRevisionForever: true, @@ -172,66 +172,71 @@ gapi.load('client', () => { useContentAsIndexableText: true, }); /** Subscribes to changes to a file */ - await gapi.client.files.watch({ + await gapi.client.drive.files.watch({ acknowledgeAbuse: true, fileId: "fileId", supportsTeamDrives: true, }); /** Creates a permission for a file or Team Drive. */ - await gapi.client.permissions.create({ + await gapi.client.drive.permissions.create({ emailMessage: "emailMessage", fileId: "fileId", sendNotificationEmail: true, supportsTeamDrives: true, transferOwnership: true, + useDomainAdminAccess: true, }); /** Deletes a permission. */ - await gapi.client.permissions.delete({ + await gapi.client.drive.permissions.delete({ fileId: "fileId", permissionId: "permissionId", supportsTeamDrives: true, + useDomainAdminAccess: true, }); /** Gets a permission by ID. */ - await gapi.client.permissions.get({ + await gapi.client.drive.permissions.get({ fileId: "fileId", permissionId: "permissionId", supportsTeamDrives: true, + useDomainAdminAccess: true, }); /** Lists a file's or Team Drive's permissions. */ - await gapi.client.permissions.list({ + await gapi.client.drive.permissions.list({ fileId: "fileId", pageSize: 2, pageToken: "pageToken", supportsTeamDrives: true, + useDomainAdminAccess: true, }); /** Updates a permission with patch semantics. */ - await gapi.client.permissions.update({ + await gapi.client.drive.permissions.update({ fileId: "fileId", permissionId: "permissionId", removeExpiration: true, supportsTeamDrives: true, transferOwnership: true, + useDomainAdminAccess: true, }); /** Creates a new reply to a comment. */ - await gapi.client.replies.create({ + await gapi.client.drive.replies.create({ commentId: "commentId", fileId: "fileId", }); /** Deletes a reply. */ - await gapi.client.replies.delete({ + await gapi.client.drive.replies.delete({ commentId: "commentId", fileId: "fileId", replyId: "replyId", }); /** Gets a reply by ID. */ - await gapi.client.replies.get({ + await gapi.client.drive.replies.get({ commentId: "commentId", fileId: "fileId", includeDeleted: true, replyId: "replyId", }); /** Lists a comment's replies. */ - await gapi.client.replies.list({ + await gapi.client.drive.replies.list({ commentId: "commentId", fileId: "fileId", includeDeleted: true, @@ -239,52 +244,55 @@ gapi.load('client', () => { pageToken: "pageToken", }); /** Updates a reply with patch semantics. */ - await gapi.client.replies.update({ + await gapi.client.drive.replies.update({ commentId: "commentId", fileId: "fileId", replyId: "replyId", }); /** Permanently deletes a revision. This method is only applicable to files with binary content in Drive. */ - await gapi.client.revisions.delete({ + await gapi.client.drive.revisions.delete({ fileId: "fileId", revisionId: "revisionId", }); /** Gets a revision's metadata or content by ID. */ - await gapi.client.revisions.get({ + await gapi.client.drive.revisions.get({ acknowledgeAbuse: true, fileId: "fileId", revisionId: "revisionId", }); /** Lists a file's revisions. */ - await gapi.client.revisions.list({ + await gapi.client.drive.revisions.list({ fileId: "fileId", pageSize: 2, pageToken: "pageToken", }); /** Updates a revision with patch semantics. */ - await gapi.client.revisions.update({ + await gapi.client.drive.revisions.update({ fileId: "fileId", revisionId: "revisionId", }); /** Creates a new Team Drive. */ - await gapi.client.teamdrives.create({ + await gapi.client.drive.teamdrives.create({ requestId: "requestId", }); /** Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain any untrashed items. */ - await gapi.client.teamdrives.delete({ + await gapi.client.drive.teamdrives.delete({ teamDriveId: "teamDriveId", }); /** Gets a Team Drive's metadata by ID. */ - await gapi.client.teamdrives.get({ + await gapi.client.drive.teamdrives.get({ teamDriveId: "teamDriveId", + useDomainAdminAccess: true, }); /** Lists the user's Team Drives. */ - await gapi.client.teamdrives.list({ + await gapi.client.drive.teamdrives.list({ pageSize: 1, pageToken: "pageToken", + q: "q", + useDomainAdminAccess: true, }); /** Updates a Team Drive's metadata */ - await gapi.client.teamdrives.update({ + await gapi.client.drive.teamdrives.update({ teamDriveId: "teamDriveId", }); } diff --git a/types/gapi.client.drive/index.d.ts b/types/gapi.client.drive/index.d.ts index 7004e2c0bb..1b2a939a7d 100644 --- a/types/gapi.client.drive/index.d.ts +++ b/types/gapi.client.drive/index.d.ts @@ -16,28 +16,12 @@ declare namespace gapi.client { function load(name: "drive", version: "v3"): PromiseLike; function load(name: "drive", version: "v3", callback: () => any): void; - const about: drive.AboutResource; - - const changes: drive.ChangesResource; - - const channels: drive.ChannelsResource; - - const comments: drive.CommentsResource; - - const files: drive.FilesResource; - - const permissions: drive.PermissionsResource; - - const replies: drive.RepliesResource; - - const revisions: drive.RevisionsResource; - - const teamdrives: drive.TeamdrivesResource; - namespace drive { interface About { /** Whether the user has installed the requesting app. */ appInstalled?: boolean; + /** Whether the user can create Team Drives. */ + canCreateTeamDrives?: boolean; /** A map of source MIME type to possible targets for all supported exports. */ exportFormats?: Record; /** The currently supported folder colors as RGB hex strings. */ @@ -363,8 +347,9 @@ declare namespace gapi.client { owners?: User[]; /** * The IDs of the parent folders which contain the file. - * If not specified as part of a create request, the file will be placed directly in the My Drive folder. Update requests must use the addParents and - * removeParents parameters to modify the values. + * If not specified as part of a create request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy + * request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to + * modify the parents list. */ parents?: string[]; /** List of permission IDs for users with access to this file. */ @@ -683,6 +668,8 @@ declare namespace gapi.client { }; /** The color of this Team Drive as an RGB hex string. It can only be set on a drive.teamdrives.update request that does not set themeId. */ colorRgb?: string; + /** The time at which the Team Drive was created (RFC 3339 date-time). */ + createdTime?: string; /** The ID of this Team Drive which is also the ID of the top level folder for this Team Drive. */ id?: string; /** Identifies what kind of resource this is. Value: the fixed string "drive#teamDrive". */ @@ -1322,7 +1309,7 @@ declare namespace gapi.client { create(request: { /** Data format for the response. */ alt?: string; - /** A custom message to include in the notification email. */ + /** A plain text custom message to include in the notification email. */ emailMessage?: string; /** Selector specifying which fields to include in a partial response. */ fields?: string; @@ -1351,6 +1338,11 @@ declare namespace gapi.client { * the side effect. */ transferOwnership?: boolean; + /** + * Whether the request should be treated as if it was issued by a domain administrator; if set to true, then the requester will be granted access if they + * are an administrator of the domain to which the item belongs. + */ + useDomainAdminAccess?: boolean; /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ userIp?: string; }): Request; @@ -1377,6 +1369,11 @@ declare namespace gapi.client { quotaUser?: string; /** Whether the requesting application supports Team Drives. */ supportsTeamDrives?: boolean; + /** + * Whether the request should be treated as if it was issued by a domain administrator; if set to true, then the requester will be granted access if they + * are an administrator of the domain to which the item belongs. + */ + useDomainAdminAccess?: boolean; /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ userIp?: string; }): Request; @@ -1403,6 +1400,11 @@ declare namespace gapi.client { quotaUser?: string; /** Whether the requesting application supports Team Drives. */ supportsTeamDrives?: boolean; + /** + * Whether the request should be treated as if it was issued by a domain administrator; if set to true, then the requester will be granted access if they + * are an administrator of the domain to which the item belongs. + */ + useDomainAdminAccess?: boolean; /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ userIp?: string; }): Request; @@ -1434,6 +1436,11 @@ declare namespace gapi.client { quotaUser?: string; /** Whether the requesting application supports Team Drives. */ supportsTeamDrives?: boolean; + /** + * Whether the request should be treated as if it was issued by a domain administrator; if set to true, then the requester will be granted access if they + * are an administrator of the domain to which the item belongs. + */ + useDomainAdminAccess?: boolean; /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ userIp?: string; }): Request; @@ -1467,6 +1474,11 @@ declare namespace gapi.client { * the side effect. */ transferOwnership?: boolean; + /** + * Whether the request should be treated as if it was issued by a domain administrator; if set to true, then the requester will be granted access if they + * are an administrator of the domain to which the item belongs. + */ + useDomainAdminAccess?: boolean; /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ userIp?: string; }): Request; @@ -1777,6 +1789,11 @@ declare namespace gapi.client { quotaUser?: string; /** The ID of the Team Drive */ teamDriveId: string; + /** + * Whether the request should be treated as if it was issued by a domain administrator; if set to true, then the requester will be granted access if they + * are an administrator of the domain to which the Team Drive belongs. + */ + useDomainAdminAccess?: boolean; /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ userIp?: string; }): Request; @@ -1796,11 +1813,18 @@ declare namespace gapi.client { pageToken?: string; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; + /** Query string for searching Team Drives. */ + q?: string; /** * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * Overrides userIp if both are provided. */ quotaUser?: string; + /** + * Whether the request should be treated as if it was issued by a domain administrator; if set to true, then all Team Drives of the domain in which the + * requester is an administrator are returned. + */ + useDomainAdminAccess?: boolean; /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ userIp?: string; }): Request; @@ -1827,5 +1851,23 @@ declare namespace gapi.client { userIp?: string; }): Request; } + + const about: AboutResource; + + const changes: ChangesResource; + + const channels: ChannelsResource; + + const comments: CommentsResource; + + const files: FilesResource; + + const permissions: PermissionsResource; + + const replies: RepliesResource; + + const revisions: RevisionsResource; + + const teamdrives: TeamdrivesResource; } } diff --git a/types/gapi.client.drive/tsconfig.json b/types/gapi.client.drive/tsconfig.json index 0cdc6f7fab..6d5901b410 100644 --- a/types/gapi.client.drive/tsconfig.json +++ b/types/gapi.client.drive/tsconfig.json @@ -14,7 +14,7 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, + "forceConsistentCasingInFileNames": true, "strictFunctionTypes": true }, "files": [ diff --git a/types/generate-changelog/generate-changelog-tests.ts b/types/generate-changelog/generate-changelog-tests.ts new file mode 100644 index 0000000000..0b99857715 --- /dev/null +++ b/types/generate-changelog/generate-changelog-tests.ts @@ -0,0 +1,8 @@ +import * as changelog from 'generate-changelog'; + +changelog.generate({ + exclude: ['chore'], + minor: true, + repoUrl: 'https://github.com/lob/generate-changelog', + tag: 'v1.6.0...v1.7.0' +}).then(changelog => changelog.trim()); diff --git a/types/generate-changelog/index.d.ts b/types/generate-changelog/index.d.ts new file mode 100644 index 0000000000..2a6ba0ed56 --- /dev/null +++ b/types/generate-changelog/index.d.ts @@ -0,0 +1,21 @@ +// Type definitions for generate-changelog 1.7 +// Project: https://github.com/lob/generate-changelog#readme +// Definitions by: Florian Keller +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface Options { + /** exclude listed commit types (e.g. `['chore', 'style', 'refactor']`) */ + exclude?: string[]; + /** whether it should be a patch changelog */ + patch?: boolean; + /** whether it should be a minor changelog */ + minor?: boolean; + /** whether it should be a major changelog */ + major?: boolean; + /** repo URL that will be used when linking commits */ + repoUrl?: string; + /** generate from specific tag or range (e.g. `v1.2.3` or `v1.2.3..v1.2.4`)' */ + tag?: string; +} + +export function generate(options: Options): Promise; diff --git a/types/generate-changelog/tsconfig.json b/types/generate-changelog/tsconfig.json new file mode 100644 index 0000000000..458186fe12 --- /dev/null +++ b/types/generate-changelog/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "generate-changelog-tests.ts" + ] +} diff --git a/types/generate-changelog/tslint.json b/types/generate-changelog/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/generate-changelog/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/generic-pool/generic-pool-tests.ts b/types/generic-pool/generic-pool-tests.ts index 970e83d870..9cc8707c86 100644 --- a/types/generic-pool/generic-pool-tests.ts +++ b/types/generic-pool/generic-pool-tests.ts @@ -41,6 +41,9 @@ const opts = { const pool = genericPool.createPool(factory, opts); +pool.use((conn: Connection) => 'test') + .then((result: string) => { }); + pool.acquire() .then((conn: Connection) => { return pool.release(conn); diff --git a/types/generic-pool/index.d.ts b/types/generic-pool/index.d.ts index 00f8852823..bcfbb907e1 100644 --- a/types/generic-pool/index.d.ts +++ b/types/generic-pool/index.d.ts @@ -22,6 +22,7 @@ export class Pool extends EventEmitter { destroy(resource: T): void; drain(): PromiseLike; clear(): PromiseLike; + use(cb: (resource: T) => U): PromiseLike; } export interface Factory { diff --git a/types/geojson/geojson-tests.ts b/types/geojson/geojson-tests.ts index ce8c62418e..c5c3fa2bdd 100644 --- a/types/geojson/geojson-tests.ts +++ b/types/geojson/geojson-tests.ts @@ -231,7 +231,7 @@ interface TestProperty { } const testProps: TestProperty = { - foo: "bar", + foo: "baz", hello: "world" }; @@ -248,3 +248,77 @@ const typedPropertiesFeatureCollection: FeatureCollection = { type: "FeatureCollection", features: [typedPropertiesFeature] }; + +// Strict Null Checks + +let isNull: null; +let isPoint: Point; +let isPointOrNull: Point | null; +let isProperty: TestProperty; +let isPropertyOrNull: TestProperty | null; + +const featureAllNull: Feature = { + type: "Feature", + properties: null, + geometry: null +}; + +const featurePropertyNull: Feature = { + type: "Feature", + properties: null, + geometry: point +}; + +const featureGeometryNull: Feature = { + type: "Feature", + properties: testProps, + geometry: null +}; + +const featureNoNull: Feature = { + type: "Feature", + properties: testProps, + geometry: point +}; + +const collectionAllNull: FeatureCollection = { + type: "FeatureCollection", + features: [featureAllNull], +}; + +const collectionMaybeNull: FeatureCollection = { + type: "FeatureCollection", + features: [featureAllNull, featurePropertyNull, featureGeometryNull, featureNoNull], +}; + +const collectionPropertyMaybeNull: FeatureCollection = { + type: "FeatureCollection", + features: [featurePropertyNull, featureNoNull], +}; + +const collectionGeometryMaybeNull: FeatureCollection = { + type: "FeatureCollection", + features: [featureGeometryNull, featureNoNull], +}; + +const collectionNoNull: FeatureCollection = { + type: "FeatureCollection", + features: [featureNoNull], +}; + +isNull = featureAllNull.geometry; +isPoint = featurePropertyNull.geometry; +isNull = featureAllNull.properties; +isProperty = featureGeometryNull.properties; + +isNull = collectionAllNull.features[0].geometry; +isPointOrNull = collectionMaybeNull.features[0].geometry; +isPoint = collectionPropertyMaybeNull.features[0].geometry; +isPointOrNull = collectionGeometryMaybeNull.features[0].geometry; +isPoint = collectionNoNull.features[0].geometry; + +isNull = collectionAllNull.features[0].properties; +isPropertyOrNull = collectionMaybeNull.features[0].properties; +isPropertyOrNull = collectionPropertyMaybeNull.features[0].properties; +isProperty = collectionGeometryMaybeNull.features[0].properties; +isProperty = collectionNoNull.features[0].properties; diff --git a/types/geojson/index.d.ts b/types/geojson/index.d.ts index 85f02aaad0..9a0ab3cd8b 100644 --- a/types/geojson/index.d.ts +++ b/types/geojson/index.d.ts @@ -139,12 +139,12 @@ export type GeoJsonProperties = { [name: string]: any; } | null; * A feature object which contains a geometry and associated properties. * https://tools.ietf.org/html/rfc7946#section-3.2 */ -export interface Feature extends GeoJsonObject { +export interface Feature extends GeoJsonObject { type: "Feature"; /** * The feature's geometry */ - geometry: G | null; + geometry: G; /** * A value that uniquely identifies this feature in a * https://tools.ietf.org/html/rfc7946#section-3.2. @@ -153,14 +153,14 @@ export interface Feature extend /** * Properties associated with this feature. */ - properties: P | null; + properties: P; } /** * A collection of feature objects. * https://tools.ietf.org/html/rfc7946#section-3.3 */ -export interface FeatureCollection extends GeoJsonObject { +export interface FeatureCollection extends GeoJsonObject { type: "FeatureCollection"; features: Array>; } diff --git a/types/geojson/tsconfig.json b/types/geojson/tsconfig.json index 071f17c65d..86021d5757 100644 --- a/types/geojson/tsconfig.json +++ b/types/geojson/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/gijgo/index.d.ts b/types/gijgo/index.d.ts index a76d98dd7f..611373be11 100644 --- a/types/gijgo/index.d.ts +++ b/types/gijgo/index.d.ts @@ -1,32 +1,41 @@ -// Type definitions for Gijgo v0.6.2 +// Type definitions for Gijgo v1.9.6 // Project: http://gijgo.com // Definitions by: Atanas Atanasov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -declare module Gijgo { +declare module 'gijgo' { + export = Types; +} + +declare module Types { //Grid interface GridPager { limit?: number; sizes?: Array; - leftControls?: any; - rightControls?: any; + leftControls?: Array; + rightControls?: Array; } interface GridColumn { align?: string; cssClass?: string; decimalDigits?: number; + editField?: string; editor?: any; events?: any; field?: string; + filter?: any; + filterable?: boolean; format?: string; headerCssClass?: string; hidden?: boolean; icon?: string; minWidth?: number; + mode?: string; priority?: number; + renderer?: any; sortable?: boolean; stopPropagation?: boolean; title?: string; @@ -36,11 +45,13 @@ declare module Gijgo { width?: number; } - interface GridDefaultParams { + interface GridParamNames { direction?: string; limit?: string; page?: string; sortBy?: string; + groupBy?: string; + groupByDirection?: string; } interface GridMapping { @@ -48,24 +59,64 @@ declare module Gijgo { totalRecordsField?: string; } + interface GridIcons { + expandRow?: string; + collapseRow?: string; + expandGroup?: string; + collapseGroup?: string; + } + + interface GridGrouping { + groupBy: string; + } + + interface GridHeaderFilter { + type: string; + } + + interface GridInlineEditing { + mode?: string; + managementColumn?: boolean; + } + + interface GridOptimisticPersistence { + localStorage: Array; + sessionStorage: Array; + } + interface GridSettings { //Configuration options autoGenerateColumns?: boolean; autoLoad?: boolean; + bodyRowHeight?: string; + columnReorder?: boolean; columns?: Array; dataSource?: any; defaultColumnSettings?: GridColumn; - defaultParams?: GridDefaultParams; detailTemplate?: string; + fixedHeader?: boolean; fontSize?: string; - mapping?: string; + grouping?: GridGrouping; + headerFilter?: GridHeaderFilter; + headerRowHeight?: string; + icons?: GridIcons; + iconsLibrary?: string; + inlineEditing?: GridInlineEditing; + keepExpandedRows?: boolean; + locale?: string; + mapping?: any; minWidth?: number; notFoundText?: string; + optimisticPersistence?: GridOptimisticPersistence; + orderNumberField?: string; pager?: GridPager; + paramNames?: GridParamNames; primaryKey?: string; resizableColumns?: boolean; resizeCheckInterval?: number; responsive?: boolean; + rowReorder?: boolean; + rowReorderColumn?: string; selectionMethod?: string; selectionType?: string; showHiddenColumnsAsDetails?: boolean; @@ -83,14 +134,16 @@ declare module Gijgo { columnShow?: (e: any, column: GridColumn) => any; dataBinding?: (e: any, records: Array) => any; dataBound?: (e: any, records: Array, totalRecords: number) => any; + dataFiltered?: (e: any, records: Array) => any; destroying?: (e: any) => any; - detailCollapse?: (e: any, detailWrapper: JQuery, record: Entity) => any; - detailExpand?: (e: any, detailWrapper: JQuery, record: Entity) => any; + detailCollapse?: (e: any, detailWrapper: JQuery, id: string) => any; + detailExpand?: (e: any, detailWrapper: JQuery, id: string) => any; initialized?: (e: any) => any; pageChanging?: (e: any, newPage: number) => any; pageSizeChange?: (e: any, newPage: number) => any; resize?: (e: any, newWidth: number, oldWidth: number) => any; rowDataBound?: (e: any, $row: JQuery, id: string, record: Entity) => any; + rowDataChanged?: (e: any, id: string, record: Entity) => any; rowRemoving?: (e: any, $row: JQuery, id: string, record: Entity) => any; rowSelect?: (e: any, $row: JQuery, id: string, record: Entity) => any; rowUnselect?: (e: any, $row: JQuery, id: string, record: Entity) => any; @@ -98,17 +151,23 @@ declare module Gijgo { interface Grid extends JQuery { addRow(record: Entity): Grid; + cancel(id: string): Grid; clear(showNotFoundText?: boolean): Grid; + collapseAll(): Grid; count(): number; destroy(keepTableTag?: boolean, keepWrapperTag?: boolean): void; + downloadCSV(filename?: string, includeAllRecords?: boolean): Grid; + edit(id: string): Grid; + expandAll(): Grid; //get(position: number): Entity; //TODO: rename to getByPosition to avoid conflicts with jquery.get - getAll(): Array; + getAll(includeAllRecords?: boolean): Array; getById(id: string): Entity; getChanges(): Array; + getCSV(includeAllRecords?: boolean): string; getSelected(): string; getSelections(): Array; hideColumn(field: string): Grid; - makeResponsive(): void; + makeResponsive(): Grid; reload(params?: Params): Grid; removeRow(id: string): Grid; render(response: any): Grid; @@ -117,22 +176,25 @@ declare module Gijgo { showColumn(field: string): Grid; title(text: any): any; unSelectAll(): Grid; + update(id: string): Grid; updateRow(id: string, record: Entity): Grid; } - //Dialog + // Dialog interface DialogSettings { - //Configuration options autoOpen?: boolean; + closeButtonInHeader?: boolean; closeOnEscape?: boolean; draggable?: boolean; height?: number | string; + locale?: string; maxHeight?: number; maxWidth?: number; minHeight?: number; minWidth?: number; modal?: boolean; resizable?: boolean; + scrollable?: boolean; title?: string; uiLibrary?: string; width?: number; @@ -153,16 +215,288 @@ declare module Gijgo { interface Dialog extends JQuery { close(): Dialog; + content(constent: string): string | Dialog; + destroy(keepHtml: boolean): void; isOpen(): boolean; open(): Dialog; } + + // Checkbox + interface CheckboxSettings { + uiLibrary?: string; + iconsLibrary?: string; + + //Events + change?: (e: any, state: string) => any; + } + + interface Checkbox extends JQuery { + //toggle(): Checkbox; + state(value: string): string | Checkbox; + destroy(): void; + } + + // DatePicker + interface DatePickerIcons { + rightIcon?: string; + } + + interface DatePickerSettings { + showOtherMonths?: boolean; + selectOtherMonths?: boolean; + width?: number; + minDate?: Date | string | Function; + maxDate?: Date | string | Function; + format?: string; + value?: string; + uiLibrary?: string; + iconsLibrary?: string; + weekStartDay?: number; + disableDates?: Array | Function; + disableDaysOfWeek?: Array; + calendarWeeks?: boolean; + keyboardNavigation?: boolean; + locale?: string; + icons?: DatePickerIcons; + size?: string; + modal?: boolean; + header?: boolean; + footer?: boolean; + + //Events + change?: (e: any) => any; + open?: (e: any) => any; + close?: (e: any) => any; + select?: (e: any, type: string) => any; + } + + interface DatePicker extends JQuery { + close(): DatePicker; + destroy(): void; + open(): DatePicker; + value(value?: string): string | DatePicker; + } + + // DropDown + interface DropDownIcons { + dropdown?: string; + } + + interface DropDownSettings { + dataSource?: any; + textField?: string; + valueField?: string; + selectedField?: string; + width?: number; + maxHeight?: any; + uiLibrary?: string; + iconsLibrary?: string; + icons?: DropDownIcons; + placeholder?: string; + + //Events + change?: (e: any) => any; + dataBound?: (e: any) => any; + } + + interface DropDown extends JQuery { + value(value: string): string | DropDown; + destroy(): void; + } + + // Editor + interface EditorSettings { + height?: number | string; + width?: number | string; + uiLibrary?: string; + iconsLibrary?: string; + locale?: string; + + //Events + changing?: (e: any) => any; + changed?: (e: any) => any; + } + + interface Editor extends JQuery { + content(html?: string): string | Editor; + destroy(): void; + } + + // TimePicker + interface TimePickerSettings { + width?: number; + modal?: boolean; + header?: boolean; + footer?: boolean; + format?: string; + uiLibrary?: string; + value?: string; + mode?: string; + locale?: string; + size?: string; + + //Events + change?: (e: any) => any; + open?: (e: any) => any; + close?: (e: any) => any; + select?: (e: any, type: string) => any; + } + + interface TimePicker extends JQuery { + close(): TimePicker; + destroy(): void; + open(): TimePicker; + value(value?: string): string | TimePicker; + } + + // DateTimePicker + interface DateTimePickerSettings { + datepicker?: Types.DatePickerSettings; + footer?: boolean; + format?: string; + locale?: string; + modal?: boolean; + size?: string; + uiLibrary?: string; + value?: string; + width?: number; + + //Events + change?: (e: any) => any; + } + + interface DateTimePicker extends JQuery { + destroy(): void; + value(value?: string): string | DateTimePicker; + } + + // Slider + interface SliderSettings { + min?: number; + max?: number; + uiLibrary?: string; + value?: string; + width?: number; + + //Events + change?: (e: any) => any; + slide?: (e: any, value: number) => any; + } + + interface Slider extends JQuery { + destroy(): void; + value(value?: string): string | Slider; + } + + // Tree + interface TreeIcons { + expand?: string; + collapse?: string; + } + + interface TreeParamNames { + parentId?: string; + } + + interface TreeSettings { + autoLoad?: boolean; + selectionType?: string; + cascadeSelection?: boolean; + dataSource?: any; + primaryKey?: string; + textField?: string; + childrenField?: string; + hasChildrenField?: string; + imageCssClassField?: string; + imageUrlField?: string; + imageHtmlField?: string; + disabledField?: string; + width?: number; + border?: boolean; + uiLibrary?: string; + iconsLibrary?: string; + icons?: TreeIcons; + + checkboxes?: boolean; + checkedField?: string; + cascadeCheck?: boolean; + dragAndDrop?: boolean; + paramNames?: TreeParamNames; + lazyLoading?: boolean; + + + //Events + initialized?: (e: any) => any; + dataBinding?: (e: any) => any; + dataBound?: (e: any) => any; + select?: (e: any, node: any, id: string) => any; + unselect?: (e: any, node: any, id: string) => any; + expand?: (e: any, node: any, id: string) => any; + collapse?: (e: any, node: any, id: string) => any; + enable?: (e: any, node: any, id: string) => any; + disable?: (e: any, node: any, id: string) => any; + destroying?: (e: any) => any; + nodeDataBound?: (e: any, node: any, id: string) => any; + checkboxChange?: (e: any, node: any, record: any, state: string) => any; + nodeDrop?: (e: any, id: string, parentId: string, orderNumber: number) => any; + } + + interface Tree extends JQuery { + reload(params: any): any; + render(response: any): any; + addNode(data: any, parentNode: any, position: number): Tree; + removeNode(node: any): Tree; + updateNode(id: string, record: any) : Tree; + destroy(): void; + expand(node: any, cascade: boolean): Tree; + collapse(node: any, cascade: boolean) : Tree; + expandAll(): Tree; + collapseAll() : Tree; + getDataById(id: string) : any; + getDataByText(text: string) : any; + getNodeById(id: string) : any; + getNodeByText(id: string) : any; + getAll(): Array; + //select(node: any) : Tree; + unselect(node: any) : Tree; + selectAll() : Tree; + unselectAll() : Tree; + getSelections() : Array; + getChildren(node: any, cascade?: boolean) : Array; + enable(node: any, cascade?: boolean) : Tree; + disable(node: any, cascade?: boolean) : Tree; + enableAll() : Tree; + disableAll() : Tree; + + getCheckedNodes() : Array; + checkAll() : Tree; + uncheckAll(): Tree; + check(node: any) : Tree; + uncheck(node: any) : Tree; + } } interface JQuery { - grid(settings: Gijgo.GridSettings): Gijgo.Grid; - grid(settings: Gijgo.GridSettings): Gijgo.Grid; - grid(settings: Gijgo.GridSettings): Gijgo.Grid; + grid(settings: Types.GridSettings): Types.Grid; + grid(settings: Types.GridSettings): Types.Grid; + grid(settings: Types.GridSettings): Types.Grid; - dialog(settings: Gijgo.DialogSettings): Gijgo.Dialog; + dialog(settings: Types.DialogSettings): Types.Dialog; + + checkbox(settings: Types.CheckboxSettings): Types.Checkbox; + + datepicker(settings: Types.DatePickerSettings): Types.DatePicker; + + dropdown(settings: Types.DropDownSettings): Types.DropDown; + + editor(settings: Types.EditorSettings): Types.Editor; + + timepicker(settings: Types.TimePickerSettings): Types.TimePicker; + + datetimepicker(settings: Types.DateTimePickerSettings): Types.DateTimePicker; + + slider(settings: Types.SliderSettings): Types.Slider; + + tree(settings: Types.TreeSettings): Types.Tree; } diff --git a/types/gitlab/ApiBase.d.ts b/types/gitlab/ApiBase.d.ts new file mode 100644 index 0000000000..7187ce4352 --- /dev/null +++ b/types/gitlab/ApiBase.d.ts @@ -0,0 +1,31 @@ +import { ApiBaseOptions } from './ApiBase'; +import { Labels } from './Models/Labels'; +import { Users } from './Models/Users'; +import { Notes } from './Models/Notes'; +import { Issues } from './Models/Issues'; +import { Projects } from './Models/Projects'; +import { Groups } from './Models/Groups'; + +export interface ApiBaseOptions { + url?: string; + token?: string; + oauth_token?: string; + base_url?: string; + auth?: any; + [key: string]: any; +} + +export class ApiBase { + constructor(options: ApiBaseOptions); + readonly client: this; + readonly groups: Groups + readonly projects: Projects + readonly issues: Issues + readonly notes: Notes + readonly users: Users + readonly labels: Labels + options: ApiBaseOptions; + + handleOptions(): void; + init(): object; +} diff --git a/types/gitlab/ApiBaseHTTP.d.ts b/types/gitlab/ApiBaseHTTP.d.ts new file mode 100644 index 0000000000..7ed5fb0d69 --- /dev/null +++ b/types/gitlab/ApiBaseHTTP.d.ts @@ -0,0 +1,12 @@ +import { ApiBase } from './ApiBase'; + +export class ApiBaseHTTP extends ApiBase { + prepare_opts(opts: T): T; + fn_wrapper(fn: T): T; + get(path: string, fn?: Function): any; + get(path: string, query?: object, fn?: Function): any; + delete(path: string, fn?: Function): any; + post(path: string, data?: object, fn?: Function): any; + put(path: string, data?: object, fn?: Function): any; + patch(path: string, data?: object, fn?: Function): any; +} diff --git a/types/gitlab/ApiV3.d.ts b/types/gitlab/ApiV3.d.ts new file mode 100644 index 0000000000..bd3d02557b --- /dev/null +++ b/types/gitlab/ApiV3.d.ts @@ -0,0 +1,5 @@ +import { ApiBaseHTTP } from './ApiBaseHTTP'; + +export class ApiV3 extends ApiBaseHTTP { + +} diff --git a/types/gitlab/BaseModel.d.ts b/types/gitlab/BaseModel.d.ts new file mode 100644 index 0000000000..ca6eb4e7c6 --- /dev/null +++ b/types/gitlab/BaseModel.d.ts @@ -0,0 +1,17 @@ +export class BaseModel { + load(model: string): object; + get(path: string, fn?: Function): any; + get(path: string, query?: object, fn?: Function): any; + delete(path: string, fn?: Function): any; + post(path: string, data?: object, fn?: Function): any; + put(path: string, data?: object, fn?: Function): any; + patch(path: string, data?: object, fn?: Function): any; +} + +export interface DefParams { + page?: number; + per_page?: number; + [key: string]: any; +} + +export type TId = number | string; diff --git a/types/gitlab/Models/Groups.d.ts b/types/gitlab/Models/Groups.d.ts new file mode 100644 index 0000000000..1b528039f0 --- /dev/null +++ b/types/gitlab/Models/Groups.d.ts @@ -0,0 +1,27 @@ +import { BaseModel, DefParams } from "../BaseModel"; + +interface IAccessLevels { + GUEST: number + REPORTER: number + DEVELOPER: number + MASTER: number + OWNER: number +} + +export class Groups extends BaseModel { + readonly access_levels: IAccessLevels; + + init(): object; + all(fn?: Function): any; + all(params?: DefParams, fn?: Function): any; + show(groupId: number, fn?: Function): any; + listProjects(groupId: number, fn?: Function): any; + listMembers(groupId: number, fn?: Function): any; + addMember(groupId: number, userId: number, accessLevel: IAccessLevels[keyof IAccessLevels], fn?: Function): any; + editMember(groupId: number, userId: number, accessLevel: IAccessLevels[keyof IAccessLevels], fn?: Function): any; + removeMember(groupId: number, userId: number, fn?: Function): any; + create(params?: object, fn?: Function): any; + addProject(groupId: number, projectId: number, fn?: Function): any; + deleteGroup(groupId: number, fn?: Function): any; + search(nameOrPath: string, fn?: Function): any; +} diff --git a/types/gitlab/Models/IssueNotes.d.ts b/types/gitlab/Models/IssueNotes.d.ts new file mode 100644 index 0000000000..de1821b1df --- /dev/null +++ b/types/gitlab/Models/IssueNotes.d.ts @@ -0,0 +1,6 @@ +import { BaseModel, TId, DefParams } from '../BaseModel'; + +export class IssueNotes extends BaseModel{ + all(projectId: TId, issueId: number, fn?: Function): any + all(projectId: TId, issueId: number, params?: DefParams, fn?: Function): any +} diff --git a/types/gitlab/Models/Issues.d.ts b/types/gitlab/Models/Issues.d.ts new file mode 100644 index 0000000000..e751b6a002 --- /dev/null +++ b/types/gitlab/Models/Issues.d.ts @@ -0,0 +1,12 @@ +import { BaseModel, TId } from '../BaseModel'; + +export class Issues extends BaseModel { + all(fn?: Function): any; + all(params?: object, fn?: Function): any; + show(projectId: TId, issueId: TId, fn?: Function): any; + create(projectId: TId, params?: object, fn?: Function): any; + edit(projectId: TId, issueId: TId, params?: object, fn?: Function): any; + remove(projectId: TId, issueId: TId, fn?: Function): any; + subscribe(projectId: TId, issueId: TId, params?: object, fn?: Function): any; + unsubscribe(projectId: TId, issueId: TId, fn?: Function): any; +} diff --git a/types/gitlab/Models/Labels.d.ts b/types/gitlab/Models/Labels.d.ts new file mode 100644 index 0000000000..63f1110b4d --- /dev/null +++ b/types/gitlab/Models/Labels.d.ts @@ -0,0 +1,5 @@ +import { BaseModel, TId } from '../BaseModel'; + +export class Labels extends BaseModel { + create(projectId: TId, params?: object, fn?: Function): any; +} diff --git a/types/gitlab/Models/Notes.d.ts b/types/gitlab/Models/Notes.d.ts new file mode 100644 index 0000000000..95b9cd623e --- /dev/null +++ b/types/gitlab/Models/Notes.d.ts @@ -0,0 +1,5 @@ +import { BaseModel, TId } from '../BaseModel'; + +export class Notes extends BaseModel { + create(projectId: TId, issueId: number, params?: object, fn?: Function): any; +} diff --git a/types/gitlab/Models/Pipelines.d.ts b/types/gitlab/Models/Pipelines.d.ts new file mode 100644 index 0000000000..f65a9e7d25 --- /dev/null +++ b/types/gitlab/Models/Pipelines.d.ts @@ -0,0 +1,5 @@ +import { BaseModel, TId } from '../BaseModel'; + +export class Pipelines extends BaseModel { + all(projectId: TId, fn?: Function): any; +} diff --git a/types/gitlab/Models/ProjectBuilds.d.ts b/types/gitlab/Models/ProjectBuilds.d.ts new file mode 100644 index 0000000000..df7c33c32a --- /dev/null +++ b/types/gitlab/Models/ProjectBuilds.d.ts @@ -0,0 +1,13 @@ +import { BaseModel, TId, DefParams } from '../BaseModel'; + +interface IShowBuildParam { + projectId: TId; + [key: string]: any; +} + +export class ProjectBuilds extends BaseModel { + listBuilds(projectId: TId, fn?: Function): any; + listBuilds(projectId: TId, params?: DefParams, fn?: Function): any; + showBuild(projectId: TId, buildId: string, fn?: Function): any; + triggerBuild(params?: IShowBuildParam, fn?: Function): any; +} diff --git a/types/gitlab/Models/ProjectDeployKeys.d.ts b/types/gitlab/Models/ProjectDeployKeys.d.ts new file mode 100644 index 0000000000..3be9d66bc4 --- /dev/null +++ b/types/gitlab/Models/ProjectDeployKeys.d.ts @@ -0,0 +1,7 @@ +import { BaseModel, TId } from '../BaseModel'; + +export class ProjectKeys extends BaseModel { + listKeys(projectId: TId, fn?: Function): any; + getKey(projectId: TId, keyId: number, fn?: Function): any; + addKey(projectId: TId, params?: object, fn?: Function): any; +} diff --git a/types/gitlab/Models/ProjectHooks.d.ts b/types/gitlab/Models/ProjectHooks.d.ts new file mode 100644 index 0000000000..ce0878eec9 --- /dev/null +++ b/types/gitlab/Models/ProjectHooks.d.ts @@ -0,0 +1,16 @@ +import { BaseModel, TId } from '../BaseModel'; + +interface IAddParam { + url: string; + [key: string]: any; +} + +type HooksCb = (hooks: any[]) => any; + +export class ProjectHooks extends BaseModel { + list(projectId: TId, fn?: HooksCb): any; + show(projectId: TId, hookId: number, fn?: Function): any; + add(projectId: TId, params: IAddParam | string, fn?: Function): any; + update(projectId: TId, hookId: number, url: string, fn?: Function): any; + remove(projectId: TId, hookId: number, fn?: Function): any; +} diff --git a/types/gitlab/Models/ProjectIssues.d.ts b/types/gitlab/Models/ProjectIssues.d.ts new file mode 100644 index 0000000000..8f7fc439a6 --- /dev/null +++ b/types/gitlab/Models/ProjectIssues.d.ts @@ -0,0 +1,9 @@ +import { IssueNotes } from './IssueNotes'; +import { BaseModel, TId, DefParams } from '../BaseModel'; + +export class ProjectIssues extends BaseModel { + readonly notes: IssueNotes; + + list(projectId: TId, fn?: Function): any; + list(projectId: TId, params?: DefParams, fn?: Function): any; +} diff --git a/types/gitlab/Models/ProjectLabels.d.ts b/types/gitlab/Models/ProjectLabels.d.ts new file mode 100644 index 0000000000..2f6ca1dabc --- /dev/null +++ b/types/gitlab/Models/ProjectLabels.d.ts @@ -0,0 +1,6 @@ +import { BaseModel, TId, DefParams } from '../BaseModel'; + +export class ProjectLabels extends BaseModel { + all(projectId: TId, fn?: Function): any; + all(projectId: TId, params?: DefParams, fn?: Function): any; +} diff --git a/types/gitlab/Models/ProjectMembers.d.ts b/types/gitlab/Models/ProjectMembers.d.ts new file mode 100644 index 0000000000..25aa87332a --- /dev/null +++ b/types/gitlab/Models/ProjectMembers.d.ts @@ -0,0 +1,12 @@ +import { BaseModel, TId } from '../BaseModel'; + +type MenberCb = (menber: any) => any; +type MenbersCb = (menbers: any[]) => any; + +export class ProjectMembers extends BaseModel { + list(projectId: TId, fn?: MenbersCb): any; + show(projectId: TId, userId: number, fn?: MenberCb): any; + add(projectId: TId, userId: number, accessLevel: number,fn?: Function): any; + update(projectId: TId, userId: number, accessLevel: number, fn?: Function): any; + remove(projectId: TId, userId: number, fn?: Function): any; +} diff --git a/types/gitlab/Models/ProjectMergeRequests.d.ts b/types/gitlab/Models/ProjectMergeRequests.d.ts new file mode 100644 index 0000000000..37b2ab33e6 --- /dev/null +++ b/types/gitlab/Models/ProjectMergeRequests.d.ts @@ -0,0 +1,11 @@ +import { BaseModel, TId, DefParams } from '../BaseModel'; + +export class ProjectMergeRequests extends BaseModel { + list(projectId: TId, fn?: Function): any; + list(projectId: TId, params?: DefParams, fn?: Function): any; + show(projectId: TId, mergerequestId: number, fn?: Function): any; + add(projectId: TId, sourceBranch: string, targetBranch: string, assigneeId: number, title: string, fn?: Function): any; + update(projectId: TId, mergerequestId: number, params: object, fn?: Function): any; + comment(projectId: TId, mergerequestId: number, note: any, fn?: Function): any; + merge(projectId: TId, mergerequestId: number, params: object, fn?: Function): any; +} diff --git a/types/gitlab/Models/ProjectMilestones.d.ts b/types/gitlab/Models/ProjectMilestones.d.ts new file mode 100644 index 0000000000..d36d1c016a --- /dev/null +++ b/types/gitlab/Models/ProjectMilestones.d.ts @@ -0,0 +1,12 @@ +import { BaseModel, TId } from '../BaseModel'; + +type MilestonesCb = (milestones: any[]) => any; +type MilestoneCb = (milestones: any) => any; + +export class ProjectMilestones extends BaseModel { + list(projectId: TId, fn?: MilestonesCb): any; + all(projectId: TId, fn?: MilestonesCb): any; + show(projectId: TId, milestoneId: number, fn?: MilestoneCb): any; + add(projectId: TId, title: string, description: string, due_date: any, fn?: Function): any; + update(projectId: TId, milestoneId: number, title: string, description: string, due_date: any, state_event: any, fn?: Function): any; +} diff --git a/types/gitlab/Models/ProjectRepository.d.ts b/types/gitlab/Models/ProjectRepository.d.ts new file mode 100644 index 0000000000..7bef1b6212 --- /dev/null +++ b/types/gitlab/Models/ProjectRepository.d.ts @@ -0,0 +1,39 @@ +import { BaseModel, TId } from '../BaseModel'; + +interface ShowFileParams { + file_path: string; + ref?: any; + file_id?: any; + [key: string]: any; +} + +interface AddTagParams { + id: TId; + tag_name: string; + ref: string; + message?: string; + release_description?: string; +} + +export class ProjectRepository extends BaseModel { + listBranches(projectId: TId, fn?: Function): any; + showBranch(projectId: TId, branchId: string, fn?: Function): any; + protectBranch(projectId: TId, branchId: string, params: object, fn?: Function): any; + unprotectBranch(projectId: TId, branchId: string, fn?: Function): any; + createBranch(params: object, fn?: Function): any; + deleteBranch(projectId: TId, branchId: string, fn?: Function): any; + addTag(params: AddTagParams, fn?: Function): any; + deleteTag(projectId: TId, tagName: string, fn?: Function): any; + showTag(projectId: TId, tagName: string, fn?: Function): any; + listTags(projectId: TId, fn?: Function): any; + listCommits(projectId: TId, fn?: Function): any; + showCommit(projectId: TId, sha: string, fn?: Function): any; + diffCommit(projectId: TId, sha: string, fn?: Function): any; + listTree(projectId: TId, fn?: Function): any; + listTree(projectId: TId, params?: object, fn?: Function): any; + showFile(projectId: TId, fn?: Function): any; + showFile(projectId: TId, params?: ShowFileParams, fn?: Function): any; + createFile(params?: object, fn?: Function): any; + updateFile(params?: object, fn?: Function): any; + compare(params?: object, fn?: Function): any; +} diff --git a/types/gitlab/Models/ProjectServices.d.ts b/types/gitlab/Models/ProjectServices.d.ts new file mode 100644 index 0000000000..25c59ae400 --- /dev/null +++ b/types/gitlab/Models/ProjectServices.d.ts @@ -0,0 +1,9 @@ +import { BaseModel, TId } from './../BaseModel'; + +type ServiceCb = (service: any) => any; + +export class ProjectServices extends BaseModel { + show(projectId: TId, serviceName: string, fn?: ServiceCb): any; + update(projectId: TId, serviceName: string, params: object, fn?: ServiceCb): any; + remove(projectId: TId, serviceName: string, fn?: ServiceCb): any; +} diff --git a/types/gitlab/Models/Projects.d.ts b/types/gitlab/Models/Projects.d.ts new file mode 100644 index 0000000000..9ba8faa551 --- /dev/null +++ b/types/gitlab/Models/Projects.d.ts @@ -0,0 +1,55 @@ +import { Runners } from './Runners'; +import { Pipelines } from './Pipelines'; +import { ProjectBuilds } from './ProjectBuilds'; +import { ProjectMergeRequests } from './ProjectMergeRequests'; +import { ProjectKeys } from './ProjectDeployKeys'; +import { ProjectMilestones } from './ProjectMilestones'; +import { ProjectRepository } from './ProjectRepository'; +import { ProjectLabels } from './ProjectLabels'; +import { ProjectIssues } from './ProjectIssues'; +import { ProjectHooks } from './ProjectHooks'; +import { ProjectMembers } from './ProjectMembers'; +import { BaseModel, DefParams, TId } from '../BaseModel'; +import { ProjectServices } from './ProjectServices'; + +type ProjectsCb = (projects: any[]) => any; + +export class Projects extends BaseModel { + + readonly members: ProjectMembers; + readonly hooks: ProjectHooks; + readonly issues: ProjectIssues; + readonly labels: ProjectLabels; + readonly repository: ProjectRepository; + readonly milestones: ProjectMilestones; + readonly deploy_keys: ProjectKeys; + readonly merge_requests: ProjectMergeRequests; + readonly services: ProjectServices; + readonly builds: ProjectBuilds; + readonly pipelines: Pipelines; + readonly runners: Runners; + + + all(fn?: ProjectsCb): any; + all(params?: DefParams, fn?: ProjectsCb): any; + allAdmin(fn?: Function): any; + allAdmin(params?: DefParams, fn?: Function): any; + show(projectId: TId, fn?: Function): any; + create(params: object, fn?: Function): any; + create_for_user(params: object, fn?: Function): any; + edit(projectId: TId, params: object, fn?: Function): any; + addMember(params?: object, fn?: Function): any; + editMember(params?: object, fn?: Function): any; + listMembers(params?: object, fn?: Function): any; + listCommits(params?: object, fn?: Function): any; + listTags(params?: object, fn?: Function): any; + remove(projectId: TId, fn?: Function): any; + fork(params?: object, fn?: Function): any; + share(params?: object, fn?: Function): any; + search(projectName: string, fn?: Function): any; + search(projectName: string, params?: object, fn?: Function): any; + listTriggers(projectId: TId, fn?: Function): any; + showTrigger(projectId: TId, token: string, fn?: Function): any; + createTrigger(params?: object, fn?: Function): any; + removeTrigger(projectId: TId, token: string, fn?: Function): any; +} diff --git a/types/gitlab/Models/Runners.d.ts b/types/gitlab/Models/Runners.d.ts new file mode 100644 index 0000000000..1656fe0c5d --- /dev/null +++ b/types/gitlab/Models/Runners.d.ts @@ -0,0 +1,11 @@ +import { BaseModel, DefParams, TId } from '../BaseModel'; + +export class Runners extends BaseModel { + all(projectId?: TId, fn?: Function): any; + all(projectId?: TId, params?: object, fn?: Function): any; + show(runnerId: number, fn?: Function): any; + update(runnerId: number, attributes: any, fn?: Function): any; + remove(runnerId: number, projectId: any, enable: any, fn?: Function): any; + enable(projectId: TId, runnerId: number, fn?: Function): any; + disable(projectId: TId, runnerId: number, fn?: Function): any; +} diff --git a/types/gitlab/Models/UserKeys.d.ts b/types/gitlab/Models/UserKeys.d.ts new file mode 100644 index 0000000000..5182b5a2d1 --- /dev/null +++ b/types/gitlab/Models/UserKeys.d.ts @@ -0,0 +1,6 @@ +import { BaseModel, DefParams, TId } from '../BaseModel'; + +export class UserKeys extends BaseModel { + all(userId?: TId, fn?: Function): any; + addKey(userId: string, title: string, key: any, fn?: Function): any; +} diff --git a/types/gitlab/Models/Users.d.ts b/types/gitlab/Models/Users.d.ts new file mode 100644 index 0000000000..e4572ac659 --- /dev/null +++ b/types/gitlab/Models/Users.d.ts @@ -0,0 +1,17 @@ +import { BaseModel, DefParams, TId } from '../BaseModel'; +import { UserKeys } from './UserKeys'; + +type UsersCb = (users: any[]) => any; +type UserCb = (user: any) => any; + +export class Users extends BaseModel { + readonly keys: UserKeys; + + all(fn?: UsersCb): any; + all(params?: DefParams, fn?: UsersCb): any; + current(fn?: Function): any; + show(userId: number, fn?: UserCb): any; + create(params?: DefParams, fn?: Function): any; + session(email: string, password: string, fn?: Function): any; + search(emailOrUsername: string, fn?: Function): any; +} diff --git a/types/gitlab/gitlab-tests.ts b/types/gitlab/gitlab-tests.ts new file mode 100644 index 0000000000..00ab2c761e --- /dev/null +++ b/types/gitlab/gitlab-tests.ts @@ -0,0 +1,20 @@ +import * as lib from "gitlab"; + +const gitlab = lib({ + url: 'http://example.com', + token: 'abcdefghij123456' +}); + +const v3 = new lib.ApiV3({ }); + +// From README + +// Listing users +gitlab.users.all((users) => { }); + +// Listing projects +gitlab.projects.all((projects) => { }); + +// From examples/delet-service + +gitlab.projects.services.remove("pid", "name", (service) => { }); diff --git a/types/gitlab/index.d.ts b/types/gitlab/index.d.ts new file mode 100644 index 0000000000..1ff52505ee --- /dev/null +++ b/types/gitlab/index.d.ts @@ -0,0 +1,17 @@ +// Type definitions for gitlab 1.8 +// Project: https://github.com/node-gitlab/node-gitlab#readme +// Definitions by: sam +// AryloYeung +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +import { ApiV3 } from "./ApiV3"; +import { ApiBaseOptions } from "./ApiBase"; + +declare namespace Gitlib { + const ApiV3: new(options: ApiBaseOptions) => ApiV3; +} + +declare function Gitlib(options: ApiBaseOptions): ApiV3; + +export = Gitlib; diff --git a/types/gitlab/tsconfig.json b/types/gitlab/tsconfig.json new file mode 100644 index 0000000000..f1297faf67 --- /dev/null +++ b/types/gitlab/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "gitlab-tests.ts" + ] +} diff --git a/types/gitlab/tslint.json b/types/gitlab/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/gitlab/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/glue/glue-tests.ts b/types/glue/glue-tests.ts new file mode 100644 index 0000000000..7ac309352c --- /dev/null +++ b/types/glue/glue-tests.ts @@ -0,0 +1,20 @@ +import * as Glue from "glue"; +import * as Hapi from "hapi"; + +const manifest: Glue.Manifest = { + server: { + port: 3000 + }, + register: { + plugins: [ + { + plugin: "./test", + routes: { + prefix: "test" + } + } + ] + } +}; + +Glue.compose(manifest); diff --git a/types/glue/index.d.ts b/types/glue/index.d.ts new file mode 100644 index 0000000000..8e710d233a --- /dev/null +++ b/types/glue/index.d.ts @@ -0,0 +1,31 @@ +// Type definitions for glue 5.0 +// Project: https://github.com/hapijs/glue +// Definitions by: Gareth Parker +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +import { Server, ServerOptions } from "hapi"; + +export interface Options { + relativeTo: string; + preConnections?: (Server: Server, next: (err: any) => void) => void; + preRegister?: (Server: Server, next: (err: any) => void) => void; +} + +export interface Plugin { + plugin: string | { + register: string; + options?: any; + }; + options?: any; + routes?: any; +} + +export interface Manifest { + server: ServerOptions; + register?: { + plugins: Plugin[] + }; +} + +export function compose(manifest: Manifest, options?: Options): Server; diff --git a/types/glue/tsconfig.json b/types/glue/tsconfig.json new file mode 100644 index 0000000000..2d9b76b8f7 --- /dev/null +++ b/types/glue/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es2017", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "experimentalDecorators": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "glue-tests.ts" + ] +} \ No newline at end of file diff --git a/types/glue/tslint.json b/types/glue/tslint.json new file mode 100644 index 0000000000..30a1bdde2e --- /dev/null +++ b/types/glue/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file diff --git a/types/google-apps-script-oauth2/google-apps-script-oauth2-tests.ts b/types/google-apps-script-oauth2/google-apps-script-oauth2-tests.ts index ca6d874fa4..4bad3291ff 100644 --- a/types/google-apps-script-oauth2/google-apps-script-oauth2-tests.ts +++ b/types/google-apps-script-oauth2/google-apps-script-oauth2-tests.ts @@ -14,8 +14,7 @@ function getDriveService() { .setScope('https://www.googleapis.com/auth/drive') .setParam('login_hint', Session.getActiveUser().getEmail()) .setParam('access_type', 'offline') - .setParam('approval_prompt', 'force') - ; + .setParam('approval_prompt', 'force'); } /** @@ -24,9 +23,5 @@ function getDriveService() { function authCallback(request: any) { const driveService = getDriveService(); const isAuthorized = driveService.handleCallback(request); - if (isAuthorized) { - Logger.log('success'); - } else { - Logger.log('denied'); - } + Logger.log(isAuthorized ? 'success' : 'denied'); } diff --git a/types/google-cloud__pubsub/index.d.ts b/types/google-cloud__pubsub/index.d.ts index 7c9014b7d3..2cadd026cd 100644 --- a/types/google-cloud__pubsub/index.d.ts +++ b/types/google-cloud__pubsub/index.d.ts @@ -111,7 +111,7 @@ declare namespace PubSub { interface Publisher { publish(data: Buffer, callback: Publisher.PublishCallback): void; publish(data: Buffer, attributes: object, callback: Publisher.PublishCallback): void; - publish(data: Buffer, attributes?: object): Promise; + publish(data: Buffer, attributes?: object): Promise; } namespace Publisher { type PublishCallback = (error: Error | null, messageId: string) => void; diff --git a/types/google-map-react/index.d.ts b/types/google-map-react/index.d.ts index d0606f76fd..7f34a68cc4 100644 --- a/types/google-map-react/index.d.ts +++ b/types/google-map-react/index.d.ts @@ -47,10 +47,10 @@ export interface Maps { } export interface Bounds { - nw: number; - ne: number; - sw: number; - se: number; + nw: Coords; + ne: Coords; + sw: Coords; + se: Coords; } export interface Point { @@ -63,6 +63,11 @@ export interface Coords { lng: number; } +export interface Size { + width: number; + height: number; +} + export interface ClickEventValue extends Point, Coords { event: any; } @@ -72,6 +77,7 @@ export interface ChangeEventValue { zoom: number; bounds: Bounds; marginBounds: Bounds; + size: Size; } export interface Props { diff --git a/types/google.analytics/index.d.ts b/types/google.analytics/index.d.ts index b71fdef286..9f522b3b9b 100644 --- a/types/google.analytics/index.d.ts +++ b/types/google.analytics/index.d.ts @@ -525,6 +525,8 @@ declare namespace UniversalAnalytics { socialTarget?: string; some?: string; step?: boolean | number; + storage?: string; + storeGac?: boolean; tax?: string; timingCategory?: string; timingLabel?: string; diff --git a/types/google.picker/index.d.ts b/types/google.picker/index.d.ts index 851697cb32..b5fc91404d 100644 --- a/types/google.picker/index.d.ts +++ b/types/google.picker/index.d.ts @@ -47,6 +47,9 @@ declare namespace google { // ISO 639 language code. If the language is not supported, en-US is used. This method provides an alternative to setting the locale at google.load() time. See the Developer's Guide for a list of supported locales. setLocale(locale:string):PickerBuilder; + // Sets the maximum number of items a user can pick. + setMaxItems(max: number):PickerBuilder; + // Sets an OAuth token to use for authenticating the current user. Depending on the scope of the token, only certain views will display data. Valid scopes are Google Docs, Drive, Photos, YouTube. setOAuthToken(token:string):PickerBuilder; diff --git a/types/googlemaps/index.d.ts b/types/googlemaps/index.d.ts index 526f5b7e06..5c4cca2eb3 100644 --- a/types/googlemaps/index.d.ts +++ b/types/googlemaps/index.d.ts @@ -392,8 +392,8 @@ declare namespace google.maps { export module Data { export interface DataOptions { controlPosition?: ControlPosition; - controls?: string[]; - drawingMode?: string; + controls?: DrawingMode[] | null; + drawingMode?: DrawingMode | null; featureFactory?: (geometry: Data.Geometry) => Data.Feature; map?: Map; style?: Data.StylingFunction|Data.StyleOptions; @@ -1863,7 +1863,8 @@ declare namespace google.maps { getZIndex(): number; setMap(map: Map | null): void; setUrl(url: string): void; - setZIndez(zIndex: number): void; + setZIndex(zIndex: number): void; + setOptions(options: KmlLayerOptions): void; } export interface KmlLayerOptions { diff --git a/types/googlepay/googlepay-tests.ts b/types/googlepay/googlepay-tests.ts new file mode 100644 index 0000000000..ea97c2a586 --- /dev/null +++ b/types/googlepay/googlepay-tests.ts @@ -0,0 +1,68 @@ +const allowedPaymentMethods = new Array('CARD', 'TOKENIZED_CARD'); + +const allowedCardNetworks = new Array('AMEX', 'DISCOVER', 'JCB', 'MASTERCARD', 'VISA'); + +const tokenizationParameters: google.payments.api.PaymentMethodTokenizationParameters = { + tokenizationType: 'PAYMENT_GATEWAY', + parameters: { + gateway: 'example', + gatewayMerchantId: 'abc123' + } +}; + +const getGooglePaymentsClient = (env?: google.payments.api.EnvironmentType) => new google.payments.api.PaymentsClient({environment: env}); + +function onGooglePayLoaded() { + const client = getGooglePaymentsClient(); + + client.isReadyToPay({allowedPaymentMethods}).then(response => { + if (response.result) { + addGooglePayButton(); + prefetchGooglePaymentData(); + } + }).catch(err => { + console.error(err); + }); +} + +function addGooglePayButton() { + const button = document.createElement('button'); + button.className = 'google-pay'; + button.appendChild(document.createTextNode('Google Pay')); + button.addEventListener('click', onGooglePaymentButtonClick); + document.appendChild(document.createElement('div').appendChild(button)); +} + +function getGooglePaymentDataConfiguration(): google.payments.api.PaymentDataRequest { + return { + merchantId: '01234567890123456789', + transactionInfo: { + totalPriceStatus: 'FINAL', + totalPrice: '123.45', + currencyCode: 'USD' + }, + paymentMethodTokenizationParameters: tokenizationParameters, + allowedPaymentMethods, + cardRequirements: { + allowedCardNetworks, + billingAddressRequired: true, + billingAddressFormat: 'FULL' + }, + phoneNumberRequired: false, + shippingAddressRequired: true + }; +} + +function prefetchGooglePaymentData() { + const client = getGooglePaymentsClient(); + client.prefetchPaymentData(getGooglePaymentDataConfiguration()); +} + +function onGooglePaymentButtonClick() { + const request = getGooglePaymentDataConfiguration(); + const client = getGooglePaymentsClient(); + + client.loadPaymentData(request) + .then(data => console.log(data)) + .catch(err => console.error(err)); +} diff --git a/types/googlepay/index.d.ts b/types/googlepay/index.d.ts new file mode 100644 index 0000000000..524c277691 --- /dev/null +++ b/types/googlepay/index.d.ts @@ -0,0 +1,160 @@ +// Type definitions for Google Pay API 0.0 +// Project: https://developers.google.com/pay/api/web/setup/ +// Definitions by: Florian Luccioni +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace google.payments.api { + type AddressFormat = 'FULL' | 'MIN'; + type AllowedCardNetwork = 'AMEX' | 'DISCOVER' | 'JCB' | 'MASTERCARD' | 'VISA'; + type AllowedPaymentMethod = 'CARD' | 'TOKENIZED_CARD'; + type CardClass = 'CREDIT' | 'DEBIT'; + type CardInfo = CardInfoMin | CardInfoFull; + type CardRequirements = CardRequirementsMin | CardRequirementsFull; + type EnvironmentType = 'PRODUCTION' | 'TEST'; + type ErrorStatusCode = 'BUYER_ACCOUNT_ERROR' | 'CANCELED' | 'DEVELOPER_ERROR' | 'INTERNAL_ERROR'; + type PaymentMethodTokenizationParameters = PaymentMethodDirectTokenizationParameters | PaymentMethodGatewayTokenizationParameters; + type TokenizationType = 'DIRECT' | 'PAYMENT_GATEWAY'; + type TotalPriceStatus = 'ESTIMATED' | 'FINAL' | 'NOT_CURRENTLY_KNOWN'; + type UserAddress = UserAddressFull | UserAddressMin; + type PaymentDataRequest = PaymentDataRequestMin | PaymentDataRequestFull; + type PaymentData = PaymentDataMin | PaymentDataFull; + + interface PaymentOptions { + environment?: EnvironmentType; + } + + interface IsReadyToPayRequest { + allowedPaymentMethods: AllowedPaymentMethod[]; + } + + interface BasePaymentDataRequest { + merchantId: string; + transactionInfo: TransactionInfo; + cardRequirements: CardRequirements; + paymentMethodTokenizationParameters: PaymentMethodTokenizationParameters; + allowedPaymentMethods: AllowedPaymentMethod[]; + phoneNumberRequired?: boolean; + emailRequired?: boolean; + shippingAddressRequired?: boolean; + shippingAddressRequirements?: ShippingAddressRequirements; + } + + interface PaymentDataRequestMin extends BasePaymentDataRequest { + cardRequirements: CardRequirementsMin; + } + + interface PaymentDataRequestFull extends BasePaymentDataRequest { + cardRequirements: CardRequirementsFull; + } + + interface BasePaymentMethodTokenizationParameters { + tokenizationType: TokenizationType; + } + + interface PaymentMethodGatewayTokenizationParameters extends BasePaymentMethodTokenizationParameters { + tokenizationType: 'PAYMENT_GATEWAY'; + parameters: { + [parameter: string]: string; + }; + } + + interface PaymentMethodDirectTokenizationParameters extends BasePaymentMethodTokenizationParameters { + tokenizationType: 'DIRECT'; + parameters: { + publicKey: string; + }; + } + + interface BaseCardRequirements { + allowedCardNetworks: AllowedCardNetwork[]; + billingAddressRequired?: boolean; + billingAddressFormat?: AddressFormat; + } + + interface CardRequirementsMin extends BaseCardRequirements { + billingAddressFormat?: 'MIN'; + } + + interface CardRequirementsFull extends BaseCardRequirements { + billingAddressFormat?: 'FULL'; + } + + interface ShippingAddressRequirements { + allowedCountryCodes?: string[]; + } + + interface TransactionInfo { + totalPriceStatus: TotalPriceStatus; + totalPrice?: string; + currencyCode?: string; + } + + interface BasePaymentData { + cardInfo: CardInfo; + paymentMethodToken: PaymentMethodToken; + shippingAddress?: UserAddressFull; + email?: string; + } + + interface PaymentDataMin extends BasePaymentData { + cardInfo: CardInfoMin; + } + + interface PaymentDataFull extends BasePaymentData { + cardInfo: CardInfoFull; + } + + interface BaseCardInfo { + cardDescription: string; + cardClass: CardClass; + cardDetails: string; + cardNetwork: AllowedCardNetwork; + billingAddress?: UserAddress; + } + + interface CardInfoMin extends BaseCardInfo { + billingAddress?: UserAddressMin; + } + + interface CardInfoFull extends BaseCardInfo { + billingAddress?: UserAddressFull; + } + + interface UserAddressMin { + name: string; + postalCode: string; + countryCode: string; + phoneNumber?: string; + } + + interface UserAddressFull extends UserAddressMin { + companyName: string; + address1: string; + address2: string; + address3: string; + address4: string; + address5: string; + locality: string; + administrativeArea: string; + sortingCode: string; + } + + interface PaymentMethodToken { + tokenizationType: TokenizationType; + token: string; + } + + interface PaymentsError { + statusCode: ErrorStatusCode; + statusMessage: string; + } + + class PaymentsClient { + constructor(paymentOptions: PaymentOptions); + isReadyToPay(request: IsReadyToPayRequest): Promise<{result: boolean}>; + loadPaymentData(request: PaymentDataRequestMin): Promise; + loadPaymentData(request: PaymentDataRequestFull): Promise; + loadPaymentData(request: PaymentDataRequest): Promise; + prefetchPaymentData(request: PaymentDataRequest): void; + } +} diff --git a/types/googlepay/tsconfig.json b/types/googlepay/tsconfig.json new file mode 100644 index 0000000000..38fba1d6c8 --- /dev/null +++ b/types/googlepay/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "googlepay-tests.ts" + ] +} diff --git a/types/googlepay/tslint.json b/types/googlepay/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/googlepay/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/got/got-tests.ts b/types/got/got-tests.ts index 7857bddbab..8c88cef3bc 100644 --- a/types/got/got-tests.ts +++ b/types/got/got-tests.ts @@ -3,6 +3,8 @@ import cookie = require('cookie'); import FormData = require('form-data'); import * as fs from 'fs'; import * as http from 'http'; +import * as https from 'https'; +import * as url from 'url'; let str: string; let buf: Buffer; @@ -52,6 +54,20 @@ got('todomvc.com', { encoding: 'utf8', hostname: 'todomvc' }).then(response => str = response.body); +got('todomvc.com', { + form: true, + body: [{}], + encoding: 'utf8', + hostname: 'todomvc', + timeout: 2000 +}).then(response => str = response.body); +got('todomvc.com', { + form: true, + body: [{}], + encoding: 'utf8', + hostname: 'todomvc', + timeout: {connect: 20, request: 20, socket: 20} +}).then(response => str = response.body); // following must lead to type checking error: got('todomvc.com', {form: true, body: ''}).then(response => str = response.body); got('todomvc.com', {encoding: null, hostname: 'todomvc'}).then(response => buf = response.body); @@ -80,6 +96,7 @@ let res: http.IncomingMessage | undefined; let opts: got.GotOptions; let err: got.GotError; let href: string | undefined; +let progress: got.Progress; const stream = got.stream('todomvc.com'); stream.addListener('request', (r) => req = r); @@ -93,6 +110,12 @@ stream.addListener('error', (e, b, r) => { err = e; res = r; }); +stream.addListener('downloadProgress', (p) => { + progress = p; +}); +stream.addListener('uploadProgress', (p) => { + progress = p; +}); stream.on('request', (r) => req = r); stream.on('response', (r) => res = r); @@ -105,6 +128,12 @@ stream.on('error', (e, b, r) => { err = e; res = r; }); +stream.on('downloadProgress', (p) => { + progress = p; +}); +stream.on('uploadProgress', (p) => { + progress = p; +}); stream.once('request', (r) => req = r); stream.once('response', (r) => res = r); @@ -117,6 +146,12 @@ stream.once('error', (e, b, r) => { err = e; res = r; }); +stream.once('downloadProgress', (p) => { + progress = p; +}); +stream.once('uploadProgress', (p) => { + progress = p; +}); stream.prependListener('request', (r) => req = r); stream.prependListener('response', (r) => res = r); @@ -129,6 +164,12 @@ stream.prependListener('error', (e, b, r) => { err = e; res = r; }); +stream.prependListener('downloadProgress', (p) => { + progress = p; +}); +stream.prependListener('uploadProgress', (p) => { + progress = p; +}); stream.prependOnceListener('request', (r) => req = r); stream.prependOnceListener('response', (r) => res = r); @@ -141,6 +182,12 @@ stream.prependOnceListener('error', (e, b, r) => { err = e; res = r; }); +stream.prependOnceListener('downloadProgress', (p) => { + progress = p; +}); +stream.prependOnceListener('uploadProgress', (p) => { + progress = p; +}); stream.removeListener('request', (r) => req = r); stream.removeListener('response', (r) => res = r); @@ -153,6 +200,12 @@ stream.removeListener('error', (e, b, r) => { err = e; res = r; }); +stream.removeListener('downloadProgress', (p) => { + progress = p; +}); +stream.removeListener('uploadProgress', (p) => { + progress = p; +}); got('google.com', { headers: { @@ -176,3 +229,22 @@ got('todomvc.com', { got('https://httpbin.org/404') .catch(err => err instanceof got.HTTPError && err.statusCode === 404); + +got('todomvc', { + throwHttpErrors: false +}); + +got('todomvc', { + agent: { + http: new http.Agent(), + https: new https.Agent() + } +}); + +got('todomvc', { + cache: new Map() +}).then(res => res.fromCache); + +got(new url.URL('http://todomvc.com')); + +got(url.parse('http://todomvc.com')); diff --git a/types/got/index.d.ts b/types/got/index.d.ts index 30a5b2c0be..47c281fb53 100644 --- a/types/got/index.d.ts +++ b/types/got/index.d.ts @@ -1,14 +1,16 @@ -// Type definitions for got 7.1 +// Type definitions for got 8.3 // Project: https://github.com/sindresorhus/got#readme // Definitions by: BendingBender // Linus Unnebäck +// Konstantin Ikonnikov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 /// -import { Url } from 'url'; +import { Url, URL } from 'url'; import * as http from 'http'; +import * as https from 'https'; import * as nodeStream from 'stream'; export = got; @@ -45,6 +47,10 @@ declare class UnsupportedProtocolError extends StdError { name: 'UnsupportedProtocolError'; } +declare class CancelError extends StdError { + name: 'CancelError'; +} + declare class StdError extends Error { code?: string; host?: string; @@ -59,15 +65,22 @@ declare class StdError extends Error { declare const got: got.GotFn & Record<'get' | 'post' | 'put' | 'patch' | 'head' | 'delete', got.GotFn> & { - stream: got.GotStreamFn & Record<'get' | 'post' | 'put' | 'patch' | 'head' | 'delete', got.GotStreamFn> - RequestError: typeof RequestError - ReadError: typeof ReadError - ParseError: typeof ParseError - HTTPError: typeof HTTPError - MaxRedirectsError: typeof MaxRedirectsError - UnsupportedProtocolError: typeof UnsupportedProtocolError + stream: got.GotStreamFn & Record<'get' | 'post' | 'put' | 'patch' | 'head' | 'delete', got.GotStreamFn>; + RequestError: typeof RequestError; + ReadError: typeof ReadError; + ParseError: typeof ParseError; + HTTPError: typeof HTTPError; + MaxRedirectsError: typeof MaxRedirectsError; + UnsupportedProtocolError: typeof UnsupportedProtocolError; + CancelError: typeof CancelError; }; +interface InternalRequestOptions extends http.RequestOptions { + // Redeclare options with `any` type for allow specify types incompatible with http.RequestOptions. + timeout?: any; + agent?: any; +} + declare namespace got { interface GotFn { (url: GotUrl): GotPromise; @@ -80,7 +93,7 @@ declare namespace got { type GotStreamFn = (url: GotUrl, options?: GotOptions) => GotEmitter & nodeStream.Duplex; - type GotUrl = string | http.RequestOptions | Url; + type GotUrl = string | http.RequestOptions | Url | URL; interface GotBodyOptions extends GotOptions { body?: string | Buffer | nodeStream.Readable; @@ -98,7 +111,7 @@ declare namespace got { json?: boolean; } - type GotOptions = http.RequestOptions & { + interface GotOptions extends InternalRequestOptions { encoding?: E; query?: string | object; timeout?: number | TimeoutOptions; @@ -106,7 +119,10 @@ declare namespace got { followRedirect?: boolean; decompress?: boolean; useElectronNet?: boolean; - }; + cache?: Map; + agent?: http.Agent | boolean | AgentOptions; + throwHttpErrors?: boolean; + } interface TimeoutOptions { connect?: number; @@ -114,12 +130,18 @@ declare namespace got { request?: number; } + interface AgentOptions { + http: http.Agent; + https: https.Agent; + } + type RetryFunction = (retry: number, error: any) => number; interface Response extends http.IncomingMessage { body: B; url: string; requestUrl: string; + fromCache: boolean; redirectUrls?: string[]; } @@ -130,32 +152,50 @@ declare namespace got { addListener(event: 'response', listener: (res: http.IncomingMessage) => void): this; addListener(event: 'redirect', listener: (res: http.IncomingMessage, nextOptions: GotOptions & Url) => void): this; addListener(event: 'error', listener: (error: GotError, body?: any, res?: http.IncomingMessage) => void): this; + addListener(event: 'downloadProgress', listener: (progress: Progress) => void): this; + addListener(event: 'uploadProgress', listener: (progress: Progress) => void): this; on(event: 'request', listener: (req: http.ClientRequest) => void): this; on(event: 'response', listener: (res: http.IncomingMessage) => void): this; on(event: 'redirect', listener: (res: http.IncomingMessage, nextOptions: GotOptions & Url) => void): this; on(event: 'error', listener: (error: GotError, body?: any, res?: http.IncomingMessage) => void): this; + on(event: 'downloadProgress', listener: (progress: Progress) => void): this; + on(event: 'uploadProgress', listener: (progress: Progress) => void): this; once(event: 'request', listener: (req: http.ClientRequest) => void): this; once(event: 'response', listener: (res: http.IncomingMessage) => void): this; once(event: 'redirect', listener: (res: http.IncomingMessage, nextOptions: GotOptions & Url) => void): this; once(event: 'error', listener: (error: GotError, body?: any, res?: http.IncomingMessage) => void): this; + once(event: 'downloadProgress', listener: (progress: Progress) => void): this; + once(event: 'uploadProgress', listener: (progress: Progress) => void): this; prependListener(event: 'request', listener: (req: http.ClientRequest) => void): this; prependListener(event: 'response', listener: (res: http.IncomingMessage) => void): this; prependListener(event: 'redirect', listener: (res: http.IncomingMessage, nextOptions: GotOptions & Url) => void): this; prependListener(event: 'error', listener: (error: GotError, body?: any, res?: http.IncomingMessage) => void): this; + prependListener(event: 'downloadProgress', listener: (progress: Progress) => void): this; + prependListener(event: 'uploadProgress', listener: (progress: Progress) => void): this; prependOnceListener(event: 'request', listener: (req: http.ClientRequest) => void): this; prependOnceListener(event: 'response', listener: (res: http.IncomingMessage) => void): this; prependOnceListener(event: 'redirect', listener: (res: http.IncomingMessage, nextOptions: GotOptions & Url) => void): this; prependOnceListener(event: 'error', listener: (error: GotError, body?: any, res?: http.IncomingMessage) => void): this; + prependOnceListener(event: 'downloadProgress', listener: (progress: Progress) => void): this; + prependOnceListener(event: 'uploadProgress', listener: (progress: Progress) => void): this; removeListener(event: 'request', listener: (req: http.ClientRequest) => void): this; removeListener(event: 'response', listener: (res: http.IncomingMessage) => void): this; removeListener(event: 'redirect', listener: (res: http.IncomingMessage, nextOptions: GotOptions & Url) => void): this; removeListener(event: 'error', listener: (error: GotError, body?: any, res?: http.IncomingMessage) => void): this; + removeListener(event: 'downloadProgress', listener: (progress: Progress) => void): this; + removeListener(event: 'uploadProgress', listener: (progress: Progress) => void): this; } - type GotError = RequestError | ReadError | ParseError | HTTPError | MaxRedirectsError | UnsupportedProtocolError; + type GotError = RequestError | ReadError | ParseError | HTTPError | MaxRedirectsError | UnsupportedProtocolError | CancelError; + + interface Progress { + percent: number; + transferred: number; + total: number | null; + } } diff --git a/types/graceful-fs/graceful-fs-tests.ts b/types/graceful-fs/graceful-fs-tests.ts index 233eb7124a..17f20c786a 100644 --- a/types/graceful-fs/graceful-fs-tests.ts +++ b/types/graceful-fs/graceful-fs-tests.ts @@ -14,7 +14,7 @@ gfs.renameSync(str, str); gfs2.chmodSync(buf, 1); const gracefulified = gfs.gracefulify(fs); -gracefulified; // $ExpectType typeof "fs" & Lutimes +const _fs: typeof fs = gracefulified; gracefulified.lutimes; // $ExpectType typeof lutimes promisify(gracefulified.lutimes); // $ExpectType (path: PathLike, atime: string | number | Date, mtime: string | number | Date) => Promise diff --git a/types/graphql-list-fields/graphql-list-fields-tests.ts b/types/graphql-list-fields/graphql-list-fields-tests.ts new file mode 100644 index 0000000000..e90d609f1d --- /dev/null +++ b/types/graphql-list-fields/graphql-list-fields-tests.ts @@ -0,0 +1,31 @@ +import getFieldNames = require("graphql-list-fields"); + +import { GraphQLID, GraphQLObjectType, GraphQLSchema, GraphQLString } from "graphql"; + +const schema = new GraphQLSchema({ + query: new GraphQLObjectType({ + name: "SampleType", + fields: { + scalarField: { + type: GraphQLString, + resolve(source, args, context, info) { + const fieldNames: string[] = getFieldNames(info); + }, + }, + someType: { + type: new GraphQLObjectType({ + name: "SomeType", + fields: { + a: { type: GraphQLID }, + b: { type: GraphQLString }, + c: { type: GraphQLString }, + d: { type: GraphQLString }, + }, + }), + resolve(source, args, context, info) { + const fieldNames: string[] = getFieldNames(info); + }, + }, + }, + }), +}); diff --git a/types/graphql-list-fields/index.d.ts b/types/graphql-list-fields/index.d.ts new file mode 100644 index 0000000000..362658deb9 --- /dev/null +++ b/types/graphql-list-fields/index.d.ts @@ -0,0 +1,11 @@ +// Type definitions for graphql-list-fields 2.0 +// Project: https://github.com/jakepusateri/graphql-list-fields#readme +// Definitions by: Chris Filipowski +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import { GraphQLResolveInfo } from "graphql"; + +declare function getFieldList(info: GraphQLResolveInfo): string[]; + +export = getFieldList; diff --git a/types/graphql-list-fields/tsconfig.json b/types/graphql-list-fields/tsconfig.json new file mode 100644 index 0000000000..6f53c2c900 --- /dev/null +++ b/types/graphql-list-fields/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "graphql-list-fields-tests.ts" + ] +} diff --git a/types/graphql-list-fields/tslint.json b/types/graphql-list-fields/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/graphql-list-fields/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/graphql-relay/graphql-relay-tests.ts b/types/graphql-relay/graphql-relay-tests.ts index 6cc1f0f5ce..cebc90e2ca 100644 --- a/types/graphql-relay/graphql-relay-tests.ts +++ b/types/graphql-relay/graphql-relay-tests.ts @@ -44,7 +44,7 @@ backwardConnectionArgs.before = "b"; backwardConnectionArgs.last = 10; // connectionDefinitions returns a connectionType and its associated edgeType, given a node type. const resolve: GraphQLFieldResolver = (source, args, context, info) => { - info.fieldName = "f"; + context.flag = "f"; }; const fields: GraphQLFieldConfigMap = {}; let t: GraphQLObjectType; @@ -118,10 +118,10 @@ const resolver: GraphQLTypeResolver = () => { fields: {}, }); }; -const idFetcher = (id: string, context: number, info: GraphQLResolveInfo) => { - info.fieldName = "f"; +const idFetcher = (id: string, context: any, info: GraphQLResolveInfo) => { + context.flag = "f"; }; -const nodeDef = nodeDefinitions(idFetcher, resolver); +const nodeDef = nodeDefinitions(idFetcher, resolver); const nodeFieldConfig: GraphQLFieldConfig = nodeDef.nodeField; const nodesFieldConfig: GraphQLFieldConfig = nodeDef.nodesField; const interfaceType: GraphQLInterfaceType = nodeDef.nodeInterface; @@ -183,10 +183,10 @@ mutationWithClientMutationId({ inputFields: gifcm, mutateAndGetPayload: ( object: any, - ctx: any, + context: any, info: GraphQLResolveInfo) => { return new Promise((resolve) => { - resolve(info.fieldName); + resolve(context.flag); }); }, outputFields: gfcm, diff --git a/types/graphql-relay/index.d.ts b/types/graphql-relay/index.d.ts index 50ed0c3b7d..fc1eb3aa1e 100644 --- a/types/graphql-relay/index.d.ts +++ b/types/graphql-relay/index.d.ts @@ -21,6 +21,9 @@ import { GraphQLOutputType, GraphQLFieldResolver, GraphQLTypeResolver, + GraphQLUnionType, + GraphQLEnumType, + GraphQLScalarType, Thunk } from "graphql"; @@ -58,9 +61,20 @@ export const backwardConnectionArgs: GraphQLFieldConfigArgumentMap & { */ export const connectionArgs: GraphQLFieldConfigArgumentMap & ForwardConnectionArgs & BackwardConnectionArgs; +export type ConnectionConfigNodeTypeNullable = + | GraphQLScalarType + | GraphQLObjectType + | GraphQLInterfaceType + | GraphQLUnionType + | GraphQLEnumType; + +export type ConnectionConfigNodeType = + | ConnectionConfigNodeTypeNullable + | GraphQLNonNull; + export interface ConnectionConfig { name?: string | null; - nodeType: GraphQLObjectType; + nodeType: ConnectionConfigNodeType; resolveNode?: GraphQLFieldResolver | null; resolveCursor?: GraphQLFieldResolver | null; edgeFields?: Thunk> | null; diff --git a/types/graphql-resolve-batch/graphql-resolve-batch-tests.ts b/types/graphql-resolve-batch/graphql-resolve-batch-tests.ts index 1e9a2395a4..9043cdaf0e 100644 --- a/types/graphql-resolve-batch/graphql-resolve-batch-tests.ts +++ b/types/graphql-resolve-batch/graphql-resolve-batch-tests.ts @@ -16,64 +16,86 @@ interface SomeTestResult { someTestResultProp: string; } -const withSourceAndResultTyped = createBatchResolver< - SomeTestSource, - SomeTestResult ->((sources, _, __) => { - return sources.map(source => { - const res: SomeTestResult = { - someTestResultProp: "" - }; +const batchFunction = (sources: ReadonlyArray) => { + const someTestResult: SomeTestResult = { + someTestResultProp: "Hello" + }; - return res; + return sources.map(source => someTestResult); +}; + +const asyncBatchFunction = async (sources: ReadonlyArray) => { + return new Promise(resolve => { + const res = [ + { + someTestResultProp: "" + } + ]; + resolve(res); }); -}); +}; -const withSourceAndResultTypedAsPromise = createBatchResolver< +const asyncBatchFunctionWhenTReturnIsArray = async ( + sources: ReadonlyArray +) => { + const sourceBatches = sources.map(() => { + return new Promise(resolve => { + const res = [ + { + someTestResultProp: "" + } + ]; + resolve(res); + }); + }); + + return Promise.all(sourceBatches); +}; + +// $ExpectType ResolverFunction +const withSourceAndResultTyped = createBatchResolver< SomeTestSource, SomeTestResult >((sources, _, __) => { // $ExpectType ReadonlyArray const verifySources = sources; - return sources.map(source => { - return new Promise(resolve => { - const res: SomeTestResult = { - someTestResultProp: "" - }; - - resolve(res); - }); - }); + return batchFunction(sources); }); +// $ExpectType ResolverFunction +const withSourceAndResultTypedAsPromise = createBatchResolver< + SomeTestSource, + SomeTestResult +>(async (sources, _, __) => { + // $ExpectType ReadonlyArray + const verifySources = sources; + const result = await asyncBatchFunction(sources); + return result; +}); + +// $ExpectType ResolverFunction const withSourceAndArgsAndResultTyped = createBatchResolver< SomeTestSource, SomeTestResult, SomeTestArgs ->((sources, args, _) => { +>(async (sources, args, _) => { // $ExpectType ReadonlyArray const verifySources = sources; // $ExpectType string const verifyArgs = args.someArg; - return sources.map(source => { - return new Promise(resolve => { - const res: SomeTestResult = { - someTestResultProp: "" - }; - - resolve(res); - }); - }); + const result = await asyncBatchFunction(sources); + return result; }); +// $ExpectType ResolverFunction const withSourceAndArgsAndContextTyped = createBatchResolver< SomeTestSource, SomeTestResult, SomeTestArgs, SomeTestContext ->((sources, args, context) => { +>(async (sources, args, context) => { // $ExpectType ReadonlyArray const verifySources = sources; // $ExpectType string @@ -81,13 +103,16 @@ const withSourceAndArgsAndContextTyped = createBatchResolver< // $ExpectType string const verifyContext = context.someContextProp; - return sources.map(source => { - return new Promise(resolve => { - const res: SomeTestResult = { - someTestResultProp: "" - }; - - resolve(res); - }); - }); + const result = await asyncBatchFunction(sources); + return result; }); + +// $ExpectType ResolverFunction +const withResultIsArray = createBatchResolver( + (sources, _, __) => { + // $ExpectType ReadonlyArray + const verifySources = sources; + + return asyncBatchFunctionWhenTReturnIsArray(sources); + } +); diff --git a/types/graphql-resolve-batch/index.d.ts b/types/graphql-resolve-batch/index.d.ts index 46f354f7b7..ea90a83555 100644 --- a/types/graphql-resolve-batch/index.d.ts +++ b/types/graphql-resolve-batch/index.d.ts @@ -1,9 +1,25 @@ -// Type definitions for graphql-resolve-batch 1.0 +// Type definitions for graphql-resolve-batch 1.1 // Project: https://github.com/calebmer/graphql-resolve-batch#readme // Definitions by: Rutger Hendrickx // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 +/** + * Creates a GraphQL.js field resolver that batches together multiple resolves + * together that share the *exact* same GraphQL field selection. + * + * Note: + * The batchResolveFunction you supply always expects you to return an array of TReturn (or a promise with this array). + * This is because you will have to return a TReturn for every source given to you by the batch function. + * For an example of this please see the examples in the original project repository: + * https://github.com/calebmer/graphql-resolve-batch/tree/master/examples + * + * @template TSource The original type of a single source. + * @template TReturn The return type of the field resolver. + * @template TArgs The type of supplied arguments. + * @template TContext The type of the current resolver context. + * @param batchResolveFn A batch function to resolve all fields for the given sources in a single batch. + */ export function createBatchResolver< TSource, TReturn, @@ -13,14 +29,21 @@ export function createBatchResolver< batchResolveFn: BatchResolveFunction ): ResolverFunction; +/** + * The resulting field resolver that batches together multiple resolves. + * Graphql-resolve-batch will always return a promise for this resulting resolver. + */ export type ResolverFunction = ( source: TSource, args: TArgs, context: TContext ) => Promise; +/** + * A batch function to resolve all fields for the given sources in a single batch. + */ export type BatchResolveFunction = ( sources: ReadonlyArray, args: TArgs, context: TContext -) => TReturn[] | Array>; +) => TReturn[] | Promise; diff --git a/types/graphql/error/GraphQLError.d.ts b/types/graphql/error/GraphQLError.d.ts index 116f17c3fa..0be931bee0 100644 --- a/types/graphql/error/GraphQLError.d.ts +++ b/types/graphql/error/GraphQLError.d.ts @@ -1,6 +1,7 @@ -import { getLocation } from '../language'; -import { ASTNode } from '../language/ast'; -import { Source } from '../language/source'; +import { getLocation } from "../language"; +import { ASTNode } from "../language/ast"; +import { Source } from "../language/source"; +import { SourceLocation } from "../language/location"; /** * A GraphQLError describes an Error found during the parse, validate, or @@ -9,60 +10,68 @@ import { Source } from '../language/source'; * GraphQL document and/or execution result that correspond to the Error. */ export class GraphQLError extends Error { - /** - * A message describing the Error for debugging purposes. - * - * Enumerable, and appears in the result of JSON.stringify(). - */ - message: string; + /** + * A message describing the Error for debugging purposes. + * + * Enumerable, and appears in the result of JSON.stringify(). + * + * Note: should be treated as readonly, despite invariant usage. + */ + 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 }> | undefined; + /** + * 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(). + */ + readonly locations: ReadonlyArray | undefined; - /** - * 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 | undefined; + /** + * 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(). + */ + readonly path: ReadonlyArray | undefined; - /** - * An array of GraphQL AST Nodes corresponding to this error. - */ - nodes?: ASTNode[] | undefined; + /** + * An array of GraphQL AST Nodes corresponding to this error. + */ + readonly nodes: ReadonlyArray | undefined; - /** - * The source GraphQL document corresponding to this error. - */ - source?: Source | undefined; + /** + * The source GraphQL document corresponding to this error. + */ + readonly source: Source | undefined; - /** - * An array of character offsets within the source GraphQL document - * which correspond to this error. - */ - positions?: number[] | undefined; + /** + * An array of character offsets within the source GraphQL document + * which correspond to this error. + */ + readonly positions: ReadonlyArray | undefined; - /** - * The original error thrown from a field resolver during execution. - */ - originalError?: Error; + /** + * The original error thrown from a field resolver during execution. + */ + readonly originalError: Error | void; - constructor( - message: string, - nodes?: any[], - source?: Source, - positions?: number[], - path?: Array, - originalError?: Error, - ); + /** + * Extension fields to add to the formatted error. + */ + readonly extensions: { [key: string]: any } | void; + + constructor( + message: string, + nodes?: ReadonlyArray | ASTNode | undefined, + source?: Source | void, + positions?: ReadonlyArray | void, + path?: ReadonlyArray | void, + originalError?: Error | void, + extensions?: { [key: string]: any } | void + ); } diff --git a/types/graphql/error/formatError.d.ts b/types/graphql/error/formatError.d.ts index 26dbe0f743..7f13117cf0 100644 --- a/types/graphql/error/formatError.d.ts +++ b/types/graphql/error/formatError.d.ts @@ -1,4 +1,5 @@ -import { GraphQLError } from './GraphQLError'; +import { GraphQLError } from "./GraphQLError"; +import { SourceLocation } from "../language/location"; /** * Given a GraphQLError, format it according to the rules described by the @@ -7,12 +8,9 @@ import { GraphQLError } from './GraphQLError'; export function formatError(error: GraphQLError): GraphQLFormattedError; export interface GraphQLFormattedError { - message: string; - locations?: GraphQLErrorLocation[]; - path?: Array; -} - -export interface GraphQLErrorLocation { - line: number; - column: number; + readonly message: string; + readonly locations: ReadonlyArray | undefined; + readonly path: ReadonlyArray | undefined; + // Extensions + readonly [key: string]: any; } diff --git a/types/graphql/error/index.d.ts b/types/graphql/error/index.d.ts index 0e9a557794..bed0763ed3 100644 --- a/types/graphql/error/index.d.ts +++ b/types/graphql/error/index.d.ts @@ -1,8 +1,5 @@ -export { GraphQLError } from './GraphQLError'; -export { syntaxError } from './syntaxError'; -export { locatedError } from './locatedError'; -export { - formatError, - GraphQLFormattedError, - GraphQLErrorLocation, -} from './formatError'; +export { GraphQLError } from "./GraphQLError"; +export { syntaxError } from "./syntaxError"; +export { locatedError } from "./locatedError"; +export { printError } from "./printError"; +export { formatError, GraphQLFormattedError } from "./formatError"; diff --git a/types/graphql/error/locatedError.d.ts b/types/graphql/error/locatedError.d.ts index 64fadf49f4..77dd470c63 100644 --- a/types/graphql/error/locatedError.d.ts +++ b/types/graphql/error/locatedError.d.ts @@ -1,12 +1,13 @@ -import { GraphQLError } from './GraphQLError'; +import { GraphQLError } from "./GraphQLError"; +import { ASTNode } from "../language/ast"; /** * 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. */ -export function locatedError( - originalError: Error, - nodes: T[], - path: Array, +export function locatedError( + originalError: Error, + nodes: ReadonlyArray, + path: ReadonlyArray ): GraphQLError; diff --git a/types/graphql/error/printError.d.ts b/types/graphql/error/printError.d.ts new file mode 100644 index 0000000000..924682f471 --- /dev/null +++ b/types/graphql/error/printError.d.ts @@ -0,0 +1,7 @@ +import { GraphQLError } from "./GraphQLError"; + +/** + * Prints a GraphQLError to a string, representing useful location information + * about the error's position in the source. + */ +export function printError(error: GraphQLError): string; diff --git a/types/graphql/error/syntaxError.d.ts b/types/graphql/error/syntaxError.d.ts index ccf84044ca..bc33cd8107 100644 --- a/types/graphql/error/syntaxError.d.ts +++ b/types/graphql/error/syntaxError.d.ts @@ -1,12 +1,8 @@ -import { Source } from '../language/source'; -import { GraphQLError } from './GraphQLError'; +import { Source } from "../language/source"; +import { GraphQLError } from "./GraphQLError"; /** * Produces a GraphQLError representing a syntax error, containing useful * descriptive information about the syntax error's position in the source. */ -export function syntaxError( - source: Source, - position: number, - description: string, -): GraphQLError; +export function syntaxError(source: Source, position: number, description: string): GraphQLError; diff --git a/types/graphql/execution/execute.d.ts b/types/graphql/execution/execute.d.ts index ea6ab8ed39..424bb62b5a 100644 --- a/types/graphql/execution/execute.d.ts +++ b/types/graphql/execution/execute.d.ts @@ -1,19 +1,23 @@ -import { GraphQLError, locatedError } from '../error'; -import { GraphQLSchema } from '../type/schema'; +import { GraphQLError, locatedError } from "../error"; +import { GraphQLSchema } from "../type/schema"; import { - GraphQLField, - GraphQLFieldResolver, - ResponsePath, -} from '../type/definition'; + GraphQLField, + GraphQLFieldResolver, + ResponsePath, + GraphQLObjectType, + GraphQLResolveInfo, +} from "../type/definition"; import { - DirectiveNode, - DocumentNode, - OperationDefinitionNode, - SelectionSetNode, - FieldNode, - InlineFragmentNode, - FragmentDefinitionNode, -} from '../language/ast'; + DirectiveNode, + DocumentNode, + OperationDefinitionNode, + SelectionSetNode, + FieldNode, + InlineFragmentNode, + FragmentDefinitionNode, +} from "../language/ast"; +import { MaybePromise } from "../jsutils/MaybePromise"; + /** * Data that must be available at all points during query execution. * @@ -21,67 +25,140 @@ import { * and the fragments defined in the query document */ export interface ExecutionContext { - schema: GraphQLSchema; - fragments: { [key: string]: FragmentDefinitionNode }; - rootValue: any; - operation: OperationDefinitionNode; - variableValues: { [key: string]: any }; - fieldResolver: GraphQLFieldResolver; - errors: GraphQLError[]; + schema: GraphQLSchema; + fragments: { [key: string]: FragmentDefinitionNode }; + rootValue: any; + contextValue: any; + operation: OperationDefinitionNode; + variableValues: { [key: string]: any }; + fieldResolver: GraphQLFieldResolver; + errors: GraphQLError[]; } /** - * The result of execution. `data` is the result of executing the - * query, `extensions` represents additional metadata, `errors` is - * null if no errors occurred, and is a - * non-empty array if an error occurred. + * The result of GraphQL execution. + * + * - `errors` is included when any errors occurred as a non-empty array. + * - `data` is the result of a successful execution of the query. */ export interface ExecutionResult { - data?: { [key: string]: any }; - extensions?: { [key: string]: any }; - errors?: GraphQLError[]; + errors?: ReadonlyArray; + data?: { [key: string]: any }; } export type ExecutionArgs = { - schema: GraphQLSchema; - document: DocumentNode; - rootValue?: any; - contextValue?: any; - variableValues?: { [key: string]: any }; - operationName?: string; - fieldResolver?: GraphQLFieldResolver; + schema: GraphQLSchema; + document: DocumentNode; + rootValue?: any; + contextValue?: any; + variableValues?: { [key: string]: any } | void; + operationName?: string | void; + fieldResolver?: GraphQLFieldResolver | void; }; /** * Implements the "Evaluating requests" section of the GraphQL specification. * - * Returns a Promise that will eventually be resolved and never rejected. + * Returns either a synchronous ExecutionResult (if all encountered resolvers + * are synchronous), or a Promise of an ExecutionResult 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. * * Accepts either an object with named arguments, or individual arguments. */ -export function execute(args: ExecutionArgs): Promise; +export function execute(args: ExecutionArgs): MaybePromise; export function execute( - schema: GraphQLSchema, - document: DocumentNode, - rootValue?: any, - contextValue?: any, - variableValues?: { - [key: string]: any; - }, - operationName?: string, - fieldResolver?: GraphQLFieldResolver, -): Promise; + schema: GraphQLSchema, + document: DocumentNode, + rootValue?: any, + contextValue?: any, + variableValues?: { [key: string]: any } | void, + operationName?: string | void, + fieldResolver?: GraphQLFieldResolver | void +): MaybePromise; /** * Given a ResponsePath (found in the `path` entry in the information provided * as the last argument to a field resolver), return an Array of the path keys. */ -export function responsePathAsArray(path: ResponsePath): Array; +export function responsePathAsArray(path: ResponsePath): ReadonlyArray; -export function addPath(prev: ResponsePath, key: string | number): any; +/** + * Given a ResponsePath and a key, return a new ResponsePath containing the + * new key. + */ +export function addPath( + prev: ResponsePath | undefined, + key: string | number +): { prev: ResponsePath | undefined; key: string | number }; + +/** + * Essential assertions before executing to provide developer feedback for + * improper use of the GraphQL library. + */ +export function assertValidExecutionArguments( + schema: GraphQLSchema, + document: DocumentNode, + rawVariableValues: { [key: string]: any } | void +): void; + +/** + * Constructs a ExecutionContext object from the arguments passed to + * execute, which we will pass throughout the other execution methods. + * + * Throws a GraphQLError if a valid execution context cannot be created. + */ +export function buildExecutionContext( + schema: GraphQLSchema, + document: DocumentNode, + rootValue: any, + contextValue: any, + rawVariableValues: { [key: string]: any } | void, + operationName: string | void, + fieldResolver: GraphQLFieldResolver | void +): ReadonlyArray | ExecutionContext; + +/** + * Extracts the root type of the operation from the schema. + */ +export function getOperationRootType(schema: GraphQLSchema, operation: OperationDefinitionNode): GraphQLObjectType; + +/** + * Given a selectionSet, adds all of the fields in that selection to + * the passed in map of fields, and returns it at the end. + * + * CollectFields requires the "runtime type" of an object. For a field which + * returns an Interface or Union type, the "runtime type" will be the actual + * Object type returned by that field. + */ +export function collectFields( + exeContext: ExecutionContext, + runtimeType: GraphQLObjectType, + selectionSet: SelectionSetNode, + fields: { [key: string]: Array }, + visitedFragmentNames: { [key: string]: boolean } +): { [key: string]: Array }; + +export function buildResolveInfo( + exeContext: ExecutionContext, + fieldDef: GraphQLField, + fieldNodes: ReadonlyArray, + parentType: GraphQLObjectType, + path: ResponsePath +): GraphQLResolveInfo; + +// Isolates the "ReturnOrAbrupt" behavior to not de-opt the `resolveField` +// function. Returns the result of resolveFn or the abrupt-return Error object. +export function resolveFieldValueOrError( + exeContext: ExecutionContext, + fieldDef: GraphQLField, + fieldNodes: ReadonlyArray, + resolveFn: GraphQLFieldResolver, + source: TSource, + info: GraphQLResolveInfo +): Error | any; /** * If a resolve function is not given, then a default resolve behavior is used @@ -90,3 +167,18 @@ export function addPath(prev: ResponsePath, key: string | number): any; * of calling that function while passing along args and context. */ export const defaultFieldResolver: GraphQLFieldResolver; + +/** + * This method looks up the field on the given type defintion. + * It has special casing for the two introspection fields, __schema + * and __typename. __typename is special because it can always be + * queried as a field, even in situations where no other fields + * are allowed, like on a Union. __schema could get automatically + * added to the query type, but that would require mutating type + * definitions, which would cause issues. + */ +export function getFieldDef( + schema: GraphQLSchema, + parentType: GraphQLObjectType, + fieldName: string +): GraphQLField | void; diff --git a/types/graphql/execution/index.d.ts b/types/graphql/execution/index.d.ts index a5c4980c0a..74aef224ce 100644 --- a/types/graphql/execution/index.d.ts +++ b/types/graphql/execution/index.d.ts @@ -1,9 +1,3 @@ -export { - execute, - defaultFieldResolver, - responsePathAsArray, - ExecutionArgs, - ExecutionResult, -} from './execute'; +export { execute, defaultFieldResolver, responsePathAsArray, ExecutionArgs, ExecutionResult } from "./execute"; -export { getDirectiveValues } from './values'; +export { getDirectiveValues } from "./values"; diff --git a/types/graphql/execution/values.d.ts b/types/graphql/execution/values.d.ts index 08e6041aa2..fb629325e8 100644 --- a/types/graphql/execution/values.d.ts +++ b/types/graphql/execution/values.d.ts @@ -1,35 +1,41 @@ -import { - GraphQLInputType, - GraphQLField, - GraphQLArgument, -} from '../type/definition'; -import { GraphQLDirective } from '../type/directives'; -import { GraphQLSchema } from '../type/schema'; -import { - FieldNode, - DirectiveNode, - VariableDefinitionNode, -} from '../language/ast'; +import { GraphQLError } from "../error"; +import { GraphQLInputType, GraphQLField, GraphQLArgument } from "../type/definition"; +import { GraphQLDirective } from "../type/directives"; +import { GraphQLSchema } from "../type/schema"; +import { FieldNode, DirectiveNode, VariableDefinitionNode } from "../language/ast"; + +interface CoercedVariableValues { + errors: ReadonlyArray | undefined; + coerced: { [key: string]: any } | undefined; +} /** * 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. + * + * Note: The returned value is a plain Object with a prototype, since it is + * exposed to user code. Care should be taken to not pull values from the + * Object prototype. */ export function getVariableValues( - schema: GraphQLSchema, - varDefNodes: VariableDefinitionNode[], - inputs: { [key: string]: any }, -): { [key: string]: any }; + schema: GraphQLSchema, + varDefNodes: VariableDefinitionNode[], + inputs: { [key: string]: any } +): CoercedVariableValues; /** * Prepares an object map of argument values given a list of argument * definitions and list of argument AST nodes. + * + * Note: The returned value is a plain Object with a prototype, since it is + * exposed to user code. Care should be taken to not pull values from the + * Object prototype. */ export function getArgumentValues( - def: GraphQLField | GraphQLDirective, - node: FieldNode | DirectiveNode, - variableValues?: { [key: string]: any }, + def: GraphQLField | GraphQLDirective, + node: FieldNode | DirectiveNode, + variableValues?: { [key: string]: any } | void ): { [key: string]: any }; /** @@ -38,9 +44,15 @@ export function getArgumentValues( * of variable values. * * If the directive does not exist on the node, returns undefined. + * + * Note: The returned value is a plain Object with a prototype, since it is + * exposed to user code. Care should be taken to not pull values from the + * Object prototype. */ export function getDirectiveValues( - directiveDef: GraphQLDirective, - node: { directives?: Array }, - variableValues?: { [key: string]: any }, -): void | { [key: string]: any }; + directiveDef: GraphQLDirective, + node: { + readonly directives?: ReadonlyArray; + }, + variableValues?: { [key: string]: any } | void +): undefined | { [key: string]: any }; diff --git a/types/graphql/graphql.d.ts b/types/graphql/graphql.d.ts index f5469d7d8c..7282ea80f2 100644 --- a/types/graphql/graphql.d.ts +++ b/types/graphql/graphql.d.ts @@ -1,7 +1,7 @@ -import { Source } from './language/source'; -import { GraphQLFieldResolver } from './type/definition'; -import { GraphQLSchema } from './type/schema'; -import { ExecutionResult } from './execution/execute'; +import { Source } from "./language/source"; +import { GraphQLFieldResolver } from "./type/definition"; +import { GraphQLSchema } from "./type/schema"; +import { ExecutionResult } from "./execution/execute"; /** * This is the primary entry point function for fulfilling GraphQL operations @@ -33,25 +33,40 @@ import { ExecutionResult } from './execution/execute'; * If not provided, the default field resolver is used (which looks for a * value or method on the source value with the field's name). */ -export function graphql(args: { - schema: GraphQLSchema, - source: string | Source, - rootValue?: any, - contextValue?: any, - variableValues?: { - [key: string]: any - }, - operationName?: string, - fieldResolver?: GraphQLFieldResolver -}): Promise; +export interface GraphQLArgs { + schema: GraphQLSchema; + source: Source | string; + rootValue?: any; + contextValue?: any; + variableValues?: { [key: string]: any } | void; + operationName?: string | void; + fieldResolver?: GraphQLFieldResolver | void; +} + +export function graphql(args: GraphQLArgs): Promise; export function graphql( schema: GraphQLSchema, - source: string | Source, + source: Source | string, rootValue?: any, contextValue?: any, - variableValues?: { - [key: string]: any - }, - operationName?: string, - fieldResolver?: GraphQLFieldResolver + variableValues?: { [key: string]: any } | void, + operationName?: string | void, + fieldResolver?: GraphQLFieldResolver | void ): Promise; + +/** + * The graphqlSync function also fulfills GraphQL operations by parsing, + * validating, and executing a GraphQL document along side a GraphQL schema. + * However, it guarantees to complete synchronously (or throw an error) assuming + * that all field resolvers are also synchronous. + */ +export function graphqlSync(args: GraphQLArgs): ExecutionResult; +export function graphqlSync( + schema: GraphQLSchema, + source: Source | string, + rootValue?: any, + contextValue?: any, + variableValues?: { [key: string]: any } | void, + operationName?: string | void, + fieldResolver?: GraphQLFieldResolver | void +): ExecutionResult; diff --git a/types/graphql/index.d.ts b/types/graphql/index.d.ts index a8bead58fd..68e04d104d 100644 --- a/types/graphql/index.d.ts +++ b/types/graphql/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for graphql 0.12 +// Type definitions for graphql 0.13 // Project: https://www.npmjs.com/package/graphql // Definitions by: TonyYang // Caleb Meredith @@ -12,21 +12,226 @@ // Tim Griesser // Dylan Stewart // Alessio Dionisi +// Divyendu Singh // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 // The primary entry point into fulfilling a GraphQL request. -export { - graphql -} from './graphql'; +export { graphql, graphqlSync, GraphQLArgs } from "./graphql"; // Create and operate on GraphQL type definitions and schema. -export * from './type'; +export { + GraphQLSchema, + // Definitions + GraphQLScalarType, + GraphQLObjectType, + GraphQLInterfaceType, + GraphQLUnionType, + GraphQLEnumType, + GraphQLInputObjectType, + GraphQLList, + GraphQLNonNull, + GraphQLDirective, + // "Enum" of Type Kinds + TypeKind, + // Scalars + specifiedScalarTypes, + 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. + introspectionTypes, + __Schema, + __Directive, + __DirectiveLocation, + __Type, + __Field, + __InputValue, + __EnumValue, + __TypeKind, + // Predicates + isSchema, + isDirective, + isType, + isScalarType, + isObjectType, + isInterfaceType, + isUnionType, + isEnumType, + isInputObjectType, + isListType, + isNonNullType, + isInputType, + isOutputType, + isLeafType, + isCompositeType, + isAbstractType, + isWrappingType, + isNullableType, + isNamedType, + isSpecifiedScalarType, + isIntrospectionType, + isSpecifiedDirective, + // Assertions + assertType, + assertScalarType, + assertObjectType, + assertInterfaceType, + assertUnionType, + assertEnumType, + assertInputObjectType, + assertListType, + assertNonNullType, + assertInputType, + assertOutputType, + assertLeafType, + assertCompositeType, + assertAbstractType, + assertWrappingType, + assertNullableType, + assertNamedType, + // Un-modifiers + getNullableType, + getNamedType, + // Validate GraphQL schema. + validateSchema, + assertValidSchema, + // type + GraphQLType, + GraphQLInputType, + GraphQLOutputType, + GraphQLLeafType, + GraphQLCompositeType, + GraphQLAbstractType, + GraphQLWrappingType, + GraphQLNullableType, + GraphQLNamedType, + Thunk, + GraphQLSchemaConfig, + GraphQLArgument, + GraphQLArgumentConfig, + GraphQLEnumTypeConfig, + GraphQLEnumValue, + GraphQLEnumValueConfig, + GraphQLEnumValueConfigMap, + GraphQLField, + GraphQLFieldConfig, + GraphQLFieldConfigArgumentMap, + GraphQLFieldConfigMap, + GraphQLFieldMap, + GraphQLFieldResolver, + GraphQLInputField, + GraphQLInputFieldConfig, + GraphQLInputFieldConfigMap, + GraphQLInputFieldMap, + GraphQLInputObjectTypeConfig, + GraphQLInterfaceTypeConfig, + GraphQLIsTypeOfFn, + GraphQLObjectTypeConfig, + GraphQLResolveInfo, + ResponsePath, + GraphQLScalarTypeConfig, + GraphQLTypeResolver, + GraphQLUnionTypeConfig, + GraphQLDirectiveConfig, +} from "./type"; // Parse and operate on GraphQL language source files. -export * from './language'; - -export * from './subscription'; +export { + Source, + getLocation, + // Parse + parse, + parseValue, + parseType, + // Print + print, + // Visit + visit, + visitInParallel, + visitWithTypeInfo, + getVisitFn, + Kind, + TokenKind, + DirectiveLocation, + BREAK, + // type + Lexer, + ParseOptions, + SourceLocation, + // Visitor utilities + ASTVisitor, + Visitor, + VisitFn, + VisitorKeyMap, + // AST nodes + Location, + Token, + ASTNode, + ASTKindToNode, + NameNode, + DocumentNode, + DefinitionNode, + ExecutableDefinitionNode, + OperationDefinitionNode, + OperationTypeNode, + VariableDefinitionNode, + VariableNode, + SelectionSetNode, + SelectionNode, + FieldNode, + ArgumentNode, + FragmentSpreadNode, + InlineFragmentNode, + FragmentDefinitionNode, + ValueNode, + IntValueNode, + FloatValueNode, + StringValueNode, + BooleanValueNode, + NullValueNode, + EnumValueNode, + ListValueNode, + ObjectValueNode, + ObjectFieldNode, + DirectiveNode, + TypeNode, + NamedTypeNode, + ListTypeNode, + NonNullTypeNode, + TypeSystemDefinitionNode, + SchemaDefinitionNode, + OperationTypeDefinitionNode, + TypeDefinitionNode, + ScalarTypeDefinitionNode, + ObjectTypeDefinitionNode, + FieldDefinitionNode, + InputValueDefinitionNode, + InterfaceTypeDefinitionNode, + UnionTypeDefinitionNode, + EnumTypeDefinitionNode, + EnumValueDefinitionNode, + InputObjectTypeDefinitionNode, + TypeExtensionNode, + ObjectTypeExtensionNode, + DirectiveDefinitionNode, + KindEnum, + TokenKindEnum, + DirectiveLocationEnum, +} from "./language"; // Execute GraphQL queries. export { @@ -34,21 +239,20 @@ export { defaultFieldResolver, responsePathAsArray, getDirectiveValues, + // type ExecutionArgs, ExecutionResult, -} from './execution'; +} from "./execution"; + +export { subscribe, createSourceEventStream } from "./subscription"; // Validate GraphQL queries. export { validate, ValidationContext, - // All validation rules in the GraphQL Specification. specifiedRules, - // Individual validation rules. - ArgumentsOfCorrectTypeRule, - DefaultValuesOfCorrectTypeRule, FieldsOnCorrectTypeRule, FragmentsOnCompositeTypesRule, KnownArgumentNamesRule, @@ -71,101 +275,106 @@ export { UniqueInputFieldNamesRule, UniqueOperationNamesRule, UniqueVariableNamesRule, + ValuesOfCorrectTypeRule, VariablesAreInputTypesRule, + VariablesDefaultValueAllowedRule, VariablesInAllowedPositionRule, -} from './validation'; +} from "./validation"; // Create and format GraphQL errors. -export { - GraphQLError, - formatError, - GraphQLFormattedError, - GraphQLErrorLocation, -} from './error'; +export { GraphQLError, formatError, printError, GraphQLFormattedError } from "./error"; // Utilities for operating on GraphQL type schema and parsed sources. export { - // The GraphQL query recommended for a full schema introspection. + // Produce the GraphQL query recommended for a full schema introspection. + // Accepts optional IntrospectionOptions. + getIntrospectionQuery, + // Deprecated: use getIntrospectionQuery introspectionQuery, - // Gets the target Operation from a Document getOperationAST, - + // Convert a GraphQLSchema to an IntrospectionQuery + introspectionFromSchema, // 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, - + // Get the description from a schema AST node. + getDescription, // Extends an existing GraphQLSchema from a parsed GraphQL Schema // language AST. extendSchema, - + // Sort a GraphQLSchema. + lexicographicSortSchema, // Print a GraphQLSchema to GraphQL Schema language. printSchema, - + // Prints the built-in introspection schema in the Schema Language + // format. + printIntrospectionSchema, // Print a GraphQLType to GraphQL Schema language. printType, - // Create a GraphQLType from a GraphQL language AST. typeFromAST, - - // Create a JavaScript value from a GraphQL language AST. + // Create a JavaScript value from a GraphQL language AST with a Type. valueFromAST, - + // Create a JavaScript value from a GraphQL language AST without a Type. + valueFromASTUntyped, // 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. + // Coerces a JavaScript value to a GraphQL type, or produces errors. + coerceValue, + // @deprecated use coerceValue 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, - + // Determine if a string is a valid GraphQL name. + isValidNameError, // Compares two GraphQLSchemas and detects breaking changes. findBreakingChanges, - + findDangerousChanges, + BreakingChangeType, + DangerousChangeType, // Report all deprecated usage within a GraphQL document. findDeprecatedUsages, - + // type + BuildSchemaOptions, BreakingChange, - + DangerousChange, + IntrospectionOptions, IntrospectionDirective, IntrospectionEnumType, IntrospectionEnumValue, IntrospectionField, IntrospectionInputObjectType, + IntrospectionInputType, + IntrospectionInputTypeRef, IntrospectionInputValue, IntrospectionInterfaceType, IntrospectionListTypeRef, IntrospectionNamedTypeRef, IntrospectionNonNullTypeRef, IntrospectionObjectType, + IntrospectionOutputType, + IntrospectionOutputTypeRef, IntrospectionQuery, IntrospectionScalarType, IntrospectionSchema, IntrospectionType, IntrospectionTypeRef, IntrospectionUnionType, -} from './utilities'; +} from "./utilities"; diff --git a/types/graphql/jsutils/MaybePromise.d.ts b/types/graphql/jsutils/MaybePromise.d.ts new file mode 100644 index 0000000000..5eb85a3f92 --- /dev/null +++ b/types/graphql/jsutils/MaybePromise.d.ts @@ -0,0 +1 @@ +export type MaybePromise = Promise | T; diff --git a/types/graphql/language/ast.d.ts b/types/graphql/language/ast.d.ts index 1873caeb1f..21601385ff 100644 --- a/types/graphql/language/ast.d.ts +++ b/types/graphql/language/ast.d.ts @@ -1,382 +1,351 @@ -import { Source } from './source'; +import { Source } from "./source"; +import { TokenKindEnum } from "./lexer"; /** * Contains a range of UTF-8 character offsets and token references that * identify the region of the source from which the AST derived. */ export interface Location { - /** - * The character offset at which this Node begins. - */ - start: number; + /** + * The character offset at which this Node begins. + */ + readonly start: number; - /** - * The character offset at which this Node ends. - */ - end: number; + /** + * The character offset at which this Node ends. + */ + readonly end: number; - /** - * The Token at which this Node begins. - */ - startToken: Token; + /** + * The Token at which this Node begins. + */ + readonly startToken: Token; - /** - * The Token at which this Node ends. - */ - endToken: Token; + /** + * The Token at which this Node ends. + */ + readonly endToken: Token; - /** - * The Source document the AST represents. - */ - source: Source; + /** + * The Source document the AST represents. + */ + readonly source: Source; } -/** - * Represents the different kinds of tokens in a GraphQL document. - * This type is not inlined in `Token` to fix syntax highlighting on GitHub - * *only*. - */ -type TokenKind = - | '' - | '' - | '!' - | '$' - | '(' - | ')' - | '...' - | ':' - | '=' - | '@' - | '[' - | ']' - | '{' - | '|' - | '}' - | 'Name' - | 'Int' - | 'Float' - | 'String' - | 'BlockString' - | 'Comment'; - /** * Represents a range of characters represented by a lexical token * within a Source. */ export interface Token { - /** - * The kind of Token. - */ - kind: TokenKind; + /** + * The kind of Token. + */ + readonly kind: TokenKindEnum; - /** - * The character offset at which this Node begins. - */ - start: number; + /** + * The character offset at which this Node begins. + */ + readonly start: number; - /** - * The character offset at which this Node ends. - */ - end: number; + /** + * The character offset at which this Node ends. + */ + readonly end: number; - /** - * The 1-indexed line number on which this Token appears. - */ - line: number; + /** + * The 1-indexed line number on which this Token appears. + */ + readonly line: number; - /** - * The 1-indexed column number at which this Token begins. - */ - column: number; + /** + * The 1-indexed column number at which this Token begins. + */ + readonly column: number; - /** - * For non-punctuation tokens, represents the interpreted value of the token. - */ - value: string | undefined; + /** + * For non-punctuation tokens, represents the interpreted value of the token. + */ + readonly value: string | undefined; - /** - * 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; + /** + * Tokens exist as nodes in a double-linked-list amongst all tokens + * including ignored tokens. is always the first node and + * the last. + */ + readonly prev: Token | null; + readonly next: Token | null; } /** * The list of all possible AST node types. */ export type ASTNode = - | NameNode - | DocumentNode - | OperationDefinitionNode - | VariableDefinitionNode - | VariableNode - | SelectionSetNode - | FieldNode - | ArgumentNode - | FragmentSpreadNode - | InlineFragmentNode - | FragmentDefinitionNode - | IntValueNode - | FloatValueNode - | StringValueNode - | BooleanValueNode - | NullValueNode - | EnumValueNode - | ListValueNode - | ObjectValueNode - | ObjectFieldNode - | DirectiveNode - | NamedTypeNode - | ListTypeNode - | NonNullTypeNode - | SchemaDefinitionNode - | OperationTypeDefinitionNode - | ScalarTypeDefinitionNode - | ObjectTypeDefinitionNode - | FieldDefinitionNode - | InputValueDefinitionNode - | InterfaceTypeDefinitionNode - | UnionTypeDefinitionNode - | EnumTypeDefinitionNode - | EnumValueDefinitionNode - | InputObjectTypeDefinitionNode - | ScalarTypeExtensionNode - | ObjectTypeExtensionNode - | InterfaceTypeExtensionNode - | UnionTypeExtensionNode - | EnumTypeExtensionNode - | InputObjectTypeExtensionNode - | DirectiveDefinitionNode; + | NameNode + | DocumentNode + | OperationDefinitionNode + | VariableDefinitionNode + | VariableNode + | SelectionSetNode + | FieldNode + | ArgumentNode + | FragmentSpreadNode + | InlineFragmentNode + | FragmentDefinitionNode + | IntValueNode + | FloatValueNode + | StringValueNode + | BooleanValueNode + | NullValueNode + | EnumValueNode + | ListValueNode + | ObjectValueNode + | ObjectFieldNode + | DirectiveNode + | NamedTypeNode + | ListTypeNode + | NonNullTypeNode + | SchemaDefinitionNode + | OperationTypeDefinitionNode + | ScalarTypeDefinitionNode + | ObjectTypeDefinitionNode + | FieldDefinitionNode + | InputValueDefinitionNode + | InterfaceTypeDefinitionNode + | UnionTypeDefinitionNode + | EnumTypeDefinitionNode + | EnumValueDefinitionNode + | InputObjectTypeDefinitionNode + | ScalarTypeExtensionNode + | ObjectTypeExtensionNode + | InterfaceTypeExtensionNode + | UnionTypeExtensionNode + | EnumTypeExtensionNode + | InputObjectTypeExtensionNode + | DirectiveDefinitionNode; /** * Utility type listing all nodes indexed by their kind. */ export interface ASTKindToNode { - Name: NameNode; - Document: DocumentNode; - OperationDefinition: OperationDefinitionNode; - VariableDefinition: VariableDefinitionNode; - Variable: VariableNode; - SelectionSet: SelectionSetNode; - Field: FieldNode; - Argument: ArgumentNode; - FragmentSpread: FragmentSpreadNode; - InlineFragment: InlineFragmentNode; - FragmentDefinition: FragmentDefinitionNode; - IntValue: IntValueNode; - FloatValue: FloatValueNode; - StringValue: StringValueNode; - BooleanValue: BooleanValueNode; - NullValue: NullValueNode; - EnumValue: EnumValueNode; - ListValue: ListValueNode; - ObjectValue: ObjectValueNode; - ObjectField: ObjectFieldNode; - Directive: DirectiveNode; - NamedType: NamedTypeNode; - ListType: ListTypeNode; - NonNullType: NonNullTypeNode; - SchemaDefinition: SchemaDefinitionNode; - OperationTypeDefinition: OperationTypeDefinitionNode; - ScalarTypeDefinition: ScalarTypeDefinitionNode; - ObjectTypeDefinition: ObjectTypeDefinitionNode; - FieldDefinition: FieldDefinitionNode; - InputValueDefinition: InputValueDefinitionNode; - InterfaceTypeDefinition: InterfaceTypeDefinitionNode; - UnionTypeDefinition: UnionTypeDefinitionNode; - EnumTypeDefinition: EnumTypeDefinitionNode; - EnumValueDefinition: EnumValueDefinitionNode; - InputObjectTypeDefinition: InputObjectTypeDefinitionNode; - ScalarTypeExtension: ScalarTypeExtensionNode; - ObjectTypeExtension: ObjectTypeExtensionNode; - InterfaceTypeExtension: InterfaceTypeExtensionNode; - UnionTypeExtension: UnionTypeExtensionNode; - EnumTypeExtension: EnumTypeExtensionNode; - InputObjectTypeExtension: InputObjectTypeExtensionNode; - DirectiveDefinition: DirectiveDefinitionNode; + Name: NameNode; + Document: DocumentNode; + OperationDefinition: OperationDefinitionNode; + VariableDefinition: VariableDefinitionNode; + Variable: VariableNode; + SelectionSet: SelectionSetNode; + Field: FieldNode; + Argument: ArgumentNode; + FragmentSpread: FragmentSpreadNode; + InlineFragment: InlineFragmentNode; + FragmentDefinition: FragmentDefinitionNode; + IntValue: IntValueNode; + FloatValue: FloatValueNode; + StringValue: StringValueNode; + BooleanValue: BooleanValueNode; + NullValue: NullValueNode; + EnumValue: EnumValueNode; + ListValue: ListValueNode; + ObjectValue: ObjectValueNode; + ObjectField: ObjectFieldNode; + Directive: DirectiveNode; + NamedType: NamedTypeNode; + ListType: ListTypeNode; + NonNullType: NonNullTypeNode; + SchemaDefinition: SchemaDefinitionNode; + OperationTypeDefinition: OperationTypeDefinitionNode; + ScalarTypeDefinition: ScalarTypeDefinitionNode; + ObjectTypeDefinition: ObjectTypeDefinitionNode; + FieldDefinition: FieldDefinitionNode; + InputValueDefinition: InputValueDefinitionNode; + InterfaceTypeDefinition: InterfaceTypeDefinitionNode; + UnionTypeDefinition: UnionTypeDefinitionNode; + EnumTypeDefinition: EnumTypeDefinitionNode; + EnumValueDefinition: EnumValueDefinitionNode; + InputObjectTypeDefinition: InputObjectTypeDefinitionNode; + ScalarTypeExtension: ScalarTypeExtensionNode; + ObjectTypeExtension: ObjectTypeExtensionNode; + InterfaceTypeExtension: InterfaceTypeExtensionNode; + UnionTypeExtension: UnionTypeExtensionNode; + EnumTypeExtension: EnumTypeExtensionNode; + InputObjectTypeExtension: InputObjectTypeExtensionNode; + DirectiveDefinition: DirectiveDefinitionNode; } // Name export interface NameNode { - kind: 'Name'; - loc?: Location; - value: string; + readonly kind: "Name"; + readonly loc?: Location; + readonly value: string; } // Document export interface DocumentNode { - kind: 'Document'; - loc?: Location; - definitions: DefinitionNode[]; + readonly kind: "Document"; + readonly loc?: Location; + readonly definitions: ReadonlyArray; } -export type DefinitionNode = - | ExecutableDefinitionNode - | TypeSystemDefinitionNode; // experimental non-spec addition. +export type DefinitionNode = ExecutableDefinitionNode | TypeSystemDefinitionNode; // experimental non-spec addition. -export type ExecutableDefinitionNode = - | OperationDefinitionNode - | FragmentDefinitionNode; +export type ExecutableDefinitionNode = OperationDefinitionNode | FragmentDefinitionNode; export interface OperationDefinitionNode { - kind: 'OperationDefinition'; - loc?: Location; - operation: OperationTypeNode; - name?: NameNode; - variableDefinitions?: VariableDefinitionNode[]; - directives?: DirectiveNode[]; - selectionSet: SelectionSetNode; + readonly kind: "OperationDefinition"; + readonly loc?: Location; + readonly operation: OperationTypeNode; + readonly name?: NameNode; + readonly variableDefinitions?: ReadonlyArray; + readonly directives?: ReadonlyArray; + readonly selectionSet: SelectionSetNode; } -// Note: subscription is an experimental non-spec addition. -export type OperationTypeNode = 'query' | 'mutation' | 'subscription'; +export type OperationTypeNode = "query" | "mutation" | "subscription"; export interface VariableDefinitionNode { - kind: 'VariableDefinition'; - loc?: Location; - variable: VariableNode; - type: TypeNode; - defaultValue?: ValueNode; + readonly kind: "VariableDefinition"; + readonly loc?: Location; + readonly variable: VariableNode; + readonly type: TypeNode; + readonly defaultValue?: ValueNode; } export interface VariableNode { - kind: 'Variable'; - loc?: Location; - name: NameNode; + readonly kind: "Variable"; + readonly loc?: Location; + readonly name: NameNode; } export interface SelectionSetNode { - kind: 'SelectionSet'; - loc?: Location; - selections: SelectionNode[]; + kind: "SelectionSet"; + loc?: Location; + selections: ReadonlyArray; } export type SelectionNode = FieldNode | FragmentSpreadNode | InlineFragmentNode; export interface FieldNode { - kind: 'Field'; - loc?: Location; - alias?: NameNode; - name: NameNode; - arguments?: ArgumentNode[]; - directives?: DirectiveNode[]; - selectionSet?: SelectionSetNode; + readonly kind: "Field"; + readonly loc?: Location; + readonly alias?: NameNode; + readonly name: NameNode; + readonly arguments?: ReadonlyArray; + readonly directives?: ReadonlyArray; + readonly selectionSet?: SelectionSetNode; } export interface ArgumentNode { - kind: 'Argument'; - loc?: Location; - name: NameNode; - value: ValueNode; + readonly kind: "Argument"; + readonly loc?: Location; + readonly name: NameNode; + readonly value: ValueNode; } // Fragments export interface FragmentSpreadNode { - kind: 'FragmentSpread'; - loc?: Location; - name: NameNode; - directives?: DirectiveNode[]; + readonly kind: "FragmentSpread"; + readonly loc?: Location; + readonly name: NameNode; + readonly directives?: ReadonlyArray; } export interface InlineFragmentNode { - kind: 'InlineFragment'; - loc?: Location; - typeCondition?: NamedTypeNode; - directives?: DirectiveNode[]; - selectionSet: SelectionSetNode; + readonly kind: "InlineFragment"; + readonly loc?: Location; + readonly typeCondition?: NamedTypeNode; + readonly directives?: ReadonlyArray; + readonly selectionSet: SelectionSetNode; } export interface FragmentDefinitionNode { - kind: 'FragmentDefinition'; - loc?: Location; - name: NameNode; - // Note: fragment variable definitions are experimental and may be changed - // or removed in the future. - variableDefinitions?: VariableDefinitionNode[]; - typeCondition: NamedTypeNode; - directives?: DirectiveNode[]; - selectionSet: SelectionSetNode; + readonly kind: "FragmentDefinition"; + readonly loc?: Location; + readonly name: NameNode; + // Note: fragment variable definitions are experimental and may be changed + // or removed in the future. + readonly variableDefinitions?: ReadonlyArray; + readonly typeCondition: NamedTypeNode; + readonly directives?: ReadonlyArray; + readonly selectionSet: SelectionSetNode; } // Values export type ValueNode = - | VariableNode - | IntValueNode - | FloatValueNode - | StringValueNode - | BooleanValueNode - | NullValueNode - | EnumValueNode - | ListValueNode - | ObjectValueNode; + | VariableNode + | IntValueNode + | FloatValueNode + | StringValueNode + | BooleanValueNode + | NullValueNode + | EnumValueNode + | ListValueNode + | ObjectValueNode; export interface IntValueNode { - kind: 'IntValue'; - loc?: Location; - value: string; + readonly kind: "IntValue"; + readonly loc?: Location; + readonly value: string; } export interface FloatValueNode { - kind: 'FloatValue'; - loc?: Location; - value: string; + readonly kind: "FloatValue"; + readonly loc?: Location; + readonly value: string; } export interface StringValueNode { - kind: 'StringValue'; - loc?: Location; - value: string; + readonly kind: "StringValue"; + readonly loc?: Location; + readonly value: string; + readonly block?: boolean; } export interface BooleanValueNode { - kind: 'BooleanValue'; - loc?: Location; - value: boolean; + readonly kind: "BooleanValue"; + readonly loc?: Location; + readonly value: boolean; } export interface NullValueNode { - kind: 'NullValue'; - loc?: Location; + readonly kind: "NullValue"; + readonly loc?: Location; } export interface EnumValueNode { - kind: 'EnumValue'; - loc?: Location; - value: string; + readonly kind: "EnumValue"; + readonly loc?: Location; + readonly value: string; } export interface ListValueNode { - kind: 'ListValue'; - loc?: Location; - values: ValueNode[]; + readonly kind: "ListValue"; + readonly loc?: Location; + readonly values: ReadonlyArray; } export interface ObjectValueNode { - kind: 'ObjectValue'; - loc?: Location; - fields: ObjectFieldNode[]; + readonly kind: "ObjectValue"; + readonly loc?: Location; + readonly fields: ReadonlyArray; } export interface ObjectFieldNode { - kind: 'ObjectField'; - loc?: Location; - name: NameNode; - value: ValueNode; + readonly kind: "ObjectField"; + readonly loc?: Location; + readonly name: NameNode; + readonly value: ValueNode; } // Directives export interface DirectiveNode { - kind: 'Directive'; - loc?: Location; - name: NameNode; - arguments?: ArgumentNode[]; + readonly kind: "Directive"; + readonly loc?: Location; + readonly name: NameNode; + readonly arguments?: ReadonlyArray; } // Type Reference @@ -384,198 +353,202 @@ export interface DirectiveNode { export type TypeNode = NamedTypeNode | ListTypeNode | NonNullTypeNode; export interface NamedTypeNode { - kind: 'NamedType'; - loc?: Location; - name: NameNode; + readonly kind: "NamedType"; + readonly loc?: Location; + readonly name: NameNode; } export interface ListTypeNode { - kind: 'ListType'; - loc?: Location; - type: TypeNode; + readonly kind: "ListType"; + readonly loc?: Location; + readonly type: TypeNode; } export interface NonNullTypeNode { - kind: 'NonNullType'; - loc?: Location; - type: NamedTypeNode | ListTypeNode; + readonly kind: "NonNullType"; + readonly loc?: Location; + readonly type: NamedTypeNode | ListTypeNode; } // Type System Definition export type TypeSystemDefinitionNode = - | SchemaDefinitionNode - | TypeDefinitionNode - | TypeExtensionNode - | DirectiveDefinitionNode; + | SchemaDefinitionNode + | TypeDefinitionNode + | TypeExtensionNode + | DirectiveDefinitionNode; export interface SchemaDefinitionNode { - kind: 'SchemaDefinition'; - loc?: Location; - directives: DirectiveNode[]; - operationTypes: OperationTypeDefinitionNode[]; + readonly kind: "SchemaDefinition"; + readonly loc?: Location; + readonly directives: ReadonlyArray; + readonly operationTypes: ReadonlyArray; } export interface OperationTypeDefinitionNode { - kind: 'OperationTypeDefinition'; - loc?: Location; - operation: OperationTypeNode; - type: NamedTypeNode; + readonly kind: "OperationTypeDefinition"; + readonly loc?: Location; + readonly operation: OperationTypeNode; + readonly type: NamedTypeNode; } +// Type Definition + export type TypeDefinitionNode = - | ScalarTypeDefinitionNode - | ObjectTypeDefinitionNode - | InterfaceTypeDefinitionNode - | UnionTypeDefinitionNode - | EnumTypeDefinitionNode - | InputObjectTypeDefinitionNode; + | ScalarTypeDefinitionNode + | ObjectTypeDefinitionNode + | InterfaceTypeDefinitionNode + | UnionTypeDefinitionNode + | EnumTypeDefinitionNode + | InputObjectTypeDefinitionNode; export interface ScalarTypeDefinitionNode { - kind: 'ScalarTypeDefinition'; - loc?: Location; - description?: StringValueNode; - name: NameNode; - directives?: DirectiveNode[]; + readonly kind: "ScalarTypeDefinition"; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly directives?: ReadonlyArray; } export interface ObjectTypeDefinitionNode { - kind: 'ObjectTypeDefinition'; - loc?: Location; - description?: StringValueNode; - name: NameNode; - interfaces?: NamedTypeNode[]; - directives?: DirectiveNode[]; - fields: FieldDefinitionNode[]; + readonly kind: "ObjectTypeDefinition"; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly interfaces?: ReadonlyArray; + readonly directives?: ReadonlyArray; + readonly fields?: ReadonlyArray; } export interface FieldDefinitionNode { - kind: 'FieldDefinition'; - loc?: Location; - description?: StringValueNode; - name: NameNode; - arguments: InputValueDefinitionNode[]; - type: TypeNode; - directives?: DirectiveNode[]; + readonly kind: "FieldDefinition"; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly arguments?: ReadonlyArray; + readonly type: TypeNode; + readonly directives?: ReadonlyArray; } export interface InputValueDefinitionNode { - kind: 'InputValueDefinition'; - loc?: Location; - description?: StringValueNode; - name: NameNode; - type: TypeNode; - defaultValue?: ValueNode; - directives?: DirectiveNode[]; + readonly kind: "InputValueDefinition"; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly type: TypeNode; + readonly defaultValue?: ValueNode; + readonly directives?: ReadonlyArray; } export interface InterfaceTypeDefinitionNode { - kind: 'InterfaceTypeDefinition'; - loc?: Location; - description?: StringValueNode; - name: NameNode; - directives?: DirectiveNode[]; - fields: FieldDefinitionNode[]; + readonly kind: "InterfaceTypeDefinition"; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly directives?: ReadonlyArray; + readonly fields?: ReadonlyArray; } export interface UnionTypeDefinitionNode { - kind: 'UnionTypeDefinition'; - loc?: Location; - description?: StringValueNode; - name: NameNode; - directives?: DirectiveNode[]; - types: NamedTypeNode[]; + readonly kind: "UnionTypeDefinition"; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly directives?: ReadonlyArray; + readonly types?: ReadonlyArray; } export interface EnumTypeDefinitionNode { - kind: 'EnumTypeDefinition'; - loc?: Location; - description?: StringValueNode; - name: NameNode; - directives?: DirectiveNode[]; - values: EnumValueDefinitionNode[]; + readonly kind: "EnumTypeDefinition"; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly directives?: ReadonlyArray; + readonly values?: ReadonlyArray; } export interface EnumValueDefinitionNode { - kind: 'EnumValueDefinition'; - loc?: Location; - description?: StringValueNode; - name: NameNode; - directives?: DirectiveNode[]; + readonly kind: "EnumValueDefinition"; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly directives?: ReadonlyArray; } export interface InputObjectTypeDefinitionNode { - kind: 'InputObjectTypeDefinition'; - loc?: Location; - description?: StringValueNode; - name: NameNode; - directives?: DirectiveNode[]; - fields: InputValueDefinitionNode[]; + readonly kind: "InputObjectTypeDefinition"; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly directives?: ReadonlyArray; + readonly fields?: ReadonlyArray; } +// Type Extensions + export type TypeExtensionNode = - | ScalarTypeExtensionNode - | ObjectTypeExtensionNode - | InterfaceTypeExtensionNode - | UnionTypeExtensionNode - | EnumTypeExtensionNode - | InputObjectTypeExtensionNode; + | ScalarTypeExtensionNode + | ObjectTypeExtensionNode + | InterfaceTypeExtensionNode + | UnionTypeExtensionNode + | EnumTypeExtensionNode + | InputObjectTypeExtensionNode; -export type ScalarTypeExtensionNode = { - kind: 'ScalarTypeExtension'; - loc?: Location; - name: NameNode; - directives?: DirectiveNode[]; -}; +export interface ScalarTypeExtensionNode { + readonly kind: "ScalarTypeExtension"; + readonly loc?: Location; + readonly name: NameNode; + readonly directives?: ReadonlyArray; +} -export type ObjectTypeExtensionNode = { - kind: 'ObjectTypeExtension'; - loc?: Location; - name: NameNode; - interfaces?: NamedTypeNode[]; - directives?: DirectiveNode[]; - fields?: FieldDefinitionNode[]; -}; +export interface ObjectTypeExtensionNode { + readonly kind: "ObjectTypeExtension"; + readonly loc?: Location; + readonly name: NameNode; + readonly interfaces?: ReadonlyArray; + readonly directives?: ReadonlyArray; + readonly fields?: ReadonlyArray; +} -export type InterfaceTypeExtensionNode = { - kind: 'InterfaceTypeExtension'; - loc?: Location; - name: NameNode; - directives?: DirectiveNode[]; - fields?: FieldDefinitionNode[]; -}; +export interface InterfaceTypeExtensionNode { + readonly kind: "InterfaceTypeExtension"; + readonly loc?: Location; + readonly name: NameNode; + readonly directives?: ReadonlyArray; + readonly fields?: ReadonlyArray; +} -export type UnionTypeExtensionNode = { - kind: 'UnionTypeExtension'; - loc?: Location; - name: NameNode; - directives?: DirectiveNode[]; - types?: NamedTypeNode[]; -}; +export interface UnionTypeExtensionNode { + readonly kind: "UnionTypeExtension"; + readonly loc?: Location; + readonly name: NameNode; + readonly directives?: ReadonlyArray; + readonly types?: ReadonlyArray; +} -export type EnumTypeExtensionNode = { - kind: 'EnumTypeExtension'; - loc?: Location; - name: NameNode; - directives?: DirectiveNode[]; - values?: EnumValueDefinitionNode[]; -}; +export interface EnumTypeExtensionNode { + readonly kind: "EnumTypeExtension"; + readonly loc?: Location; + readonly name: NameNode; + readonly directives?: ReadonlyArray; + readonly values?: ReadonlyArray; +} -export type InputObjectTypeExtensionNode = { - kind: 'InputObjectTypeExtension'; - loc?: Location; - name: NameNode; - directives?: DirectiveNode[]; - fields?: InputValueDefinitionNode[]; -}; +export interface InputObjectTypeExtensionNode { + readonly kind: "InputObjectTypeExtension"; + readonly loc?: Location; + readonly name: NameNode; + readonly directives?: ReadonlyArray; + readonly fields?: ReadonlyArray; +} // Directive Definitions export interface DirectiveDefinitionNode { - kind: 'DirectiveDefinition'; - loc?: Location; - description?: StringValueNode; - name: NameNode; - arguments?: InputValueDefinitionNode[]; - locations: NameNode[]; + readonly kind: "DirectiveDefinition"; + readonly loc?: Location; + readonly description?: StringValueNode; + readonly name: NameNode; + readonly arguments?: ReadonlyArray; + readonly locations: ReadonlyArray; } diff --git a/types/graphql/language/blockStringValue.d.ts b/types/graphql/language/blockStringValue.d.ts new file mode 100644 index 0000000000..64fb87dafd --- /dev/null +++ b/types/graphql/language/blockStringValue.d.ts @@ -0,0 +1,7 @@ +/** + * Produces the value of a block string from its parsed raw value, similar to + * Coffeescript's block string, Python's docstring trim or Ruby's strip_heredoc. + * + * This implements the GraphQL spec's BlockStringValue() static algorithm. + */ +export default function blockStringValue(rawString: string): string; diff --git a/types/graphql/language/directiveLocation.d.ts b/types/graphql/language/directiveLocation.d.ts new file mode 100644 index 0000000000..16c42d7877 --- /dev/null +++ b/types/graphql/language/directiveLocation.d.ts @@ -0,0 +1,34 @@ +/** + * The set of allowed directive location values. + */ +export const DirectiveLocation: _DirectiveLocation; + +// @internal +type _DirectiveLocation = { + // Request Definitions + QUERY: "QUERY"; + MUTATION: "MUTATION"; + SUBSCRIPTION: "SUBSCRIPTION"; + FIELD: "FIELD"; + FRAGMENT_DEFINITION: "FRAGMENT_DEFINITION"; + FRAGMENT_SPREAD: "FRAGMENT_SPREAD"; + INLINE_FRAGMENT: "INLINE_FRAGMENT"; + + // Type System 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"; +}; + +/** + * The enum type representing the directive location values. + */ +export type DirectiveLocationEnum = _DirectiveLocation[keyof _DirectiveLocation]; diff --git a/types/graphql/language/index.d.ts b/types/graphql/language/index.d.ts index c8fe4b13ec..e36dcbbb91 100644 --- a/types/graphql/language/index.d.ts +++ b/types/graphql/language/index.d.ts @@ -1,15 +1,74 @@ -export * from './ast'; -export { getLocation } from './location'; -import * as Kind from './kinds'; -export { Kind }; -export { createLexer, TokenKind, Lexer } from './lexer'; -export { parse, parseValue, parseType, ParseOptions } from './parser'; -export { print } from './printer'; -export { Source } from './source'; +export { getLocation, SourceLocation } from "./location"; +export { Kind, KindEnum } from "./kinds"; +export { createLexer, TokenKind, Lexer, TokenKindEnum } from "./lexer"; +export { parse, parseValue, parseType, ParseOptions } from "./parser"; +export { print } from "./printer"; +export { Source } from "./source"; export { - visit, - visitInParallel, - visitWithTypeInfo, - getVisitFn, - BREAK, -} from './visitor'; + visit, + visitInParallel, + visitWithTypeInfo, + getVisitFn, + BREAK, + // type + ASTVisitor, + Visitor, + VisitFn, + VisitorKeyMap, +} from "./visitor"; + +export { + Location, + Token, + ASTNode, + ASTKindToNode, + // Each kind of AST node + NameNode, + DocumentNode, + DefinitionNode, + ExecutableDefinitionNode, + OperationDefinitionNode, + OperationTypeNode, + VariableDefinitionNode, + VariableNode, + SelectionSetNode, + SelectionNode, + FieldNode, + ArgumentNode, + FragmentSpreadNode, + InlineFragmentNode, + FragmentDefinitionNode, + ValueNode, + IntValueNode, + FloatValueNode, + StringValueNode, + BooleanValueNode, + NullValueNode, + EnumValueNode, + ListValueNode, + ObjectValueNode, + ObjectFieldNode, + DirectiveNode, + TypeNode, + NamedTypeNode, + ListTypeNode, + NonNullTypeNode, + TypeSystemDefinitionNode, + SchemaDefinitionNode, + OperationTypeDefinitionNode, + TypeDefinitionNode, + ScalarTypeDefinitionNode, + ObjectTypeDefinitionNode, + FieldDefinitionNode, + InputValueDefinitionNode, + InterfaceTypeDefinitionNode, + UnionTypeDefinitionNode, + EnumTypeDefinitionNode, + EnumValueDefinitionNode, + InputObjectTypeDefinitionNode, + TypeExtensionNode, + ObjectTypeExtensionNode, + DirectiveDefinitionNode, +} from "./ast"; + +export { DirectiveLocation, DirectiveLocationEnum } from "./directiveLocation"; diff --git a/types/graphql/language/kinds.d.ts b/types/graphql/language/kinds.d.ts index f92826f891..768f00addd 100644 --- a/types/graphql/language/kinds.d.ts +++ b/types/graphql/language/kinds.d.ts @@ -1,72 +1,74 @@ -// Name +/** + * The set of allowed kind values for AST nodes. + */ +export const Kind: _Kind; -export const NAME: 'Name'; +// @internal +type _Kind = { + // Name + NAME: "Name"; -// Document + // Document + DOCUMENT: "Document"; + OPERATION_DEFINITION: "OperationDefinition"; + VARIABLE_DEFINITION: "VariableDefinition"; + VARIABLE: "Variable"; + SELECTION_SET: "SelectionSet"; + FIELD: "Field"; + ARGUMENT: "Argument"; -export const DOCUMENT: 'Document'; -export const OPERATION_DEFINITION: 'OperationDefinition'; -export const VARIABLE_DEFINITION: 'VariableDefinition'; -export const VARIABLE: 'Variable'; -export const SELECTION_SET: 'SelectionSet'; -export const FIELD: 'Field'; -export const ARGUMENT: 'Argument'; + // Fragments + FRAGMENT_SPREAD: "FragmentSpread"; + INLINE_FRAGMENT: "InlineFragment"; + FRAGMENT_DEFINITION: "FragmentDefinition"; -// Fragments + // Values + INT: "IntValue"; + FLOAT: "FloatValue"; + STRING: "StringValue"; + BOOLEAN: "BooleanValue"; + NULL: "NullValue"; + ENUM: "EnumValue"; + LIST: "ListValue"; + OBJECT: "ObjectValue"; + OBJECT_FIELD: "ObjectField"; -export const FRAGMENT_SPREAD: 'FragmentSpread'; -export const INLINE_FRAGMENT: 'InlineFragment'; -export const FRAGMENT_DEFINITION: 'FragmentDefinition'; + // Directives + DIRECTIVE: "Directive"; -// Values + // Types + NAMED_TYPE: "NamedType"; + LIST_TYPE: "ListType"; + NON_NULL_TYPE: "NonNullType"; -export const INT: 'IntValue'; -export const FLOAT: 'FloatValue'; -export const STRING: 'StringValue'; -export const BOOLEAN: 'BooleanValue'; -export const NULL: 'NullValue'; -export const ENUM: 'EnumValue'; -export const LIST: 'ListValue'; -export const OBJECT: 'ObjectValue'; -export const OBJECT_FIELD: 'ObjectField'; + // Type System Definitions + SCHEMA_DEFINITION: "SchemaDefinition"; + OPERATION_TYPE_DEFINITION: "OperationTypeDefinition"; -// Directives + // Type Definitions + SCALAR_TYPE_DEFINITION: "ScalarTypeDefinition"; + OBJECT_TYPE_DEFINITION: "ObjectTypeDefinition"; + FIELD_DEFINITION: "FieldDefinition"; + INPUT_VALUE_DEFINITION: "InputValueDefinition"; + INTERFACE_TYPE_DEFINITION: "InterfaceTypeDefinition"; + UNION_TYPE_DEFINITION: "UnionTypeDefinition"; + ENUM_TYPE_DEFINITION: "EnumTypeDefinition"; + ENUM_VALUE_DEFINITION: "EnumValueDefinition"; + INPUT_OBJECT_TYPE_DEFINITION: "InputObjectTypeDefinition"; -export const DIRECTIVE: 'Directive'; + // Type Extensions + SCALAR_TYPE_EXTENSION: "ScalarTypeExtension"; + OBJECT_TYPE_EXTENSION: "ObjectTypeExtension"; + INTERFACE_TYPE_EXTENSION: "InterfaceTypeExtension"; + UNION_TYPE_EXTENSION: "UnionTypeExtension"; + ENUM_TYPE_EXTENSION: "EnumTypeExtension"; + INPUT_OBJECT_TYPE_EXTENSION: "InputObjectTypeExtension"; -// Types + // Directive Definitions + DIRECTIVE_DEFINITION: "DirectiveDefinition"; +}; -export const NAMED_TYPE: 'NamedType'; -export const LIST_TYPE: 'ListType'; -export const NON_NULL_TYPE: 'NonNullType'; - -// Type System Definitions - -export const SCHEMA_DEFINITION: 'SchemaDefinition'; -export const OPERATION_TYPE_DEFINITION: 'OperationTypeDefinition'; - -// Type Definitions - -export const SCALAR_TYPE_DEFINITION: 'ScalarTypeDefinition'; -export const OBJECT_TYPE_DEFINITION: 'ObjectTypeDefinition'; -export const FIELD_DEFINITION: 'FieldDefinition'; -export const INPUT_VALUE_DEFINITION: 'InputValueDefinition'; -export const INTERFACE_TYPE_DEFINITION: 'InterfaceTypeDefinition'; -export const UNION_TYPE_DEFINITION: 'UnionTypeDefinition'; -export const ENUM_TYPE_DEFINITION: 'EnumTypeDefinition'; -export const ENUM_VALUE_DEFINITION: 'EnumValueDefinition'; -export const INPUT_OBJECT_TYPE_DEFINITION: 'InputObjectTypeDefinition'; - -// Type Extensions - -export const TYPE_EXTENSION_DEFINITION: 'TypeExtensionDefinition'; -export const SCALAR_TYPE_EXTENSION: 'ScalarTypeExtension'; -export const OBJECT_TYPE_EXTENSION: 'ObjectTypeExtension'; -export const INTERFACE_TYPE_EXTENSION: 'InterfaceTypeExtension'; -export const UNION_TYPE_EXTENSION: 'UnionTypeExtension'; -export const ENUM_TYPE_EXTENSION: 'EnumTypeExtension'; -export const INPUT_OBJECT_TYPE_EXTENSION: 'InputObjectTypeExtension'; - -// Directive Definitions - -export const DIRECTIVE_DEFINITION: 'DirectiveDefinition'; +/** + * The enum type representing the possible kind values of AST nodes. + */ +export type KindEnum = _Kind[keyof _Kind]; diff --git a/types/graphql/language/lexer.d.ts b/types/graphql/language/lexer.d.ts index 0db85434e2..19a57d3a11 100644 --- a/types/graphql/language/lexer.d.ts +++ b/types/graphql/language/lexer.d.ts @@ -1,6 +1,6 @@ -import { Token } from './ast'; -import { Source } from './source'; -import { syntaxError } from '../error'; +import { Token } from "./ast"; +import { Source } from "./source"; +import { syntaxError } from "../error"; /** * Given a Source object, this returns a Lexer for that source. @@ -10,71 +10,84 @@ import { syntaxError } from '../error'; * EOF, after which the lexer will repeatedly return the same EOF token * whenever called. */ -export function createLexer( - source: Source, - options: TOptions, -): Lexer; +export function createLexer(source: Source, options: TOptions): Lexer; /** * The return type of createLexer. */ export interface Lexer { - source: Source; - options: TOptions; + source: Source; + options: TOptions; - /** - * The previously focused non-ignored token. - */ - lastToken: Token; + /** + * The previously focused non-ignored token. + */ + lastToken: Token; - /** - * The currently focused non-ignored token. - */ - token: Token; + /** + * The currently focused non-ignored token. + */ + token: Token; - /** - * The (1-indexed) line containing the current token. - */ - line: number; + /** + * The (1-indexed) line containing the current token. + */ + line: number; - /** - * The character offset at which the current line begins. - */ - lineStart: number; + /** + * The character offset at which the current line begins. + */ + lineStart: number; - /** - * Advances the token stream to the next non-ignored token. - */ - advance(): Token; + /** + * Advances the token stream to the next non-ignored token. + */ + advance(): Token; + + /** + * Looks ahead and returns the next non-ignored token, but does not change + * the Lexer's state. + */ + lookahead(): Token; } /** * An exported enum describing the different kinds of tokens that the * lexer emits. */ -export 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'; +export const TokenKind: _TokenKind; + +// @internal +type _TokenKind = { + SOF: ""; + EOF: ""; + BANG: "!"; + DOLLAR: "$"; + AMP: "&"; + 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"; + BLOCK_STRING: "BlockString"; + COMMENT: "Comment"; }; +/** + * The enum type representing the token kinds values. + */ +export type TokenKindEnum = _TokenKind[keyof _TokenKind]; + /** * A helper function to describe a token as a string for debugging */ diff --git a/types/graphql/language/location.d.ts b/types/graphql/language/location.d.ts index cb9744e0d5..6090531718 100644 --- a/types/graphql/language/location.d.ts +++ b/types/graphql/language/location.d.ts @@ -1,8 +1,15 @@ -import { Source } from './source'; +import { Source } from "./source"; +/** + * Represents a location in a Source. + */ export interface SourceLocation { - line: number; - column: number; + readonly line: number; + readonly column: number; } +/** + * Takes a Source and a UTF-8 character offset, and returns the corresponding + * line and column as a SourceLocation. + */ export function getLocation(source: Source, position: number): SourceLocation; diff --git a/types/graphql/language/parser.d.ts b/types/graphql/language/parser.d.ts index ffafaae7fb..b07db1ff38 100644 --- a/types/graphql/language/parser.d.ts +++ b/types/graphql/language/parser.d.ts @@ -1,66 +1,62 @@ -import { NamedTypeNode, TypeNode, ValueNode, DocumentNode } from './ast'; -import { Source } from './source'; -import { Lexer } from './lexer'; +import { NamedTypeNode, TypeNode, ValueNode, DocumentNode } from "./ast"; +import { Source } from "./source"; +import { Lexer } from "./lexer"; /** * Configuration options to control parser behavior */ export interface 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; - /** - * 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, + /** + * If enabled, the parser will parse empty fields sets in the Schema + * Definition Language. Otherwise, the parser will follow the current + * specification. + * + * This option is provided to ease adoption of the final SDL specification + * and will be removed in a future major release. + */ + allowLegacySDLEmptyFields?: boolean; - /** - * If enabled, the parser will parse empty fields sets in the Schema - * Definition Language. Otherwise, the parser will follow the current - * specification. - * - * This option is provided to ease adoption of the final SDL specification - * and will be removed in a future major release. - */ - allowLegacySDLEmptyFields?: boolean, + /** + * If enabled, the parser will parse implemented interfaces with no `&` + * character between each interface. Otherwise, the parser will follow the + * current specification. + * + * This option is provided to ease adoption of the final SDL specification + * and will be removed in a future major release. + */ + allowLegacySDLImplementsInterfaces?: boolean; - /** - * If enabled, the parser will parse implemented interfaces with no `&` - * character between each interface. Otherwise, the parser will follow the - * current specification. - * - * This option is provided to ease adoption of the final SDL specification - * and will be removed in a future major release. - */ - allowLegacySDLImplementsInterfaces?: boolean, - - /** - * EXPERIMENTAL: - * - * If enabled, the parser will understand and parse variable definitions - * contained in a fragment definition. They'll be represented in the - * `variableDefinitions` field of the FragmentDefinitionNode. - * - * The syntax is identical to normal, query-defined variables. For example: - * - * fragment A($var: Boolean = false) on T { - * ... - * } - * - * Note: this feature is experimental and may change or be removed in the - * future. - */ - experimentalFragmentVariables?: boolean, + /** + * EXPERIMENTAL: + * + * If enabled, the parser will understand and parse variable definitions + * contained in a fragment definition. They'll be represented in the + * `variableDefinitions` field of the FragmentDefinitionNode. + * + * The syntax is identical to normal, query-defined variables. For example: + * + * fragment A($var: Boolean = false) on T { + * ... + * } + * + * Note: this feature is experimental and may change or be removed in the + * future. + */ + experimentalFragmentVariables?: boolean; } /** * Given a GraphQL source, parses it into a Document. * Throws GraphQLError if a syntax error is encountered. */ -export function parse( - source: string | Source, - options?: ParseOptions, -): DocumentNode; +export function parse(source: string | Source, options?: ParseOptions): DocumentNode; /** * Given a string containing a GraphQL value, parse the AST for that value. @@ -69,10 +65,7 @@ export function parse( * This is useful within tools that operate upon GraphQL Values directly and * in isolation of complete GraphQL documents. */ -export function parseValue( - source: Source | string, - options?: ParseOptions, -): ValueNode; +export function parseValue(source: string | Source, options?: ParseOptions): ValueNode; /** * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for @@ -84,10 +77,7 @@ export function parseValue( * * Consider providing the results to the utility function: typeFromAST(). */ -export function parseType( - source: Source | string, - options?: ParseOptions, -): TypeNode; +export function parseType(source: string | Source, options?: ParseOptions): TypeNode; export function parseConstValue(lexer: Lexer): ValueNode; diff --git a/types/graphql/language/source.d.ts b/types/graphql/language/source.d.ts index 236028b7df..26d89640c3 100644 --- a/types/graphql/language/source.d.ts +++ b/types/graphql/language/source.d.ts @@ -1,5 +1,19 @@ +interface Location { + line: number; + column: number; +} + +/** + * A representation of source input to GraphQL. + * `name` and `locationOffset` are optional. They are useful for clients who + * store GraphQL documents in source files; for example, if the GraphQL input + * starts at line 40 in a file named Foo.graphql, it might be useful for name to + * be "Foo.graphql" and location to be `{ line: 40, column: 0 }`. + * line and column in locationOffset are 1-indexed + */ export class Source { - body: string; - name: string; - constructor(body: string, name?: string); + body: string; + name: string; + locationOffset: Location; + constructor(body: string, name?: string, locationOffset?: Location); } diff --git a/types/graphql/language/visitor.d.ts b/types/graphql/language/visitor.d.ts index e7e9d67da0..a137fa318e 100644 --- a/types/graphql/language/visitor.d.ts +++ b/types/graphql/language/visitor.d.ts @@ -1,55 +1,160 @@ -export const QueryDocumentKeys: { - Name: any[]; - Document: string[]; - OperationDefinition: string[]; - VariableDefinition: string[]; - Variable: string[]; - SelectionSet: string[]; - Field: string[]; - Argument: string[]; +import { ASTNode, ASTKindToNode } from "./ast"; +import { TypeInfo } from "../utilities/TypeInfo"; - FragmentSpread: string[]; - InlineFragment: string[]; - FragmentDefinition: string[]; +interface EnterLeave { + readonly enter?: T; + readonly leave?: T; +} - IntValue: number[]; - FloatValue: number[]; - StringValue: string[]; - BooleanValue: boolean[]; - NullValue: null[]; - EnumValue: any[]; - ListValue: string[]; - ObjectValue: string[]; - ObjectField: string[]; +type EnterLeaveVisitor = EnterLeave< + VisitFn | { [K in keyof KindToNode]?: VisitFn } +>; - 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[]; +type ShapeMapVisitor = { + [K in keyof KindToNode]?: VisitFn | EnterLeave> }; +export type ASTVisitor = Visitor; +export type Visitor = + | EnterLeaveVisitor + | ShapeMapVisitor; + +/** + * A visitor is comprised of visit functions, which are called on each node + * during the visitor's traversal. + */ +export type VisitFn = ( + // The current node being visiting. + node: TVisitedNode, + // The index or key to this node from the parent node or Array. + key: string | number | undefined, + // The parent immediately above this node, which may be an Array. + parent: TAnyNode | ReadonlyArray | undefined, + // The key path to get to this node from the root node. + path: ReadonlyArray, + // All nodes and Arrays visited before reaching this node. + // These correspond to array indices in `path`. + // Note: ancestors includes arrays which contain the visited node. + ancestors: ReadonlyArray> +) => any; + +/** + * A KeyMap describes each the traversable properties of each kind of node. + */ +export type VisitorKeyMap = { [P in keyof T]: ReadonlyArray }; + +export const QueryDocumentKeys: { [key: string]: string[] }; + export const BREAK: any; -export function visit(root: any, visitor: any, keyMap?: any): any; +/** + * visit() will walk through an AST using a depth first traversal, calling + * the visitor's enter function at each node in the traversal, and calling the + * leave function after visiting that node and all of its child nodes. + * + * By returning different values from the enter and leave functions, the + * behavior of the visitor can be altered, including skipping over a sub-tree of + * the AST (by returning false), editing the AST by returning a value or null + * to remove the value, or to stop the whole traversal by returning BREAK. + * + * When using visit() to edit an AST, the original AST will not be modified, and + * a new version of the AST with the changes applied will be returned from the + * visit function. + * + * const editedAST = visit(ast, { + * enter(node, key, parent, path, ancestors) { + * // @return + * // undefined: no action + * // false: skip visiting this node + * // visitor.BREAK: stop visiting altogether + * // null: delete this node + * // any value: replace this node with the returned value + * }, + * leave(node, key, parent, path, ancestors) { + * // @return + * // undefined: no action + * // false: no action + * // visitor.BREAK: stop visiting altogether + * // null: delete this node + * // any value: replace this node with the returned value + * } + * }); + * + * Alternatively to providing enter() and leave() functions, a visitor can + * instead provide functions named the same as the kinds of AST nodes, or + * enter/leave visitors at a named key, leading to four permutations of + * visitor API: + * + * 1) Named visitors triggered when entering a node a specific kind. + * + * visit(ast, { + * Kind(node) { + * // enter the "Kind" node + * } + * }) + * + * 2) Named visitors that trigger upon entering and leaving a node of + * a specific kind. + * + * visit(ast, { + * Kind: { + * enter(node) { + * // enter the "Kind" node + * } + * leave(node) { + * // leave the "Kind" node + * } + * } + * }) + * + * 3) Generic visitors that trigger upon entering and leaving any node. + * + * visit(ast, { + * enter(node) { + * // enter any node + * }, + * leave(node) { + * // leave any node + * } + * }) + * + * 4) Parallel visitors for entering and leaving nodes of a specific kind. + * + * visit(ast, { + * enter: { + * Kind(node) { + * // enter the "Kind" node + * } + * }, + * leave: { + * Kind(node) { + * // leave the "Kind" node + * } + * } + * }) + */ +export function visit( + root: ASTNode, + visitor: Visitor, + visitorKeys?: VisitorKeyMap // default: QueryDocumentKeys +): any; -export function visitInParallel(visitors: any): any; +/** + * Creates a new visitor instance which delegates to many visitors to run in + * parallel. Each visitor will be visited for each node before moving on. + * + * If a prior visitor edits a node, no following visitors will see that node. + */ +export function visitInParallel(visitors: Array>): Visitor; -export function visitWithTypeInfo(typeInfo: any, visitor: any): any; +/** + * Creates a new visitor instance which maintains a provided TypeInfo instance + * along with visiting visitor. + */ +export function visitWithTypeInfo(typeInfo: TypeInfo, visitor: Visitor): Visitor; /** * Given a visitor instance, if it is leaving or not, and a node kind, return * the function the visitor runtime should call. */ -export function getVisitFn(visitor: any, kind: any, isLeaving: any): any; +export function getVisitFn(visitor: Visitor, kind: string, isLeaving: boolean): VisitFn | void; diff --git a/types/graphql/subscription/index.d.ts b/types/graphql/subscription/index.d.ts index 11b0a7f26d..71583e7ff3 100644 --- a/types/graphql/subscription/index.d.ts +++ b/types/graphql/subscription/index.d.ts @@ -1 +1 @@ -export { subscribe, createSourceEventStream } from './subscribe'; +export { subscribe, createSourceEventStream } from "./subscribe"; diff --git a/types/graphql/subscription/subscribe.d.ts b/types/graphql/subscription/subscribe.d.ts index dc2c096b86..a9fe6b565e 100644 --- a/types/graphql/subscription/subscribe.d.ts +++ b/types/graphql/subscription/subscribe.d.ts @@ -1,29 +1,74 @@ -import { GraphQLSchema } from '../type/schema'; -import { DocumentNode } from '../language/ast'; -import { GraphQLFieldResolver } from '../type/definition'; -import { ExecutionResult } from '../execution/execute'; +import { GraphQLSchema } from "../type/schema"; +import { DocumentNode } from "../language/ast"; +import { GraphQLFieldResolver } from "../type/definition"; +import { ExecutionResult } from "../execution/execute"; + +/** + * Implements the "Subscribe" algorithm described in the GraphQL specification. + * + * Returns a Promise which resolves to either an AsyncIterator (if successful) + * or an ExecutionResult (client error). The promise will be rejected if a + * server error occurs. + * + * If the client-provided arguments to this function do not result in a + * compliant subscription, a GraphQL Response (ExecutionResult) with + * descriptive errors and no data will be returned. + * + * If the the source stream could not be created due to faulty subscription + * resolver logic or underlying systems, the promise will resolve to a single + * ExecutionResult containing `errors` and no `data`. + * + * If the operation succeeded, the promise resolves to an AsyncIterator, which + * yields a stream of ExecutionResults representing the response stream. + * + * Accepts either an object with named arguments, or individual arguments. + */ +export function subscribe(args: { + schema: GraphQLSchema; + document: DocumentNode; + rootValue?: any; + contextValue?: any; + variableValues?: { [key: string]: any } | void; + operationName?: string | void; + fieldResolver?: GraphQLFieldResolver | void; + subscribeFieldResolver?: GraphQLFieldResolver | void; +}): Promise | ExecutionResult>; export function subscribe( - schema: GraphQLSchema, - document: DocumentNode, - rootValue?: any, - contextValue?: any, - variableValues?: { - [key: string]: any; - }, - operationName?: string, - fieldResolver?: GraphQLFieldResolver, - subscribeFieldResolver?: GraphQLFieldResolver, + schema: GraphQLSchema, + document: DocumentNode, + rootValue?: any, + contextValue?: any, + variableValues?: { [key: string]: any } | void, + operationName?: string | void, + fieldResolver?: GraphQLFieldResolver | void, + subscribeFieldResolver?: GraphQLFieldResolver | void ): Promise | ExecutionResult>; +/** + * Implements the "CreateSourceEventStream" algorithm described in the + * GraphQL specification, resolving the subscription source event stream. + * + * Returns a Promise. + * + * If the client-provided invalid arguments, the source stream could not be + * created, or the resolver did not return an AsyncIterable, this function will + * will throw an error, which should be caught and handled by the caller. + * + * A Source Event Stream represents a sequence of events, each of which triggers + * a GraphQL execution for that event. + * + * This may be useful when hosting the stateful subscription service in a + * different process or machine than the stateless GraphQL execution engine, + * or otherwise separating these two steps. For more on this, see the + * "Supporting Subscriptions at Scale" information in the GraphQL specification. + */ export function createSourceEventStream( - schema: GraphQLSchema, - document: DocumentNode, - rootValue?: any, - contextValue?: any, - variableValues?: { - [key: string]: any; - }, - operationName?: string, - fieldResolver?: GraphQLFieldResolver, -): Promise>; + schema: GraphQLSchema, + document: DocumentNode, + rootValue?: any, + contextValue?: any, + variableValues?: { [key: string]: any }, + operationName?: string | void, + fieldResolver?: GraphQLFieldResolver | void +): Promise | ExecutionResult>; diff --git a/types/graphql/type/definition.d.ts b/types/graphql/type/definition.d.ts index 098f7376ef..ed87af50ad 100644 --- a/types/graphql/type/definition.d.ts +++ b/types/graphql/type/definition.d.ts @@ -1,52 +1,81 @@ +import { MaybePromise } from "../jsutils/MaybePromise"; import { - ScalarTypeDefinitionNode, - ObjectTypeDefinitionNode, - FieldDefinitionNode, - InputValueDefinitionNode, - InterfaceTypeDefinitionNode, - UnionTypeDefinitionNode, - EnumTypeDefinitionNode, - EnumValueDefinitionNode, - InputObjectTypeDefinitionNode, - TypeExtensionNode, - OperationDefinitionNode, - FieldNode, - FragmentDefinitionNode, - ValueNode, -} from '../language/ast'; -import { GraphQLSchema } from './schema'; + ScalarTypeDefinitionNode, + ObjectTypeDefinitionNode, + FieldDefinitionNode, + InputValueDefinitionNode, + InterfaceTypeDefinitionNode, + UnionTypeDefinitionNode, + EnumTypeDefinitionNode, + EnumValueDefinitionNode, + InputObjectTypeDefinitionNode, + ObjectTypeExtensionNode, + InterfaceTypeExtensionNode, + OperationDefinitionNode, + FieldNode, + FragmentDefinitionNode, + ValueNode, +} from "../language/ast"; +import { GraphQLSchema } from "./schema"; /** * These are all of the possible kinds of types. */ export type GraphQLType = - | GraphQLScalarType - | GraphQLObjectType - | GraphQLInterfaceType - | GraphQLUnionType - | GraphQLEnumType - | GraphQLInputObjectType - | GraphQLList - | GraphQLNonNull; + | GraphQLScalarType + | GraphQLObjectType + | GraphQLInterfaceType + | GraphQLUnionType + | GraphQLEnumType + | GraphQLInputObjectType + | GraphQLList + | GraphQLNonNull; export function isType(type: any): type is GraphQLType; export function assertType(type: any): GraphQLType; +export function isScalarType(type: GraphQLType): type is GraphQLScalarType; + +export function assertScalarType(type: GraphQLType): GraphQLScalarType; + +export function isObjectType(type: GraphQLType): type is GraphQLObjectType; + +export function assertObjectType(type: GraphQLType): GraphQLObjectType; + +export function isInterfaceType(type: GraphQLType): type is GraphQLInterfaceType; + +export function assertInterfaceType(type: GraphQLType): GraphQLInterfaceType; + +export function isUnionType(type: GraphQLType): type is GraphQLUnionType; + +export function assertUnionType(type: GraphQLType): GraphQLUnionType; + +export function isEnumType(type: GraphQLType): type is GraphQLEnumType; + +export function assertEnumType(type: GraphQLType): GraphQLEnumType; + +export function isInputObjectType(type: GraphQLType): type is GraphQLInputObjectType; + +export function assertInputObjectType(type: GraphQLType): GraphQLInputObjectType; + +export function isListType(type: GraphQLType): type is GraphQLList; + +export function assertListType(type: GraphQLType): GraphQLList; + +export function isNonNullType(type: GraphQLType): type is GraphQLNonNull; + +export function assertNonNullType(type: GraphQLType): GraphQLNonNull; + /** * These types may be used as input types for arguments and directives. */ export type GraphQLInputType = - | GraphQLScalarType - | GraphQLEnumType - | GraphQLInputObjectType - | GraphQLList - | GraphQLNonNull< - | GraphQLScalarType - | GraphQLEnumType - | GraphQLInputObjectType - | GraphQLList - >; + | GraphQLScalarType + | GraphQLEnumType + | GraphQLInputObjectType + | GraphQLList + | GraphQLNonNull>; export function isInputType(type: GraphQLType): type is GraphQLInputType; @@ -56,20 +85,20 @@ export function assertInputType(type: GraphQLType): GraphQLInputType; * These types may be used as output types as the result of fields. */ export type GraphQLOutputType = - | GraphQLScalarType - | GraphQLObjectType - | GraphQLInterfaceType - | GraphQLUnionType - | GraphQLEnumType - | GraphQLList - | GraphQLNonNull< - | GraphQLScalarType - | GraphQLObjectType - | GraphQLInterfaceType - | GraphQLUnionType - | GraphQLEnumType - | GraphQLList - >; + | GraphQLScalarType + | GraphQLObjectType + | GraphQLInterfaceType + | GraphQLUnionType + | GraphQLEnumType + | GraphQLList + | GraphQLNonNull< + | GraphQLScalarType + | GraphQLObjectType + | GraphQLInterfaceType + | GraphQLUnionType + | GraphQLEnumType + | GraphQLList + >; export function isOutputType(type: GraphQLType): type is GraphQLOutputType; @@ -87,14 +116,9 @@ export function assertLeafType(type: GraphQLType): GraphQLLeafType; /** * These types may describe the parent context of a selection set. */ -export type GraphQLCompositeType = - | GraphQLObjectType - | GraphQLInterfaceType - | GraphQLUnionType; +export type GraphQLCompositeType = GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType; -export function isCompositeType( - type: GraphQLType, -): type is GraphQLCompositeType; +export function isCompositeType(type: GraphQLType): type is GraphQLCompositeType; export function assertCompositeType(type: GraphQLType): GraphQLCompositeType; @@ -107,37 +131,102 @@ export function isAbstractType(type: GraphQLType): type is GraphQLAbstractType; export function assertAbstractType(type: GraphQLType): GraphQLAbstractType; +/** + * 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) }, + * }) + * }) + * + */ +export class GraphQLList { + readonly ofType: T; + constructor(type: T); + toString(): string; + toJSON(): string; + inspect(): 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. + */ +export class GraphQLNonNull { + readonly ofType: T; + constructor(type: T); + toString(): string; + toJSON(): string; + inspect(): string; +} + +export type GraphQLWrappingType = GraphQLList | GraphQLNonNull; + +export function isWrappingType(type: GraphQLType): type is GraphQLWrappingType; + +export function assertWrappingType(type: GraphQLType): GraphQLWrappingType; + /** * These types can all accept null as a value. */ export type GraphQLNullableType = - | GraphQLScalarType - | GraphQLObjectType - | GraphQLInterfaceType - | GraphQLUnionType - | GraphQLEnumType - | GraphQLInputObjectType - | GraphQLList; + | GraphQLScalarType + | GraphQLObjectType + | GraphQLInterfaceType + | GraphQLUnionType + | GraphQLEnumType + | GraphQLInputObjectType + | GraphQLList; -export function getNullableType( - type: T, -): T & GraphQLNullableType; +export function isNullableType(type: GraphQLType): type is GraphQLNullableType; + +export function assertNullableType(type: GraphQLType): GraphQLNullableType; + +export function getNullableType(type: void): undefined; +export function getNullableType(type: T): T; +export function getNullableType(type: GraphQLNonNull): T; /** * These named types do not include modifiers like List or NonNull. */ export type GraphQLNamedType = - | GraphQLScalarType - | GraphQLObjectType - | GraphQLInterfaceType - | GraphQLUnionType - | GraphQLEnumType - | GraphQLInputObjectType; + | GraphQLScalarType + | GraphQLObjectType + | GraphQLInterfaceType + | GraphQLUnionType + | GraphQLEnumType + | GraphQLInputObjectType; -export function isNamedType(type: GraphQLType): boolean; +export function isNamedType(type: GraphQLType): type is GraphQLNamedType; export function assertNamedType(type: GraphQLType): GraphQLNamedType; +export function getNamedType(type: void): undefined; export function getNamedType(type: GraphQLType): GraphQLNamedType; /** @@ -164,30 +253,32 @@ export type Thunk = (() => T) | T; * */ export class GraphQLScalarType { - name: string; - description: string; - astNode?: ScalarTypeDefinitionNode; - constructor(config: GraphQLScalarTypeConfig); + name: string; + description: string | void; + astNode?: ScalarTypeDefinitionNode | void; + constructor(config: GraphQLScalarTypeConfig); - // Serializes an internal value to include in a response. - serialize(value: any): any; + // 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 value to use as an input. + parseValue(value: any): any; - // Parses an externally provided literal value to use as an input. - parseLiteral(valueNode: ValueNode): any; + // Parses an externally provided literal value to use as an input. + parseLiteral(valueNode: ValueNode, variables?: { [key: string]: any } | void): any; - toString(): string; + toString(): string; + toJSON(): string; + inspect(): string; } export interface GraphQLScalarTypeConfig { - name: string; - description?: string; - astNode?: ScalarTypeDefinitionNode; - serialize(value: any): TExternal | null | undefined; - parseValue?(value: any): TInternal | null | undefined; - parseLiteral?(valueNode: ValueNode): TInternal | null | undefined; + name: string; + description?: string | void; + astNode?: ScalarTypeDefinitionNode | void; + serialize(value: any): TExternal | void; + parseValue?(value: any): TInternal | void; + parseLiteral?(valueNode: ValueNode, variables: { [key: string]: any } | void): TInternal | void; } /** @@ -228,124 +319,113 @@ export interface GraphQLScalarTypeConfig { * */ export class GraphQLObjectType { - name: string; - description: string; - astNode?: ObjectTypeDefinitionNode; - extensionASTNodes: Array; - isTypeOf: GraphQLIsTypeOfFn; + name: string; + description: string | void; + astNode: ObjectTypeDefinitionNode | void; + extensionASTNodes: ReadonlyArray | void; + isTypeOf: GraphQLIsTypeOfFn | void; - constructor(config: GraphQLObjectTypeConfig); - getFields(): GraphQLFieldMap; - getInterfaces(): GraphQLInterfaceType[]; - toString(): string; + constructor(config: GraphQLObjectTypeConfig); + getFields(): GraphQLFieldMap; + getInterfaces(): GraphQLInterfaceType[]; + toString(): string; + toJSON(): string; + inspect(): string; } export interface GraphQLObjectTypeConfig { - name: string; - interfaces?: Thunk; - fields: Thunk>; - isTypeOf?: GraphQLIsTypeOfFn; - description?: string; - astNode?: ObjectTypeDefinitionNode; - extensionASTNodes?: Array; + name: string; + interfaces?: Thunk; + fields: Thunk>; + isTypeOf?: GraphQLIsTypeOfFn | void; + description?: string | void; + astNode?: ObjectTypeDefinitionNode | void; + extensionASTNodes?: ReadonlyArray | void; } export type GraphQLTypeResolver = ( - value: TSource, - context: TContext, - info: GraphQLResolveInfo, -) => GraphQLObjectType | string | Promise; + value: TSource, + context: TContext, + info: GraphQLResolveInfo +) => MaybePromise; export type GraphQLIsTypeOfFn = ( - source: TSource, - context: TContext, - info: GraphQLResolveInfo, -) => boolean | Promise; + source: TSource, + context: TContext, + info: GraphQLResolveInfo +) => MaybePromise; -export type GraphQLFieldResolver< - TSource, - TContext, - TArgs = { [argName: string]: any } -> = ( - source: TSource, - args: TArgs, - context: TContext, - info: GraphQLResolveInfo, +export type GraphQLFieldResolver = ( + source: TSource, + args: TArgs, + context: TContext, + info: GraphQLResolveInfo ) => any; export interface GraphQLResolveInfo { - fieldName: string; - fieldNodes: FieldNode[]; - returnType: GraphQLOutputType; - parentType: GraphQLCompositeType; - path: ResponsePath; - schema: GraphQLSchema; - fragments: { [fragmentName: string]: FragmentDefinitionNode }; - rootValue: any; - operation: OperationDefinitionNode; - variableValues: { [variableName: string]: any }; + readonly fieldName: string; + readonly fieldNodes: ReadonlyArray; + readonly returnType: GraphQLOutputType; + readonly parentType: GraphQLObjectType; + readonly path: ResponsePath; + readonly schema: GraphQLSchema; + readonly fragments: { [key: string]: FragmentDefinitionNode }; + readonly rootValue: any; + readonly operation: OperationDefinitionNode; + readonly variableValues: { [variableName: string]: any }; } -export type ResponsePath = - | { prev: ResponsePath; key: string | number } - | undefined; +export type ResponsePath = { + readonly prev: ResponsePath | undefined; + readonly key: string | number; +}; -export interface GraphQLFieldConfig< - TSource, - TContext, - TArgs = { [argName: string]: any } -> { - type: GraphQLOutputType; - args?: GraphQLFieldConfigArgumentMap; - resolve?: GraphQLFieldResolver; - subscribe?: GraphQLFieldResolver; - deprecationReason?: string; - description?: string; - astNode?: FieldDefinitionNode; +export interface GraphQLFieldConfig { + type: GraphQLOutputType; + args?: GraphQLFieldConfigArgumentMap; + resolve?: GraphQLFieldResolver; + subscribe?: GraphQLFieldResolver; + deprecationReason?: string | void; + description?: string | void; + astNode?: FieldDefinitionNode | void; } -export interface GraphQLFieldConfigArgumentMap { - [argName: string]: GraphQLArgumentConfig; -} +export type GraphQLFieldConfigArgumentMap = { [key: string]: GraphQLArgumentConfig }; export interface GraphQLArgumentConfig { - type: GraphQLInputType; - defaultValue?: any; - description?: string; - astNode?: InputValueDefinitionNode; + type: GraphQLInputType; + defaultValue?: any; + description?: string | void; + astNode?: InputValueDefinitionNode | void; } -export interface GraphQLFieldConfigMap { - [fieldName: string]: GraphQLFieldConfig; -} +export type GraphQLFieldConfigMap = { + [key: string]: GraphQLFieldConfig; +}; -export interface GraphQLField< - TSource, - TContext, - TArgs = { [argName: string]: any } -> { - name: string; - description: string; - type: GraphQLOutputType; - args: GraphQLArgument[]; - resolve?: GraphQLFieldResolver; - subscribe?: GraphQLFieldResolver; - isDeprecated?: boolean; - deprecationReason?: string; - astNode?: FieldDefinitionNode; +export interface GraphQLField { + name: string; + description: string | void; + type: GraphQLOutputType; + args: GraphQLArgument[]; + resolve?: GraphQLFieldResolver; + subscribe?: GraphQLFieldResolver; + isDeprecated?: boolean; + deprecationReason?: string | void; + astNode?: FieldDefinitionNode | void; } export interface GraphQLArgument { - name: string; - type: GraphQLInputType; - defaultValue?: any; - description?: string; - astNode?: InputValueDefinitionNode; + name: string; + type: GraphQLInputType; + defaultValue?: any; + description?: string | void; + astNode?: InputValueDefinitionNode | void; } -export interface GraphQLFieldMap { - [fieldName: string]: GraphQLField; -} +export type GraphQLFieldMap = { + [key: string]: GraphQLField; +}; /** * Interface Type Definition @@ -366,29 +446,33 @@ export interface GraphQLFieldMap { * */ export class GraphQLInterfaceType { - name: string; - description: string; - astNode?: InterfaceTypeDefinitionNode; - resolveType: GraphQLTypeResolver; + name: string; + description: string | void; + astNode?: InterfaceTypeDefinitionNode | void; + extensionASTNodes: ReadonlyArray | void; + resolveType: GraphQLTypeResolver | void; - constructor(config: GraphQLInterfaceTypeConfig); + constructor(config: GraphQLInterfaceTypeConfig); - getFields(): GraphQLFieldMap; + getFields(): GraphQLFieldMap; - toString(): string; + toString(): string; + toJSON(): string; + inspect(): string; } export 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?: GraphQLTypeResolver; - description?: string; - astNode?: InterfaceTypeDefinitionNode; + 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?: GraphQLTypeResolver | void; + description?: string | void; + astNode?: InterfaceTypeDefinitionNode | void; + extensionASTNodes?: ReadonlyArray | void; } /** @@ -415,29 +499,31 @@ export interface GraphQLInterfaceTypeConfig { * */ export class GraphQLUnionType { - name: string; - description: string; - astNode?: UnionTypeDefinitionNode; - resolveType: GraphQLTypeResolver; + name: string; + description: string | void; + astNode?: UnionTypeDefinitionNode | void; + resolveType: GraphQLTypeResolver | void; - constructor(config: GraphQLUnionTypeConfig); + constructor(config: GraphQLUnionTypeConfig); - getTypes(): GraphQLObjectType[]; + getTypes(): GraphQLObjectType[]; - toString(): string; + toString(): string; + toJSON(): string; + inspect(): string; } export 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?: GraphQLTypeResolver; - description?: string; - astNode?: UnionTypeDefinitionNode; + 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?: GraphQLTypeResolver | void; + description?: string | void; + astNode?: UnionTypeDefinitionNode | void; } /** @@ -462,45 +548,44 @@ export interface GraphQLUnionTypeConfig { * will be used as its internal value. */ export class GraphQLEnumType { - name: string; - description: string; - astNode?: EnumTypeDefinitionNode; + name: string; + description: string | void; + astNode: EnumTypeDefinitionNode | void; - constructor(config: GraphQLEnumTypeConfig); - getValues(): GraphQLEnumValue[]; - getValue(name: string): GraphQLEnumValue; - isValidValue(value: any): boolean; - serialize(value: any): string; - parseValue(value: any): any; - parseLiteral(valueNode: ValueNode): any; - toString(): string; + constructor(config: GraphQLEnumTypeConfig); + getValues(): GraphQLEnumValue[]; + getValue(name: string): GraphQLEnumValue | void; + serialize(value: any): string | void; + parseValue(value: any): any; + parseLiteral(valueNode: ValueNode, _variables: { [key: string]: any } | void): any; + toString(): string; + toJSON(): string; + inspect(): string; } export interface GraphQLEnumTypeConfig { - name: string; - values: GraphQLEnumValueConfigMap; - description?: string; - astNode?: EnumTypeDefinitionNode; + name: string; + values: GraphQLEnumValueConfigMap; + description?: string | void; + astNode?: EnumTypeDefinitionNode | void; } -export interface GraphQLEnumValueConfigMap { - [valueName: string]: GraphQLEnumValueConfig; -} +export type GraphQLEnumValueConfigMap = { [key: string]: GraphQLEnumValueConfig }; export interface GraphQLEnumValueConfig { - value?: any; - deprecationReason?: string; - description?: string; - astNode?: EnumValueDefinitionNode; + value?: any; + deprecationReason?: string | void; + description?: string | void; + astNode?: EnumValueDefinitionNode | void; } export interface GraphQLEnumValue { - name: string; - description: string; - isDeprecated?: boolean; - deprecationReason: string; - astNode?: EnumValueDefinitionNode; - value: any; + name: string; + description: string | void; + isDeprecated?: boolean; + deprecationReason: string | void; + astNode?: EnumValueDefinitionNode | void; + value: any; } /** @@ -524,92 +609,40 @@ export interface GraphQLEnumValue { * */ export class GraphQLInputObjectType { - name: string; - description: string; - astNode?: InputObjectTypeDefinitionNode; - constructor(config: GraphQLInputObjectTypeConfig); - getFields(): GraphQLInputFieldMap; - toString(): string; + name: string; + description: string | void; + astNode: InputObjectTypeDefinitionNode | void; + constructor(config: GraphQLInputObjectTypeConfig); + getFields(): GraphQLInputFieldMap; + toString(): string; + toJSON(): string; + inspect(): string; } export interface GraphQLInputObjectTypeConfig { - name: string; - fields: Thunk; - description?: string; - astNode?: InputObjectTypeDefinitionNode; + name: string; + fields: Thunk; + description?: string | void; + astNode?: InputObjectTypeDefinitionNode | void; } export interface GraphQLInputFieldConfig { - type: GraphQLInputType; - defaultValue?: any; - description?: string; - astNode?: InputValueDefinitionNode; + type: GraphQLInputType; + defaultValue?: any; + description?: string | void; + astNode?: InputValueDefinitionNode | void; } -export interface GraphQLInputFieldConfigMap { - [fieldName: string]: GraphQLInputFieldConfig; -} +export type GraphQLInputFieldConfigMap = { + [key: string]: GraphQLInputFieldConfig; +}; export interface GraphQLInputField { - name: string; - type: GraphQLInputType; - defaultValue?: any; - description?: string; - astNode?: InputValueDefinitionNode; + name: string; + type: GraphQLInputType; + defaultValue?: any; + description?: string | void; + astNode?: InputValueDefinitionNode | void; } -export interface GraphQLInputFieldMap { - [fieldName: string]: GraphQLInputField; -} - -/** - * 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) }, - * }) - * }) - * - */ -export 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. - */ -export class GraphQLNonNull { - ofType: T; - - constructor(type: T); - - toString(): string; -} +export type GraphQLInputFieldMap = { [key: string]: GraphQLInputField }; diff --git a/types/graphql/type/directives.d.ts b/types/graphql/type/directives.d.ts index b6962bc4ae..f6e19f674d 100644 --- a/types/graphql/type/directives.d.ts +++ b/types/graphql/type/directives.d.ts @@ -1,51 +1,32 @@ -import { GraphQLFieldConfigArgumentMap, GraphQLArgument } from './definition'; -import { DirectiveDefinitionNode } from '../language/ast'; +import { GraphQLFieldConfigArgumentMap, GraphQLArgument } from "./definition"; +import { DirectiveDefinitionNode } from "../language/ast"; +import { DirectiveLocationEnum } from "../language/directiveLocation"; -export 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'; -}; - -export type DirectiveLocationEnum = keyof typeof DirectiveLocation; +/** + * Test if the given value is a GraphQL directive. + */ +export function isDirective(directive: any): directive is GraphQLDirective; /** * Directives are used by the GraphQL runtime as a way of modifying execution * behavior. Type system creators will usually not create these directly. */ export class GraphQLDirective { - name: string; - description?: string; - locations: DirectiveLocationEnum[]; - args: GraphQLArgument[]; - astNode?: DirectiveDefinitionNode; + name: string; + description: string | void; + locations: DirectiveLocationEnum[]; + args: GraphQLArgument[]; + astNode: DirectiveDefinitionNode | void; - constructor(config: GraphQLDirectiveConfig); + constructor(config: GraphQLDirectiveConfig); } export interface GraphQLDirectiveConfig { - name: string; - description?: string; - locations: DirectiveLocationEnum[]; - args?: GraphQLFieldConfigArgumentMap; - astNode?: DirectiveDefinitionNode; + name: string; + description?: string | void; + locations: DirectiveLocationEnum[]; + args?: GraphQLFieldConfigArgumentMap | void; + astNode?: DirectiveDefinitionNode | void; } /** @@ -61,7 +42,7 @@ export const GraphQLSkipDirective: GraphQLDirective; /** * Constant string used for default reason for a deprecation. */ -export const DEFAULT_DEPRECATION_REASON: 'No longer supported'; +export const DEFAULT_DEPRECATION_REASON: "No longer supported"; /** * Used to declare element of a GraphQL schema as deprecated. @@ -71,4 +52,6 @@ export const GraphQLDeprecatedDirective: GraphQLDirective; /** * The full list of specified directives. */ -export const specifiedDirectives: GraphQLDirective[]; +export const specifiedDirectives: ReadonlyArray; + +export function isSpecifiedDirective(directive: GraphQLDirective): boolean; diff --git a/types/graphql/type/index.d.ts b/types/graphql/type/index.d.ts index 5fdfb1190a..c498f648e4 100644 --- a/types/graphql/type/index.d.ts +++ b/types/graphql/type/index.d.ts @@ -1,47 +1,145 @@ -// GraphQL Schema definition -export { GraphQLSchema } from './schema'; - -export * from './definition'; +export { + // Predicate + isSchema, + // GraphQL Schema definition + GraphQLSchema, + GraphQLSchemaConfig, +} from "./schema"; 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 './directives'; + // Predicates + isType, + isScalarType, + isObjectType, + isInterfaceType, + isUnionType, + isEnumType, + isInputObjectType, + isListType, + isNonNullType, + isInputType, + isOutputType, + isLeafType, + isCompositeType, + isAbstractType, + isWrappingType, + isNullableType, + isNamedType, + // Assertions + assertType, + assertScalarType, + assertObjectType, + assertInterfaceType, + assertUnionType, + assertEnumType, + assertInputObjectType, + assertListType, + assertNonNullType, + assertInputType, + assertOutputType, + assertLeafType, + assertCompositeType, + assertAbstractType, + assertWrappingType, + assertNullableType, + assertNamedType, + // Un-modifiers + getNullableType, + getNamedType, + // Definitions + GraphQLScalarType, + GraphQLObjectType, + GraphQLInterfaceType, + GraphQLUnionType, + GraphQLEnumType, + GraphQLInputObjectType, + // Type Wrappers + GraphQLList, + GraphQLNonNull, + // type + GraphQLType, + GraphQLInputType, + GraphQLOutputType, + GraphQLLeafType, + GraphQLCompositeType, + GraphQLAbstractType, + GraphQLWrappingType, + GraphQLNullableType, + GraphQLNamedType, + Thunk, + GraphQLArgument, + GraphQLArgumentConfig, + GraphQLEnumTypeConfig, + GraphQLEnumValue, + GraphQLEnumValueConfig, + GraphQLEnumValueConfigMap, + GraphQLField, + GraphQLFieldConfig, + GraphQLFieldConfigArgumentMap, + GraphQLFieldConfigMap, + GraphQLFieldMap, + GraphQLFieldResolver, + GraphQLInputField, + GraphQLInputFieldConfig, + GraphQLInputFieldConfigMap, + GraphQLInputFieldMap, + GraphQLInputObjectTypeConfig, + GraphQLInterfaceTypeConfig, + GraphQLIsTypeOfFn, + GraphQLObjectTypeConfig, + GraphQLResolveInfo, + ResponsePath, + GraphQLScalarTypeConfig, + GraphQLTypeResolver, + GraphQLUnionTypeConfig, +} from "./definition"; + +export { + // Predicate + isDirective, + // Directives Definition + GraphQLDirective, + // Built-in Directives defined by the Spec + isSpecifiedDirective, + specifiedDirectives, + GraphQLIncludeDirective, + GraphQLSkipDirective, + GraphQLDeprecatedDirective, + // Constant Deprecation Reason + DEFAULT_DEPRECATION_REASON, + // type + GraphQLDirectiveConfig, +} from "./directives"; // Common built-in scalar instances. export { - GraphQLInt, - GraphQLFloat, - GraphQLString, - GraphQLBoolean, - GraphQLID, -} from './scalars'; + isSpecifiedScalarType, + specifiedScalarTypes, + GraphQLInt, + GraphQLFloat, + GraphQLString, + GraphQLBoolean, + GraphQLID, +} from "./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 './introspection'; + // "Enum" of Type Kinds + TypeKind, + // GraphQL Types for introspection. + isIntrospectionType, + introspectionTypes, + __Schema, + __Directive, + __DirectiveLocation, + __Type, + __Field, + __InputValue, + __EnumValue, + __TypeKind, + // Meta-field definitions. + SchemaMetaFieldDef, + TypeMetaFieldDef, + TypeNameMetaFieldDef, +} from "./introspection"; -export { DirectiveLocationEnum } from './directives'; +export { validateSchema, assertValidSchema } from "./validate"; diff --git a/types/graphql/type/introspection.d.ts b/types/graphql/type/introspection.d.ts index 48ac468ed0..beed0ebeb2 100644 --- a/types/graphql/type/introspection.d.ts +++ b/types/graphql/type/introspection.d.ts @@ -1,14 +1,14 @@ import { - GraphQLScalarType, - GraphQLObjectType, - GraphQLInterfaceType, - GraphQLUnionType, - GraphQLEnumType, - GraphQLInputObjectType, - GraphQLList, - GraphQLNonNull, -} from './definition'; -import { GraphQLField } from './definition'; + GraphQLScalarType, + GraphQLObjectType, + GraphQLInterfaceType, + GraphQLUnionType, + GraphQLEnumType, + GraphQLInputObjectType, + GraphQLList, + GraphQLNonNull, +} from "./definition"; +import { GraphQLField } from "./definition"; export const __Schema: GraphQLObjectType; export const __Directive: GraphQLObjectType; @@ -19,14 +19,14 @@ export const __InputValue: GraphQLObjectType; export const __EnumValue: GraphQLObjectType; export const TypeKind: { - SCALAR: 'SCALAR'; - OBJECT: 'OBJECT'; - INTERFACE: 'INTERFACE'; - UNION: 'UNION'; - ENUM: 'ENUM'; - INPUT_OBJECT: 'INPUT_OBJECT'; - LIST: 'LIST'; - NON_NULL: 'NON_NULL'; + SCALAR: "SCALAR"; + OBJECT: "OBJECT"; + INTERFACE: "INTERFACE"; + UNION: "UNION"; + ENUM: "ENUM"; + INPUT_OBJECT: "INPUT_OBJECT"; + LIST: "LIST"; + NON_NULL: "NON_NULL"; }; export const __TypeKind: GraphQLEnumType; @@ -35,6 +35,11 @@ export const __TypeKind: GraphQLEnumType; * Note that these are GraphQLField and not GraphQLFieldConfig, * so the format for args is different. */ + export const SchemaMetaFieldDef: GraphQLField; export const TypeMetaFieldDef: GraphQLField; export const TypeNameMetaFieldDef: GraphQLField; + +export const introspectionTypes: ReadonlyArray; + +export function isIntrospectionType(type: any): boolean; diff --git a/types/graphql/type/scalars.d.ts b/types/graphql/type/scalars.d.ts index 31a33aafad..1476bf7ab8 100644 --- a/types/graphql/type/scalars.d.ts +++ b/types/graphql/type/scalars.d.ts @@ -1,7 +1,11 @@ -import { GraphQLScalarType } from './definition'; +import { GraphQLScalarType } from "./definition"; export const GraphQLInt: GraphQLScalarType; export const GraphQLFloat: GraphQLScalarType; export const GraphQLString: GraphQLScalarType; export const GraphQLBoolean: GraphQLScalarType; export const GraphQLID: GraphQLScalarType; + +export const specifiedScalarTypes: ReadonlyArray; + +export function isSpecifiedScalarType(type: GraphQLScalarType): boolean; diff --git a/types/graphql/type/schema.d.ts b/types/graphql/type/schema.d.ts index 3263274dd9..a7bb94f5c5 100644 --- a/types/graphql/type/schema.d.ts +++ b/types/graphql/type/schema.d.ts @@ -1,11 +1,12 @@ -import { GraphQLObjectType } from './definition'; -import { - GraphQLType, - GraphQLNamedType, - GraphQLAbstractType, -} from './definition'; -import { SchemaDefinitionNode } from '../language/ast'; -import { GraphQLDirective } from './directives'; +import { GraphQLObjectType } from "./definition"; +import { GraphQLType, GraphQLNamedType, GraphQLAbstractType } from "./definition"; +import { SchemaDefinitionNode } from "../language/ast"; +import { GraphQLDirective } from "./directives"; + +/** + * Test if the given value is a GraphQL schema. + */ +export function isSchema(schema: any): schema is GraphQLSchema; /** * Schema Definition @@ -34,38 +35,51 @@ import { GraphQLDirective } from './directives'; * */ export class GraphQLSchema { - astNode?: SchemaDefinitionNode; - // 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 } }; + astNode: SchemaDefinitionNode | void; - constructor(config: GraphQLSchemaConfig); + constructor(config: GraphQLSchemaConfig); - getQueryType(): GraphQLObjectType; - getMutationType(): GraphQLObjectType | null | undefined; - getSubscriptionType(): GraphQLObjectType | null | undefined; - getTypeMap(): { [typeName: string]: GraphQLNamedType }; - getType(name: string): GraphQLNamedType; - getPossibleTypes(abstractType: GraphQLAbstractType): GraphQLObjectType[]; + getQueryType(): GraphQLObjectType | void; + getMutationType(): GraphQLObjectType | void; + getSubscriptionType(): GraphQLObjectType | void; + getTypeMap(): TypeMap; + getType(name: string): GraphQLNamedType | void; + getPossibleTypes(abstractType: GraphQLAbstractType): ReadonlyArray; - isPossibleType( - abstractType: GraphQLAbstractType, - possibleType: GraphQLObjectType, - ): boolean; + isPossibleType(abstractType: GraphQLAbstractType, possibleType: GraphQLObjectType): boolean; - getDirectives(): GraphQLDirective[]; - getDirective(name: string): GraphQLDirective; + getDirectives(): ReadonlyArray; + getDirective(name: string): GraphQLDirective | void; } -export interface GraphQLSchemaConfig { - query: GraphQLObjectType; - mutation?: GraphQLObjectType; - subscription?: GraphQLObjectType; - types?: GraphQLNamedType[]; - directives?: GraphQLDirective[]; - astNode?: SchemaDefinitionNode; +type TypeMap = { [key: string]: GraphQLNamedType }; + +export interface GraphQLSchemaValidationOptions { + /** + * When building a schema from a GraphQL service's introspection result, it + * might be safe to assume the schema is valid. Set to true to assume the + * produced schema is valid. + * + * Default: false + */ + assumeValid?: boolean; + + /** + * If provided, the schema will consider fields or types with names included + * in this list valid, even if they do not adhere to the specification's + * schema validation rules. + * + * This option is provided to ease adoption and may be removed in a future + * major release. + */ + allowedLegacyNames?: ReadonlyArray | void; +} + +export interface GraphQLSchemaConfig extends GraphQLSchemaValidationOptions { + query: GraphQLObjectType | void; + mutation?: GraphQLObjectType | void; + subscription?: GraphQLObjectType | void; + types?: GraphQLNamedType[] | void; + directives?: GraphQLDirective[] | void; + astNode?: SchemaDefinitionNode | void; } diff --git a/types/graphql/type/validate.d.ts b/types/graphql/type/validate.d.ts new file mode 100644 index 0000000000..e23f9e6386 --- /dev/null +++ b/types/graphql/type/validate.d.ts @@ -0,0 +1,17 @@ +import { GraphQLSchema } from "./schema"; +import { GraphQLError } from "../error/GraphQLError"; + +/** + * Implements the "Type Validation" sub-sections of the specification's + * "Type System" section. + * + * Validation runs synchronously, returning an array of encountered errors, or + * an empty array if no errors were encountered and the Schema is valid. + */ +export function validateSchema(schema: GraphQLSchema): ReadonlyArray; + +/** + * Utility function which asserts a schema is valid by throwing an error if + * it is invalid. + */ +export function assertValidSchema(schema: GraphQLSchema): void; diff --git a/types/graphql/utilities/TypeInfo.d.ts b/types/graphql/utilities/TypeInfo.d.ts index a04a24a1a7..1c2f139642 100644 --- a/types/graphql/utilities/TypeInfo.d.ts +++ b/types/graphql/utilities/TypeInfo.d.ts @@ -1,15 +1,15 @@ -import { GraphQLSchema } from '../type/schema'; +import { GraphQLSchema } from "../type/schema"; import { - GraphQLOutputType, - GraphQLCompositeType, - GraphQLInputType, - GraphQLField, - GraphQLArgument, - GraphQLEnumValue, - GraphQLType, -} from '../type/definition'; -import { GraphQLDirective } from '../type/directives'; -import { ASTNode, FieldNode } from '../language/ast'; + GraphQLOutputType, + GraphQLCompositeType, + GraphQLInputType, + GraphQLField, + GraphQLArgument, + GraphQLEnumValue, + GraphQLType, +} from "../type/definition"; +import { GraphQLDirective } from "../type/directives"; +import { ASTNode, FieldNode } from "../language/ast"; /** * TypeInfo is a utility class which, given a GraphQL schema, can keep track @@ -17,27 +17,31 @@ import { ASTNode, FieldNode } from '../language/ast'; * AST during a recursive descent by calling `enter(node)` and `leave(node)`. */ export class TypeInfo { - constructor( - schema: GraphQLSchema, - // NOTE: this experimental optional second parameter is only needed in order - // to support non-spec-compliant codebases. You should never need to use it. - // It may disappear in the future. - getFieldDefFn?: getFieldDef, - ); + constructor( + schema: GraphQLSchema, + // NOTE: this experimental optional second parameter is only needed in order + // to support non-spec-compliant codebases. You should never need to use it. + // It may disappear in the future. + getFieldDefFn?: getFieldDef, + // Initial type may be provided in rare cases to facilitate traversals + // beginning somewhere other than documents. + initialType?: GraphQLType + ); - getType(): GraphQLOutputType; - getParentType(): GraphQLCompositeType; - getInputType(): GraphQLInputType; - getFieldDef(): GraphQLField; - getDirective(): GraphQLDirective; - getArgument(): GraphQLArgument; - getEnumValue(): GraphQLEnumValue; - enter(node: ASTNode): any; - leave(node: ASTNode): any; + getType(): GraphQLOutputType | void; + getParentType(): GraphQLCompositeType | void; + getInputType(): GraphQLInputType | void; + getParentInputType(): GraphQLInputType | void; + getFieldDef(): GraphQLField | void; + getDirective(): GraphQLDirective | void; + getArgument(): GraphQLArgument | void; + getEnumValue(): GraphQLEnumValue | void; + enter(node: ASTNode): any; + leave(node: ASTNode): any; } -export type getFieldDef = ( - schema: GraphQLSchema, - parentType: GraphQLType, - fieldNode: FieldNode, -) => GraphQLField; +type getFieldDef = ( + schema: GraphQLSchema, + parentType: GraphQLType, + fieldNode: FieldNode +) => GraphQLField | void; diff --git a/types/graphql/utilities/assertValidName.d.ts b/types/graphql/utilities/assertValidName.d.ts index 5ca2310a26..19f81e3991 100644 --- a/types/graphql/utilities/assertValidName.d.ts +++ b/types/graphql/utilities/assertValidName.d.ts @@ -1,2 +1,12 @@ -// Helper to assert that provided names are valid. -export function assertValidName(name: string): void; +import { GraphQLError } from "../error/GraphQLError"; +import { ASTNode } from "../language/ast"; + +/** + * Upholds the spec rules about naming. + */ +export function assertValidName(name: string): string; + +/** + * Returns an Error if a name is invalid. + */ +export function isValidNameError(name: string, node?: ASTNode | undefined): GraphQLError | undefined; diff --git a/types/graphql/utilities/astFromValue.d.ts b/types/graphql/utilities/astFromValue.d.ts index 557a07dd9d..9c2198e6d6 100644 --- a/types/graphql/utilities/astFromValue.d.ts +++ b/types/graphql/utilities/astFromValue.d.ts @@ -1,17 +1,5 @@ -import { - ValueNode, - /* - TODO: - IntValueNode, - FloatValueNode, - StringValueNode, - BooleanValueNode, - EnumValueNode, - ListValueNode, - ObjectValueNode, - */ -} from '../language/ast'; -import { GraphQLInputType } from '../type/definition'; +import { ValueNode } from "../language/ast"; +import { GraphQLInputType } from "../type/definition"; /** * Produces a GraphQL Value AST given a JavaScript value. @@ -27,7 +15,7 @@ import { GraphQLInputType } from '../type/definition'; * | String | String / Enum Value | * | Number | Int / Float | * | Mixed | Enum Value | + * | null | NullValue | * */ -// TODO: this should set overloads according to above the table -export function astFromValue(value: any, type: GraphQLInputType): ValueNode; // Warning: there is a code in bottom: throw new TypeError +export function astFromValue(value: any, type: GraphQLInputType): ValueNode | void; diff --git a/types/graphql/utilities/buildASTSchema.d.ts b/types/graphql/utilities/buildASTSchema.d.ts index b20c8fc856..ebff50b4f7 100644 --- a/types/graphql/utilities/buildASTSchema.d.ts +++ b/types/graphql/utilities/buildASTSchema.d.ts @@ -1,6 +1,29 @@ -import { DocumentNode, Location } from '../language/ast'; -import { Source } from '../language/source'; -import { GraphQLSchema } from '../type/schema'; +import { + DocumentNode, + Location, + StringValueNode, + TypeDefinitionNode, + NamedTypeNode, + DirectiveDefinitionNode, + FieldDefinitionNode, +} from "../language/ast"; +import { GraphQLNamedType, GraphQLFieldConfig } from "../type/definition"; +import { GraphQLDirective } from "../type/directives"; +import { Source } from "../language/source"; +import { GraphQLSchema, GraphQLSchemaValidationOptions } from "../type/schema"; +import { ParseOptions } from "../language/parser"; +import blockStringValue from "../language/blockStringValue"; + +interface BuildSchemaOptions extends GraphQLSchemaValidationOptions { + /** + * Descriptions are defined as preceding string literals, however an older + * experimental version of the SDL supported preceding comments as + * descriptions. Set to true to enable this deprecated behavior. + * + * Default: false + */ + commentDescriptions?: boolean; +} /** * This takes the ast of a schema document produced by the parse function in @@ -11,17 +34,46 @@ import { GraphQLSchema } from '../type/schema'; * * Given that AST it constructs a GraphQLSchema. The resulting schema * has no resolve methods, so execution will use default resolvers. + * + * Accepts options as a second argument: + * + * - commentDescriptions: + * Provide true to use preceding comments as the description. + * */ -export function buildASTSchema(ast: DocumentNode): GraphQLSchema; +export function buildASTSchema(ast: DocumentNode, options?: BuildSchemaOptions): GraphQLSchema; + +type TypeDefinitionsMap = { [key: string]: TypeDefinitionNode }; +type TypeResolver = (typeRef: NamedTypeNode) => GraphQLNamedType; + +export class ASTDefinitionBuilder { + constructor(typeDefinitionsMap: TypeDefinitionsMap, options: BuildSchemaOptions | void, resolveType: TypeResolver); + + buildTypes(nodes: ReadonlyArray): Array; + + buildType(node: NamedTypeNode | TypeDefinitionNode): GraphQLNamedType; + + buildDirective(directiveNode: DirectiveDefinitionNode): GraphQLDirective; + + buildField(field: FieldDefinitionNode): GraphQLFieldConfig; +} /** - * Given an ast node, returns its string description based on a contiguous - * block full-line of comments preceding it. + * Given an ast node, returns its string description. + * + * Accepts options as a second argument: + * + * - commentDescriptions: + * Provide true to use preceding comments as the description. + * */ -export function getDescription(node: { loc?: Location }): string; +export function getDescription( + node: { readonly description?: StringValueNode; readonly loc?: Location }, + options: BuildSchemaOptions | void +): string | undefined; /** * A helper function to build a GraphQLSchema directly from a source * document. */ -export function buildSchema(source: string | Source): GraphQLSchema; +export function buildSchema(source: string | Source, options?: BuildSchemaOptions & ParseOptions): GraphQLSchema; diff --git a/types/graphql/utilities/buildClientSchema.d.ts b/types/graphql/utilities/buildClientSchema.d.ts index bdf898bc2b..128c34ca48 100644 --- a/types/graphql/utilities/buildClientSchema.d.ts +++ b/types/graphql/utilities/buildClientSchema.d.ts @@ -1,5 +1,7 @@ -import { IntrospectionQuery } from './introspectionQuery'; -import { GraphQLSchema } from '../type/schema'; +import { IntrospectionQuery } from "./introspectionQuery"; +import { GraphQLSchema, GraphQLSchemaValidationOptions } from "../type/schema"; + +interface Options extends GraphQLSchemaValidationOptions {} /** * Build a GraphQLSchema for use by client tools. @@ -9,7 +11,8 @@ import { GraphQLSchema } from '../type/schema'; * 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. + * + * This function expects a complete introspection result. Don't forget to check + * the "errors" field of a server response before calling this function. */ -export function buildClientSchema( - introspection: IntrospectionQuery, -): GraphQLSchema; +export function buildClientSchema(introspection: IntrospectionQuery, options?: Options): GraphQLSchema; diff --git a/types/graphql/utilities/coerceValue.d.ts b/types/graphql/utilities/coerceValue.d.ts new file mode 100644 index 0000000000..081eea4a32 --- /dev/null +++ b/types/graphql/utilities/coerceValue.d.ts @@ -0,0 +1,22 @@ +import { GraphQLError } from "../error"; +import { ASTNode } from "../language/ast"; +import { GraphQLInputType } from "../type/definition"; + +interface CoercedValue { + readonly errors: ReadonlyArray | undefined; + readonly value: any; +} + +interface Path { + readonly prev: Path | undefined; + readonly key: string | number; +} + +/** + * Coerces a JavaScript value given a GraphQL Type. + * + * Returns either a value which is valid for the provided type or a list of + * encountered coercion errors. + * + */ +export function coerceValue(value: any, type: GraphQLInputType, blameNode?: ASTNode, path?: Path): CoercedValue; diff --git a/types/graphql/utilities/concatAST.d.ts b/types/graphql/utilities/concatAST.d.ts index 405ac69936..08c5104076 100644 --- a/types/graphql/utilities/concatAST.d.ts +++ b/types/graphql/utilities/concatAST.d.ts @@ -1,8 +1,8 @@ -import { DocumentNode } from '../language/ast'; +import { DocumentNode } from "../language/ast"; /** * Provided a collection of ASTs, presumably each from different files, * concatenate the ASTs together into batched AST, useful for validating many * GraphQL source files which together represent one conceptual application. */ -export function concatAST(asts: DocumentNode[]): DocumentNode; +export function concatAST(asts: ReadonlyArray): DocumentNode; diff --git a/types/graphql/utilities/extendSchema.d.ts b/types/graphql/utilities/extendSchema.d.ts index 389bd02d8b..7cde767ed7 100644 --- a/types/graphql/utilities/extendSchema.d.ts +++ b/types/graphql/utilities/extendSchema.d.ts @@ -1,5 +1,17 @@ -import { DocumentNode } from '../language/ast'; -import { GraphQLSchema } from '../type/schema'; +import { DocumentNode } from "../language/ast"; +import { GraphQLSchema } from "../type/schema"; +import { GraphQLSchemaValidationOptions } from "../type/schema"; + +interface Options extends GraphQLSchemaValidationOptions { + /** + * Descriptions are defined as preceding string literals, however an older + * experimental version of the SDL supported preceding comments as + * descriptions. Set to true to enable this deprecated behavior. + * + * Default: false + */ + commentDescriptions?: boolean; +} /** * Produces a new schema given an existing schema and a document which may @@ -12,8 +24,11 @@ import { GraphQLSchema } from '../type/schema'; * * This algorithm copies the provided schema, applying extensions while * producing the copy. The original schema remains unaltered. + * + * Accepts options as a third argument: + * + * - commentDescriptions: + * Provide true to use preceding comments as the description. + * */ -export function extendSchema( - schema: GraphQLSchema, - documentAST: DocumentNode, -): GraphQLSchema; +export function extendSchema(schema: GraphQLSchema, documentAST: DocumentNode, options?: Options): GraphQLSchema; diff --git a/types/graphql/utilities/findBreakingChanges.d.ts b/types/graphql/utilities/findBreakingChanges.d.ts index 0d5fc0041a..84f1bea158 100644 --- a/types/graphql/utilities/findBreakingChanges.d.ts +++ b/types/graphql/utilities/findBreakingChanges.d.ts @@ -1,88 +1,160 @@ import { - getNamedType, - GraphQLScalarType, - GraphQLEnumType, - GraphQLInputObjectType, - GraphQLInterfaceType, - GraphQLObjectType, - GraphQLUnionType, - GraphQLNamedType, -} from '../type/definition'; -import { GraphQLSchema } from '../type/schema'; + getNamedType, + GraphQLScalarType, + GraphQLEnumType, + GraphQLInputObjectType, + GraphQLInterfaceType, + GraphQLObjectType, + GraphQLUnionType, + GraphQLNamedType, +} from "../type/definition"; +import { GraphQLDirective } from "../type/directives"; +import { GraphQLSchema } from "../type/schema"; +import { DirectiveLocationEnum } from "../language/directiveLocation"; -export const BreakingChangeType: { - FIELD_CHANGED_KIND: 'FIELD_CHANGED_KIND'; - FIELD_REMOVED: 'FIELD_REMOVED'; - TYPE_CHANGED_KIND: 'TYPE_CHANGED_KIND'; - TYPE_REMOVED: 'TYPE_REMOVED'; - TYPE_REMOVED_FROM_UNION: 'TYPE_REMOVED_FROM_UNION'; - VALUE_REMOVED_FROM_ENUM: 'VALUE_REMOVED_FROM_ENUM'; +export const BreakingChangeType : _BreakingChangeType; + +// @internal +type _BreakingChangeType = { + FIELD_CHANGED_KIND: "FIELD_CHANGED_KIND"; + FIELD_REMOVED: "FIELD_REMOVED"; + TYPE_CHANGED_KIND: "TYPE_CHANGED_KIND"; + TYPE_REMOVED: "TYPE_REMOVED"; + TYPE_REMOVED_FROM_UNION: "TYPE_REMOVED_FROM_UNION"; + VALUE_REMOVED_FROM_ENUM: "VALUE_REMOVED_FROM_ENUM"; + ARG_REMOVED: "ARG_REMOVED"; + ARG_CHANGED_KIND: "ARG_CHANGED_KIND"; + NON_NULL_ARG_ADDED: "NON_NULL_ARG_ADDED"; + NON_NULL_INPUT_FIELD_ADDED: "NON_NULL_INPUT_FIELD_ADDED"; + INTERFACE_REMOVED_FROM_OBJECT: "INTERFACE_REMOVED_FROM_OBJECT"; + DIRECTIVE_REMOVED: "DIRECTIVE_REMOVED"; + DIRECTIVE_ARG_REMOVED: "DIRECTIVE_ARG_REMOVED"; + DIRECTIVE_LOCATION_REMOVED: "DIRECTIVE_LOCATION_REMOVED"; + NON_NULL_DIRECTIVE_ARG_ADDED: "NON_NULL_DIRECTIVE_ARG_ADDED"; }; -export type BreakingChangeKey = - | 'FIELD_CHANGED_KIND' - | 'FIELD_REMOVED' - | 'TYPE_CHANGED_KIND' - | 'TYPE_REMOVED' - | 'TYPE_REMOVED_FROM_UNION' - | 'VALUE_REMOVED_FROM_ENUM'; +export const DangerousChangeType: _DangerousChangeType; + +// @internal +type _DangerousChangeType = { + ARG_DEFAULT_VALUE_CHANGE: "ARG_DEFAULT_VALUE_CHANGE"; + VALUE_ADDED_TO_ENUM: "VALUE_ADDED_TO_ENUM"; + INTERFACE_ADDED_TO_OBJECT: "INTERFACE_ADDED_TO_OBJECT"; + TYPE_ADDED_TO_UNION: "TYPE_ADDED_TO_UNION"; + NULLABLE_INPUT_FIELD_ADDED: "NULLABLE_INPUT_FIELD_ADDED"; + NULLABLE_ARG_ADDED: "NULLABLE_ARG_ADDED"; +}; export interface BreakingChange { - type: BreakingChangeKey; - description: string; + type: keyof _BreakingChangeType; + description: string; +} + +export interface DangerousChange { + type: keyof _DangerousChangeType; + description: string; } /** * Given two schemas, returns an Array containing descriptions of all the types * of breaking changes covered by the other functions down below. */ -export function findBreakingChanges( - oldSchema: GraphQLSchema, - newSchema: GraphQLSchema, -): BreakingChange[]; +export function findBreakingChanges(oldSchema: GraphQLSchema, newSchema: GraphQLSchema): Array; + +/** + * Given two schemas, returns an Array containing descriptions of all the types + * of potentially dangerous changes covered by the other functions down below. + */ +export function findDangerousChanges(oldSchema: GraphQLSchema, newSchema: GraphQLSchema): Array; /** * Given two schemas, returns an Array containing descriptions of any breaking * changes in the newSchema related to removing an entire type. */ -export function findRemovedTypes( - oldSchema: GraphQLSchema, - newSchema: GraphQLSchema, -): BreakingChange[]; +export function findRemovedTypes(oldSchema: GraphQLSchema, newSchema: GraphQLSchema): Array; /** * Given two schemas, returns an Array containing descriptions of any breaking * changes in the newSchema related to changing the type of a type. */ -export function findTypesThatChangedKind( - oldSchema: GraphQLSchema, - newSchema: GraphQLSchema, -): BreakingChange[]; +export function findTypesThatChangedKind(oldSchema: GraphQLSchema, newSchema: GraphQLSchema): Array; /** - * Given two schemas, returns an Array containing descriptions of any breaking - * changes in the newSchema related to the fields on a type. This includes if - * a field has been removed from a type or if a field has changed type. + * Given two schemas, returns an Array containing descriptions of any + * breaking or dangerous changes in the newSchema related to arguments + * (such as removal or change of type of an argument, or a change in an + * argument's default value). */ -export function findFieldsThatChangedType( - oldSchema: GraphQLSchema, - newSchema: GraphQLSchema, -): BreakingChange[]; +export function findArgChanges( + oldSchema: GraphQLSchema, + newSchema: GraphQLSchema +): { + breakingChanges: Array; + dangerousChanges: Array; +}; + +export function findFieldsThatChangedTypeOnObjectOrInterfaceTypes( + oldSchema: GraphQLSchema, + newSchema: GraphQLSchema +): Array; + +export function findFieldsThatChangedTypeOnInputObjectTypes( + oldSchema: GraphQLSchema, + newSchema: GraphQLSchema +): { + breakingChanges: Array; + dangerousChanges: Array; +}; /** * Given two schemas, returns an Array containing descriptions of any breaking * changes in the newSchema related to removing types from a union type. */ -export function findTypesRemovedFromUnions( - oldSchema: GraphQLSchema, - newSchema: GraphQLSchema, -): BreakingChange[]; +export function findTypesRemovedFromUnions(oldSchema: GraphQLSchema, newSchema: GraphQLSchema): Array; + +/** + * Given two schemas, returns an Array containing descriptions of any dangerous + * changes in the newSchema related to adding types to a union type. + */ +export function findTypesAddedToUnions(oldSchema: GraphQLSchema, newSchema: GraphQLSchema): Array; /** * Given two schemas, returns an Array containing descriptions of any breaking * changes in the newSchema related to removing values from an enum type. */ -export function findValuesRemovedFromEnums( - oldSchema: GraphQLSchema, - newSchema: GraphQLSchema, -): BreakingChange[]; +export function findValuesRemovedFromEnums(oldSchema: GraphQLSchema, newSchema: GraphQLSchema): Array; + +/** + * Given two schemas, returns an Array containing descriptions of any dangerous + * changes in the newSchema related to adding values to an enum type. + */ +export function findValuesAddedToEnums(oldSchema: GraphQLSchema, newSchema: GraphQLSchema): Array; + +export function findInterfacesRemovedFromObjectTypes( + oldSchema: GraphQLSchema, + newSchema: GraphQLSchema +): Array; + +export function findInterfacesAddedToObjectTypes( + oldSchema: GraphQLSchema, + newSchema: GraphQLSchema +): Array; + +export function findRemovedDirectives(oldSchema: GraphQLSchema, newSchema: GraphQLSchema): Array; + +export function findRemovedDirectiveArgs(oldSchema: GraphQLSchema, newSchema: GraphQLSchema): Array; + +export function findAddedNonNullDirectiveArgs( + oldSchema: GraphQLSchema, + newSchema: GraphQLSchema +): Array; + +export function findRemovedLocationsForDirective( + oldDirective: GraphQLDirective, + newDirective: GraphQLDirective +): Array; + +export function findRemovedDirectiveLocations( + oldSchema: GraphQLSchema, + newSchema: GraphQLSchema +): Array; diff --git a/types/graphql/utilities/findDeprecatedUsages.d.ts b/types/graphql/utilities/findDeprecatedUsages.d.ts index 8cd844e15f..da99c98269 100644 --- a/types/graphql/utilities/findDeprecatedUsages.d.ts +++ b/types/graphql/utilities/findDeprecatedUsages.d.ts @@ -1,13 +1,10 @@ -import { GraphQLSchema } from '../type/schema'; -import { DocumentNode } from '../language/ast'; -import { GraphQLError } from '../error/GraphQLError'; +import { GraphQLSchema } from "../type/schema"; +import { DocumentNode } from "../language/ast"; +import { GraphQLError } from "../error/GraphQLError"; /** * A validation rule which reports deprecated usages. * * Returns a list of GraphQLError instances describing each deprecated use. */ -export function findDeprecatedUsages( - schema: GraphQLSchema, - ast: DocumentNode, -): GraphQLError[]; +export function findDeprecatedUsages(schema: GraphQLSchema, ast: DocumentNode): GraphQLError[]; diff --git a/types/graphql/utilities/getOperationAST.d.ts b/types/graphql/utilities/getOperationAST.d.ts index 0d5064d48d..81e9bd4cbe 100644 --- a/types/graphql/utilities/getOperationAST.d.ts +++ b/types/graphql/utilities/getOperationAST.d.ts @@ -1,4 +1,4 @@ -import { DocumentNode, OperationDefinitionNode } from '../language/ast'; +import { DocumentNode, OperationDefinitionNode } from "../language/ast"; /** * Returns an operation AST given a document AST and optionally an operation @@ -6,6 +6,6 @@ import { DocumentNode, OperationDefinitionNode } from '../language/ast'; * provided in the document. */ export function getOperationAST( - documentAST: DocumentNode, - operationName?: string, -): OperationDefinitionNode; + documentAST: DocumentNode, + operationName: string | void +): OperationDefinitionNode | void; diff --git a/types/graphql/utilities/index.d.ts b/types/graphql/utilities/index.d.ts index cd0e23948f..f571c3ab76 100644 --- a/types/graphql/utilities/index.d.ts +++ b/types/graphql/utilities/index.d.ts @@ -1,82 +1,102 @@ // The GraphQL query recommended for a full schema introspection. -export { introspectionQuery } from './introspectionQuery'; export { - IntrospectionQuery, - IntrospectionSchema, - IntrospectionType, - IntrospectionScalarType, - IntrospectionObjectType, - IntrospectionInterfaceType, - IntrospectionUnionType, - IntrospectionEnumType, - IntrospectionInputObjectType, - IntrospectionTypeRef, - IntrospectionNamedTypeRef, - IntrospectionListTypeRef, - IntrospectionNonNullTypeRef, - IntrospectionField, - IntrospectionInputValue, - IntrospectionEnumValue, - IntrospectionDirective, -} from './introspectionQuery'; + getIntrospectionQuery, + // Deprecated, use getIntrospectionQuery() + introspectionQuery, +} from "./introspectionQuery"; + +export { + IntrospectionOptions, + IntrospectionQuery, + IntrospectionSchema, + IntrospectionType, + IntrospectionInputType, + IntrospectionOutputType, + IntrospectionScalarType, + IntrospectionObjectType, + IntrospectionInterfaceType, + IntrospectionUnionType, + IntrospectionEnumType, + IntrospectionInputObjectType, + IntrospectionTypeRef, + IntrospectionInputTypeRef, + IntrospectionOutputTypeRef, + IntrospectionNamedTypeRef, + IntrospectionListTypeRef, + IntrospectionNonNullTypeRef, + IntrospectionField, + IntrospectionInputValue, + IntrospectionEnumValue, + IntrospectionDirective, +} from "./introspectionQuery"; // Gets the target Operation from a Document -export { getOperationAST } from './getOperationAST'; +export { getOperationAST } from "./getOperationAST"; + +// Convert a GraphQLSchema to an IntrospectionQuery +export { introspectionFromSchema } from "./introspectionFromSchema"; // Build a GraphQLSchema from an introspection result. -export { buildClientSchema } from './buildClientSchema'; +export { buildClientSchema } from "./buildClientSchema"; // Build a GraphQLSchema from GraphQL Schema language. -export { buildASTSchema, buildSchema } from './buildASTSchema'; +export { buildASTSchema, buildSchema, getDescription, BuildSchemaOptions } from "./buildASTSchema"; // Extends an existing GraphQLSchema from a parsed GraphQL Schema language AST. -export { extendSchema } from './extendSchema'; +export { extendSchema } from "./extendSchema"; + +// Sort a GraphQLSchema. +export { lexicographicSortSchema } from "./lexicographicSortSchema"; // Print a GraphQLSchema to GraphQL Schema language. -export { - printSchema, - printType, - printIntrospectionSchema, -} from './schemaPrinter'; +export { printSchema, printType, printIntrospectionSchema } from "./schemaPrinter"; // Create a GraphQLType from a GraphQL language AST. -export { typeFromAST } from './typeFromAST'; +export { typeFromAST } from "./typeFromAST"; -// Create a JavaScript value from a GraphQL language AST. -export { valueFromAST } from './valueFromAST'; +// Create a JavaScript value from a GraphQL language AST with a type. +export { valueFromAST } from "./valueFromAST"; + +// Create a JavaScript value from a GraphQL language AST without a type. +export { valueFromASTUntyped } from "./valueFromASTUntyped"; // Create a GraphQL language AST from a JavaScript value. -export { astFromValue } from './astFromValue'; +export { astFromValue } from "./astFromValue"; // A helper to use within recursive-descent visitors which need to be aware of // the GraphQL type system. -export { TypeInfo } from './TypeInfo'; +export { TypeInfo } from "./TypeInfo"; -// Determine if JavaScript values adhere to a GraphQL type. -export { isValidJSValue } from './isValidJSValue'; +// Coerces a JavaScript value to a GraphQL type, or produces errors. +export { coerceValue } from "./coerceValue"; + +// @deprecated use coerceValue +export { isValidJSValue } from "./isValidJSValue"; // Determine if AST values adhere to a GraphQL type. -export { isValidLiteralValue } from './isValidLiteralValue'; +export { isValidLiteralValue } from "./isValidLiteralValue"; // Concatenates multiple AST together. -export { concatAST } from './concatAST'; +export { concatAST } from "./concatAST"; // Separates an AST into an AST per Operation. -export { separateOperations } from './separateOperations'; +export { separateOperations } from "./separateOperations"; // Comparators for types -export { - isEqualType, - isTypeSubTypeOf, - doTypesOverlap, -} from './typeComparators'; +export { isEqualType, isTypeSubTypeOf, doTypesOverlap } from "./typeComparators"; // Asserts that a string is a valid GraphQL name -export { assertValidName } from './assertValidName'; +export { assertValidName, isValidNameError } from "./assertValidName"; // Compares two GraphQLSchemas and detects breaking changes. -export { findBreakingChanges } from './findBreakingChanges'; -export { BreakingChange } from './findBreakingChanges'; +export { + BreakingChangeType, + DangerousChangeType, + findBreakingChanges, + findDangerousChanges, + BreakingChange, + DangerousChange, +} from "./findBreakingChanges"; // Report all deprecated usage within a GraphQL document. -export { findDeprecatedUsages } from './findDeprecatedUsages'; +export { findDeprecatedUsages } from "./findDeprecatedUsages"; diff --git a/types/graphql/utilities/introspectionFromSchema.d.ts b/types/graphql/utilities/introspectionFromSchema.d.ts new file mode 100644 index 0000000000..8733a35087 --- /dev/null +++ b/types/graphql/utilities/introspectionFromSchema.d.ts @@ -0,0 +1,13 @@ +import { GraphQLSchema } from "../type/schema"; +import { IntrospectionQuery, IntrospectionOptions } from "./introspectionQuery"; + +/** + * Build an IntrospectionQuery from a GraphQLSchema + * + * IntrospectionQuery is useful for utilities that care about type and field + * relationships, but do not need to traverse through those relationships. + * + * This is the inverse of buildClientSchema. The primary use case is outside + * of the server context, for instance when doing schema comparisons. + */ +export function introspectionFromSchema(schema: GraphQLSchema, options: IntrospectionOptions): IntrospectionQuery; diff --git a/types/graphql/utilities/introspectionQuery.d.ts b/types/graphql/utilities/introspectionQuery.d.ts index f16b873a3a..750fe0d99c 100644 --- a/types/graphql/utilities/introspectionQuery.d.ts +++ b/types/graphql/utilities/introspectionQuery.d.ts @@ -1,209 +1,143 @@ -import { DirectiveLocationEnum } from '../type/directives'; +import { DirectiveLocationEnum } from "../language/directiveLocation"; -/* -query IntrospectionQuery { - __schema { - queryType { name } - mutationType { name } - subscriptionType { name } - types { - ...FullType - } - directives { - name - description - locations - args { - ...InputValue - } - } - } +export interface IntrospectionOptions { + // Whether to include descriptions in the introspection result. + // Default: true + descriptions: boolean; } -fragment FullType on __Type { - kind - name - description - fields(includeDeprecated: true) { - name - description - args { - ...InputValue - } - type { - ...TypeRef - } - isDeprecated - deprecationReason - } - inputFields { - ...InputValue - } - interfaces { - ...TypeRef - } - enumValues(includeDeprecated: true) { - name - description - isDeprecated - deprecationReason - } - possibleTypes { - ...TypeRef - } -} +export function getIntrospectionQuery(options?: IntrospectionOptions): string; -fragment InputValue on __InputValue { - name - description - type { ...TypeRef } - defaultValue -} - -fragment TypeRef on __Type { - kind - name - ofType { - kind - name - ofType { - kind - name - ofType { - kind - name - ofType { - kind - name - ofType { - kind - name - ofType { - kind - name - ofType { - kind - name - } - } - } - } - } - } - } -} -*/ export const introspectionQuery: string; export interface IntrospectionQuery { - __schema: IntrospectionSchema; + readonly __schema: IntrospectionSchema; } export interface IntrospectionSchema { - queryType: IntrospectionNamedTypeRef; - mutationType?: IntrospectionNamedTypeRef; - subscriptionType?: IntrospectionNamedTypeRef; - types: IntrospectionType[]; - directives: IntrospectionDirective[]; + readonly queryType: IntrospectionNamedTypeRef; + readonly mutationType: IntrospectionNamedTypeRef | void; + readonly subscriptionType: IntrospectionNamedTypeRef | void; + readonly types: ReadonlyArray; + readonly directives: ReadonlyArray; } export type IntrospectionType = - | IntrospectionScalarType - | IntrospectionObjectType - | IntrospectionInterfaceType - | IntrospectionUnionType - | IntrospectionEnumType - | IntrospectionInputObjectType; + | IntrospectionScalarType + | IntrospectionObjectType + | IntrospectionInterfaceType + | IntrospectionUnionType + | IntrospectionEnumType + | IntrospectionInputObjectType; + +export type IntrospectionOutputType = + | IntrospectionScalarType + | IntrospectionObjectType + | IntrospectionInterfaceType + | IntrospectionUnionType + | IntrospectionEnumType; + +export type IntrospectionInputType = IntrospectionScalarType | IntrospectionEnumType | IntrospectionInputObjectType; export interface IntrospectionScalarType { - kind: 'SCALAR'; - name: string; - description?: string; + readonly kind: "SCALAR"; + readonly name: string; + readonly description?: string | void; } export interface IntrospectionObjectType { - kind: 'OBJECT'; - name: string; - description?: string; - fields: IntrospectionField[]; - interfaces: IntrospectionNamedTypeRef[]; + readonly kind: "OBJECT"; + readonly name: string; + readonly description?: string | void; + readonly fields: ReadonlyArray; + readonly interfaces: ReadonlyArray>; } export interface IntrospectionInterfaceType { - kind: 'INTERFACE'; - name: string; - description?: string; - fields: IntrospectionField[]; - possibleTypes: IntrospectionNamedTypeRef[]; + readonly kind: "INTERFACE"; + readonly name: string; + readonly description?: string | void; + readonly fields: ReadonlyArray; + readonly possibleTypes: ReadonlyArray>; } export interface IntrospectionUnionType { - kind: 'UNION'; - name: string; - description?: string; - possibleTypes: IntrospectionNamedTypeRef[]; + readonly kind: "UNION"; + readonly name: string; + readonly description?: string | void; + readonly possibleTypes: ReadonlyArray>; } export interface IntrospectionEnumType { - kind: 'ENUM'; - name: string; - description?: string; - enumValues: IntrospectionEnumValue[]; + readonly kind: "ENUM"; + readonly name: string; + readonly description?: string | void; + readonly enumValues: ReadonlyArray; } export interface IntrospectionInputObjectType { - kind: 'INPUT_OBJECT'; - name: string; - description?: string; - inputFields: IntrospectionInputValue[]; + readonly kind: "INPUT_OBJECT"; + readonly name: string; + readonly description?: string | void; + readonly inputFields: ReadonlyArray; +} + +export interface IntrospectionListTypeRef { + readonly kind: "LIST"; + readonly ofType: T; +} + +export interface IntrospectionNonNullTypeRef { + readonly kind: "NON_NULL"; + readonly ofType: T; } export type IntrospectionTypeRef = - | IntrospectionNamedTypeRef - | IntrospectionListTypeRef - | IntrospectionNonNullTypeRef; + | IntrospectionNamedTypeRef + | IntrospectionListTypeRef + | IntrospectionNonNullTypeRef | IntrospectionListTypeRef>; -export interface IntrospectionNamedTypeRef { - kind: string; - name: string; -} +export type IntrospectionOutputTypeRef = + | IntrospectionNamedTypeRef + | IntrospectionListTypeRef + | IntrospectionNonNullTypeRef | IntrospectionListTypeRef>; -export interface IntrospectionListTypeRef { - kind: 'LIST'; - ofType?: IntrospectionTypeRef; -} +export type IntrospectionInputTypeRef = + | IntrospectionNamedTypeRef + | IntrospectionListTypeRef + | IntrospectionNonNullTypeRef | IntrospectionListTypeRef>; -export interface IntrospectionNonNullTypeRef { - kind: 'NON_NULL'; - ofType?: IntrospectionTypeRef; +export interface IntrospectionNamedTypeRef { + readonly kind: T["kind"]; + readonly name: string; } export interface IntrospectionField { - name: string; - description?: string; - args: IntrospectionInputValue[]; - type: IntrospectionTypeRef; - isDeprecated: boolean; - deprecationReason?: string; + readonly name: string; + readonly description?: string | void; + readonly args: ReadonlyArray; + readonly type: IntrospectionOutputTypeRef; + readonly isDeprecated: boolean; + readonly deprecationReason?: string | void; } export interface IntrospectionInputValue { - name: string; - description?: string; - type: IntrospectionTypeRef; - defaultValue?: string; + readonly name: string; + readonly description?: string | void; + readonly type: IntrospectionInputTypeRef; + readonly defaultValue?: string | void; } export interface IntrospectionEnumValue { - name: string; - description?: string; - isDeprecated: boolean; - deprecationReason?: string; + readonly name: string; + readonly description?: string | void; + readonly isDeprecated: boolean; + readonly deprecationReason?: string | void; } export interface IntrospectionDirective { - name: string; - description?: string; - locations: DirectiveLocationEnum[]; - args: IntrospectionInputValue[]; + readonly name: string; + readonly description?: string | void; + readonly locations: ReadonlyArray; + readonly args: ReadonlyArray; } diff --git a/types/graphql/utilities/isValidJSValue.d.ts b/types/graphql/utilities/isValidJSValue.d.ts index 911d8fea67..d45d104ffd 100644 --- a/types/graphql/utilities/isValidJSValue.d.ts +++ b/types/graphql/utilities/isValidJSValue.d.ts @@ -1,8 +1,6 @@ -import { GraphQLInputType } from '../type/definition'; +import { GraphQLInputType } from "../type/definition"; /** - * Given a JavaScript value and a GraphQL type, determine if the value will be - * accepted for that type. This is primarily useful for validating the - * runtime values of query variables. + * Deprecated. Use coerceValue() directly for richer information. */ export function isValidJSValue(value: any, type: GraphQLInputType): string[]; diff --git a/types/graphql/utilities/isValidLiteralValue.d.ts b/types/graphql/utilities/isValidLiteralValue.d.ts index 4ad03d1013..6a9275bce9 100644 --- a/types/graphql/utilities/isValidLiteralValue.d.ts +++ b/types/graphql/utilities/isValidLiteralValue.d.ts @@ -1,14 +1,10 @@ -import { ValueNode } from '../language/ast'; -import { GraphQLInputType } from '../type/definition'; +import { GraphQLError } from "../error/GraphQLError"; +import { ValueNode } from "../language/ast"; +import { GraphQLInputType } from "../type/definition"; /** - * Utility for validators which determines if a value literal AST is valid given - * an input type. + * Utility which determines if a value literal node is valid for an input type. * - * Note that this only validates literal values, variables are assumed to - * provide values of the correct type. + * Deprecated. Rely on validation for documents containing literal values. */ -export function isValidLiteralValue( - type: GraphQLInputType, - valueNode: ValueNode, -): string[]; +export function isValidLiteralValue(type: GraphQLInputType, valueNode: ValueNode): ReadonlyArray; diff --git a/types/graphql/utilities/lexicographicSortSchema.d.ts b/types/graphql/utilities/lexicographicSortSchema.d.ts new file mode 100644 index 0000000000..24ec208bba --- /dev/null +++ b/types/graphql/utilities/lexicographicSortSchema.d.ts @@ -0,0 +1,6 @@ +import { GraphQLSchema } from "../type/schema"; + +/** + * Sort GraphQLSchema. + */ +export function lexicographicSortSchema(schema: GraphQLSchema): GraphQLSchema; diff --git a/types/graphql/utilities/schemaPrinter.d.ts b/types/graphql/utilities/schemaPrinter.d.ts index f9cf9ad209..8e3aefe7fc 100644 --- a/types/graphql/utilities/schemaPrinter.d.ts +++ b/types/graphql/utilities/schemaPrinter.d.ts @@ -1,12 +1,19 @@ -import { GraphQLSchema } from '../type/schema'; -import { GraphQLType } from '../type/definition'; +import { GraphQLSchema } from "../type/schema"; +import { GraphQLType, GraphQLNamedType } from "../type/definition"; -export interface PrinterOptions { - commentDescriptions?: boolean; +export interface Options { + commentDescriptions?: boolean; } -export function printSchema(schema: GraphQLSchema, options?: PrinterOptions): string; +/** + * Accepts options as a second argument: + * + * - commentDescriptions: + * Provide true to use preceding comments as the description. + * + */ +export function printSchema(schema: GraphQLSchema, options?: Options): string; -export function printIntrospectionSchema(schema: GraphQLSchema, options?: PrinterOptions): string; +export function printIntrospectionSchema(schema: GraphQLSchema, options?: Options): string; -export function printType(type: GraphQLType, options?: PrinterOptions): string; +export function printType(type: GraphQLNamedType, options?: Options): string; diff --git a/types/graphql/utilities/separateOperations.d.ts b/types/graphql/utilities/separateOperations.d.ts index a10ad0a29e..6035084860 100644 --- a/types/graphql/utilities/separateOperations.d.ts +++ b/types/graphql/utilities/separateOperations.d.ts @@ -1,5 +1,9 @@ -import { DocumentNode, OperationDefinitionNode } from '../language/ast'; +import { DocumentNode, OperationDefinitionNode } from "../language/ast"; -export function separateOperations( - documentAST: DocumentNode, -): { [operationName: string]: DocumentNode }; +/** + * separateOperations accepts a single AST document which may contain many + * operations and fragments and returns a collection of AST documents each of + * which contains a single operation as well the fragment definitions it + * refers to. + */ +export function separateOperations(documentAST: DocumentNode): { [key: string]: DocumentNode }; diff --git a/types/graphql/utilities/typeComparators.d.ts b/types/graphql/utilities/typeComparators.d.ts index ca0cdaf6c2..7bf0b9ebdf 100644 --- a/types/graphql/utilities/typeComparators.d.ts +++ b/types/graphql/utilities/typeComparators.d.ts @@ -1,9 +1,5 @@ -import { - GraphQLType, - GraphQLCompositeType, - GraphQLAbstractType, -} from '../type/definition'; -import { GraphQLSchema } from '../type/schema'; +import { GraphQLType, GraphQLCompositeType, GraphQLAbstractType } from "../type/definition"; +import { GraphQLSchema } from "../type/schema"; /** * Provided two types, return true if the types are equal (invariant). @@ -14,11 +10,7 @@ export function isEqualType(typeA: GraphQLType, typeB: GraphQLType): boolean; * Provided a type and a super type, return true if the first type is either * equal or a subset of the second super type (covariant). */ -export function isTypeSubTypeOf( - schema: GraphQLSchema, - maybeSubType: GraphQLType, - superType: GraphQLType, -): boolean; +export function isTypeSubTypeOf(schema: GraphQLSchema, maybeSubType: GraphQLType, superType: GraphQLType): boolean; /** * Provided two composite types, determine if they "overlap". Two composite @@ -30,7 +22,7 @@ export function isTypeSubTypeOf( * This function is commutative. */ export function doTypesOverlap( - schema: GraphQLSchema, - typeA: GraphQLCompositeType, - typeB: GraphQLCompositeType, + schema: GraphQLSchema, + typeA: GraphQLCompositeType, + typeB: GraphQLCompositeType ): boolean; diff --git a/types/graphql/utilities/typeFromAST.d.ts b/types/graphql/utilities/typeFromAST.d.ts index 415cbd2636..f2adaa7762 100644 --- a/types/graphql/utilities/typeFromAST.d.ts +++ b/types/graphql/utilities/typeFromAST.d.ts @@ -1,8 +1,16 @@ -import { TypeNode } from '../language/ast'; -import { GraphQLType, GraphQLNullableType } from '../type/definition'; -import { GraphQLSchema } from '../type/schema'; +import { TypeNode, NamedTypeNode, ListTypeNode, NonNullTypeNode } from "../language/ast"; +import { GraphQLType, GraphQLNullableType, GraphQLNamedType, GraphQLList, GraphQLNonNull } from "../type/definition"; +import { GraphQLSchema } from "../type/schema"; -export function typeFromAST( - schema: GraphQLSchema, - typeNode: TypeNode, -): GraphQLType; +/** + * Given a Schema and an AST node describing a type, return a GraphQLType + * definition which applies to that type. For example, if provided the parsed + * AST node for `[User]`, a GraphQLList instance will be returned, containing + * the type called "User" found in the schema. If a type called "User" is not + * found in the schema, then undefined will be returned. + */ +export function typeFromAST(schema: GraphQLSchema, typeNode: NamedTypeNode): GraphQLNamedType | undefined; + +export function typeFromAST(schema: GraphQLSchema, typeNode: ListTypeNode): GraphQLList | undefined; + +export function typeFromAST(schema: GraphQLSchema, typeNode: NonNullTypeNode): GraphQLNonNull | undefined; diff --git a/types/graphql/utilities/valueFromAST.d.ts b/types/graphql/utilities/valueFromAST.d.ts index 0bfbf04981..cd67108aad 100644 --- a/types/graphql/utilities/valueFromAST.d.ts +++ b/types/graphql/utilities/valueFromAST.d.ts @@ -1,15 +1,28 @@ -import { GraphQLInputType } from '../type/definition'; -import { - ValueNode, - VariableNode, - ListValueNode, - ObjectValueNode, -} from '../language/ast'; +import { GraphQLInputType } from "../type/definition"; +import { ValueNode, VariableNode, ListValueNode, ObjectValueNode } from "../language/ast"; +/** + * Produces a JavaScript value given a GraphQL Value AST. + * + * A GraphQL type must be provided, which will be used to interpret different + * GraphQL Value literals. + * + * Returns `undefined` when the value could not be validly coerced according to + * the provided type. + * + * | GraphQL Value | JSON Value | + * | -------------------- | ------------- | + * | Input Object | Object | + * | List | Array | + * | Boolean | Boolean | + * | String | String | + * | Int / Float | Number | + * | Enum Value | Mixed | + * | NullValue | null | + * + */ export function valueFromAST( - valueNode: ValueNode, - type: GraphQLInputType, - variables?: { - [key: string]: any; - }, + valueNode: ValueNode | void, + type: GraphQLInputType, + variables?: { [key: string]: any } | void ): any; diff --git a/types/graphql/utilities/valueFromASTUntyped.d.ts b/types/graphql/utilities/valueFromASTUntyped.d.ts new file mode 100644 index 0000000000..98d3137694 --- /dev/null +++ b/types/graphql/utilities/valueFromASTUntyped.d.ts @@ -0,0 +1,19 @@ +import { ValueNode } from "../language/ast"; + +/** + * Produces a JavaScript value given a GraphQL Value AST. + * + * Unlike `valueFromAST()`, no type is provided. The resulting JavaScript value + * will reflect the provided GraphQL value AST. + * + * | GraphQL Value | JavaScript Value | + * | -------------------- | ---------------- | + * | Input Object | Object | + * | List | Array | + * | Boolean | Boolean | + * | String / Enum | String | + * | Int / Float | Number | + * | Null | null | + * + */ +export function valueFromASTUntyped(valueNode: ValueNode, variables?: { [key: string]: any } | void): any; diff --git a/types/graphql/validation/ValidationContext.d.ts b/types/graphql/validation/ValidationContext.d.ts new file mode 100644 index 0000000000..0f8a4ea8f7 --- /dev/null +++ b/types/graphql/validation/ValidationContext.d.ts @@ -0,0 +1,63 @@ +import { GraphQLError } from "../error"; +import { + DocumentNode, + OperationDefinitionNode, + VariableNode, + SelectionSetNode, + FragmentSpreadNode, + FragmentDefinitionNode, +} from "../language/ast"; +import { GraphQLSchema } from "../type/schema"; +import { + GraphQLInputType, + GraphQLOutputType, + GraphQLCompositeType, + GraphQLField, + GraphQLArgument, +} from "../type/definition"; +import { GraphQLDirective } from "../type/directives"; +import { TypeInfo } from "../utilities/TypeInfo"; + +type NodeWithSelectionSet = OperationDefinitionNode | FragmentDefinitionNode; +type VariableUsage = { node: VariableNode; type: GraphQLInputType | void }; + +/** + * 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 default class ValidationContext { + constructor(schema: GraphQLSchema, ast: DocumentNode, typeInfo: TypeInfo); + + reportError(error: GraphQLError): undefined; + + getErrors(): ReadonlyArray; + + getSchema(): GraphQLSchema; + + getDocument(): DocumentNode; + + getFragment(name: string): FragmentDefinitionNode | void; + + getFragmentSpreads(node: SelectionSetNode): ReadonlyArray; + + getRecursivelyReferencedFragments(operation: OperationDefinitionNode): ReadonlyArray; + + getVariableUsages(node: NodeWithSelectionSet): ReadonlyArray; + + getRecursiveVariableUsages(operation: OperationDefinitionNode): ReadonlyArray; + + getType(): GraphQLOutputType | void; + + getParentType(): GraphQLCompositeType | void; + + getInputType(): GraphQLInputType | void; + + getParentInputType(): GraphQLInputType | void; + + getFieldDef(): GraphQLField | void; + + getDirective(): GraphQLDirective | void; + + getArgument(): GraphQLArgument | void; +} diff --git a/types/graphql/validation/index.d.ts b/types/graphql/validation/index.d.ts index b8cb9ddd00..911c592432 100644 --- a/types/graphql/validation/index.d.ts +++ b/types/graphql/validation/index.d.ts @@ -1,128 +1,84 @@ -export { validate, ValidationContext } from './validate'; -export { specifiedRules } from './specifiedRules'; +export { validate } from "./validate"; -// Spec Section: "Argument Values Type Correctness" -export { - ArgumentsOfCorrectType as ArgumentsOfCorrectTypeRule, -} from './rules/ArgumentsOfCorrectType'; +import ValidationContext from "./ValidationContext"; +export { ValidationContext }; -// Spec Section: "Variable Default Values Are Correctly Typed" -export { - DefaultValuesOfCorrectType as DefaultValuesOfCorrectTypeRule, -} from './rules/DefaultValuesOfCorrectType'; +export { specifiedRules } from "./specifiedRules"; // Spec Section: "Field Selections on Objects, Interfaces, and Unions Types" -export { - FieldsOnCorrectType as FieldsOnCorrectTypeRule, -} from './rules/FieldsOnCorrectType'; +export { FieldsOnCorrectType as FieldsOnCorrectTypeRule } from "./rules/FieldsOnCorrectType"; // Spec Section: "Fragments on Composite Types" -export { - FragmentsOnCompositeTypes as FragmentsOnCompositeTypesRule, -} from './rules/FragmentsOnCompositeTypes'; +export { FragmentsOnCompositeTypes as FragmentsOnCompositeTypesRule } from "./rules/FragmentsOnCompositeTypes"; // Spec Section: "Argument Names" -export { - KnownArgumentNames as KnownArgumentNamesRule, -} from './rules/KnownArgumentNames'; +export { KnownArgumentNames as KnownArgumentNamesRule } from "./rules/KnownArgumentNames"; // Spec Section: "Directives Are Defined" -export { - KnownDirectives as KnownDirectivesRule, -} from './rules/KnownDirectives'; +export { KnownDirectives as KnownDirectivesRule } from "./rules/KnownDirectives"; // Spec Section: "Fragment spread target defined" -export { - KnownFragmentNames as KnownFragmentNamesRule, -} from './rules/KnownFragmentNames'; +export { KnownFragmentNames as KnownFragmentNamesRule } from "./rules/KnownFragmentNames"; // Spec Section: "Fragment Spread Type Existence" -export { KnownTypeNames as KnownTypeNamesRule } from './rules/KnownTypeNames'; +export { KnownTypeNames as KnownTypeNamesRule } from "./rules/KnownTypeNames"; // Spec Section: "Lone Anonymous Operation" -export { - LoneAnonymousOperation as LoneAnonymousOperationRule, -} from './rules/LoneAnonymousOperation'; +export { LoneAnonymousOperation as LoneAnonymousOperationRule } from "./rules/LoneAnonymousOperation"; // Spec Section: "Fragments must not form cycles" -export { - NoFragmentCycles as NoFragmentCyclesRule, -} from './rules/NoFragmentCycles'; +export { NoFragmentCycles as NoFragmentCyclesRule } from "./rules/NoFragmentCycles"; // Spec Section: "All Variable Used Defined" -export { - NoUndefinedVariables as NoUndefinedVariablesRule, -} from './rules/NoUndefinedVariables'; +export { NoUndefinedVariables as NoUndefinedVariablesRule } from "./rules/NoUndefinedVariables"; // Spec Section: "Fragments must be used" -export { - NoUnusedFragments as NoUnusedFragmentsRule, -} from './rules/NoUnusedFragments'; +export { NoUnusedFragments as NoUnusedFragmentsRule } from "./rules/NoUnusedFragments"; // Spec Section: "All Variables Used" -export { - NoUnusedVariables as NoUnusedVariablesRule, -} from './rules/NoUnusedVariables'; +export { NoUnusedVariables as NoUnusedVariablesRule } from "./rules/NoUnusedVariables"; // Spec Section: "Field Selection Merging" -export { - OverlappingFieldsCanBeMerged as OverlappingFieldsCanBeMergedRule, -} from './rules/OverlappingFieldsCanBeMerged'; +export { OverlappingFieldsCanBeMerged as OverlappingFieldsCanBeMergedRule } from "./rules/OverlappingFieldsCanBeMerged"; // Spec Section: "Fragment spread is possible" -export { - PossibleFragmentSpreads as PossibleFragmentSpreadsRule, -} from './rules/PossibleFragmentSpreads'; +export { PossibleFragmentSpreads as PossibleFragmentSpreadsRule } from "./rules/PossibleFragmentSpreads"; // Spec Section: "Argument Optionality" -export { - ProvidedNonNullArguments as ProvidedNonNullArgumentsRule, -} from './rules/ProvidedNonNullArguments'; +export { ProvidedNonNullArguments as ProvidedNonNullArgumentsRule } from "./rules/ProvidedNonNullArguments"; // Spec Section: "Leaf Field Selections" -export { ScalarLeafs as ScalarLeafsRule } from './rules/ScalarLeafs'; +export { ScalarLeafs as ScalarLeafsRule } from "./rules/ScalarLeafs"; // Spec Section: "Subscriptions with Single Root Field" -export { - SingleFieldSubscriptions as SingleFieldSubscriptionsRule, -} from './rules/SingleFieldSubscriptions'; +export { SingleFieldSubscriptions as SingleFieldSubscriptionsRule } from "./rules/SingleFieldSubscriptions"; // Spec Section: "Argument Uniqueness" -export { - UniqueArgumentNames as UniqueArgumentNamesRule, -} from './rules/UniqueArgumentNames'; +export { UniqueArgumentNames as UniqueArgumentNamesRule } from "./rules/UniqueArgumentNames"; // Spec Section: "Directives Are Unique Per Location" -export { - UniqueDirectivesPerLocation as UniqueDirectivesPerLocationRule, -} from './rules/UniqueDirectivesPerLocation'; +export { UniqueDirectivesPerLocation as UniqueDirectivesPerLocationRule } from "./rules/UniqueDirectivesPerLocation"; // Spec Section: "Fragment Name Uniqueness" -export { - UniqueFragmentNames as UniqueFragmentNamesRule, -} from './rules/UniqueFragmentNames'; +export { UniqueFragmentNames as UniqueFragmentNamesRule } from "./rules/UniqueFragmentNames"; // Spec Section: "Input Object Field Uniqueness" -export { - UniqueInputFieldNames as UniqueInputFieldNamesRule, -} from './rules/UniqueInputFieldNames'; +export { UniqueInputFieldNames as UniqueInputFieldNamesRule } from "./rules/UniqueInputFieldNames"; // Spec Section: "Operation Name Uniqueness" -export { - UniqueOperationNames as UniqueOperationNamesRule, -} from './rules/UniqueOperationNames'; +export { UniqueOperationNames as UniqueOperationNamesRule } from "./rules/UniqueOperationNames"; // Spec Section: "Variable Uniqueness" -export { - UniqueVariableNames as UniqueVariableNamesRule, -} from './rules/UniqueVariableNames'; +export { UniqueVariableNames as UniqueVariableNamesRule } from "./rules/UniqueVariableNames"; + +// Spec Section: "Values Type Correctness" +export { ValuesOfCorrectType as ValuesOfCorrectTypeRule } from "./rules/ValuesOfCorrectType"; // Spec Section: "Variables are Input Types" -export { - VariablesAreInputTypes as VariablesAreInputTypesRule, -} from './rules/VariablesAreInputTypes'; +export { VariablesAreInputTypes as VariablesAreInputTypesRule } from "./rules/VariablesAreInputTypes"; + +// Spec Section: "Variables Default Value Is Allowed" +export { VariablesDefaultValueAllowed as VariablesDefaultValueAllowedRule } from "./rules/VariablesDefaultValueAllowed"; // Spec Section: "All Variable Usages Are Allowed" -export { - VariablesInAllowedPosition as VariablesInAllowedPositionRule, -} from './rules/VariablesInAllowedPosition'; +export { VariablesInAllowedPosition as VariablesInAllowedPositionRule } from "./rules/VariablesInAllowedPosition"; diff --git a/types/graphql/validation/rules/ArgumentsOfCorrectType.d.ts b/types/graphql/validation/rules/ArgumentsOfCorrectType.d.ts deleted file mode 100644 index f7247d0a9c..0000000000 --- a/types/graphql/validation/rules/ArgumentsOfCorrectType.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ValidationContext } from '../index'; - -/** - * Argument values of correct type - * - * A GraphQL document is only valid if all field argument literal values are - * of the type expected by their position. - */ -export function ArgumentsOfCorrectType(context: ValidationContext): any; diff --git a/types/graphql/validation/rules/DefaultValuesOfCorrectType.d.ts b/types/graphql/validation/rules/DefaultValuesOfCorrectType.d.ts deleted file mode 100644 index 88b3a824f2..0000000000 --- a/types/graphql/validation/rules/DefaultValuesOfCorrectType.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ValidationContext } from '../index'; - -/** - * Variable default values of correct type - * - * A GraphQL document is only valid if all variable default values are of the - * type expected by their definition. - */ -export function DefaultValuesOfCorrectType(context: ValidationContext): any; diff --git a/types/graphql/validation/rules/ExecutableDefinitions.d.ts b/types/graphql/validation/rules/ExecutableDefinitions.d.ts new file mode 100644 index 0000000000..423e0dcad2 --- /dev/null +++ b/types/graphql/validation/rules/ExecutableDefinitions.d.ts @@ -0,0 +1,12 @@ +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; + +export function nonExecutableDefinitionMessage(defName: string): string; + +/** + * Executable definitions + * + * A GraphQL document is only valid for execution if all definitions are either + * operation or fragment definitions. + */ +export function ExecutableDefinitions(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/FieldsOnCorrectType.d.ts b/types/graphql/validation/rules/FieldsOnCorrectType.d.ts index 19609b2b65..c5c7f053c2 100644 --- a/types/graphql/validation/rules/FieldsOnCorrectType.d.ts +++ b/types/graphql/validation/rules/FieldsOnCorrectType.d.ts @@ -1,4 +1,5 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; /** * Fields on correct type @@ -6,4 +7,4 @@ import { ValidationContext } from '../index'; * A GraphQL document is only valid if all fields selected are defined by the * parent type, or are an allowed meta field such as __typename. */ -export function FieldsOnCorrectType(context: ValidationContext): any; +export function FieldsOnCorrectType(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/FragmentsOnCompositeTypes.d.ts b/types/graphql/validation/rules/FragmentsOnCompositeTypes.d.ts index d6fffd4337..7c760e331f 100644 --- a/types/graphql/validation/rules/FragmentsOnCompositeTypes.d.ts +++ b/types/graphql/validation/rules/FragmentsOnCompositeTypes.d.ts @@ -1,4 +1,10 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; +import { GraphQLType } from "../../type/definition"; + +export function inlineFragmentOnNonCompositeErrorMessage(type: GraphQLType): string; + +export function fragmentOnNonCompositeErrorMessage(fragName: string, type: GraphQLType): string; /** * Fragments on composite type @@ -7,4 +13,4 @@ import { ValidationContext } from '../index'; * can only be spread into a composite type (object, interface, or union), the * type condition must also be a composite type. */ -export function FragmentsOnCompositeTypes(context: ValidationContext): any; +export function FragmentsOnCompositeTypes(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/KnownArgumentNames.d.ts b/types/graphql/validation/rules/KnownArgumentNames.d.ts index 4477b62a75..9602c34c43 100644 --- a/types/graphql/validation/rules/KnownArgumentNames.d.ts +++ b/types/graphql/validation/rules/KnownArgumentNames.d.ts @@ -1,4 +1,18 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; + +export function unknownArgMessage( + argName: string, + fieldName: string, + typeName: string, + suggestedArgs: Array +): string; + +export function unknownDirectiveArgMessage( + argName: string, + directiveName: string, + suggestedArgs: Array +): string; /** * Known argument names @@ -6,4 +20,4 @@ import { ValidationContext } from '../index'; * A GraphQL field is only valid if all supplied arguments are defined by * that field. */ -export function KnownArgumentNames(context: ValidationContext): any; +export function KnownArgumentNames(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/KnownDirectives.d.ts b/types/graphql/validation/rules/KnownDirectives.d.ts index 68c6acf549..179e65b9f7 100644 --- a/types/graphql/validation/rules/KnownDirectives.d.ts +++ b/types/graphql/validation/rules/KnownDirectives.d.ts @@ -1,4 +1,9 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; + +export function unknownDirectiveMessage(directiveName: string): string; + +export function misplacedDirectiveMessage(directiveName: string, location: string): string; /** * Known directives @@ -6,4 +11,4 @@ import { ValidationContext } from '../index'; * A GraphQL document is only valid if all `@directives` are known by the * schema and legally positioned. */ -export function KnownDirectives(context: ValidationContext): any; +export function KnownDirectives(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/KnownFragmentNames.d.ts b/types/graphql/validation/rules/KnownFragmentNames.d.ts index b904f22d89..40405f67dd 100644 --- a/types/graphql/validation/rules/KnownFragmentNames.d.ts +++ b/types/graphql/validation/rules/KnownFragmentNames.d.ts @@ -1,4 +1,7 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; + +export function unknownFragmentMessage(fragName: string): string; /** * Known fragment names @@ -6,4 +9,4 @@ import { ValidationContext } from '../index'; * A GraphQL document is only valid if all `...Fragment` fragment spreads refer * to fragments defined in the same document. */ -export function KnownFragmentNames(context: ValidationContext): any; +export function KnownFragmentNames(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/KnownTypeNames.d.ts b/types/graphql/validation/rules/KnownTypeNames.d.ts index 48b15318da..6bef3661f9 100644 --- a/types/graphql/validation/rules/KnownTypeNames.d.ts +++ b/types/graphql/validation/rules/KnownTypeNames.d.ts @@ -1,4 +1,7 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; + +export function unknownTypeMessage(typeName: string, suggestedTypes: Array): string; /** * Known type names @@ -6,4 +9,4 @@ import { ValidationContext } from '../index'; * A GraphQL document is only valid if referenced types (specifically * variable definitions and fragment conditions) are defined by the type schema. */ -export function KnownTypeNames(context: ValidationContext): any; +export function KnownTypeNames(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/LoneAnonymousOperation.d.ts b/types/graphql/validation/rules/LoneAnonymousOperation.d.ts index 4ce6abcba9..881814c4d2 100644 --- a/types/graphql/validation/rules/LoneAnonymousOperation.d.ts +++ b/types/graphql/validation/rules/LoneAnonymousOperation.d.ts @@ -1,4 +1,7 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; + +export function anonOperationNotAloneMessage(): string; /** * Lone anonymous operation @@ -6,4 +9,4 @@ import { ValidationContext } from '../index'; * A GraphQL document is only valid if when it contains an anonymous operation * (the query short-hand) that it contains only that one operation definition. */ -export function LoneAnonymousOperation(context: ValidationContext): any; +export function LoneAnonymousOperation(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/NoFragmentCycles.d.ts b/types/graphql/validation/rules/NoFragmentCycles.d.ts index fed5982fc8..f119c5a487 100644 --- a/types/graphql/validation/rules/NoFragmentCycles.d.ts +++ b/types/graphql/validation/rules/NoFragmentCycles.d.ts @@ -1,3 +1,6 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; -export function NoFragmentCycles(context: ValidationContext): any; +export function cycleErrorMessage(fragName: string, spreadNames: Array): string; + +export function NoFragmentCycles(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/NoUndefinedVariables.d.ts b/types/graphql/validation/rules/NoUndefinedVariables.d.ts index 51d30b8fd1..611ad01a9b 100644 --- a/types/graphql/validation/rules/NoUndefinedVariables.d.ts +++ b/types/graphql/validation/rules/NoUndefinedVariables.d.ts @@ -1,4 +1,7 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; + +export function undefinedVarMessage(varName: string, opName: string | void): string; /** * No undefined variables @@ -6,4 +9,4 @@ import { ValidationContext } from '../index'; * A GraphQL operation is only valid if all variables encountered, both directly * and via fragment spreads, are defined by that operation. */ -export function NoUndefinedVariables(context: ValidationContext): any; +export function NoUndefinedVariables(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/NoUnusedFragments.d.ts b/types/graphql/validation/rules/NoUnusedFragments.d.ts index 7f4d431299..6f757c16c2 100644 --- a/types/graphql/validation/rules/NoUnusedFragments.d.ts +++ b/types/graphql/validation/rules/NoUnusedFragments.d.ts @@ -1,4 +1,7 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; + +export function unusedFragMessage(fragName: string): string; /** * No unused fragments @@ -6,4 +9,4 @@ import { ValidationContext } from '../index'; * A GraphQL document is only valid if all fragment definitions are spread * within operations, or spread within other fragments spread within operations. */ -export function NoUnusedFragments(context: ValidationContext): any; +export function NoUnusedFragments(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/NoUnusedVariables.d.ts b/types/graphql/validation/rules/NoUnusedVariables.d.ts index 6eb2d984aa..10282cdacd 100644 --- a/types/graphql/validation/rules/NoUnusedVariables.d.ts +++ b/types/graphql/validation/rules/NoUnusedVariables.d.ts @@ -1,4 +1,7 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; + +export function unusedVariableMessage(varName: string, opName: string | void): string; /** * No unused variables @@ -6,4 +9,4 @@ import { ValidationContext } from '../index'; * A GraphQL operation is only valid if all variables defined by an operation * are used, either directly or within a spread fragment. */ -export function NoUnusedVariables(context: ValidationContext): any; +export function NoUnusedVariables(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/OverlappingFieldsCanBeMerged.d.ts b/types/graphql/validation/rules/OverlappingFieldsCanBeMerged.d.ts index f21edbd2cb..1dfa62a089 100644 --- a/types/graphql/validation/rules/OverlappingFieldsCanBeMerged.d.ts +++ b/types/graphql/validation/rules/OverlappingFieldsCanBeMerged.d.ts @@ -1,4 +1,7 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; + +export function fieldsConflictMessage(responseName: string, reason: ConflictReasonMessage): string; /** * Overlapping fields can be merged @@ -7,4 +10,10 @@ import { ValidationContext } from '../index'; * fragments) either correspond to distinct response names or can be merged * without ambiguity. */ -export function OverlappingFieldsCanBeMerged(context: ValidationContext): any; +export function OverlappingFieldsCanBeMerged(context: ValidationContext): ASTVisitor; + +// Field name and reason. +type ConflictReason = [string, string]; + +// Reason is a string, or a nested list of conflicts. +type ConflictReasonMessage = string | Array; diff --git a/types/graphql/validation/rules/PossibleFragmentSpreads.d.ts b/types/graphql/validation/rules/PossibleFragmentSpreads.d.ts index 8defb47721..f318cb189e 100644 --- a/types/graphql/validation/rules/PossibleFragmentSpreads.d.ts +++ b/types/graphql/validation/rules/PossibleFragmentSpreads.d.ts @@ -1,4 +1,10 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; +import { GraphQLType } from "../../type/definition"; + +export function typeIncompatibleSpreadMessage(fragName: string, parentType: GraphQLType, fragType: GraphQLType): string; + +export function typeIncompatibleAnonSpreadMessage(parentType: GraphQLType, fragType: GraphQLType): string; /** * Possible fragment spread @@ -7,4 +13,4 @@ import { ValidationContext } from '../index'; * be true: if there is a non-empty intersection of the possible parent types, * and possible types which pass the type condition. */ -export function PossibleFragmentSpreads(context: ValidationContext): any; +export function PossibleFragmentSpreads(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/ProvidedNonNullArguments.d.ts b/types/graphql/validation/rules/ProvidedNonNullArguments.d.ts index 4d5334b9fb..e442b47f83 100644 --- a/types/graphql/validation/rules/ProvidedNonNullArguments.d.ts +++ b/types/graphql/validation/rules/ProvidedNonNullArguments.d.ts @@ -1,4 +1,10 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; +import { GraphQLType } from "../../type/definition"; + +export function missingFieldArgMessage(fieldName: string, argName: string, type: GraphQLType): string; + +export function missingDirectiveArgMessage(directiveName: string, argName: string, type: GraphQLType): string; /** * Provided required arguments @@ -6,4 +12,4 @@ import { ValidationContext } from '../index'; * A field or directive is only valid if all required (non-null) field arguments * have been provided. */ -export function ProvidedNonNullArguments(context: ValidationContext): any; +export function ProvidedNonNullArguments(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/ScalarLeafs.d.ts b/types/graphql/validation/rules/ScalarLeafs.d.ts index afdc575671..5bbf85043a 100644 --- a/types/graphql/validation/rules/ScalarLeafs.d.ts +++ b/types/graphql/validation/rules/ScalarLeafs.d.ts @@ -1,4 +1,10 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; +import { GraphQLType } from "../../type/definition"; + +export function noSubselectionAllowedMessage(fieldName: string, type: GraphQLType): string; + +export function requiredSubselectionMessage(fieldName: string, type: GraphQLType): string; /** * Scalar leafs @@ -6,4 +12,4 @@ import { ValidationContext } from '../index'; * A GraphQL document is valid only if all leaf fields (fields without * sub selections) are of scalar or enum types. */ -export function ScalarLeafs(context: ValidationContext): any; +export function ScalarLeafs(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/SingleFieldSubscriptions.d.ts b/types/graphql/validation/rules/SingleFieldSubscriptions.d.ts index 01a2654a16..fef0869710 100644 --- a/types/graphql/validation/rules/SingleFieldSubscriptions.d.ts +++ b/types/graphql/validation/rules/SingleFieldSubscriptions.d.ts @@ -1,8 +1,11 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; + +export function singleFieldOnlyMessage(name: string | void): string; /** * Subscriptions must only include one field. * * A GraphQL subscription is valid only if it contains a single root field. */ -export function SingleFieldSubscriptions(context: ValidationContext): any; +export function SingleFieldSubscriptions(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/UniqueArgumentNames.d.ts b/types/graphql/validation/rules/UniqueArgumentNames.d.ts index 8cc166d07a..47a59c3362 100644 --- a/types/graphql/validation/rules/UniqueArgumentNames.d.ts +++ b/types/graphql/validation/rules/UniqueArgumentNames.d.ts @@ -1,4 +1,7 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; + +export function duplicateArgMessage(argName: string): string; /** * Unique argument names @@ -6,4 +9,4 @@ import { ValidationContext } from '../index'; * A GraphQL field or directive is only valid if all supplied arguments are * uniquely named. */ -export function UniqueArgumentNames(context: ValidationContext): any; +export function UniqueArgumentNames(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/UniqueDirectivesPerLocation.d.ts b/types/graphql/validation/rules/UniqueDirectivesPerLocation.d.ts index 70ea02cd9c..f3d6327c23 100644 --- a/types/graphql/validation/rules/UniqueDirectivesPerLocation.d.ts +++ b/types/graphql/validation/rules/UniqueDirectivesPerLocation.d.ts @@ -1,4 +1,7 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; + +export function duplicateDirectiveMessage(directiveName: string): string; /** * Unique directive names per location @@ -6,4 +9,4 @@ import { ValidationContext } from '../index'; * A GraphQL document is only valid if all directives at a given location * are uniquely named. */ -export function UniqueDirectivesPerLocation(context: ValidationContext): any; +export function UniqueDirectivesPerLocation(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/UniqueFragmentNames.d.ts b/types/graphql/validation/rules/UniqueFragmentNames.d.ts index c505968f6a..9a2554200c 100644 --- a/types/graphql/validation/rules/UniqueFragmentNames.d.ts +++ b/types/graphql/validation/rules/UniqueFragmentNames.d.ts @@ -1,8 +1,11 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; + +export function duplicateFragmentNameMessage(fragName: string): string; /** * Unique fragment names * * A GraphQL document is only valid if all defined fragments have unique names. */ -export function UniqueFragmentNames(context: ValidationContext): any; +export function UniqueFragmentNames(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/UniqueInputFieldNames.d.ts b/types/graphql/validation/rules/UniqueInputFieldNames.d.ts index cebd71b79b..34d5b9845a 100644 --- a/types/graphql/validation/rules/UniqueInputFieldNames.d.ts +++ b/types/graphql/validation/rules/UniqueInputFieldNames.d.ts @@ -1,4 +1,7 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; + +export function duplicateInputFieldMessage(fieldName: string): string; /** * Unique input field names @@ -6,4 +9,4 @@ import { ValidationContext } from '../index'; * A GraphQL input object value is only valid if all supplied fields are * uniquely named. */ -export function UniqueInputFieldNames(context: ValidationContext): any; +export function UniqueInputFieldNames(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/UniqueOperationNames.d.ts b/types/graphql/validation/rules/UniqueOperationNames.d.ts index 5b12cc0eed..221b1187c2 100644 --- a/types/graphql/validation/rules/UniqueOperationNames.d.ts +++ b/types/graphql/validation/rules/UniqueOperationNames.d.ts @@ -1,8 +1,11 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; + +export function duplicateOperationNameMessage(operationName: string): string; /** * Unique operation names * * A GraphQL document is only valid if all defined operations have unique names. */ -export function UniqueOperationNames(context: ValidationContext): any; +export function UniqueOperationNames(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/UniqueVariableNames.d.ts b/types/graphql/validation/rules/UniqueVariableNames.d.ts index ef8712fbc1..d0aaf0404e 100644 --- a/types/graphql/validation/rules/UniqueVariableNames.d.ts +++ b/types/graphql/validation/rules/UniqueVariableNames.d.ts @@ -1,8 +1,11 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; + +export function duplicateVariableMessage(variableName: string): string; /** * Unique variable names * * A GraphQL operation is only valid if all its variables are uniquely named. */ -export function UniqueVariableNames(context: ValidationContext): any; +export function UniqueVariableNames(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/ValuesOfCorrectType.d.ts b/types/graphql/validation/rules/ValuesOfCorrectType.d.ts new file mode 100644 index 0000000000..09314835ad --- /dev/null +++ b/types/graphql/validation/rules/ValuesOfCorrectType.d.ts @@ -0,0 +1,16 @@ +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; + +export function badValueMessage(typeName: string, valueName: string, message?: string): string; + +export function requiredFieldMessage(typeName: string, fieldName: string, fieldTypeName: string): string; + +export function unknownFieldMessage(typeName: string, fieldName: string, message?: string): string; + +/** + * Value literals of correct type + * + * A GraphQL document is only valid if all value literals are of the type + * expected at their position. + */ +export function ValuesOfCorrectType(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/VariablesAreInputTypes.d.ts b/types/graphql/validation/rules/VariablesAreInputTypes.d.ts index df079e52f9..32472e15fd 100644 --- a/types/graphql/validation/rules/VariablesAreInputTypes.d.ts +++ b/types/graphql/validation/rules/VariablesAreInputTypes.d.ts @@ -1,4 +1,7 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; + +export function nonInputTypeOnVarMessage(variableName: string, typeName: string): string; /** * Variables are input types @@ -6,4 +9,4 @@ import { ValidationContext } from '../index'; * A GraphQL operation is only valid if all the variables it defines are of * input types (scalar, enum, or input object). */ -export function VariablesAreInputTypes(context: ValidationContext): any; +export function VariablesAreInputTypes(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/VariablesDefaultValueAllowed.d.ts b/types/graphql/validation/rules/VariablesDefaultValueAllowed.d.ts new file mode 100644 index 0000000000..1961eb645e --- /dev/null +++ b/types/graphql/validation/rules/VariablesDefaultValueAllowed.d.ts @@ -0,0 +1,13 @@ +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; +import { GraphQLType } from "../../type/definition"; + +export function defaultForRequiredVarMessage(varName: string, type: GraphQLType, guessType: GraphQLType): string; + +/** + * Variable's default value is allowed + * + * A GraphQL document is only valid if all variable default values are allowed + * due to a variable not being required. + */ +export function VariablesDefaultValueAllowed(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/rules/VariablesInAllowedPosition.d.ts b/types/graphql/validation/rules/VariablesInAllowedPosition.d.ts index 6d3e513876..f21ed5c7fb 100644 --- a/types/graphql/validation/rules/VariablesInAllowedPosition.d.ts +++ b/types/graphql/validation/rules/VariablesInAllowedPosition.d.ts @@ -1,6 +1,10 @@ -import { ValidationContext } from '../index'; +import ValidationContext from "../ValidationContext"; +import { ASTVisitor } from "../../language/visitor"; +import { GraphQLType } from "../../type/definition"; + +export function badVarPosMessage(varName: string, varType: GraphQLType, expectedType: GraphQLType): string; /** * Variables passed to field arguments conform to type */ -export function VariablesInAllowedPosition(context: ValidationContext): any; +export function VariablesInAllowedPosition(context: ValidationContext): ASTVisitor; diff --git a/types/graphql/validation/specifiedRules.d.ts b/types/graphql/validation/specifiedRules.d.ts index c09c358cb1..8e9815377f 100644 --- a/types/graphql/validation/specifiedRules.d.ts +++ b/types/graphql/validation/specifiedRules.d.ts @@ -1,6 +1,90 @@ -import { ValidationContext } from './validate'; // It needs to check. +// Spec Section: "Executable Definitions" +import { ExecutableDefinitions } from "./rules/ExecutableDefinitions"; + +// Spec Section: "Operation Name Uniqueness" +import { UniqueOperationNames } from "./rules/UniqueOperationNames"; + +// Spec Section: "Lone Anonymous Operation" +import { LoneAnonymousOperation } from "./rules/LoneAnonymousOperation"; + +// Spec Section: "Subscriptions with Single Root Field" +import { SingleFieldSubscriptions } from "./rules/SingleFieldSubscriptions"; + +// Spec Section: "Fragment Spread Type Existence" +import { KnownTypeNames } from "./rules/KnownTypeNames"; + +// Spec Section: "Fragments on Composite Types" +import { FragmentsOnCompositeTypes } from "./rules/FragmentsOnCompositeTypes"; + +// Spec Section: "Variables are Input Types" +import { VariablesAreInputTypes } from "./rules/VariablesAreInputTypes"; + +// Spec Section: "Leaf Field Selections" +import { ScalarLeafs } from "./rules/ScalarLeafs"; + +// Spec Section: "Field Selections on Objects, Interfaces, and Unions Types" +import { FieldsOnCorrectType } from "./rules/FieldsOnCorrectType"; + +// Spec Section: "Fragment Name Uniqueness" +import { UniqueFragmentNames } from "./rules/UniqueFragmentNames"; + +// Spec Section: "Fragment spread target defined" +import { KnownFragmentNames } from "./rules/KnownFragmentNames"; + +// Spec Section: "Fragments must be used" +import { NoUnusedFragments } from "./rules/NoUnusedFragments"; + +// Spec Section: "Fragment spread is possible" +import { PossibleFragmentSpreads } from "./rules/PossibleFragmentSpreads"; + +// Spec Section: "Fragments must not form cycles" +import { NoFragmentCycles } from "./rules/NoFragmentCycles"; + +// Spec Section: "Variable Uniqueness" +import { UniqueVariableNames } from "./rules/UniqueVariableNames"; + +// Spec Section: "All Variable Used Defined" +import { NoUndefinedVariables } from "./rules/NoUndefinedVariables"; + +// Spec Section: "All Variables Used" +import { NoUnusedVariables } from "./rules/NoUnusedVariables"; + +// Spec Section: "Directives Are Defined" +import { KnownDirectives } from "./rules/KnownDirectives"; + +// Spec Section: "Directives Are Unique Per Location" +import { UniqueDirectivesPerLocation } from "./rules/UniqueDirectivesPerLocation"; + +// Spec Section: "Argument Names" +import { KnownArgumentNames } from "./rules/KnownArgumentNames"; + +// Spec Section: "Argument Uniqueness" +import { UniqueArgumentNames } from "./rules/UniqueArgumentNames"; + +// Spec Section: "Value Type Correctness" +import { ValuesOfCorrectType } from "./rules/ValuesOfCorrectType"; + +// Spec Section: "Argument Optionality" +import { ProvidedNonNullArguments } from "./rules/ProvidedNonNullArguments"; + +// Spec Section: "Variables Default Value Is Allowed" +import { VariablesDefaultValueAllowed } from "./rules/VariablesDefaultValueAllowed"; + +// Spec Section: "All Variable Usages Are Allowed" +import { VariablesInAllowedPosition } from "./rules/VariablesInAllowedPosition"; + +// Spec Section: "Field Selection Merging" +import { OverlappingFieldsCanBeMerged } from "./rules/OverlappingFieldsCanBeMerged"; + +// Spec Section: "Input Object Field Uniqueness" +import { UniqueInputFieldNames } from "./rules/UniqueInputFieldNames"; + +import ValidationContext from "./ValidationContext"; /** * This set includes all validation rules defined by the GraphQL spec. + * + * The order of the rules in this list has been adjusted to lead to the + * most clear output when encountering multiple validation errors. */ export const specifiedRules: Array<(context: ValidationContext) => any>; diff --git a/types/graphql/validation/validate.d.ts b/types/graphql/validation/validate.d.ts index 9e2fd479f1..9a5092d258 100644 --- a/types/graphql/validation/validate.d.ts +++ b/types/graphql/validation/validate.d.ts @@ -1,23 +1,7 @@ -import { GraphQLError } from '../error'; -import { - DocumentNode, - OperationDefinitionNode, - VariableNode, - SelectionSetNode, - FragmentSpreadNode, - FragmentDefinitionNode, -} from '../language/ast'; -import { GraphQLSchema } from '../type/schema'; -import { - GraphQLInputType, - GraphQLOutputType, - GraphQLCompositeType, - GraphQLField, - GraphQLArgument, -} from '../type/definition'; -import { GraphQLDirective } from '../type/directives'; -import { TypeInfo } from '../utilities/TypeInfo'; -import { specifiedRules } from './specifiedRules'; +import { GraphQLError } from "../error"; +import { DocumentNode } from "../language/ast"; +import { GraphQLSchema } from "../type/schema"; +import { TypeInfo } from "../utilities/TypeInfo"; /** * Implements the "Validation" section of the spec. @@ -31,72 +15,13 @@ import { specifiedRules } from './specifiedRules'; * 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. + * + * Optionally a custom TypeInfo instance may be provided. If not provided, one + * will be created from the provided schema. */ export function validate( - schema: GraphQLSchema, - ast: DocumentNode, - rules?: any[], -): GraphQLError[]; - -/** - * This uses a specialized visitor which runs multiple visitors in parallel, - * while maintaining the visitor skip and break API. - * - * @internal - */ -export function visitUsingRules( - schema: GraphQLSchema, - typeInfo: TypeInfo, - documentAST: DocumentNode, - rules: any[], -): GraphQLError[]; - -export type NodeWithSelectionSet = - | OperationDefinitionNode - | FragmentDefinitionNode; -export interface VariableUsage { - node: VariableNode; - 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: DocumentNode, typeInfo: TypeInfo); - reportError(error: GraphQLError): void; - - getErrors(): GraphQLError[]; - - getSchema(): GraphQLSchema; - - getDocument(): DocumentNode; - - getFragment(name: string): FragmentDefinitionNode; - - getFragmentSpreads(node: SelectionSetNode): FragmentSpreadNode[]; - - getRecursivelyReferencedFragments( - operation: OperationDefinitionNode, - ): FragmentDefinitionNode[]; - - getVariableUsages(node: NodeWithSelectionSet): VariableUsage[]; - - getRecursiveVariableUsages( - operation: OperationDefinitionNode, - ): VariableUsage[]; - - getType(): GraphQLOutputType; - - getParentType(): GraphQLCompositeType; - - getInputType(): GraphQLInputType; - - getFieldDef(): GraphQLField; - - getDirective(): GraphQLDirective; - - getArgument(): GraphQLArgument; -} + schema: GraphQLSchema, + ast: DocumentNode, + rules?: ReadonlyArray, + typeInfo?: TypeInfo +): ReadonlyArray; diff --git a/types/grid-styled/index.d.ts b/types/grid-styled/index.d.ts index bea89b9237..8cce111478 100644 --- a/types/grid-styled/index.d.ts +++ b/types/grid-styled/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for grid-styled 3.0 +// Type definitions for grid-styled 3.2 // Project: https://github.com/jxnblk/grid-styled // Definitions by: Anton Vasin +// Victor Orlov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 @@ -15,39 +16,44 @@ import { StyledComponentClass } from "styled-components"; export type ResponsiveProp = number | string | Array; export interface CommonProps { - width: ResponsiveProp; - fontSize: ResponsiveProp; - color: ResponsiveProp; - bg: ResponsiveProp; - m: ResponsiveProp; - mt: ResponsiveProp; - mr: ResponsiveProp; - mb: ResponsiveProp; - ml: ResponsiveProp; - mx: ResponsiveProp; - my: ResponsiveProp; - p: ResponsiveProp; - pt: ResponsiveProp; - pr: ResponsiveProp; - pb: ResponsiveProp; - pl: ResponsiveProp; - px: ResponsiveProp; - py: ResponsiveProp; - theme: any; + width?: ResponsiveProp; + fontSize?: ResponsiveProp; + color?: ResponsiveProp; + bg?: ResponsiveProp; + m?: ResponsiveProp; + mt?: ResponsiveProp; + mr?: ResponsiveProp; + mb?: ResponsiveProp; + ml?: ResponsiveProp; + mx?: ResponsiveProp; + my?: ResponsiveProp; + p?: ResponsiveProp; + pt?: ResponsiveProp; + pr?: ResponsiveProp; + pb?: ResponsiveProp; + pl?: ResponsiveProp; + px?: ResponsiveProp; + py?: ResponsiveProp; + theme?: any; } export interface BoxProps extends Omit, "width" | "wrap" | "is"> { - flex: ResponsiveProp; - order: ResponsiveProp; - is: string | ComponentClass; + flex?: ResponsiveProp; + order?: ResponsiveProp; + is?: string | ComponentClass; } export interface FlexProps extends BoxProps { - align: ResponsiveProp | boolean; - justify: ResponsiveProp | boolean; - flexDirection: ResponsiveProp | boolean; - wrap: ResponsiveProp | boolean; + alignItems?: ResponsiveProp; + justifyContent?: ResponsiveProp; + flexDirection?: ResponsiveProp; + flexWrap?: ResponsiveProp; + + // legacy aliases https://github.com/jxnblk/styled-system/releases/tag/v2.0.0 + justify?: ResponsiveProp; + align?: ResponsiveProp; + wrap?: ResponsiveProp | boolean; } export type BoxComponent = StyledComponentClass< @@ -62,14 +68,14 @@ export type FlexComponent = StyledComponentClass< export interface Theme { breakpoints: string[]; - space: number[]; - fontSizes: number[]; + space?: number[]; + fontSizes?: number[]; } export const Box: BoxComponent; export const Flex: FlexComponent; export const theme: Theme; export type DivProps = Omit, "ref"> & { - innerRef: (el: HTMLDivElement) => any; + innerRef?: (el: HTMLDivElement) => any; }; export const div: ComponentClass; diff --git a/types/gulp-change/gulp-change-tests.ts b/types/gulp-change/gulp-change-tests.ts new file mode 100644 index 0000000000..5a52062951 --- /dev/null +++ b/types/gulp-change/gulp-change-tests.ts @@ -0,0 +1,17 @@ +import change = require('gulp-change'); + +change(); // $ExpectError +change(1); // $ExpectError + +function performChange(content: string): string { + return content.replace(/foo/g, 'FOO'); +} + +change(performChange); // $ExpectType MapStream + +function performChangeAsync(content: string, done: (err: any, content: string) => any): void { + content.replace(/foo/g, 'FOO'); + done(null, content); +} + +change(performChangeAsync); // $ExpectType MapStream diff --git a/types/gulp-change/index.d.ts b/types/gulp-change/index.d.ts new file mode 100644 index 0000000000..2220100fd9 --- /dev/null +++ b/types/gulp-change/index.d.ts @@ -0,0 +1,16 @@ +// Type definitions for gulp-change 1.0 +// Project: https://github.com/PoliteJS/gulp-change +// Definitions by: Aankhen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as eventStream from "event-stream"; + +export = GulpChange; + +declare function GulpChange(transformer: GulpChange.ChangeFunction): eventStream.MapStream; + +declare namespace GulpChange { + type Callback = (err: any, content: string) => any; + + type ChangeFunction = (content: string, callback: Callback) => string | void; +} diff --git a/types/gulp-change/tsconfig.json b/types/gulp-change/tsconfig.json new file mode 100644 index 0000000000..1b736a1975 --- /dev/null +++ b/types/gulp-change/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "gulp-change-tests.ts" + ] +} diff --git a/types/gulp-change/tslint.json b/types/gulp-change/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/gulp-change/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/gulp-filter/tsconfig.json b/types/gulp-filter/tsconfig.json index f4f7d56d52..43ae1fe5c5 100644 --- a/types/gulp-filter/tsconfig.json +++ b/types/gulp-filter/tsconfig.json @@ -14,10 +14,13 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "paths": { + "uglify-js": ["uglify-js/v2"] + } }, "files": [ "index.d.ts", "gulp-filter-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/gulp-html-replace/index.d.ts b/types/gulp-html-replace/index.d.ts index e0610326c8..f2612b3688 100644 --- a/types/gulp-html-replace/index.d.ts +++ b/types/gulp-html-replace/index.d.ts @@ -2,6 +2,8 @@ // Project: https://www.npmjs.com/package/gulp-html-replace // Definitions by: Peter Juras // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + /// diff --git a/types/gulp-htmlmin/index.d.ts b/types/gulp-htmlmin/index.d.ts index ec97434de2..1f5f3e4a26 100644 --- a/types/gulp-htmlmin/index.d.ts +++ b/types/gulp-htmlmin/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jonschlinkert/gulp-htmlmin // Definitions by: Tanguy Krotoff // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// diff --git a/types/gulp-image-resize/gulp-image-resize-tests.ts b/types/gulp-image-resize/gulp-image-resize-tests.ts new file mode 100644 index 0000000000..46360827c1 --- /dev/null +++ b/types/gulp-image-resize/gulp-image-resize-tests.ts @@ -0,0 +1,40 @@ +import resize = require('gulp-image-resize'); + +resize(); // $ExpectType Transform +resize(undefined); +resize("1"); // $ExpectError + +resize({ // $ExpectType Transform + width: 100, + height: 100, + crop: true, + upscale: false +}); + +resize({ + widt: 5 // $ExpectError +}); + +resize({ + width: undefined, + height: undefined, + upscale: undefined, + crop: undefined, + gravity: undefined, + quality: undefined, + format: undefined, + filter: undefined, + sharpen: undefined, + samplingFactor: undefined, + noProfile: undefined, + interlace: undefined, + imageMagick: undefined, + background: undefined, + flatten: undefined, + percentage: undefined, + cover: undefined +}); + +resize({ format: 'jpeg' }); +resize({ width: 100 }); +resize({ percentage: 50 }); diff --git a/types/gulp-image-resize/index.d.ts b/types/gulp-image-resize/index.d.ts new file mode 100644 index 0000000000..3166b0d9b9 --- /dev/null +++ b/types/gulp-image-resize/index.d.ts @@ -0,0 +1,38 @@ +// Type definitions for gulp-image-resize 0.13 +// Project: https://github.com/scalableminds/gulp-image-resize +// Definitions by: Aankhen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + +import * as stream from "stream"; +import * as gm from "gm"; + +export = GulpImageResize; + +declare function GulpImageResize(options?: GulpImageResize.Options): stream.Transform; + +declare namespace GulpImageResize { + type SamplingFactor = [number, number]; + + interface Options { + width?: number; + height?: number; + upscale?: boolean; + crop?: boolean; + gravity?: gm.GravityDirection; + quality?: number; + format?: string; + filter?: gm.FilterType; + sharpen?: boolean | string; + samplingFactor?: SamplingFactor; + noProfile?: boolean; + interlace?: boolean; + imageMagick?: boolean; + background?: string; + flatten?: boolean; + percentage?: number; + cover?: boolean; + } +} diff --git a/types/gulp-image-resize/tsconfig.json b/types/gulp-image-resize/tsconfig.json new file mode 100644 index 0000000000..7f26af6c84 --- /dev/null +++ b/types/gulp-image-resize/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "gulp-image-resize-tests.ts" + ] +} diff --git a/types/gulp-image-resize/tslint.json b/types/gulp-image-resize/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/gulp-image-resize/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/gulp-image/gulp-image-tests.ts b/types/gulp-image/gulp-image-tests.ts new file mode 100644 index 0000000000..6d94c46921 --- /dev/null +++ b/types/gulp-image/gulp-image-tests.ts @@ -0,0 +1,28 @@ +import image = require('gulp-image'); + +image(false); // $ExpectError + +image(); // $ExpectType Transform +image({}); +image({ + pngquant: true, + optipng: false, + zopflipng: true, + jpegRecompress: false, + mozjpeg: true, + guetzli: false, + gifsicle: true, + svgo: true, + concurrent: 10, + quiet: true // defaults to false +}); +image({ + optipng: ['-i 1', '-strip all', '-fix', '-o7', '-force'], + pngquant: ['--speed=1', '--force', 256], + zopflipng: ['-y', '--lossy_8bit', '--lossy_transparent'], + jpegRecompress: ['--strip', '--quality', 'medium', '--min', 40, '--max', 80], + mozjpeg: ['-optimize', '-progressive'], + guetzli: ['--quality', 85], + gifsicle: ['--optimize'], + svgo: ['--enable', 'cleanupIDs', '--disable', 'convertColors'] +}); diff --git a/types/gulp-image/index.d.ts b/types/gulp-image/index.d.ts new file mode 100644 index 0000000000..d46d68f3ab --- /dev/null +++ b/types/gulp-image/index.d.ts @@ -0,0 +1,31 @@ +// Type definitions for gulp-image 4.3 +// Project: https://github.com/1000ch/gulp-image#readme +// Definitions by: Aankhen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + +import stream = require("stream"); + +export = GulpImage; + +declare function GulpImage(options?: GulpImage.Options): stream.Transform; + +declare namespace GulpImage { + type OptimizerSetting = boolean + | any[]; + + interface Options { + pngquant?: OptimizerSetting; + optipng?: OptimizerSetting; + zopflipng?: OptimizerSetting; + jpegRecompress?: OptimizerSetting; + mozjpeg?: OptimizerSetting; + guetzli?: OptimizerSetting; + gifsicle?: OptimizerSetting; + svgo?: OptimizerSetting; + concurrent?: number; + quiet?: boolean; + } +} diff --git a/types/gulp-image/tsconfig.json b/types/gulp-image/tsconfig.json new file mode 100644 index 0000000000..a9d788e360 --- /dev/null +++ b/types/gulp-image/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "gulp-image-tests.ts" + ] +} diff --git a/types/gulp-image/tslint.json b/types/gulp-image/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/gulp-image/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/gulp-mocha/index.d.ts b/types/gulp-mocha/index.d.ts index ae56e9a9ac..ba1a6d4fca 100644 --- a/types/gulp-mocha/index.d.ts +++ b/types/gulp-mocha/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/sindresorhus/gulp-mocha // Definitions by: Asana // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 /// /// diff --git a/types/gulp-responsive-images/gulp-responsive-images-tests.ts b/types/gulp-responsive-images/gulp-responsive-images-tests.ts new file mode 100644 index 0000000000..63957ec047 --- /dev/null +++ b/types/gulp-responsive-images/gulp-responsive-images-tests.ts @@ -0,0 +1,63 @@ +import gulpResponsiveImages = require('gulp-responsive-images'); + +gulpResponsiveImages(); // $ExpectError + +gulpResponsiveImages({}); // $ExpectType Transform + +gulpResponsiveImages({ 1: "abcd" }); // $ExpectError + +gulpResponsiveImages({ + 'hero.png': [ + { + } + ] +} +); + +gulpResponsiveImages({ + 'hero.png': [ + { + crop: false, + gravity: 'Center', + height: 100, + overwrite: true, + quality: 100, + sharpen: false, + suffix: '-100', + upscale: false, + width: 100 + } + ] +} +); + +gulpResponsiveImages({ + 'hero.png': [ + { + format: "jpeg", + rename: "image.jpg", + percentage: 50 + } + ] +} +); + +gulpResponsiveImages({ + 'hero.png': [ + { + crop: undefined, + gravity: undefined, + height: undefined, + overwrite: undefined, + quality: undefined, + sharpen: undefined, + suffix: undefined, + upscale: undefined, + width: undefined, + format: undefined, + rename: undefined, + percentage: undefined + } + ] +} +); diff --git a/types/gulp-responsive-images/index.d.ts b/types/gulp-responsive-images/index.d.ts new file mode 100644 index 0000000000..3b3707f024 --- /dev/null +++ b/types/gulp-responsive-images/index.d.ts @@ -0,0 +1,43 @@ +// Type definitions for gulp-responsive-images 0.0 +// Project: https://github.com/dcgauld/gulp-responsive-images#readme +// Definitions by: Aankhen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as stream from "stream"; +import * as gm from "gm"; +import { ParsedPath, Options as RenameOptions } from "gulp-rename"; + +export = GulpResponsiveImage; + +declare function GulpResponsiveImage(configs: GulpResponsiveImage.Matchers): stream.Transform; + +declare namespace GulpResponsiveImage { + type SamplingFactor = [number, number]; + + type Rename = string + | ((path: ParsedPath) => any) + | RenameOptions; + + interface Settings { + crop?: boolean; + format?: string; + gravity?: gm.GravityDirection; + overwrite?: boolean; + quality?: number; + rename?: Rename; + percentage?: number; + sharpen?: boolean; + upscale?: boolean; + filter?: gm.FilterType; + height?: number; + width?: number; + samplingFactor?: SamplingFactor; + suffix?: string; + } + + interface Matchers { + [index: string]: ReadonlyArray; + } +} diff --git a/types/gulp-responsive-images/tsconfig.json b/types/gulp-responsive-images/tsconfig.json new file mode 100644 index 0000000000..2c4c0aa75b --- /dev/null +++ b/types/gulp-responsive-images/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "gulp-responsive-images-tests.ts" + ] +} diff --git a/types/gulp-responsive-images/tslint.json b/types/gulp-responsive-images/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/gulp-responsive-images/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/gulp-rev-replace/tsconfig.json b/types/gulp-rev-replace/tsconfig.json index c9a020605c..dfef77b20b 100644 --- a/types/gulp-rev-replace/tsconfig.json +++ b/types/gulp-rev-replace/tsconfig.json @@ -14,10 +14,15 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "paths": { + "uglify-js": [ + "uglify-js/v2" + ] + } }, "files": [ "index.d.ts", "gulp-rev-replace-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/gulp-uglify/tsconfig.json b/types/gulp-uglify/tsconfig.json index 72fd35c65e..70663fcc71 100644 --- a/types/gulp-uglify/tsconfig.json +++ b/types/gulp-uglify/tsconfig.json @@ -14,11 +14,16 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "paths": { + "uglify-js": [ + "uglify-js/v2" + ] + } }, "files": [ "index.d.ts", "composer.d.ts", "gulp-uglify-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/gulp-useref/tsconfig.json b/types/gulp-useref/tsconfig.json index cdb7922c57..f3867032fa 100644 --- a/types/gulp-useref/tsconfig.json +++ b/types/gulp-useref/tsconfig.json @@ -14,10 +14,13 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "paths": { + "uglify-js": ["uglify-js/v2"] + } }, "files": [ "index.d.ts", "gulp-useref-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/gulp-util/gulp-util-tests.ts b/types/gulp-util/gulp-util-tests.ts index 47e705bf00..1781ce7664 100644 --- a/types/gulp-util/gulp-util-tests.ts +++ b/types/gulp-util/gulp-util-tests.ts @@ -1,5 +1,3 @@ -/// - import gulp = require('gulp'); import util = require('gulp-util'); import path = require('path'); @@ -7,6 +5,11 @@ import Stream = require('stream'); import through = require('through2'); const es = require('event-stream'); +// Stub mocha functions +const {describe, it, before, after, beforeEach, afterEach} = null as any as { + [s: string]: ((s: string, cb: (done: any) => void) => void) & ((cb: (done: any) => void) => void) & {only: any, skip: any}; +}; + // TODO: These aren't useful as types tests since they take `any`. declare const should: ShouldStatic; interface ShouldStatic { diff --git a/types/handlebars/handlebars-tests.ts b/types/handlebars/handlebars-tests.ts index 95342c2e63..1ec2528db3 100644 --- a/types/handlebars/handlebars-tests.ts +++ b/types/handlebars/handlebars-tests.ts @@ -1,8 +1,8 @@ -import Handlebars = require('handlebars'); +//import Handlebars = require('handlebars'); +import * as Handlerbars from 'handlebars'; - -var context = { +const context = { author: { firstName: 'Alan', lastName: 'Johnson' }, body: 'I Love Handlebars', comments: [{ @@ -20,65 +20,61 @@ Handlebars.registerHelper('agree_button', function() { ); }); -var source = '

Hello, my name is {{name}}. I am from {{hometown}}. I have ' + +const source1 = '

Hello, my name is {{name}}. I am from {{hometown}}. I have ' + '{{kids.length}} kids:

' + '
    {{#kids}}
  • {{name}} is {{age}}
  • {{/kids}}
'; -var template = Handlebars.compile(source); -var data = { 'name': 'Alan', 'hometown': 'Somewhere, TX', - 'kids': [{'name': 'Jimmy', 'age': '12'}, {'name': 'Sally', 'age': '4'}]}; -var result = template(data); +const template1 = Handlebars.compile(source1); +template1({ name: "Alan", hometown: "Somewhere, TX", kids: [{name: "Jimmy", age: 12}, {name: "Sally", age: 4}]}); Handlebars.registerHelper('link_to', (context: typeof post) => { return '' + context.body + ''; }); - -var post = { url: '/hello-world', body: 'Hello World!' }; -var context2 = { posts: [post] }; -var source2 = '
    {{#posts}}
  • {{{link_to this}}}
  • {{/posts}}
'; - -var template2: HandlebarsTemplateDelegate<{ posts: { url: string, body: string }[] }> = Handlebars.compile(source2); +const post = { url: "/hello-world", body: "Hello World!" }; +const context2 = { posts: [post] }; +const source2 = '
    {{#posts}}
  • {{{link_to this}}}
  • {{/posts}}
'; +const template2: HandlebarsTemplateDelegate<{ posts: { url: string, body: string }[] }> = Handlebars.compile(source2); template2(context2); Handlebars.registerHelper('link_to', (title: string, context: typeof post) => { return '' + title + '!'; }); - -var context3 = { posts: [{url: '/hello-world', body: 'Hello World!'}] }; -var source3 = '
    {{#posts}}
  • {{{link_to "Post" this}}}
  • {{/posts}}
'; -var template3 = Handlebars.compile(source3); +const context3 = { posts: [{url: '/hello-world', body: 'Hello World!'}] }; +const source3 = '
    {{#posts}}
  • {{{link_to "Post" this}}}
  • {{/posts}}
'; +const template3 = Handlebars.compile(source3); template3(context3); -var source4 = '
    {{#people}}
  • {{#link}}{{name}}{{/link}}
  • {{/people}}
'; +const source4 = '
    {{#people}}
  • {{#link}}{{name}}{{/link}}
  • {{/people}}
'; Handlebars.registerHelper('link', function(context: any) { return '' + context.fn(this) + ''; }); -var template4 = Handlebars.compile<{ people: { name: string, id: number }[] }>(source4); -var data2 = { 'people': [ +const template4 = Handlebars.compile<{ people: { name: string, id: number }[] }>(source4); +const data2 = { 'people': [ { 'name': 'Alan', 'id': 1 }, { 'name': 'Yehuda', 'id': 2 } ]}; template4(data2); -var source5 = '
    {{#people}}
  • {{> link}}
  • {{/people}}
'; +const source5 = '
    {{#people}}
  • {{> link}}
  • {{/people}}
'; Handlebars.registerPartial('link', '{{name}}'); -var template5 = Handlebars.compile(source5); -var data3 = { 'people': [ +const template5 = Handlebars.compile(source5); +const data3 = { 'people': [ { 'name': 'Alan', 'id': 1 }, { 'name': 'Yehuda', 'id': 2 } ]}; template5(data3); -Handlebars.registerHelper('list', (items: any, fn: (item: any) => string) => { - var out = '
    '; - for(var i=0, l=items.length; i' + fn(items[i]) + ''; - } - return out + '
'; -}); -Handlebars.registerHelper('fullName', (person: typeof context.author) => { - return person.firstName + ' ' + person.lastName; +const source6 = '{{#list nav}}{{title}}{{/list}}'; +const template6 = Handlebars.compile(source6); +Handlebars.registerHelper('list', (context, options: Handlebars.HelperOptions) => { + let ret = "
    "; + for(let i=0, j=context.length; i" + options.fn(context[i]) + ""; + } + return ret + "
"; }); +template6([{url:"", title:""}]) -var escapedExpression = Handlebars.Utils.escapeExpression(''); + +const escapedExpression = Handlebars.Utils.escapeExpression(''); Handlebars.helpers !== undefined; diff --git a/types/handlebars/index.d.ts b/types/handlebars/index.d.ts index eb5958f6db..351d98fb10 100644 --- a/types/handlebars/index.d.ts +++ b/types/handlebars/index.d.ts @@ -1,15 +1,48 @@ -// Type definitions for Handlebars v4.0.5 +// Type definitions for Handlebars v4.0.11 // Project: http://handlebarsjs.com/ -// Definitions by: Boris Yankov +// Definitions by: Boris Yankov , Sergei Dorogin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 declare namespace Handlebars { - export function registerHelper(name: string, fn: Function, inverse?: boolean): void; - export function registerHelper(name: Object): void; - export function registerPartial(name: string, str: any): void; + export interface TemplateDelegate { + (context: T, options?: RuntimeOptions): string; + } + + export type Template = TemplateDelegate|string; + + export interface RuntimeOptions { + partial?: boolean; + depths?: any[]; + helpers?: { [name: string]: Function }; + partials?: { [name: string]: HandlebarsTemplateDelegate }; + decorators?: { [name: string]: Function }; + data?: any; + blockParams?: any[]; + } + + export interface HelperOptions { + fn: TemplateDelegate; + inverse: TemplateDelegate; + hash: any; + data?: any; + } + + export interface HelperDelegate { + (context?: any, arg1?: any, arg2?: any, arg3?: any, arg4?: any, arg5?: any, options?: HelperOptions): any; + } + export interface HelperDeclareSpec { + [key: string]: HelperDelegate; + } + + export function registerHelper(name: string, fn: HelperDelegate): void; + export function registerHelper(name: HelperDeclareSpec): void; export function unregisterHelper(name: string): void; + + export function registerPartial(name: string, fn: Template): void; export function unregisterPartial(name: string): void; + + // TODO: replace Function with actual signature export function registerDecorator(name: string, fn: Function): void; export function unregisterDecorator(name: string): void; @@ -25,23 +58,36 @@ declare namespace Handlebars { export function create(): typeof Handlebars; - export var SafeString: typeof hbs.SafeString; - export var escapeExpression: typeof hbs.Utils.escapeExpression; - export var Utils: typeof hbs.Utils; - export var logger: Logger; - export var templates: HandlebarsTemplates; - export var helpers: { [name: string]: Function }; - export var partials: { [name: string]: any }; - export var decorators: { [name: string]: Function }; - - export function registerDecorator(name: string, fn: Function): void; - export function registerDecorator(obj: {[name: string] : Function}): void; - export function unregisterDecorator(name: string): void; + export const escapeExpression: typeof Utils.escapeExpression; + //export const Utils: typeof hbs.Utils; + export const logger: Logger; + export const templates: HandlebarsTemplates; + export const helpers: { [name: string]: HelperDelegate }; + export const partials: { [name: string]: any }; + // TODO: replace Function with actual signature + export const decorators: { [name: string]: Function }; export function noConflict(): typeof Handlebars; - export module AST { - export var helpers: hbs.AST.helpers; + export class SafeString { + constructor(str: string); + toString(): string; + toHTML(): string; + } + + export namespace Utils { + export function escapeExpression(str: string): string; + export function createFrame(object: any): any; + export function blockParams(obj: any[], ids: any[]): any[]; + export function isEmpty(obj: any) : boolean; + export function extend(obj: any, ...source: any[]): any; + export function toString(obj: any): string; + export function isArray(obj: any): boolean; + export function isFunction(obj: any): boolean; + } + + export namespace AST { + export const helpers: hbs.AST.helpers; } interface ICompiler { @@ -96,9 +142,8 @@ interface HandlebarsTemplatable { template: HandlebarsTemplateDelegate; } -interface HandlebarsTemplateDelegate { - (context: T, options?: RuntimeOptions): string; -} +// NOTE: for backward compatibility of this typing +type HandlebarsTemplateDelegate = Handlebars.TemplateDelegate; interface HandlebarsTemplates { [index: string]: HandlebarsTemplateDelegate; @@ -108,13 +153,8 @@ interface TemplateSpecification { } -interface RuntimeOptions { - partial?: boolean; - depths?: any[]; - helpers?: { [name: string]: Function } - partials?: { [name: string]: HandlebarsTemplateDelegate } - decorators?: { [name: string]: Function } -} +// for backward compatibility of this typing +type RuntimeOptions = Handlebars.RuntimeOptions; interface CompileOptions { data?: boolean; @@ -128,7 +168,7 @@ interface CompileOptions { with?: boolean; log?: boolean; lookup?: boolean; - } + }; knownHelpersOnly?: boolean; noEscape?: boolean; strict?: boolean; @@ -144,21 +184,10 @@ interface PrecompileOptions extends CompileOptions { } declare namespace hbs { - class SafeString { - constructor(str: string); - static toString(): string; - } + // for backward compatibility of this typing + type SafeString = Handlebars.SafeString; - namespace Utils { - function escapeExpression(str: string): string; - function createFrame(object: any): any; - function blockParams(obj: any[], ids: any[]): any[]; - function isEmpty(obj: any) : boolean; - function extend(obj: any, ...source: any[]): any; - function toString(obj: any): string; - function isArray(obj: any): boolean; - function isFunction(obj: any): boolean; - } + type Utils = typeof Handlebars.Utils; } interface Logger { @@ -231,11 +260,11 @@ declare namespace hbs { interface PartialBlockStatement extends Statement { name: PathExpression | SubExpression; - params: Expression[], - hash: Hash, - program: Program, - openStrip: StripFlags, - closeStrip: StripFlags + params: Expression[]; + hash: Hash; + program: Program; + openStrip: StripFlags; + closeStrip: StripFlags; } interface ContentStatement extends Statement { diff --git a/types/handlebars/tsconfig.json b/types/handlebars/tsconfig.json index 5f874f3996..5c7bf000d0 100644 --- a/types/handlebars/tsconfig.json +++ b/types/handlebars/tsconfig.json @@ -19,5 +19,9 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true - } + }, + "files": [ + "index.d.ts", + "handlebars-tests.ts" + ] } \ No newline at end of file diff --git a/types/hapi-auth-jwt2/hapi-auth-jwt2-tests.ts b/types/hapi-auth-jwt2/hapi-auth-jwt2-tests.ts index fa28253a88..cf51162eb4 100644 --- a/types/hapi-auth-jwt2/hapi-auth-jwt2-tests.ts +++ b/types/hapi-auth-jwt2/hapi-auth-jwt2-tests.ts @@ -1,8 +1,7 @@ -import Hapi = require('hapi'); -import hapiAuthJwt2 = require('hapi-auth-jwt2'); +import { Server } from 'hapi'; +import * as hapiAuthJwt2 from 'hapi-auth-jwt2'; -const server = new Hapi.Server(); -server.connection({port: 8000}); +const server = new Server({port: 8000}); interface User { id: number; @@ -20,19 +19,28 @@ const users: Users = { } }; -function validate(decoded: User, request: Hapi.Request, callback: hapiAuthJwt2.ValidateCallback) { - callback(null, !!users[decoded.id]); -} - -server.register(hapiAuthJwt2, err => { - const options: hapiAuthJwt2.Options = { - key: 'NeverShareYourSecret', - validateFunc: validate, - verifyOptions: { - algorithms: ['HS256'] +server.register({ + plugin: hapiAuthJwt2, + options: { + async verify() { + return { + isValid: true, + }; + } } - }; - server.auth.strategy('jwt', 'jwt', options); +}) +.then(() => { + const opts: hapiAuthJwt2.Options = { + key: 'NeverShareYourSecret', + async validate(decoded: { id: number }, request) { + return { + isValid: !!users[decoded.id], + }; + }, + verifyOptions: { + algorithms: ['HS256'], + issuer: 'test', + } + }; + server.auth.strategy('jwt', 'jwt', opts); }); - -server.start(); diff --git a/types/hapi-auth-jwt2/index.d.ts b/types/hapi-auth-jwt2/index.d.ts index 91e8ef931e..a93f740bfc 100644 --- a/types/hapi-auth-jwt2/index.d.ts +++ b/types/hapi-auth-jwt2/index.d.ts @@ -1,39 +1,43 @@ -// Type definitions for hapi-auth-jwt2 7.0 +// Type definitions for hapi-auth-jwt2 8.0 // Project: https://github.com/dwyl/hapi-auth-jwt2 // Definitions by: Warren Seymour +// Simon Schick // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 -import { Request, Response, PluginFunction } from 'hapi'; +import { Request, ResponseObject, Plugin, ResponseToolkit } from 'hapi'; +import { VerifyOptions } from 'jsonwebtoken'; + +declare module 'hapi' { + interface ServerAuth { + strategy(name: string, scheme: 'jwt', options?: hapiAuthJwt2.Options): void; + } +} declare namespace hapiAuthJwt2 { - /** - * A key lookup function - * - * @param decoded the *decoded* but *unverified* JWT received from client - * @param callback the key lookup callback - */ - type KeyLookup = (decoded: any, callback: KeyLookupCallback) => void; + interface ExtraInfo { + } - /** - * Called when key lookup function has completed - * - * @param err an internal error - * @param key the secret key - * @param extraInfo any additional information that you would like - * to use in `validateFunc` which can be accessed via - * `request.plugins['hapi-auth-jwt2'].extraInfo` - */ - type KeyLookupCallback = (err: any, key: string, extraInfo?: any) => void; - - /** - * Called when Validation has completed - * - * @param err an internal error - * @param valid `true` if the JWT was valid, otherwise `false` - * @param credentials alternative credentials to be set instead of `decoded` - */ - type ValidateCallback = (err: any, valid: boolean, credentials?: any) => void; + interface ErrorContext { + /** + * Boom method to call (eg. unauthorized) + */ + errorType: string; + /** + * message passed into the Boom method call + */ + message?: string; + /** + * schema passed into the Boom method call + */ + schema: string; + /** + * attributes passed into the Boom method call + */ + attributes?: { + [key: string]: string; + }; + } /** * Options passed to `hapi.auth.strategy` when this plugin is used @@ -42,41 +46,24 @@ declare namespace hapiAuthJwt2 { /** * The secret key used to check the signature of the token *or* a *key lookup function* */ - key?: string | KeyLookup; + key?: string | string[] | Promise<{ isValid: boolean; key: string; extraInfo?: ExtraInfo }>; /** * The function which is run once the Token has been decoded * * @param decoded the *decoded* and *verified* JWT received from the client in *request.headers.authorization* * @param request the original *request* received from the client - * @param callback the validation callback */ - validateFunc(decoded: {}, request: Request, callback: ValidateCallback): void; + validate(decoded: {}, request: Request, tk: ResponseToolkit): Promise<{ + isValid: boolean; + credentials?: any; + response?: ResponseObject + }>; /** * Settings to define how tokens are verified by the jsonwebtoken library */ - verifyOptions?: { - /** - * Ignore expired tokens - */ - ignoreExpiration?: boolean; - - /** - * Do not enforce token audience - */ - audience?: boolean; - - /** - * Do not require the issuer to be valid - */ - issuer?: boolean; - - /** - * List of allowed algorithms - */ - algorithms?: string[]; - }; + verifyOptions?: VerifyOptions; /** * function called to decorate the response with authentication headers @@ -85,7 +72,14 @@ declare namespace hapiAuthJwt2 { * @param request the Request object * @param reply is called if an error occurred */ - responseFunc?(request: Request, reply: (err: any, response: Response) => void): void; + responseFunc?(request: Request, reply: (err: any, response: ResponseObject) => void): void; + + /** + * + * @param ctx called when an error has been raised. + * It provides an extension point to allow the host the ability to customise the error messages returned. + */ + errorFunc?(ctx: ErrorContext): ErrorContext; /** * If you prefer to pass your token via url, simply add a token url @@ -125,8 +119,18 @@ declare namespace hapiAuthJwt2 { */ complete?: boolean; } + + interface RegisterOptions { + /** + * function which is run once the Token has been decoded (instead of a validate) with signature async function(decoded, request) where: + */ + verify?(decoded: any, request: Request): Promise<{ + isValid: boolean; + credentials?: any; + }>; + } } -declare var hapiAuthJwt2: PluginFunction<{}>; +declare const hapiAuthJwt2: Plugin; export = hapiAuthJwt2; diff --git a/types/hapi-auth-jwt2/tsconfig.json b/types/hapi-auth-jwt2/tsconfig.json index 19a6e785ac..0d58c0f507 100644 --- a/types/hapi-auth-jwt2/tsconfig.json +++ b/types/hapi-auth-jwt2/tsconfig.json @@ -13,20 +13,6 @@ "../" ], "types": [], - "paths": { - "boom": [ - "boom/v4" - ], - "catbox": [ - "catbox/v7" - ], - "hapi": [ - "hapi/v16" - ], - "inert": [ - "inert/v4" - ] - }, "noEmit": true, "forceConsistentCasingInFileNames": true }, diff --git a/types/hapi-auth-jwt2/tslint.json b/types/hapi-auth-jwt2/tslint.json index 3db14f85ea..4f44991c3c 100644 --- a/types/hapi-auth-jwt2/tslint.json +++ b/types/hapi-auth-jwt2/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-empty-interface": false + } +} diff --git a/types/hapi-auth-jwt2/v7/hapi-auth-jwt2-tests.ts b/types/hapi-auth-jwt2/v7/hapi-auth-jwt2-tests.ts new file mode 100644 index 0000000000..fa28253a88 --- /dev/null +++ b/types/hapi-auth-jwt2/v7/hapi-auth-jwt2-tests.ts @@ -0,0 +1,38 @@ +import Hapi = require('hapi'); +import hapiAuthJwt2 = require('hapi-auth-jwt2'); + +const server = new Hapi.Server(); +server.connection({port: 8000}); + +interface User { + id: number; + name: string; +} + +interface Users { + [id: number]: User; +} + +const users: Users = { + 1: { + id: 1, + name: 'Test User' + } +}; + +function validate(decoded: User, request: Hapi.Request, callback: hapiAuthJwt2.ValidateCallback) { + callback(null, !!users[decoded.id]); +} + +server.register(hapiAuthJwt2, err => { + const options: hapiAuthJwt2.Options = { + key: 'NeverShareYourSecret', + validateFunc: validate, + verifyOptions: { + algorithms: ['HS256'] + } + }; + server.auth.strategy('jwt', 'jwt', options); +}); + +server.start(); diff --git a/types/hapi-auth-jwt2/v7/index.d.ts b/types/hapi-auth-jwt2/v7/index.d.ts new file mode 100644 index 0000000000..91e8ef931e --- /dev/null +++ b/types/hapi-auth-jwt2/v7/index.d.ts @@ -0,0 +1,132 @@ +// Type definitions for hapi-auth-jwt2 7.0 +// Project: https://github.com/dwyl/hapi-auth-jwt2 +// Definitions by: Warren Seymour +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +import { Request, Response, PluginFunction } from 'hapi'; + +declare namespace hapiAuthJwt2 { + /** + * A key lookup function + * + * @param decoded the *decoded* but *unverified* JWT received from client + * @param callback the key lookup callback + */ + type KeyLookup = (decoded: any, callback: KeyLookupCallback) => void; + + /** + * Called when key lookup function has completed + * + * @param err an internal error + * @param key the secret key + * @param extraInfo any additional information that you would like + * to use in `validateFunc` which can be accessed via + * `request.plugins['hapi-auth-jwt2'].extraInfo` + */ + type KeyLookupCallback = (err: any, key: string, extraInfo?: any) => void; + + /** + * Called when Validation has completed + * + * @param err an internal error + * @param valid `true` if the JWT was valid, otherwise `false` + * @param credentials alternative credentials to be set instead of `decoded` + */ + type ValidateCallback = (err: any, valid: boolean, credentials?: any) => void; + + /** + * Options passed to `hapi.auth.strategy` when this plugin is used + */ + interface Options { + /** + * The secret key used to check the signature of the token *or* a *key lookup function* + */ + key?: string | KeyLookup; + + /** + * The function which is run once the Token has been decoded + * + * @param decoded the *decoded* and *verified* JWT received from the client in *request.headers.authorization* + * @param request the original *request* received from the client + * @param callback the validation callback + */ + validateFunc(decoded: {}, request: Request, callback: ValidateCallback): void; + + /** + * Settings to define how tokens are verified by the jsonwebtoken library + */ + verifyOptions?: { + /** + * Ignore expired tokens + */ + ignoreExpiration?: boolean; + + /** + * Do not enforce token audience + */ + audience?: boolean; + + /** + * Do not require the issuer to be valid + */ + issuer?: boolean; + + /** + * List of allowed algorithms + */ + algorithms?: string[]; + }; + + /** + * function called to decorate the response with authentication headers + * before the response headers or payload is written + * + * @param request the Request object + * @param reply is called if an error occurred + */ + responseFunc?(request: Request, reply: (err: any, response: Response) => void): void; + + /** + * If you prefer to pass your token via url, simply add a token url + * parameter to your request or use a custom parameter by setting `urlKey. + * To disable the url parameter set urlKey to `false` or ''. + * @default 'token' + */ + urlKey?: string | boolean; + + /** + * If you prefer to set your own cookie key or your project has a cookie + * called 'token' for another purpose, you can set a custom key for your + * cookie by setting `options.cookieKey='yourkeyhere'`. To disable cookies + * set cookieKey to `false` or ''. + * @default 'token' + */ + cookieKey?: string | boolean; + + /** + * If you want to set a custom key for your header token use the + * `headerKey` option. To disable header token set headerKey to `false` or + * ''. + * @default 'authorization' + */ + headerKey?: string | boolean; + + /** + * Allow custom token type, e.g. `Authorization: 12345678` + */ + tokenType?: string; + + /** + * Set to `true` to receive the complete token (`decoded.header`, + * `decoded.payload` and `decoded.signature`) as decoded argument to key + * lookup and `verifyFunc` callbacks (*not `validateFunc`*) + * @default false + */ + complete?: boolean; + } +} + +declare var hapiAuthJwt2: PluginFunction<{}>; + +export = hapiAuthJwt2; diff --git a/types/hapi-auth-jwt2/v7/tsconfig.json b/types/hapi-auth-jwt2/v7/tsconfig.json new file mode 100644 index 0000000000..45c3371617 --- /dev/null +++ b/types/hapi-auth-jwt2/v7/tsconfig.json @@ -0,0 +1,40 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "paths": { + "hapi-auth-jwt2": [ + "hapi-auth-jwt2/v7" + ], + "boom": [ + "boom/v4" + ], + "catbox": [ + "catbox/v7" + ], + "hapi": [ + "hapi/v16" + ], + "inert": [ + "inert/v4" + ] + }, + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hapi-auth-jwt2-tests.ts" + ] +} diff --git a/types/hapi-auth-jwt2/v7/tslint.json b/types/hapi-auth-jwt2/v7/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/hapi-auth-jwt2/v7/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/hapi/index.d.ts b/types/hapi/index.d.ts index de1542f33f..d4072b0cd7 100644 --- a/types/hapi/index.d.ts +++ b/types/hapi/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Marc Bornträger // Rafael Souza Fijalkowski // Justin Simms +// Simon Schick // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 @@ -120,7 +121,7 @@ export interface PluginBase { * * server - the server object with a plugin-specific server.realm. * * options - any options passed to the plugin during registration via server.register(). */ - register: (server: Server, options: T) => Promise; + register: (server: Server, options: T) => void | Promise; /** (optional) if true, allows the plugin to be registered multiple times with the same server. Defaults to false. */ multiple?: boolean; @@ -457,7 +458,7 @@ export interface Request extends Podium { * The response object when set. The object can be modified but must not be assigned another object. To replace the response with another from within an extension point, use reply(response) to * override with a different response. Contains null when no response has been set (e.g. when a request terminates prematurely when the client disconnects). */ - response: ResponseObject | Boom.Boom | null; + response: ResponseObject | Boom | null; /** * Same as pre but represented as the response object created by the pre method. @@ -1008,7 +1009,7 @@ export interface ResponseToolkit { * @return Return value: none. * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-hstatename-value-options) */ - state(name: string, value: string, options?: ServerStateCookieOptions): void; + state(name: string, value: string | object, options?: ServerStateCookieOptions): void; /** * Used by the [authentication] method to indicate authentication failed and pass back the credentials received where: @@ -1143,7 +1144,7 @@ export interface RouteOptionsAccess { * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionscache) */ export type RouteOptionsCache = { - privacy?: 'default' | 'public' | 'privacy'; + privacy?: 'default' | 'public' | 'private'; statuses?: number[]; otherwise?: string; } & ( @@ -1706,7 +1707,7 @@ export interface RouteOptions { * * credentials - if true, allows user credentials to be sent ('Access-Control-Allow-Credentials'). Defaults to false. * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-routeoptionscors) */ - cors?: false | RouteOptionsCors; + cors?: boolean | RouteOptionsCors; /** * Default value: none. @@ -1724,12 +1725,7 @@ export interface RouteOptions { * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#request-lifecycle) */ ext?: { - onPreAuth?: Lifecycle.Method; - onCredentials?: Lifecycle.Method; - onPostAuth?: Lifecycle.Method; - onPreHandler?: Lifecycle.Method; - onPostHandler?: Lifecycle.Method; - onPreResponse?: Lifecycle.Method; + [key in RouteRequestExtType]?: RouteExtObject | RouteExtObject[]; }; /** @@ -2229,8 +2225,8 @@ export interface RequestEvent { error: object; } -export type LogEventHandler = (event: LogEvent, tags: object) => void; -export type RequestEventHandler = (request: Request, event: RequestEvent, tags: object) => void; +export type LogEventHandler = (event: LogEvent, tags: { [key: string]: true }) => void; +export type RequestEventHandler = (request: Request, event: RequestEvent, tags: { [key: string]: true }) => void; export type ResponseEventHandler = (request: Request) => void; export type RouteEventHandler = (route: ServerRoute) => void; export type StartEventHandler = () => void; @@ -2354,15 +2350,17 @@ export interface ServerEvents extends Podium { * For context [See docs](https://github.com/hapijs/hapi/blob/master/API.md#request-lifecycle) */ export type ServerExtType = 'onPreStart' | 'onPostStart' | 'onPreStop' | 'onPostStop'; -export type ServerRequestExtType = - 'onRequest' - | 'onPreAuth' +export type RouteRequestExtType = 'onPreAuth' | 'onCredentials' | 'onPostAuth' | 'onPreHandler' | 'onPostHandler' | 'onPreResponse'; +export type ServerRequestExtType = + RouteRequestExtType + | 'onRequest'; + /** * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverextevents) * Registers an extension function in one of the request lifecycle extension points where: @@ -2401,14 +2399,11 @@ export interface ServerExtEventsObject { * * request extension points: a lifecycle method. */ method: ServerExtPointFunction | ServerExtPointFunction[]; - /** - * options - (optional) an object with the following: - * * before - a string or array of strings of plugin names this method must execute before (on the same event). Otherwise, extension methods are executed in the order added. - * * after - a string or array of strings of plugin names this method must execute after (on the same event). Otherwise, extension methods are executed in the order added. - * * bind - a context object passed back to the provided method (via this) when called. Ignored if the method is an arrow function. - * * sandbox - if set to 'plugin' when adding a request extension points the extension is only added to routes defined by the current plugin. Not allowed when configuring route-level extensions, - * or when adding server extensions. Defaults to 'server' which applies to any route added to the server the extension is added to. - */ + options?: ServerExtOptions; +} + +export interface RouteExtObject { + method: Lifecycle.Method; options?: ServerExtOptions; } @@ -3257,7 +3252,7 @@ export class Server extends Podium { * Initialized with an empty object. * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-serverapp) */ - app?: ApplicationState; + app: ApplicationState; /** * Server Auth: properties and methods @@ -3873,7 +3868,7 @@ export namespace Lifecycle { type ReturnValueTypes = (null | string | number | boolean) | (Buffer) | - (Error | Boom.Boom) | + (Error | Boom) | (stream.Stream) | (object | object[]) | symbol | diff --git a/types/hapi/test/route/ext.ts b/types/hapi/test/route/ext.ts index 0a2ac25a4b..b8dff44699 100644 --- a/types/hapi/test/route/ext.ts +++ b/types/hapi/test/route/ext.ts @@ -7,9 +7,16 @@ server.route({ path: "/test", options: { ext: { - onPreResponse(request, h) { - return h.continue; + onPreResponse: { + method(_request, h) { + return h.continue; + }, }, + onPostHandler: [{ + method(_request, h) { + return h.continue; + }, + }], } } }); diff --git a/types/hapi/test/server/server-app.ts b/types/hapi/test/server/server-app.ts index 8e9cff88b0..69bac86e2f 100644 --- a/types/hapi/test/server/server-app.ts +++ b/types/hapi/test/server/server-app.ts @@ -6,20 +6,20 @@ const options: ServerOptions = { }; declare module "hapi" { - // Demonstrate augmenting the application state. - interface ApplicationState { - key?: string; - } + // Demonstrate augmenting the application state. + interface ApplicationState { + key?: string; + } } const server = new Server(options); -server.app!.key = 'value2'; +server.app.key = 'value2'; const serverRoute: ServerRoute = { path: '/', method: 'GET', handler(request, h) { - return 'key: ' + request.server.app!.key; + return 'key: ' + request.server.app.key; } }; diff --git a/types/hapi/test/server/server-plugins.ts b/types/hapi/test/server/server-plugins.ts index 7f3d194f84..8de3fdc24f 100644 --- a/types/hapi/test/server/server-plugins.ts +++ b/types/hapi/test/server/server-plugins.ts @@ -13,6 +13,10 @@ interface Plugin3 { three: 3; } +interface Plugin4 { + four: 4; +} + declare module 'hapi' { interface PluginProperties { example: { @@ -42,6 +46,11 @@ const plugin3: Plugin = { register: async (server: Server, options: Plugin3) => {} }; +const plugin4: Plugin = { + name: 'plugin4', + register: (server: Server, options: Plugin4) => {} +}; + const server = new Server({ port: 8000, }); @@ -90,5 +99,9 @@ server.register([ { plugin: plugin1, options: {one: 1} + }, + { + plugin: plugin4, + options: {four: 4} } ]); diff --git a/types/hapi/test/server/server-state.ts b/types/hapi/test/server/server-state.ts index 97cf5997f0..ba4ffe344c 100644 --- a/types/hapi/test/server/server-state.ts +++ b/types/hapi/test/server/server-state.ts @@ -1,5 +1,5 @@ // from https://hapijs.com/tutorials/cookies?lang=en_US -import { Request, ResponseToolkit, Server, ServerOptions, ServerRoute, ServerStateCookieOptions } from "hapi"; +import { Server, ServerOptions, ServerRoute, ServerStateCookieOptions } from "hapi"; const options: ServerOptions = { port: 8000, @@ -8,7 +8,8 @@ const options: ServerOptions = { const serverRoute: ServerRoute = { path: '/say-hello', method: 'GET', - handler(request, h) { + handler(_request, h) { + h.state('test', { test: true }); return h.response('Hello').state('data', { firstVisit: false }); } }; diff --git a/types/hapi/test/server/server-table.ts b/types/hapi/test/server/server-table.ts index 9237a2be28..ab14938be4 100644 --- a/types/hapi/test/server/server-table.ts +++ b/types/hapi/test/server/server-table.ts @@ -6,7 +6,7 @@ const options: ServerOptions = { }; const server = new Server(options); -server.app!.key = 'value2'; +server.app.key = 'value2'; server.route({ path: '/', diff --git a/types/heapdump/heapdump-tests.ts b/types/heapdump/heapdump-tests.ts index 49019f83fc..80306b9d32 100644 --- a/types/heapdump/heapdump-tests.ts +++ b/types/heapdump/heapdump-tests.ts @@ -1,9 +1,20 @@ import * as heapdump from 'heapdump'; -heapdump.writeSnapshot('/tmp/myDump', (err) => { - if (err) { - console.log('Failed to dump heap: ' + err); - } else { - console.log('Successfully dumped heap!'); - } +let strValue = ""; +let errValue = new Error(strValue); +let nullValue = null; +let undefinedValue; + +heapdump.writeSnapshot(strValue, (err, filename) => { + errValue = err as Error; + nullValue = err as null; + strValue = filename as string; + undefinedValue = filename as undefined; +}); + +heapdump.writeSnapshot((err, filename) => { + errValue = err as Error; + nullValue = err as null; + strValue = filename as string; + undefinedValue = filename as undefined; }); diff --git a/types/heapdump/index.d.ts b/types/heapdump/index.d.ts index d4e0477a32..1473ebb70a 100644 --- a/types/heapdump/index.d.ts +++ b/types/heapdump/index.d.ts @@ -2,5 +2,7 @@ // Project: https://github.com/bnoordhuis/node-heapdump // Definitions by: weekens // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 -export function writeSnapshot(dumpFileName: string, callback: (err?: Error) => void): void; +export function writeSnapshot(dumpFileName?: string, callback?: (err: Error | null, filename: string | undefined) => void): void; +export function writeSnapshot(callback: (err: Error | null, filename: string | undefined) => void): void; diff --git a/types/hellojs/hellojs-tests.ts b/types/hellojs/hellojs-tests.ts index 4a4e068379..8cf42d11e4 100644 --- a/types/hellojs/hellojs-tests.ts +++ b/types/hellojs/hellojs-tests.ts @@ -4,7 +4,8 @@ hello.init({ oauth: { version: 2, auth: '', - grant: '' + grant: '', + response_type: 'id_token token' }, refresh: true, scope_delim: ' ', diff --git a/types/hellojs/index.d.ts b/types/hellojs/index.d.ts index e8efdaf19c..5b23b29e07 100644 --- a/types/hellojs/index.d.ts +++ b/types/hellojs/index.d.ts @@ -53,7 +53,15 @@ declare namespace hello { type HelloJSResponseCallback = (r: any, headers: any) => void; - type HelloJSTokenResponseType = "token" | "code"; + type HelloJSTokenResponseType = + "code" + | "code id_token" + | "code id_token token" + | "code token" + | "id_token" + | "id_token token" + | "none" + | "token"; type HelloJSDisplayType = "popup" | "page" | "none"; diff --git a/types/heremaps/heremaps-tests.ts b/types/heremaps/heremaps-tests.ts index 9e92b92d72..40c0e92c5c 100644 --- a/types/heremaps/heremaps-tests.ts +++ b/types/heremaps/heremaps-tests.ts @@ -86,6 +86,21 @@ let polyline = new H.map.Polyline(new H.geo.Strip()); let clipArr: Array>; clipArr = polyline.clip(new H.geo.Rect(5, 5, 5, 5)); +let lineString = new H.geo.LineString(); +lineString.pushPoint({ lat: 53.3477, lng: -6.2597 }); +lineString.pushPoint({ lat: 51.5008, lng: -0.1224 }); +lineString.pushPoint({ lat: 48.8567, lng: 2.3508 }); +lineString.pushPoint({ lat: 52.5166, lng: 13.3833 }); +lineString.eachLatLngAlt((lat: number, lng: number, alt: number, i: number) => { + console.log(lat, lng, alt, i); +}); +lineString.getBounds(); +lineString.getPointCount(); +lineString.insertPoint(2, { lat: 53.3477, lng: -6.2597 }); +lineString.removePoint(2); + +let polyline2 = new H.map.Polyline(lineString); + let router = platform.getRoutingService(); let calculateRouteParams = { waypoint0: 'geo!52.5,13.4', diff --git a/types/heremaps/index.d.ts b/types/heremaps/index.d.ts index 8b68f11278..918e464c09 100644 --- a/types/heremaps/index.d.ts +++ b/types/heremaps/index.d.ts @@ -2,6 +2,7 @@ // Project: https://developer.here.com/ // Definitions by: Joshua Efiong // Bernd Hacker +// Ferdinand Armbruster // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 @@ -756,6 +757,31 @@ declare namespace H { /***** geo *****/ namespace geo { + /** + * The base class for all geometry types. + */ + class AbstractGeometry { + /** + * Returns the bounding rectangle of the geometry. + * @return {H.geo.Rect} - the bounding rectangle of the geometry or null if the bounding rectangle can't be computed (e.g. for a geometry without coordinates) + */ + getBounds(): H.geo.Rect; + + /** + * Checks whether the geometry is equal to the geometry supplied by the caller. + * Two geometries are considered as equal if they represent the same geometry type and have equal coordinate values. + * @param other {any} - The geometry to check against + * @return {boolean} - true if the two geometries are equal, otherwise false + */ + equals(other: any): boolean; + + /** + * To obtain a Well-Known-Text (WKT) representation of the geometry. + * @return {string} - the resulting WKT string + */ + toString(): string; + } + /** * A Geographic coordinate that specifies the height of a point in meters. A value of undefined is treated as 0. */ @@ -812,6 +838,277 @@ declare namespace H { */ type Longitude = number; + class LineString { + /** + * Constructor + * @param opt_latLngAlts {number[]=} - An optional array of latitude, longitude and altitude triples to initialize the LineString with. + * @param opt_ctx {H.geo.AltitudeContext=} - An optional altitude context for all altitudes contained in this LineString. + * @throws {H.lang.InvalidArgumentError} - in case of invalid lat, lng, alt values + */ + constructor(opt_latLngAlts?: number[], opt_ctx?: H.geo.AltitudeContext); + + /** + * This method pushes a lat, lng, alt to the end of this LineString. + * @param lat {H.geo.Latitude} + * @param lng {H.geo.Longitude} + * @param alt {H.geo.Altitude} + * @throws {H.lang.InvalidArgumentError} - in case of invalid lat, lng, alt value + */ + pushLatLngAlt(lat: H.geo.Latitude, lng: H.geo.Longitude, alt: H.geo.Altitude): void; + + /** + * This method splices the LineString 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 {number[]=} - The lat, lng, alt values to add + * @return {number[]} - An array of removed elements + * @throws {H.lang.InvalidArgumentError} - in case of invalid opt_latLngAlts argument + */ + spliceLatLngAlts(index: number, opt_nRemove?: number, opt_latLngAlts?: number[]): number[]; + + /** + * This method inserts one set of lat, lng, alt values into the LineString 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 LineString 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 LineString. + * @param geoPoint {H.geo.IPoint} + * @throws {H.lang.InvalidArgumentError} - in case of invalid geoPoint argument + */ + 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 LineString 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 LineString at the virtual point index. + * If the extracted point has an alt value, the LineString's altitude context will be supplied to the point. + * @param pointIndex {number} - the virtual point index in the LineString + * @param opt_out {H.geo.Point=} - an optional point object to store the lat, lng, alt values + * @return {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; + + /** + * A utility method to iterate over the points of a line string. + * @param eachFn {function(lat, lng, alt, index)} - The function to invoke for every point. It gets the point's latitude, longitude, altitude and index as arguments. + * @param opt_start {number=} - The point's start index (inclusive) to iterate from, defaults to 0. + * @param opt_end {number=} - The point's end index (exclusive) to iterate to, defaults to Infinity. + */ + eachLatLngAlt(eachFn: (lat: H.geo.Latitude, lng: H.geo.Longitude, alt: H.geo.Altitude, index: number) => void, opt_start?: number, opt_end?: number): void; + + /** + * To obtain whether a leg (formed by the given two longitudes) crosses the International Date Line. + * @param lng1 {H.geo.Longitude} - The start longitude of the leg + * @param lng2 {H.geo.Longitude} - The end longitude of the leg + * @return {boolean} + */ + static isDBC(lng1: H.geo.Longitude, lng2: H.geo.Longitude): boolean; + + /** + * To obtain the number of times that this LineString cross the International Date Line. + * @param opt_asClosed {boolean=} - Indicates whether the LineString is treated as closed (the LineString's last and first coordinates form the closing leg of a polygon). + * It defaults to false. + * @return {number} + */ + getDBCs(opt_asClosed?: boolean): number; + + /** + * This method return the number of points stored in this LineString. + * @return {number} - The number of points in this LineString + */ + getPointCount(): number; + + /** + * Returns the vertices of the line segments as an array of alternating latitude, longitude and altitude coordinates. + * The returned array must be treated as read-only to not violate the integrity of the line-string. + * @return {number[]} - Returns the raw lat, lng, alt values of this LineString + */ + getLatLngAltArray(): number[]; + + /** + * This method returns the bounding box of this LineString. + * Note: The LineString is treated as an open path. If the bounding rectangle for a closed shape is required, the closing leg must be merged in an extra step. + * @return {H.geo.Rect} - This LineString's bounding rectangle + */ + getBounds(): H.geo.Rect; + + /** + * This method initializes a new LineString with an array of lat, lng values. Arrays are expected to have an even length with the format [lat, lng, lat, lng, ...]. + * @param latLngs {number[]} - the array of lat, lng value. + * @return {H.geo.LineString} - The LineString containing the lat, lng values + * @throws {H.lang.InvalidArgumentError} - throws an error in case the latLngs array has an odd length + */ + static fromLatLngArray(latLngs: number[]): H.geo.LineString; + + /** + * Checks whether the geometry is equal to the geometry supplied by the caller. + * Two geometries are considered as equal if they represent the same geometry type and have equal coordinate values. + * @param other {any} - The geometry to check against + * @return {boolean} - true if the two geometries are equal, otherwise false + */ + equals(other: any): boolean; + + /** + * To obtain a Well-Known-Text (WKT) representation of the geometry. + * @return {string} - the resulting WKT string + */ + toString(): string; + } + + class MultiGeometry extends H.geo.AbstractGeometry { + /** + * The base class for a geometry that is a container for multiple geometries of a generic type. The type of the contained geometries is specified by the generic type parameter T + * @param geometries {T[]} - The list of geometries which are initially aggregated. + * @throws {H.lang.InvalidArgumentError} - if geometries parameter is not valid + */ + constructor(geometries: T[]); + + /** + * This method splices the specified MultiGeometry at the provided index, removing the specified number of items at that index and inserting new items. + * @param index {number} - The index at which to start changing the list. + * @param opt_deleteCount {number=} - The number of geometries to remove. + * @param opt_items {T[]=} - The geometries to add. + * @return {T[]} - the removed geometries. + */ + splice(index: number, opt_deleteCount?: number, opt_items?: T[]): T[]; + + /** + * Removes a contained geometry at the given index. + * @param index {number} - The index of the geometry to remove. + * @return {T} - the removed geometry. + * @throws {H.lang.OutOfRangeError} - if no geometry exists at the given index. + */ + removeAt(index: number): T; + + /** + * Removes the specified geometry from the multi-geometry + * @param geometry {T} - The geometry (by reference) to remove from this multi-geometry. + * @return {T} - the removed geometry or null if the geometry was not found + */ + remove(geometry: T): T; + + /** + * Returns the aggregated geometries of the multi-geometry. The returned geometries must be treated as read-only to not violate the integrity of the multi-geometry. + * @return {T[]} - An array of geometries + */ + getGeometries(): T[]; + + /** + * Adds the specified geometry to the current multi-geometry. + * @param geometry {T} - A geometry which will be added to the current multi-geometry + * @throws {H.lang.InvalidArgumentError} - in case of invalid geometry argument + */ + push(geometry: T): void; + + /** + * Returns the bounding rectangle of the geometry. + * @return {H.geo.Rect} - the bounding rectangle of the geometry or null if the bounding rectangle can't be computed (e.g. for a geometry without coordinates) + */ + getBounds(): H.geo.Rect; + + /** + * Checks whether the geometry is equal to the geometry supplied by the caller. + * Two geometries are considered as equal if they represent the same geometry type and have equal coordinate values. + * @param other {any} - The geometry to check against + * @return {boolean} - true if the two geometries are equal, otherwise false + */ + equals(other: any): boolean; + + /** + * To obtain a Well-Known-Text (WKT) representation of the geometry. + * @return {string} - the resulting WKT string + */ + toString(): string; + } + + class MultiLineString extends H.geo.MultiGeometry { + /** + * A MultiLineString is a collection of line strings represented as a H.geo.MultiGeometry with a H.geo.LineString as generic type parameter T. + * @param lineStrings {H.geo.LineString[]} - The list of line-strings which are initially represented by the MultiLineString. + * @throws {H.lang.InvalidArgumentError} - if the lineStrings argument is not valid + */ + constructor(lineStrings: H.geo.LineString[]); + + /** + * This method splices the specified MultiGeometry at the provided index, removing the specified number of items at that index and inserting new items. + * @param index {number} - The index at which to start changing the list. + * @param opt_deleteCount {number?} - The number of geometries to remove. + * @param opt_items {H.geo.LineString[]?} - The geometries to add. + * @return {H.geo.LineString[]} - the removed geometries + */ + splice(index: number, opt_deleteCount?: number, opt_items?: H.geo.LineString[]): H.geo.LineString[]; + + /** + * Removes a contained geometry at the given index. + * @param index {number} - The index of the geometry to remove. + * @return {H.geo.LineString} - the removed geometry. + * @throws {H.lang.OutOfRangeError} - if no geometry exists at the given index. + */ + removeAt(index: number): H.geo.LineString; + + /** + * Removes the specified geometry from the multi-geometry + * @param geometry {H.geo.LineString} -The geometry (by reference) to remove from this multi-geometry + * @return {H.geo.LineString} -the removed geometry or null if the geometry was not found + */ + remove(geometry: H.geo.LineString): H.geo.LineString; + + /** + * Returns the aggregated geometries of the multi-geometry. The returned geometries must be treated as read-only to not violate the integrity of the multi-geometry. + * @return {H.geo.LineString[]} - An array of geometries + */ + getGeometries(): H.geo.LineString[]; + + /** + * Adds the specified geometry to the current multi-geometry. + * @param geometry {H.geo.LineString} - A geometry which will be added to the current multi-geometry + * @throws {H.lang.InvalidArgumentError} - in case of invalid geometry argument + */ + push(geometry: H.geo.LineString): void; + + /** + * Returns the bounding rectangle of the geometry. + * @return {H.geo.Rect} - the bounding rectangle of the geometry or null if the bounding rectangle can't be computed (e.g. for a geometry without coordinates) + */ + getBounds(): H.geo.Rect; + + /** + * Checks whether the geometry is equal to the geometry supplied by the caller. + * Two geometries are considered as equal if they represent the same geometry type and have equal coordinate values. + * @param other {any} - The geometry to check against + * @return {boolean} - true if the two geometries are equal, otherwise false + */ + equals(other: any): boolean; + + /** + * To obtain a Well-Known-Text (WKT) representation of the geometry. + * @return {string} - the resulting WKT string + */ + toString(): string; + } + /** * PixelProjection transforms pixel world coordinates at a certain scale (zoom level) to geographical coordinates and vice versa. * By default, it uses the Mercator projection to transform geographic points into the 2d plane map points, which are adjusted to the current scale. @@ -1338,6 +1635,12 @@ declare namespace H { * @returns {H.map.AbstractMarker} - the marker itself */ setIcon(icon: (H.map.Icon | H.map.DomIcon)): H.map.AbstractMarker; + + /** + * @property draggable + * @description This property ensure that the marker can receive drag events. + */ + draggable?: boolean; } namespace AbstractMarker { @@ -2240,17 +2543,216 @@ declare namespace H { class Polyline extends H.map.GeoShape { /** * Constructor - * @param strip {H.geo.Strip} - the strip describing this polygon's vertices + * @param geometry {H.geo.Strip | H.geo.LineString | H.geo.MultiLineString} - The geometry that defines the line segments of the polyline * @param opt_options {H.map.Polyline.Options=} - optional initialization parameters */ - constructor(strip: H.geo.Strip, opt_options?: H.map.Polyline.Options); + constructor(geometry: H.geo.Strip | H.geo.LineString | H.geo.MultiLineString, 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>} + * To set the polyline's geometry. If the given geometry is modified afterwards, it must be set again via setGeometry(geometry) to not violate the integrity of the polyline. + * @param geometry {H.geo.LineString | H.geo.MultiLineString} - the geometry to set. + * @return {H.map.Polyline} - The polyline instance itself. + */ + setGeometry(geometry: H.geo.LineString | H.geo.MultiLineString): H.map.Polyline; + + /** + * To obtain the polyline's geometry. If you modify the obtained geometry, you must call setGeometry(geometry) afterwards to not violate the integrity of the polyline. + * @return {H.geo.LineString | H.geo.MultiLineString} + */ + getGeometry(): H.geo.LineString | H.geo.MultiLineString; + + /** + * Clips the geometry of the Polyline to a rectangular area + * @param geoRect {H.geo.Rect} - The rectangle to clip against. + * @returns {Array>} - a list of geometry segments that intersecting the given rectangle. + * Each segment is represented as a list of alternating latitude and longitude coordinates that describes a line string. */ clip(geoRect: H.geo.Rect): number[][]; + + /** + * Returns the geometry. + * @deprecated since 3.0.15.0 + * @return {H.geo.Strip} - spatial object. + */ + getStrip(): H.geo.Strip; + + /** + * Sets the geometry. + * @deprecated since 3.0.15.0 + * @param strip {H.geo.Strip} - The strip which represents geometry. + * @return {H.map.GeoShape} - The given spatial object + */ + setStrip(strip: H.geo.Strip): H.map.GeoShape; + + /** + * Returns the smallest rectangle which encloses the whole geometry of the GeoShape. + * @return {H.geo.Rect} + */ + getBounds(): H.geo.Rect; + + /** + * This method retrieves the drawing style of the given spatial object. The returned style is treated as immutable and must not be modified afterwards to prevent inconsistencies! + * @return {H.map.SpatialStyle} - The given spatial object + */ + getStyle(): H.map.SpatialStyle; + + /** + * This method sets the drawing style of the given spatial object. If the argument opt_style is an instance of H.map.SpatialStyle, + * it is treated as immutable and must not be modified afterwards to prevent inconsistencies! + * @param opt_style {(H.map.SpatialStyle | H.map.SpatialStyle.Options)=} - The style to set. If it evaluates to a false, the H.map.SpatialStyle.DEFAULT_STYLE is used. + * @return {H.map.Spatial} - The given spatial object + */ + setStyle(opt_style?: H.map.SpatialStyle | H.map.SpatialStyle.Options): H.map.Spatial; + + /** + * This method retrieves the arrow style of the given spatial object or undefined if the style is not defined. + * The returned arrow style is treated as immutable and must not be modified afterwards to prevent inconsistencies! + * @return {H.map.ArrowStyle} - An object encapsulating information about the arrow style or undefined if the arrow style is not defined. + */ + getArrows(): H.map.ArrowStyle | undefined; + + /** + * This method sets the arrow style of the given spatial object. + * @param opt_arrows {(H.map.ArrowStyle | H.map.ArrowStyle.Options)=} - The arrow style to be applied + * @return {H.map.Spatial} - The given spatial object + */ + setArrows(opt_arrows?: H.map.ArrowStyle | H.map.ArrowStyle.Options): H.map.Spatial; + + /** + * This method indicates whether this spatial object represents a closed shape + * @return {boolean} - true if the given spatial object is a closed shape, false otherwise + */ + isClosed(): boolean; + + /** + * This method retrieves the ID of the given object. + * @return {any} The identifier of the given object. + */ + getId(): any; + + /** + * This method sets the visibility of the given object. + * @param opt_visibility {boolean=} - Indicates whether the map object should be visible. + * @return {H.map.Object} - The given object + */ + setVisibility(opt_visibility?: boolean): H.map.Object; + + /** + * This method retrieves a value indicating the visibility of the given 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 + * @return {boolean} - A value indicating if the object is visible (true) or not false + */ + getVisibility(opt_effective?: boolean): boolean; + + /** + * This method retrieves the z-index of the given object. + * @return {number} - A value reflecting the z-index of the given object. + */ + getZIndex(): number | undefined; + + /** + * This method sets the z-index of the given object. + * @param zIndex {number | undefined} - A value indicating the new z-index + * @return {H.map.Object} - The given object + */ + setZIndex(zIndex: number | undefined): H.map.Object; + + /** + * This method compares the rendering z-order of the given object with another object. (The 'given object' mean the object on which the method has been invoke.) + * @param other {H.map.Object} -The map object with which to compare the given object. + * @return {number} - A value lower than 0 indicates that the given object has a lower z-order. 0 indicates that both objects have the same z-order. + * A value greater than 0, indicates that the given object has a higher z-order. + */ + compareZOrder(other: H.map.Object): number; + + /** + * This method retrieves the parent group which contains the given object or null if the object is not contained in any group. + * @return {H.map.Group} - An object representing the containing group object or null if the given object is not contained in any group. + */ + getParentGroup(): H.map.Group; + + /** + * The root object to which the given object is attached or the object itself if it is not attached to another. + * @return {H.map.Object} - An object representing the root group for the given object or the given object if it is not part of a group. + */ + getRootGroup(): H.map.Object; + + /** + * This method checks whether the received object is an inclusive descendant of the given object. + * @param object {any} - The object to check. + * @return {boolean} - true if the given object is contained in the given object, otherwise false + */ + contains(object: any): boolean; + + /** + * This method obtains the current provider of the given object + * @return {H.map.provider.ObjectProvider} - An object representing the provider + */ + getProvider(): H.map.provider.ObjectProvider; + + /** + * This method retrieves the invalidation states for the given object. + * @return {H.map.provider.Invalidations} - An object containing the invalidation states + */ + getInvalidations(): H.map.provider.Invalidations; + + /** + * This method invalidates the given map object. + * @param flags {H.math.BitMask} - The flags indicating the types of changes to the given object + * @return {boolean} - Indicates whether a validation was executed (only if the object has a provider) + */ + invalidate(flags: H.math.BitMask): boolean; + + /** + * This method retrieves previously stored arbitrary data from the given object. + * @return {any} - The previously stored data or undefined if no data was stored. + */ + getData(): any; + + /** + * This method stores arbitrary data with the given map object. + * @param data {any} - The data to be stored + * @return {H.map.Object} - The given map object + */ + setData(data: any): H.map.Object; + + /** + * This method adds a listener for a specific event. + * Note that to prevent potential memory leaks, you must either call removeEventListener or dispose on the given object when you no longer need it. + * @param type {string} - The name of the event + * @param handler {function()} - An event handler function + * @param opt_capture {boolean=} - true indicates that the method should listen in the capture phase (bubble otherwise) + * @param opt_scope {{}=} - An object defining the scope for the handler function + */ + addEventListener(type: string, handler: () => void, opt_capture?: boolean, opt_scope?: {}): void; + + /** + * This method removes a previously added listener from the EventTarget instance. + * @param type {string} - The name of the event + * @param handler {function()} - An event handler function + * @param opt_capture {boolean=} - true indicates that the method should listen in the capture phase (bubble otherwise) + * @param opt_scope {{}=} - An object defining the scope for the handler function + */ + removeEventListener(type: string, handler: () => void, opt_capture?: boolean, opt_scope?: {}): void; + + /** + * This method dispatches an event on the EventTarget object. + * @param evt {H.util.Event | string} - An object representing the event or a string with the event name + */ + dispatchEvent(evt: H.util.Event | string): void; + + /** + * This method removes listeners from the given 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 a callback which is triggered when the EventTarget object is being disposed. + * @param callback {function()} - The callback function. + * @param opt_scope {{}=} - An optional scope for the callback function + */ + addOnDisposeCallback(callback: () => void, opt_scope?: {}): void; } namespace Polyline { @@ -3164,7 +3666,7 @@ declare namespace H { * 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 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 @@ -3299,7 +3801,7 @@ declare namespace H { * 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 + * @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 */ @@ -3463,7 +3965,7 @@ declare namespace H { * 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 getCopyrights {(function(H.geo.Rect, number): ?Array)=} - A function to replace the default implementation of H.map.provider.Provider#getCopyrights */ interface Options { uri?: string; @@ -6137,7 +6639,7 @@ declare namespace H { namespace 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 + * @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. */ interface Options { @@ -6381,7 +6883,7 @@ declare namespace H { * 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 + * @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); @@ -6432,14 +6934,14 @@ declare namespace H { * 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 + * @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 + * @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; @@ -6683,14 +7185,14 @@ declare namespace H { * 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 + * @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?: {}, 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 + * @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; diff --git a/types/hexo-fs/hexo-fs-tests.ts b/types/hexo-fs/hexo-fs-tests.ts index 5f73cd91fc..7bd5dc13b8 100644 --- a/types/hexo-fs/hexo-fs-tests.ts +++ b/types/hexo-fs/hexo-fs-tests.ts @@ -1,9 +1,13 @@ import fs = require('hexo-fs'); import { join, dirname } from 'path'; -import 'mocha'; import chai = require('chai'); import Promise = require('bluebird'); +// Stub mocha functions +const {describe, it, before, after, beforeEach, afterEach} = null as any as { + [s: string]: ((s: string, cb: (done: any) => void) => void) & ((cb: (done: any) => void) => void) & {only: any, skip: any}; +}; + const should = chai.should(); function createDummyFolder(path: string) { @@ -198,7 +202,8 @@ it('copyFile() - callback', callback => { if (err) return callback(err); fs.readFile(dest, (err, content) => { - if (err) return callback(err); + if (err) + return callback(err); content!.should.eql(body); Promise.all([ diff --git a/types/highcharts/highstock.d.ts b/types/highcharts/highstock.d.ts index d2d81af469..a97ae9effa 100644 --- a/types/highcharts/highstock.d.ts +++ b/types/highcharts/highstock.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Highstock 2.1.5 +// Type definitions for Highstock 2.1.6 // Project: http://www.highcharts.com/ // Definitions by: David Deutsch @@ -87,12 +87,39 @@ declare namespace Highstock { scrollbar?: ScrollbarOptions; } + interface XAxisOptions extends AxisOptions { + ordinal?: boolean; + overscroll?: number; + } + + interface YAxisOptions extends AxisOptions { + height?: number | string; + maxLength?: number | string; + minLength?: number | string; + resize?: { + controlledAxis?: { + next?: Array; + prev?: Array; + }, + cursor?: string; + enabled?: boolean; + lineColor?: string; + lineDashStyle?: string; + lineWidth?: number; + x?: number; + y?: number; + }; + reversedStacks?: boolean; + tooltipValueFormat?: string; + top?: number | string; + } + interface Options extends Highcharts.Options { navigator?: NavigatorOptions; rangeSelector?: RangeSelectorOptions; scrollbar?: ScrollbarOptions; - xAxis?: AxisOptions[] | AxisOptions; - yAxis?: AxisOptions[] | AxisOptions; + xAxis?: XAxisOptions[] |XAxisOptions; + yAxis?: YAxisOptions[] | YAxisOptions; } interface Chart { diff --git a/types/highcharts/index.d.ts b/types/highcharts/index.d.ts index 347c82576d..1434999411 100644 --- a/types/highcharts/index.d.ts +++ b/types/highcharts/index.d.ts @@ -961,7 +961,7 @@ declare namespace Highcharts { * Use this in cases where a linear gradient between a minColor and maxColor is not sufficient. * The stops is an array of tuples, where the first item is a float between 0 and 1 assigning the relative position in the gradient, and the second item is the color. */ - stops?: Array<[number, string]>; + stops?: Array>; /** * The amount of ticks to draw on the axis. This opens up for aligning the ticks of multiple charts or panes within * a chart. This option overrides the tickPixelInterval option. @@ -1995,6 +1995,7 @@ declare namespace Highcharts { fontWeight?: string; left?: string; opacity?: number; + overflow?: string; padding?: string | number; position?: string; top?: string; @@ -3076,7 +3077,7 @@ declare namespace Highcharts { * @default ['50%', '50%'] * @since 2.3.0 */ - center?: [number | string, number | string]; + center?: Array; /** * The end angle of the polar X axis or gauge value axis, given in degrees where 0 is north. * @default startAngle + 360 @@ -5241,6 +5242,96 @@ declare namespace Highcharts { upColor?: Color; } + interface WordCloudChart extends BarChart { + /** + * For some series, there is a limit that shuts down initial animation by default when the total number of points + * in the chart is too high. For example, for a column chart and its derivatives, animation doesn't run if there + * is more than 250 points totally. To disable this cap, set animationLimit to Infinity. + * @default undefined + * @since 6.0.0 + */ + animationLimit?: number; + /** + * By default, series are exposed to screen readers as regions. By enabling this option, the series element itself + * will be exposed in the same way as the data points. This is useful if the series is not used as a grouping entity + * in the chart, but you still want to attach a description to the series. + * Requires the Accessibility module. + * @default undefined + * @since 5.0.12 + */ + exposeElementToA11y?: boolean; + /** + * This option decides which algorithm is used for placement, and rotation of a word. The choice of algorith is + * therefore a crucial part of the resulting layout of the wordcloud. It is possible for users to add their own + * custom placement strategies for use in word cloud. Read more about it in our documentation + * @default center + * @since 6.0.0 + */ + placementStrategy?: string; + /** + * Same as accessibility.pointDescriptionFormatter, but for an individual series. Overrides the chart wide + * configuration. + * @default undefined + * @since 5.0.12 + */ + pointDescriptionFormatter?: () => string; + /** + * Rotation options for the words in the wordcloud. + * @since 6.0.0 + */ + rotation?: { + /** + * The smallest degree of rotation for a + * @default 0 + * @since 6.0.0 + */ + from?: number; + /** + * The largest degree of rotation for a word. + * @default 90 + * @since 6.0.0 + */ + to?: number; + /** + * The number of possible orientations for a word, within the range of rotation.from and rotation.to. + * @default 2 + * @since 6.0.0 + */ + orientations?: number; + }; + + /** + * If set to True, the accessibility module will skip past the points in this series for keyboard navigation. + * @default undefined + * @since 5.0.12 + */ + skipKeyboardNavigation?: boolean; + /** + * Spiral used for placing a word after the inital position experienced a collision with either another word or the + * borders. It is possible for users to add their own custom spiralling algorithms for use in word cloud. Read more + * about it in our documentation + * @default rectangular + * @since 6.0.0 + */ + spiral?: string; + /** + * CSS styles for the words. + * @since 6.0.0 + */ + style?: { + /** + * @default sans-serif + * @since 6.0.0 + */ + fontFamily?: string; + /** + * @default 900 + * @since 6.0.0 + */ + fontWeight?: number | string; + }; + } + /** * The plotOptions is a wrapper object for config objects for each series type. The config objects for each series can * also be overridden for each series item as given in the series array. @@ -5422,6 +5513,7 @@ declare namespace Highcharts { interface SplineChartSeriesOptions extends IndividualSeriesOptions, SplineChart { } interface TreeMapChartSeriesOptions extends IndividualSeriesOptions, TreeMapChart { } interface WaterFallChartSeriesOptions extends IndividualSeriesOptions, WaterFallChart { } + interface WordCloudChartSeriesOptions extends IndividualSeriesOptions, WordCloudChart { } interface DataPoint { /** @@ -6710,6 +6802,36 @@ declare namespace Highcharts { map(array: any[], fn: Function): any[]; wrap(prototype: any, type: string, cb: (proceed: Function, ...args: any[]) => void): void; + + /** + * Add an event listener. + * + * @see {@link https://api.highcharts.com/class-reference/Highcharts#addEvent} + * @see {@link https://www.highcharts.com/docs/extending-highcharts/extending-highcharts} + * + * @param element The element or object to add a listener to. It can be a HTMLDOMElement, an Highcharts.SVGElement or any other object. + * @param type The event type. + * @param cb The function callback to execute when the event is fired. + * @returns A callback function to remove the added event. + */ + addEvent(element: HTMLElement | ElementObject | object, + type: string, + cb: (evt: Event) => void): () => void; + + /** + * Fire an event that was registered with + * + * @see {@link https://api.highcharts.com/class-reference/Highcharts#fireEvent} + * + * @param element The element or object to add a listener to. It can be a HTMLDOMElement, an Highcharts.SVGElement or any other object. + * @param type The event type. + * @param eventArguments Custom event arguments that are passed on as an argument to the event handler. + * @param defaultFunction The default function to execute if the other listeners haven't returned false. + */ + fireEvent(element: HTMLElement | ElementObject | object, + type: string, + eventArguments?: any, + defaultFunction?: () => void): void; } /** diff --git a/types/highcharts/test/index.ts b/types/highcharts/test/index.ts index ad026a1e52..310886b585 100644 --- a/types/highcharts/test/index.ts +++ b/types/highcharts/test/index.ts @@ -1631,12 +1631,18 @@ function test_Gauge() { type: 'gauge' }, pane: { + center: ['50%', '85%'], startAngle: -150, endAngle: 150 }, yAxis: { min: 0, - max: 100 + max: 100, + stops: [ + [0.1, '#DF5353'], + [0.5, '#DDDF0D'], + [0.9, '#55BF3B'], + ], }, plotOptions: { gauge: { @@ -2783,3 +2789,30 @@ function test_TitleUpdate() { } }); } + +function test_AddAndFireEvent() { + const chart = $('#container').highcharts(); + const type = 'drilldown'; + const evt = Highcharts.addEvent(chart, type, it => {}); + Highcharts.fireEvent(chart, type); +} + +function test_WordCloud() { + const allDefaults: Highcharts.WordCloudChartSeriesOptions = {}; + + // partial wordcloud demo + const series: Highcharts.WordCloudChartSeriesOptions = { + type: 'wordcloud', + data: [], + name: 'Occurrences', + rotation: { + to: 0 + }, + tooltip: { + headerFormat: null, + pointFormatter() { + return `${this.name}: Occurrence ${this.weight}`; + } + } + }; +} diff --git a/types/highland/highland-tests.ts b/types/highland/highland-tests.ts index e97c5c9416..a1c48c944b 100644 --- a/types/highland/highland-tests.ts +++ b/types/highland/highland-tests.ts @@ -1,5 +1,3 @@ - - // Note: try to maintain the ordering and separators // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -49,18 +47,18 @@ var anyArrStream: Highland.Stream; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - interface Foo { - foo(): string; + foo(): string; } interface Bar { - bar(): string; + bar(): string; } interface StrFooArrMap { - [key:string]: Foo[]; + [key: string]: Foo[]; } interface StrBarArrMap { - [key:string]: Bar[]; + [key: string]: Bar[]; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -128,9 +126,9 @@ fooStream = streamRedirect.to; fooStream = _(); fooStream = _(fooArr); fooStream = _((push, next) => { - push(null, foo); - push(err); - next(); + push(null, foo); + push(err); + next(); }); fooStream = _(fooStream); @@ -173,16 +171,23 @@ fooArrStream = fooStream.collect(); fooStream = fooStream.compact(); -barStream = fooStream.consume((err: Error, x: Foo, push: (err: Error, value?: Bar) => void, next: () => void) => { - push(err); - push(null, bar); - next(); -}); +barStream = fooStream.consume( + ( + err: Error, + x: Foo | Highland.Nil, + push: (err: Error, value?: Bar | Highland.Nil) => void, + next: () => void + ) => { + push(err); + push(null, bar); + next(); + } +); barStream = fooStream.consume((err, x, push, next) => { - push(err); - push(null, bar); - next(); + push(err); + push(null, bar); + next(); }); fooStream = fooStream.debounce(num); @@ -191,30 +196,32 @@ fooStream = fooStream.doto((x: Foo) => {}); fooStream = fooStream.drop(2); -fooStream = fooStream.errors((err: Error, push: (e: Error, x?: Foo) => void) => { - push(err); - push(null, x); - push(null, foo); -}); +fooStream = fooStream.errors( + (err: Error, push: (e: Error, x?: Foo) => void) => { + push(err); + push(null, x); + push(null, foo); + } +); fooStream = fooStream.errors((err, push) => { - push(err); - push(null, x); - push(null, foo); + push(err); + push(null, x); + push(null, foo); }); fooStream = fooStream.filter((x: Foo) => { - return bool; + return bool; }); fooStream = fooStream.find((x: Foo) => { - return bool; + return bool; }); fooStream = fooStream.findWhere(obj); strFooArrMapStream = fooStream.group((x: Foo) => { - return str; + return str; }); strFooArrMapStream = fooStream.group(str); @@ -227,7 +234,7 @@ fooStream = fooStream.last(); fooStream = fooStream.latest(); barStream = fooStream.map((x: Foo) => { - return bar; + return bar; }); barStream = fooStream.pluck(str); @@ -235,26 +242,24 @@ barStream = fooStream.pluck(str); fooStream = fooStream.ratelimit(3, 1000); barStream = fooStream.reduce(bar, (memo: Bar, x: Foo) => { - return memo; + return memo; }); barStream = fooStream.reduce1(bar, (memo: Bar, x: Foo) => { - return memo; + return memo; }); fooStream = fooStream.reject((x: Foo) => { - return bool; + return bool; }); barStream = fooStream.scan(bar, (memo: Bar, x: Foo) => { - return memo; + return memo; }); //missing scan1 -fooStream = fooStream.stopOnError((e: Error) => { - -}); +fooStream = fooStream.stopOnError((e: Error) => {}); fooStream = fooStream.take(num); @@ -264,7 +269,6 @@ fooStream = fooStream.throttle(num); fooStream = fooStream.where(obj); - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // HIGHER-ORDER STREAMS // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -274,15 +278,15 @@ fooStream = fooStream.concat(fooStream); fooStream = fooStream.concat(fooArr); fooStream = fooStream.flatFilter((x: Foo) => { - return boolStream; + return boolStream; }); barStream = fooStream.flatMap((x: Foo) => { - return barStream; + return barStream; }); barStream = fooStream.flatMap((x: Foo) => { - return bar; + return bar; }); barStream = fooStream.flatten(); @@ -315,24 +319,16 @@ fooStream.apply(func); fooStream.done(() => {}); -fooStream.each((x: Foo) => { - -}); +fooStream.each((x: Foo) => {}); fooStream = fooStream.pipe(fooStream); barStream = fooStream.pipe(barStream); -fooStream.pull((err: Error, x: Foo) => { +fooStream.pull((err: Error, x: Foo) => {}); -}); +fooStream.pull((err, x) => {}); -fooStream.pull((err, x) => { - -}); - -fooStream.toArray((arr: Foo[]) => { - -}); +fooStream.toArray((arr: Foo[]) => {}); fooStream.toCallback((err: Error, x: Foo) => {}); fooStream.toCallback((err: Error) => {}); @@ -341,6 +337,8 @@ fooStream.toCallback((err: Error) => {}); // UTILS // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +bool = _.isNil(x); + bool = _.isStream(x); bool = _.isStream(fooStream); @@ -360,7 +358,6 @@ f = _.wrapCallback(func, num); f = _.wrapCallback(func, strArr); f = _.wrapCallback(func, fn); - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // OBJECTS // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/types/highland/index.d.ts b/types/highland/index.d.ts index 3a2116a4d8..473e93880a 100644 --- a/types/highland/index.d.ts +++ b/types/highland/index.d.ts @@ -75,7 +75,7 @@ interface HighlandStatic { (): Highland.Stream; (xs: Highland.Stream[]): Highland.Stream; (xs: R[]): Highland.Stream; - (xs: (push: (err: Error | null, x?: R) => void, next: () => void) => void): Highland.Stream; + (xs: (push: (err: Error | null, x?: R | Highland.Nil) => void, next: () => void) => void): Highland.Stream; (xs: Highland.Stream): Highland.Stream; (xs: NodeJS.ReadableStream): Highland.Stream; @@ -89,6 +89,17 @@ interface HighlandStatic { // UTILS // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + /** + * Returns true if `x` is the end of stream marker. + * + * @id isNil + * @section Streams + * @name _.isNil(x) + * @param x - the object to test + * @api public + */ + isNil(x: R | Highland.Nil): x is Highland.Nil; + /** * Returns true if `x` is a Highland Stream. * @@ -563,7 +574,7 @@ declare namespace Highland { * @param {Function} f - the function to handle errors and values * @api public */ - consume(f: (err: Error, x: R, push: (err: Error | null, value?: U) => void, next: () => void) => void): Stream; + consume(f: (err: Error, x: R | Highland.Nil, push: (err: Error | null, value?: U | Highland.Nil) => void, next: () => void) => void): Stream; /** * Holds off pushing data events downstream until there has been no more @@ -614,9 +625,9 @@ declare namespace Highland { * * _([1, 2, 3, 4]).drop(2) // => 3, 4 */ - drop(n: number): Stream; + drop(n: number): Stream; - /** + /** * Extracts errors from a Stream and applies them to an error handler * function. Returns a new Stream with the errors removed (unless the error * handler chooses to rethrow them using `push`). Errors can also be @@ -653,7 +664,7 @@ declare namespace Highland { */ find(f: (x: R) => boolean): Stream; - /** + /** * A convenient form of [where](#where), which returns the first object from a * Stream that matches a set of property values. findWhere is to [where](#where) as [find](#find) is to [filter](#filter). * diff --git a/types/html-minifier/index.d.ts b/types/html-minifier/index.d.ts index c190fc4a74..2f1281c442 100644 --- a/types/html-minifier/index.d.ts +++ b/types/html-minifier/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Tanguy Krotoff // Riku // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 import * as UglifyJS from 'uglify-js'; import * as CleanCSS from 'clean-css'; diff --git a/types/html-minifier/v1/tsconfig.json b/types/html-minifier/v1/tsconfig.json index dd9586e561..846fa3a1f6 100644 --- a/types/html-minifier/v1/tsconfig.json +++ b/types/html-minifier/v1/tsconfig.json @@ -16,6 +16,9 @@ "html-minifier": [ "html-minifier/v1" ], + "uglify-js": [ + "uglify-js/v2" + ], "html-minifier/*": [ "html-minifier/v1/*" ] @@ -28,4 +31,4 @@ "index.d.ts", "html-minifier-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/html-void-elements/html-void-elements-tests.ts b/types/html-void-elements/html-void-elements-tests.ts new file mode 100644 index 0000000000..584c353455 --- /dev/null +++ b/types/html-void-elements/html-void-elements-tests.ts @@ -0,0 +1,3 @@ +import voidElements = require('html-void-elements'); + +voidElements.indexOf('br'); diff --git a/types/html-void-elements/index.d.ts b/types/html-void-elements/index.d.ts new file mode 100644 index 0000000000..47f903aad0 --- /dev/null +++ b/types/html-void-elements/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for html-void-elements 1.0 +// Project: https://github.com/wooorm/html-void-elements +// Definitions by: rhysd +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare const TagNames: string[]; +export = TagNames; diff --git a/types/html-void-elements/tsconfig.json b/types/html-void-elements/tsconfig.json new file mode 100644 index 0000000000..964e5ebdd2 --- /dev/null +++ b/types/html-void-elements/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "html-void-elements-tests.ts" + ] +} diff --git a/types/html-void-elements/tslint.json b/types/html-void-elements/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/html-void-elements/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/html-webpack-plugin/index.d.ts b/types/html-webpack-plugin/index.d.ts index 35774c1ac6..c3db12f4e7 100644 --- a/types/html-webpack-plugin/index.d.ts +++ b/types/html-webpack-plugin/index.d.ts @@ -4,7 +4,7 @@ // Benjamin Lim // Tomek Łaziuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import { Plugin } from 'webpack'; import { Options as HtmlMinifierOptions } from 'html-minifier'; diff --git a/types/html-webpack-template/index.d.ts b/types/html-webpack-template/index.d.ts index b02be3c463..1436728a72 100644 --- a/types/html-webpack-template/index.d.ts +++ b/types/html-webpack-template/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/jaketrent/html-webpack-template // Definitions by: Benjamin Lim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import { Options as HtmlWebpackPluginOptions } from 'html-webpack-plugin'; diff --git a/types/html2canvas/index.d.ts b/types/html2canvas/index.d.ts index dbc38f44bc..4fcfd81338 100644 --- a/types/html2canvas/index.d.ts +++ b/types/html2canvas/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for html2canvas.js 0.5 +// Type definitions for html2canvas.js 1.0-alpha // Project: https://github.com/niklasvh/html2canvas -// Definitions by: Richard Hepburn , Pei-Tang Huang +// Definitions by: Richard Hepburn , Pei-Tang Huang , Sebastian Schocke // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -8,15 +8,27 @@ declare namespace Html2Canvas { interface Html2CanvasOptions { + /** Whether to parse and render the element asynchronously */ + async?: boolean; + /** Whether to allow cross-origin images to taint the canvas */ allowTaint?: boolean; /** Canvas background color, if none is specified in DOM. Set undefined for transparent */ - background?: string; + backgroundColor?: string; - /** Define the heigt of the canvas in pixels. If null, renders with full height of the window. */ - height?: number; + /** Existing canvas element to use as a base for drawing on */ + canvas?: any; + /** Whether to use ForeignObject rendering if the browser supports it */ + foreignObjectRendering?: boolean; + + /** Predicate function which removes the matching elements from the render. */ + ignoreElements?: (element: HTMLElement) => boolean; + + /** Timeout for loading images, in milliseconds. Setting it to 0 will result in no timeout. */ + imageTimeout?: number; + /** Whether to render each letter seperately. Necessary if letter-spacing is used. */ letterRendering?: boolean; @@ -26,20 +38,44 @@ declare namespace Html2Canvas { /** Url to the proxy which is to be used for loading cross-origin images. If left empty, cross-origin images won't be loaded. */ proxy?: string; + /** Whether to cleanup the cloned DOM elements html2canvas creates temporarily */ + removeContainer?: boolean; + + /** The scale to use for rendering. Defaults to the browsers device pixel ratio. */ + scale?: number; + + /** Use svg powered rendering where available (FF11+). */ + svgRendering?: boolean; + /** Whether to test each image if it taints the canvas before drawing them */ taintTest?: boolean; - /** Timeout for loading images, in milliseconds. Setting it to 0 will result in no timeout. */ - timeout?: number; - - /** Define the width of the canvas in pixels. If null, renders with full width of the window. */ - width?: number; - /** Whether to attempt to load cross-origin images as CORS served, before reverting back to proxy. */ useCORS?: boolean; - /** Use svg powered rendering where available (FF11+). */ - svgRendering?: boolean; + /** Define the width of the canvas in pixels. If null, renders with full width of the window. */ + width?: number; + + /** Define the heigt of the canvas in pixels. If null, renders with full height of the window. */ + height?: number; + + /** Crop canvas x-coordinate */ + x?: number; + + /** Crop canvas y-coordinate */ + y?: number; + + /** The x-scroll position to used when rendering element, (for example if the Element uses position: fixed ) */ + scrollX?: number; + + /** The y-scroll position to used when rendering element, (for example if the Element uses position: fixed ) */ + scrollY?: number; + + /** Window width to use when rendering Element, which may affect things like Media queries */ + windowWidth?: number; + + /** Window height to use when rendering Element, which may affect things like Media queries */ + windowHeight?: number; } } diff --git a/types/hubot/hubot-tests.ts b/types/hubot/hubot-tests.ts index 9c5e832bc2..1c7540c950 100644 --- a/types/hubot/hubot-tests.ts +++ b/types/hubot/hubot-tests.ts @@ -4,11 +4,12 @@ const brain = new Hubot.Brain(); brain; // $ExpectType Brain brain.userForName('someone'); // $ExpectType any -const robot = new Hubot.Robot( +const robot = new Hubot.Robot<{}>( 'src/adapters', 'slack', false, 'hubot', ); -robot; // $ExpectType Robot +robot; // $ExpectType Robot<{}> +robot.adapter; // $ExpectType {} robot.hear(/hello/, () => null); // $ExpectType void diff --git a/types/hubot/index.d.ts b/types/hubot/index.d.ts index e0a809f69a..7da5501736 100644 --- a/types/hubot/index.d.ts +++ b/types/hubot/index.d.ts @@ -20,26 +20,27 @@ declare namespace Hubot { id: string; } - class Response { + class Response { match: RegExpMatchArray; message: Message; - constructor(robot: Robot, message: Message, match: RegExpMatchArray); + constructor(robot: R, message: Message, match: RegExpMatchArray); send(...strings: string[]): void; reply(...strings: string[]): void; random(items: T[]): T; } - type ListenerCallback = (response: Response) => void; + type ListenerCallback = (response: Response) => void; - class Robot { + class Robot { brain: Brain; + readonly adapter: A; constructor(adapterPath: string, adapter: string, httpd: boolean, name: string, alias?: string); - hear(regex: RegExp, callback: ListenerCallback): void; - hear(regex: RegExp, options: any, callback: ListenerCallback): void; - respond(regex: RegExp, callback: ListenerCallback): void; - respond(regex: RegExp, options: any, callback: ListenerCallback): void; + hear(regex: RegExp, callback: ListenerCallback): void; + hear(regex: RegExp, options: any, callback: ListenerCallback): void; + respond(regex: RegExp, callback: ListenerCallback): void; + respond(regex: RegExp, options: any, callback: ListenerCallback): void; } } diff --git a/types/i18next-express-middleware/index.d.ts b/types/i18next-express-middleware/index.d.ts index f9877b2659..d28a334429 100644 --- a/types/i18next-express-middleware/index.d.ts +++ b/types/i18next-express-middleware/index.d.ts @@ -5,104 +5,130 @@ // TypeScript Version: 2.3 declare namespace I18next { - interface I18nextOptions extends i18nextExpressMiddleware.I18nextOptions { } + interface I18nextOptions extends i18nextExpressMiddleware.I18nextOptions {} } declare namespace i18nextExpressMiddleware { - /** - * @summary Interface for Language detector options. - * @interface - */ - interface LanguageDetectorOptions { - caches?: Array|boolean; - cookieDomain?: string; - cookieExpirationDate?: Date; - lookupCookie?: string; - lookupFromPathIndex?: number; - lookupQuerystring?: string; - lookupSession?: string; - order?: Array; - } + /** + * @summary Interface for Language detector options. + * @interface + */ + interface LanguageDetectorOptions { + caches?: Array | boolean + cookieDomain?: string + cookieExpirationDate?: Date + lookupCookie?: string + lookupFromPathIndex?: number + lookupQuerystring?: string + lookupSession?: string + order?: Array + } - /** - * @summary i18next options. - * @interface - */ - interface I18nextOptions { - detection?: LanguageDetectorOptions; - } + /** + * @summary i18next options. + * @interface + */ + interface I18nextOptions { + detection?: LanguageDetectorOptions + } } -declare module "i18next-express-middleware" { - import express = require("express"); - import i18next = require("i18next"); +declare module 'i18next-express-middleware' { + import express = require('express') + import i18next = require('i18next') + + /** + * @summary Interface for middleware to use i18next in express.js. + * @interface + */ + export interface i18nextExpressMiddleware { + LanguageDetector(): express.Handler + missingKeyHandler(): express.Handler + } + + /** + * @summary Interface for own detection functionality. + */ + export interface i18nextCustomDetection { + name: string + lookup: ( + req: express.Request, + res: express.Response, + options?: Object + ) => void + cacheUserLanguage: ( + req: express.Request, + res: express.Response, + lng?: any, + options?: Object + ) => void + } + + /** + * @summary Detects user language from current request. + * @class + */ + export class LanguageDetector { + /** + * @summary Constructor. + * @constructor + * @param {any} services The services. + * @param {Object} options The options. + * @param {Object} allOptions The all options. + */ + constructor(services?: any, options?: Object, allOptions?: Object) /** - * @summary Interface for middleware to use i18next in express.js. - * @interface + * @summary Adds detector. + * @param {i18nextCustomDetection} detector The detector to add. */ - export interface i18nextExpressMiddleware { - LanguageDetector(): express.Handler; - missingKeyHandler(): express.Handler; - } + addDetector(detector: i18nextCustomDetection): void + + // NOTE: add documentation + cacheUserLanguage( + req: express.Request, + res: express.Response, + detectionOrder: any + ): void /** - * @summary Interface for own detection functionality. + * @summary Detects the language. + * @param {Request} req The HTTP request. + * @param {Response} res The HTTP response. + * @param {detectionOrder} detectionOrder The detection order. */ - export interface i18nextCustomDetection { - name: string; - lookup: (req: express.Request, res: express.Response, options?: Object) => void; - cacheUserLanguage: (req: express.Request, res: express.Response, lng?: any, options?: Object) => void; - } + detect( + req: express.Request, + res: express.Response, + detectionOrder: any + ): void /** - * @summary Detects user language from current request. - * @class + * @summary Initializes class. + * @param {any} services The services. + * @param {Object} options The options. + * @param {Object} allOptions The all options. */ - export class LanguageDetector { - /** - * @summary Constructor. - * @constructor - * @param {any} services The services. - * @param {Object} options The options. - * @param {Object} allOptions The all options. - */ - constructor(services?: any, options?: Object, allOptions?: Object); + init(services: any, options?: Object, allOptions?: Object): void + } - /** - * @summary Adds detector. - * @param {i18nextCustomDetection} detector The detector to add. - */ - addDetector(detector: i18nextCustomDetection): void; + export function getResourcesHandler( + i18next: i18next.i18n, + options: Object + ): express.Handler + export function handle( + i18next: i18next.i18n, + options?: Object + ): express.Handler - // NOTE: add documentation - cacheUserLanguage(req: express.Request, res: express.Response, detectionOrder: any): void; - - /** - * @summary Detects the language. - * @param {Request} req The HTTP request. - * @param {Response} res The HTTP response. - * @param {detectionOrder} detectionOrder The detection order. - */ - detect(req: express.Request, res: express.Response, detectionOrder: any): void; - - /** - * @summary Initializes class. - * @param {any} services The services. - * @param {Object} options The options. - * @param {Object} allOptions The all options. - */ - init(services: any, options?: Object, allOptions?: Object): void; - } - - export function getResourcesHandler(i18next: i18next.i18n, options: Object): express.Handler; - export function handle(i18next: i18next.i18n, options?: Object): express.Handler; - - /** - * @summary Gets handler for missing key. - * @param {I18nextStatic} i18next The i18next. - * @param {Object} options The options. - * @return {express.Handler} The express handler. - */ - export function missingKeyHandler(i18next: i18next.i18n, options: Object): express.Handler; + /** + * @summary Gets handler for missing key. + * @param {I18nextStatic} i18next The i18next. + * @param {Object} options The options. + * @return {express.Handler} The express handler. + */ + export function missingKeyHandler( + i18next: i18next.i18n, + options?: Object + ): express.Handler } diff --git a/types/iban/iban-tests.ts b/types/iban/iban-tests.ts index ac79e97a99..574769c461 100644 --- a/types/iban/iban-tests.ts +++ b/types/iban/iban-tests.ts @@ -39,7 +39,7 @@ function testIsValidBBAN() { */ function testPrintFormat() { var iban: string = 'BE68539007547034'; - var separator: string[] = ['fr']; + var separator: string = ' '; var format: string = IBAN.printFormat(iban, separator); } @@ -48,6 +48,6 @@ function testPrintFormat() { */ function testToBBAN() { var iban: string = 'BE68539007547034'; - var separator: string[] = ['-']; + var separator: string = '-'; var bban: string = IBAN.toBBAN(iban, separator); -} \ No newline at end of file +} diff --git a/types/iban/index.d.ts b/types/iban/index.d.ts index a47cfa618f..2b14d73954 100644 --- a/types/iban/index.d.ts +++ b/types/iban/index.d.ts @@ -42,17 +42,17 @@ interface IBANStatic { /** * @summary Returns the IBAN in a print format. * @param {string} iban The IBAN to convert. - * @param {string} The IBAN in print format. + * @param {string} separator The separator to use between IBAN blocks, defaults to ' '. */ - printFormat(iban: string, separator: string[]): string; + printFormat(iban: string, separator?: string): string; /** * @summary Convert the passed IBAN to a country-specific BBAN. * @param {string} iban The IBAN to convert. - * @param {string[]} Separator the separator to use between BBAN blocks. + * @param {string} separator The separator to use between BBAN blocks, defaults to ' '. * @returns {string} The BBAN */ - toBBAN(iban: string, separator: string[]): string; + toBBAN(iban: string, separator?: string): string; } declare var IBAN: IBANStatic; diff --git a/types/iframe-resizer/index.d.ts b/types/iframe-resizer/index.d.ts index 70d9c1d4f3..3858cab780 100644 --- a/types/iframe-resizer/index.d.ts +++ b/types/iframe-resizer/index.d.ts @@ -31,7 +31,7 @@ export interface IFrameOptions { * Override the default body margin style in the iFrame. A string can be any valid value for the * CSS margin attribute, for example '8px 3em'. A number value is converted into px. */ - bodyMargin?: number; + bodyMargin?: number | string; /** * When set to true, only allow incoming messages from the domain listed in the src property of the iFrame tag. * If your iFrame navigates between different domains, ports or protocols; then you will need to diff --git a/types/ignite-ui/index.d.ts b/types/ignite-ui/index.d.ts index bff55ec33d..a57a3606fe 100644 --- a/types/ignite-ui/index.d.ts +++ b/types/ignite-ui/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Ignite UI 17.2 +// Type definitions for Ignite UI 18.1 // Project: https://github.com/IgniteUI/ignite-ui // Definitions by: Ignite UI // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -6,12 +6,14 @@ interface DataSourceSettingsPaging { /** * Paging is not enabled by default + * */ enabled?: boolean; /** * Type for the paging operation * + * * Valid values: * "local" Data is paged client-side. * "remote" A remote request is done and URL params encoded @@ -20,26 +22,31 @@ interface DataSourceSettingsPaging { /** * Number of records on each page + * */ pageSize?: number; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested page size + * */ pageSizeUrlKey?: string; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested page index + * */ pageIndexUrlKey?: string; /** * Current page index + * */ pageIndex?: number; /** * Whether when a new page of data is requested we should append the new data to the existing data + * */ appendPage?: boolean; @@ -61,46 +68,55 @@ interface DataSourceSettingsFiltering { /** * Enables or disables case sensitive filtering on the data. Works only for local filtering + * */ caseSensitive?: boolean; /** * If the type of paging/sorting/filtering is local and applyToAllData is true, filtering will be performed on the whole data source that's present locally, otherwise only on the current dataView. if type is remote, this setting doesn't have any effect. + * */ applyToAllData?: boolean; /** * Can point to either a string or a function object. The parameters that are passed are 1) the data array to be filtered, 2) the filtering expression definitions. Should return an array of the filtered data + * */ customFunc?: any; /** * Url key that will be encoded in the request if remote filtering is performed. Default value of null implies OData-style URL encoding. Please see http://www.odata.org/developers/protocols/uri-conventions for details + * */ filterExprUrlKey?: string; /** * Url key that will be encoded in the request, specifying if the filtering logic will be AND or OR + * */ filterLogicUrlKey?: string; /** * Data will be initially filtered accordingly, directly after dataBind() + * */ defaultFields?: any[]; /** * A list of expression objects, containing the following key-value pairs: fieldName, expression (search string), condition , and logic (AND/OR) + * */ expressions?: any[]; /** * An "SQL-like' encoded expressions string. Takes precedence over "expressions". Example: col2 > 100; col2 LIKE %test% + * */ exprString?: string; /** * An object containing custom defined filtering conditions as objects. + * */ customConditions?: any; @@ -114,6 +130,7 @@ interface DataSourceSettingsSorting { /** * Sorting direction * + * * Valid values: * "none" * "asc" @@ -123,32 +140,38 @@ interface DataSourceSettingsSorting { /** * When defaultDirection is different than "none", and defaultFields is specified, data will be initially sorted accordingly, directly after dataBind() + * */ defaultFields?: any[]; /** * If the sorting type is local and applyToAllData is true, sorting will be performed on the whole data source that's present locally, otherwise only on the current dataView. If sorting type is remote, this setting doesn't have any effect. + * */ applyToAllData?: boolean; /** * Custom sorting function that can point to either a string or a function object. When the function is called, the following arguments are passed: data array, fields (array of field definitions) , direction ("asc" or "desc"). The function should return a sorted data array + * */ customFunc?: any; /** * Custom comparison sorting function. Accepts the following arguments: fields, schema, booleand value whether sorting is ascending , convert function(please check option for customConvertFunc) and returns a value 0 indicating that values are equal, 1 indicating that val1 > val2 and -1 indicating that val1 < val2 + * */ compareFunc?: any; /** * Custom data value conversion function(called from sorting function). Accepts a value of the data cell and column key and should return the converted value + * */ customConvertFunc?: any; /** * Specifies whether sorting will be applied locally or remotely (via a remote request) * + * * Valid values: * "remote" * "local" @@ -157,31 +180,37 @@ interface DataSourceSettingsSorting { /** * Specifies if sorting will be case sensitive or not. Works only for local sorting + * */ caseSensitive?: boolean; /** * URL param name which specifies how sorting expressions will be encoded in the URL. Default is null and uses OData conventions + * */ sortUrlKey?: string; /** * URL param value for ascending type of sorting. Default is null and uses OData conventions + * */ sortUrlAscValueKey?: string; /** * URL param value for descending type of sorting. Default is null and uses OData conventions + * */ sortUrlDescValueKey?: string; /** * A list of sorting expressions , consisting of the following keys (and their respective values): fieldName, direction and compareFunc (optional) + * */ expressions?: any[]; /** * Takes precedence over experssions, an "SQL-like" encoded expressions string : see sort(). Example col2 > 100 ORDER BY asc + * */ exprString?: string; @@ -194,28 +223,33 @@ interface DataSourceSettingsSorting { interface DataSourceSettingsGroupby { /** * Default collapse state + * */ defaultCollapseState?: boolean; /** * The name of the property that determines whether a record from the group data view is a group record. + * */ groupRecordKey?: string; /** * The name of the property that determines whether a record from the group data view is a summary group record. + * */ groupSummaryRecordKey?: string; /** * Array of objects containing the summaries for each field. * Each summary object has the following format { field:"fieldName", summaryFunctions: [] }, where the summaryFunctions arrays can contain either a summary name (avg, sum, count etc.) or a custom function for caclulating a custom summary. + * */ summaries?: any[]; /** * Specifies the postion for the summaries for each field inside each group. * + * * Valid values: * "top" One summary row will be displayed at the top for each group * "bottom" One summary row will be displayed at the bottom for each group @@ -226,6 +260,7 @@ interface DataSourceSettingsGroupby { /** * . Specifies how paging should be applied when there is at least one grouped column * + * * Valid values: * "allRecords" Paging is applied for all records - data and non-data records(like group-by records) * "dataRecordsOnly" Paging is applied ONLY for data records. Non-data records are disregarded in paging calculations. @@ -242,6 +277,7 @@ interface DataSourceSettingsSummaries { /** * Specifies whether summaries will be applied locally or remotely (via a remote request) * + * * Valid values: * "remote" A remote request is done and URL params encoded * "local" Data is paged client-side. @@ -250,17 +286,20 @@ interface DataSourceSettingsSummaries { /** * Url key for retrieving data from response - used only when summaries are remote + * */ summaryExprUrlKey?: string; /** * Key for retrieving data from the summaries response - used only when summaries are remote + * */ summariesResponseKey?: string; /** * Determines when the summary values are calculated * + * * Valid values: * "priortofilteringandpaging" * "afterfilteringbeforepaging" @@ -270,6 +309,7 @@ interface DataSourceSettingsSummaries { /** * A list of column settings that specifies custom summaries options per column basis + * */ columnSettings?: any[]; @@ -282,52 +322,62 @@ interface DataSourceSettingsSummaries { interface DataSourceSettings { /** * Setting this is only necessary when the data source is set to a table in string format. we need to create an invisible dummy data container in the body and append the table data to it + * */ id?: string; /** * This is the property in the dataView where actual resulting records will be put. (So the dataView will not be array but an object if this is defined), after the potential data source transformation + * */ outputResultsName?: string; /** * Callback function to call when data binding is complete + * */ callback?: Function; /** * Object on which to invoke the callback function + * */ callee?: any; /** * This is the normalized (transformed) resulting data, after it's fetched from the data source + * */ data?: any[]; /** * This is the source of data - non normalized. Can be an array, can be reference to some JSON object, can be a DOM element for a HTML TABLE, or a function + * */ dataSource?: any; /** * Client-side dataBinding event. Can be a string pointing to a function name, or an object pointing to a function + * */ dataBinding?: any; /** * Client-side dataBound event. Can be a string pointing to a function name, or an object pointing to a function + * */ dataBound?: any; /** * Specifies the HTTP verb to be used to issue the request + * */ requestType?: string; /** * Type of the data source * + * * Valid values: * "json" Specifies that the data source is an already evaluated JSON (JavaScript object/array) or a string that can be evaluated to JSON * "xml" Specifies that the data source is a XML Document object or a string that can be evaluated to XML @@ -347,27 +397,32 @@ interface DataSourceSettings { /** * A schema object that defines which fields from the data to bind to + * */ schema?: any; /** * The unique field identifier + * */ primaryKey?: string; /** * Property in the response which specifies the total number of records in the backend (this is needed for paging) + * */ responseTotalRecCountKey?: string; /** * Property in the response which specifies where the data records array will be held (if the response is wrapped) + * */ responseDataKey?: string; /** * Response type when a URL is set as the data source. See http://api.jquery.com/jQuery.ajax/ => dataType * + * * Valid values: * "json" * "xml" @@ -380,46 +435,55 @@ interface DataSourceSettings { /** * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType + * */ responseContentType?: string; /** * If set to false will disable transformations on schema, even if it is defined locally in the javascript code + * */ localSchemaTransform?: boolean; /** * Event that is fired before URL parameters are encoded. Can point to a function name or the function object itself + * */ urlParamsEncoding?: any; /** * Event that is fired after URL parameters are encoded (When a remote request is done). Can point to a function name or the function object itself + * */ urlParamsEncoded?: any; /** * Settings related to built-in paging functionality + * */ paging?: DataSourceSettingsPaging; /** * Settings related to built-in filtering functionality + * */ filtering?: DataSourceSettingsFiltering; /** * Settings related to built-in sorting functionality + * */ sorting?: DataSourceSettingsSorting; /** * Settings related to built-in group by functionality + * */ groupby?: DataSourceSettingsGroupby; /** * Settings related to built-in summaries functionality + * */ summaries?: DataSourceSettingsSummaries; @@ -427,11 +491,13 @@ interface DataSourceSettings { * *** IMPORTANT DEPRECATED *** * A list of field definitions specifying the schema of the data source. * Field objects description: {name, [type], [xpath]} + * */ fields?: any[]; /** * If true, will serialize the transaction log of updated values - if any - whenever commit is performed via a remote request. + * */ serializeTransactionLog?: boolean; @@ -440,16 +506,19 @@ interface DataSourceSettings { * if a new row is added, and then deleted, there will be no transaction added to the log * if an edit is made to a row or cell, then the value is brought back to its original value, the transaction should be removed * Note: This option takes effect only when autoCommit is set to false. + * */ aggregateTransactions?: boolean; /** * If auto commit is true, data will be automatically commited to the data source, once a value or a batch of values are updated via saveChanges() + * */ autoCommit?: boolean; /** * Specifies an update remote URL, to which an AJAX request will be made as soon as saveChages() is called. + * */ updateUrl?: string; @@ -459,6 +528,7 @@ interface DataSourceSettings { * Use item.row to obtain reference to the added row. * Use item.rowId to get the row ID. * Use dataSource to obtain reference to $.ig.DataSource. + * */ rowAdded?: Function; @@ -469,6 +539,7 @@ interface DataSourceSettings { * Use item.newRow to obtain reference to the updated row. * Use item.oldRow to obtain reference to the row that was updated. * Use dataSource to obtain reference to $.ig.DataSource. + * */ rowUpdated?: Function; @@ -479,6 +550,7 @@ interface DataSourceSettings { * Use item.rowId to get the row ID. * Use item.rowIndex to get the row index. * Use dataSource to obtain reference to $.ig.DataSource. + * */ rowInserted?: Function; @@ -488,6 +560,7 @@ interface DataSourceSettings { * Use item.rowId to get the row ID. * Use item.rowIndex to get the row index. * Use dataSource to obtain reference to $.ig.DataSource. + * */ rowDeleted?: Function; @@ -528,6 +601,8 @@ class DataSource { * 1. Before paging and filtering * 2. After filtering before paging * 3. After filtering and paging + * + * @param transformedExecution */ transformedData(transformedExecution: Object): Object; @@ -574,12 +649,15 @@ class DataSource { /** * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds */ dataSource(ds?: Object): Object; /** * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type * + * @param t * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty */ type(t?: Object): string; @@ -591,12 +669,13 @@ class DataSource { * @param ds the data source in which to search for the record. When not set it will use the current data source. * @param objPath Not used in $.ig.DataSource */ - findRecordByKey(key: string, ds?: string, objPath?: string): Object; + findRecordByKey(key: Object, ds?: string, objPath?: string): Object; /** * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source * * @param key primary key of the record + * @param origDs */ removeRecordByKey(key: Object, origDs: Object): void; @@ -604,6 +683,7 @@ class DataSource { * Removes a record from the data source at specific index. * * @param index index of record + * @param origDs */ removeRecordByIndex(index: number, origDs: Object): void; @@ -816,6 +896,9 @@ class DataSource { * match the number of records that exists on the client * * @param count the total number of records + * @param key + * @param dsObj + * @param context */ totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; @@ -876,6 +959,8 @@ class DataSource { /** * For internal use + * + * @param dirty */ pageSizeDirty(dirty: Object): void; @@ -955,6 +1040,8 @@ class TypeParser { /** * L.A. 18 June 2012 Fixing bug #113265 Column 'date' shows empty values as 'NaN' + * + * @param obj */ toDate(obj: Object): void; toNumber(obj: Object): void; @@ -977,6 +1064,7 @@ interface DataSchemaSchemaFields { * bool * date * object + * */ type?: string|number|boolean|Date|Object; @@ -1018,6 +1106,11 @@ interface DataSchemaSchema { */ outputResultsName?: string; + /** + * This is the property (xpath) in the data source where the child records of a record are located. Used in XML binding. + */ + childDataProperty?: string; + /** * Option for DataSchemaSchema */ @@ -1091,6 +1184,8 @@ class RemoteDataSource { * 1. Before paging and filtering * 2. After filtering before paging * 3. After filtering and paging + * + * @param transformedExecution */ transformedData(transformedExecution: Object): Object; @@ -1137,12 +1232,15 @@ class RemoteDataSource { /** * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds */ dataSource(ds?: Object): Object; /** * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type * + * @param t * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty */ type(t?: Object): string; @@ -1154,12 +1252,13 @@ class RemoteDataSource { * @param ds the data source in which to search for the record. When not set it will use the current data source. * @param objPath Not used in $.ig.DataSource */ - findRecordByKey(key: string, ds?: string, objPath?: string): Object; + findRecordByKey(key: Object, ds?: string, objPath?: string): Object; /** * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source * * @param key primary key of the record + * @param origDs */ removeRecordByKey(key: Object, origDs: Object): void; @@ -1167,6 +1266,7 @@ class RemoteDataSource { * Removes a record from the data source at specific index. * * @param index index of record + * @param origDs */ removeRecordByIndex(index: number, origDs: Object): void; @@ -1379,6 +1479,9 @@ class RemoteDataSource { * match the number of records that exists on the client * * @param count the total number of records + * @param key + * @param dsObj + * @param context */ totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; @@ -1439,6 +1542,8 @@ class RemoteDataSource { /** * For internal use + * + * @param dirty */ pageSizeDirty(dirty: Object): void; @@ -1555,6 +1660,8 @@ class JSONDataSource { * 1. Before paging and filtering * 2. After filtering before paging * 3. After filtering and paging + * + * @param transformedExecution */ transformedData(transformedExecution: Object): Object; @@ -1601,12 +1708,15 @@ class JSONDataSource { /** * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds */ dataSource(ds?: Object): Object; /** * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type * + * @param t * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty */ type(t?: Object): string; @@ -1618,12 +1728,13 @@ class JSONDataSource { * @param ds the data source in which to search for the record. When not set it will use the current data source. * @param objPath Not used in $.ig.DataSource */ - findRecordByKey(key: string, ds?: string, objPath?: string): Object; + findRecordByKey(key: Object, ds?: string, objPath?: string): Object; /** * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source * * @param key primary key of the record + * @param origDs */ removeRecordByKey(key: Object, origDs: Object): void; @@ -1631,6 +1742,7 @@ class JSONDataSource { * Removes a record from the data source at specific index. * * @param index index of record + * @param origDs */ removeRecordByIndex(index: number, origDs: Object): void; @@ -1843,6 +1955,9 @@ class JSONDataSource { * match the number of records that exists on the client * * @param count the total number of records + * @param key + * @param dsObj + * @param context */ totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; @@ -1903,6 +2018,8 @@ class JSONDataSource { /** * For internal use + * + * @param dirty */ pageSizeDirty(dirty: Object): void; @@ -2097,6 +2214,9 @@ class RESTDataSource { /** * Posts to the restSettings urls using $.ajax, by serializing the changes as url params. + * + * @param success + * @param error */ saveChanges(success: Object, error: Object): void; @@ -2127,6 +2247,8 @@ class RESTDataSource { * 1. Before paging and filtering * 2. After filtering before paging * 3. After filtering and paging + * + * @param transformedExecution */ transformedData(transformedExecution: Object): Object; @@ -2173,12 +2295,15 @@ class RESTDataSource { /** * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds */ dataSource(ds?: Object): Object; /** * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type * + * @param t * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty */ type(t?: Object): string; @@ -2190,12 +2315,13 @@ class RESTDataSource { * @param ds the data source in which to search for the record. When not set it will use the current data source. * @param objPath Not used in $.ig.DataSource */ - findRecordByKey(key: string, ds?: string, objPath?: string): Object; + findRecordByKey(key: Object, ds?: string, objPath?: string): Object; /** * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source * * @param key primary key of the record + * @param origDs */ removeRecordByKey(key: Object, origDs: Object): void; @@ -2203,6 +2329,7 @@ class RESTDataSource { * Removes a record from the data source at specific index. * * @param index index of record + * @param origDs */ removeRecordByIndex(index: number, origDs: Object): void; @@ -2407,6 +2534,9 @@ class RESTDataSource { * match the number of records that exists on the client * * @param count the total number of records + * @param key + * @param dsObj + * @param context */ totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; @@ -2467,6 +2597,8 @@ class RESTDataSource { /** * For internal use + * + * @param dirty */ pageSizeDirty(dirty: Object): void; @@ -2543,6 +2675,7 @@ RESTDataSource: typeof Infragistics.RESTDataSource; interface JSONPDataSourceSettings { /** * Override the callback function name in a jsonp request. Sets option jsonp in $.ajax functionbool Setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation + * */ jsonp?: string|boolean; @@ -2593,6 +2726,8 @@ class JSONPDataSource { * 1. Before paging and filtering * 2. After filtering before paging * 3. After filtering and paging + * + * @param transformedExecution */ transformedData(transformedExecution: Object): Object; @@ -2639,12 +2774,15 @@ class JSONPDataSource { /** * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds */ dataSource(ds?: Object): Object; /** * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type * + * @param t * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty */ type(t?: Object): string; @@ -2656,12 +2794,13 @@ class JSONPDataSource { * @param ds the data source in which to search for the record. When not set it will use the current data source. * @param objPath Not used in $.ig.DataSource */ - findRecordByKey(key: string, ds?: string, objPath?: string): Object; + findRecordByKey(key: Object, ds?: string, objPath?: string): Object; /** * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source * * @param key primary key of the record + * @param origDs */ removeRecordByKey(key: Object, origDs: Object): void; @@ -2669,6 +2808,7 @@ class JSONPDataSource { * Removes a record from the data source at specific index. * * @param index index of record + * @param origDs */ removeRecordByIndex(index: number, origDs: Object): void; @@ -2881,6 +3021,9 @@ class JSONPDataSource { * match the number of records that exists on the client * * @param count the total number of records + * @param key + * @param dsObj + * @param context */ totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; @@ -2941,6 +3084,8 @@ class JSONPDataSource { /** * For internal use + * + * @param dirty */ pageSizeDirty(dirty: Object): void; @@ -3045,6 +3190,8 @@ class XmlDataSource { * 1. Before paging and filtering * 2. After filtering before paging * 3. After filtering and paging + * + * @param transformedExecution */ transformedData(transformedExecution: Object): Object; @@ -3091,12 +3238,15 @@ class XmlDataSource { /** * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds */ dataSource(ds?: Object): Object; /** * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type * + * @param t * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty */ type(t?: Object): string; @@ -3108,12 +3258,13 @@ class XmlDataSource { * @param ds the data source in which to search for the record. When not set it will use the current data source. * @param objPath Not used in $.ig.DataSource */ - findRecordByKey(key: string, ds?: string, objPath?: string): Object; + findRecordByKey(key: Object, ds?: string, objPath?: string): Object; /** * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source * * @param key primary key of the record + * @param origDs */ removeRecordByKey(key: Object, origDs: Object): void; @@ -3121,6 +3272,7 @@ class XmlDataSource { * Removes a record from the data source at specific index. * * @param index index of record + * @param origDs */ removeRecordByIndex(index: number, origDs: Object): void; @@ -3333,6 +3485,9 @@ class XmlDataSource { * match the number of records that exists on the client * * @param count the total number of records + * @param key + * @param dsObj + * @param context */ totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; @@ -3393,6 +3548,8 @@ class XmlDataSource { /** * For internal use + * + * @param dirty */ pageSizeDirty(dirty: Object): void; @@ -3509,6 +3666,8 @@ class FunctionDataSource { * 1. Before paging and filtering * 2. After filtering before paging * 3. After filtering and paging + * + * @param transformedExecution */ transformedData(transformedExecution: Object): Object; @@ -3555,12 +3714,15 @@ class FunctionDataSource { /** * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds */ dataSource(ds?: Object): Object; /** * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type * + * @param t * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty */ type(t?: Object): string; @@ -3572,12 +3734,13 @@ class FunctionDataSource { * @param ds the data source in which to search for the record. When not set it will use the current data source. * @param objPath Not used in $.ig.DataSource */ - findRecordByKey(key: string, ds?: string, objPath?: string): Object; + findRecordByKey(key: Object, ds?: string, objPath?: string): Object; /** * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source * * @param key primary key of the record + * @param origDs */ removeRecordByKey(key: Object, origDs: Object): void; @@ -3585,6 +3748,7 @@ class FunctionDataSource { * Removes a record from the data source at specific index. * * @param index index of record + * @param origDs */ removeRecordByIndex(index: number, origDs: Object): void; @@ -3797,6 +3961,9 @@ class FunctionDataSource { * match the number of records that exists on the client * * @param count the total number of records + * @param key + * @param dsObj + * @param context */ totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; @@ -3857,6 +4024,8 @@ class FunctionDataSource { /** * For internal use + * + * @param dirty */ pageSizeDirty(dirty: Object): void; @@ -3973,6 +4142,8 @@ class HtmlTableDataSource { * 1. Before paging and filtering * 2. After filtering before paging * 3. After filtering and paging + * + * @param transformedExecution */ transformedData(transformedExecution: Object): Object; @@ -4019,12 +4190,15 @@ class HtmlTableDataSource { /** * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds */ dataSource(ds?: Object): Object; /** * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type * + * @param t * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty */ type(t?: Object): string; @@ -4036,12 +4210,13 @@ class HtmlTableDataSource { * @param ds the data source in which to search for the record. When not set it will use the current data source. * @param objPath Not used in $.ig.DataSource */ - findRecordByKey(key: string, ds?: string, objPath?: string): Object; + findRecordByKey(key: Object, ds?: string, objPath?: string): Object; /** * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source * * @param key primary key of the record + * @param origDs */ removeRecordByKey(key: Object, origDs: Object): void; @@ -4049,6 +4224,7 @@ class HtmlTableDataSource { * Removes a record from the data source at specific index. * * @param index index of record + * @param origDs */ removeRecordByIndex(index: number, origDs: Object): void; @@ -4261,6 +4437,9 @@ class HtmlTableDataSource { * match the number of records that exists on the client * * @param count the total number of records + * @param key + * @param dsObj + * @param context */ totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; @@ -4321,6 +4500,8 @@ class HtmlTableDataSource { /** * For internal use + * + * @param dirty */ pageSizeDirty(dirty: Object): void; @@ -4425,6 +4606,8 @@ class ArrayDataSource { * 1. Before paging and filtering * 2. After filtering before paging * 3. After filtering and paging + * + * @param transformedExecution */ transformedData(transformedExecution: Object): Object; @@ -4471,12 +4654,15 @@ class ArrayDataSource { /** * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds */ dataSource(ds?: Object): Object; /** * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type * + * @param t * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty */ type(t?: Object): string; @@ -4488,12 +4674,13 @@ class ArrayDataSource { * @param ds the data source in which to search for the record. When not set it will use the current data source. * @param objPath Not used in $.ig.DataSource */ - findRecordByKey(key: string, ds?: string, objPath?: string): Object; + findRecordByKey(key: Object, ds?: string, objPath?: string): Object; /** * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source * * @param key primary key of the record + * @param origDs */ removeRecordByKey(key: Object, origDs: Object): void; @@ -4501,6 +4688,7 @@ class ArrayDataSource { * Removes a record from the data source at specific index. * * @param index index of record + * @param origDs */ removeRecordByIndex(index: number, origDs: Object): void; @@ -4713,6 +4901,9 @@ class ArrayDataSource { * match the number of records that exists on the client * * @param count the total number of records + * @param key + * @param dsObj + * @param context */ totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; @@ -4773,6 +4964,8 @@ class ArrayDataSource { /** * For internal use + * + * @param dirty */ pageSizeDirty(dirty: Object): void; @@ -4940,6 +5133,8 @@ class MashupDataSource { * 1. Before paging and filtering * 2. After filtering before paging * 3. After filtering and paging + * + * @param transformedExecution */ transformedData(transformedExecution: Object): Object; @@ -4986,12 +5181,15 @@ class MashupDataSource { /** * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds */ dataSource(ds?: Object): Object; /** * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type * + * @param t * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty */ type(t?: Object): string; @@ -5003,12 +5201,13 @@ class MashupDataSource { * @param ds the data source in which to search for the record. When not set it will use the current data source. * @param objPath Not used in $.ig.DataSource */ - findRecordByKey(key: string, ds?: string, objPath?: string): Object; + findRecordByKey(key: Object, ds?: string, objPath?: string): Object; /** * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source * * @param key primary key of the record + * @param origDs */ removeRecordByKey(key: Object, origDs: Object): void; @@ -5016,6 +5215,7 @@ class MashupDataSource { * Removes a record from the data source at specific index. * * @param index index of record + * @param origDs */ removeRecordByIndex(index: number, origDs: Object): void; @@ -5167,6 +5367,9 @@ class MashupDataSource { * match the number of records that exists on the client * * @param count the total number of records + * @param key + * @param dsObj + * @param context */ totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; @@ -5227,6 +5430,8 @@ class MashupDataSource { /** * For internal use + * + * @param dirty */ pageSizeDirty(dirty: Object): void; @@ -5435,6 +5640,7 @@ interface TreeHierarchicalDataSourceSettingsTreeDSPaging { /** * When data flows to the next page there are a couple of different modes that can help communicate the context of a leaf level row. When mode option is 'rootLevelOnly' then the context row always shows the value of the contextRowRootText option. * + * * Valid values: * "none" Does not render the contextual row * "parent" Renders a read-only representation of the immediate parent row @@ -5513,16 +5719,19 @@ interface TreeHierarchicalDataSourceSettingsTreeDS { /** * If set to TRUE it is expected that the source of data is normalized and transformed(has set dataLevel and expansion state). The source of data is used as flatDataView. Usually used when the paging is remote and paging mode is allLevels, or features are remote(and the processing of the returned result should be made on the server) + * */ initialFlatDataView?: boolean; /** * Specifies a custom function to be called when requesting data to the server - usually when expanding/collapsing record. If set the function should return the encoded URL. It takes as parameters: data record(type: object), expand - (type: bool). + * */ customEncodeUrlFunc?: Function; /** * If true save expansion states in internal list and send it to the server. Applying to one of the main constraint of the REST architecture Stateless Interactions - client specific data(like expansion states) should NOT be stored on the server + * */ persistExpansionStates?: boolean; @@ -5764,6 +5973,7 @@ class TreeHierarchicalDataSource { * @param fieldExpressions a list of field expression definitions * @param boolLogic boolean logic. Accepted values are AND and OR. * @param keepFilterState if keepFilterState is set to true, it will not discard previous filtering expressions + * @param fieldExpressionsOnStrings */ filter(fieldExpressions: Object, boolLogic: Object, keepFilterState: boolean, fieldExpressionsOnStrings: Object): void; @@ -5796,6 +6006,8 @@ class TreeHierarchicalDataSource { /** * Gets the path of a record by the record or the record's key + * + * @param record */ getPathBy(record: Object): string; @@ -5812,6 +6024,7 @@ class TreeHierarchicalDataSource { * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source * * @param key primary key of the record + * @param origDs */ removeRecordByKey(key: Object, origDs: Object): void; @@ -5869,6 +6082,8 @@ class TreeHierarchicalDataSource { * 1. Before paging and filtering * 2. After filtering before paging * 3. After filtering and paging + * + * @param transformedExecution */ transformedData(transformedExecution: Object): Object; @@ -5915,12 +6130,15 @@ class TreeHierarchicalDataSource { /** * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource + * + * @param ds */ dataSource(ds?: Object): Object; /** * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type * + * @param t * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty */ type(t?: Object): string; @@ -5929,6 +6147,7 @@ class TreeHierarchicalDataSource { * Removes a record from the data source at specific index. * * @param index index of record + * @param origDs */ removeRecordByIndex(index: number, origDs: Object): void; @@ -6063,6 +6282,9 @@ class TreeHierarchicalDataSource { * match the number of records that exists on the client * * @param count the total number of records + * @param key + * @param dsObj + * @param context */ totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; @@ -6113,6 +6335,8 @@ class TreeHierarchicalDataSource { /** * For internal use + * + * @param dirty */ pageSizeDirty(dirty: Object): void; @@ -6221,9 +6445,147 @@ interface IgniteUIStatic { SimpleTextMarkerTemplate: typeof Infragistics.SimpleTextMarkerTemplate; } +interface ShapeDataSourceSettings { + /** + * The unique identifier. + */ + id?: string; + + /** + * The Uri of the .shp portion of the Shapefile. + */ + shapefileSource?: string; + + /** + * The Uri of the .dbf portion of the Shapefile. + */ + databaseSource?: string; + + /** + * Callback function to call when data binding is complete. + */ + callback?: Function; + + /** + * Object on which to invoke the callback function. + */ + callee?: any; + + /** + * Callback function to call to allow shape records to be transformed. + * paramType="object" the shape record to be transformed. + */ + transformRecord?: Function; + + /** + * Callback function to call to allow points in the shape records to be transformed. + * paramType="object" the point to be transformed in place. The object will look like { x: value, y: value2 } + */ + transformPoint?: Function; + + /** + * Callback function to call to allow the bounds of the shape data source to be transformed. + * paramType="object" the bounds of the shape datasource to be transformed in place. The object will look like { top: value, left: value, width: value, height: value } + */ + transformBounds?: Function; + + /** + * Callback function to call when the import process has been completed + * paramType="object" the ShapeDataSource instance + */ + importCompleted?: Function; + + /** + * Option for ShapeDataSourceSettings + */ + [optionName: string]: any; +} + +declare namespace Infragistics { +class ShapeDataSource { + constructor(settings: ShapeDataSourceSettings); + + /** + * Loads to the current data source + */ + dataBind(): void; + + /** + * Returns true if data is loaded + */ + isBound(): boolean; + dataView(): void; + + /** + * Returns the current converter instance + */ + converter(): Object; +} +} +interface IgniteUIStatic { +ShapeDataSource: typeof Infragistics.ShapeDataSource; +} + +interface TriangulationDataSourceSettings { + /** + * The unique identifier. + */ + id?: string; + + /** + * A Uri specifying the location of the Itf file. + */ + source?: string; + + /** + * The TriangulationSource which is typically created after importing the Itf from the Source Uri. + */ + triangulationSource?: string; + + /** + * Callback function to call when data binding is complete + */ + callback?: Function; + + /** + * Object on which to invoke the callback function + */ + callee?: any; + + /** + * Option for TriangulationDataSourceSettings + */ + [optionName: string]: any; +} + +declare namespace Infragistics { +class TriangulationDataSource { + constructor(settings: TriangulationDataSourceSettings); + + /** + * Loads to the current data source + */ + dataBind(): void; + + /** + * Returns true if data is loaded + */ + isBound(): boolean; + dataView(): void; + + /** + * Returns the current converter instance + */ + converter(): Object; +} +} +interface IgniteUIStatic { +TriangulationDataSource: typeof Infragistics.TriangulationDataSource; +} + interface GridExcelExporterCallbacks { /** - * Set a callback that is fired after the cell is exported. + * A function to call after the cell is exported. * Function takes arguments sender and args. * Use args.columnKey to get the igGrid column key of the cell. * Use args.columnIndex to get the igGrid column index of the cell. @@ -6231,11 +6593,12 @@ interface GridExcelExporterCallbacks { * Use args.rowId to get key or index of row. * Use args.xlRow to get reference to the worksheet row. * Use args.grid to get reference to the igGrid widget. + * */ cellExported?: Function; /** - * Cancel="true" Set a callback that is fired before the cell exporting. + * Cancel="true" A function to call before the cell is exported. * Function takes arguments sender and args. * Use args.columnKey to get the igGrid column key of the cell. * Use args.columnIndex to get the igGrid column index of the cell. @@ -6243,96 +6606,113 @@ interface GridExcelExporterCallbacks { * Use args.rowId to get key or index of row. * Use args.xlRow to get reference to the worksheet row. * Use args.grid to get reference to the igGrid widget. + * Return false in order to cancel exporting the cell. + * */ cellExporting?: Function; /** - * Set a callback that is fired when exporting fails. - * Use error to get the reference of error object. + * A function to call when exporting fails. + * Use error to obtain reference of the error object. + * */ error?: Function; /** - * Cancel="true" Set a callback that is fired when export is ending, but the document is not saved. + * A function to call before the Excel file is downloaded. * Function takes arguments sender and args. * Use args.grid to get reference to the igGrid widget. - * Use args.workbook to get reference to the excel workbook. - * Use args.worksheet to get reference to the excel worksheet. + * Use args.workbook to get reference to the Excel workbook. + * Use args.worksheet to get reference to the Excel worksheet. + * Return false in order to cancel downloading the file. + * */ exportEnding?: Function; /** - * Cancel="true" Set a callback that is fired when the exporting has started. + * Cancel="true" A function to call before exporting starts. * Function takes arguments sender and args. * Use args.grid to get reference to igGrid widget. + * Return false in order to cancel exporting. + * */ exportStarting?: Function; /** - * Set a callback that is fired after the header cell is exported. + * A function to call after a header cell is exported. * Function takes arguments sender and args. - * Use args.headerText to get the igGrid column key of the header cell. - * Use args.columnKey to get the igGrid column key of the header cell. - * Use args.columnIndex to get the igGrid column index of the header cell. + * Use args.headerText to get the igGrid column header text. + * Use args.columnKey to get the igGrid column key. + * Use args.columnIndex to get the igGrid column index. + * */ headerCellExported?: Function; /** - * Cancel="true" Set a callback that is fired before the header cell exporting. + * A function to call before the header cell is exported. * Function takes arguments sender and args. - * Use args.headerText to get or set the igGrid column key of the header cell. - * Use args.columnKey to get the igGrid column key of the header cell. - * Use args.columnIndex to get the igGrid column index of the header cell. + * Use args.headerText to get or set the igGrid column header text. + * Use args.columnKey to get the igGrid column key. + * Use args.columnIndex to get the igGrid column index. + * Return false in order to cancel exporting the cell. + * */ headerCellExporting?: Function; /** - * Cancel="true" Set a callback that is fired after the row is exported. + * Cancel="true" A function to call after the row is exported. * Function takes arguments sender and args. * Use args.rowId to get key or index of row. * Use args.element to get row TR element. * Use args.xlRow to get reference to the worksheet row. * Use args.grid to get reference to the igGrid widget. - * Note: When exporting an igHierarchicalGrid this callback is available only for the root grid rows. + * Note: When exporting igHierarchicalGrid this callback is available only for the root grid rows. + * */ rowExported?: Function; /** - * Cancel="true" Set a callback that is fired before the row exporting. + * A function to call before the row is exported. * Function takes arguments sender and args. * Use args.rowId to get key or index of row. * Use args.element to get row TR element. * Use args.xlRow to get reference to the worksheet row. * Use args.grid to get reference to the igGrid widget. - * Note: When exporting an igHierarchicalGrid this callback is available only for the root grid rows. + * Return false in order to cancel exporting the row. + * Note: When exporting igHierarchicalGrid this callback is available only for the root grid rows. + * */ rowExporting?: Function; /** - * Set a callback that is fired when exporting is successful. + * A function to call when saving the file succeeds. * Use data to get the reference of saved object. + * */ success?: Function; /** - * Set a callback that is fired after the summary is exported. + * A function to call after the summary is exported. * Function takes arguments sender and args. * Use args.headerText to get the igGrid column header text. * Use args.columnKey to get the igGrid column key. * Use args.columnIndex to get the igGrid column index. * Use args.summary to get a reference to the summary object. - * Use args.xlRowIndex to get the worksheet row index. + * Use args.xlRowIndex to get the Excel worksheet row index. + * */ summaryExported?: Function; /** - * Cancel="true" Set a callback that is fired before the summary exporting. + * A function to call before the summary is exported. * Function takes arguments sender and args. * Use args.headerText to get the igGrid column header text. * Use args.columnKey to get the igGrid column key. * Use args.columnIndex to get the igGrid column index. * Use args.summary to get a reference to the summary object. * Use args.xlRowIndex to get reference to worksheet row index. + * Return false in order to cancel exporting the summary. + * */ summaryExporting?: Function; @@ -6346,6 +6726,7 @@ interface GridExcelExporterSettingsGridFeatureOptions { /** * Indicates whether fixed columns will be applied in the exported table. This is set to none by default, but will change to applied if column fixing feature is defined in the igGrid. * + * * Valid values: * "none" No column fixing will be applied in the excel document. * "applied" Column fixing will be applied in the excel document. @@ -6355,6 +6736,7 @@ interface GridExcelExporterSettingsGridFeatureOptions { /** * Indicates whether filtering will be applied in the exported table. this is set to none by default, but will change to applied if filtering feature is defined in the igGrid. * + * * Valid values: * "none" No filtering will be applied in the excel document. * "applied" Filtering will be applied in the excel document. @@ -6365,6 +6747,7 @@ interface GridExcelExporterSettingsGridFeatureOptions { /** * Indicates whether hidden columns will be removed from the exported table. This is set to none by default, but will change to applied if hiding feature is defined in the igGrid. * + * * Valid values: * "none" All hidden columns will be exported to the excel document. * "applied" Hidden columns will be exported as hidden in the excel document. @@ -6375,6 +6758,7 @@ interface GridExcelExporterSettingsGridFeatureOptions { /** * Indicates whether the rows on the current page or entire data will exported. * + * * Valid values: * "currentPage" Only current page will be exported to the excel document. * "allRows" All pages will be exported to the excel document. @@ -6384,6 +6768,7 @@ interface GridExcelExporterSettingsGridFeatureOptions { /** * Indicates whether sorting will be applied in the exported table. This is set_ to none by default, but will change to applied if sorting feature is defined in the igGrid. * + * * Valid values: * "none" No sorting will be applied in the excel document. * "applied" Sorting will be applied in the excel document. @@ -6393,6 +6778,7 @@ interface GridExcelExporterSettingsGridFeatureOptions { /** * Indicates whether summaries will be added in the exported table. This is set to none by default, but will change to applied if summaries feature is defined in the igGrid. * + * * Valid values: * "none" No summaries will be exported to the excel document. * "applied" Summaries will be exported to the excel document. @@ -6407,13 +6793,15 @@ interface GridExcelExporterSettingsGridFeatureOptions { interface GridExcelExporterSettings { /** - * List of strings containing the keys for the columns that will not be exported. + * An array of strings containing the keys for the columns that will not be exported. + * */ columnsToSkip?: any[]; /** * Indicates whether all sublevel data will be exported, or only data under expanded rows. * + * * Valid values: * "allRows" All sublevel data will be exported. * "expandedRows" Only data under expanded rows will be exported. @@ -6422,6 +6810,7 @@ interface GridExcelExporterSettings { /** * Specifies the name of the excel file that will be generated. + * */ fileName?: string; @@ -6433,6 +6822,7 @@ interface GridExcelExporterSettings { /** * Indicates whether excel table styles will be the same as grid styles. This is set to applied by default. Custom grid themes are not supported. * + * * Valid values: * "none" The styles from the grid are not applied to the table region. * "applied" The styles from the grid are applied to the table region. @@ -6441,20 +6831,22 @@ interface GridExcelExporterSettings { /** * List of strings containing the keys for the worksheet columns which will not be applied any filtering + * */ skipFilteringOn?: any[]; /** - * Specifies the excel table style region. - * You can set the following table style + * Specifies the excel table style region. The following table styles are available: * TableStyleMedium[1-28] * TableStyleLight[1-21] * TableStyleDark[1-11] + * */ tableStyle?: string; /** - * Specifies the name of workbook where the igGrid will be exported. + * Specifies the worksheet name where the igGrid will be exported. + * */ worksheetName?: string; @@ -6473,7 +6865,7 @@ class GridExcelExporter { /** * Exports the provided igGrid to Excel document. * - * @param grid Grid to be exported. + * @param grid jQuery element of the igGrid. * @param userSettings Settings for exporting the grid. * @param userCallbacks Callbacks for the events. */ @@ -6608,6 +7000,11 @@ interface OlapXmlaDataSourceOptions { */ mdxSettings?: OlapXmlaDataSourceOptionsMdxSettings; + /** + * Specifies if the data is to be served by a XMLA remote provider. + */ + isRemote?: boolean; + /** * Option for OlapXmlaDataSourceOptions */ @@ -7528,16 +7925,27 @@ class OlapResultView { /** * Creates a new $.ig.OlapResultView object with result object having the same structure as the original one and new visibleResult where the tuples which appear as children under specified tuple and member index are no longer present. + * + * @param axisName + * @param tupleIndex + * @param memberIndex */ collapseTupleMember(axisName: Object, tupleIndex: Object, memberIndex: Object): Object; /** * Creates a $.ig.OlapResultView view object with result object having the same structure as the original one and new visibleResult where the tuples which appear as children under specified tuple and member index are accessible as part of the visibleResult. + * + * @param axisName + * @param tupleIndex + * @param memberIndex */ expandTupleMember(axisName: Object, tupleIndex: Object, memberIndex: Object): Object; /** * Creates a new $.ig.OlapResultView object as the axis specified by axisName of the original result object is extended with the tuples of the same axis found into supplied partialResult object. + * + * @param partialResult + * @param axisName */ extend(partialResult: Object, axisName: Object): Object; } @@ -7767,21 +8175,29 @@ declare namespace Infragistics { class Catalog { /** * Returns the name of the catalog. + * + * @param value */ name(value: Object): string; /** * Returns the unique name of the catalog. + * + * @param value */ uniqueName(value: Object): string; /** * Returns the caption of the catalog used when displaying the name of the catalog to the user. + * + * @param value */ caption(value: Object): string; /** * Returns the description of the catalog which is a human-readable description of the catalog + * + * @param value */ description(value: Object): string; } @@ -7791,21 +8207,29 @@ declare namespace Infragistics { class Cube { /** * Returns the name of the cube. + * + * @param value */ name(value: Object): string; /** * Returns the unique name of the cube. + * + * @param value */ uniqueName(value: Object): string; /** * Returns the caption of the cube used when displaying the name of the cube to the user. + * + * @param value */ caption(value: Object): string; /** * Returns a user-friendly description of the cube. + * + * @param value */ description(value: Object): string; @@ -7815,16 +8239,22 @@ class Cube { * $.ig.CubeType.prototype.cube = 0; * $.ig.CubeType.prototype.dimension = 1; * $.ig.CubeType.prototype.unknown = 2; + * + * @param value */ cubeType(value: Object): number; /** * Returns the date and time on which the cube was last processed. + * + * @param value */ lastProcessed(value: Object): Object; /** * Returns the date and time on which the cube was last updated. + * + * @param value */ lastUpdated(value: Object): Object; } @@ -7834,21 +8264,29 @@ declare namespace Infragistics { class Dimension { /** * Returns the name of the dimension. + * + * @param value */ name(value: Object): string; /** * Returns the unique name of the dimension. + * + * @param value */ uniqueName(value: Object): string; /** * Returns the caption of the dimension used when displaying the name of the dimension to the user. + * + * @param value */ caption(value: Object): string; /** * Returns a user-friendly description of the dimension. + * + * @param value */ description(value: Object): string; @@ -7872,6 +8310,8 @@ class Dimension { * $.ig.DimensionType.prototype.organization = 15; * $.ig.DimensionType.prototype.billOfMaterials = 16; * $.ig.DimensionType.prototype.geography = 17; + * + * @param value */ dimensionType(value: Object): number; } @@ -7881,36 +8321,50 @@ declare namespace Infragistics { class Hierarchy { /** * Returns the name of the hierarchy. + * + * @param value */ name(value: Object): string; /** * Returns the unique name of the hierarchy. + * + * @param value */ uniqueName(value: Object): string; /** * Returns the caption of the hierarchy used when displaying the name of the hierarchy to the user. + * + * @param value */ caption(value: Object): string; /** * Returns a user-friendly description of the hierarchy. + * + * @param value */ description(value: Object): string; /** * Returns the unique name of the default member for the hierarchy. + * + * @param value */ defaultMember(value: Object): string; /** * Returns the unique name of the 'All' member for the hierarchy. + * + * @param value */ allMember(value: Object): string; /** * Returns the unique name of the dimension that contains the hierarchy. + * + * @param value */ dimensionUniqueName(value: Object): string; @@ -7925,12 +8379,16 @@ class Hierarchy { * * $.ig.HierarchyOrigin.prototype.systemInternal = 4; * Identifies attributes with no attribute . + * + * @param value */ hierarchyOrigin(value: Object): number; /** * Returns the hierarchy display folder path to be used when displaying the hierarchy in the user interface. * Folder names will be separated by a semicolon (;). Nested folders are indicated by a backslash (\). + * + * @param value */ hierarchyDisplayFolder(value: Object): string; } @@ -7940,26 +8398,36 @@ declare namespace Infragistics { class Measure { /** * Returns the name of the measure. + * + * @param value */ name(value: Object): string; /** * Returns the unique name of the measure. + * + * @param value */ uniqueName(value: Object): string; /** * Returns the caption of the measure used when displaying the name of the measure to the user. + * + * @param value */ caption(value: Object): string; /** * Returns a user-friendly description of the measure. + * + * @param value */ description(value: Object): string; /** * Returns the name of the measure group this measure belongs to. + * + * @param value */ measureGroupName(value: Object): string; @@ -8010,17 +8478,23 @@ class Measure { * * $.ig.AggregatorType.prototype.calculated = 127; * The aggregated function will returns the result derived from a formula. + * + * @param value */ aggregatorType(value: Object): number; /** * Returns the default format string for the measure. + * + * @param value */ defaultFormatString(value: Object): string; /** * Returns the measure display folder path to be used when displaying the measure in the user interface. * Folder names will be separated by a semicolon (;). Nested folders are indicated by a backslash (\). + * + * @param value */ measureDisplayFolder(value: Object): string; } @@ -8030,51 +8504,71 @@ declare namespace Infragistics { class Level { /** * Returns the name of the level. + * + * @param value */ name(value: Object): string; /** * Returns the unique name of the level. + * + * @param value */ uniqueName(value: Object): string; /** * Returns the caption of the level used when displaying the name of the level to the user. + * + * @param value */ caption(value: Object): string; /** * Returns a user-friendly description of the level. + * + * @param value */ description(value: Object): string; /** * Returns the distance of the level from the root of the level. Root level is zero (0) + * + * @param value */ depth(value: Object): number; /** * Returns the unique name of the hierarchy that contains the level. + * + * @param value */ hierarchyUniqueName(value: Object): string; /** * Returns the unique name of the dimension that contains the level. + * + * @param value */ dimensionUniqueName(value: Object): string; /** * Returns the count of all members in the level. + * + * @param value */ membersCount(value: Object): number; /** * Returns a value that defines how the level was sourced. + * + * @param value */ levelOrigin(value: Object): number; /** * Returns the ID of the attribute that the level is sorted on. + * + * @param value */ levelOrderingProperty(value: Object): number; } @@ -8084,26 +8578,36 @@ declare namespace Infragistics { class MeasureGroup { /** * Returns the name of the measure group. + * + * @param value */ name(value: Object): string; /** * Returns the caption of the measure group used when displaying the name of the measure group to the user. + * + * @param value */ caption(value: Object): string; /** * Returns a user-friendly description of the measure group. + * + * @param value */ description(value: Object): string; /** * Returns the name of the catalog to which this measure group belongs. + * + * @param value */ catalogName(value: Object): string; /** * Returns the name of the cube to which this measure group belongs + * + * @param value */ cubeName(value: Object): string; } @@ -8113,11 +8617,15 @@ declare namespace Infragistics { class MeasureList { /** * Returns the caption of the measure list used when displaying the name of the measure list to the user. + * + * @param value */ caption(value: Object): string; /** * Returns an array of $.ig.Measure objects this measure list is grouping. + * + * @param value */ measures(value: Object): any[]; } @@ -8127,16 +8635,22 @@ declare namespace Infragistics { class OlapResult { /** * Returns a value indicating whether the result object contains any data. + * + * @param value */ isEmpty(value: Object): boolean; /** * Returns an array of $.ig.OlapResultAxis objects this result is built on. + * + * @param value */ axes(value: Object): any[]; /** * Returns an array of $.ig.OlapResultCell objects which hold the result data. + * + * @param value */ cells(value: Object): any[]; } @@ -8208,51 +8722,71 @@ declare namespace Infragistics { class OlapResultAxisMember { /** * Returns the unique name of the axis member. + * + * @param value */ uniqueName(value: Object): string; /** * Returns the caption of the axis member used when displaying the name of the axis member to the user. + * + * @param value */ caption(value: Object): string; /** * Returns the unique name of the level this member belongs to. + * + * @param value */ levelUniqueName(value: Object): string; /** * Returns the unique name of the hierarchy that contains the level. + * + * @param value */ hierarchyUniqueName(value: Object): string; /** * Returns the distance of member parent level from the root of the level. Root level is zero (0) + * + * @param value */ levelNumber(value: Object): number; /** * A bitmap of the information projected by childCount, drilledDown and parentSameAsPrev properties. + * + * @param value */ displayInfo(value: Object): number; /** * Returns the count of children members this member has. + * + * @param value */ childCount(value: Object): number; /** * Returns a value that indicates whether at least one child of this member appears on the axis, immediately following all occurrences of that member. This can be used by applications to display a "+" or a "-" next to the member. + * + * @param value */ drilledDown(value: Object): boolean; /** * Returns a value that indicates whether the parent of this member is the same as the parent of the member preceding all occurrences of the current member. + * + * @param value */ parentSameAsPrev(value: Object): boolean; /** * Returns a key value map of the members' properties. By default only 'PARENT_UNIQUE_NAME' and 'CHILDREN_CARDINALITY' properties are available. + * + * @param value */ properties(value: Object): Object; } @@ -8262,11 +8796,15 @@ declare namespace Infragistics { class OlapResultCell { /** * Returns the position of the cell when cells are iterated row by row. + * + * @param value */ cellOrdinal(value: Object): number; /** * Returns a key value map of the cell's properties. Currently only 'Value' and 'FmtValue' properties are available. + * + * @param value */ properties(value: Object): Object; } @@ -9296,6 +9834,24 @@ interface IgBulletGraph { */ pixelScalingRatio?: number; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event which is raised when a label of the bullet graph is formatted. * Function takes first argument evt and second argument ui. @@ -9373,6 +9929,24 @@ interface IgBulletGraphMethods { * Re-polls the css styles for the widget. Use this method when the css styles have been modified. */ styleUpdated(): void; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igBulletGraph"): IgBulletGraphMethods; @@ -9387,6 +9961,9 @@ interface JQuery { igBulletGraph(methodName: "flush"): void; igBulletGraph(methodName: "destroy"): void; igBulletGraph(methodName: "styleUpdated"): void; + igBulletGraph(methodName: "changeLocale", $container: Object): void; + igBulletGraph(methodName: "changeGlobalLanguage"): void; + igBulletGraph(methodName: "changeGlobalRegional"): void; /** * The width of the gauge. It can be set as a number in pixels, string (px) or percentage (%). @@ -10162,6 +10739,50 @@ interface JQuery { */ igBulletGraph(optionLiteral: 'option', optionName: "pixelScalingRatio", optionValue: number): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igBulletGraph(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igBulletGraph(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igBulletGraph(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igBulletGraph(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event which is raised when a label of the bullet graph is formatted. * Function takes first argument evt and second argument ui. @@ -10241,26 +10862,46 @@ interface SeriesRemovedEvent { interface SeriesRemovedEventUIParam {} +interface SeriesPointerEnterEvent { + (event: Event, ui: SeriesPointerEnterEventUIParam): void; +} + +interface SeriesPointerEnterEventUIParam {} + +interface SeriesPointerLeaveEvent { + (event: Event, ui: SeriesPointerLeaveEventUIParam): void; +} + +interface SeriesPointerLeaveEventUIParam {} + +interface SeriesPointerMoveEvent { + (event: Event, ui: SeriesPointerMoveEventUIParam): void; +} + +interface SeriesPointerMoveEventUIParam {} + +interface SeriesPointerDownEvent { + (event: Event, ui: SeriesPointerDownEventUIParam): void; +} + +interface SeriesPointerDownEventUIParam {} + +interface SeriesPointerUpEvent { + (event: Event, ui: SeriesPointerUpEventUIParam): void; +} + +interface SeriesPointerUpEventUIParam {} + interface IgCategoryChart { /** - * Gets or sets the data value corresponding to the minimum value of the Y-axis. + * Gets or sets the id of a template element to use for tooltips, or markup representing the tooltip template. */ - yAxisMinimumValue?: number; + tooltipTemplate?: any; /** - * Gets or sets the data value corresponding to the maximum value of the Y-axis. + * Gets or sets the names of tooltip templates */ - yAxisMaximumValue?: number; - - /** - * Gets or sets the distance between the X-axis and the bottom of the chart. - */ - xAxisExtent?: number; - - /** - * Gets or sets the distance between the Y-axis and the left edge of the chart. - */ - yAxisExtent?: number; + tooltipTemplates?: any; /** * Gets or sets the left margin of chart title @@ -10282,78 +10923,6 @@ interface IgCategoryChart { */ titleBottomMargin?: number; - /** - * Gets or sets the duration used for animating series plots when the chart is loading into view - */ - transitionInDuration?: number; - - /** - * Gets or sets the duration used for animating series plots when the data is changing - */ - transitionDuration?: number; - - /** - * Gets or sets the easing function used for animating series plots when the chart is loading into view - * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. - */ - transitionInEasingFunction?: any; - - /** - * Gets or sets the easing function used for animating series plots when the data is changing. - * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. - */ - transitionEasingFunction?: any; - - /** - * Gets or sets the left margin of labels on the X-axis - */ - xAxisLabelLeftMargin?: number; - - /** - * Gets or sets the top margin of labels on the X-axis - */ - xAxisLabelTopMargin?: number; - - /** - * Gets or sets the right margin of labels on the X-axis - */ - xAxisLabelRightMargin?: number; - - /** - * Gets or sets the bottom margin of labels on the X-axis - */ - xAxisLabelBottomMargin?: number; - - /** - * Gets or sets the left margin of labels on the Y-axis - */ - yAxisLabelLeftMargin?: number; - - /** - * Gets or sets the top margin of labels on the Y-axis - */ - yAxisLabelTopMargin?: number; - - /** - * Gets or sets the right margin of labels on the Y-axis - */ - yAxisLabelRightMargin?: number; - - /** - * Gets or sets the bottom margin of labels on the Y-axis - */ - yAxisLabelBottomMargin?: number; - - /** - * Gets or sets color of labels on the X-axis - */ - xAxisLabelTextColor?: string; - - /** - * Gets or sets color of labels on the Y-axis - */ - yAxisLabelTextColor?: string; - /** * Gets or sets the left margin of chart subtitle */ @@ -10404,6 +10973,273 @@ interface IgCategoryChart { */ bottomMargin?: number; + /** + * Gets or sets the duration used for animating series plots when the data is changing + */ + transitionDuration?: number; + + /** + * Gets or sets the easing function used for animating series plots when the data is changing. + * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. + */ + transitionEasingFunction?: any; + + /** + * Gets or sets a function for creating wrapped tooltip + */ + createWrappedTooltip?: any; + + /** + * Gets or sets the widget of this control + */ + widget?: any; + + /** + * Gets or sets CSS font property for the chart subtitle + */ + subtitleTextStyle?: string; + + /** + * Gets or sets CSS font property for the chart title + */ + titleTextStyle?: string; + + /** + * Gets or sets a collection of data items used to generate the chart. + * The ItemsSource of this chart can be a list of objects containing one or more numeric properties. + * Additionally, if the objects in the list implement the IEnumerable interface, + * the Chart will attempt to delve into the sub-collections when reading through the data source. + * Databinding can be further configured by attributing the data item classes + * with the DataSeriesMemberIntentAttribute. + */ + itemsSource?: any; + + /** + * Gets or sets a set of property paths that should be included for consideration by the category chart, leaving the remainder excluded. If null, all properties will be considered. + */ + includedProperties?: any; + + /** + * Gets or sets a set of property paths that should be excluded from consideration by the category chart. + */ + excludedProperties?: any; + + /** + * Gets or sets the palette of brushes to use for coloring the chart series. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + brushes?: any; + + /** + * Gets or sets the palette of brushes to use for outlines on the chart series. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + outlines?: any; + + /** + * Gets or sets the legend to connect this chart to. + * When the legend property is set, the chart will use it to display information about its series. Legends can be shared by multiple chart controls. + */ + legend?: any; + + /** + * Gets or sets whether the chart can be horizontally zoomed through user interactions. + */ + isHorizontalZoomEnabled?: boolean; + + /** + * Gets or sets whether the chart can be vertically zoomed through user interactions. + */ + isVerticalZoomEnabled?: boolean; + + /** + * Gets or sets the rectangle representing the current scroll and zoom state of the chart. + * WindowRect is expressed as a Rectangle with coordinates and sizes between 0 and 1. + * The provided object should have numeric properties called left, top, width and height. + */ + windowRect?: any; + + /** + * Gets or sets text to display above the plot area. + */ + title?: string; + + /** + * Gets or sets text to display below the Title, above the plot area. + */ + subtitle?: string; + + /** + * Gets or sets horizontal alignment which determines the title position, relative to the left and right edges of the control. + * + * Valid values: + * "left" Align the item to the left + * "center" Center the item + * "right" Align the item to the right + * "stretch" Stretch the item to the full width + */ + titleAlignment?: string; + + /** + * Gets or sets horizontal alignment which determines the subtitle position, relative to the left and right edges of the control. + * + * Valid values: + * "left" Align the item to the left + * "center" Center the item + * "right" Align the item to the right + * "stretch" Stretch the item to the full width + */ + subtitleAlignment?: string; + + /** + * Gets or sets the behavior that determines how unknown values will be plotted on the chart.Null and Double.NaN are two examples of unknown values. + * + * + * Valid values: + * "linearInterpolate" Plot the unknown value as the midpoint between surrounding known values using linear interpolation. + * "dontPlot" Do not plot the unknown value on the chart. + */ + unknownValuePlotting?: string; + + /** + * Gets or sets the rendering resolution for all series in this chart. + * Where n = Resolution, for every n horizontal pixels, combine all items into a single datapoint. When Resolution = 0, all datapoints will be rendered as graphical objects. Charts with a higher resolution will have faster performance. + */ + resolution?: number; + + /** + * Gets or sets the thickness for all series in this chart. Depending on the ChartType, this can be the main brush used, or just the outline. + */ + thickness?: number; + + /** + * Gets or sets the marker shapes used for indicating location of data points in this chart. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + */ + markerTypes?: any; + + /** + * Gets or sets the palette of brushes used for rendering fill area of data point markers. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + markerBrushes?: any; + + /** + * Gets or sets the palette of brushes used for rendering outlines of data point markers. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + markerOutlines?: any; + + /** + * Gets or sets the maximum number of markers displyed in the plot area of the chart. + */ + markerMaxCount?: number; + + /** + * Gets or sets the palette of brushes to used for coloring trend lines in this chart. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + trendLineBrushes?: any; + + /** + * Gets or sets the formula used for calculating trend lines in this chart.This property applies only to these chart types: point, line, spline, and bubble + * + * + * Valid values: + * "none" No trend line will be displayed. + * "linearFit" Linear fit. + * "quadraticFit" Quadratic polynomial fit. + * "cubicFit" Cubic polynomial fit. + * "quarticFit" Quartic polynomial fit. + * "quinticFit" Quintic polynomial fit. + * "logarithmicFit" Logarithmic fit. + * "exponentialFit" Exponential fit. + * "powerLawFit" Powerlaw fit. + * "simpleAverage" Simple moving average. + * "exponentialAverage" Exponential moving average. + * "modifiedAverage" Modified moving average. + * "cumulativeAverage" Cumulative moving average. + * "weightedAverage" Weighted moving average. + */ + trendLineType?: string; + + /** + * Gets or sets the thickness of the trend lines in this chart. + * This property applies only to these chart types: point, line, spline, and bubble + */ + trendLineThickness?: number; + + /** + * Gets or sets a value indicating whether grid and tick lines are aligned to device pixels. + */ + alignsGridLinesToPixels?: boolean; + trendLinePeriod?: number; + + /** + * Gets or sets function which takes an context object and returns a formatted label for the X-axis. + */ + xAxisFormatLabel?: any; + + /** + * Gets or sets function which takes a context object and returns a formatted label for the Y-axis. + */ + yAxisFormatLabel?: any; + + /** + * Gets or sets the left margin of labels on the X-axis + */ + xAxisLabelLeftMargin?: number; + + /** + * Gets or sets the top margin of labels on the X-axis + */ + xAxisLabelTopMargin?: number; + + /** + * Gets or sets the right margin of labels on the X-axis + */ + xAxisLabelRightMargin?: number; + + /** + * Gets or sets the bottom margin of labels on the X-axis + */ + xAxisLabelBottomMargin?: number; + + /** + * Gets or sets the left margin of labels on the Y-axis + */ + yAxisLabelLeftMargin?: number; + + /** + * Gets or sets the top margin of labels on the Y-axis + */ + yAxisLabelTopMargin?: number; + + /** + * Gets or sets the right margin of labels on the Y-axis + */ + yAxisLabelRightMargin?: number; + + /** + * Gets or sets the bottom margin of labels on the Y-axis + */ + yAxisLabelBottomMargin?: number; + + /** + * Gets or sets color of labels on the X-axis + */ + xAxisLabelTextColor?: string; + + /** + * Gets or sets color of labels on the Y-axis + */ + yAxisLabelTextColor?: string; + /** * Gets or sets the margin around a title on the X-axis */ @@ -10463,34 +11299,6 @@ interface IgCategoryChart { * Gets or sets color of title on the Y-axis */ yAxisTitleTextColor?: string; - createWrappedTooltip?: any; - - /** - * Gets or sets the id of a template element to use for tooltips, or markup representing the tooltip template. - */ - tooltipTemplate?: string; - tooltipTemplates?: any; - - /** - * Gets or sets function which takes an context object and returns a formatted label for the X-axis. - */ - xAxisFormatLabel?: any; - - /** - * Gets or sets function which takes a context object and returns a formatted label for the Y-axis. - */ - yAxisFormatLabel?: any; - - /** - * Gets or sets CSS font property for title on X-axis - */ - xAxisTitleTextStyle?: string; - - /** - * Gets or sets CSS font property for title on Y-axis - */ - yAxisTitleTextStyle?: string; - widget?: any; /** * Gets or sets CSS font property for labels on X-axis @@ -10503,222 +11311,14 @@ interface IgCategoryChart { yAxisLabelTextStyle?: string; /** - * Gets or sets CSS font property for the chart subtitle + * Gets or sets CSS font property for title on X-axis */ - subtitleTextStyle?: string; + xAxisTitleTextStyle?: string; /** - * Gets or sets CSS font property for the chart title + * Gets or sets CSS font property for title on Y-axis */ - titleTextStyle?: string; - - /** - * Gets or sets a collection of data items used to generate the chart. - * Value of this property can be a list of objects containing one or more numeric properties. Additionally, if the objects in the list implement the IEnumerable interface, the Category Chart will attempt to delve into the sub-collections when reading through the data source. Databinding can be further configured by attributing the data item classes with the DataSeriesMemberIntentAttribute. - */ - itemsSource?: any; - - /** - * Gets or sets a set of property paths that should be included for consideration by the category chart, leaving the remaineder excluded. If null, all properties will be considered. - */ - includedProperties?: any; - - /** - * Gets or sets a set of property paths that should be excluded from consideration by the category chart. - */ - excludedProperties?: any; - - /** - * Gets or sets the type of chart series to generate from the data. - * - * Valid values: - * "line" Specifies category line series with markers at each data point - * "area" Specifies category area series - * "column" Specifies category column chart with vertical rectangles at each data point - * "point" Specifies category point chart with markers at each data point - * "stepLine" Specifies category step line chart - * "stepArea" Specifies category step area chart - * "spline" Specifies category spline line series with markers at each data point - * "splineArea" Specifies category spline area series - * "waterfall" Specifies category waterfall chart - * "auto" Specifies automatic selection of chart type based on suggestions from Data Adapter - */ - chartType?: string; - - /** - * Gets or sets the palette of brushes to use for coloring the chart series. The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection - * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. - */ - brushes?: any; - - /** - * Gets or sets the palette of brushes to use for outlines on the chart series. The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection - * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. - */ - outlines?: any; - - /** - * Sets the legend to connect this chart to. - * When the legend property is set, the chart will use it to display information about its series. Legends can be shared by multiple chart controls. - */ - legend?: any; - - /** - * Gets or sets whether the chart can be horizontally zoomed through user interaction. - */ - isHorizontalZoomEnabled?: boolean; - - /** - * Gets or sets whether the chart can be vertically zoomed through user interaction. - */ - isVerticalZoomEnabled?: boolean; - - /** - * Gets or sets the rectangle representing the current scroll and zoom state of the chart. - * WindowRect is expressed as a Rectangle with coordinates and sizes between 0 and 1. - * The provided object should have numeric properties called left, top, width and height. - */ - windowRect?: any; - - /** - * Gets or sets text to display above the plot area. - */ - title?: string; - - /** - * Gets or sets text to display below the chart Title, above the plot area. - */ - subtitle?: string; - - /** - * Gets or sets horizontal alignment which determines the title position, relative to the left and right edges of the chart. - * - * Valid values: - * "left" Align the item to the left - * "center" Center the item - * "right" Align the item to the right - * "stretch" Stretch the item to the full width - */ - titleAlignment?: string; - - /** - * Gets or sets horizontal alignment which determines the subtitle position, relative to the left and right edges of the chart. - * - * Valid values: - * "left" Align the item to the left - * "center" Center the item - * "right" Align the item to the right - * "stretch" Stretch the item to the full width - */ - subtitleAlignment?: string; - - /** - * Gets or sets the behavior that determines how unknown values will be plotted on the chart.Null and Double.NaN are two examples of unknown values. - * - * Valid values: - * "linearInterpolate" Plot the unknown value as the midpoint between surrounding known values using linear interpolation. - * "dontPlot" Do not plot the unknown value on the chart. - */ - unknownValuePlotting?: string; - - /** - * Gets or sets the behavior for markers in each series which are placed too close together for the current view, resulting in a collision. - * - * Valid values: - * "none" Collision avoidance is disabled. - * "omit" Items colliding with other items will be hidden from view. - */ - markerCollisionAvoidance?: string; - - /** - * Gets or sets whether animation of series plots is enabled when the chart is loading into view - */ - isTransitionInEnabled?: boolean; - - /** - * Gets or sets the method that determines how to animate series plots when the chart is loading into view - * - * Valid values: - * "auto" Series transitions in an automatically chosen based on type of series and its orientation - * "fromZero" Series transitions in from the reference value of the value axis. - * "sweepFromLeft" Series sweeps in from the left - * "sweepFromRight" Series sweeps in from the right - * "sweepFromTop" Series sweeps in from the top. - * "sweepFromBottom" Series sweeps in from the bottom. - * "sweepFromCenter" Series sweeps in from the center. - * "accordionFromLeft" Series accordions in from the left. - * "accordionFromRight" Series accordions in from the right. - * "accordionFromTop" Series accordions in from the top. - * "accordionFromBottom" Series accordions in from the bottom. - * "expand" Series expands from the value midpoints. - * "sweepFromCategoryAxisMinimum" Series sweeps in from the category axis minimum. - * "sweepFromCategoryAxisMaximum" Series sweeps in from the category axis maximum. - * "sweepFromValueAxisMinimum" Series sweeps in from the value axis minimum. - * "sweepFromValueAxisMaximum" Series sweeps in from the value axis maximum. - * "accordionFromCategoryAxisMinimum" Series accordions in from the category axis minimum. - * "accordionFromCategoryAxisMaximum" Series accordions in from the category axis maximum. - * "accordionFromValueAxisMinimum" Series accordions in from the value axis minimum. - * "accordionFromValueAxisMaximum" Series accordions in from the value axis maximum. - */ - transitionInMode?: string; - - /** - * Gets or sets the arrival speed used for animating series plots when the chart is loading into view - * - * Valid values: - * "auto" A speed type is automatically selected. - * "normal" All speeds are normal, data points will arrive at the same time. - * "valueScaled" Data points will arrive later if their value is further from the start point. - * "indexScaled" Data points will arrive later if their index is further from the axis origin. - * "random" Data points will arrive at random times. - */ - transitionInSpeedType?: string; - - /** - * Gets or sets the frequency of displayed labels along the X-axis. - * Gets or sets the set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label. - */ - xAxisInterval?: number; - - /** - * Gets or sets the frequency of displayed minor lines along the X-axis. - * Gets or sets the set value is a factor that determines how the minor lines will be displayed. - */ - xAxisMinorInterval?: number; - - /** - * Gets or sets the amount of space between adjacent categories for the X-axis. - * The gap is silently clamped to the range [0, 1] when used. - */ - xAxisGap?: number; - - /** - * Gets or sets the amount of overlap between adjacent categories for the X-axis. - * Gets or sets the overlap is silently clamped to the range [-1, 1] when used. - */ - xAxisOverlap?: number; - - /** - * Gets or sets the distance between each label and grid line along the Y-axis. - */ - yAxisInterval?: number; - - /** - * Gets or sets whether the Y-axis should use a logarithmic scale instead of a linear one. - * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the Y-axis minimum is greater than zero. - */ - yAxisIsLogarithmic?: boolean; - - /** - * Gets or sets the base value to use in the log function when mapping the position of data items along the Y-axis. - * This property is effective only when YAxisIsLogarithmic is true. - */ - yAxisLogarithmBase?: number; - - /** - * Gets or sets the frequency of displayed minor lines along the Y-axis. - */ - yAxisMinorInterval?: number; + yAxisTitleTextStyle?: string; /** * Gets or sets the format for labels along the X-axis. @@ -10821,12 +11421,12 @@ interface IgCategoryChart { yAxisTickStrokeThickness?: number; /** - * Text to display below the X-axis. + * Gets or sets the Text to display below the X-axis. */ xAxisTitle?: string; /** - * Text to display to the left of the Y-axis. + * Gets or sets the Text to display to the left of the Y-axis. */ yAxisTitle?: string; @@ -10850,6 +11450,16 @@ interface IgCategoryChart { */ yAxisLabelAngle?: number; + /** + * Gets or sets the distance between the X-axis and the bottom of the chart. + */ + xAxisExtent?: number; + + /** + * Gets or sets the distance between the Y-axis and the left edge of the chart. + */ + yAxisExtent?: number; + /** * Gets or sets the angle of rotation for the X-axis title. */ @@ -10861,84 +11471,17 @@ interface IgCategoryChart { yAxisTitleAngle?: number; /** - * Gets or sets the rendering resolution for series in this chart. - * Where n = Resolution, for every n horizontal pixels, combine all items into a single datapoint. When Resolution = 0, all datapoints will be rendered as graphical objects. Charts with a higher resolution will have faster performance. - */ - resolution?: number; - - /** - * Gets or sets the palette of brushes to used for coloring trend lines in this chart. The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection - * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. - */ - trendLineBrushes?: any; - - /** - * Gets or sets the formula used for calculating trend lines in this chart. - * - * Valid values: - * "none" No trend line will be displayed. - * "linearFit" Linear fit. - * "quadraticFit" Quadratic polynomial fit. - * "cubicFit" Cubic polynomial fit. - * "quarticFit" Quartic polynomial fit. - * "quinticFit" Quintic polynomial fit. - * "logarithmicFit" Logarithmic fit. - * "exponentialFit" Exponential fit. - * "powerLawFit" Powerlaw fit. - * "simpleAverage" Simple moving average. - * "exponentialAverage" Exponential moving average. - * "modifiedAverage" Modified moving average. - * "cumulativeAverage" Cumulative moving average. - * "weightedAverage" Weighted moving average. - */ - trendLineType?: string; - - /** - * Gets or sets the thickness of the chart series. Depending on the ChartType, this can be the main brush used, or just the outline. - */ - thickness?: number; - - /** - * Gets or sets the collection of marker shapes used for representing data points of series in this chart. - * When MarkerTypes is null or empty, each series' marker type will be set to none or automatic, depending on the series type. - */ - markerTypes?: any; - - /** - * Gets or sets the palette of brushes used as the fill color for data point markers. - * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. - */ - markerBrushes?: any; - - /** - * Gets or sets the palette of brushes used for coloring outline of data point markers. - * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. - */ - markerOutlines?: any; - - /** - * Gets or sets the thickness of the trend lines in this chart. - */ - trendLineThickness?: number; - - /** - * Gets or sets whether the direction of the X-axis is inverted, placing the first data items on the right side instead of left side + * Gets or sets whether to invert the direction of the X-axis by placing the first data items on the right side of the chart. */ xAxisInverted?: boolean; /** - * Gets or sets whether the direction of the Y-axis is inverted, placing minimum numeric value at the top of the axis instead of bottom + * Gets or sets whether to invert the direction of the Y-axis by placing the minimum numeric value at the top of the chart. */ yAxisInverted?: boolean; /** - * Gets or sets the palette used for coloring negative items of Waterfall chart type. - * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. - */ - negativeBrushes?: any; - - /** - * Gets or sets the horizontal alignment of the X-axis title. + * Gets or sets Horizontal alignment of the X-axis title. * * Valid values: * "left" Align the item to the left @@ -10949,7 +11492,7 @@ interface IgCategoryChart { xAxisTitleAlignment?: string; /** - * Gets or sets the vertical alignment of the Y-axis title. + * Gets or sets Vertical alignment of the Y-axis title. * * Valid values: * "top" Align the item to the top @@ -10960,7 +11503,7 @@ interface IgCategoryChart { yAxisTitleAlignment?: string; /** - * Gets or sets the horizontal alignment of X-axis labels. + * Gets or sets Horizontal alignment of X-axis labels. * * Valid values: * "left" Align the item to the left @@ -10971,7 +11514,7 @@ interface IgCategoryChart { xAxisLabelHorizontalAlignment?: string; /** - * Gets or sets the horizontal alignment of Y-axis labels. + * Gets or sets Horizontal alignment of Y-axis labels. * * Valid values: * "left" Align the item to the left @@ -10982,7 +11525,7 @@ interface IgCategoryChart { yAxisLabelHorizontalAlignment?: string; /** - * Gets or sets the vertical alignment of X-axis labels. + * Gets or sets Vertical alignment of X-axis labels. * * Valid values: * "top" Align the item to the top @@ -10993,7 +11536,7 @@ interface IgCategoryChart { xAxisLabelVerticalAlignment?: string; /** - * Gets or sets the vertical alignment of Y-axis labels. + * Gets or sets Vertical alignment of Y-axis labels. * * Valid values: * "top" Align the item to the top @@ -11004,7 +11547,7 @@ interface IgCategoryChart { yAxisLabelVerticalAlignment?: string; /** - * Gets or sets the visibility of X-axis labels. + * Gets or sets Visibility of X-axis labels. * * Valid values: * "visible" Display the element. @@ -11013,7 +11556,7 @@ interface IgCategoryChart { xAxisLabelVisibility?: string; /** - * Gets or sets the visibility of Y-axis labels. + * Gets or sets Visibility of Y-axis labels. * * Valid values: * "visible" Display the element. @@ -11021,6 +11564,164 @@ interface IgCategoryChart { */ yAxisLabelVisibility?: string; + /** + * The location of Y-axis labels, relative to the plot area. + * + * Valid values: + * "outsideTop" Places the axis labels at the top, outside of the plotting area. + * "outsideBottom" Places the axis labels at the bottom, outside of the plotting area + * "outsideLeft" Places the axis labels to the left, outside of the plotting area. + * "outsideRight" Places the axis labels to the right, outside of the plotting area. + * "insideTop" Places the axis labels inside the plotting area above the axis line. + * "insideBottom" Places the axis labels inside the plotting area below the axis line. + * "insideLeft" Places the axis labels inside the plotting area and to the left of the axis line. + * "insideRight" Places the axis labels inside the plotting area and to the right of the axis line. + */ + yAxisLabelLocation?: string; + + /** + * Gets or sets the duration used for animating series plots when the chart is loading into view + */ + transitionInDuration?: number; + + /** + * Gets or sets the easing function used for animating series plots when the chart is loading into view + * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. + */ + transitionInEasingFunction?: any; + + /** + * Gets or sets the type of chart series to generate from the data. + * + * Valid values: + * "line" Specifies category line series with markers at each data point + * "area" Specifies category area series + * "column" Specifies category column chart with vertical rectangles at each data point + * "point" Specifies category point chart with markers at each data point + * "stepLine" Specifies category step line chart + * "stepArea" Specifies category step area chart + * "spline" Specifies category spline line series with markers at each data point + * "splineArea" Specifies category spline area series + * "waterfall" Specifies category waterfall chart + * "auto" Specifies automatic selection of chart type based on suggestions from Data Adapter + */ + chartType?: string; + + /** + * Gets or sets the behavior for markers in each series which are placed too close together for the current view, resulting in a collision. + * + * Valid values: + * "none" Collision avoidance is disabled. + * "omit" Items colliding with other items will be hidden from view. + */ + markerCollisionAvoidance?: string; + + /** + * Gets or sets whether animation of series plots is enabled when the chart is loading into view + */ + isTransitionInEnabled?: boolean; + + /** + * Gets or sets the method that determines how to animate series plots when the chart is loading into view + * + * Valid values: + * "auto" Series transitions in an automatically chosen based on type of series and its orientation + * "fromZero" Series transitions in from the reference value of the value axis. + * "sweepFromLeft" Series sweeps in from the left + * "sweepFromRight" Series sweeps in from the right + * "sweepFromTop" Series sweeps in from the top. + * "sweepFromBottom" Series sweeps in from the bottom. + * "sweepFromCenter" Series sweeps in from the center. + * "accordionFromLeft" Series accordions in from the left. + * "accordionFromRight" Series accordions in from the right. + * "accordionFromTop" Series accordions in from the top. + * "accordionFromBottom" Series accordions in from the bottom. + * "expand" Series expands from the value midpoints. + * "sweepFromCategoryAxisMinimum" Series sweeps in from the category axis minimum. + * "sweepFromCategoryAxisMaximum" Series sweeps in from the category axis maximum. + * "sweepFromValueAxisMinimum" Series sweeps in from the value axis minimum. + * "sweepFromValueAxisMaximum" Series sweeps in from the value axis maximum. + * "accordionFromCategoryAxisMinimum" Series accordions in from the category axis minimum. + * "accordionFromCategoryAxisMaximum" Series accordions in from the category axis maximum. + * "accordionFromValueAxisMinimum" Series accordions in from the value axis minimum. + * "accordionFromValueAxisMaximum" Series accordions in from the value axis maximum. + */ + transitionInMode?: string; + + /** + * Gets or sets the arrival speed used for animating series plots when the chart is loading into view + * + * Valid values: + * "auto" A speed type is automatically selected. + * "normal" All speeds are normal, data points will arrive at the same time. + * "valueScaled" Data points will arrive later if their value is further from the start point. + * "indexScaled" Data points will arrive later if their index is further from the axis origin. + * "random" Data points will arrive at random times. + */ + transitionInSpeedType?: string; + + /** + * Gets or sets the frequency of displayed labels along the X-axis. + * Gets or sets the set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label. + */ + xAxisInterval?: number; + + /** + * Gets or sets the frequency of displayed minor lines along the X-axis. + * Gets or sets the set value is a factor that determines how the minor lines will be displayed. + */ + xAxisMinorInterval?: number; + + /** + * Gets or sets the amount of space between adjacent categories for the X-axis. + * The gap is silently clamped to the range [0, 1] when used. + */ + xAxisGap?: number; + + /** + * Gets or sets the amount of overlap between adjacent categories for the X-axis. + * Gets or sets the overlap is silently clamped to the range [-1, 1] when used. + */ + xAxisOverlap?: number; + + /** + * Gets or sets the distance between each label and grid line along the Y-axis. + */ + yAxisInterval?: number; + + /** + * Gets or sets whether the Y-axis should use a logarithmic scale instead of a linear one. + * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the Y-axis minimum is greater than zero. + */ + yAxisIsLogarithmic?: boolean; + + /** + * Gets or sets the base value to use in the log function when mapping the position of data items along the Y-axis. + * This property is effective only when YAxisIsLogarithmic is true. + */ + yAxisLogarithmBase?: number; + + /** + * Gets or sets the data value corresponding to the minimum value of the Y-axis. + */ + yAxisMinimumValue?: number; + + /** + * Gets or sets the data value corresponding to the maximum value of the Y-axis. + */ + yAxisMaximumValue?: number; + + /** + * Gets or sets the frequency of displayed minor lines along the Y-axis. + */ + yAxisMinorInterval?: number; + + /** + * Gets or sets the palette used for coloring negative items of Waterfall chart type. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + negativeBrushes?: any; + /** * Brushes to use for drawing negative elements, when using a chart type with contextual coloring, such as Waterfall. * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. @@ -11028,9 +11729,14 @@ interface IgCategoryChart { negativeOutlines?: any; /** - * Gets or sets a value indicating whether grid and tick lines are aligned to device pixels. + * Gets or sets whether the series animations should be allowed when a range change has been detected on an axis. */ - alignsGridLinesToPixels?: boolean; + animateSeriesWhenAxisRangeChanges?: boolean; + + /** + * Gets or sets whether the large numbers on the Y-axis labels are abbreviated. + */ + yAxisAbbreviateLargeNumbers?: boolean; /** * The width of the chart. @@ -11075,20 +11781,45 @@ interface IgCategoryChart { responseDataKey?: string; /** - * Event raised when a property value is changed. + * Event raised when a property value is changed on this chart */ propertyChanged?: PropertyChangedEvent; /** - * Event raised when a series is initialized + * Event raised when a series is initialized and added to this chart. */ seriesAdded?: SeriesAddedEvent; /** - * Event raised when a series is removed from the CategoryChart + * Event raised when a series is removed from this chart. */ seriesRemoved?: SeriesRemovedEvent; + /** + * Occurs when the pointer enters a Series. + */ + seriesPointerEnter?: SeriesPointerEnterEvent; + + /** + * Occurs when the pointer leaves a Series. + */ + seriesPointerLeave?: SeriesPointerLeaveEvent; + + /** + * Occurs when the pointer moves over a Series. + */ + seriesPointerMove?: SeriesPointerMoveEvent; + + /** + * Occurs when the pointer is pressed down over a Series. + */ + seriesPointerDown?: SeriesPointerDownEvent; + + /** + * Occurs when the pointer is released over a Series. + */ + seriesPointerUp?: SeriesPointerUpEvent; + /** * Event which is raised before data binding. * Return false in order to cancel data binding. @@ -11266,52 +11997,28 @@ interface JQuery { igCategoryChart(methodName: "flush"): void; /** - * Gets the data value corresponding to the minimum value of the Y-axis. + * Gets the id of a template element to use for tooltips, or markup representing the tooltip template. */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisMinimumValue"): number; + igCategoryChart(optionLiteral: 'option', optionName: "tooltipTemplate"): any; /** - * Sets the data value corresponding to the minimum value of the Y-axis. + * Sets the id of a template element to use for tooltips, or markup representing the tooltip template. * * @optionValue New value to be set. */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisMinimumValue", optionValue: number): void; + igCategoryChart(optionLiteral: 'option', optionName: "tooltipTemplate", optionValue: any): void; /** - * Gets the data value corresponding to the maximum value of the Y-axis. + * Gets the names of tooltip templates */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisMaximumValue"): number; + igCategoryChart(optionLiteral: 'option', optionName: "tooltipTemplates"): any; /** - * Sets the data value corresponding to the maximum value of the Y-axis. + * Sets the names of tooltip templates * * @optionValue New value to be set. */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisMaximumValue", optionValue: number): void; - - /** - * Gets the distance between the X-axis and the bottom of the chart. - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisExtent"): number; - - /** - * Sets the distance between the X-axis and the bottom of the chart. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisExtent", optionValue: number): void; - - /** - * Gets the distance between the Y-axis and the left edge of the chart. - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisExtent"): number; - - /** - * Sets the distance between the Y-axis and the left edge of the chart. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisExtent", optionValue: number): void; + igCategoryChart(optionLiteral: 'option', optionName: "tooltipTemplates", optionValue: any): void; /** * Gets the left margin of chart title @@ -11361,178 +12068,6 @@ interface JQuery { */ igCategoryChart(optionLiteral: 'option', optionName: "titleBottomMargin", optionValue: number): void; - /** - * Gets the duration used for animating series plots when the chart is loading into view - */ - igCategoryChart(optionLiteral: 'option', optionName: "transitionInDuration"): number; - - /** - * Sets the duration used for animating series plots when the chart is loading into view - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "transitionInDuration", optionValue: number): void; - - /** - * Gets the duration used for animating series plots when the data is changing - */ - igCategoryChart(optionLiteral: 'option', optionName: "transitionDuration"): number; - - /** - * Sets the duration used for animating series plots when the data is changing - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "transitionDuration", optionValue: number): void; - - /** - * Gets the easing function used for animating series plots when the chart is loading into view - * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. - */ - igCategoryChart(optionLiteral: 'option', optionName: "transitionInEasingFunction"): any; - - /** - * Sets the easing function used for animating series plots when the chart is loading into view - * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "transitionInEasingFunction", optionValue: any): void; - - /** - * Gets the easing function used for animating series plots when the data is changing. - * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. - */ - igCategoryChart(optionLiteral: 'option', optionName: "transitionEasingFunction"): any; - - /** - * Sets the easing function used for animating series plots when the data is changing. - * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "transitionEasingFunction", optionValue: any): void; - - /** - * Gets the left margin of labels on the X-axis - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelLeftMargin"): number; - - /** - * Sets the left margin of labels on the X-axis - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelLeftMargin", optionValue: number): void; - - /** - * Gets the top margin of labels on the X-axis - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelTopMargin"): number; - - /** - * Sets the top margin of labels on the X-axis - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelTopMargin", optionValue: number): void; - - /** - * Gets the right margin of labels on the X-axis - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelRightMargin"): number; - - /** - * Sets the right margin of labels on the X-axis - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelRightMargin", optionValue: number): void; - - /** - * Gets the bottom margin of labels on the X-axis - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelBottomMargin"): number; - - /** - * Sets the bottom margin of labels on the X-axis - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelBottomMargin", optionValue: number): void; - - /** - * Gets the left margin of labels on the Y-axis - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelLeftMargin"): number; - - /** - * Sets the left margin of labels on the Y-axis - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelLeftMargin", optionValue: number): void; - - /** - * Gets the top margin of labels on the Y-axis - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelTopMargin"): number; - - /** - * Sets the top margin of labels on the Y-axis - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelTopMargin", optionValue: number): void; - - /** - * Gets the right margin of labels on the Y-axis - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelRightMargin"): number; - - /** - * Sets the right margin of labels on the Y-axis - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelRightMargin", optionValue: number): void; - - /** - * Gets the bottom margin of labels on the Y-axis - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelBottomMargin"): number; - - /** - * Sets the bottom margin of labels on the Y-axis - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelBottomMargin", optionValue: number): void; - - /** - * Gets color of labels on the X-axis - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelTextColor"): string; - - /** - * Sets color of labels on the X-axis - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelTextColor", optionValue: string): void; - - /** - * Gets color of labels on the Y-axis - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelTextColor"): string; - - /** - * Sets color of labels on the Y-axis - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelTextColor", optionValue: string): void; - /** * Gets the left margin of chart subtitle */ @@ -11653,6 +12188,568 @@ interface JQuery { */ igCategoryChart(optionLiteral: 'option', optionName: "bottomMargin", optionValue: number): void; + /** + * Gets the duration used for animating series plots when the data is changing + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionDuration"): number; + + /** + * Sets the duration used for animating series plots when the data is changing + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionDuration", optionValue: number): void; + + /** + * Gets the easing function used for animating series plots when the data is changing. + * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionEasingFunction"): any; + + /** + * Sets the easing function used for animating series plots when the data is changing. + * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionEasingFunction", optionValue: any): void; + + /** + * Gets a function for creating wrapped tooltip + */ + igCategoryChart(optionLiteral: 'option', optionName: "createWrappedTooltip"): any; + + /** + * Sets a function for creating wrapped tooltip + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "createWrappedTooltip", optionValue: any): void; + + /** + * Gets the widget of this control + */ + igCategoryChart(optionLiteral: 'option', optionName: "widget"): any; + + /** + * Sets the widget of this control + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "widget", optionValue: any): void; + + /** + * Gets CSS font property for the chart subtitle + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitleTextStyle"): string; + + /** + * Sets CSS font property for the chart subtitle + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitleTextStyle", optionValue: string): void; + + /** + * Gets CSS font property for the chart title + */ + igCategoryChart(optionLiteral: 'option', optionName: "titleTextStyle"): string; + + /** + * Sets CSS font property for the chart title + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "titleTextStyle", optionValue: string): void; + + /** + * Gets a collection of data items used to generate the chart. + * The ItemsSource of this chart can be a list of objects containing one or more numeric properties. + * Additionally, if the objects in the list implement the IEnumerable interface, + * the Chart will attempt to delve into the sub-collections when reading through the data source. + * Databinding can be further configured by attributing the data item classes + * with the DataSeriesMemberIntentAttribute. + */ + igCategoryChart(optionLiteral: 'option', optionName: "itemsSource"): any; + + /** + * Sets a collection of data items used to generate the chart. + * The ItemsSource of this chart can be a list of objects containing one or more numeric properties. + * Additionally, if the objects in the list implement the IEnumerable interface, + * the Chart will attempt to delve into the sub-collections when reading through the data source. + * Databinding can be further configured by attributing the data item classes + * with the DataSeriesMemberIntentAttribute. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "itemsSource", optionValue: any): void; + + /** + * Gets a set of property paths that should be included for consideration by the category chart, leaving the remainder excluded. If null, all properties will be considered. + */ + igCategoryChart(optionLiteral: 'option', optionName: "includedProperties"): any; + + /** + * Sets a set of property paths that should be included for consideration by the category chart, leaving the remainder excluded. If null, all properties will be considered. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "includedProperties", optionValue: any): void; + + /** + * Gets a set of property paths that should be excluded from consideration by the category chart. + */ + igCategoryChart(optionLiteral: 'option', optionName: "excludedProperties"): any; + + /** + * Sets a set of property paths that should be excluded from consideration by the category chart. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "excludedProperties", optionValue: any): void; + + /** + * Gets the palette of brushes to use for coloring the chart series. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igCategoryChart(optionLiteral: 'option', optionName: "brushes"): any; + + /** + * Sets the palette of brushes to use for coloring the chart series. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "brushes", optionValue: any): void; + + /** + * Gets the palette of brushes to use for outlines on the chart series. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igCategoryChart(optionLiteral: 'option', optionName: "outlines"): any; + + /** + * Sets the palette of brushes to use for outlines on the chart series. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "outlines", optionValue: any): void; + + /** + * Gets the legend to connect this chart to. + * When the legend property is set, the chart will use it to display information about its series. Legends can be shared by multiple chart controls. + */ + igCategoryChart(optionLiteral: 'option', optionName: "legend"): any; + + /** + * Sets the legend to connect this chart to. + * When the legend property is set, the chart will use it to display information about its series. Legends can be shared by multiple chart controls. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "legend", optionValue: any): void; + + /** + * Gets whether the chart can be horizontally zoomed through user interactions. + */ + igCategoryChart(optionLiteral: 'option', optionName: "isHorizontalZoomEnabled"): boolean; + + /** + * Sets whether the chart can be horizontally zoomed through user interactions. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "isHorizontalZoomEnabled", optionValue: boolean): void; + + /** + * Gets whether the chart can be vertically zoomed through user interactions. + */ + igCategoryChart(optionLiteral: 'option', optionName: "isVerticalZoomEnabled"): boolean; + + /** + * Sets whether the chart can be vertically zoomed through user interactions. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "isVerticalZoomEnabled", optionValue: boolean): void; + + /** + * Gets the rectangle representing the current scroll and zoom state of the chart. + * WindowRect is expressed as a Rectangle with coordinates and sizes between 0 and 1. + * The provided object should have numeric properties called left, top, width and height. + */ + igCategoryChart(optionLiteral: 'option', optionName: "windowRect"): any; + + /** + * Sets the rectangle representing the current scroll and zoom state of the chart. + * WindowRect is expressed as a Rectangle with coordinates and sizes between 0 and 1. + * The provided object should have numeric properties called left, top, width and height. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "windowRect", optionValue: any): void; + + /** + * Gets text to display above the plot area. + */ + igCategoryChart(optionLiteral: 'option', optionName: "title"): string; + + /** + * Sets text to display above the plot area. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "title", optionValue: string): void; + + /** + * Gets text to display below the Title, above the plot area. + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitle"): string; + + /** + * Sets text to display below the Title, above the plot area. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "subtitle", optionValue: string): void; + + /** + * Gets horizontal alignment which determines the title position, relative to the left and right edges of the control. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "titleAlignment"): string; + + /** + * Sets horizontal alignment which determines the title position, relative to the left and right edges of the control. + * + * @optionValue New value to be set. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "titleAlignment", optionValue: string): void; + + /** + * Gets horizontal alignment which determines the subtitle position, relative to the left and right edges of the control. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "subtitleAlignment"): string; + + /** + * Sets horizontal alignment which determines the subtitle position, relative to the left and right edges of the control. + * + * @optionValue New value to be set. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "subtitleAlignment", optionValue: string): void; + + /** + * Gets the behavior that determines how unknown values will be plotted on the chart.Null and Double.NaN are two examples of unknown values. + * + */ + + igCategoryChart(optionLiteral: 'option', optionName: "unknownValuePlotting"): string; + + /** + * Sets the behavior that determines how unknown values will be plotted on the chart.Null and Double.NaN are two examples of unknown values. + * + * + * @optionValue New value to be set. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "unknownValuePlotting", optionValue: string): void; + + /** + * Gets the rendering resolution for all series in this chart. + * Where n = Resolution, for every n horizontal pixels, combine all items into a single datapoint. When Resolution = 0, all datapoints will be rendered as graphical objects. Charts with a higher resolution will have faster performance. + */ + igCategoryChart(optionLiteral: 'option', optionName: "resolution"): number; + + /** + * Sets the rendering resolution for all series in this chart. + * Where n = Resolution, for every n horizontal pixels, combine all items into a single datapoint. When Resolution = 0, all datapoints will be rendered as graphical objects. Charts with a higher resolution will have faster performance. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "resolution", optionValue: number): void; + + /** + * Gets the thickness for all series in this chart. Depending on the ChartType, this can be the main brush used, or just the outline. + */ + igCategoryChart(optionLiteral: 'option', optionName: "thickness"): number; + + /** + * Sets the thickness for all series in this chart. Depending on the ChartType, this can be the main brush used, or just the outline. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "thickness", optionValue: number): void; + + /** + * Gets the marker shapes used for indicating location of data points in this chart. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + */ + igCategoryChart(optionLiteral: 'option', optionName: "markerTypes"): any; + + /** + * Sets the marker shapes used for indicating location of data points in this chart. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "markerTypes", optionValue: any): void; + + /** + * Gets the palette of brushes used for rendering fill area of data point markers. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igCategoryChart(optionLiteral: 'option', optionName: "markerBrushes"): any; + + /** + * Sets the palette of brushes used for rendering fill area of data point markers. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "markerBrushes", optionValue: any): void; + + /** + * Gets the palette of brushes used for rendering outlines of data point markers. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igCategoryChart(optionLiteral: 'option', optionName: "markerOutlines"): any; + + /** + * Sets the palette of brushes used for rendering outlines of data point markers. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "markerOutlines", optionValue: any): void; + + /** + * Gets the maximum number of markers displyed in the plot area of the chart. + */ + igCategoryChart(optionLiteral: 'option', optionName: "markerMaxCount"): number; + + /** + * Sets the maximum number of markers displyed in the plot area of the chart. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "markerMaxCount", optionValue: number): void; + + /** + * Gets the palette of brushes to used for coloring trend lines in this chart. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igCategoryChart(optionLiteral: 'option', optionName: "trendLineBrushes"): any; + + /** + * Sets the palette of brushes to used for coloring trend lines in this chart. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "trendLineBrushes", optionValue: any): void; + + /** + * Gets the formula used for calculating trend lines in this chart.This property applies only to these chart types: point, line, spline, and bubble + * + */ + + igCategoryChart(optionLiteral: 'option', optionName: "trendLineType"): string; + + /** + * Sets the formula used for calculating trend lines in this chart.This property applies only to these chart types: point, line, spline, and bubble + * + * + * @optionValue New value to be set. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "trendLineType", optionValue: string): void; + + /** + * Gets the thickness of the trend lines in this chart. + * This property applies only to these chart types: point, line, spline, and bubble + */ + igCategoryChart(optionLiteral: 'option', optionName: "trendLineThickness"): number; + + /** + * Sets the thickness of the trend lines in this chart. + * This property applies only to these chart types: point, line, spline, and bubble + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "trendLineThickness", optionValue: number): void; + + /** + * Gets a value indicating whether grid and tick lines are aligned to device pixels. + */ + igCategoryChart(optionLiteral: 'option', optionName: "alignsGridLinesToPixels"): boolean; + + /** + * Sets a value indicating whether grid and tick lines are aligned to device pixels. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "alignsGridLinesToPixels", optionValue: boolean): void; + igCategoryChart(optionLiteral: 'option', optionName: "trendLinePeriod"): number; + igCategoryChart(optionLiteral: 'option', optionName: "trendLinePeriod", optionValue: number): void; + + /** + * Gets function which takes an context object and returns a formatted label for the X-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisFormatLabel"): any; + + /** + * Sets function which takes an context object and returns a formatted label for the X-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisFormatLabel", optionValue: any): void; + + /** + * Gets function which takes a context object and returns a formatted label for the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisFormatLabel"): any; + + /** + * Sets function which takes a context object and returns a formatted label for the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisFormatLabel", optionValue: any): void; + + /** + * Gets the left margin of labels on the X-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelLeftMargin"): number; + + /** + * Sets the left margin of labels on the X-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelLeftMargin", optionValue: number): void; + + /** + * Gets the top margin of labels on the X-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelTopMargin"): number; + + /** + * Sets the top margin of labels on the X-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelTopMargin", optionValue: number): void; + + /** + * Gets the right margin of labels on the X-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelRightMargin"): number; + + /** + * Sets the right margin of labels on the X-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelRightMargin", optionValue: number): void; + + /** + * Gets the bottom margin of labels on the X-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelBottomMargin"): number; + + /** + * Sets the bottom margin of labels on the X-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelBottomMargin", optionValue: number): void; + + /** + * Gets the left margin of labels on the Y-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelLeftMargin"): number; + + /** + * Sets the left margin of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelLeftMargin", optionValue: number): void; + + /** + * Gets the top margin of labels on the Y-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelTopMargin"): number; + + /** + * Sets the top margin of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelTopMargin", optionValue: number): void; + + /** + * Gets the right margin of labels on the Y-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelRightMargin"): number; + + /** + * Sets the right margin of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelRightMargin", optionValue: number): void; + + /** + * Gets the bottom margin of labels on the Y-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelBottomMargin"): number; + + /** + * Sets the bottom margin of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelBottomMargin", optionValue: number): void; + + /** + * Gets color of labels on the X-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelTextColor"): string; + + /** + * Sets color of labels on the X-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelTextColor", optionValue: string): void; + + /** + * Gets color of labels on the Y-axis + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelTextColor"): string; + + /** + * Sets color of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelTextColor", optionValue: string): void; + /** * Gets the margin around a title on the X-axis */ @@ -11796,72 +12893,6 @@ interface JQuery { * @optionValue New value to be set. */ igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleTextColor", optionValue: string): void; - igCategoryChart(optionLiteral: 'option', optionName: "createWrappedTooltip"): any; - igCategoryChart(optionLiteral: 'option', optionName: "createWrappedTooltip", optionValue: any): void; - - /** - * Gets the id of a template element to use for tooltips, or markup representing the tooltip template. - */ - igCategoryChart(optionLiteral: 'option', optionName: "tooltipTemplate"): string; - - /** - * Sets the id of a template element to use for tooltips, or markup representing the tooltip template. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "tooltipTemplate", optionValue: string): void; - igCategoryChart(optionLiteral: 'option', optionName: "tooltipTemplates"): any; - igCategoryChart(optionLiteral: 'option', optionName: "tooltipTemplates", optionValue: any): void; - - /** - * Gets function which takes an context object and returns a formatted label for the X-axis. - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisFormatLabel"): any; - - /** - * Sets function which takes an context object and returns a formatted label for the X-axis. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisFormatLabel", optionValue: any): void; - - /** - * Gets function which takes a context object and returns a formatted label for the Y-axis. - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisFormatLabel"): any; - - /** - * Sets function which takes a context object and returns a formatted label for the Y-axis. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisFormatLabel", optionValue: any): void; - - /** - * Gets CSS font property for title on X-axis - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleTextStyle"): string; - - /** - * Sets CSS font property for title on X-axis - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleTextStyle", optionValue: string): void; - - /** - * Gets CSS font property for title on Y-axis - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleTextStyle"): string; - - /** - * Sets CSS font property for title on Y-axis - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleTextStyle", optionValue: string): void; - igCategoryChart(optionLiteral: 'option', optionName: "widget"): any; - igCategoryChart(optionLiteral: 'option', optionName: "widget", optionValue: any): void; /** * Gets CSS font property for labels on X-axis @@ -11888,390 +12919,28 @@ interface JQuery { igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelTextStyle", optionValue: string): void; /** - * Gets CSS font property for the chart subtitle + * Gets CSS font property for title on X-axis */ - igCategoryChart(optionLiteral: 'option', optionName: "subtitleTextStyle"): string; + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleTextStyle"): string; /** - * Sets CSS font property for the chart subtitle + * Sets CSS font property for title on X-axis * * @optionValue New value to be set. */ - igCategoryChart(optionLiteral: 'option', optionName: "subtitleTextStyle", optionValue: string): void; + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleTextStyle", optionValue: string): void; /** - * Gets CSS font property for the chart title + * Gets CSS font property for title on Y-axis */ - igCategoryChart(optionLiteral: 'option', optionName: "titleTextStyle"): string; + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleTextStyle"): string; /** - * Sets CSS font property for the chart title + * Sets CSS font property for title on Y-axis * * @optionValue New value to be set. */ - igCategoryChart(optionLiteral: 'option', optionName: "titleTextStyle", optionValue: string): void; - - /** - * Gets a collection of data items used to generate the chart. - * Value of this property can be a list of objects containing one or more numeric properties. Additionally, if the objects in the list implement the IEnumerable interface, the Category Chart will attempt to delve into the sub-collections when reading through the data source. Databinding can be further configured by attributing the data item classes with the DataSeriesMemberIntentAttribute. - */ - igCategoryChart(optionLiteral: 'option', optionName: "itemsSource"): any; - - /** - * Sets a collection of data items used to generate the chart. - * Value of this property can be a list of objects containing one or more numeric properties. Additionally, if the objects in the list implement the IEnumerable interface, the Category Chart will attempt to delve into the sub-collections when reading through the data source. Databinding can be further configured by attributing the data item classes with the DataSeriesMemberIntentAttribute. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "itemsSource", optionValue: any): void; - - /** - * Gets a set of property paths that should be included for consideration by the category chart, leaving the remaineder excluded. If null, all properties will be considered. - */ - igCategoryChart(optionLiteral: 'option', optionName: "includedProperties"): any; - - /** - * Sets a set of property paths that should be included for consideration by the category chart, leaving the remaineder excluded. If null, all properties will be considered. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "includedProperties", optionValue: any): void; - - /** - * Gets a set of property paths that should be excluded from consideration by the category chart. - */ - igCategoryChart(optionLiteral: 'option', optionName: "excludedProperties"): any; - - /** - * Sets a set of property paths that should be excluded from consideration by the category chart. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "excludedProperties", optionValue: any): void; - - /** - * Gets the type of chart series to generate from the data. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "chartType"): string; - - /** - * Sets the type of chart series to generate from the data. - * - * @optionValue New value to be set. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "chartType", optionValue: string): void; - - /** - * Gets the palette of brushes to use for coloring the chart series. The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection - * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. - */ - igCategoryChart(optionLiteral: 'option', optionName: "brushes"): any; - - /** - * Sets the palette of brushes to use for coloring the chart series. The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection - * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "brushes", optionValue: any): void; - - /** - * Gets the palette of brushes to use for outlines on the chart series. The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection - * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. - */ - igCategoryChart(optionLiteral: 'option', optionName: "outlines"): any; - - /** - * Sets the palette of brushes to use for outlines on the chart series. The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection - * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "outlines", optionValue: any): void; - - /** - * Sets the legend to connect this chart to. - * When the legend property is set, the chart will use it to display information about its series. Legends can be shared by multiple chart controls. - */ - igCategoryChart(optionLiteral: 'option', optionName: "legend"): any; - - /** - * Sets the legend to connect this chart to. - * When the legend property is set, the chart will use it to display information about its series. Legends can be shared by multiple chart controls. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "legend", optionValue: any): void; - - /** - * Gets whether the chart can be horizontally zoomed through user interaction. - */ - igCategoryChart(optionLiteral: 'option', optionName: "isHorizontalZoomEnabled"): boolean; - - /** - * Sets whether the chart can be horizontally zoomed through user interaction. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "isHorizontalZoomEnabled", optionValue: boolean): void; - - /** - * Gets whether the chart can be vertically zoomed through user interaction. - */ - igCategoryChart(optionLiteral: 'option', optionName: "isVerticalZoomEnabled"): boolean; - - /** - * Sets whether the chart can be vertically zoomed through user interaction. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "isVerticalZoomEnabled", optionValue: boolean): void; - - /** - * Gets the rectangle representing the current scroll and zoom state of the chart. - * WindowRect is expressed as a Rectangle with coordinates and sizes between 0 and 1. - * The provided object should have numeric properties called left, top, width and height. - */ - igCategoryChart(optionLiteral: 'option', optionName: "windowRect"): any; - - /** - * Sets the rectangle representing the current scroll and zoom state of the chart. - * WindowRect is expressed as a Rectangle with coordinates and sizes between 0 and 1. - * The provided object should have numeric properties called left, top, width and height. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "windowRect", optionValue: any): void; - - /** - * Gets text to display above the plot area. - */ - igCategoryChart(optionLiteral: 'option', optionName: "title"): string; - - /** - * Sets text to display above the plot area. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "title", optionValue: string): void; - - /** - * Gets text to display below the chart Title, above the plot area. - */ - igCategoryChart(optionLiteral: 'option', optionName: "subtitle"): string; - - /** - * Sets text to display below the chart Title, above the plot area. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "subtitle", optionValue: string): void; - - /** - * Gets horizontal alignment which determines the title position, relative to the left and right edges of the chart. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "titleAlignment"): string; - - /** - * Sets horizontal alignment which determines the title position, relative to the left and right edges of the chart. - * - * @optionValue New value to be set. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "titleAlignment", optionValue: string): void; - - /** - * Gets horizontal alignment which determines the subtitle position, relative to the left and right edges of the chart. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "subtitleAlignment"): string; - - /** - * Sets horizontal alignment which determines the subtitle position, relative to the left and right edges of the chart. - * - * @optionValue New value to be set. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "subtitleAlignment", optionValue: string): void; - - /** - * Gets the behavior that determines how unknown values will be plotted on the chart.Null and Double.NaN are two examples of unknown values. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "unknownValuePlotting"): string; - - /** - * Sets the behavior that determines how unknown values will be plotted on the chart.Null and Double.NaN are two examples of unknown values. - * - * @optionValue New value to be set. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "unknownValuePlotting", optionValue: string): void; - - /** - * Gets the behavior for markers in each series which are placed too close together for the current view, resulting in a collision. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "markerCollisionAvoidance"): string; - - /** - * Sets the behavior for markers in each series which are placed too close together for the current view, resulting in a collision. - * - * @optionValue New value to be set. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "markerCollisionAvoidance", optionValue: string): void; - - /** - * Gets whether animation of series plots is enabled when the chart is loading into view - */ - igCategoryChart(optionLiteral: 'option', optionName: "isTransitionInEnabled"): boolean; - - /** - * Sets whether animation of series plots is enabled when the chart is loading into view - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "isTransitionInEnabled", optionValue: boolean): void; - - /** - * Gets the method that determines how to animate series plots when the chart is loading into view - */ - - igCategoryChart(optionLiteral: 'option', optionName: "transitionInMode"): string; - - /** - * Sets the method that determines how to animate series plots when the chart is loading into view - * - * @optionValue New value to be set. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "transitionInMode", optionValue: string): void; - - /** - * Gets the arrival speed used for animating series plots when the chart is loading into view - */ - - igCategoryChart(optionLiteral: 'option', optionName: "transitionInSpeedType"): string; - - /** - * Sets the arrival speed used for animating series plots when the chart is loading into view - * - * @optionValue New value to be set. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "transitionInSpeedType", optionValue: string): void; - - /** - * Gets the frequency of displayed labels along the X-axis. - * Gets the set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label. - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisInterval"): number; - - /** - * Sets the frequency of displayed labels along the X-axis. - * sets the set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisInterval", optionValue: number): void; - - /** - * Gets the frequency of displayed minor lines along the X-axis. - * Gets the set value is a factor that determines how the minor lines will be displayed. - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisMinorInterval"): number; - - /** - * Sets the frequency of displayed minor lines along the X-axis. - * sets the set value is a factor that determines how the minor lines will be displayed. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisMinorInterval", optionValue: number): void; - - /** - * Gets the amount of space between adjacent categories for the X-axis. - * The gap is silently clamped to the range [0, 1] when used. - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisGap"): number; - - /** - * Sets the amount of space between adjacent categories for the X-axis. - * The gap is silently clamped to the range [0, 1] when used. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisGap", optionValue: number): void; - - /** - * Gets the amount of overlap between adjacent categories for the X-axis. - * Gets the overlap is silently clamped to the range [-1, 1] when used. - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisOverlap"): number; - - /** - * Sets the amount of overlap between adjacent categories for the X-axis. - * sets the overlap is silently clamped to the range [-1, 1] when used. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "xAxisOverlap", optionValue: number): void; - - /** - * Gets the distance between each label and grid line along the Y-axis. - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisInterval"): number; - - /** - * Sets the distance between each label and grid line along the Y-axis. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisInterval", optionValue: number): void; - - /** - * Gets whether the Y-axis should use a logarithmic scale instead of a linear one. - * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the Y-axis minimum is greater than zero. - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisIsLogarithmic"): boolean; - - /** - * Sets whether the Y-axis should use a logarithmic scale instead of a linear one. - * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the Y-axis minimum is greater than zero. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisIsLogarithmic", optionValue: boolean): void; - - /** - * Gets the base value to use in the log function when mapping the position of data items along the Y-axis. - * This property is effective only when YAxisIsLogarithmic is true. - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisLogarithmBase"): number; - - /** - * Sets the base value to use in the log function when mapping the position of data items along the Y-axis. - * This property is effective only when YAxisIsLogarithmic is true. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisLogarithmBase", optionValue: number): void; - - /** - * Gets the frequency of displayed minor lines along the Y-axis. - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisMinorInterval"): number; - - /** - * Sets the frequency of displayed minor lines along the Y-axis. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "yAxisMinorInterval", optionValue: number): void; + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleTextStyle", optionValue: string): void; /** * Gets the format for labels along the X-axis. @@ -12514,24 +13183,24 @@ interface JQuery { igCategoryChart(optionLiteral: 'option', optionName: "yAxisTickStrokeThickness", optionValue: number): void; /** - * Text to display below the X-axis. + * Gets the Text to display below the X-axis. */ igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitle"): string; /** - * Text to display below the X-axis. + * Sets the Text to display below the X-axis. * * @optionValue New value to be set. */ igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitle", optionValue: string): void; /** - * Text to display to the left of the Y-axis. + * Gets the Text to display to the left of the Y-axis. */ igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitle"): string; /** - * Text to display to the left of the Y-axis. + * Sets the Text to display to the left of the Y-axis. * * @optionValue New value to be set. */ @@ -12585,6 +13254,30 @@ interface JQuery { */ igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelAngle", optionValue: number): void; + /** + * Gets the distance between the X-axis and the bottom of the chart. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisExtent"): number; + + /** + * Sets the distance between the X-axis and the bottom of the chart. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisExtent", optionValue: number): void; + + /** + * Gets the distance between the Y-axis and the left edge of the chart. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisExtent"): number; + + /** + * Sets the distance between the Y-axis and the left edge of the chart. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisExtent", optionValue: number): void; + /** * Gets the angle of rotation for the X-axis title. */ @@ -12610,137 +13303,381 @@ interface JQuery { igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleAngle", optionValue: number): void; /** - * Gets the rendering resolution for series in this chart. - * Where n = Resolution, for every n horizontal pixels, combine all items into a single datapoint. When Resolution = 0, all datapoints will be rendered as graphical objects. Charts with a higher resolution will have faster performance. - */ - igCategoryChart(optionLiteral: 'option', optionName: "resolution"): number; - - /** - * Sets the rendering resolution for series in this chart. - * Where n = Resolution, for every n horizontal pixels, combine all items into a single datapoint. When Resolution = 0, all datapoints will be rendered as graphical objects. Charts with a higher resolution will have faster performance. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "resolution", optionValue: number): void; - - /** - * Gets the palette of brushes to used for coloring trend lines in this chart. The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection - * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. - */ - igCategoryChart(optionLiteral: 'option', optionName: "trendLineBrushes"): any; - - /** - * Sets the palette of brushes to used for coloring trend lines in this chart. The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection - * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "trendLineBrushes", optionValue: any): void; - - /** - * Gets the formula used for calculating trend lines in this chart. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "trendLineType"): string; - - /** - * Sets the formula used for calculating trend lines in this chart. - * - * @optionValue New value to be set. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "trendLineType", optionValue: string): void; - - /** - * Gets the thickness of the chart series. Depending on the ChartType, this can be the main brush used, or just the outline. - */ - igCategoryChart(optionLiteral: 'option', optionName: "thickness"): number; - - /** - * Sets the thickness of the chart series. Depending on the ChartType, this can be the main brush used, or just the outline. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "thickness", optionValue: number): void; - - /** - * Gets the collection of marker shapes used for representing data points of series in this chart. - * When MarkerTypes is null or empty, each series' marker type will be set to none or automatic, depending on the series type. - */ - igCategoryChart(optionLiteral: 'option', optionName: "markerTypes"): any; - - /** - * Sets the collection of marker shapes used for representing data points of series in this chart. - * When MarkerTypes is null or empty, each series' marker type will be set to none or automatic, depending on the series type. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "markerTypes", optionValue: any): void; - - /** - * Gets the palette of brushes used as the fill color for data point markers. - * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. - */ - igCategoryChart(optionLiteral: 'option', optionName: "markerBrushes"): any; - - /** - * Sets the palette of brushes used as the fill color for data point markers. - * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "markerBrushes", optionValue: any): void; - - /** - * Gets the palette of brushes used for coloring outline of data point markers. - * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. - */ - igCategoryChart(optionLiteral: 'option', optionName: "markerOutlines"): any; - - /** - * Sets the palette of brushes used for coloring outline of data point markers. - * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "markerOutlines", optionValue: any): void; - - /** - * Gets the thickness of the trend lines in this chart. - */ - igCategoryChart(optionLiteral: 'option', optionName: "trendLineThickness"): number; - - /** - * Sets the thickness of the trend lines in this chart. - * - * @optionValue New value to be set. - */ - igCategoryChart(optionLiteral: 'option', optionName: "trendLineThickness", optionValue: number): void; - - /** - * Gets whether the direction of the X-axis is inverted, placing the first data items on the right side instead of left side + * Gets whether to invert the direction of the X-axis by placing the first data items on the right side of the chart. */ igCategoryChart(optionLiteral: 'option', optionName: "xAxisInverted"): boolean; /** - * Sets whether the direction of the X-axis is inverted, placing the first data items on the right side instead of left side + * Sets whether to invert the direction of the X-axis by placing the first data items on the right side of the chart. * * @optionValue New value to be set. */ igCategoryChart(optionLiteral: 'option', optionName: "xAxisInverted", optionValue: boolean): void; /** - * Gets whether the direction of the Y-axis is inverted, placing minimum numeric value at the top of the axis instead of bottom + * Gets whether to invert the direction of the Y-axis by placing the minimum numeric value at the top of the chart. */ igCategoryChart(optionLiteral: 'option', optionName: "yAxisInverted"): boolean; /** - * Sets whether the direction of the Y-axis is inverted, placing minimum numeric value at the top of the axis instead of bottom + * Sets whether to invert the direction of the Y-axis by placing the minimum numeric value at the top of the chart. * * @optionValue New value to be set. */ igCategoryChart(optionLiteral: 'option', optionName: "yAxisInverted", optionValue: boolean): void; + /** + * Gets Horizontal alignment of the X-axis title. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleAlignment"): string; + + /** + * Sets Horizontal alignment of the X-axis title. + * + * @optionValue New value to be set. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleAlignment", optionValue: string): void; + + /** + * Gets Vertical alignment of the Y-axis title. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleAlignment"): string; + + /** + * Sets Vertical alignment of the Y-axis title. + * + * @optionValue New value to be set. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleAlignment", optionValue: string): void; + + /** + * Gets Horizontal alignment of X-axis labels. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelHorizontalAlignment"): string; + + /** + * Sets Horizontal alignment of X-axis labels. + * + * @optionValue New value to be set. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelHorizontalAlignment", optionValue: string): void; + + /** + * Gets Horizontal alignment of Y-axis labels. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelHorizontalAlignment"): string; + + /** + * Sets Horizontal alignment of Y-axis labels. + * + * @optionValue New value to be set. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelHorizontalAlignment", optionValue: string): void; + + /** + * Gets Vertical alignment of X-axis labels. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelVerticalAlignment"): string; + + /** + * Sets Vertical alignment of X-axis labels. + * + * @optionValue New value to be set. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelVerticalAlignment", optionValue: string): void; + + /** + * Gets Vertical alignment of Y-axis labels. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelVerticalAlignment"): string; + + /** + * Sets Vertical alignment of Y-axis labels. + * + * @optionValue New value to be set. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelVerticalAlignment", optionValue: string): void; + + /** + * Gets Visibility of X-axis labels. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelVisibility"): string; + + /** + * Sets Visibility of X-axis labels. + * + * @optionValue New value to be set. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelVisibility", optionValue: string): void; + + /** + * Gets Visibility of Y-axis labels. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelVisibility"): string; + + /** + * Sets Visibility of Y-axis labels. + * + * @optionValue New value to be set. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelVisibility", optionValue: string): void; + + /** + * The location of Y-axis labels, relative to the plot area. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelLocation"): string; + + /** + * The location of Y-axis labels, relative to the plot area. + * + * @optionValue New value to be set. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelLocation", optionValue: string): void; + + /** + * Gets the duration used for animating series plots when the chart is loading into view + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionInDuration"): number; + + /** + * Sets the duration used for animating series plots when the chart is loading into view + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionInDuration", optionValue: number): void; + + /** + * Gets the easing function used for animating series plots when the chart is loading into view + * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionInEasingFunction"): any; + + /** + * Sets the easing function used for animating series plots when the chart is loading into view + * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "transitionInEasingFunction", optionValue: any): void; + + /** + * Gets the type of chart series to generate from the data. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "chartType"): string; + + /** + * Sets the type of chart series to generate from the data. + * + * @optionValue New value to be set. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "chartType", optionValue: string): void; + + /** + * Gets the behavior for markers in each series which are placed too close together for the current view, resulting in a collision. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "markerCollisionAvoidance"): string; + + /** + * Sets the behavior for markers in each series which are placed too close together for the current view, resulting in a collision. + * + * @optionValue New value to be set. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "markerCollisionAvoidance", optionValue: string): void; + + /** + * Gets whether animation of series plots is enabled when the chart is loading into view + */ + igCategoryChart(optionLiteral: 'option', optionName: "isTransitionInEnabled"): boolean; + + /** + * Sets whether animation of series plots is enabled when the chart is loading into view + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "isTransitionInEnabled", optionValue: boolean): void; + + /** + * Gets the method that determines how to animate series plots when the chart is loading into view + */ + + igCategoryChart(optionLiteral: 'option', optionName: "transitionInMode"): string; + + /** + * Sets the method that determines how to animate series plots when the chart is loading into view + * + * @optionValue New value to be set. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "transitionInMode", optionValue: string): void; + + /** + * Gets the arrival speed used for animating series plots when the chart is loading into view + */ + + igCategoryChart(optionLiteral: 'option', optionName: "transitionInSpeedType"): string; + + /** + * Sets the arrival speed used for animating series plots when the chart is loading into view + * + * @optionValue New value to be set. + */ + + igCategoryChart(optionLiteral: 'option', optionName: "transitionInSpeedType", optionValue: string): void; + + /** + * Gets the frequency of displayed labels along the X-axis. + * Gets the set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisInterval"): number; + + /** + * Sets the frequency of displayed labels along the X-axis. + * sets the set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisInterval", optionValue: number): void; + + /** + * Gets the frequency of displayed minor lines along the X-axis. + * Gets the set value is a factor that determines how the minor lines will be displayed. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisMinorInterval"): number; + + /** + * Sets the frequency of displayed minor lines along the X-axis. + * sets the set value is a factor that determines how the minor lines will be displayed. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisMinorInterval", optionValue: number): void; + + /** + * Gets the amount of space between adjacent categories for the X-axis. + * The gap is silently clamped to the range [0, 1] when used. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisGap"): number; + + /** + * Sets the amount of space between adjacent categories for the X-axis. + * The gap is silently clamped to the range [0, 1] when used. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisGap", optionValue: number): void; + + /** + * Gets the amount of overlap between adjacent categories for the X-axis. + * Gets the overlap is silently clamped to the range [-1, 1] when used. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisOverlap"): number; + + /** + * Sets the amount of overlap between adjacent categories for the X-axis. + * sets the overlap is silently clamped to the range [-1, 1] when used. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "xAxisOverlap", optionValue: number): void; + + /** + * Gets the distance between each label and grid line along the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisInterval"): number; + + /** + * Sets the distance between each label and grid line along the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisInterval", optionValue: number): void; + + /** + * Gets whether the Y-axis should use a logarithmic scale instead of a linear one. + * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the Y-axis minimum is greater than zero. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisIsLogarithmic"): boolean; + + /** + * Sets whether the Y-axis should use a logarithmic scale instead of a linear one. + * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the Y-axis minimum is greater than zero. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisIsLogarithmic", optionValue: boolean): void; + + /** + * Gets the base value to use in the log function when mapping the position of data items along the Y-axis. + * This property is effective only when YAxisIsLogarithmic is true. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLogarithmBase"): number; + + /** + * Sets the base value to use in the log function when mapping the position of data items along the Y-axis. + * This property is effective only when YAxisIsLogarithmic is true. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisLogarithmBase", optionValue: number): void; + + /** + * Gets the data value corresponding to the minimum value of the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMinimumValue"): number; + + /** + * Sets the data value corresponding to the minimum value of the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMinimumValue", optionValue: number): void; + + /** + * Gets the data value corresponding to the maximum value of the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMaximumValue"): number; + + /** + * Sets the data value corresponding to the maximum value of the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMaximumValue", optionValue: number): void; + + /** + * Gets the frequency of displayed minor lines along the Y-axis. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMinorInterval"): number; + + /** + * Sets the frequency of displayed minor lines along the Y-axis. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisMinorInterval", optionValue: number): void; + /** * Gets the palette used for coloring negative items of Waterfall chart type. * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. @@ -12755,118 +13692,6 @@ interface JQuery { */ igCategoryChart(optionLiteral: 'option', optionName: "negativeBrushes", optionValue: any): void; - /** - * Gets the horizontal alignment of the X-axis title. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleAlignment"): string; - - /** - * Sets the horizontal alignment of the X-axis title. - * - * @optionValue New value to be set. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "xAxisTitleAlignment", optionValue: string): void; - - /** - * Gets the vertical alignment of the Y-axis title. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleAlignment"): string; - - /** - * Sets the vertical alignment of the Y-axis title. - * - * @optionValue New value to be set. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleAlignment", optionValue: string): void; - - /** - * Gets the horizontal alignment of X-axis labels. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelHorizontalAlignment"): string; - - /** - * Sets the horizontal alignment of X-axis labels. - * - * @optionValue New value to be set. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelHorizontalAlignment", optionValue: string): void; - - /** - * Gets the horizontal alignment of Y-axis labels. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelHorizontalAlignment"): string; - - /** - * Sets the horizontal alignment of Y-axis labels. - * - * @optionValue New value to be set. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelHorizontalAlignment", optionValue: string): void; - - /** - * Gets the vertical alignment of X-axis labels. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelVerticalAlignment"): string; - - /** - * Sets the vertical alignment of X-axis labels. - * - * @optionValue New value to be set. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelVerticalAlignment", optionValue: string): void; - - /** - * Gets the vertical alignment of Y-axis labels. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelVerticalAlignment"): string; - - /** - * Sets the vertical alignment of Y-axis labels. - * - * @optionValue New value to be set. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelVerticalAlignment", optionValue: string): void; - - /** - * Gets the visibility of X-axis labels. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelVisibility"): string; - - /** - * Sets the visibility of X-axis labels. - * - * @optionValue New value to be set. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "xAxisLabelVisibility", optionValue: string): void; - - /** - * Gets the visibility of Y-axis labels. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelVisibility"): string; - - /** - * Sets the visibility of Y-axis labels. - * - * @optionValue New value to be set. - */ - - igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelVisibility", optionValue: string): void; - /** * Brushes to use for drawing negative elements, when using a chart type with contextual coloring, such as Waterfall. * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. @@ -12882,16 +13707,28 @@ interface JQuery { igCategoryChart(optionLiteral: 'option', optionName: "negativeOutlines", optionValue: any): void; /** - * Gets a value indicating whether grid and tick lines are aligned to device pixels. + * Gets whether the series animations should be allowed when a range change has been detected on an axis. */ - igCategoryChart(optionLiteral: 'option', optionName: "alignsGridLinesToPixels"): boolean; + igCategoryChart(optionLiteral: 'option', optionName: "animateSeriesWhenAxisRangeChanges"): boolean; /** - * Sets a value indicating whether grid and tick lines are aligned to device pixels. + * Sets whether the series animations should be allowed when a range change has been detected on an axis. * * @optionValue New value to be set. */ - igCategoryChart(optionLiteral: 'option', optionName: "alignsGridLinesToPixels", optionValue: boolean): void; + igCategoryChart(optionLiteral: 'option', optionName: "animateSeriesWhenAxisRangeChanges", optionValue: boolean): void; + + /** + * Gets whether the large numbers on the Y-axis labels are abbreviated. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisAbbreviateLargeNumbers"): boolean; + + /** + * Sets whether the large numbers on the Y-axis labels are abbreviated. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "yAxisAbbreviateLargeNumbers", optionValue: boolean): void; /** * The width of the chart. @@ -12994,41 +13831,101 @@ interface JQuery { igCategoryChart(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; /** - * Event raised when a property value is changed. + * Event raised when a property value is changed on this chart */ igCategoryChart(optionLiteral: 'option', optionName: "propertyChanged"): PropertyChangedEvent; /** - * Event raised when a property value is changed. + * Event raised when a property value is changed on this chart * * @optionValue Define event handler function. */ igCategoryChart(optionLiteral: 'option', optionName: "propertyChanged", optionValue: PropertyChangedEvent): void; /** - * Event raised when a series is initialized + * Event raised when a series is initialized and added to this chart. */ igCategoryChart(optionLiteral: 'option', optionName: "seriesAdded"): SeriesAddedEvent; /** - * Event raised when a series is initialized + * Event raised when a series is initialized and added to this chart. * * @optionValue Define event handler function. */ igCategoryChart(optionLiteral: 'option', optionName: "seriesAdded", optionValue: SeriesAddedEvent): void; /** - * Event raised when a series is removed from the CategoryChart + * Event raised when a series is removed from this chart. */ igCategoryChart(optionLiteral: 'option', optionName: "seriesRemoved"): SeriesRemovedEvent; /** - * Event raised when a series is removed from the CategoryChart + * Event raised when a series is removed from this chart. * * @optionValue Define event handler function. */ igCategoryChart(optionLiteral: 'option', optionName: "seriesRemoved", optionValue: SeriesRemovedEvent): void; + /** + * Occurs when the pointer enters a Series. + */ + igCategoryChart(optionLiteral: 'option', optionName: "seriesPointerEnter"): SeriesPointerEnterEvent; + + /** + * Occurs when the pointer enters a Series. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "seriesPointerEnter", optionValue: SeriesPointerEnterEvent): void; + + /** + * Occurs when the pointer leaves a Series. + */ + igCategoryChart(optionLiteral: 'option', optionName: "seriesPointerLeave"): SeriesPointerLeaveEvent; + + /** + * Occurs when the pointer leaves a Series. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "seriesPointerLeave", optionValue: SeriesPointerLeaveEvent): void; + + /** + * Occurs when the pointer moves over a Series. + */ + igCategoryChart(optionLiteral: 'option', optionName: "seriesPointerMove"): SeriesPointerMoveEvent; + + /** + * Occurs when the pointer moves over a Series. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "seriesPointerMove", optionValue: SeriesPointerMoveEvent): void; + + /** + * Occurs when the pointer is pressed down over a Series. + */ + igCategoryChart(optionLiteral: 'option', optionName: "seriesPointerDown"): SeriesPointerDownEvent; + + /** + * Occurs when the pointer is pressed down over a Series. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "seriesPointerDown", optionValue: SeriesPointerDownEvent): void; + + /** + * Occurs when the pointer is released over a Series. + */ + igCategoryChart(optionLiteral: 'option', optionName: "seriesPointerUp"): SeriesPointerUpEvent; + + /** + * Occurs when the pointer is released over a Series. + * + * @optionValue New value to be set. + */ + igCategoryChart(optionLiteral: 'option', optionName: "seriesPointerUp", optionValue: SeriesPointerUpEvent): void; + /** * Event which is raised before data binding. * Return false in order to cancel data binding. @@ -13167,6 +14064,7 @@ interface IgDataChartLegend { /** * The height of the legend.null will stretch vertically to fit data, no other height are defined. * + * * Valid values: * "null" */ @@ -13191,6 +14089,7 @@ interface IgDataChartAxes { * "categoryAngle" Specify the axis as category angle axis. Useful for displaying polar and radial categories. * "numericAngle" Specify the axis as numeric angle axis. Useful for displaying polar and radial series. * "numericRadius" Specify the axis as numeric radius axis. Useful for displaying polar and radial series. + * "time" Specify the axis as time X axis. Useful for displaying date based data with time breaks. */ type?: string; @@ -13375,6 +14274,7 @@ interface IgDataChartAxes { /** * Gets or sets the axis MinimumValue. * + * * Valid values: * "number" The minimum value can be set to be a number when the axis is of numeric type * "date" The minimum value can be set to be a date object when [type](ui.igDataChart#options:axes.type) option is set to "categoryDateTimeX" @@ -13384,6 +14284,7 @@ interface IgDataChartAxes { /** * Gets or sets the axis MaximumValue. * + * * Valid values: * "number" The maximum value can be set to be a number when the axis is of numeric type * "date" The maximum value can be set to be a date object when [type](ui.igDataChart#options:axes.type) option is set to "categoryDateTimeX" @@ -13604,6 +14505,7 @@ interface IgDataChartSeriesLegend { /** * The height of the legend.null will stretch vertically to fit data, no other height are defined * + * * Valid values: * "null" */ @@ -13633,19 +14535,77 @@ interface IgDataChartSeries { * "waterfall" Specify the series as Waterfall series. * "financial" Specify the series as Financial series. * "typicalPriceIndicator" Specify the series as Typical Price Indicator series. + * "point" Specify the series as Point series. + * "polarSplineArea" Specify the series as Polar Spline Area series. + * "polarSpline" Specify the series as Polar Spline series. * "polarArea" Specify the series as Polar Area series. * "polarLine" Specify the series as Polar Line series. * "polarScatter" Specify the series as Polar Scatter series. * "radialColumn" Specify the series as Radial Column series. * "radialLine" Specify the series as Radial Line series. * "radialPie" Specify the series as Radial Pie series. + * "radialArea" Specify the series as Radial Area series. * "scatter" Specify the series as Scatter series. * "scatterLine" Specify the series as Scatter Line series. + * "scatterSpline" Specify the series as Scatter Spline series. + * "scatterArea" Specify the series as Scatter Area series. + * "scatterContour" Specify the series as Scatter Contour series. + * "scatterPolygon" Specify the series as Scatter Polygon series. + * "scatterPolyline" Specify the series as Scatter Polyline series. * "bubble" Specify the series as Bubble series. * "absoluteVolumeOscillatorIndicator" Specify the series as Absolute Volume Oscillator Indicator series. * "averageTrueRangeIndicator" Specify the series as Average True Range Indicator series. * "accumulationDistributionIndicator" Specify the series as Accumulation Distribution Indicator series * "averageDirectionalIndexIndicator" Specify the series as Average Directional Index Indicator series. + * "bollingerBandWidthIndicator" Specify the series as Bollinger Band Width Indicator series. + * "chaikinOscillatorIndicator" Specify the series as Chaikin Oscillator Indicator series. + * "chaikinVolatilityIndicator" Specify the series as Chaikin Volitility Indicator series. + * "commodityChannelIndexIndicator" Specify the series as Commodity Channel Index Indicator series. + * "detrendedPriceOscillatorIndicator" Specify the series as Detrended Price Oscillator Indicator series. + * "easeOfMovementIndicator" Specify the series as Ease Of Movement Indicator series. + * "fastStochasticOscillatorIndicator" Specify the series as Fast Stochastic Oscillator Indicator series. + * "forceIndexIndicator" Specify the series as Force Index Indicator series. + * "fullStochasticOscillatorIndicator" Specify the series as Full Stochastic Oscillator Indicator series. + * "marketFacilitationIndexIndicator" Specify the series as Market Facilitation Index Indicator series. + * "massIndexIndicator" Specify the series as Mass Index Indicator series. + * "medianPriceIndicator" Specify the series as Median Price Indicator series. + * "moneyFlowIndexIndicator" Specify the series as Money Flow Index Indicator series. + * "movingAverageConvergenceDivergenceIndicator" Specify the series as Moving Average Convergence Divergence Indicator series. + * "negativeVolumeIndexIndicator" Specify the series as Negative Volume Index Indicator series. + * "onBalanceVolumeIndicator" Specify the series as On Balance Volume Indicator series. + * "percentagePriceOscillatorIndicator" Specify the series as Percentage Price Oscillator Indicator series. + * "percentageVolumeOscillatorIndicator" Specify the series as Percentage Volume Oscillator Indicator series. + * "positiveVolumeIndexIndicator" Specify the series as Positive Volume Index Indicator series. + * "priceVolumeTrendIndictor" Specify the series as Price Volume Trend Indictor series. + * "rateOfChangeAndMomentumIndicator" Specify the series as Rate Of Change And Momentum Indicator series. + * "relativeStrengthIndexIndicator" Specify the series as Relative Strength Index Indicator series. + * "slowStochasticOscillatorIndicator" Specify the series as Slow Stochastic Oscillator Indicator series. + * "standardDeviationIndicator" Specify the series as Standard Deviation Indicator series. + * "stochRSIIndicator" Specify the series as Stoch RSI Indicator series. + * "trixIndicator" Specify the series as Trix Indicator series. + * "ultimateOscillatorIndicator" Specify the series as Ultimate Oscillator Indicator series. + * "weightedCloseIndicator" Specify the series as Weighted Close Indicator series. + * "williamsPercentRIndicator" Specify the series as Williams Percent R Indicator series. + * "bollingerBandsOverlay" Specify the series as Bollinger Bands Overlay series. + * "priceChannelOverlay" Specify the series as Price Channel Overlay series. + * "customIndicator" Specify the series as Custom Indicator series. + * "stackedBar" Specify the series as Stacked Bar series. + * "stacked100Bar" Specify the series as Stacked 100 Bar series. + * "stackedArea" Specify the series as Stacked Area series. + * "stacked100Area" Specify the series as Stacked 100 Area series. + * "stackedColumn" Specify the series as Stacked Column series. + * "stacked100Column" Specify the series as Stacked 100 Column series. + * "stackedLine" Specify the series as Stacked Line series. + * "stacked100Line" Specify the series as Stacked 100 Line series. + * "stackedSpline" Specify the series as Stacked Spline series. + * "stacked100Spline" Specify the series as Stacked 100 Spline series. + * "stackedSplineArea" Specify the series as Stacked Spline Area series. + * "stacked100SplineArea" Specify the series as Stacked 100 Spline Area series. + * "crosshairLayer" Specify the series as a crosshair layer. + * "categoryHighlightLayer" Specify the series as a category highlight layer. + * "categoryItemHighlightLayer" Specify the series as a category item highlight layer. + * "itemToolTipLayer" Specify the series as an item tooltip layer. + * "categoryToolTipLayer" Specify the series as a category tooltip layer. */ type?: string; @@ -15138,6 +16098,7 @@ interface IgDataChart { /** * The response to user panning and zooming: whether to update the view immediately while the user action is happening, or to defer the update to after the user action is complete. The user action will be an action such as a mouse drag which causes panning and/or zooming to occur. * + * * Valid values: * "deferred" Defer the view update until after the user action is complete. * "immediate" Update the view immediately while the user action is happening. @@ -15583,6 +16544,24 @@ interface IgDataChart { */ theme?: string; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event fired when the mouse has hovered on a series and the tooltip is about to show * Function takes arguments evt and ui. @@ -16270,6 +17249,24 @@ interface IgDataChartMethods { * Clears the tile zoom tile cache so that new tiles will be generated. Only applies if the viewer is using a tile based zoom. */ clearTileZoomCache(): void; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igDataChart"): IgDataChartMethods; @@ -16471,6 +17468,7 @@ interface IgPieChart { /** * Gets or sets the position of chart labels. * + * * Valid values: * "none" No labels will be displayed. * "center" Labels will be displayed in the center. @@ -16495,6 +17493,7 @@ interface IgPieChart { /** * Gets or sets the type of selection the pie chart allows. * + * * Valid values: * "single" A single slice is allowed to be selected. * "multiple" Multiple slices are allowed to be selected. @@ -16517,6 +17516,7 @@ interface IgPieChart { /** * Gets or sets whether the leader lines are visible. * + * * Valid values: * "visible" * "collapsed" @@ -16526,6 +17526,7 @@ interface IgPieChart { /** * Gets or sets what type of leader lines will be used for the outside end labels. * + * * Valid values: * "straight" * "arc" @@ -16634,6 +17635,7 @@ interface IgPieChart { /** * Gets or sets the rotational direction of the chart. * + * * Valid values: * "counterclockwise" * "clockwise" @@ -16685,6 +17687,24 @@ interface IgPieChart { */ theme?: string; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event fired when the mouse has hovered on an element long enough to display a tooltip * Function takes arguments evt and ui. @@ -16859,6 +17879,24 @@ interface IgPieChartMethods { * Forces any pending deferred work to render on the chart before continuing */ flush(): void; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igPieChart"): IgPieChartMethods; @@ -16921,6 +17959,9 @@ interface JQuery { igDataChart(methodName: "startTiledZoomingIfNecessary"): void; igDataChart(methodName: "endTiledZoomingIfRunning"): void; igDataChart(methodName: "clearTileZoomCache"): void; + igDataChart(methodName: "changeLocale", $container: Object): void; + igDataChart(methodName: "changeGlobalLanguage"): void; + igDataChart(methodName: "changeGlobalRegional"): void; /** * Gets whether the series viewer can allow the page to pan if a control pan is not possible in the requested direction. @@ -17052,6 +18093,7 @@ interface JQuery { /** * The response to user panning and zooming: whether to update the view immediately while the user action is happening, or to defer the update to after the user action is complete. The user action will be an action such as a mouse drag which causes panning and/or zooming to occur. + * */ igDataChart(optionLiteral: 'option', optionName: "windowResponse"): string; @@ -17059,6 +18101,7 @@ interface JQuery { /** * The response to user panning and zooming: whether to update the view immediately while the user action is happening, or to defer the update to after the user action is complete. The user action will be an action such as a mouse drag which causes panning and/or zooming to occur. * + * * @optionValue New value to be set. */ @@ -18008,6 +19051,50 @@ interface JQuery { */ igDataChart(optionLiteral: 'option', optionName: "theme", optionValue: string): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igDataChart(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igDataChart(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igDataChart(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igDataChart(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event fired when the mouse has hovered on a series and the tooltip is about to show * Function takes arguments evt and ui. @@ -18561,6 +19648,9 @@ interface JQuery { igPieChart(methodName: "exportVisualData"): void; igPieChart(methodName: "getData"): Object; igPieChart(methodName: "flush"): void; + igPieChart(methodName: "changeLocale", $container: Object): void; + igPieChart(methodName: "changeGlobalLanguage"): void; + igPieChart(methodName: "changeGlobalRegional"): void; /** * The width of the chart. It can be set as a number in pixels, string (px) or percentage (%). @@ -18700,6 +19790,7 @@ interface JQuery { /** * Gets the position of chart labels. + * */ igPieChart(optionLiteral: 'option', optionName: "labelsPosition"): string; @@ -18707,6 +19798,7 @@ interface JQuery { /** * Sets the position of chart labels. * + * * @optionValue New value to be set. */ @@ -18742,6 +19834,7 @@ interface JQuery { /** * Gets the type of selection the pie chart allows. + * */ igPieChart(optionLiteral: 'option', optionName: "selectionMode"): string; @@ -18749,6 +19842,7 @@ interface JQuery { /** * Sets the type of selection the pie chart allows. * + * * @optionValue New value to be set. */ @@ -18784,6 +19878,7 @@ interface JQuery { /** * Gets whether the leader lines are visible. + * */ igPieChart(optionLiteral: 'option', optionName: "leaderLineVisibility"): string; @@ -18791,6 +19886,7 @@ interface JQuery { /** * Sets whether the leader lines are visible. * + * * @optionValue New value to be set. */ @@ -18798,6 +19894,7 @@ interface JQuery { /** * Gets what type of leader lines will be used for the outside end labels. + * */ igPieChart(optionLiteral: 'option', optionName: "leaderLineType"): string; @@ -18805,6 +19902,7 @@ interface JQuery { /** * Sets what type of leader lines will be used for the outside end labels. * + * * @optionValue New value to be set. */ @@ -19036,6 +20134,7 @@ interface JQuery { /** * Gets the rotational direction of the chart. + * */ igPieChart(optionLiteral: 'option', optionName: "sweepDirection"): string; @@ -19043,6 +20142,7 @@ interface JQuery { /** * Sets the rotational direction of the chart. * + * * @optionValue New value to be set. */ @@ -19152,6 +20252,50 @@ interface JQuery { */ igPieChart(optionLiteral: 'option', optionName: "theme", optionValue: string): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igPieChart(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igPieChart(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igPieChart(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igPieChart(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event fired when the mouse has hovered on an element long enough to display a tooltip * Function takes arguments evt and ui. @@ -19537,6 +20681,24 @@ interface IgChartLegend { */ theme?: string; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Occurs when the left mouse button is pressed while the mouse pointer is over an element of this legend. * Function takes arguments evt and ui. @@ -19607,6 +20769,24 @@ interface IgChartLegendMethods { * Returns the ID of the DOM element holding the legend. */ id(): string; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igChartLegend"): IgChartLegendMethods; @@ -19617,6 +20797,9 @@ interface JQuery { igChartLegend(methodName: "destroy"): void; igChartLegend(methodName: "widget"): void; igChartLegend(methodName: "id"): string; + igChartLegend(methodName: "changeLocale", $container: Object): void; + igChartLegend(methodName: "changeGlobalLanguage"): void; + igChartLegend(methodName: "changeGlobalRegional"): void; /** * Type of the legend. @@ -19672,6 +20855,50 @@ interface JQuery { */ igChartLegend(optionLiteral: 'option', optionName: "theme", optionValue: string): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igChartLegend(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igChartLegend(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igChartLegend(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igChartLegend(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igChartLegend(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igChartLegend(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Occurs when the left mouse button is pressed while the mouse pointer is over an element of this legend. * Function takes arguments evt and ui. @@ -19796,12 +21023,14 @@ interface IgColorPicker { /** * Gets/Sets the default colors. Default colors are the ones displayed in the upper table of the color picker. * The array should contain arrays that contain the color values for every next row. + * */ colors?: string; /** * Gets/Sets the standard colors. Standard colors are the ones displayed in the color picker bottom, * visually separated from the default colors. The array should contain the color values. + * */ standardColors?: any[]; @@ -19869,6 +21098,7 @@ interface JQuery { /** * Gets/Sets the default colors. Default colors are the ones displayed in the upper table of the color picker. * The array should contain arrays that contain the color values for every next row. + * */ igColorPicker(optionLiteral: 'option', optionName: "colors"): string; @@ -19876,6 +21106,7 @@ interface JQuery { * /Sets the default colors. Default colors are the ones displayed in the upper table of the color picker. * The array should contain arrays that contain the color values for every next row. * + * * @optionValue New value to be set. */ igColorPicker(optionLiteral: 'option', optionName: "colors", optionValue: string): void; @@ -19883,6 +21114,7 @@ interface JQuery { /** * Gets/Sets the standard colors. Standard colors are the ones displayed in the color picker bottom, * visually separated from the default colors. The array should contain the color values. + * */ igColorPicker(optionLiteral: 'option', optionName: "standardColors"): any[]; @@ -19890,6 +21122,7 @@ interface JQuery { * /Sets the standard colors. Standard colors are the ones displayed in the color picker bottom, * visually separated from the default colors. The array should contain the color values. * + * * @optionValue New value to be set. */ igColorPicker(optionLiteral: 'option', optionName: "standardColors", optionValue: any[]): void; @@ -19975,26 +21208,31 @@ interface CollapsingEventUIParam { interface IgColorPickerSplitButton { /** * Button items. + * */ items?: any[]; /** * Gets/sets the button default color value. + * */ defaultColor?: string; /** * If this option is set to true, the igColorPickerSplitButton will be rendered with an icon. + * */ hasDefaultIcon?: boolean; /** * Default button item name. + * */ defaultItemName?: string; /** * Specifies whether the default button will be switched when another button is selected. + * */ swapDefaultEnabled?: boolean; @@ -20053,11 +21291,15 @@ interface IgColorPickerSplitButtonMethods { /** * Collapse the widget. + * + * @param e */ collapse(e: Object): Object; /** * Expands the widget. + * + * @param e */ expand(e: Object): Object; @@ -20096,60 +21338,70 @@ interface JQuery { /** * Button items. + * */ igColorPickerSplitButton(optionLiteral: 'option', optionName: "items"): any[]; /** * Button items. * + * * @optionValue New value to be set. */ igColorPickerSplitButton(optionLiteral: 'option', optionName: "items", optionValue: any[]): void; /** * Gets/ the button default color value. + * */ igColorPickerSplitButton(optionLiteral: 'option', optionName: "defaultColor"): string; /** * /sets the button default color value. * + * * @optionValue New value to be set. */ igColorPickerSplitButton(optionLiteral: 'option', optionName: "defaultColor", optionValue: string): void; /** * If this option is set to true, the igColorPickerSplitButton will be rendered with an icon. + * */ igColorPickerSplitButton(optionLiteral: 'option', optionName: "hasDefaultIcon"): boolean; /** * If this option is set to true, the igColorPickerSplitButton will be rendered with an icon. * + * * @optionValue New value to be set. */ igColorPickerSplitButton(optionLiteral: 'option', optionName: "hasDefaultIcon", optionValue: boolean): void; /** * Default button item name. + * */ igColorPickerSplitButton(optionLiteral: 'option', optionName: "defaultItemName"): string; /** * Default button item name. * + * * @optionValue New value to be set. */ igColorPickerSplitButton(optionLiteral: 'option', optionName: "defaultItemName", optionValue: string): void; /** * Gets whether the default button will be switched when another button is selected. + * */ igColorPickerSplitButton(optionLiteral: 'option', optionName: "swapDefaultEnabled"): boolean; /** * Sets whether the default button will be switched when another button is selected. * + * * @optionValue New value to be set. */ igColorPickerSplitButton(optionLiteral: 'option', optionName: "swapDefaultEnabled", optionValue: boolean): void; @@ -20252,21 +21504,25 @@ interface JQuery { interface IgComboLocale { /** * Gets/Sets text of list item for condition when [filteringType](ui.igcombo#options:filteringType) option is enabled and no match was found. + * */ noMatchFoundText?: any; /** * Gets/Sets title for html element which represent the drop-down button. + * */ dropDownButtonTitle?: any; /** * Gets/Sets title for html element which represent the clear button. + * */ clearButtonTitle?: any; /** * Gets/Sets value that is displayed when input field is empty. + * */ placeHolder?: any; @@ -20279,11 +21535,13 @@ interface IgComboLocale { interface IgComboLoadOnDemandSettings { /** * Gets/Sets option to enable load on demand. + * */ enabled?: boolean; /** * Gets/Sets number of records loaded on each request. + * */ pageSize?: number; @@ -20296,21 +21554,25 @@ interface IgComboLoadOnDemandSettings { interface IgComboMultiSelection { /** * Set enabled to true to turn multi selection on. Set to true by default when target element for the combo is a select with the multiple attribute set. + * */ enabled?: boolean; /** * Set addWithKeyModifier to true to disable the additive selection, then additive selection can be done by ctrl + mouse click / enter. + * */ addWithKeyModifier?: boolean; /** * Set showCheckboxes to true to render check boxes in front of each drop down item. + * */ showCheckboxes?: boolean; /** * Use itemSeparator to set what string to be rendered between items in field. + * */ itemSeparator?: string; @@ -20323,12 +21585,14 @@ interface IgComboMultiSelection { interface IgComboGrouping { /** * Gets/Sets name of column by which the records will be grouped. Setting this option enables the grouping. + * */ key?: string; /** * Specifies the sort order - ascending or descending. * + * * Valid values: * "asc" * "desc" @@ -20344,11 +21608,13 @@ interface IgComboGrouping { interface IgComboInitialSelectedItem { /** * Optional="true" Index of item in the list. The index should be greater than -1 and less than the count of the [items](ui.igcombo#methods:items) in the list (rows in dataSource). + * */ index?: number; /** * Optional="true" Value matching the [valueKey](ui.igcombo#options:valueKey) property of the item. + * */ value?: any; @@ -20547,17 +21813,20 @@ interface SelectionChangedEventUIParam { interface IgCombo { /** * Gets/Sets the width of combo. The numeric and string values (valid html units for size) are supported. It includes %, px, em and other units. + * */ width?: string|number; /** * Gets/Sets height of combo. The numeric and string values (valid html units for size) are supported. It includes %, px, em and other units. + * */ height?: string|number; /** * Gets/Sets the width of drop-down list in pixels. * + * * Valid values: * "string" The default drop-down list width can be set in pixels (px). * "number" The default drop-down list width can be set as a number. @@ -20567,33 +21836,39 @@ interface IgCombo { /** * Gets/Sets a valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an [$.ig.DataSource](ig.datasource) itself. * Note: if it is set to string and [dataSourceType](ui.igcombo#options:dataSourceType) option is not set, then [$.ig.JSONDataSource](ig.jsondatasource) is used. + * */ dataSource?: any; /** * Sets data source type (such as "json", "xml", etc). Please refer to the documentation of [$.ig.DataSource](ig.datasource) and its [type](ig.datasource#options:settings.type) property. + * */ dataSourceType?: string; /** * Sets URL which is used for sending JSON on request for remote filtering (MVC for example). That option is required when [load on demand](ui.igcombo#options:loadOnDemandSettings) is * [enabled](ui.igcombo#options:loadOnDemandSettings.enabled) and its [type](ui.igcombo#options:filteringType) is remote. + * */ dataSourceUrl?: string; /** * See [$.ig.DataSource](ig.datasource) property in the response specifying the total number of records on the server. + * */ responseTotalRecCountKey?: string; /** * See [$.ig.DataSource](ig.datasource) This is basically the property in the response where data records are held, if the response is wrapped. + * */ responseDataKey?: string; /** * Response type when a URL is set as the data source. See http://api.jquery.com/jQuery.ajax/ => dataType. * + * * Valid values: * "json" * "xml" @@ -20606,32 +21881,38 @@ interface IgCombo { /** * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType. + * */ responseContentType?: string; /** * Specifies the HTTP verb to be used to issue the request. + * */ requestType?: string; /** * Gets/Sets name of column which contains the "value". If it is missing, then the name of first column will be used. + * */ valueKey?: string; /** * Gets/Sets name of column which contains the displayed text. If it is missing, then [valueKey](ui.igcombo#options:valueKey) option will be used. + * */ textKey?: string; /** * Gets/Sets a template used to render an item in list. The igCombo utilizes igTemplating for generating node content templates. * More info on the templating engine can be found here: http://www.igniteui.com/help/infragistics-templating-engine. + * */ itemTemplate?: string; /** * Gets/Sets template used to render a header in the drop-down list. The template is rendered inside of a DIV html element. + * */ headerTemplate?: string; @@ -20644,33 +21925,39 @@ interface IgCombo { * - {1}: Number of records in dataSource * - {2}: Number of (filtered) records on server * - {3}: Number of all records on server + * */ footerTemplate?: string; /** * Gets/Sets the name of a hidden INPUT element, which is used when submitting data. Its value will be set to the values of the selected items valueKeys separated by ',' character on any change in igCombo. If the combo element has 'name' attribute and this option is not set, the 'name' attribute will be used for the input name. + * */ inputName?: string; /** * Gets/Sets show drop-down list animation duration in milliseconds. + * */ animationShowDuration?: number; /** * Gets/Sets hide drop-down list animation duration in milliseconds. + * */ animationHideDuration?: number; /** * If set to true, the container of the drop-down list is appended to the body. * If set to false, it is appended to the parent element of the combo. + * */ dropDownAttachedToBody?: boolean; /** * Gets/Sets type of filtering.Note: option is set to "remote", then the "css.waitFiltering" is applied to combo and its drop-down list. * + * * Valid values: * "remote" filtering is performed by server * "local" filtering is performed by $.ig.DataSource @@ -20680,12 +21967,14 @@ interface IgCombo { /** * Gets/Sets URL key name that specifies how the remote filtering expressions will be encoded for remote requests, e.g. &filter('col') = startsWith. Default is OData. + * */ filterExprUrlKey?: string; /** * Gets/Sets condition used for filtering.Note: When [autoComplete](ui.igcombo#options:autoComplete) is enabled, the filtering condition is always "startsWith". * + * * Valid values: * "contains" * "doesNotContain" @@ -20703,6 +21992,7 @@ interface IgCombo { /** * Gets/Sets filtering logic. * + * * Valid values: * "OR" * "AND" @@ -20743,6 +22033,7 @@ interface IgCombo { * Notes: * That option has effect only when data is loaded remotely using [dataSourceUrl](ui.igcombo#options:dataSourceUrl). * Selection is supported only for already loaded items. + * */ loadOnDemandSettings?: IgComboLoadOnDemandSettings; @@ -20750,12 +22041,14 @@ interface IgCombo { * Gets/Sets how many items should be shown at once. * Notes: * This option is used for [virtualization](ui.igcombo#options:virtualization) in order to render initial list items. + * */ visibleItemsCount?: number; /** * Sets gets functionality mode. * + * * Valid values: * "editable" Allows to modify value by edit field and drop-down list. * "dropdown" Allows to modify value by drop-down list only. @@ -20767,28 +22060,33 @@ interface IgCombo { /** * Gets/Sets ability to use virtual rendering for drop-down list. Enable to boost performance when combo has lots of records. * If that option is enabled, then only visible items are created and the top edge of the first visible item in list is aligned to the top edge of list. + * */ virtualization?: boolean; /** * Gets/Sets object specifying multi selection feature options. Note showCheckboxes and itemSeparator has effect only if multi selection is enabled. + * */ multiSelection?: IgComboMultiSelection; /** * Gets/Sets object specifying grouping feature options. The option has key and dir properties. + * */ grouping?: IgComboGrouping; /** * Gets/Sets object which contains options supported by [igValidator](ui.igvalidator). * Notes: in order for validator to work, application should ensure that [igValidator](ui.igvalidator) is loaded (ig.ui.validator.js/css files). + * */ validatorOptions?: any; /** * Gets/Sets condition used for highlighting of matching parts in items of drop-down list. * + * * Valid values: * "multi" multiple matches in a single item are rendered * "contains" match at any position in item is rendered @@ -20800,17 +22098,20 @@ interface IgCombo { /** * If set to true, filtering and auto selection will be case-sensitive. + * */ caseSensitive?: boolean; /** * Gets/Sets whether the first matching item should be auto selected when typing in input. When [multiSelection](ui.igcombo#options:multiSelection) is enabled this option will instead put the active item on the matching element. + * */ autoSelectFirstMatch?: boolean; /** * Gets/Sets ability to autocomplete field from first matching item in list. * Note: When autoComplete option is enabled, then "startsWith" is used for [filteringCondition](ui.igcombo#options:filteringCondition). + * */ autoComplete?: boolean; @@ -20818,47 +22119,56 @@ interface IgCombo { * If set to true: * 1. Allows custom value input only with single selection. * 2. Custom values will be auto completed to the closest value if [autoComplete](ui.igcombo#options:autoComplete) is enabled. + * */ allowCustomValue?: boolean; /** * Gets/Sets ability to close drop-down list when control loses focus. + * */ closeDropDownOnBlur?: boolean; /** * Specifies the delay duration before processing the changes in the input. Useful to boost performance by lowering the count of selection, filtering, auto complete and highlighting operations executed on each input change. + * */ delayInputChangeProcessing?: number; /** * Gets/Sets tabIndex for the field of the combo. + * */ tabIndex?: number; /** * Gets/Sets ability to show the drop-down list when the combo is in focus. This option has effect only if the combo is in editable [mode](ui.igcombo#options:mode). + * */ dropDownOnFocus?: boolean; /** * Gets sets ability to close drop-down list when single item in the list is selected with mouse click or enter press. The default value when [multiSelection](ui.igcombo#options:multiSelection) is enabled will be false. This option will not close the drop down when [multiSelection](ui.igcombo#options:multiSelection) is enabled and additive selection is performed. + * */ closeDropDownOnSelect?: boolean; /** * Gets/Sets ability to select items by space button press. + * */ selectItemBySpaceKey?: boolean; /** * Gets/Sets list of items to be selected when the combo is initialized. It should contain array of objects with index or value property, then on initialization the matching items will be selected. If initialSelectedItems are not set, the combo is with single selection and it is in a dropdown, readonly or readonlylist [mode](ui.igcombo#options:mode), the first item will be automatically selected. * Note: Only items loaded on initialization can be selected. When using [load on demand](ui.igCombo#options:loadOnDemandSettings), selecting an item which is not loaded yet will fail. + * */ initialSelectedItems?: IgComboInitialSelectedItem[]; /** * Gets/Sets ability to prevent submitting form on enter key press. + * */ preventSubmitOnEnter?: boolean; @@ -20871,24 +22181,28 @@ interface IgCombo { * Custom values can be something like "currency", "percent", "dateLong", "time", "MMM-dd-yyyy H:mm tt", etc. * * Custom format strings should match the data type in "textKey" column. + * */ format?: string; /** * Gets/Sets whether the onscreen keyboard should be shown when the dropdown button is clicked (touch devices only). * Note: The keyboard will still show when the combo input is focused in editable mode. + * */ suppressKeyboard?: boolean; /** * Specifies whether the clear button should be rendered. * When the [mode](ui.igcombo#options:mode) is single selection, readonly or readonlylist this option will default to false. It can still be enabled when it is specifically set to true. + * */ enableClearButton?: boolean; /** * Gets/Sets drop-down list orientation when open button is clicked. * + * * Valid values: * "auto" if there is enough space, it positions the drop-down list below the combo input, otherwise - above the combo input * "bottom" below the combo input @@ -20896,6 +22210,18 @@ interface IgCombo { */ dropDownOrientation?: string; + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event which is raised after rendering of the combo completes. * @@ -21029,7 +22355,16 @@ interface IgCombo { [optionName: string]: any; } interface IgComboMethods { + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.igcombo#options:language) + * Note that this method is for rare scenarios, see [language](ui.igcombo#options:language) or [locale](ui.igcombo#options:locale) option setter + */ changeLocale(): void; + + /** + * Changes the the regional settings of widget element to the language specified in [options.regional](ui.igcombo#options:regional) + * Note that this method is for rare scenarios, use [regional](ui.igcombo#options:regional) option setter + */ changeRegional(): void; /** @@ -21354,6 +22689,16 @@ interface IgComboMethods { * Destroys the igCombo widget. */ destroy(): Object; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igCombo"): IgComboMethods; @@ -21403,9 +22748,12 @@ interface JQuery { igCombo(methodName: "dropDownOpened"): boolean; igCombo(methodName: "positionDropDown"): Object; igCombo(methodName: "destroy"): Object; + igCombo(methodName: "changeGlobalLanguage"): void; + igCombo(methodName: "changeGlobalRegional"): void; /** * Gets/Sets the width of combo. The numeric and string values (valid html units for size) are supported. It includes %, px, em and other units. + * */ igCombo(optionLiteral: 'option', optionName: "width"): string|number; @@ -21413,6 +22761,7 @@ interface JQuery { /** * /Sets the width of combo. The numeric and string values (valid html units for size) are supported. It includes %, px, em and other units. * + * * @optionValue New value to be set. */ @@ -21420,6 +22769,7 @@ interface JQuery { /** * Gets/Sets height of combo. The numeric and string values (valid html units for size) are supported. It includes %, px, em and other units. + * */ igCombo(optionLiteral: 'option', optionName: "height"): string|number; @@ -21427,6 +22777,7 @@ interface JQuery { /** * /Sets height of combo. The numeric and string values (valid html units for size) are supported. It includes %, px, em and other units. * + * * @optionValue New value to be set. */ @@ -21434,6 +22785,7 @@ interface JQuery { /** * Gets/Sets the width of drop-down list in pixels. + * */ igCombo(optionLiteral: 'option', optionName: "dropDownWidth"): string|number; @@ -21441,6 +22793,7 @@ interface JQuery { /** * /Sets the width of drop-down list in pixels. * + * * @optionValue New value to be set. */ @@ -21449,6 +22802,7 @@ interface JQuery { /** * Gets/Sets a valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an [$.ig.DataSource](ig.datasource) itself. * Note: if it is set to string and [dataSourceType](ui.igcombo#options:dataSourceType) option is not set, then [$.ig.JSONDataSource](ig.jsondatasource) is used. + * */ igCombo(optionLiteral: 'option', optionName: "dataSource"): any; @@ -21456,18 +22810,21 @@ interface JQuery { * /Sets a valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an [$.ig.DataSource](ig.datasource) itself. * Note: if it is set to string and [dataSourceType](ui.igcombo#options:dataSourceType) option is not set, then [$.ig.JSONDataSource](ig.jsondatasource) is used. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; /** * Sets data source type (such as "json", "xml", etc). Please refer to the documentation of [$.ig.DataSource](ig.datasource) and its [type](ig.datasource#options:settings.type) property. + * */ igCombo(optionLiteral: 'option', optionName: "dataSourceType"): string; /** * Sets data source type (such as "json", "xml", etc). Please refer to the documentation of [$.ig.DataSource](ig.datasource) and its [type](ig.datasource#options:settings.type) property. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; @@ -21475,6 +22832,7 @@ interface JQuery { /** * Sets URL which is used for sending JSON on request for remote filtering (MVC for example). That option is required when [load on demand](ui.igcombo#options:loadOnDemandSettings) is * [enabled](ui.igcombo#options:loadOnDemandSettings.enabled) and its [type](ui.igcombo#options:filteringType) is remote. + * */ igCombo(optionLiteral: 'option', optionName: "dataSourceUrl"): string; @@ -21482,36 +22840,42 @@ interface JQuery { * Sets URL which is used for sending JSON on request for remote filtering (MVC for example). That option is required when [load on demand](ui.igcombo#options:loadOnDemandSettings) is * [enabled](ui.igcombo#options:loadOnDemandSettings.enabled) and its [type](ui.igcombo#options:filteringType) is remote. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "dataSourceUrl", optionValue: string): void; /** * See [$.ig.DataSource](ig.datasource) property in the response specifying the total number of records on the server. + * */ igCombo(optionLiteral: 'option', optionName: "responseTotalRecCountKey"): string; /** * See [$.ig.DataSource](ig.datasource) property in the response specifying the total number of records on the server. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "responseTotalRecCountKey", optionValue: string): void; /** * See [$.ig.DataSource](ig.datasource) This is basically the property in the response where data records are held, if the response is wrapped. + * */ igCombo(optionLiteral: 'option', optionName: "responseDataKey"): string; /** * See [$.ig.DataSource](ig.datasource) This is basically the property in the response where data records are held, if the response is wrapped. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; /** * Response type when a URL is set as the data source. See http://api.jquery.com/jQuery.ajax/ => dataType. + * */ igCombo(optionLiteral: 'option', optionName: "responseDataType"): string; @@ -21519,6 +22883,7 @@ interface JQuery { /** * Response type when a URL is set as the data source. See http://api.jquery.com/jQuery.ajax/ => dataType. * + * * @optionValue New value to be set. */ @@ -21526,48 +22891,56 @@ interface JQuery { /** * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType. + * */ igCombo(optionLiteral: 'option', optionName: "responseContentType"): string; /** * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "responseContentType", optionValue: string): void; /** * Specifies the HTTP verb to be used to issue the request. + * */ igCombo(optionLiteral: 'option', optionName: "requestType"): string; /** * Specifies the HTTP verb to be used to issue the request. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "requestType", optionValue: string): void; /** * Gets/Sets name of column which contains the "value". If it is missing, then the name of first column will be used. + * */ igCombo(optionLiteral: 'option', optionName: "valueKey"): string; /** * /Sets name of column which contains the "value". If it is missing, then the name of first column will be used. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "valueKey", optionValue: string): void; /** * Gets/Sets name of column which contains the displayed text. If it is missing, then [valueKey](ui.igcombo#options:valueKey) option will be used. + * */ igCombo(optionLiteral: 'option', optionName: "textKey"): string; /** * /Sets name of column which contains the displayed text. If it is missing, then [valueKey](ui.igcombo#options:valueKey) option will be used. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "textKey", optionValue: string): void; @@ -21575,6 +22948,7 @@ interface JQuery { /** * Gets/Sets a template used to render an item in list. The igCombo utilizes igTemplating for generating node content templates. * More info on the templating engine can be found here: http://www.igniteui.com/help/infragistics-templating-engine. + * */ igCombo(optionLiteral: 'option', optionName: "itemTemplate"): string; @@ -21582,18 +22956,21 @@ interface JQuery { * /Sets a template used to render an item in list. The igCombo utilizes igTemplating for generating node content templates. * More info on the templating engine can be found here: http://www.igniteui.com/help/infragistics-templating-engine. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "itemTemplate", optionValue: string): void; /** * Gets/Sets template used to render a header in the drop-down list. The template is rendered inside of a DIV html element. + * */ igCombo(optionLiteral: 'option', optionName: "headerTemplate"): string; /** * /Sets template used to render a header in the drop-down list. The template is rendered inside of a DIV html element. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "headerTemplate", optionValue: string): void; @@ -21607,6 +22984,7 @@ interface JQuery { * - {1}: Number of records in dataSource * - {2}: Number of (filtered) records on server * - {3}: Number of all records on server + * */ igCombo(optionLiteral: 'option', optionName: "footerTemplate"): string; @@ -21620,42 +22998,49 @@ interface JQuery { * - {2}: Number of (filtered) records on server * - {3}: Number of all records on server * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "footerTemplate", optionValue: string): void; /** * Gets/Sets the name of a hidden INPUT element, which is used when submitting data. Its value will be set to the values of the selected items valueKeys separated by ',' character on any change in igCombo. If the combo element has 'name' attribute and this option is not set, the 'name' attribute will be used for the input name. + * */ igCombo(optionLiteral: 'option', optionName: "inputName"): string; /** * /Sets the name of a hidden INPUT element, which is used when submitting data. Its value will be set to the values of the selected items valueKeys separated by ',' character on any change in igCombo. If the combo element has 'name' attribute and this option is not set, the 'name' attribute will be used for the input name. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; /** * Gets/Sets show drop-down list animation duration in milliseconds. + * */ igCombo(optionLiteral: 'option', optionName: "animationShowDuration"): number; /** * /Sets show drop-down list animation duration in milliseconds. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "animationShowDuration", optionValue: number): void; /** * Gets/Sets hide drop-down list animation duration in milliseconds. + * */ igCombo(optionLiteral: 'option', optionName: "animationHideDuration"): number; /** * /Sets hide drop-down list animation duration in milliseconds. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "animationHideDuration", optionValue: number): void; @@ -21663,6 +23048,7 @@ interface JQuery { /** * If set to true, the container of the drop-down list is appended to the body. * If set to false, it is appended to the parent element of the combo. + * */ igCombo(optionLiteral: 'option', optionName: "dropDownAttachedToBody"): boolean; @@ -21670,12 +23056,14 @@ interface JQuery { * If set to true, the container of the drop-down list is appended to the body. * If set to false, it is appended to the parent element of the combo. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "dropDownAttachedToBody", optionValue: boolean): void; /** * Gets/Sets type of filtering.Note: option is set to "remote", then the "css.waitFiltering" is applied to combo and its drop-down list. + * */ igCombo(optionLiteral: 'option', optionName: "filteringType"): string; @@ -21683,6 +23071,7 @@ interface JQuery { /** * /Sets type of filtering.Note: option is set to "remote", then the "css.waitFiltering" is applied to combo and its drop-down list. * + * * @optionValue New value to be set. */ @@ -21690,18 +23079,21 @@ interface JQuery { /** * Gets/Sets URL key name that specifies how the remote filtering expressions will be encoded for remote requests, e.g. &filter('col') = startsWith. Default is OData. + * */ igCombo(optionLiteral: 'option', optionName: "filterExprUrlKey"): string; /** * /Sets URL key name that specifies how the remote filtering expressions will be encoded for remote requests, e.g. &filter('col') = startsWith. Default is OData. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "filterExprUrlKey", optionValue: string): void; /** * Gets/Sets condition used for filtering.Note: When [autoComplete](ui.igcombo#options:autoComplete) is enabled, the filtering condition is always "startsWith". + * */ igCombo(optionLiteral: 'option', optionName: "filteringCondition"): string; @@ -21709,6 +23101,7 @@ interface JQuery { /** * /Sets condition used for filtering.Note: When [autoComplete](ui.igcombo#options:autoComplete) is enabled, the filtering condition is always "startsWith". * + * * @optionValue New value to be set. */ @@ -21716,6 +23109,7 @@ interface JQuery { /** * Gets/Sets filtering logic. + * */ igCombo(optionLiteral: 'option', optionName: "filteringLogic"): string; @@ -21723,6 +23117,7 @@ interface JQuery { /** * /Sets filtering logic. * + * * @optionValue New value to be set. */ @@ -21799,6 +23194,7 @@ interface JQuery { * Notes: * That option has effect only when data is loaded remotely using [dataSourceUrl](ui.igcombo#options:dataSourceUrl). * Selection is supported only for already loaded items. + * */ igCombo(optionLiteral: 'option', optionName: "loadOnDemandSettings"): IgComboLoadOnDemandSettings; @@ -21808,6 +23204,7 @@ interface JQuery { * That option has effect only when data is loaded remotely using [dataSourceUrl](ui.igcombo#options:dataSourceUrl). * Selection is supported only for already loaded items. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "loadOnDemandSettings", optionValue: IgComboLoadOnDemandSettings): void; @@ -21816,6 +23213,7 @@ interface JQuery { * Gets/Sets how many items should be shown at once. * Notes: * This option is used for [virtualization](ui.igcombo#options:virtualization) in order to render initial list items. + * */ igCombo(optionLiteral: 'option', optionName: "visibleItemsCount"): number; @@ -21824,12 +23222,14 @@ interface JQuery { * Notes: * This option is used for [virtualization](ui.igcombo#options:virtualization) in order to render initial list items. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "visibleItemsCount", optionValue: number): void; /** * Sets gets functionality mode. + * */ igCombo(optionLiteral: 'option', optionName: "mode"): string; @@ -21837,6 +23237,7 @@ interface JQuery { /** * Sets gets functionality mode. * + * * @optionValue New value to be set. */ @@ -21845,6 +23246,7 @@ interface JQuery { /** * Gets/Sets ability to use virtual rendering for drop-down list. Enable to boost performance when combo has lots of records. * If that option is enabled, then only visible items are created and the top edge of the first visible item in list is aligned to the top edge of list. + * */ igCombo(optionLiteral: 'option', optionName: "virtualization"): boolean; @@ -21852,30 +23254,35 @@ interface JQuery { * /Sets ability to use virtual rendering for drop-down list. Enable to boost performance when combo has lots of records. * If that option is enabled, then only visible items are created and the top edge of the first visible item in list is aligned to the top edge of list. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "virtualization", optionValue: boolean): void; /** * Gets/Sets object specifying multi selection feature options. Note showCheckboxes and itemSeparator has effect only if multi selection is enabled. + * */ igCombo(optionLiteral: 'option', optionName: "multiSelection"): IgComboMultiSelection; /** * /Sets object specifying multi selection feature options. Note showCheckboxes and itemSeparator has effect only if multi selection is enabled. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "multiSelection", optionValue: IgComboMultiSelection): void; /** * Gets/Sets object specifying grouping feature options. The option has key and dir properties. + * */ igCombo(optionLiteral: 'option', optionName: "grouping"): IgComboGrouping; /** * /Sets object specifying grouping feature options. The option has key and dir properties. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "grouping", optionValue: IgComboGrouping): void; @@ -21883,6 +23290,7 @@ interface JQuery { /** * Gets/Sets object which contains options supported by [igValidator](ui.igvalidator). * Notes: in order for validator to work, application should ensure that [igValidator](ui.igvalidator) is loaded (ig.ui.validator.js/css files). + * */ igCombo(optionLiteral: 'option', optionName: "validatorOptions"): any; @@ -21890,12 +23298,14 @@ interface JQuery { * /Sets object which contains options supported by [igValidator](ui.igvalidator). * Notes: in order for validator to work, application should ensure that [igValidator](ui.igvalidator) is loaded (ig.ui.validator.js/css files). * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; /** * Gets/Sets condition used for highlighting of matching parts in items of drop-down list. + * */ igCombo(optionLiteral: 'option', optionName: "highlightMatchesMode"): string; @@ -21903,6 +23313,7 @@ interface JQuery { /** * /Sets condition used for highlighting of matching parts in items of drop-down list. * + * * @optionValue New value to be set. */ @@ -21910,24 +23321,28 @@ interface JQuery { /** * If set to true, filtering and auto selection will be case-sensitive. + * */ igCombo(optionLiteral: 'option', optionName: "caseSensitive"): boolean; /** * If set to true, filtering and auto selection will be case-sensitive. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "caseSensitive", optionValue: boolean): void; /** * Gets/Sets whether the first matching item should be auto selected when typing in input. When [multiSelection](ui.igcombo#options:multiSelection) is enabled this option will instead put the active item on the matching element. + * */ igCombo(optionLiteral: 'option', optionName: "autoSelectFirstMatch"): boolean; /** * /Sets whether the first matching item should be auto selected when typing in input. When [multiSelection](ui.igcombo#options:multiSelection) is enabled this option will instead put the active item on the matching element. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "autoSelectFirstMatch", optionValue: boolean): void; @@ -21935,6 +23350,7 @@ interface JQuery { /** * Gets/Sets ability to autocomplete field from first matching item in list. * Note: When autoComplete option is enabled, then "startsWith" is used for [filteringCondition](ui.igcombo#options:filteringCondition). + * */ igCombo(optionLiteral: 'option', optionName: "autoComplete"): boolean; @@ -21942,6 +23358,7 @@ interface JQuery { * /Sets ability to autocomplete field from first matching item in list. * Note: When autoComplete option is enabled, then "startsWith" is used for [filteringCondition](ui.igcombo#options:filteringCondition). * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "autoComplete", optionValue: boolean): void; @@ -21950,6 +23367,7 @@ interface JQuery { * If set to true: * 1. Allows custom value input only with single selection. * 2. Custom values will be auto completed to the closest value if [autoComplete](ui.igcombo#options:autoComplete) is enabled. + * */ igCombo(optionLiteral: 'option', optionName: "allowCustomValue"): boolean; @@ -21958,78 +23376,91 @@ interface JQuery { * 1. Allows custom value input only with single selection. * 2. Custom values will be auto completed to the closest value if [autoComplete](ui.igcombo#options:autoComplete) is enabled. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "allowCustomValue", optionValue: boolean): void; /** * Gets/Sets ability to close drop-down list when control loses focus. + * */ igCombo(optionLiteral: 'option', optionName: "closeDropDownOnBlur"): boolean; /** * /Sets ability to close drop-down list when control loses focus. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "closeDropDownOnBlur", optionValue: boolean): void; /** * Gets the delay duration before processing the changes in the input. Useful to boost performance by lowering the count of selection, filtering, auto complete and highlighting operations executed on each input change. + * */ igCombo(optionLiteral: 'option', optionName: "delayInputChangeProcessing"): number; /** * Sets the delay duration before processing the changes in the input. Useful to boost performance by lowering the count of selection, filtering, auto complete and highlighting operations executed on each input change. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "delayInputChangeProcessing", optionValue: number): void; /** * Gets/Sets tabIndex for the field of the combo. + * */ igCombo(optionLiteral: 'option', optionName: "tabIndex"): number; /** * /Sets tabIndex for the field of the combo. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; /** * Gets/Sets ability to show the drop-down list when the combo is in focus. This option has effect only if the combo is in editable [mode](ui.igcombo#options:mode). + * */ igCombo(optionLiteral: 'option', optionName: "dropDownOnFocus"): boolean; /** * /Sets ability to show the drop-down list when the combo is in focus. This option has effect only if the combo is in editable [mode](ui.igcombo#options:mode). * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "dropDownOnFocus", optionValue: boolean): void; /** * Gets ability to close drop-down list when single item in the list is selected with mouse click or enter press. The default value when [multiSelection](ui.igcombo#options:multiSelection) is enabled will be false. This option will not close the drop down when [multiSelection](ui.igcombo#options:multiSelection) is enabled and additive selection is performed. + * */ igCombo(optionLiteral: 'option', optionName: "closeDropDownOnSelect"): boolean; /** * Sets ability to close drop-down list when single item in the list is selected with mouse click or enter press. The default value when [multiSelection](ui.igcombo#options:multiSelection) is enabled will be false. This option will not close the drop down when [multiSelection](ui.igcombo#options:multiSelection) is enabled and additive selection is performed. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "closeDropDownOnSelect", optionValue: boolean): void; /** * Gets/Sets ability to select items by space button press. + * */ igCombo(optionLiteral: 'option', optionName: "selectItemBySpaceKey"): boolean; /** * /Sets ability to select items by space button press. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "selectItemBySpaceKey", optionValue: boolean): void; @@ -22037,6 +23468,7 @@ interface JQuery { /** * Gets/Sets list of items to be selected when the combo is initialized. It should contain array of objects with index or value property, then on initialization the matching items will be selected. If initialSelectedItems are not set, the combo is with single selection and it is in a dropdown, readonly or readonlylist [mode](ui.igcombo#options:mode), the first item will be automatically selected. * Note: Only items loaded on initialization can be selected. When using [load on demand](ui.igCombo#options:loadOnDemandSettings), selecting an item which is not loaded yet will fail. + * */ igCombo(optionLiteral: 'option', optionName: "initialSelectedItems"): IgComboInitialSelectedItem[]; @@ -22044,18 +23476,21 @@ interface JQuery { * /Sets list of items to be selected when the combo is initialized. It should contain array of objects with index or value property, then on initialization the matching items will be selected. If initialSelectedItems are not set, the combo is with single selection and it is in a dropdown, readonly or readonlylist [mode](ui.igcombo#options:mode), the first item will be automatically selected. * Note: Only items loaded on initialization can be selected. When using [load on demand](ui.igCombo#options:loadOnDemandSettings), selecting an item which is not loaded yet will fail. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "initialSelectedItems", optionValue: IgComboInitialSelectedItem[]): void; /** * Gets/Sets ability to prevent submitting form on enter key press. + * */ igCombo(optionLiteral: 'option', optionName: "preventSubmitOnEnter"): boolean; /** * /Sets ability to prevent submitting form on enter key press. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "preventSubmitOnEnter", optionValue: boolean): void; @@ -22069,6 +23504,7 @@ interface JQuery { * Custom values can be something like "currency", "percent", "dateLong", "time", "MMM-dd-yyyy H:mm tt", etc. * * Custom format strings should match the data type in "textKey" column. + * */ igCombo(optionLiteral: 'option', optionName: "format"): string; @@ -22082,6 +23518,7 @@ interface JQuery { * * Custom format strings should match the data type in "textKey" column. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "format", optionValue: string): void; @@ -22089,6 +23526,7 @@ interface JQuery { /** * Gets/Sets whether the onscreen keyboard should be shown when the dropdown button is clicked (touch devices only). * Note: The keyboard will still show when the combo input is focused in editable mode. + * */ igCombo(optionLiteral: 'option', optionName: "suppressKeyboard"): boolean; @@ -22096,6 +23534,7 @@ interface JQuery { * /Sets whether the onscreen keyboard should be shown when the dropdown button is clicked (touch devices only). * Note: The keyboard will still show when the combo input is focused in editable mode. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "suppressKeyboard", optionValue: boolean): void; @@ -22103,6 +23542,7 @@ interface JQuery { /** * Gets whether the clear button should be rendered. * When the [mode](ui.igcombo#options:mode) is single selection, readonly or readonlylist this option will default to false. It can still be enabled when it is specifically set to true. + * */ igCombo(optionLiteral: 'option', optionName: "enableClearButton"): boolean; @@ -22110,12 +23550,14 @@ interface JQuery { * Sets whether the clear button should be rendered. * When the [mode](ui.igcombo#options:mode) is single selection, readonly or readonlylist this option will default to false. It can still be enabled when it is specifically set to true. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "enableClearButton", optionValue: boolean): void; /** * Gets/Sets drop-down list orientation when open button is clicked. + * */ igCombo(optionLiteral: 'option', optionName: "dropDownOrientation"): string; @@ -22123,11 +23565,42 @@ interface JQuery { /** * /Sets drop-down list orientation when open button is clicked. * + * * @optionValue New value to be set. */ igCombo(optionLiteral: 'option', optionName: "dropDownOrientation", optionValue: string): void; + /** + * Set/Get the locale language setting for the widget. + * + */ + igCombo(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igCombo(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igCombo(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igCombo(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event which is raised after rendering of the combo completes. * @@ -22416,31 +23889,37 @@ interface JQuery { interface IgDialogLocale { /** * Gets/Sets the title/tooltip for the close button in the dialog. + * */ closeButtonTitle?: string; /** * Gets/Sets the title/tooltip for the minimize button in the dialog. + * */ minimizeButtonTitle?: string; /** * Gets/Sets the title/tooltip for the maximize button in the dialog. + * */ maximizeButtonTitle?: string; /** * Gets/Sets the title/tooltip for the pin button in the dialog. + * */ pinButtonTitle?: string; /** * Gets/Sets the title/tooltip for the pin button in the dialog. + * */ unpinButtonTitle?: string; /** * Gets/Sets the title/tooltip for the restore button in the dialog. + * */ restoreButtonTitle?: string; @@ -22456,29 +23935,29 @@ interface StateChangingEvent { interface StateChangingEventUIParam { /** - * Used to obtain a reference to the igDialog. + * Gets a reference to the igDialog widget. */ owner?: any; /** - * Used ton to obtain the name of the button, which triggered the event. Note: if the state was modified from the code, then "button" is undefined. + * Gets the name of the button, which triggered the event. Note: if the state was modified from the code, then "button" is undefined. */ - button?: any; + button?: string; /** - * Used to obtain the old state of the dialog, which can be one of the following: "opened", "minimized", "maximized", "closed". + * Gets the old state of the dialog, which can be one of the following: "opened", "minimized", "maximized", "closed". */ - oldState?: any; + oldState?: string; /** - * Used to obtain the boolean value of the old pin state of the dialog. + * Gets the boolean value of the old pin state of the dialog. */ - oldPinned?: any; + oldPinned?: boolean; /** - * Used to obtain the name of the action. That can be one of the following: + * Gets the name of the action. That can be one of the following: "open" - request to open the dialog. "close" - request to close the dialog. "minimize" - request to minimize the dialog. "maximize" - request to maximize the dialog. "restore" - request to restore the dialog from minimized or maximized state. "pin" - request to pin the dialog. "unpin" - request to unpin the dialog. */ - action?: any; + action?: string; } interface StateChangedEvent { @@ -22487,29 +23966,29 @@ interface StateChangedEvent { interface StateChangedEventUIParam { /** - * Used to obtain a reference to the igDialog. + * Gets a reference to the igDialog widget. */ owner?: any; /** - * Used ton to obtain the name of the button, which triggered the event. Note: if the state was modified from the code, then "button" is undefined. + * Gets the name of the button, which triggered the event. Note: if the state was modified from the code, then "button" is undefined. */ - button?: any; + button?: string; /** - * Used to obtain the old state of the dialog, which can be one of the following: "opened", "minimized", "maximized", "closed". + * Gets the old state of the dialog, which can be one of the following: "opened", "minimized", "maximized", "closed". */ - oldState?: any; + oldState?: string; /** - * Used to obtain the boolean value of the old pin state of the dialog. + * Gets the boolean value of the old pin state of the dialog. */ - oldPinned?: any; + oldPinned?: boolean; /** - * Used to obtain the name of the action. That can be one of the following: + * Gets the name of the action. That can be one of the following: "open" - the dialog was opened. Note: the event is raised before a possible "openAnimation" started. "close" - the dialog was closed. Note: the event is raised before a possible "closeAnimation" started. "minimize" - the dialog was minimized. "maximize" - the dialog was maximized. "restore" - the dialog was restored from minimized or maximized state. "pin" - the dialog was pinned. "unpin" - the dialog was unpinned. */ - action?: any; + action?: string; } interface AnimationEndedEvent { @@ -22518,14 +23997,29 @@ interface AnimationEndedEvent { interface AnimationEndedEventUIParam { /** - * Used to obtain a reference to the igDialog. + * Gets a reference to the igDialog widget. */ owner?: any; /** - * Used to obtain the name of the action, which triggered the animation. + * Gets the name of the button, which triggered the event. Note: if the state was modified from the code, then "button" is undefined. */ - action?: any; + button?: string; + + /** + * Gets the old state of the dialog, which can be one of the following: "opened", "minimized", "maximized", "closed". + */ + oldState?: string; + + /** + * Gets the boolean value of the old pin state of the dialog. + */ + oldPinned?: boolean; + + /** + * Gets the name of the action, which triggered the animation. + */ + action?: string; } interface IgFocusEvent { @@ -22534,7 +24028,7 @@ interface IgFocusEvent { interface IgFocusEventUIParam { /** - * Used to obtain a reference to the igDialog. + * Gets a reference to the igDialog widget. */ owner?: any; } @@ -22545,7 +24039,7 @@ interface BlurEvent { interface BlurEventUIParam { /** - * Used to obtain a reference to the igDialog. + * Gets a reference to the igDialog widget. */ owner?: any; } @@ -22558,12 +24052,14 @@ interface IgDialog { * 2. It should not have parent. * 3. It should not contain attributes which might destroy layout or appearance of the dialog. * 4. Change of that option is not supported. + * */ mainElement?: Element; /** * Gets/Sets the state of the dialog.Note: when the dialog is modal, then pinned and minimized states are not supported, because that will trigger misbehavior. * + * * Valid values: * "opened" The dialog is opened. * "minimized" The dialog is minimized. @@ -22579,66 +24075,79 @@ interface IgDialog { * Notes: * 1. If the parent element of the original target-element is invisible, then the pinned dialog becomes invisible as well. * 2. Pinned state is not supported for modal dialog. + * */ pinned?: boolean; /** * Gets/Sets whether the dialog should close when Esc key is pressed. + * */ closeOnEscape?: boolean; /** * Gets/Sets whether the close button in the dialog header should be visible. + * */ showCloseButton?: boolean; /** * Gets/Sets whether the maximize button in the dialog header should be visible. + * */ showMaximizeButton?: boolean; /** * Gets/Sets whether the minimize button in the dialog header should be visible. + * */ showMinimizeButton?: boolean; /** * Gets/Sets whether the pin button in the dialog header should be visible. + * */ showPinButton?: boolean; /** * Gets/Sets whether the dialog will be pinned on minimize. + * */ pinOnMinimized?: boolean; /** * Gets the name of the css class which is applied to the SPAN element located on the left side of the header. + * */ imageClass?: string; /** * Gets/Sets the text which appears in the header of the dialog. + * */ headerText?: string; /** * Gets/Sets whether the dialog header should be visible. + * */ showHeader?: boolean; /** * Gets/Sets whether the dialog footer should be visible. + * */ showFooter?: boolean; /** * Gets/Sets the text which appears in the footer of the dialog. + * */ footerText?: string; /** * Gets the name of the css class which is applied to the main DIV element of the dialog. + * */ dialogClass?: string; @@ -22647,74 +24156,88 @@ interface IgDialog { * That can be reference to html element, jquery selector or jquery object. * By default the parent form of the original target element is used. If a form is not found, then the body is used. * Note: If the "position" of the container is not set or it is "static", then the position is set to "relative". + * */ container?: any; /** * Gets/Sets the initial height of the dialog in pixels for normal state.Besides numeric values, following units are supported: "px", "em" and "%". * In case of "%", the size of browser window is used and it has effect only on open action. + * */ height?: number|string; /** * Gets/Sets the initial width of the dialog in pixels for normal state.Besides numeric values, following units are supported: "px", "em" and "%". * In case of "%", the size of browser window is used and it has effect only on open action. + * */ width?: number|string; /** * Gets/Sets the minimal height of the dialog in normal state. + * */ minHeight?: number; /** * Gets/Sets the minimal width of the dialog in normal state. + * */ minWidth?: number; /** * Gets/Sets the maximal height of the dialog in normal state. Note: that option has effect only while resizing the dialog by the end user. + * */ maxHeight?: number; /** * Gets/Sets the maximal width of the dialog in normal state. Note: that option has effect only while resizing the dialog by the end user. + * */ maxWidth?: number; /** * Gets/Sets whether the dialog can be dragged by the user. + * */ draggable?: boolean; /** * Gets/Sets the initial position of the dialog. That should be an object, which contains "top" and "left" members or an object * supported by jquery.position(param) method. Examples: { left: 100, top: 200 }, { my: "left top", at: "left top", offset: "100 200" } + * */ position?: any; /** * Gets/Sets whether the dialog can be resized by the user. + * */ resizable?: boolean; /** * Gets/Sets the value for the tabIndex attribute applied to the main html element of the dialog. + * */ tabIndex?: number; /** * Gets/Sets the animation applied to the dialog when it is opened. That can be any object supported by the jquery show(param) method. + * */ openAnimation?: any; /** * Gets/Sets the animation applied to the dialog when it is closed. That can be any object supported by the jquery hide(param) method. + * */ closeAnimation?: any; /** * Gets/Sets the value of zIndex applied to the main html element of the dialog. If value is not set, then 1000 is used. + * */ zIndex?: number; @@ -22722,6 +24245,7 @@ interface IgDialog { * Gets/Sets the modal state of the dialog. * If there are more than 1 modal igDialog, then the last opened dialog wins and becomes on the top. * Note: the modal functionality is not supported when the dialog is minimized or pinned, because that will trigger misbehavior. + * */ modal?: boolean; @@ -22731,6 +24255,7 @@ interface IgDialog { * If that option is enabled, then focus and blur event handlers are added to all the child elements of the dialog. * If the dialog is modal or it can be maximized, then it is not recommended to disable that option. * If that option is modified after the igDialog was already created, then depending on current state of the dialog, it will be temporary closed-opened or opened-closed. + * */ trackFocus?: boolean; @@ -22773,11 +24298,13 @@ interface IgDialog { /** * Gets/Sets the temporary value for src, which is used while changing the parent of the base element if it is an instance of IFRAME. That allows getting around possible JavaScript exceptions under IE. + * */ temporaryUrl?: string; /** * Gets/Sets the ability to adjust the state of the header depending on focused and not-focused states. Note: the "trackFocus" option should be enabled. + * */ enableHeaderFocus?: boolean; @@ -22785,76 +24312,45 @@ interface IgDialog { * Gets/Sets the processing of the double-click on the dialog-header.If this option is not false and dialog was minimized, then its state will be set to normal. * If this option is set to "auto" and showMaximizeButton is enabled or if this option is set to true, then the dialog will be maximized when it was in normal state, * and dialog-state will be set to normal if it was maximized. + * */ enableDblclick?: any; /** - * Event which is raised before the state of dialog was changed. - * Return false in order to cancel action. + * Set/Get the locale language setting for the widget. * - * The function takes arguments "evt" and "ui". - * Use evt to obtain the browser event. That parameter can be null if the state was modified from the code. - * Use ui.owner to obtain a reference to the igDialog. - * Use ui.button to obtain the name of the button, which triggered the event. Note: if the state was modified from the code, then "button" is undefined. - * Use ui.oldState to obtain the old state of the dialog, which can be one of the following: "opened", "minimized", "maximized", "closed". - * Use ui.oldPinned to obtain the boolean value of the old pin state of the dialog. - * Use ui.action to obtain the name of the action. That can be one of the following: - * "open" - request to open the dialog - * "close" - request to close the dialog - * "minimize" - request to minimize the dialog - * "maximize" - request to maximize the dialog - * "restore" - request to restore the dialog from minimized or maximized state - * "pin" - request to pin the dialog - * "unpin" - request to unpin the dialog + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + + /** + * Event which is raised before the state of the dialog was changed. + * Return false in order to cancel the action. */ stateChanging?: StateChangingEvent; /** * Event which is raised after the state of the dialog was changed. - * - * The function takes arguments "evt" and "ui". - * Use evt to obtain the browser event. That parameter can be null if the state was modified from the code. - * Use ui.owner to obtain a reference to the igDialog. - * Use ui.button to obtain the name of the button, which triggered the event. Note: if the state was modified from the code, then "button" is undefined. - * Use ui.oldState to obtain the old state of the dialog, which can be one of the following: "opened", "minimized", "maximized", "closed". - * Use ui.oldPinned to obtain the boolean value of the old pin state of the dialog. - * Use ui.action to obtain the name of the action. That can be one of the following: - * "open" - the dialog was opened. Note: the event is raised before a possible "openAnimation" started. - * "close" - the dialog was closed. Note: the event is raised before a possible "closeAnimation" started. - * "minimize" - the dialog was minimized - * "maximize" - the dialog was maximized - * "restore" - the dialog was restored from minimized or maximized state - * "pin" - the dialog was pinned - * "unpin" - the dialog was unpinned */ stateChanged?: StateChangedEvent; /** - * Event which is raised after the end of the animation when the dialod was closed or opened. - * - * The function takes arguments "evt" and "ui". - * Use ui.owner to obtain a reference to the igDialog. - * Use ui.action to obtain the name of the action, which triggered the animation. - * "open" - the dialog was opened - * "close" - the dialog was closed + * Event which is raised after the end of the animation when the dialog was closed or opened. */ animationEnded?: AnimationEndedEvent; /** * Event which is raised when the dialog or its content gets focus. - * - * The function takes arguments "evt" and "ui". - * Use evt to obtain the browser event. - * Use ui.owner to obtain a reference to the igDialog. */ focus?: IgFocusEvent; /** * Event which is raised when the dialog or its content loses focus. - * - * The function takes arguments "evt" and "ui". - * Use evt to obtain the browser event. - * Use ui.owner to obtain a reference to the igDialog. */ blur?: BlurEvent; @@ -22957,7 +24453,22 @@ interface IgDialogMethods { * @param newContent The new html content provided as a string. If the parameter is provided then the method acts as a setter. */ content(newContent?: string): Object; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.igdialog#options:language) + * Note that this method is for rare scenarios, see [language](ui.igdialog#options:language) or [locale](ui.igdialog#options:locale) option setter + */ changeLocale(): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igDialog"): IgDialogMethods; @@ -22979,6 +24490,8 @@ interface JQuery { igDialog(methodName: "moveToTop", e?: Object): Object; igDialog(methodName: "content", newContent?: string): Object; igDialog(methodName: "changeLocale"): void; + igDialog(methodName: "changeGlobalLanguage"): void; + igDialog(methodName: "changeGlobalRegional"): void; /** * Gets the jquery DIV object which is used as the main container for the dialog. @@ -22987,6 +24500,7 @@ interface JQuery { * 2. It should not have parent. * 3. It should not contain attributes which might destroy layout or appearance of the dialog. * 4. Change of that option is not supported. + * */ igDialog(optionLiteral: 'option', optionName: "mainElement"): Element; @@ -22998,12 +24512,14 @@ interface JQuery { * 3. It should not contain attributes which might destroy layout or appearance of the dialog. * 4. Change of that option is not supported. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "mainElement", optionValue: Element): void; /** * Gets/Sets the state of the dialog.Note: when the dialog is modal, then pinned and minimized states are not supported, because that will trigger misbehavior. + * */ igDialog(optionLiteral: 'option', optionName: "state"): string; @@ -23011,6 +24527,7 @@ interface JQuery { /** * /Sets the state of the dialog.Note: when the dialog is modal, then pinned and minimized states are not supported, because that will trigger misbehavior. * + * * @optionValue New value to be set. */ @@ -23023,6 +24540,7 @@ interface JQuery { * Notes: * 1. If the parent element of the original target-element is invisible, then the pinned dialog becomes invisible as well. * 2. Pinned state is not supported for modal dialog. + * */ igDialog(optionLiteral: 'option', optionName: "pinned"): boolean; @@ -23034,150 +24552,175 @@ interface JQuery { * 1. If the parent element of the original target-element is invisible, then the pinned dialog becomes invisible as well. * 2. Pinned state is not supported for modal dialog. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "pinned", optionValue: boolean): void; /** * Gets/Sets whether the dialog should close when Esc key is pressed. + * */ igDialog(optionLiteral: 'option', optionName: "closeOnEscape"): boolean; /** * /Sets whether the dialog should close when Esc key is pressed. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "closeOnEscape", optionValue: boolean): void; /** * Gets/Sets whether the close button in the dialog header should be visible. + * */ igDialog(optionLiteral: 'option', optionName: "showCloseButton"): boolean; /** * /Sets whether the close button in the dialog header should be visible. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "showCloseButton", optionValue: boolean): void; /** * Gets/Sets whether the maximize button in the dialog header should be visible. + * */ igDialog(optionLiteral: 'option', optionName: "showMaximizeButton"): boolean; /** * /Sets whether the maximize button in the dialog header should be visible. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "showMaximizeButton", optionValue: boolean): void; /** * Gets/Sets whether the minimize button in the dialog header should be visible. + * */ igDialog(optionLiteral: 'option', optionName: "showMinimizeButton"): boolean; /** * /Sets whether the minimize button in the dialog header should be visible. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "showMinimizeButton", optionValue: boolean): void; /** * Gets/Sets whether the pin button in the dialog header should be visible. + * */ igDialog(optionLiteral: 'option', optionName: "showPinButton"): boolean; /** * /Sets whether the pin button in the dialog header should be visible. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "showPinButton", optionValue: boolean): void; /** * Gets/Sets whether the dialog will be pinned on minimize. + * */ igDialog(optionLiteral: 'option', optionName: "pinOnMinimized"): boolean; /** * /Sets whether the dialog will be pinned on minimize. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "pinOnMinimized", optionValue: boolean): void; /** * Gets the name of the css class which is applied to the SPAN element located on the left side of the header. + * */ igDialog(optionLiteral: 'option', optionName: "imageClass"): string; /** * The name of the css class which is applied to the SPAN element located on the left side of the header. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "imageClass", optionValue: string): void; /** * Gets/Sets the text which appears in the header of the dialog. + * */ igDialog(optionLiteral: 'option', optionName: "headerText"): string; /** * /Sets the text which appears in the header of the dialog. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "headerText", optionValue: string): void; /** * Gets/Sets whether the dialog header should be visible. + * */ igDialog(optionLiteral: 'option', optionName: "showHeader"): boolean; /** * /Sets whether the dialog header should be visible. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "showHeader", optionValue: boolean): void; /** * Gets/Sets whether the dialog footer should be visible. + * */ igDialog(optionLiteral: 'option', optionName: "showFooter"): boolean; /** * /Sets whether the dialog footer should be visible. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "showFooter", optionValue: boolean): void; /** * Gets/Sets the text which appears in the footer of the dialog. + * */ igDialog(optionLiteral: 'option', optionName: "footerText"): string; /** * /Sets the text which appears in the footer of the dialog. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "footerText", optionValue: string): void; /** * Gets the name of the css class which is applied to the main DIV element of the dialog. + * */ igDialog(optionLiteral: 'option', optionName: "dialogClass"): string; /** * The name of the css class which is applied to the main DIV element of the dialog. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "dialogClass", optionValue: string): void; @@ -23187,6 +24730,7 @@ interface JQuery { * That can be reference to html element, jquery selector or jquery object. * By default the parent form of the original target element is used. If a form is not found, then the body is used. * Note: If the "position" of the container is not set or it is "static", then the position is set to "relative". + * */ igDialog(optionLiteral: 'option', optionName: "container"): any; @@ -23196,6 +24740,7 @@ interface JQuery { * By default the parent form of the original target element is used. If a form is not found, then the body is used. * Note: If the "position" of the container is not set or it is "static", then the position is set to "relative". * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "container", optionValue: any): void; @@ -23203,6 +24748,7 @@ interface JQuery { /** * Gets/Sets the initial height of the dialog in pixels for normal state.Besides numeric values, following units are supported: "px", "em" and "%". * In case of "%", the size of browser window is used and it has effect only on open action. + * */ igDialog(optionLiteral: 'option', optionName: "height"): number|string; @@ -23211,6 +24757,7 @@ interface JQuery { * /Sets the initial height of the dialog in pixels for normal state.Besides numeric values, following units are supported: "px", "em" and "%". * In case of "%", the size of browser window is used and it has effect only on open action. * + * * @optionValue New value to be set. */ @@ -23219,6 +24766,7 @@ interface JQuery { /** * Gets/Sets the initial width of the dialog in pixels for normal state.Besides numeric values, following units are supported: "px", "em" and "%". * In case of "%", the size of browser window is used and it has effect only on open action. + * */ igDialog(optionLiteral: 'option', optionName: "width"): number|string; @@ -23227,6 +24775,7 @@ interface JQuery { * /Sets the initial width of the dialog in pixels for normal state.Besides numeric values, following units are supported: "px", "em" and "%". * In case of "%", the size of browser window is used and it has effect only on open action. * + * * @optionValue New value to be set. */ @@ -23234,60 +24783,70 @@ interface JQuery { /** * Gets/Sets the minimal height of the dialog in normal state. + * */ igDialog(optionLiteral: 'option', optionName: "minHeight"): number; /** * /Sets the minimal height of the dialog in normal state. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "minHeight", optionValue: number): void; /** * Gets/Sets the minimal width of the dialog in normal state. + * */ igDialog(optionLiteral: 'option', optionName: "minWidth"): number; /** * /Sets the minimal width of the dialog in normal state. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "minWidth", optionValue: number): void; /** * Gets/Sets the maximal height of the dialog in normal state. Note: that option has effect only while resizing the dialog by the end user. + * */ igDialog(optionLiteral: 'option', optionName: "maxHeight"): number; /** * /Sets the maximal height of the dialog in normal state. Note: that option has effect only while resizing the dialog by the end user. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "maxHeight", optionValue: number): void; /** * Gets/Sets the maximal width of the dialog in normal state. Note: that option has effect only while resizing the dialog by the end user. + * */ igDialog(optionLiteral: 'option', optionName: "maxWidth"): number; /** * /Sets the maximal width of the dialog in normal state. Note: that option has effect only while resizing the dialog by the end user. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "maxWidth", optionValue: number): void; /** * Gets/Sets whether the dialog can be dragged by the user. + * */ igDialog(optionLiteral: 'option', optionName: "draggable"): boolean; /** * /Sets whether the dialog can be dragged by the user. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "draggable", optionValue: boolean): void; @@ -23295,6 +24854,7 @@ interface JQuery { /** * Gets/Sets the initial position of the dialog. That should be an object, which contains "top" and "left" members or an object * supported by jquery.position(param) method. Examples: { left: 100, top: 200 }, { my: "left top", at: "left top", offset: "100 200" } + * */ igDialog(optionLiteral: 'option', optionName: "position"): any; @@ -23302,66 +24862,77 @@ interface JQuery { * /Sets the initial position of the dialog. That should be an object, which contains "top" and "left" members or an object * supported by jquery.position(param) method. Examples: { left: 100, top: 200 }, { my: "left top", at: "left top", offset: "100 200" } * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "position", optionValue: any): void; /** * Gets/Sets whether the dialog can be resized by the user. + * */ igDialog(optionLiteral: 'option', optionName: "resizable"): boolean; /** * /Sets whether the dialog can be resized by the user. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "resizable", optionValue: boolean): void; /** * Gets/Sets the value for the tabIndex attribute applied to the main html element of the dialog. + * */ igDialog(optionLiteral: 'option', optionName: "tabIndex"): number; /** * /Sets the value for the tabIndex attribute applied to the main html element of the dialog. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; /** * Gets/Sets the animation applied to the dialog when it is opened. That can be any object supported by the jquery show(param) method. + * */ igDialog(optionLiteral: 'option', optionName: "openAnimation"): any; /** * /Sets the animation applied to the dialog when it is opened. That can be any object supported by the jquery show(param) method. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "openAnimation", optionValue: any): void; /** * Gets/Sets the animation applied to the dialog when it is closed. That can be any object supported by the jquery hide(param) method. + * */ igDialog(optionLiteral: 'option', optionName: "closeAnimation"): any; /** * /Sets the animation applied to the dialog when it is closed. That can be any object supported by the jquery hide(param) method. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "closeAnimation", optionValue: any): void; /** * Gets/Sets the value of zIndex applied to the main html element of the dialog. If value is not set, then 1000 is used. + * */ igDialog(optionLiteral: 'option', optionName: "zIndex"): number; /** * /Sets the value of zIndex applied to the main html element of the dialog. If value is not set, then 1000 is used. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "zIndex", optionValue: number): void; @@ -23370,6 +24941,7 @@ interface JQuery { * Gets/Sets the modal state of the dialog. * If there are more than 1 modal igDialog, then the last opened dialog wins and becomes on the top. * Note: the modal functionality is not supported when the dialog is minimized or pinned, because that will trigger misbehavior. + * */ igDialog(optionLiteral: 'option', optionName: "modal"): boolean; @@ -23378,6 +24950,7 @@ interface JQuery { * If there are more than 1 modal igDialog, then the last opened dialog wins and becomes on the top. * Note: the modal functionality is not supported when the dialog is minimized or pinned, because that will trigger misbehavior. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "modal", optionValue: boolean): void; @@ -23388,6 +24961,7 @@ interface JQuery { * If that option is enabled, then focus and blur event handlers are added to all the child elements of the dialog. * If the dialog is modal or it can be maximized, then it is not recommended to disable that option. * If that option is modified after the igDialog was already created, then depending on current state of the dialog, it will be temporary closed-opened or opened-closed. + * */ igDialog(optionLiteral: 'option', optionName: "trackFocus"): boolean; @@ -23398,6 +24972,7 @@ interface JQuery { * If the dialog is modal or it can be maximized, then it is not recommended to disable that option. * If that option is modified after the igDialog was already created, then depending on current state of the dialog, it will be temporary closed-opened or opened-closed. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "trackFocus", optionValue: boolean): void; @@ -23490,24 +25065,28 @@ interface JQuery { /** * Gets/Sets the temporary value for src, which is used while changing the parent of the base element if it is an instance of IFRAME. That allows getting around possible JavaScript exceptions under IE. + * */ igDialog(optionLiteral: 'option', optionName: "temporaryUrl"): string; /** * /Sets the temporary value for src, which is used while changing the parent of the base element if it is an instance of IFRAME. That allows getting around possible JavaScript exceptions under IE. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "temporaryUrl", optionValue: string): void; /** * Gets/Sets the ability to adjust the state of the header depending on focused and not-focused states. Note: the "trackFocus" option should be enabled. + * */ igDialog(optionLiteral: 'option', optionName: "enableHeaderFocus"): boolean; /** * /Sets the ability to adjust the state of the header depending on focused and not-focused states. Note: the "trackFocus" option should be enabled. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "enableHeaderFocus", optionValue: boolean): void; @@ -23516,6 +25095,7 @@ interface JQuery { * Gets/Sets the processing of the double-click on the dialog-header.If this option is not false and dialog was minimized, then its state will be set to normal. * If this option is set to "auto" and showMaximizeButton is enabled or if this option is set to true, then the dialog will be maximized when it was in normal state, * and dialog-state will be set to normal if it was maximized. + * */ igDialog(optionLiteral: 'option', optionName: "enableDblclick"): any; @@ -23524,49 +25104,50 @@ interface JQuery { * If this option is set to "auto" and showMaximizeButton is enabled or if this option is set to true, then the dialog will be maximized when it was in normal state, * and dialog-state will be set to normal if it was maximized. * + * * @optionValue New value to be set. */ igDialog(optionLiteral: 'option', optionName: "enableDblclick", optionValue: any): void; /** - * Event which is raised before the state of dialog was changed. - * Return false in order to cancel action. + * Set/Get the locale language setting for the widget. * - * The function takes arguments "evt" and "ui". - * Use evt to obtain the browser event. That parameter can be null if the state was modified from the code. - * Use ui.owner to obtain a reference to the igDialog. - * Use ui.button to obtain the name of the button, which triggered the event. Note: if the state was modified from the code, then "button" is undefined. - * Use ui.oldState to obtain the old state of the dialog, which can be one of the following: "opened", "minimized", "maximized", "closed". - * Use ui.oldPinned to obtain the boolean value of the old pin state of the dialog. - * Use ui.action to obtain the name of the action. That can be one of the following: - * "open" - request to open the dialog - * "close" - request to close the dialog - * "minimize" - request to minimize the dialog - * "maximize" - request to maximize the dialog - * "restore" - request to restore the dialog from minimized or maximized state - * "pin" - request to pin the dialog - * "unpin" - request to unpin the dialog + */ + igDialog(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igDialog(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igDialog(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igDialog(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + + /** + * Event which is raised before the state of the dialog was changed. + * Return false in order to cancel the action. */ igDialog(optionLiteral: 'option', optionName: "stateChanging"): StateChangingEvent; /** - * Event which is raised before the state of dialog was changed. - * Return false in order to cancel action. - * - * The function takes arguments "evt" and "ui". - * Use evt to obtain the browser event. That parameter can be null if the state was modified from the code. - * Use ui.owner to obtain a reference to the igDialog. - * Use ui.button to obtain the name of the button, which triggered the event. Note: if the state was modified from the code, then "button" is undefined. - * Use ui.oldState to obtain the old state of the dialog, which can be one of the following: "opened", "minimized", "maximized", "closed". - * Use ui.oldPinned to obtain the boolean value of the old pin state of the dialog. - * Use ui.action to obtain the name of the action. That can be one of the following: - * "open" - request to open the dialog - * "close" - request to close the dialog - * "minimize" - request to minimize the dialog - * "maximize" - request to maximize the dialog - * "restore" - request to restore the dialog from minimized or maximized state - * "pin" - request to pin the dialog - * "unpin" - request to unpin the dialog + * Event which is raised before the state of the dialog was changed. + * Return false in order to cancel the action. * * @optionValue Define event handler function. */ @@ -23574,65 +25155,23 @@ interface JQuery { /** * Event which is raised after the state of the dialog was changed. - * - * The function takes arguments "evt" and "ui". - * Use evt to obtain the browser event. That parameter can be null if the state was modified from the code. - * Use ui.owner to obtain a reference to the igDialog. - * Use ui.button to obtain the name of the button, which triggered the event. Note: if the state was modified from the code, then "button" is undefined. - * Use ui.oldState to obtain the old state of the dialog, which can be one of the following: "opened", "minimized", "maximized", "closed". - * Use ui.oldPinned to obtain the boolean value of the old pin state of the dialog. - * Use ui.action to obtain the name of the action. That can be one of the following: - * "open" - the dialog was opened. Note: the event is raised before a possible "openAnimation" started. - * "close" - the dialog was closed. Note: the event is raised before a possible "closeAnimation" started. - * "minimize" - the dialog was minimized - * "maximize" - the dialog was maximized - * "restore" - the dialog was restored from minimized or maximized state - * "pin" - the dialog was pinned - * "unpin" - the dialog was unpinned */ igDialog(optionLiteral: 'option', optionName: "stateChanged"): StateChangedEvent; /** * Event which is raised after the state of the dialog was changed. * - * The function takes arguments "evt" and "ui". - * Use evt to obtain the browser event. That parameter can be null if the state was modified from the code. - * Use ui.owner to obtain a reference to the igDialog. - * Use ui.button to obtain the name of the button, which triggered the event. Note: if the state was modified from the code, then "button" is undefined. - * Use ui.oldState to obtain the old state of the dialog, which can be one of the following: "opened", "minimized", "maximized", "closed". - * Use ui.oldPinned to obtain the boolean value of the old pin state of the dialog. - * Use ui.action to obtain the name of the action. That can be one of the following: - * "open" - the dialog was opened. Note: the event is raised before a possible "openAnimation" started. - * "close" - the dialog was closed. Note: the event is raised before a possible "closeAnimation" started. - * "minimize" - the dialog was minimized - * "maximize" - the dialog was maximized - * "restore" - the dialog was restored from minimized or maximized state - * "pin" - the dialog was pinned - * "unpin" - the dialog was unpinned - * * @optionValue Define event handler function. */ igDialog(optionLiteral: 'option', optionName: "stateChanged", optionValue: StateChangedEvent): void; /** - * Event which is raised after the end of the animation when the dialod was closed or opened. - * - * The function takes arguments "evt" and "ui". - * Use ui.owner to obtain a reference to the igDialog. - * Use ui.action to obtain the name of the action, which triggered the animation. - * "open" - the dialog was opened - * "close" - the dialog was closed + * Event which is raised after the end of the animation when the dialog was closed or opened. */ igDialog(optionLiteral: 'option', optionName: "animationEnded"): AnimationEndedEvent; /** - * Event which is raised after the end of the animation when the dialod was closed or opened. - * - * The function takes arguments "evt" and "ui". - * Use ui.owner to obtain a reference to the igDialog. - * Use ui.action to obtain the name of the action, which triggered the animation. - * "open" - the dialog was opened - * "close" - the dialog was closed + * Event which is raised after the end of the animation when the dialog was closed or opened. * * @optionValue Define event handler function. */ @@ -23640,40 +25179,24 @@ interface JQuery { /** * Event which is raised when the dialog or its content gets focus. - * - * The function takes arguments "evt" and "ui". - * Use evt to obtain the browser event. - * Use ui.owner to obtain a reference to the igDialog. */ igDialog(optionLiteral: 'option', optionName: "focus"): IgFocusEvent; /** * Event which is raised when the dialog or its content gets focus. * - * The function takes arguments "evt" and "ui". - * Use evt to obtain the browser event. - * Use ui.owner to obtain a reference to the igDialog. - * * @optionValue Define event handler function. */ igDialog(optionLiteral: 'option', optionName: "focus", optionValue: IgFocusEvent): void; /** * Event which is raised when the dialog or its content loses focus. - * - * The function takes arguments "evt" and "ui". - * Use evt to obtain the browser event. - * Use ui.owner to obtain a reference to the igDialog. */ igDialog(optionLiteral: 'option', optionName: "blur"): BlurEvent; /** * Event which is raised when the dialog or its content loses focus. * - * The function takes arguments "evt" and "ui". - * Use evt to obtain the browser event. - * Use ui.owner to obtain a reference to the igDialog. - * * @optionValue Define event handler function. */ igDialog(optionLiteral: 'option', optionName: "blur", optionValue: BlurEvent): void; @@ -23683,968 +25206,18 @@ interface JQuery { igDialog(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; igDialog(methodName: string, ...methodParams: any[]): any; } -interface IgDoughnutChartSeries { - /** - * Gets or sets the current series type. - * - * Valid values: - * "flat" Series has flat 1-dimensional data. - */ - type?: string; - - /** - * Whether the series should render a tooltip. - */ - showTooltip?: boolean; - - /** - * The name of template or the template itself that chart tooltip will use to render. - */ - tooltipTemplate?: string; - - /** - * Gets or sets the data source for the chart. - */ - itemsSource?: any; - - /** - * Gets or Sets the property name that contains the values. - */ - valueMemberPath?: string; - - /** - * Gets or sets the property name that contains the labels. - */ - labelMemberPath?: string; - - /** - * Gets or sets the property name that contains the legend labels. - */ - legendLabelMemberPath?: string; - - /** - * Gets or sets the position of chart labels. - * - * Valid values: - * "none" No labels will be displayed. - * "center" Labels will be displayed in the center. - * "insideEnd" Labels will be displayed inside and by the edge of the container. - * "outsideEnd" Labels will be displayed outside the container. - * "bestFit" Labels will automatically decide their location. - */ - labelsPosition?: string; - - /** - * Gets or sets whether the leader lines are visible. - * - * Valid values: - * "visible" Display the element. - * "collapsed" Do not display the element. - */ - leaderLineVisibility?: string; - - /** - * Gets or sets the style for the leader lines. - */ - leaderLineStyle?: any; - - /** - * Gets or sets what type of leader lines will be used for the outside end labels. - * - * Valid values: - * "straight" A straight line is drawn between the slice and its label. - * "arc" A curved line is drawn between the slice and its label. The line follows makes a natural turn from the slice to the label. - * "spline" A curved line is drawn between the slice and its label. The line starts radially from the slice and then turns to the label. - */ - leaderLineType?: string; - - /** - * Gets or sets the margin between a label and its leader line. The default is 6 pixels. - */ - leaderLineMargin?: number; - - /** - * Gets or sets the threshold value that determines if slices are grouped into the Others slice. - */ - othersCategoryThreshold?: number; - - /** - * Gets or sets whether to use numeric or percent-based threshold value. - * - * Valid values: - * "number" Data value is compared directly to the value of OthersCategoryThreshold. - * "percent" Data value is compared to OthersCategoryThreshold as a percentage of the total. - */ - othersCategoryType?: string; - - /** - * Gets or sets the label of the Others slice. - */ - othersCategoryText?: string; - - /** - * Gets or sets the legend used for the current chart. - */ - legend?: any; - - /** - * Sets or gets a function which takes an object that produces a formatted label for displaying in the chart. - */ - formatLabel?: any; - - /** - * Sets or gets a function which takes an object that produces a formatted label for displaying in the chart's legend. - */ - formatLegendLabel?: any; - - /** - * Gets or sets the pixel amount by which the labels are offset from the edge of the slices. - */ - labelExtent?: number; - - /** - * Gets or sets the starting angle of the chart. - * The default zero value is equivalent to 3 o'clock. - */ - startAngle?: number; - - /** - * Gets or sets the style used when a slice is selected. - */ - selectedStyle?: any; - - /** - * Gets or sets the palette of brushes to use for coloring the slices. - * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. - */ - brushes?: any; - - /** - * Gets or sets the palette of brushes to use for outlines on the slices. - * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. - */ - outlines?: any; - - /** - * Gets or sets whether all surface interactions with the plot area should be disabled. - */ - isSurfaceInteractionDisabled?: any; - - /** - * Gets or sets the scaling factor of the chart's radius. Value between 0 and 1. - */ - radiusFactor?: number; - - /** - * Option for IgDoughnutChartSeries - */ - [optionName: string]: any; -} - -interface HoleDimensionsChangedEvent { - (event: Event, ui: HoleDimensionsChangedEventUIParam): void; -} - -interface HoleDimensionsChangedEventUIParam {} - -interface IgDoughnutChart { - /** - * The width of the chart. It can be set as a number in pixels, string (px) or percentage (%). - */ - width?: string|number; - - /** - * The height of the chart. It can be set as a number in pixels, string (px) or percentage (%). - */ - height?: string|number; - - /** - * An array of series objects. - */ - series?: IgDoughnutChartSeries[]; - - /** - * Gets or sets whether the slices can be selected. - */ - allowSliceSelection?: boolean; - - /** - * Gets or sets whether all surface interactions with the plot area should be disabled. - */ - isSurfaceInteractionDisabled?: any; - - /** - * Gets or sets whether the slices can be exploded. - */ - allowSliceExplosion?: boolean; - - /** - * Gets or sets the inner extent of the doughnut chart. It is percent from the outer ring's radius. - */ - innerExtent?: number; - - /** - * Gets or sets the style used when a slice is selected. - */ - selectedStyle?: any; - - /** - * Gets sets template for tooltip associated with chart item. - * Example: "Value: $(ValueMemberPathInDataSource)" - */ - tooltipTemplate?: string; - - /** - * Gets sets maximum number of displayed records in chart. - */ - maxRecCount?: number; - - /** - * Gets sets a valid data source. - * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. - * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. - */ - dataSource?: any; - - /** - * Gets sets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property - */ - dataSourceType?: string; - - /** - * Gets sets url which is used for sending JSON on request for remote data. - */ - dataSourceUrl?: string; - - /** - * See $.ig.DataSource. property in the response specifying the total number of records on the server. - */ - responseTotalRecCountKey?: string; - - /** - * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. - */ - responseDataKey?: string; - - /** - * Event fired when the mouse has hovered on a series and the tooltip is about to show - * Function takes arguments evt and ui. - * Use ui.element to get reference to tooltip DOM element. - * Use ui.item to get reference to current series item object. - * Use ui.chart to get reference to chart object. - * Use ui.series to get reference to current series object. - * Use ui.actualItemBrush to get item brush. - * Use ui.actualSeriesBrush to get series brush. - */ - tooltipShowing?: TooltipShowingEvent; - - /** - * Event fired after a tooltip is shown - * Function takes arguments evt and ui. - * Use ui.element to get reference to tooltip DOM element. - * Use ui.item to get reference to current series item object. - * Use ui.chart to get reference to chart object. - * Use ui.series to get reference to current series object. - * Use ui.actualItemBrush to get item brush. - * Use ui.actualSeriesBrush to get series brush. - */ - tooltipShown?: TooltipShownEvent; - - /** - * Event fired when the mouse has left a series and the tooltip is about to hide - * Function takes arguments evt and ui. - * Use ui.element to get reference to tooltip DOM element. - * Use ui.item to get reference to current series item object. - * Use ui.chart to get reference to chart object. - * Use ui.series to get reference to current series object. - * Use ui.actualItemBrush to get item brush. - * Use ui.actualSeriesBrush to get series brush. - */ - tooltipHiding?: TooltipHidingEvent; - - /** - * Event fired after a tooltip is hidden - * Function takes arguments evt and ui. - * Use ui.element to get reference to tooltip DOM element. - * Use ui.item to get reference to current series item object. - * Use ui.chart to get reference to chart object. - * Use ui.series to get reference to current series object. - * Use ui.actualItemBrush to get item brush. - * Use ui.actualSeriesBrush to get series brush. - */ - tooltipHidden?: TooltipHiddenEvent; - - /** - * Event fired when the control is displayed on a non HTML5 compliant browser - */ - browserNotSupported?: BrowserNotSupportedEvent; - - /** - * Raised when the slice is clicked. - */ - sliceClick?: SliceClickEvent; - - /** - * Raised when the dimensions (center point or radius) of the doughnut hole change. - */ - holeDimensionsChanged?: HoleDimensionsChangedEvent; - - /** - * Event which is raised before data binding. - * Return false in order to cancel data binding. - * Function takes first argument null and second argument ui. - * Use ui.owner to obtain reference to chart widget. - * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. - */ - dataBinding?: DataBindingEvent; - - /** - * Event which is raised after data binding. - * Function takes first argument null and second argument ui. - * Use ui.owner to obtain reference to chart widget. - * Use ui.data to obtain reference to array actual data which is displayed by chart. - * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. - */ - dataBound?: DataBoundEvent; - - /** - * Event which is raised before tooltip is updated. - * Return false in order to cancel updating and hide tooltip. - * Function takes first argument null and second argument ui. - * Use ui.owner to obtain reference to chart widget. - * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. - * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. - * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. - * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. - * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. - */ - updateTooltip?: UpdateTooltipEvent; - - /** - * Event which is raised before tooltip is hidden. - * Return false in order to cancel hiding and keep tooltip visible. - * Function takes first argument null and second argument ui. - * Use ui.owner to obtain reference to chart widget. - * Use ui.item to obtain reference to item. - * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. - */ - hideTooltip?: HideTooltipEvent; - - /** - * Option for igDoughnutChart - */ - [optionName: string]: any; -} -interface IgDoughnutChartMethods { - /** - * Adds a new series to the doughnut chart. - * - * @param seriesObj The series object to be added. - */ - addSeries(seriesObj: Object): void; - - /** - * Removes the specified series from the doughnut chart. - * - * @param seriesObj The series object identifying the series to be removed. - */ - removeSeries(seriesObj: Object): void; - - /** - * Updates the series with the specified name with the specified new property values. - * - * @param value The series object identifying the series to be updated. - */ - updateSeries(value: Object): void; - - /** - * Returns the center of the doughnut chart. - */ - getCenterCoordinates(): Object; - - /** - * Returns the radius of the chart's hole. - */ - getHoleRadius(): number; - - /** - * Returns information about how the doughnut chart is rendered. - */ - exportVisualData(): Object; - - /** - * Causes all of the series that have pending changes e.g. by changed property values to be rendered immediately. - */ - flush(): void; - - /** - * Destroys the widget. - */ - destroy(): void; - - /** - * Returns data source of the series. - * - * @param series Optional. The series name. If not provided an array of series data sources is returned. - */ - getData(series: string): Object; - - /** - * Find index of item within actual data used by chart. - * - * @param item The reference to item. - */ - findIndexOfItem(item: Object): number; - - /** - * Get item within actual data used by chart. That is similar to this.getData()[ index ]. - * - * @param index Index of data item. - */ - getDataItem(index: Object): Object; - - /** - * Adds a new item to the data source and notifies the chart. - * - * @param item The item that we want to add to the data source. - */ - addItem(item: Object): Object; - - /** - * Inserts a new item to the data source and notifies the chart. - * - * @param item the new item that we want to insert in the data source. - * @param index The index in the data source where the new item will be inserted. - */ - insertItem(item: Object, index: number): Object; - - /** - * Deletes an item from the data source and notifies the chart. - * - * @param index The index in the data source from where the item will be been removed. - */ - removeItem(index: number): Object; - - /** - * Updates an item in the data source and notifies the chart. - * - * @param index The index of the item in the data source that we want to change. - * @param item The new item object that will be set in the data source. - */ - setItem(index: number, item: Object): Object; - - /** - * Notifies the chart that an item has been set in an associated data source. - * - * @param dataSource The data source in which the change happened. - * @param index The index in the items source that has been changed. - * @param newItem the new item that has been set in the collection. - * @param oldItem the old item that has been overwritten in the collection. - */ - notifySetItem(dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; - - /** - * Notifies the chart that the items have been cleared from an associated data source. - * It's not necessary to notify more than one target of a change if they share the same items source. - * - * @param dataSource The data source in which the change happened. - */ - notifyClearItems(dataSource: Object): Object; - - /** - * Notifies the target axis or series that an item has been inserted at the specified index in its data source. - * It's not necessary to notify more than one target of a change if they share the same items source. - * - * @param dataSource The data source in which the change happened. - * @param index The index in the items source where the new item has been inserted. - * @param newItem the new item that has been set in the collection. - */ - notifyInsertItem(dataSource: Object, index: number, newItem: Object): Object; - - /** - * Notifies the target axis or series that an item has been removed from the specified index in its data source. - * It's not necessary to notify more than one target of a change if they share the same items source. - * - * @param dataSource The data source in which the change happened. - * @param index The index in the items source from where the old item has been removed. - * @param oldItem the old item that has been removed from the collection. - */ - notifyRemoveItem(dataSource: Object, index: number, oldItem: Object): Object; - - /** - * Get reference to chart object. - */ - chart(): Object; - - /** - * Binds data to the chart - */ - dataBind(): void; -} -interface JQuery { - data(propertyName: "igDoughnutChart"): IgDoughnutChartMethods; -} - -interface JQuery { - igDoughnutChart(methodName: "addSeries", seriesObj: Object): void; - igDoughnutChart(methodName: "removeSeries", seriesObj: Object): void; - igDoughnutChart(methodName: "updateSeries", value: Object): void; - igDoughnutChart(methodName: "getCenterCoordinates"): Object; - igDoughnutChart(methodName: "getHoleRadius"): number; - igDoughnutChart(methodName: "exportVisualData"): Object; - igDoughnutChart(methodName: "flush"): void; - igDoughnutChart(methodName: "destroy"): void; - igDoughnutChart(methodName: "getData", series: string): Object; - igDoughnutChart(methodName: "findIndexOfItem", item: Object): number; - igDoughnutChart(methodName: "getDataItem", index: Object): Object; - igDoughnutChart(methodName: "addItem", item: Object): Object; - igDoughnutChart(methodName: "insertItem", item: Object, index: number): Object; - igDoughnutChart(methodName: "removeItem", index: number): Object; - igDoughnutChart(methodName: "setItem", index: number, item: Object): Object; - igDoughnutChart(methodName: "notifySetItem", dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; - igDoughnutChart(methodName: "notifyClearItems", dataSource: Object): Object; - igDoughnutChart(methodName: "notifyInsertItem", dataSource: Object, index: number, newItem: Object): Object; - igDoughnutChart(methodName: "notifyRemoveItem", dataSource: Object, index: number, oldItem: Object): Object; - igDoughnutChart(methodName: "chart"): Object; - igDoughnutChart(methodName: "dataBind"): void; - - /** - * The width of the chart. It can be set as a number in pixels, string (px) or percentage (%). - */ - - igDoughnutChart(optionLiteral: 'option', optionName: "width"): string|number; - - /** - * The width of the chart. It can be set as a number in pixels, string (px) or percentage (%). - * - * @optionValue New value to be set. - */ - - igDoughnutChart(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; - - /** - * The height of the chart. It can be set as a number in pixels, string (px) or percentage (%). - */ - - igDoughnutChart(optionLiteral: 'option', optionName: "height"): string|number; - - /** - * The height of the chart. It can be set as a number in pixels, string (px) or percentage (%). - * - * @optionValue New value to be set. - */ - - igDoughnutChart(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; - - /** - * An array of series objects. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "series"): IgDoughnutChartSeries[]; - - /** - * An array of series objects. - * - * @optionValue New value to be set. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "series", optionValue: IgDoughnutChartSeries[]): void; - - /** - * Gets whether the slices can be selected. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "allowSliceSelection"): boolean; - - /** - * Sets whether the slices can be selected. - * - * @optionValue New value to be set. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "allowSliceSelection", optionValue: boolean): void; - - /** - * Gets whether all surface interactions with the plot area should be disabled. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "isSurfaceInteractionDisabled"): any; - - /** - * Sets whether all surface interactions with the plot area should be disabled. - * - * @optionValue New value to be set. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "isSurfaceInteractionDisabled", optionValue: any): void; - - /** - * Gets whether the slices can be exploded. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "allowSliceExplosion"): boolean; - - /** - * Sets whether the slices can be exploded. - * - * @optionValue New value to be set. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "allowSliceExplosion", optionValue: boolean): void; - - /** - * Gets the inner extent of the doughnut chart. It is percent from the outer ring's radius. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "innerExtent"): number; - - /** - * Sets the inner extent of the doughnut chart. It is percent from the outer ring's radius. - * - * @optionValue New value to be set. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "innerExtent", optionValue: number): void; - - /** - * Gets the style used when a slice is selected. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "selectedStyle"): any; - - /** - * Sets the style used when a slice is selected. - * - * @optionValue New value to be set. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "selectedStyle", optionValue: any): void; - - /** - * Gets template for tooltip associated with chart item. - * Example: "Value: $(ValueMemberPathInDataSource)" - */ - igDoughnutChart(optionLiteral: 'option', optionName: "tooltipTemplate"): string; - - /** - * Sets template for tooltip associated with chart item. - * Example: "Value: $(ValueMemberPathInDataSource)" - * - * @optionValue New value to be set. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "tooltipTemplate", optionValue: string): void; - - /** - * Gets maximum number of displayed records in chart. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "maxRecCount"): number; - - /** - * Sets maximum number of displayed records in chart. - * - * @optionValue New value to be set. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "maxRecCount", optionValue: number): void; - - /** - * Gets a valid data source. - * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. - * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "dataSource"): any; - - /** - * Sets a valid data source. - * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. - * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. - * - * @optionValue New value to be set. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; - - /** - * Gets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property - */ - igDoughnutChart(optionLiteral: 'option', optionName: "dataSourceType"): string; - - /** - * Sets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property - * - * @optionValue New value to be set. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; - - /** - * Gets url which is used for sending JSON on request for remote data. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "dataSourceUrl"): string; - - /** - * Sets url which is used for sending JSON on request for remote data. - * - * @optionValue New value to be set. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "dataSourceUrl", optionValue: string): void; - - /** - * See $.ig.DataSource. property in the response specifying the total number of records on the server. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "responseTotalRecCountKey"): string; - - /** - * See $.ig.DataSource. property in the response specifying the total number of records on the server. - * - * @optionValue New value to be set. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "responseTotalRecCountKey", optionValue: string): void; - - /** - * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "responseDataKey"): string; - - /** - * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. - * - * @optionValue New value to be set. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; - - /** - * Event fired when the mouse has hovered on a series and the tooltip is about to show - * Function takes arguments evt and ui. - * Use ui.element to get reference to tooltip DOM element. - * Use ui.item to get reference to current series item object. - * Use ui.chart to get reference to chart object. - * Use ui.series to get reference to current series object. - * Use ui.actualItemBrush to get item brush. - * Use ui.actualSeriesBrush to get series brush. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "tooltipShowing"): TooltipShowingEvent; - - /** - * Event fired when the mouse has hovered on a series and the tooltip is about to show - * Function takes arguments evt and ui. - * Use ui.element to get reference to tooltip DOM element. - * Use ui.item to get reference to current series item object. - * Use ui.chart to get reference to chart object. - * Use ui.series to get reference to current series object. - * Use ui.actualItemBrush to get item brush. - * Use ui.actualSeriesBrush to get series brush. - * - * @optionValue Define event handler function. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "tooltipShowing", optionValue: TooltipShowingEvent): void; - - /** - * Event fired after a tooltip is shown - * Function takes arguments evt and ui. - * Use ui.element to get reference to tooltip DOM element. - * Use ui.item to get reference to current series item object. - * Use ui.chart to get reference to chart object. - * Use ui.series to get reference to current series object. - * Use ui.actualItemBrush to get item brush. - * Use ui.actualSeriesBrush to get series brush. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "tooltipShown"): TooltipShownEvent; - - /** - * Event fired after a tooltip is shown - * Function takes arguments evt and ui. - * Use ui.element to get reference to tooltip DOM element. - * Use ui.item to get reference to current series item object. - * Use ui.chart to get reference to chart object. - * Use ui.series to get reference to current series object. - * Use ui.actualItemBrush to get item brush. - * Use ui.actualSeriesBrush to get series brush. - * - * @optionValue Define event handler function. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "tooltipShown", optionValue: TooltipShownEvent): void; - - /** - * Event fired when the mouse has left a series and the tooltip is about to hide - * Function takes arguments evt and ui. - * Use ui.element to get reference to tooltip DOM element. - * Use ui.item to get reference to current series item object. - * Use ui.chart to get reference to chart object. - * Use ui.series to get reference to current series object. - * Use ui.actualItemBrush to get item brush. - * Use ui.actualSeriesBrush to get series brush. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "tooltipHiding"): TooltipHidingEvent; - - /** - * Event fired when the mouse has left a series and the tooltip is about to hide - * Function takes arguments evt and ui. - * Use ui.element to get reference to tooltip DOM element. - * Use ui.item to get reference to current series item object. - * Use ui.chart to get reference to chart object. - * Use ui.series to get reference to current series object. - * Use ui.actualItemBrush to get item brush. - * Use ui.actualSeriesBrush to get series brush. - * - * @optionValue Define event handler function. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "tooltipHiding", optionValue: TooltipHidingEvent): void; - - /** - * Event fired after a tooltip is hidden - * Function takes arguments evt and ui. - * Use ui.element to get reference to tooltip DOM element. - * Use ui.item to get reference to current series item object. - * Use ui.chart to get reference to chart object. - * Use ui.series to get reference to current series object. - * Use ui.actualItemBrush to get item brush. - * Use ui.actualSeriesBrush to get series brush. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "tooltipHidden"): TooltipHiddenEvent; - - /** - * Event fired after a tooltip is hidden - * Function takes arguments evt and ui. - * Use ui.element to get reference to tooltip DOM element. - * Use ui.item to get reference to current series item object. - * Use ui.chart to get reference to chart object. - * Use ui.series to get reference to current series object. - * Use ui.actualItemBrush to get item brush. - * Use ui.actualSeriesBrush to get series brush. - * - * @optionValue Define event handler function. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "tooltipHidden", optionValue: TooltipHiddenEvent): void; - - /** - * Event fired when the control is displayed on a non HTML5 compliant browser - */ - igDoughnutChart(optionLiteral: 'option', optionName: "browserNotSupported"): BrowserNotSupportedEvent; - - /** - * Event fired when the control is displayed on a non HTML5 compliant browser - * - * @optionValue Define event handler function. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "browserNotSupported", optionValue: BrowserNotSupportedEvent): void; - - /** - * Raised when the slice is clicked. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "sliceClick"): SliceClickEvent; - - /** - * Raised when the slice is clicked. - * - * @optionValue New value to be set. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "sliceClick", optionValue: SliceClickEvent): void; - - /** - * Raised when the dimensions (center point or radius) of the doughnut hole change. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "holeDimensionsChanged"): HoleDimensionsChangedEvent; - - /** - * Raised when the dimensions (center point or radius) of the doughnut hole change. - * - * @optionValue New value to be set. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "holeDimensionsChanged", optionValue: HoleDimensionsChangedEvent): void; - - /** - * Event which is raised before data binding. - * Return false in order to cancel data binding. - * Function takes first argument null and second argument ui. - * Use ui.owner to obtain reference to chart widget. - * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "dataBinding"): DataBindingEvent; - - /** - * Event which is raised before data binding. - * Return false in order to cancel data binding. - * Function takes first argument null and second argument ui. - * Use ui.owner to obtain reference to chart widget. - * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. - * - * @optionValue Define event handler function. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "dataBinding", optionValue: DataBindingEvent): void; - - /** - * Event which is raised after data binding. - * Function takes first argument null and second argument ui. - * Use ui.owner to obtain reference to chart widget. - * Use ui.data to obtain reference to array actual data which is displayed by chart. - * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "dataBound"): DataBoundEvent; - - /** - * Event which is raised after data binding. - * Function takes first argument null and second argument ui. - * Use ui.owner to obtain reference to chart widget. - * Use ui.data to obtain reference to array actual data which is displayed by chart. - * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. - * - * @optionValue Define event handler function. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "dataBound", optionValue: DataBoundEvent): void; - - /** - * Event which is raised before tooltip is updated. - * Return false in order to cancel updating and hide tooltip. - * Function takes first argument null and second argument ui. - * Use ui.owner to obtain reference to chart widget. - * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. - * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. - * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. - * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. - * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "updateTooltip"): UpdateTooltipEvent; - - /** - * Event which is raised before tooltip is updated. - * Return false in order to cancel updating and hide tooltip. - * Function takes first argument null and second argument ui. - * Use ui.owner to obtain reference to chart widget. - * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. - * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. - * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. - * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. - * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. - * - * @optionValue Define event handler function. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "updateTooltip", optionValue: UpdateTooltipEvent): void; - - /** - * Event which is raised before tooltip is hidden. - * Return false in order to cancel hiding and keep tooltip visible. - * Function takes first argument null and second argument ui. - * Use ui.owner to obtain reference to chart widget. - * Use ui.item to obtain reference to item. - * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "hideTooltip"): HideTooltipEvent; - - /** - * Event which is raised before tooltip is hidden. - * Return false in order to cancel hiding and keep tooltip visible. - * Function takes first argument null and second argument ui. - * Use ui.owner to obtain reference to chart widget. - * Use ui.item to obtain reference to item. - * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. - * - * @optionValue Define event handler function. - */ - igDoughnutChart(optionLiteral: 'option', optionName: "hideTooltip", optionValue: HideTooltipEvent): void; - igDoughnutChart(options: IgDoughnutChart): JQuery; - igDoughnutChart(optionLiteral: 'option', optionName: string): any; - igDoughnutChart(optionLiteral: 'option', options: IgDoughnutChart): JQuery; - igDoughnutChart(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; - igDoughnutChart(methodName: string, ...methodParams: any[]): any; -} interface RenderingEvent { (event: Event, ui: RenderingEventUIParam): void; } interface RenderingEventUIParam { /** - * Used to get a reference to the editor performing rendering. + * Gets a reference to the editor performing rendering. */ owner?: any; /** - * Used to get a reference to the editor element. + * Gets a reference to the editor element. */ element?: any; } @@ -24655,17 +25228,17 @@ interface MousedownEvent { interface MousedownEventUIParam { /** - * Used to obtain reference to igEditor. + * Gets a reference to the editor. */ owner?: any; /** - * Used to obtain a reference to the event target. + * Gets a reference to the event target. */ element?: any; /** - * Used torInput to get a reference to the editor field. + * Gets a reference to the editor input field. */ editorInput?: any; } @@ -24676,17 +25249,17 @@ interface MouseupEvent { interface MouseupEventUIParam { /** - * Used to obtain reference to igEditor. + * Gets a reference to the editor. */ owner?: any; /** - * Used to obtain a reference to the event target. + * Gets a reference to the event target. */ element?: any; /** - * Used torInput to get a reference to the editor field. + * Gets a reference to the editor input field. */ editorInput?: any; } @@ -24697,17 +25270,17 @@ interface MousemoveEvent { interface MousemoveEventUIParam { /** - * Used to obtain reference to igEditor. + * Gets a reference to the editor. */ owner?: any; /** - * Used to obtain a reference to the event target. + * Gets a reference to the event target. */ element?: any; /** - * Used torInput to get a reference to the editor field. + * Gets a reference to the editor input field. */ editorInput?: any; } @@ -24718,19 +25291,24 @@ interface MouseoverEvent { interface MouseoverEventUIParam { /** - * Used to obtain reference to igEditor. + * Gets a reference to the editor. */ owner?: any; /** - * Used to obtain a reference to the event target. + * Gets a reference to the event target. */ element?: any; /** - * Used torInput to get a reference to the editor field. + * Gets a reference to the editor input field. */ editorInput?: any; + + /** + * Gets a reference to the event object of the browser. + */ + originalEvent?: any; } interface MouseoutEvent { @@ -24739,19 +25317,24 @@ interface MouseoutEvent { interface MouseoutEventUIParam { /** - * Used to obtain reference to igEditor. + * Gets a reference to the editor. */ owner?: any; /** - * Used to obtain a reference to the event target. + * Gets a reference to the event target. */ element?: any; /** - * Used torInput to get a reference to the editor field. + * Gets a reference to the editor input field. */ editorInput?: any; + + /** + * Gets a reference to the event object of the browser. + */ + originalEvent?: any; } interface KeydownEvent { @@ -24760,12 +25343,22 @@ interface KeydownEvent { interface KeydownEventUIParam { /** - * Used to obtain reference to igEditor. + * Gets a reference to the editor. */ owner?: any; /** - * Used to obtain value of keyCode. + * Gets a reference to the event target. + */ + element?: any; + + /** + * Gets a reference to the editor input field. + */ + editorInput?: any; + + /** + * Gets the value of the keyCode. */ key?: any; } @@ -24776,14 +25369,29 @@ interface KeypressEvent { interface KeypressEventUIParam { /** - * Used to obtain reference to igEditor. + * Gets a reference to the editor. */ owner?: any; /** - * Used to obtain value of keyCode. + * Gets a reference to the event target. + */ + element?: any; + + /** + * Gets a reference to the editor input field. + */ + editorInput?: any; + + /** + * Gets the value of the keyCode. */ key?: any; + + /** + * Gets a reference to the event object of the browser. + */ + originalEvent?: any; } interface KeyupEvent { @@ -24792,14 +25400,29 @@ interface KeyupEvent { interface KeyupEventUIParam { /** - * Used to obtain reference to igEditor. + * Gets a reference to the editor. */ owner?: any; /** - * Used to obtain value of keyCode. + * Gets a reference to the event target. + */ + element?: any; + + /** + * Gets a reference to the editor input field. + */ + editorInput?: any; + + /** + * Gets the value of the keyCode. */ key?: any; + + /** + * Gets a reference to the event object of the browser. + */ + originalEvent?: any; } interface ValueChangingEvent { @@ -24808,24 +25431,24 @@ interface ValueChangingEvent { interface ValueChangingEventUIParam { /** - * Used to obtain reference to igEditor. + * Gets a reference to the editor. */ owner?: any; /** - * Used to obtain the new value. + * Gets the editor input. + */ + editorInput?: any; + + /** + * Gets the editor's new value. The argument type might differ depending on the editor type. */ newValue?: any; /** - * Used to obtain the old value. + * Gets the editor's old value. The argument type might differ depending on the editor type. */ oldValue?: any; - - /** - * Used torInput to obtain reference to the editor input. - */ - editorInput?: any; } interface ValueChangedEvent { @@ -24834,30 +25457,31 @@ interface ValueChangedEvent { interface ValueChangedEventUIParam { /** - * Used to obtain reference to igEditor. + * Gets a reference to the editor. */ owner?: any; /** - * Used to obtain the value entered from the user after internal formatting. + * Gets the editor input. + */ + editorInput?: any; + + /** + * Gets the value entered from the user after internal formatting. The argument type might differ depending on the editor type. */ newValue?: any; /** - * Used to obtain the value entered from the user before internal formatting. + * Gets the value entered from the user before internal formatting. The argument type might differ depending on the editor type. */ originalValue?: any; - - /** - * Used torInput to obtain reference to the editor input. - */ - editorInput?: any; } interface IgBaseEditor { /** * Gets/Sets the width of the control. * + * * Valid values: * "null" will stretch to fit data, if no other widths are defined. */ @@ -24866,6 +25490,7 @@ interface IgBaseEditor { /** * Gets/Sets the height of the control. * + * * Valid values: * "null" will fit the editor inside its parent container, if no other heights are defined. */ @@ -24873,37 +25498,44 @@ interface IgBaseEditor { /** * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * */ value?: any; /** * Gets/Sets tabIndex attribute for the editor input. + * */ tabIndex?: number; /** * Gets/Sets whether the editor value can become null. * If that option is false, and editor has no value, then value is set to an empty string. + * */ allowNullValue?: boolean; /** * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * */ nullValue?: string|number; /** * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * */ inputName?: string; /** * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * */ readOnly?: boolean; /** * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * */ disabled?: boolean; @@ -24911,151 +25543,99 @@ interface IgBaseEditor { * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * */ validatorOptions?: any; /** * Set/Get the locale setting for the widget. + * */ locale?: any; /** * Set/Get the locale language setting for the widget. + * */ language?: string; /** * Set/Get the regional setting for the widget. + * */ regional?: string|Object; /** - * Event which is raised before rendering of the editor completes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the editor performing rendering. - * Use ui.element to get a reference to the editor element. + * Fired before rendering of the editor has finished. */ rendering?: RenderingEvent; /** - * Event which is raised after rendering of the editor completes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the editor performing rendering. - * Use ui.element to get a reference to the editor element. + * Fired after rendering of the editor has finished. */ rendered?: RenderedEvent; /** - * Event which is raised on mousedown event. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mousedown event. */ mousedown?: MousedownEvent; /** - * Event which is raised on mouseup event. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseup event. */ mouseup?: MouseupEvent; /** - * Event which is raised on mousemove at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mousemove at any part of editor including the drop-down list. */ mousemove?: MousemoveEvent; /** - * Event which is raised on mouseover at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseover at any part of editor including the drop-down list. */ mouseover?: MouseoverEvent; /** - * Event which is raised on mouseleave at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseleave at any part of editor including the drop-down list. */ mouseout?: MouseoutEvent; /** - * Event which is raised when input field of editor loses focus. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired when the input field of the editor loses focus. */ blur?: BlurEvent; /** - * Event which is raised when input field of editor gets focus. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired when the input field of the editor gets focus. */ focus?: IgFocusEvent; /** - * Event which is raised on keydown event. + * Fired on keydown event. * Return false in order to cancel key action. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. */ keydown?: KeydownEvent; /** - * Event which is raised on keypress event. + * Fired on keypress event. * Return false in order to cancel key action. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. */ keypress?: KeypressEvent; /** - * Event which is raised on keyup event. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. + * Fired on keyup event. */ keyup?: KeyupEvent; /** - * Event which is raised before the editor value is changed. + * Fired before changing the editor's value. * Return false in order to cancel change. * It can be raised after loosing focus or on spin events. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the new value. - * Use ui.oldValue to obtain the old value. - * Use ui.editorInput to obtain reference to the editor input. */ valueChanging?: ValueChangingEvent; /** - * Event which is raised after the editor value is changed. It can be raised after loosing focus or on spin events. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the value entered from the user after internal formatting. - * Use ui.originalValue to obtain the value entered from the user before internal formatting. - * Use ui.editorInput to obtain reference to the editor input. + * Fired after the editor value is changed. It can be raised after loosing focus or on spin events. */ valueChanged?: ValueChangedEvent; @@ -25124,8 +25704,23 @@ interface IgBaseEditorMethods { * Destroys the widget */ destroy(): void; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ changeGlobalRegional(): void; } interface JQuery { @@ -25138,17 +25733,22 @@ interface DropDownListOpeningEvent { interface DropDownListOpeningEventUIParam { /** - * Used to obtain reference to igEditor. + * Gets a reference to the editor. */ owner?: any; /** - * Used torInput to obtain reference to the editable input + * Gets a reference to the editor container. + */ + editor?: any; + + /** + * Gets a reference to the editable input. */ editorInput?: any; /** - * Used to obtain reference to the list contaier. + * Gets a reference to the list contaier. */ list?: any; } @@ -25159,17 +25759,17 @@ interface DropDownListOpenedEvent { interface DropDownListOpenedEventUIParam { /** - * Used to obtain reference to igEditor. + * Gets a reference to the editor. */ owner?: any; /** - * Used torInput to obtain reference to the editable input + * Gets a reference to the editable input. */ editorInput?: any; /** - * Used to obtain reference to the list contaier. + * Gets a reference to the list contaier. */ list?: any; } @@ -25180,17 +25780,22 @@ interface DropDownListClosingEvent { interface DropDownListClosingEventUIParam { /** - * Used to obtain reference to igEditor. + * Gets a reference to the editor. */ owner?: any; /** - * Used torInput to obtain reference to the editable input + * Gets a reference to the editor container. + */ + editor?: any; + + /** + * Gets a reference to the editable input. */ editorInput?: any; /** - * Used to obtain reference to the list contaier. + * Gets a reference to the list contaier. */ list?: any; } @@ -25201,17 +25806,22 @@ interface DropDownListClosedEvent { interface DropDownListClosedEventUIParam { /** - * Used to obtain reference to igEditor. + * Gets a reference to the editor. */ owner?: any; /** - * Used torInput to obtain reference to the editable input + * Gets a reference to the editor container. + */ + editor?: any; + + /** + * Gets a reference to the editable input. */ editorInput?: any; /** - * Used to obtain reference to the list contaier. + * Gets a reference to the list contaier. */ list?: any; } @@ -25222,22 +25832,27 @@ interface DropDownItemSelectingEvent { interface DropDownItemSelectingEventUIParam { /** - * Used to obtain reference to igEditor. + * Gets a reference to the editor. */ owner?: any; /** - * Used torInput to obtain reference to the editable input + * Gets a reference to the editor container. + */ + editor?: any; + + /** + * Gets a reference to the editable input. */ editorInput?: any; /** - * Used to obtain reference to the list contaier. + * Gets a reference to the list contaier. */ list?: any; /** - * Used to obtain reference to the list item which is about to be selected. + * Gets a reference to the list item which is about to be selected. */ item?: any; } @@ -25248,22 +25863,22 @@ interface DropDownItemSelectedEvent { interface DropDownItemSelectedEventUIParam { /** - * Used to obtain reference to igEditor. + * Gets a reference to the editor. */ owner?: any; /** - * Used torInput to obtain reference to the editable input + * Gets a reference to the editable input. */ editorInput?: any; /** - * Used to obtain reference to the list contaier. + * Gets a reference to the list contaier. */ list?: any; /** - * Used to obtain reference to the list item which is selected. + * Gets a reference to the list item which is selected. */ item?: any; } @@ -25274,25 +25889,26 @@ interface TextChangedEvent { interface TextChangedEventUIParam { /** - * Used to obtain reference to igEditor. + * Gets a reference to the editor. */ owner?: any; /** - * Used to obtain new text + * Gets a reference to the new text. */ - text?: any; + text?: string; /** - * Used to obtain the old text. + * Gets a reference to the old text. */ - oldText?: any; + oldText?: string; } interface IgTextEditor { /** * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. * + * * Valid values: * "dropdown" A button to open/close the list is located on the right side of the editor. * "clear" A button to clear the value is located on the right side of the editor. @@ -25303,16 +25919,19 @@ interface IgTextEditor { /** * Gets/Sets list of items which are used as a source for the drop-down list. * Items in the list can be of type string. + * */ listItems?: any[]; /** * Gets/Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * */ listWidth?: number; /** * Gets/Sets the hover/unhover animation duration of a drop-down list item. + * */ listItemHoverDuration?: number; @@ -25321,11 +25940,13 @@ interface IgTextEditor { * If the option is set to false the editor will attach the drop-down list element to the editor container * If the option is set to true the editor will attach its drop-down list to as a child of the body. * Note! This option can not be set runtime. + * */ dropDownAttachedToBody?: boolean; /** * Gets/Sets show/hide drop-down list animation duration in milliseconds. + * */ dropDownAnimationDuration?: number; @@ -25334,6 +25955,7 @@ interface IgTextEditor { * Notes: * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. * This option can not be set runtime. + * */ visibleItemsCount?: number; @@ -25342,6 +25964,7 @@ interface IgTextEditor { * Notes: * If both "excludeKeys" and "includeKeys" options are used, then "excludeKeys" has priority and includeKeys options is not respected. * The option is case sensitive! If the option is set runtime it's not applied on the current value. + * */ includeKeys?: string; @@ -25350,12 +25973,14 @@ interface IgTextEditor { * Notes: * If both "excludeKeys" and "includeKeys" options are used, then "excludeKeys" has priority and includeKeys options is not respected. * The option is case sensitive! If the option is set runtime it's not applied on the current value. + * */ excludeKeys?: string; /** * Gets/Sets the horizontal alignment of the text in the editor. * + * * Valid values: * "left" The text into the input gets aligned to the left. * "right" The text into the input gets aligned to the right. @@ -25365,12 +25990,14 @@ interface IgTextEditor { /** * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * */ placeHolder?: string; /** * Gets/Sets the action when the editor gets focused. The default value is selectAll. * + * * Valid values: * "selectAll" Setting this option will select all the text into the editor when the edit mode gets enetered. * "atStart" Setting this option will move the cursor at the begining the text into the editor when the edit mode gets enetered. @@ -25382,6 +26009,7 @@ interface IgTextEditor { /** * Gets the text mode of the editor such as: single-line text editor, password editor or multiline editor. That option has effect only on initialization. If based element (selector) is TEXTAREA, then it is used as input-field. * + * * Valid values: * "text" Single line text editor based on INPUT element is created. * "password" Editor based on INPUT element with type password is created. @@ -25391,27 +26019,32 @@ interface IgTextEditor { /** * Gets/Sets the ability of the editor to automatically move the dropdown list selection item from one end to the opposite side. When the last item is reached and spin down is performed, the first item gets selected and vice versa. This option has no effect there is no drop-down list. + * */ spinWrapAround?: boolean; /** * Gets/Sets if the editor should only allow values from the list of items. Matching is case-insensitive. + * */ isLimitedToListValues?: boolean; /** * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * */ revertIfNotValid?: boolean; /** * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * */ preventSubmitOnEnter?: boolean; /** * Gets/Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. * + * * Valid values: * "auto" If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. * "bottom" The drop-down list is opened at the bottom of the editor. @@ -25422,6 +26055,7 @@ interface IgTextEditor { /** * Gets/Sets the maximum length of a text which can be entered by the user. * Negative values or 0 disables that behavior. If set at runtime the editor doesn't apply the option to the cuurent value. + * */ maxLength?: number; @@ -25429,23 +26063,27 @@ interface IgTextEditor { * Gets the ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. * Note! In case there are no list items - the editor will reamin readonly * Note! This option can not be set runtime. + * */ dropDownOnReadOnly?: boolean; /** * Gets/Sets the ability to convert the input characters to upper case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. * Note! When the option is set at runtime the editor is not changing the current value. + * */ toUpper?: boolean; /** * Gets/Sets the ability to convert the input characters to lower case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. * Note! When the option is set at runtime the editor is not changing the current value. + * */ toLower?: boolean; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * */ suppressNotifications?: boolean; @@ -25453,12 +26091,14 @@ interface IgTextEditor { * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. * Note: The option does not perform device detection so its behavior is always active if enabled. * Note: When drop down is opened the only way to close it will be using the drop down button. + * */ suppressKeyboard?: boolean; /** * Gets/Sets the width of the control. * + * * Valid values: * "null" will stretch to fit data, if no other widths are defined. */ @@ -25467,6 +26107,7 @@ interface IgTextEditor { /** * Gets/Sets the height of the control. * + * * Valid values: * "null" will fit the editor inside its parent container, if no other heights are defined. */ @@ -25474,37 +26115,44 @@ interface IgTextEditor { /** * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * */ value?: any; /** * Gets/Sets tabIndex attribute for the editor input. + * */ tabIndex?: number; /** * Gets/Sets whether the editor value can become null. * If that option is false, and editor has no value, then value is set to an empty string. + * */ allowNullValue?: boolean; /** * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * */ nullValue?: string|number; /** * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * */ inputName?: string; /** * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * */ readOnly?: boolean; /** * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * */ disabled?: boolean; @@ -25512,217 +26160,135 @@ interface IgTextEditor { * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * */ validatorOptions?: any; /** * Set/Get the locale setting for the widget. + * */ locale?: any; /** * Set/Get the locale language setting for the widget. + * */ language?: string; /** * Set/Get the regional setting for the widget. + * */ regional?: string|Object; /** - * Event which is raised when the drop down is opening. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired when the drop down is opening. */ dropDownListOpening?: DropDownListOpeningEvent; /** - * Event which is raised after the drop down is opened. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired after the drop down is opened. */ dropDownListOpened?: DropDownListOpenedEvent; /** - * Event which is raised when the drop down is closing. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired when the drop down is closing. */ dropDownListClosing?: DropDownListClosingEvent; /** - * Event which is raised after the drop down is closed. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired after the drop down is closed. */ dropDownListClosed?: DropDownListClosedEvent; /** - * Event which is raised when an item in the drop down list is being selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. - * Use ui.item to obtain reference to the list item which is about to be selected. + * Fired when an item in the drop down list is being selected. */ dropDownItemSelecting?: DropDownItemSelectingEvent; /** - * Event which is raised after an item in the drop down list is selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. - * Use ui.item to obtain reference to the list item which is selected. + * Fired after an item in the drop down list is selected. */ dropDownItemSelected?: DropDownItemSelectedEvent; /** - * Event which is raised after text in the editor was changed. It can be raised when keyUp event occurs, + * Fired after the editor's text has been changed. It can be raised when keyUp event occurs, * when the clear button is clicked or when an item from a list is selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.text to obtain new text - * Use ui.oldText to obtain the old text. */ textChanged?: TextChangedEvent; /** - * Event which is raised before rendering of the editor completes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the editor performing rendering. - * Use ui.element to get a reference to the editor element. + * Fired before rendering of the editor has finished. */ rendering?: RenderingEvent; /** - * Event which is raised after rendering of the editor completes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the editor performing rendering. - * Use ui.element to get a reference to the editor element. + * Fired after rendering of the editor has finished. */ rendered?: RenderedEvent; /** - * Event which is raised on mousedown event. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mousedown event. */ mousedown?: MousedownEvent; /** - * Event which is raised on mouseup event. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseup event. */ mouseup?: MouseupEvent; /** - * Event which is raised on mousemove at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mousemove at any part of editor including the drop-down list. */ mousemove?: MousemoveEvent; /** - * Event which is raised on mouseover at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseover at any part of editor including the drop-down list. */ mouseover?: MouseoverEvent; /** - * Event which is raised on mouseleave at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseleave at any part of editor including the drop-down list. */ mouseout?: MouseoutEvent; /** - * Event which is raised when input field of editor loses focus. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired when the input field of the editor loses focus. */ blur?: BlurEvent; /** - * Event which is raised when input field of editor gets focus. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired when the input field of the editor gets focus. */ focus?: IgFocusEvent; /** - * Event which is raised on keydown event. + * Fired on keydown event. * Return false in order to cancel key action. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. */ keydown?: KeydownEvent; /** - * Event which is raised on keypress event. + * Fired on keypress event. * Return false in order to cancel key action. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. */ keypress?: KeypressEvent; /** - * Event which is raised on keyup event. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. + * Fired on keyup event. */ keyup?: KeyupEvent; /** - * Event which is raised before the editor value is changed. + * Fired before changing the editor's value. * Return false in order to cancel change. * It can be raised after loosing focus or on spin events. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the new value. - * Use ui.oldValue to obtain the old value. - * Use ui.editorInput to obtain reference to the editor input. */ valueChanging?: ValueChangingEvent; /** - * Event which is raised after the editor value is changed. It can be raised after loosing focus or on spin events. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the value entered from the user after internal formatting. - * Use ui.originalValue to obtain the value entered from the user before internal formatting. - * Use ui.editorInput to obtain reference to the editor input. + * Fired after the editor value is changed. It can be raised after loosing focus or on spin events. */ valueChanged?: ValueChangedEvent; @@ -25732,6 +26298,10 @@ interface IgTextEditor { [optionName: string]: any; } interface IgTextEditorMethods { + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.igtexteditor#options:language) + * Note that this method is for rare scenarios, see [language](ui.igtexteditor#options:language) or [locale](ui.igtexteditor#options:locale) option setter + */ changeLocale(): void; /** @@ -25908,6 +26478,7 @@ interface IgNumericEditor { /** * Gets/Sets list of items which are used as a source for the drop-down list. * Items in the list can be of type number. + * */ listItems?: any[]; @@ -25916,6 +26487,7 @@ interface IgNumericEditor { * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) options. + * */ negativeSign?: string; @@ -25923,6 +26495,7 @@ interface IgNumericEditor { * Gets/Sets the string, which is used as negative pattern. The "n" flag represents the value of number. The "-" and "()" flags are static part of pattern. * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * */ negativePattern?: string; @@ -25931,6 +26504,7 @@ interface IgNumericEditor { * Note: this option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. + * */ decimalSeparator?: string; @@ -25940,6 +26514,7 @@ interface IgNumericEditor { * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. + * */ groupSeparator?: string; @@ -25952,6 +26527,7 @@ interface IgNumericEditor { * Note: The numbers in the array must be positive integers. * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * */ groups?: any[]; @@ -25961,6 +26537,7 @@ interface IgNumericEditor { * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. + * */ maxDecimals?: number; @@ -25971,6 +26548,7 @@ interface IgNumericEditor { * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. + * */ minDecimals?: number; @@ -25978,12 +26556,14 @@ interface IgNumericEditor { * Gets/Sets whether the last decimal place will be rounded, when the maxDecimal option is defined and applied. * For example if the initial editor value is set to 123.4567, maxDecimals option is set to 3 and roundDecimals is enabled, * then editor will round the value and will display it as 123.457. If roundDecimals is disabled then editor value will be truncated to 123.456. + * */ roundDecimals?: boolean; /** * Gets/Sets the horizontal alignment of the text in the editor. * + * * Valid values: * "left" The text into the input gets aligned to the left. * "right" The text into the input gets aligned to the right. @@ -25996,6 +26576,7 @@ interface IgNumericEditor { * The range for the specific type follows the numeric type standards, e.g. in .NET Framework [floating-point](https://msdn.microsoft.com/en-us/library/9ahet949.aspx) types and [integral types](https://msdn.microsoft.com/en-us/library/exx3b86w.aspx). * In addition, the maximum value that can be set to [minDecimals](ui.igNumericEditor#options:minDecimals) and [maxDecimals](ui.igNumericEditor#options:maxDecimals) options can be 15, when editor is in 'double' mode and 7, when in 'float' mode. * + * * Valid values: * "double" the Number object is used with the limits of a double and if the value is not set, then the null or Number.NaN is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). Note: that is used as default. * "float" the Number object is used with the limits of a float and if the value is not set, then the null or Number.NaN is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). @@ -26012,22 +26593,26 @@ interface IgNumericEditor { /** * Gets/Sets the minimum value which can be entered in the editor by the end user. + * */ minValue?: number; /** * Gets/Sets the maximum value which can be entered in the editor by the end user. + * */ maxValue?: number; /** * Gets/Sets whether the editor value can become null. * If that option is disabled, and editor has no value, then value is set to 0 (or minValue/maxValue). + * */ allowNullValue?: boolean; /** * Gets/Sets the default delta-value which is used with "spin" [buttonType](ui.igNumericEditor#options:buttonType) or [spinUp](ui.igNumericEditor#methods:spinUp) and [spinDown](ui.igNumericEditor#methods:spinDown) methods to increment or decrement value in the editor. The value can not be negative. Non integer value is supported only for dataMode double and float. + * */ spinDelta?: number; @@ -26036,6 +26621,7 @@ interface IgNumericEditor { * If that option is set, then numeric value appears as a string with possible E-power flag. In edit mode the "E" or "e" character can be entered as well. * Notes: The "+" character is not supported in edit mode. * + * * Valid values: * "null" scientific format is disabled. * "E" scientific format is enabled and the "E" character is used. @@ -26048,11 +26634,13 @@ interface IgNumericEditor { /** * Gets/Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. + * */ spinWrapAround?: boolean; /** * Gets/Sets if the editor should only allow values from the list of items. Enabling this also causes spin actions to cycle through list items instead. + * */ isLimitedToListValues?: boolean; @@ -26086,12 +26674,14 @@ interface IgNumericEditor { /** * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. * + * */ value?: any; /** * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. * + * * Valid values: * "dropdown" A button to open/close the list is located on the right side of the editor. * "clear" A button to clear the value is located on the right side of the editor. @@ -26101,11 +26691,13 @@ interface IgNumericEditor { /** * Gets/Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * */ listWidth?: number; /** * Gets/Sets the hover/unhover animation duration of a drop-down list item. + * */ listItemHoverDuration?: number; @@ -26114,11 +26706,13 @@ interface IgNumericEditor { * If the option is set to false the editor will attach the drop-down list element to the editor container * If the option is set to true the editor will attach its drop-down list to as a child of the body. * Note! This option can not be set runtime. + * */ dropDownAttachedToBody?: boolean; /** * Gets/Sets show/hide drop-down list animation duration in milliseconds. + * */ dropDownAnimationDuration?: number; @@ -26127,17 +26721,20 @@ interface IgNumericEditor { * Notes: * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. * This option can not be set runtime. + * */ visibleItemsCount?: number; /** * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * */ placeHolder?: string; /** * Gets/Sets the action when the editor gets focused. The default value is selectAll. * + * * Valid values: * "selectAll" Setting this option will select all the text into the editor when the edit mode gets enetered. * "atStart" Setting this option will move the cursor at the begining the text into the editor when the edit mode gets enetered. @@ -26148,17 +26745,20 @@ interface IgNumericEditor { /** * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * */ revertIfNotValid?: boolean; /** * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * */ preventSubmitOnEnter?: boolean; /** * Gets/Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. * + * * Valid values: * "auto" If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. * "bottom" The drop-down list is opened at the bottom of the editor. @@ -26170,11 +26770,13 @@ interface IgNumericEditor { * Gets the ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. * Note! In case there are no list items - the editor will reamin readonly * Note! This option can not be set runtime. + * */ dropDownOnReadOnly?: boolean; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * */ suppressNotifications?: boolean; @@ -26182,12 +26784,14 @@ interface IgNumericEditor { * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. * Note: The option does not perform device detection so its behavior is always active if enabled. * Note: When drop down is opened the only way to close it will be using the drop down button. + * */ suppressKeyboard?: boolean; /** * Gets/Sets the width of the control. * + * * Valid values: * "null" will stretch to fit data, if no other widths are defined. */ @@ -26196,6 +26800,7 @@ interface IgNumericEditor { /** * Gets/Sets the height of the control. * + * * Valid values: * "null" will fit the editor inside its parent container, if no other heights are defined. */ @@ -26203,26 +26808,31 @@ interface IgNumericEditor { /** * Gets/Sets tabIndex attribute for the editor input. + * */ tabIndex?: number; /** * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * */ nullValue?: string|number; /** * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * */ inputName?: string; /** * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * */ readOnly?: boolean; /** * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * */ disabled?: boolean; @@ -26230,87 +26840,61 @@ interface IgNumericEditor { * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * */ validatorOptions?: any; /** * Set/Get the locale setting for the widget. + * */ locale?: any; /** * Set/Get the locale language setting for the widget. + * */ language?: string; /** * Set/Get the regional setting for the widget. + * */ regional?: string|Object; /** - * Event which is raised when the drop down is opening. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired when the drop down is opening. */ dropDownListOpening?: DropDownListOpeningEvent; /** - * Event which is raised after the drop down is opened. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired after the drop down is opened. */ dropDownListOpened?: DropDownListOpenedEvent; /** - * Event which is raised when the drop down is closing. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired when the drop down is closing. */ dropDownListClosing?: DropDownListClosingEvent; /** - * Event which is raised after the drop down is closed. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired after the drop down is closed. */ dropDownListClosed?: DropDownListClosedEvent; /** - * Event which is raised when an item in the drop down list is being selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. - * Use ui.item to obtain reference to the list item which is about to be selected. + * Fired when an item in the drop down list is being selected. */ dropDownItemSelecting?: DropDownItemSelectingEvent; /** - * Event which is raised after an item in the drop down list is selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. - * Use ui.item to obtain reference to the list item which is selected. + * Fired after an item in the drop down list is selected. */ dropDownItemSelected?: DropDownItemSelectedEvent; /** - * Event which is raised after text in the editor was changed. It can be raised when keyUp event occurs, + * Fired after the editor's text has been changed. It can be raised when keyUp event occurs, * when the clear button is clicked or when an item from a list is selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.text to obtain new text - * Use ui.oldText to obtain the old text. */ textChanged?: TextChangedEvent; @@ -26365,7 +26949,17 @@ interface IgNumericEditorMethods { * Gets current regional. */ getRegionalOption(): string; + + /** + * Changes the the regional settings of widget element to the language specified in [options.regional](ui.ignumericeditor#options:regional) + * Note that this method is for rare scenarios, use [regional](ui.ignumericeditor#options:regional) option setter + */ changeRegional(): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.igtexteditor#options:language) + * Note that this method is for rare scenarios, see [language](ui.igtexteditor#options:language) or [locale](ui.igtexteditor#options:locale) option setter + */ changeLocale(): void; /** @@ -26450,17 +27044,20 @@ interface IgCurrencyEditor { * Gets/Sets the string, which is used as positive pattern. The "n" flag represents the value of number. * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * */ positivePattern?: string; /** * Gets/Sets a string that is used as the currency symbol that is shown in display mode. + * */ currencySymbol?: string; /** * Gets/Sets list of items which are used as a source for the drop-down list. * Items in the list can be of type number. + * */ listItems?: any[]; @@ -26469,6 +27066,7 @@ interface IgCurrencyEditor { * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) options. + * */ negativeSign?: string; @@ -26476,6 +27074,7 @@ interface IgCurrencyEditor { * Gets/Sets the string, which is used as negative pattern. The "n" flag represents the value of number. The "-" and "()" flags are static part of pattern. * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * */ negativePattern?: string; @@ -26484,6 +27083,7 @@ interface IgCurrencyEditor { * Note: this option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. + * */ decimalSeparator?: string; @@ -26493,6 +27093,7 @@ interface IgCurrencyEditor { * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. + * */ groupSeparator?: string; @@ -26505,6 +27106,7 @@ interface IgCurrencyEditor { * Note: The numbers in the array must be positive integers. * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * */ groups?: any[]; @@ -26514,6 +27116,7 @@ interface IgCurrencyEditor { * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. + * */ maxDecimals?: number; @@ -26524,6 +27127,7 @@ interface IgCurrencyEditor { * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. + * */ minDecimals?: number; @@ -26531,12 +27135,14 @@ interface IgCurrencyEditor { * Gets/Sets whether the last decimal place will be rounded, when the maxDecimal option is defined and applied. * For example if the initial editor value is set to 123.4567, maxDecimals option is set to 3 and roundDecimals is enabled, * then editor will round the value and will display it as 123.457. If roundDecimals is disabled then editor value will be truncated to 123.456. + * */ roundDecimals?: boolean; /** * Gets/Sets the horizontal alignment of the text in the editor. * + * * Valid values: * "left" The text into the input gets aligned to the left. * "right" The text into the input gets aligned to the right. @@ -26549,6 +27155,7 @@ interface IgCurrencyEditor { * The range for the specific type follows the numeric type standards, e.g. in .NET Framework [floating-point](https://msdn.microsoft.com/en-us/library/9ahet949.aspx) types and [integral types](https://msdn.microsoft.com/en-us/library/exx3b86w.aspx). * In addition, the maximum value that can be set to [minDecimals](ui.igNumericEditor#options:minDecimals) and [maxDecimals](ui.igNumericEditor#options:maxDecimals) options can be 15, when editor is in 'double' mode and 7, when in 'float' mode. * + * * Valid values: * "double" the Number object is used with the limits of a double and if the value is not set, then the null or Number.NaN is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). Note: that is used as default. * "float" the Number object is used with the limits of a float and if the value is not set, then the null or Number.NaN is used depending on the option [allowNullValue](ui.igNumericEditor#options:allowNullValue). @@ -26565,22 +27172,26 @@ interface IgCurrencyEditor { /** * Gets/Sets the minimum value which can be entered in the editor by the end user. + * */ minValue?: number; /** * Gets/Sets the maximum value which can be entered in the editor by the end user. + * */ maxValue?: number; /** * Gets/Sets whether the editor value can become null. * If that option is disabled, and editor has no value, then value is set to 0 (or minValue/maxValue). + * */ allowNullValue?: boolean; /** * Gets/Sets the default delta-value which is used with "spin" [buttonType](ui.igNumericEditor#options:buttonType) or [spinUp](ui.igNumericEditor#methods:spinUp) and [spinDown](ui.igNumericEditor#methods:spinDown) methods to increment or decrement value in the editor. The value can not be negative. Non integer value is supported only for dataMode double and float. + * */ spinDelta?: number; @@ -26589,6 +27200,7 @@ interface IgCurrencyEditor { * If that option is set, then numeric value appears as a string with possible E-power flag. In edit mode the "E" or "e" character can be entered as well. * Notes: The "+" character is not supported in edit mode. * + * * Valid values: * "null" scientific format is disabled. * "E" scientific format is enabled and the "E" character is used. @@ -26601,11 +27213,13 @@ interface IgCurrencyEditor { /** * Gets/Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. + * */ spinWrapAround?: boolean; /** * Gets/Sets if the editor should only allow values from the list of items. Enabling this also causes spin actions to cycle through list items instead. + * */ isLimitedToListValues?: boolean; @@ -26639,12 +27253,14 @@ interface IgCurrencyEditor { /** * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. * + * */ value?: any; /** * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. * + * * Valid values: * "dropdown" A button to open/close the list is located on the right side of the editor. * "clear" A button to clear the value is located on the right side of the editor. @@ -26654,11 +27270,13 @@ interface IgCurrencyEditor { /** * Gets/Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * */ listWidth?: number; /** * Gets/Sets the hover/unhover animation duration of a drop-down list item. + * */ listItemHoverDuration?: number; @@ -26667,11 +27285,13 @@ interface IgCurrencyEditor { * If the option is set to false the editor will attach the drop-down list element to the editor container * If the option is set to true the editor will attach its drop-down list to as a child of the body. * Note! This option can not be set runtime. + * */ dropDownAttachedToBody?: boolean; /** * Gets/Sets show/hide drop-down list animation duration in milliseconds. + * */ dropDownAnimationDuration?: number; @@ -26680,17 +27300,20 @@ interface IgCurrencyEditor { * Notes: * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. * This option can not be set runtime. + * */ visibleItemsCount?: number; /** * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * */ placeHolder?: string; /** * Gets/Sets the action when the editor gets focused. The default value is selectAll. * + * * Valid values: * "selectAll" Setting this option will select all the text into the editor when the edit mode gets enetered. * "atStart" Setting this option will move the cursor at the begining the text into the editor when the edit mode gets enetered. @@ -26701,17 +27324,20 @@ interface IgCurrencyEditor { /** * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * */ revertIfNotValid?: boolean; /** * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * */ preventSubmitOnEnter?: boolean; /** * Gets/Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. * + * * Valid values: * "auto" If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. * "bottom" The drop-down list is opened at the bottom of the editor. @@ -26723,11 +27349,13 @@ interface IgCurrencyEditor { * Gets the ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. * Note! In case there are no list items - the editor will reamin readonly * Note! This option can not be set runtime. + * */ dropDownOnReadOnly?: boolean; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * */ suppressNotifications?: boolean; @@ -26735,12 +27363,14 @@ interface IgCurrencyEditor { * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. * Note: The option does not perform device detection so its behavior is always active if enabled. * Note: When drop down is opened the only way to close it will be using the drop down button. + * */ suppressKeyboard?: boolean; /** * Gets/Sets the width of the control. * + * * Valid values: * "null" will stretch to fit data, if no other widths are defined. */ @@ -26749,6 +27379,7 @@ interface IgCurrencyEditor { /** * Gets/Sets the height of the control. * + * * Valid values: * "null" will fit the editor inside its parent container, if no other heights are defined. */ @@ -26756,26 +27387,31 @@ interface IgCurrencyEditor { /** * Gets/Sets tabIndex attribute for the editor input. + * */ tabIndex?: number; /** * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * */ nullValue?: string|number; /** * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * */ inputName?: string; /** * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * */ readOnly?: boolean; /** * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * */ disabled?: boolean; @@ -26783,21 +27419,25 @@ interface IgCurrencyEditor { * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * */ validatorOptions?: any; /** * Set/Get the locale setting for the widget. + * */ locale?: any; /** * Set/Get the locale language setting for the widget. + * */ language?: string; /** * Set/Get the regional setting for the widget. + * */ regional?: string|Object; @@ -26859,6 +27499,11 @@ interface IgCurrencyEditorMethods { * Gets current regional. */ getRegionalOption(): string; + + /** + * Changes the the regional settings of widget element to the language specified in [options.regional](ui.ignumericeditor#options:regional) + * Note that this method is for rare scenarios, use [regional](ui.ignumericeditor#options:regional) option setter + */ changeRegional(): void; } interface JQuery { @@ -26870,12 +27515,14 @@ interface IgPercentEditor { * Gets/Sets the pattern for positive numeric values, which is used in display (no focus) state. * If you use the "en-US" culture the default value for "positivePattern" will be "n$" where the "$" flag represents the "numericSymbol" and the "n" flag represents the value of the number. * Note: this option has priority over possible regional settings. + * */ positivePattern?: string; /** * Gets/Sets the symbol, which is used in display (no focus) state. * Note: this option has priority over possible regional settings. + * */ percentSymbol?: string; @@ -26885,6 +27532,7 @@ interface IgPercentEditor { * For example, if the factor is 100 and the "value" is set to 0.123, then the editor will show string "12.3". * Possible values: 1 or 100. * Note: this option has priority over possible regional settings. + * */ displayFactor?: number; @@ -26893,6 +27541,7 @@ interface IgPercentEditor { * The range for the specific type follows the numeric type standards, e.g. in .NET Framework [floating-point](https://msdn.microsoft.com/en-us/library/9ahet949.aspx) types and [integral types](https://msdn.microsoft.com/en-us/library/exx3b86w.aspx). * In addition, the maximum value that can be set to [minDecimals](ui.igPercentEditor#options:minDecimals) and [maxDecimals](ui.igPercentEditor#options:maxDecimals) options can be 15, when editor is in 'double' mode and 7, when in 'float' mode. * + * * Valid values: * "double" the Number object is used with the limits of a double and if the value is not set, then the null or Number.NaN is used depending on the option [allowNullValue](ui.igpercenteditor#options:allowNullValue). Note: that is used as default. * "float" the Number object is used with the limits of a float and if the value is not set, then the null or Number.NaN is used depending on the option [allowNullValue](ui.igpercenteditor#options:allowNullValue). @@ -26909,12 +27558,14 @@ interface IgPercentEditor { /** * Gets/Sets the default delta-value which is used with "spin" [buttonType](ui.igpercenteditor#options:buttonType) or [spinUp](ui.igpercenteditor#methods:spinUp) and [spinDown](ui.igpercenteditor#methods:spinDown) methods to increment or decrement value in the editor. The value can not be negative. Non integer value is supported only for dataMode double and float. + * */ spinDelta?: number; /** * Gets/Sets list of items which are used as a source for the drop-down list. * Items in the list can be of type number. + * */ listItems?: any[]; @@ -26923,6 +27574,7 @@ interface IgPercentEditor { * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) options. + * */ negativeSign?: string; @@ -26930,6 +27582,7 @@ interface IgPercentEditor { * Gets/Sets the string, which is used as negative pattern. The "n" flag represents the value of number. The "-" and "()" flags are static part of pattern. * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * */ negativePattern?: string; @@ -26938,6 +27591,7 @@ interface IgPercentEditor { * Note: this option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. + * */ decimalSeparator?: string; @@ -26947,6 +27601,7 @@ interface IgPercentEditor { * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. + * */ groupSeparator?: string; @@ -26959,6 +27614,7 @@ interface IgPercentEditor { * Note: The numbers in the array must be positive integers. * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * */ groups?: any[]; @@ -26968,6 +27624,7 @@ interface IgPercentEditor { * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. + * */ maxDecimals?: number; @@ -26978,6 +27635,7 @@ interface IgPercentEditor { * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. + * */ minDecimals?: number; @@ -26985,12 +27643,14 @@ interface IgPercentEditor { * Gets/Sets whether the last decimal place will be rounded, when the maxDecimal option is defined and applied. * For example if the initial editor value is set to 123.4567, maxDecimals option is set to 3 and roundDecimals is enabled, * then editor will round the value and will display it as 123.457. If roundDecimals is disabled then editor value will be truncated to 123.456. + * */ roundDecimals?: boolean; /** * Gets/Sets the horizontal alignment of the text in the editor. * + * * Valid values: * "left" The text into the input gets aligned to the left. * "right" The text into the input gets aligned to the right. @@ -27000,17 +27660,20 @@ interface IgPercentEditor { /** * Gets/Sets the minimum value which can be entered in the editor by the end user. + * */ minValue?: number; /** * Gets/Sets the maximum value which can be entered in the editor by the end user. + * */ maxValue?: number; /** * Gets/Sets whether the editor value can become null. * If that option is disabled, and editor has no value, then value is set to 0 (or minValue/maxValue). + * */ allowNullValue?: boolean; @@ -27019,6 +27682,7 @@ interface IgPercentEditor { * If that option is set, then numeric value appears as a string with possible E-power flag. In edit mode the "E" or "e" character can be entered as well. * Notes: The "+" character is not supported in edit mode. * + * * Valid values: * "null" scientific format is disabled. * "E" scientific format is enabled and the "E" character is used. @@ -27031,11 +27695,13 @@ interface IgPercentEditor { /** * Gets/Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. + * */ spinWrapAround?: boolean; /** * Gets/Sets if the editor should only allow values from the list of items. Enabling this also causes spin actions to cycle through list items instead. + * */ isLimitedToListValues?: boolean; @@ -27069,12 +27735,14 @@ interface IgPercentEditor { /** * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. * + * */ value?: any; /** * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. * + * * Valid values: * "dropdown" A button to open/close the list is located on the right side of the editor. * "clear" A button to clear the value is located on the right side of the editor. @@ -27084,11 +27752,13 @@ interface IgPercentEditor { /** * Gets/Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * */ listWidth?: number; /** * Gets/Sets the hover/unhover animation duration of a drop-down list item. + * */ listItemHoverDuration?: number; @@ -27097,11 +27767,13 @@ interface IgPercentEditor { * If the option is set to false the editor will attach the drop-down list element to the editor container * If the option is set to true the editor will attach its drop-down list to as a child of the body. * Note! This option can not be set runtime. + * */ dropDownAttachedToBody?: boolean; /** * Gets/Sets show/hide drop-down list animation duration in milliseconds. + * */ dropDownAnimationDuration?: number; @@ -27110,17 +27782,20 @@ interface IgPercentEditor { * Notes: * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. * This option can not be set runtime. + * */ visibleItemsCount?: number; /** * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * */ placeHolder?: string; /** * Gets/Sets the action when the editor gets focused. The default value is selectAll. * + * * Valid values: * "selectAll" Setting this option will select all the text into the editor when the edit mode gets enetered. * "atStart" Setting this option will move the cursor at the begining the text into the editor when the edit mode gets enetered. @@ -27131,17 +27806,20 @@ interface IgPercentEditor { /** * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * */ revertIfNotValid?: boolean; /** * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * */ preventSubmitOnEnter?: boolean; /** * Gets/Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. * + * * Valid values: * "auto" If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. * "bottom" The drop-down list is opened at the bottom of the editor. @@ -27153,11 +27831,13 @@ interface IgPercentEditor { * Gets the ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. * Note! In case there are no list items - the editor will reamin readonly * Note! This option can not be set runtime. + * */ dropDownOnReadOnly?: boolean; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * */ suppressNotifications?: boolean; @@ -27165,12 +27845,14 @@ interface IgPercentEditor { * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. * Note: The option does not perform device detection so its behavior is always active if enabled. * Note: When drop down is opened the only way to close it will be using the drop down button. + * */ suppressKeyboard?: boolean; /** * Gets/Sets the width of the control. * + * * Valid values: * "null" will stretch to fit data, if no other widths are defined. */ @@ -27179,6 +27861,7 @@ interface IgPercentEditor { /** * Gets/Sets the height of the control. * + * * Valid values: * "null" will fit the editor inside its parent container, if no other heights are defined. */ @@ -27186,26 +27869,31 @@ interface IgPercentEditor { /** * Gets/Sets tabIndex attribute for the editor input. + * */ tabIndex?: number; /** * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * */ nullValue?: string|number; /** * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * */ inputName?: string; /** * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * */ readOnly?: boolean; /** * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * */ disabled?: boolean; @@ -27213,21 +27901,25 @@ interface IgPercentEditor { * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * */ validatorOptions?: any; /** * Set/Get the locale setting for the widget. + * */ locale?: any; /** * Set/Get the locale language setting for the widget. + * */ language?: string; /** * Set/Get the regional setting for the widget. + * */ regional?: string|Object; @@ -27297,6 +27989,11 @@ interface IgPercentEditorMethods { * Gets current regional. */ getRegionalOption(): string; + + /** + * Changes the the regional settings of widget element to the language specified in [options.regional](ui.ignumericeditor#options:regional) + * Note that this method is for rare scenarios, use [regional](ui.ignumericeditor#options:regional) option setter + */ changeRegional(): void; } interface JQuery { @@ -27307,6 +28004,7 @@ interface IgMaskEditor { /** * Gets visibility of the clear button. That option can be set only on initialization. * + * * Valid values: * "clear" A button to clear the value is located on the right side of the editor. */ @@ -27330,12 +28028,14 @@ interface IgMaskEditor { * >: all letters to the right are converted to the upper case. In order to disable conversion, the ">" flag should be used again. * <: all letters to the right are converted to the lower case. In order to disable conversion, the "<" flag should be used again. * Note! This option can not be set runtime. + * */ inputMask?: string; /** * It affects the value of the control (value method/option and submitted in forms). It defines what the value should contain from text, unfilled prompts and literals. The default is allText and when used value method/option returns the text entered, all prompts (positions) and literals. * + * * Valid values: * "rawText" only entered text. All unfilled prompts (positions) and literals are ignored (removed). * "rawTextWithRequiredPrompts" only entered text and required prompts (positions). All optional unfilled prompts and literals are ignored (removed) @@ -27348,16 +28048,19 @@ interface IgMaskEditor { /** * Gets character which is used as prompt in edit mode for available entry position. + * */ unfilledCharsPrompt?: string; /** * Gets/Sets character which is used as replacement of not-filled required position in mask when editor is in display mode (not focused). + * */ padChar?: string; /** * Gets/Sets character which is used as replacement of not-filled required position in mask when application calls get for the [value](ui.igmaskeditor#methods:value) methods. + * */ emptyChar?: string; @@ -27366,6 +28069,7 @@ interface IgMaskEditor { * Notes: * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. * Note! This option can not be se runtime. + * */ includeKeys?: string; @@ -27374,6 +28078,7 @@ interface IgMaskEditor { * Notes: * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. * Note! This option can not be se runtime. + * */ excludeKeys?: string; @@ -27440,6 +28145,7 @@ interface IgMaskEditor { /** * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * */ value?: any; suppressKeyboard?: boolean; @@ -27447,6 +28153,7 @@ interface IgMaskEditor { /** * Gets/Sets the horizontal alignment of the text in the editor. * + * * Valid values: * "left" The text into the input gets aligned to the left. * "right" The text into the input gets aligned to the right. @@ -27456,12 +28163,14 @@ interface IgMaskEditor { /** * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * */ placeHolder?: string; /** * Gets/Sets the action when the editor gets focused. The default value is selectAll. * + * * Valid values: * "selectAll" Setting this option will select all the text into the editor when the edit mode gets enetered. * "atStart" Setting this option will move the cursor at the begining the text into the editor when the edit mode gets enetered. @@ -27472,34 +28181,40 @@ interface IgMaskEditor { /** * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * */ revertIfNotValid?: boolean; /** * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * */ preventSubmitOnEnter?: boolean; /** * Gets/Sets the ability to convert the input characters to upper case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. * Note! When the option is set at runtime the editor is not changing the current value. + * */ toUpper?: boolean; /** * Gets/Sets the ability to convert the input characters to lower case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. * Note! When the option is set at runtime the editor is not changing the current value. + * */ toLower?: boolean; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * */ suppressNotifications?: boolean; /** * Gets/Sets the width of the control. * + * * Valid values: * "null" will stretch to fit data, if no other widths are defined. */ @@ -27508,6 +28223,7 @@ interface IgMaskEditor { /** * Gets/Sets the height of the control. * + * * Valid values: * "null" will fit the editor inside its parent container, if no other heights are defined. */ @@ -27515,32 +28231,38 @@ interface IgMaskEditor { /** * Gets/Sets tabIndex attribute for the editor input. + * */ tabIndex?: number; /** * Gets/Sets whether the editor value can become null. * If that option is false, and editor has no value, then value is set to an empty string. + * */ allowNullValue?: boolean; /** * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * */ nullValue?: string|number; /** * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * */ inputName?: string; /** * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * */ readOnly?: boolean; /** * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * */ disabled?: boolean; @@ -27548,21 +28270,25 @@ interface IgMaskEditor { * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * */ validatorOptions?: any; /** * Set/Get the locale setting for the widget. + * */ locale?: any; /** * Set/Get the locale language setting for the widget. + * */ language?: string; /** * Set/Get the regional setting for the widget. + * */ regional?: string|Object; dropDownListOpening?: DropDownListOpeningEvent; @@ -27573,12 +28299,8 @@ interface IgMaskEditor { dropDownItemSelected?: DropDownItemSelectedEvent; /** - * Event which is raised after text in the editor was changed. It can be raised when keyUp event occurs, + * Fired after the editor's text has been changed. It can be raised when keyUp event occurs, * when the clear button is clicked or when an item from a list is selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.text to obtain new text - * Use ui.oldText to obtain the old text. */ textChanged?: TextChangedEvent; @@ -27611,6 +28333,11 @@ interface IgMaskEditorMethods { * Checks if the value in the editor is valid. Note: This function will not trigger automatic notifications. */ isValid(): boolean; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.igtexteditor#options:language) + * Note that this method is for rare scenarios, see [language](ui.igtexteditor#options:language) or [locale](ui.igtexteditor#options:locale) option setter + */ changeLocale(): void; /** @@ -27662,18 +28389,21 @@ interface IgDateEditor { /** * Gets/Sets the value of the editor. Date object can be set as value. String can be set and the editor will pass it to the Date object constructor and use the corresponding Date object as the value. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. + * */ value?: Date; /** * Gets the minimum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. + * */ minValue?: Date; /** * Gets the maximum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. + * */ maxValue?: Date; @@ -27715,6 +28445,7 @@ interface IgDateEditor { * "f": milliseconds field in hundreds * "ff": milliseconds field in tenths * "fff": milliseconds field + * */ dateDisplayFormat?: string; @@ -27745,6 +28476,7 @@ interface IgDateEditor { * "ff": milliseconds field in tenths * "fff": milliseconds field * Note! This option can not be set runtime. + * */ dateInputFormat?: string; @@ -27754,6 +28486,7 @@ interface IgDateEditor { * For example 10:00 AM from a client with local offset of 5 hours ahead of GMT will be serialized as: * "2016-11-11T10:00:00+05:00" * + * * Valid values: * "date" The value method returns a Date object. When this mode is set the value sent to the server on submit is serialized as ISO 8061 string with local time and zone values by default. * "displayModeText" The "text" in display mode (no focus) format (pattern) is used to be send to the server and is returned from the value() method (returns a string object). @@ -27765,12 +28498,14 @@ interface IgDateEditor { * Gets/Sets time zone offset from UTC, in minutes. The client date values are displayed with this offset instead of the local one. * Note: It is recommended that this option is used with an UTC value (e.g. "2016-11-03T14:08:08.504Z") so the outcome is consistent. * Values with ambiguous time zone could map to unpredictable times depending on the user agent local zone. + * */ displayTimeOffset?: any; /** * Gets visibility of the spin and clear buttons. That option can be set only on initialization. Combinations like 'spin,clear' are supported too. * + * * Valid values: * "clear" A button to clear the value is located on the right side of the editor. * "spin" Spin buttons are located on the right side of the editor @@ -27792,6 +28527,7 @@ interface IgDateEditor { * } * Time periods that don't have values use 1 as default. * + * * Valid values: * "number" Value this value it is applied to all time periods - years, days, minutes, etc. * "object" A configuration object, which defines specific values for each time period. The option can accept the following format: @@ -27802,12 +28538,14 @@ interface IgDateEditor { * Gets/Sets ability to modify only 1 date field on spin events. * Value false enables changes of other date fields when incremented or decremented date-field reaches its limits. * Value true modifies only value of one field. + * */ limitSpinToCurrentField?: boolean; /** * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. * The option is only applied in "date" [dataMode](ui.%%WidgetNameLowered%%#options:dataMode). + * */ enableUTCDates?: boolean; @@ -27815,16 +28553,19 @@ interface IgDateEditor { * Gets/Sets year for auto detection of 20th and 21st centuries. * That option is used to automatically fill century when the user entered only 1 or 2 digits into the year field or when the date pattern contains only 1 or 2 year positions, e.g. "yy" or "y". * If user entered value larger than value of this option, then 20th century is used, otherwise the 21st. + * */ centuryThreshold?: number; /** * Gets/Set value used to increase/decrease year part of the date, in order to set difference between year in Gregorian calendar and displayed year. + * */ yearShift?: number; /** * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * */ nullValue?: string|number|Date; @@ -27899,6 +28640,7 @@ interface IgDateEditor { * Notes: * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. * Note! This option can not be se runtime. + * */ includeKeys?: string; @@ -27907,6 +28649,7 @@ interface IgDateEditor { * Notes: * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. * Note! This option can not be se runtime. + * */ excludeKeys?: string; @@ -27938,6 +28681,7 @@ interface IgDateEditor { /** * Gets/Sets the horizontal alignment of the text in the editor. * + * * Valid values: * "left" The text into the input gets aligned to the left. * "right" The text into the input gets aligned to the right. @@ -27947,12 +28691,14 @@ interface IgDateEditor { /** * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * */ placeHolder?: string; /** * Gets/Sets the action when the editor gets focused. The default value is selectAll. * + * * Valid values: * "selectAll" Setting this option will select all the text into the editor when the edit mode gets enetered. * "atStart" Setting this option will move the cursor at the begining the text into the editor when the edit mode gets enetered. @@ -27963,22 +28709,26 @@ interface IgDateEditor { /** * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * */ revertIfNotValid?: boolean; /** * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * */ preventSubmitOnEnter?: boolean; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * */ suppressNotifications?: boolean; /** * Gets/Sets the width of the control. * + * * Valid values: * "null" will stretch to fit data, if no other widths are defined. */ @@ -27987,6 +28737,7 @@ interface IgDateEditor { /** * Gets/Sets the height of the control. * + * * Valid values: * "null" will fit the editor inside its parent container, if no other heights are defined. */ @@ -27994,27 +28745,32 @@ interface IgDateEditor { /** * Gets/Sets tabIndex attribute for the editor input. + * */ tabIndex?: number; /** * Gets/Sets whether the editor value can become null. * If that option is false, and editor has no value, then value is set to an empty string. + * */ allowNullValue?: boolean; /** * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * */ inputName?: string; /** * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * */ readOnly?: boolean; /** * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * */ disabled?: boolean; @@ -28022,21 +28778,25 @@ interface IgDateEditor { * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * */ validatorOptions?: any; /** * Set/Get the locale setting for the widget. + * */ locale?: any; /** * Set/Get the locale language setting for the widget. + * */ language?: string; /** * Set/Get the regional setting for the widget. + * */ regional?: string|Object; @@ -28076,6 +28836,10 @@ interface IgDateEditor { [optionName: string]: any; } interface IgDateEditorMethods { + /** + * Changes the the regional settings of widget element to the language specified in [options.regional](ui.igdateeditor#options:regional) + * Note that this method is for rare scenarios, use [regional](ui.igdateeditor#options:regional) option setter + */ changeRegional(): void; /** @@ -28096,6 +28860,8 @@ interface IgDateEditorMethods { /** * Sets selected date. This method can be used when dataMode is set as either displayModeText or editModeText. * In such cases the value() cannot accept a date object as a new value and getSelectedDate() can be used to replace that functionality. + * + * @param date */ selectDate(date: Date): void; @@ -28146,22 +28912,22 @@ interface ItemSelectedEvent { interface ItemSelectedEventUIParam { /** - * Used to obtain reference to igEditor. + * Gets a reference to the editor. */ owner?: any; /** - * Used to obtain reference to the date object which is selected. + * Gets a reference to the selected date object. */ dateFromPicker?: any; /** - * Used to obtain a referece to the selected html element from the calendar. + * Gets a reference to the selected html element from the calendar. */ item?: any; /** - * Used to obtain a reference to jQuery UI date picker, used as a calendar from the igDatePicker. + * Gets a reference to jQuery UI date picker widget, used as a calendar from the igDatePicker. */ calendar?: any; } @@ -28170,6 +28936,7 @@ interface IgDatePicker { /** * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too. * + * * Valid values: * "dropdown" A button to open/close the list is located on the right side of the editor. * "clear" A button to clear the value is located on the right side of the editor. @@ -28179,12 +28946,14 @@ interface IgDatePicker { /** * Gets/Sets the options supported by the [jquery.ui.datepicker](http://api.jqueryui.com/datepicker/). Only options related to the drop-down calendar are supported. + * */ datepickerOptions?: any; /** * Gets the ability to limit igDatePicker to be used only as s calendar. When set to true the editor input is not editable. * Note! This option can not be set runtime. + * */ dropDownOnReadOnly?: boolean; @@ -28216,24 +28985,28 @@ interface IgDatePicker { /** * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. * Note: The option does not perform device detection so its behavior is always active if enabled. + * */ suppressKeyboard?: boolean; /** * Gets/Sets the value of the editor. Date object can be set as value. String can be set and the editor will pass it to the Date object constructor and use the corresponding Date object as the value. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. + * */ value?: Date; /** * Gets the minimum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. + * */ minValue?: Date; /** * Gets the maximum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. + * */ maxValue?: Date; @@ -28275,6 +29048,7 @@ interface IgDatePicker { * "f": milliseconds field in hundreds * "ff": milliseconds field in tenths * "fff": milliseconds field + * */ dateDisplayFormat?: string; @@ -28305,6 +29079,7 @@ interface IgDatePicker { * "ff": milliseconds field in tenths * "fff": milliseconds field * Note! This option can not be set runtime. + * */ dateInputFormat?: string; @@ -28314,6 +29089,7 @@ interface IgDatePicker { * For example 10:00 AM from a client with local offset of 5 hours ahead of GMT will be serialized as: * "2016-11-11T10:00:00+05:00" * + * * Valid values: * "date" The value method returns a Date object. When this mode is set the value sent to the server on submit is serialized as ISO 8061 string with local time and zone values by default. * "displayModeText" The "text" in display mode (no focus) format (pattern) is used to be send to the server and is returned from the value() method (returns a string object). @@ -28325,6 +29101,7 @@ interface IgDatePicker { * Gets/Sets time zone offset from UTC, in minutes. The client date values are displayed with this offset instead of the local one. * Note: It is recommended that this option is used with an UTC value (e.g. "2016-11-03T14:08:08.504Z") so the outcome is consistent. * Values with ambiguous time zone could map to unpredictable times depending on the user agent local zone. + * */ displayTimeOffset?: any; @@ -28343,6 +29120,7 @@ interface IgDatePicker { * } * Time periods that don't have values use 1 as default. * + * * Valid values: * "number" Value this value it is applied to all time periods - years, days, minutes, etc. * "object" A configuration object, which defines specific values for each time period. The option can accept the following format: @@ -28353,12 +29131,14 @@ interface IgDatePicker { * Gets/Sets ability to modify only 1 date field on spin events. * Value false enables changes of other date fields when incremented or decremented date-field reaches its limits. * Value true modifies only value of one field. + * */ limitSpinToCurrentField?: boolean; /** * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. * The option is only applied in "date" [dataMode](ui.%%WidgetNameLowered%%#options:dataMode). + * */ enableUTCDates?: boolean; @@ -28366,16 +29146,19 @@ interface IgDatePicker { * Gets/Sets year for auto detection of 20th and 21st centuries. * That option is used to automatically fill century when the user entered only 1 or 2 digits into the year field or when the date pattern contains only 1 or 2 year positions, e.g. "yy" or "y". * If user entered value larger than value of this option, then 20th century is used, otherwise the 21st. + * */ centuryThreshold?: number; /** * Gets/Set value used to increase/decrease year part of the date, in order to set difference between year in Gregorian calendar and displayed year. + * */ yearShift?: number; /** * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * */ nullValue?: string|number|Date; @@ -28419,6 +29202,7 @@ interface IgDatePicker { * Notes: * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. * Note! This option can not be se runtime. + * */ includeKeys?: string; @@ -28427,6 +29211,7 @@ interface IgDatePicker { * Notes: * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. * Note! This option can not be se runtime. + * */ excludeKeys?: string; @@ -28458,6 +29243,7 @@ interface IgDatePicker { /** * Gets/Sets the horizontal alignment of the text in the editor. * + * * Valid values: * "left" The text into the input gets aligned to the left. * "right" The text into the input gets aligned to the right. @@ -28467,12 +29253,14 @@ interface IgDatePicker { /** * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * */ placeHolder?: string; /** * Gets/Sets the action when the editor gets focused. The default value is selectAll. * + * * Valid values: * "selectAll" Setting this option will select all the text into the editor when the edit mode gets enetered. * "atStart" Setting this option will move the cursor at the begining the text into the editor when the edit mode gets enetered. @@ -28483,22 +29271,26 @@ interface IgDatePicker { /** * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * */ revertIfNotValid?: boolean; /** * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * */ preventSubmitOnEnter?: boolean; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * */ suppressNotifications?: boolean; /** * Gets/Sets the width of the control. * + * * Valid values: * "null" will stretch to fit data, if no other widths are defined. */ @@ -28507,6 +29299,7 @@ interface IgDatePicker { /** * Gets/Sets the height of the control. * + * * Valid values: * "null" will fit the editor inside its parent container, if no other heights are defined. */ @@ -28514,27 +29307,32 @@ interface IgDatePicker { /** * Gets/Sets tabIndex attribute for the editor input. + * */ tabIndex?: number; /** * Gets/Sets whether the editor value can become null. * If that option is false, and editor has no value, then value is set to an empty string. + * */ allowNullValue?: boolean; /** * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * */ inputName?: string; /** * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * */ readOnly?: boolean; /** * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * */ disabled?: boolean; @@ -28542,39 +29340,35 @@ interface IgDatePicker { * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * */ validatorOptions?: any; /** * Set/Get the locale setting for the widget. + * */ locale?: any; /** * Set/Get the locale language setting for the widget. + * */ language?: string; /** * Set/Get the regional setting for the widget. + * */ regional?: string|Object; /** - * Event which is raised when the drop down is opening. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.calendar to obtain a reference to jQuery UI date picker widget, used as a calendar from the igDatePicker. + * Fired when the drop down is opening. */ dropDownListOpening?: DropDownListOpeningEvent; /** - * Event which is raised after the drop down is opened. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.calendar to obtain a reference to jQuery UI date picker widget, used as a calendar from the igDatePicker. + * Fired after the drop down is opened. */ dropDownListOpened?: DropDownListOpenedEvent; @@ -28589,11 +29383,7 @@ interface IgDatePicker { dropDownItemSelecting?: DropDownItemSelectingEvent; /** - * Event which is raised after the drop down (calendar) is closed. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.calendar to obtain a reference to jQuery UI date picker widget, used as a calendar from the igDatePicker. + * Fired after the drop down (calendar) is closed. */ dropDownListClosed?: DropDownListClosedEvent; @@ -28603,12 +29393,7 @@ interface IgDatePicker { dropDownItemSelected?: DropDownItemSelectedEvent; /** - * Event which is raised after a date selection in the calendar. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.dateFromPicker to obtain reference to the date object which is selected. - * Use ui.item to obtain a referece to the selected html element from the calendar. - * Use ui.calendar to obtain a reference to jQuery UI date picker, used as a calendar from the igDatePicker. + * Fired after a date selection in the calendar. */ itemSelected?: ItemSelectedEvent; @@ -28618,6 +29403,10 @@ interface IgDatePicker { [optionName: string]: any; } interface IgDatePickerMethods { + /** + * Changes the the regional settings of widget element to the language specified in [options.regional](ui.igdatepicker#options:regional) + * Note that this method is for rare scenarios, use [regional](ui.igdatepicker#options:regional) option setter + */ changeRegional(): void; /** @@ -28672,6 +29461,8 @@ interface IgDatePickerMethods { /** * Sets selected date. This method can be used when dataMode is set as either displayModeText or editModeText. * In such cases the value() cannot accept a date object as a new value and getSelectedDate() can be used to replace that functionality. + * + * @param date */ selectDate(date: Date): void; @@ -28711,12 +29502,14 @@ interface JQuery { interface IgCheckboxEditor { /** * Gets/Sets whether the checkbox is checked. + * */ checked?: boolean; /** * Gets/Sets size of the checkbox based on preset styles.For different sizes, define 'width' and 'height' options instead. * + * * Valid values: * "verysmall" The size of the Checkbox editor is very small. * "small" The size of the Checkbox editor is small. @@ -28728,16 +29521,19 @@ interface IgCheckboxEditor { /** * Gets/Sets a custom class on the checkbox. Custom image can be used this way. * The following jQuery classes can be used in addition http://api.jqueryui.com/theming/icons/ + * */ iconClass?: string; /** * Gets/Sets tabIndex attribute for the editor input. + * */ tabIndex?: number; /** * Gets/Sets the readonly attribute. Does not allow editing. Disables changing the checkbox state as an interaction, but it still can be changed programmatically. On submit the current value is sent into the request. + * */ readOnly?: boolean; allowNullValue?: boolean; @@ -28746,6 +29542,7 @@ interface IgCheckboxEditor { /** * Gets/Sets the width of the control. * + * * Valid values: * "null" will stretch to fit data, if no other widths are defined. */ @@ -28754,6 +29551,7 @@ interface IgCheckboxEditor { /** * Gets/Sets the height of the control. * + * * Valid values: * "null" will fit the editor inside its parent container, if no other heights are defined. */ @@ -28761,16 +29559,19 @@ interface IgCheckboxEditor { /** * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * */ value?: any; /** * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * */ inputName?: string; /** * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * */ disabled?: boolean; @@ -28778,154 +29579,98 @@ interface IgCheckboxEditor { * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * */ validatorOptions?: any; /** * Set/Get the locale setting for the widget. + * */ locale?: any; /** * Set/Get the locale language setting for the widget. + * */ language?: string; /** * Set/Get the regional setting for the widget. + * */ regional?: string|Object; /** - * Event which is raised before value in editor was changed. + * Fired before changing the editor's value. * Return false in order to cancel change. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the new value. - * Use ui.newState to obtain the new state. - * Use ui.oldValue to obtain the old value. - * Use ui.oldState to obtain the old state. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput obtain reference to the editor element. */ valueChanging?: ValueChangingEvent; /** - * Event which is raised after value in editor was changed. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the new value. - * Use ui.newState to obtain the new state. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput obtain reference to the editor element. + * Fired after the editor's value has been changed. */ valueChanged?: ValueChangedEvent; /** - * Event which is raised before rendering of the editor completes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the editor performing rendering. - * Use ui.element to get a reference to the editor element. + * Fired before rendering of the editor has finished. */ rendering?: RenderingEvent; /** - * Event which is raised after rendering of the editor completes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the editor performing rendering. - * Use ui.element to get a reference to the editor element. + * Fired after rendering of the editor has finished. */ rendered?: RenderedEvent; /** - * Event which is raised on mousedown event. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mousedown event. */ mousedown?: MousedownEvent; /** - * Event which is raised on mouseup event. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseup event. */ mouseup?: MouseupEvent; /** - * Event which is raised on mousemove at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mousemove at any part of editor including the drop-down list. */ mousemove?: MousemoveEvent; /** - * Event which is raised on mouseover at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseover at any part of editor including the drop-down list. */ mouseover?: MouseoverEvent; /** - * Event which is raised on mouseleave at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseleave at any part of editor including the drop-down list. */ mouseout?: MouseoutEvent; /** - * Event which is raised when input field of editor loses focus. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired when the input field of the editor loses focus. */ blur?: BlurEvent; /** - * Event which is raised when input field of editor gets focus. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired when the input field of the editor gets focus. */ focus?: IgFocusEvent; /** - * Event which is raised on keydown event. + * Fired on keydown event. * Return false in order to cancel key action. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. */ keydown?: KeydownEvent; /** - * Event which is raised on keypress event. + * Fired on keypress event. * Return false in order to cancel key action. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. */ keypress?: KeypressEvent; /** - * Event which is raised on keyup event. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. + * Fired on keyup event. */ keyup?: KeyupEvent; @@ -28946,6 +29691,8 @@ interface IgCheckboxEditorMethods { * This option is used when the checkbox is intended to operate as a Boolean editor. In that case the return type is bool. * 2. If the [value](ui.igcheckboxeditor#options:value) option IS defined, then 'value' method will return the value that will be submitted when the editor is checked and the form is submitted. * To get checked state regardless of the 'value' option, use $(".selector").igCheckboxEditor("option", "checked"); + * + * @param newValue */ value(newValue: Object): string; @@ -29012,6 +29759,553 @@ interface JQuery { data(propertyName: "igCheckboxEditor"): IgCheckboxEditorMethods; } +interface IgTimePickerItemsDelta { + hours?: number; + minutes?: number; + + /** + * Option for IgTimePickerItemsDelta + */ + [optionName: string]: any; +} + +interface IgTimePicker { + /** + * Gets delta-value which is used to generate the drop-down items for the time picker. + * Accepted values for deltas are positive integer numbers, and the fractional portion of floating point numbers is ignored. + * + * object A configuration object, which defines specific values for each time period. The option can accept the following format: + * itemsDelta: { + * hours: 0, + * minutes: 30, + * } + * Time periods that don't have values use 0 as default for hours and 30 for minutes. + */ + itemsDelta?: IgTimePickerItemsDelta; + + /** + * Gets/Sets delta-value which is used to increment or decrement the editor time on spin actions.When not editing (focused) the delta is applied on the day if available in the input mask or the lowest available period. + * When in edit mode the time period, where the cursor is positioned, is incremented or decremented with the defined delta value. + * Accepted values for deltas are positive integer numbers, and the fractional portion of floating point numbers is ignored. + * spinDelta: { + * hours: 12, + * minutes: 15 + * } + * Default value is {hours: 1, minutes: 30}. + * + */ + spinDelta?: any; + + /** + * Gets format of time while timepicker has focus. + * Value of that option can be set to explicit time pattern or to a flag defined by regional settings. + * If value is set to explicit time pattern and pattern besides date-flags has explicit characters which match with time-flags or mask-flags, then the "escape" character should be used in front of them. + * If option is not set, then the "time" is used automatically. + * List of predefined regional flags: + * "time": the timePattern member of regional option is used + * List of explicit characters, which should have escape \\ character in front of them: C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f. + * List of time-flags when explicit time pattern is used: + * "t": first character of string which represents AM/PM field + * "tt": 2 characters of string which represents AM/PM field + * "hh": hours field in 12-hours format with leading zero + * "HH": hours field in 24-hours format with leading zero + * "mm": minutes field with leading zero + * Note! This option can not be set runtime. + * + */ + timeInputFormat?: string; + + /** + * Gets/Sets format of time while timepicker has no focus. + * Value of that option can be set to a specific time pattern or to a flag defined by regional settings. + * If value is not set, then the timeInputFormat is used automatically. + * If value is set to explicit time pattern and pattern besides time-flags has explicit characters which match with time-flags or mask-flags, then the "escape" character should be used in front of them. + * List of predefined regional flags: + * "time": the timePattern member of regional option is used + * List of explicit characters, which should have escape \\ character in front of them: + * C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f. + * List of time-flags when explicit time pattern is used: + * "t": first character of string which represents AM/PM field + * "tt": 2 characters of string which represents AM/PM field + * "h": hours field in 12-hours format without leading zero + * "hh": hours field in 12-hours format with leading zero + * "H": hours field in 24-hours format without leading zero + * "HH": hours field in 24-hours format with leading zero + * "m": minutes field without leading zero + * "mm": minutes field with leading zero + * + */ + timeDisplayFormat?: string; + + /** + * Gets/Sets if the editor should only allow values from the list of items. Matching is case-insensitive. + * + */ + isLimitedToListValues?: boolean; + + /** + * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. + * Note: The option does not perform device detection so its behavior is always active if enabled. + * Note: When drop down is opened the only way to close it will be using the drop down button. + * + */ + suppressKeyboard?: boolean; + + /** + * Gets/Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the timepicker has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * + * + * Valid values: + * "auto" If the option is set to auto the timepicker has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * "bottom" The drop-down list is opened at the bottom of the timepicker. + * "top" The drop-down list is opened at the top of the timepicker. + */ + dropDownOrientation?: string; + + /** + * Gets the number of the items to be shown at once when the drop-down list get opened. + * Notes: + * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. + * This option can not be set runtime. + * + */ + visibleItemsCount?: number; + + /** + * Gets/Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of timepicker is set as a drop-down width. + * + */ + listWidth?: number; + + /** + * Gets/Sets the hover/unhover animation duration of a drop-down list item. + * + */ + listItemHoverDuration?: number; + + /** + * Gets wheather the drop-down list element is attached to the body of the document, or to the timepicker container element. + * If the option is set to false the timepicker will attach the drop-down list element to the timepicker container + * If the option is set to true the timepicker will attach its drop-down list to as a child of the body. + * Note! This option can not be set runtime. + * + */ + dropDownAttachedToBody?: boolean; + + /** + * Gets/Sets show/hide drop-down list animation duration in milliseconds. + * + */ + dropDownAnimationDuration?: number; + + /** + * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown, clear' or 'spin, clear' are supported too.Note! This option can not be set runtime. + * Note! A combination like 'dropdown, spin' is not allowed. + * + * + * Valid values: + * "dropdown" A button to open/close the list is located on the right side of the editor. + * "clear" A button to clear the value is located on the right side of the editor. + * "spin" Spin buttons are located on the right side of the editor. + */ + buttonType?: string; + + /** + * Gets/Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. + * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. + * + */ + spinWrapAround?: boolean; + + /** + * Removed from timepicker options + */ + dateDisplayFormat?: any; + + /** + * Removed from timepicker options + */ + dateInputFormat?: any; + + /** + * Removed from timepicker options + */ + yearShift?: any; + + /** + * Removed from timepicker options + */ + displayTimeOffset?: any; + + /** + * Gets/Sets the value of the editor. Date object can be set as value. String can be set and the editor will pass it to the Date object constructor and use the corresponding Date object as the value. MVC date format can be used too. + * Note! This option doesn't use the dateInputFormat to extract the date. + * + */ + value?: Date; + + /** + * Gets the minimum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. + * Note! This option doesn't use the dateInputFormat to extract the date. + * + */ + minValue?: Date; + + /** + * Gets the maximum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. + * Note! This option doesn't use the dateInputFormat to extract the date. + * + */ + maxValue?: Date; + + /** + * Gets the value type returned by the get of value() method and option. Also affects how the value is stored for form submit. + * The [enableUTCDates](ui.%%WidgetNameLowered%%#options:enableUTCDates) option can be used to output an UTC ISO string instead. + * For example 10:00 AM from a client with local offset of 5 hours ahead of GMT will be serialized as: + * "2016-11-11T10:00:00+05:00" + * + * + * Valid values: + * "date" The value method returns a Date object. When this mode is set the value sent to the server on submit is serialized as ISO 8061 string with local time and zone values by default. + * "displayModeText" The "text" in display mode (no focus) format (pattern) is used to be send to the server and is returned from the value() method (returns a string object). + * "editModeText" The "text" in edit mode (focus) format (pattern) is used to be send to the server and is returned from the value() method (returns a string object). + */ + dataMode?: string; + + /** + * Gets/Sets ability to modify only 1 date field on spin events. + * Value false enables changes of other date fields when incremented or decremented date-field reaches its limits. + * Value true modifies only value of one field. + * + */ + limitSpinToCurrentField?: boolean; + + /** + * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * The option is only applied in "date" [dataMode](ui.%%WidgetNameLowered%%#options:dataMode). + * + */ + enableUTCDates?: boolean; + + /** + * Gets/Sets year for auto detection of 20th and 21st centuries. + * That option is used to automatically fill century when the user entered only 1 or 2 digits into the year field or when the date pattern contains only 1 or 2 year positions, e.g. "yy" or "y". + * If user entered value larger than value of this option, then 20th century is used, otherwise the 21st. + * + */ + centuryThreshold?: number; + + /** + * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + */ + nullValue?: string|number|Date; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + listItems?: any; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + dropDownOnReadOnly?: boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + inputMask?: string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + unfilledCharsPrompt?: string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + padChar?: string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + emptyChar?: string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + toUpper?: boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + toLower?: boolean; + + /** + * Gets ability to enter only specific characters in input-field from keyboard and on paste. + * Notes: + * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + */ + includeKeys?: string; + + /** + * Gets ability to prevent entering specific characters from keyboard or on paste. + * Notes: + * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + */ + excludeKeys?: string; + + textMode?: any; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + maxLength?: any; + + /** + * Gets/Sets the horizontal alignment of the text in the editor. + * + * + * Valid values: + * "left" The text into the input gets aligned to the left. + * "right" The text into the input gets aligned to the right. + * "center" The text into the input gets aligned to the center. + */ + textAlign?: string; + + /** + * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + */ + placeHolder?: string; + + /** + * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * + * + * Valid values: + * "selectAll" Setting this option will select all the text into the editor when the edit mode gets enetered. + * "atStart" Setting this option will move the cursor at the begining the text into the editor when the edit mode gets enetered. + * "atEnd" Setting this option will move the cursor at the end the text into the editor when the edit mode gets enetered. + * "browserDefault" Setting this option won't do any extra logic, but proceed with the browser default behavior. + */ + selectionOnFocus?: string; + + /** + * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + */ + revertIfNotValid?: boolean; + + /** + * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * + */ + preventSubmitOnEnter?: boolean; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + */ + suppressNotifications?: boolean; + + /** + * Gets/Sets the width of the control. + * + * + * Valid values: + * "null" will stretch to fit data, if no other widths are defined. + */ + width?: string|number; + + /** + * Gets/Sets the height of the control. + * + * + * Valid values: + * "null" will fit the editor inside its parent container, if no other heights are defined. + */ + height?: string|number; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + tabIndex?: number; + + /** + * Gets/Sets whether the editor value can become null. + * If that option is false, and editor has no value, then value is set to an empty string. + * + */ + allowNullValue?: boolean; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + inputName?: string; + + /** + * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + */ + readOnly?: boolean; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + disabled?: boolean; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + validatorOptions?: any; + + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + + /** + * Fired when the drop down is opening. + */ + dropDownListOpening?: DropDownListOpeningEvent; + + /** + * Fired after the drop down is opened. + */ + dropDownListOpened?: DropDownListOpenedEvent; + + /** + * Fired when the drop down is closing. + */ + dropDownListClosing?: DropDownListClosingEvent; + + /** + * Fired after the drop down is closed. + */ + dropDownListClosed?: DropDownListClosedEvent; + + /** + * Fired when an item in the drop down list is being selected. + */ + dropDownItemSelecting?: DropDownItemSelectingEvent; + + /** + * Fired after an item in the drop down list is selected. + */ + dropDownItemSelected?: DropDownItemSelectedEvent; + + /** + * Option for igTimePicker + */ + [optionName: string]: any; +} +interface IgTimePickerMethods { + /** + * Gets the selected list item. + */ + getSelectedListItem(): string; + + /** + * Returns the visibility state of the calendar. + */ + dropDownVisible(): boolean; + + /** + * Returns a reference to the drop-down button UI element of the editor. + */ + dropDownButton(): string; + + /** + * Gets reference to jquery object which is used as container of drop-down list. + */ + dropDownContainer(): string; + + /** + * Finds index of list item by text that matches with the search parameters. + * + * @param text The text to search for in the drop down list. + * @param matchType The rule that is applied for searching the text. + */ + findListItemIndex(text: string, matchType?: Object): number; + + /** + * Gets the index of the selected list item. Sets selected item by index. + * + * @param index The index of the item that needs to be selected. + */ + selectedListIndex(index?: number): number; + value(newValue: Object): void; + selectDate(): void; + + /** + * Changes the the regional settings of widget element to the language specified in [options.regional](ui.igdateeditor#options:regional) + * Note that this method is for rare scenarios, use [regional](ui.igdateeditor#options:regional) option setter + */ + changeRegional(): void; + + /** + * Gets selected date as a date object. This method can be used when dataMode is set as either displayModeText or editModeText. + * In such cases the value() method will not return date object and getSelectedDate() can be used to replace that functionality. + */ + getSelectedDate(): Date; + + /** + * Increases the date or time period, depending on the current cursor position. + * + * @param delta The increase delta. + */ + spinUp(delta?: number): void; + + /** + * Decreases the date or time period, depending on the current cursor position. + * + * @param delta The decrease delta. + */ + spinDown(delta?: number): void; + + /** + * Returns a reference to the spin up UI element of the editor. + */ + spinUpButton(): string; + + /** + * Returns a reference to the spin down UI element of the editor. + */ + spinDownButton(): string; + + /** + * Checks if the value in the editor is valid. Note: This function will not trigger automatic notifications. + */ + isValid(): boolean; +} +interface JQuery { + data(propertyName: "igTimePicker"): IgTimePickerMethods; +} + interface JQuery { igBaseEditor(methodName: "inputName", newValue?: string): string; igBaseEditor(methodName: "value", newValue: Object): void; @@ -29031,6 +30325,7 @@ interface JQuery { /** * Gets/Sets the width of the control. + * */ igBaseEditor(optionLiteral: 'option', optionName: "width"): string|number; @@ -29038,6 +30333,7 @@ interface JQuery { /** * /Sets the width of the control. * + * * @optionValue New value to be set. */ @@ -29045,6 +30341,7 @@ interface JQuery { /** * Gets/Sets the height of the control. + * */ igBaseEditor(optionLiteral: 'option', optionName: "height"): string|number; @@ -29052,6 +30349,7 @@ interface JQuery { /** * /Sets the height of the control. * + * * @optionValue New value to be set. */ @@ -29059,24 +30357,28 @@ interface JQuery { /** * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * */ igBaseEditor(optionLiteral: 'option', optionName: "value"): any; /** * /Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. * + * * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "value", optionValue: any): void; /** * Gets/Sets tabIndex attribute for the editor input. + * */ igBaseEditor(optionLiteral: 'option', optionName: "tabIndex"): number; /** * /Sets tabIndex attribute for the editor input. * + * * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; @@ -29084,6 +30386,7 @@ interface JQuery { /** * Gets/Sets whether the editor value can become null. * If that option is false, and editor has no value, then value is set to an empty string. + * */ igBaseEditor(optionLiteral: 'option', optionName: "allowNullValue"): boolean; @@ -29091,12 +30394,14 @@ interface JQuery { * /Sets whether the editor value can become null. * If that option is false, and editor has no value, then value is set to an empty string. * + * * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "allowNullValue", optionValue: boolean): void; /** * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * */ igBaseEditor(optionLiteral: 'option', optionName: "nullValue"): string|number; @@ -29104,6 +30409,7 @@ interface JQuery { /** * /Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string * + * * @optionValue New value to be set. */ @@ -29111,36 +30417,42 @@ interface JQuery { /** * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * */ igBaseEditor(optionLiteral: 'option', optionName: "inputName"): string; /** * /Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. * + * * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; /** * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * */ igBaseEditor(optionLiteral: 'option', optionName: "readOnly"): boolean; /** * /Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. * + * * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "readOnly", optionValue: boolean): void; /** * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * */ igBaseEditor(optionLiteral: 'option', optionName: "disabled"): boolean; /** * /Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. * + * * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "disabled", optionValue: boolean): void; @@ -29149,6 +30461,7 @@ interface JQuery { * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * */ igBaseEditor(optionLiteral: 'option', optionName: "validatorOptions"): any; @@ -29157,36 +30470,42 @@ interface JQuery { * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. * + * * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; /** * Set/Get the locale setting for the widget. + * */ igBaseEditor(optionLiteral: 'option', optionName: "locale"): any; /** * Set/Get the locale setting for the widget. * + * * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "locale", optionValue: any): void; /** * Set/Get the locale language setting for the widget. + * */ igBaseEditor(optionLiteral: 'option', optionName: "language"): string; /** * Set/Get the locale language setting for the widget. * + * * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "language", optionValue: string): void; /** * Set/Get the regional setting for the widget. + * */ igBaseEditor(optionLiteral: 'option', optionName: "regional"): string|Object; @@ -29194,296 +30513,185 @@ interface JQuery { /** * Set/Get the regional setting for the widget. * + * * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; /** - * Event which is raised before rendering of the editor completes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the editor performing rendering. - * Use ui.element to get a reference to the editor element. + * Fired before rendering of the editor has finished. */ igBaseEditor(optionLiteral: 'option', optionName: "rendering"): RenderingEvent; /** - * Event which is raised before rendering of the editor completes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the editor performing rendering. - * Use ui.element to get a reference to the editor element. + * Fired before rendering of the editor has finished. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "rendering", optionValue: RenderingEvent): void; /** - * Event which is raised after rendering of the editor completes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the editor performing rendering. - * Use ui.element to get a reference to the editor element. + * Fired after rendering of the editor has finished. */ igBaseEditor(optionLiteral: 'option', optionName: "rendered"): RenderedEvent; /** - * Event which is raised after rendering of the editor completes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the editor performing rendering. - * Use ui.element to get a reference to the editor element. + * Fired after rendering of the editor has finished. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "rendered", optionValue: RenderedEvent): void; /** - * Event which is raised on mousedown event. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mousedown event. */ igBaseEditor(optionLiteral: 'option', optionName: "mousedown"): MousedownEvent; /** - * Event which is raised on mousedown event. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mousedown event. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "mousedown", optionValue: MousedownEvent): void; /** - * Event which is raised on mouseup event. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseup event. */ igBaseEditor(optionLiteral: 'option', optionName: "mouseup"): MouseupEvent; /** - * Event which is raised on mouseup event. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseup event. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "mouseup", optionValue: MouseupEvent): void; /** - * Event which is raised on mousemove at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mousemove at any part of editor including the drop-down list. */ igBaseEditor(optionLiteral: 'option', optionName: "mousemove"): MousemoveEvent; /** - * Event which is raised on mousemove at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mousemove at any part of editor including the drop-down list. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "mousemove", optionValue: MousemoveEvent): void; /** - * Event which is raised on mouseover at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseover at any part of editor including the drop-down list. */ igBaseEditor(optionLiteral: 'option', optionName: "mouseover"): MouseoverEvent; /** - * Event which is raised on mouseover at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseover at any part of editor including the drop-down list. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "mouseover", optionValue: MouseoverEvent): void; /** - * Event which is raised on mouseleave at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseleave at any part of editor including the drop-down list. */ igBaseEditor(optionLiteral: 'option', optionName: "mouseout"): MouseoutEvent; /** - * Event which is raised on mouseleave at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseleave at any part of editor including the drop-down list. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "mouseout", optionValue: MouseoutEvent): void; /** - * Event which is raised when input field of editor loses focus. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired when the input field of the editor loses focus. */ igBaseEditor(optionLiteral: 'option', optionName: "blur"): BlurEvent; /** - * Event which is raised when input field of editor loses focus. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired when the input field of the editor loses focus. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "blur", optionValue: BlurEvent): void; /** - * Event which is raised when input field of editor gets focus. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired when the input field of the editor gets focus. */ igBaseEditor(optionLiteral: 'option', optionName: "focus"): IgFocusEvent; /** - * Event which is raised when input field of editor gets focus. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired when the input field of the editor gets focus. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "focus", optionValue: IgFocusEvent): void; /** - * Event which is raised on keydown event. + * Fired on keydown event. * Return false in order to cancel key action. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. */ igBaseEditor(optionLiteral: 'option', optionName: "keydown"): KeydownEvent; /** - * Event which is raised on keydown event. + * Fired on keydown event. * Return false in order to cancel key action. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "keydown", optionValue: KeydownEvent): void; /** - * Event which is raised on keypress event. + * Fired on keypress event. * Return false in order to cancel key action. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. */ igBaseEditor(optionLiteral: 'option', optionName: "keypress"): KeypressEvent; /** - * Event which is raised on keypress event. + * Fired on keypress event. * Return false in order to cancel key action. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "keypress", optionValue: KeypressEvent): void; /** - * Event which is raised on keyup event. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. + * Fired on keyup event. */ igBaseEditor(optionLiteral: 'option', optionName: "keyup"): KeyupEvent; /** - * Event which is raised on keyup event. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. + * Fired on keyup event. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "keyup", optionValue: KeyupEvent): void; /** - * Event which is raised before the editor value is changed. + * Fired before changing the editor's value. * Return false in order to cancel change. * It can be raised after loosing focus or on spin events. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the new value. - * Use ui.oldValue to obtain the old value. - * Use ui.editorInput to obtain reference to the editor input. */ igBaseEditor(optionLiteral: 'option', optionName: "valueChanging"): ValueChangingEvent; /** - * Event which is raised before the editor value is changed. + * Fired before changing the editor's value. * Return false in order to cancel change. * It can be raised after loosing focus or on spin events. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the new value. - * Use ui.oldValue to obtain the old value. - * Use ui.editorInput to obtain reference to the editor input. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "valueChanging", optionValue: ValueChangingEvent): void; /** - * Event which is raised after the editor value is changed. It can be raised after loosing focus or on spin events. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the value entered from the user after internal formatting. - * Use ui.originalValue to obtain the value entered from the user before internal formatting. - * Use ui.editorInput to obtain reference to the editor input. + * Fired after the editor value is changed. It can be raised after loosing focus or on spin events. */ igBaseEditor(optionLiteral: 'option', optionName: "valueChanged"): ValueChangedEvent; /** - * Event which is raised after the editor value is changed. It can be raised after loosing focus or on spin events. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the value entered from the user after internal formatting. - * Use ui.originalValue to obtain the value entered from the user before internal formatting. - * Use ui.editorInput to obtain reference to the editor input. + * Fired after the editor value is changed. It can be raised after loosing focus or on spin events. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igBaseEditor(optionLiteral: 'option', optionName: "valueChanged", optionValue: ValueChangedEvent): void; igBaseEditor(options: IgBaseEditor): JQuery; @@ -29528,6 +30736,7 @@ interface JQuery { /** * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. + * */ igTextEditor(optionLiteral: 'option', optionName: "buttonType"): string; @@ -29535,6 +30744,7 @@ interface JQuery { /** * Visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. * + * * @optionValue New value to be set. */ @@ -29543,6 +30753,7 @@ interface JQuery { /** * Gets/Sets list of items which are used as a source for the drop-down list. * Items in the list can be of type string. + * */ igTextEditor(optionLiteral: 'option', optionName: "listItems"): any[]; @@ -29550,30 +30761,35 @@ interface JQuery { * /Sets list of items which are used as a source for the drop-down list. * Items in the list can be of type string. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "listItems", optionValue: any[]): void; /** * Gets/Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * */ igTextEditor(optionLiteral: 'option', optionName: "listWidth"): number; /** * /Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "listWidth", optionValue: number): void; /** * Gets/Sets the hover/unhover animation duration of a drop-down list item. + * */ igTextEditor(optionLiteral: 'option', optionName: "listItemHoverDuration"): number; /** * /Sets the hover/unhover animation duration of a drop-down list item. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "listItemHoverDuration", optionValue: number): void; @@ -29583,6 +30799,7 @@ interface JQuery { * If the option is set to false the editor will attach the drop-down list element to the editor container * If the option is set to true the editor will attach its drop-down list to as a child of the body. * Note! This option can not be set runtime. + * */ igTextEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody"): boolean; @@ -29592,18 +30809,21 @@ interface JQuery { * If the option is set to true the editor will attach its drop-down list to as a child of the body. * Note! This option can not be set runtime. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody", optionValue: boolean): void; /** * Gets/Sets show/hide drop-down list animation duration in milliseconds. + * */ igTextEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration"): number; /** * /Sets show/hide drop-down list animation duration in milliseconds. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration", optionValue: number): void; @@ -29613,6 +30833,7 @@ interface JQuery { * Notes: * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. * This option can not be set runtime. + * */ igTextEditor(optionLiteral: 'option', optionName: "visibleItemsCount"): number; @@ -29622,6 +30843,7 @@ interface JQuery { * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. * This option can not be set runtime. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "visibleItemsCount", optionValue: number): void; @@ -29631,6 +30853,7 @@ interface JQuery { * Notes: * If both "excludeKeys" and "includeKeys" options are used, then "excludeKeys" has priority and includeKeys options is not respected. * The option is case sensitive! If the option is set runtime it's not applied on the current value. + * */ igTextEditor(optionLiteral: 'option', optionName: "includeKeys"): string; @@ -29640,6 +30863,7 @@ interface JQuery { * If both "excludeKeys" and "includeKeys" options are used, then "excludeKeys" has priority and includeKeys options is not respected. * The option is case sensitive! If the option is set runtime it's not applied on the current value. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "includeKeys", optionValue: string): void; @@ -29649,6 +30873,7 @@ interface JQuery { * Notes: * If both "excludeKeys" and "includeKeys" options are used, then "excludeKeys" has priority and includeKeys options is not respected. * The option is case sensitive! If the option is set runtime it's not applied on the current value. + * */ igTextEditor(optionLiteral: 'option', optionName: "excludeKeys"): string; @@ -29658,12 +30883,14 @@ interface JQuery { * If both "excludeKeys" and "includeKeys" options are used, then "excludeKeys" has priority and includeKeys options is not respected. * The option is case sensitive! If the option is set runtime it's not applied on the current value. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "excludeKeys", optionValue: string): void; /** * Gets/Sets the horizontal alignment of the text in the editor. + * */ igTextEditor(optionLiteral: 'option', optionName: "textAlign"): string; @@ -29671,6 +30898,7 @@ interface JQuery { /** * /Sets the horizontal alignment of the text in the editor. * + * * @optionValue New value to be set. */ @@ -29678,18 +30906,21 @@ interface JQuery { /** * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * */ igTextEditor(optionLiteral: 'option', optionName: "placeHolder"): string; /** * /Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "placeHolder", optionValue: string): void; /** * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * */ igTextEditor(optionLiteral: 'option', optionName: "selectionOnFocus"): string; @@ -29697,6 +30928,7 @@ interface JQuery { /** * /Sets the action when the editor gets focused. The default value is selectAll. * + * * @optionValue New value to be set. */ @@ -29704,6 +30936,7 @@ interface JQuery { /** * Gets the text mode of the editor such as: single-line text editor, password editor or multiline editor. That option has effect only on initialization. If based element (selector) is TEXTAREA, then it is used as input-field. + * */ igTextEditor(optionLiteral: 'option', optionName: "textMode"): string; @@ -29711,6 +30944,7 @@ interface JQuery { /** * The text mode of the editor such as: single-line text editor, password editor or multiline editor. That option has effect only on initialization. If based element (selector) is TEXTAREA, then it is used as input-field. * + * * @optionValue New value to be set. */ @@ -29718,54 +30952,63 @@ interface JQuery { /** * Gets/Sets the ability of the editor to automatically move the dropdown list selection item from one end to the opposite side. When the last item is reached and spin down is performed, the first item gets selected and vice versa. This option has no effect there is no drop-down list. + * */ igTextEditor(optionLiteral: 'option', optionName: "spinWrapAround"): boolean; /** * /Sets the ability of the editor to automatically move the dropdown list selection item from one end to the opposite side. When the last item is reached and spin down is performed, the first item gets selected and vice versa. This option has no effect there is no drop-down list. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "spinWrapAround", optionValue: boolean): void; /** * Gets/Sets if the editor should only allow values from the list of items. Matching is case-insensitive. + * */ igTextEditor(optionLiteral: 'option', optionName: "isLimitedToListValues"): boolean; /** * /Sets if the editor should only allow values from the list of items. Matching is case-insensitive. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "isLimitedToListValues", optionValue: boolean): void; /** * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * */ igTextEditor(optionLiteral: 'option', optionName: "revertIfNotValid"): boolean; /** * /Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "revertIfNotValid", optionValue: boolean): void; /** * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * */ igTextEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter"): boolean; /** * /Sets if the editor should prevent form submition when enter key is pressed. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter", optionValue: boolean): void; /** * Gets/Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * */ igTextEditor(optionLiteral: 'option', optionName: "dropDownOrientation"): string; @@ -29773,6 +31016,7 @@ interface JQuery { /** * /Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. * + * * @optionValue New value to be set. */ @@ -29781,6 +31025,7 @@ interface JQuery { /** * Gets/Sets the maximum length of a text which can be entered by the user. * Negative values or 0 disables that behavior. If set at runtime the editor doesn't apply the option to the cuurent value. + * */ igTextEditor(optionLiteral: 'option', optionName: "maxLength"): number; @@ -29788,6 +31033,7 @@ interface JQuery { * /Sets the maximum length of a text which can be entered by the user. * Negative values or 0 disables that behavior. If set at runtime the editor doesn't apply the option to the cuurent value. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "maxLength", optionValue: number): void; @@ -29796,6 +31042,7 @@ interface JQuery { * Gets the ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. * Note! In case there are no list items - the editor will reamin readonly * Note! This option can not be set runtime. + * */ igTextEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly"): boolean; @@ -29804,6 +31051,7 @@ interface JQuery { * Note! In case there are no list items - the editor will reamin readonly * Note! This option can not be set runtime. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly", optionValue: boolean): void; @@ -29811,6 +31059,7 @@ interface JQuery { /** * Gets/Sets the ability to convert the input characters to upper case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. * Note! When the option is set at runtime the editor is not changing the current value. + * */ igTextEditor(optionLiteral: 'option', optionName: "toUpper"): boolean; @@ -29818,6 +31067,7 @@ interface JQuery { * /Sets the ability to convert the input characters to upper case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. * Note! When the option is set at runtime the editor is not changing the current value. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "toUpper", optionValue: boolean): void; @@ -29825,6 +31075,7 @@ interface JQuery { /** * Gets/Sets the ability to convert the input characters to lower case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. * Note! When the option is set at runtime the editor is not changing the current value. + * */ igTextEditor(optionLiteral: 'option', optionName: "toLower"): boolean; @@ -29832,18 +31083,21 @@ interface JQuery { * /Sets the ability to convert the input characters to lower case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. * Note! When the option is set at runtime the editor is not changing the current value. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "toLower", optionValue: boolean): void; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * */ igTextEditor(optionLiteral: 'option', optionName: "suppressNotifications"): boolean; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "suppressNotifications", optionValue: boolean): void; @@ -29852,6 +31106,7 @@ interface JQuery { * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. * Note: The option does not perform device detection so its behavior is always active if enabled. * Note: When drop down is opened the only way to close it will be using the drop down button. + * */ igTextEditor(optionLiteral: 'option', optionName: "suppressKeyboard"): boolean; @@ -29860,12 +31115,14 @@ interface JQuery { * Note: The option does not perform device detection so its behavior is always active if enabled. * Note: When drop down is opened the only way to close it will be using the drop down button. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "suppressKeyboard", optionValue: boolean): void; /** * Gets/Sets the width of the control. + * */ igTextEditor(optionLiteral: 'option', optionName: "width"): string|number; @@ -29873,6 +31130,7 @@ interface JQuery { /** * /Sets the width of the control. * + * * @optionValue New value to be set. */ @@ -29880,6 +31138,7 @@ interface JQuery { /** * Gets/Sets the height of the control. + * */ igTextEditor(optionLiteral: 'option', optionName: "height"): string|number; @@ -29887,6 +31146,7 @@ interface JQuery { /** * /Sets the height of the control. * + * * @optionValue New value to be set. */ @@ -29894,24 +31154,28 @@ interface JQuery { /** * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * */ igTextEditor(optionLiteral: 'option', optionName: "value"): any; /** * /Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "value", optionValue: any): void; /** * Gets/Sets tabIndex attribute for the editor input. + * */ igTextEditor(optionLiteral: 'option', optionName: "tabIndex"): number; /** * /Sets tabIndex attribute for the editor input. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; @@ -29919,6 +31183,7 @@ interface JQuery { /** * Gets/Sets whether the editor value can become null. * If that option is false, and editor has no value, then value is set to an empty string. + * */ igTextEditor(optionLiteral: 'option', optionName: "allowNullValue"): boolean; @@ -29926,12 +31191,14 @@ interface JQuery { * /Sets whether the editor value can become null. * If that option is false, and editor has no value, then value is set to an empty string. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "allowNullValue", optionValue: boolean): void; /** * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * */ igTextEditor(optionLiteral: 'option', optionName: "nullValue"): string|number; @@ -29939,6 +31206,7 @@ interface JQuery { /** * /Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string * + * * @optionValue New value to be set. */ @@ -29946,36 +31214,42 @@ interface JQuery { /** * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * */ igTextEditor(optionLiteral: 'option', optionName: "inputName"): string; /** * /Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; /** * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * */ igTextEditor(optionLiteral: 'option', optionName: "readOnly"): boolean; /** * /Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "readOnly", optionValue: boolean): void; /** * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * */ igTextEditor(optionLiteral: 'option', optionName: "disabled"): boolean; /** * /Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "disabled", optionValue: boolean): void; @@ -29984,6 +31258,7 @@ interface JQuery { * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * */ igTextEditor(optionLiteral: 'option', optionName: "validatorOptions"): any; @@ -29992,36 +31267,42 @@ interface JQuery { * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; /** * Set/Get the locale setting for the widget. + * */ igTextEditor(optionLiteral: 'option', optionName: "locale"): any; /** * Set/Get the locale setting for the widget. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "locale", optionValue: any): void; /** * Set/Get the locale language setting for the widget. + * */ igTextEditor(optionLiteral: 'option', optionName: "language"): string; /** * Set/Get the locale language setting for the widget. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "language", optionValue: string): void; /** * Set/Get the regional setting for the widget. + * */ igTextEditor(optionLiteral: 'option', optionName: "regional"): string|Object; @@ -30029,442 +31310,271 @@ interface JQuery { /** * Set/Get the regional setting for the widget. * + * * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; /** - * Event which is raised when the drop down is opening. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired when the drop down is opening. */ igTextEditor(optionLiteral: 'option', optionName: "dropDownListOpening"): DropDownListOpeningEvent; /** - * Event which is raised when the drop down is opening. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired when the drop down is opening. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "dropDownListOpening", optionValue: DropDownListOpeningEvent): void; /** - * Event which is raised after the drop down is opened. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired after the drop down is opened. */ igTextEditor(optionLiteral: 'option', optionName: "dropDownListOpened"): DropDownListOpenedEvent; /** - * Event which is raised after the drop down is opened. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired after the drop down is opened. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "dropDownListOpened", optionValue: DropDownListOpenedEvent): void; /** - * Event which is raised when the drop down is closing. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired when the drop down is closing. */ igTextEditor(optionLiteral: 'option', optionName: "dropDownListClosing"): DropDownListClosingEvent; /** - * Event which is raised when the drop down is closing. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired when the drop down is closing. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "dropDownListClosing", optionValue: DropDownListClosingEvent): void; /** - * Event which is raised after the drop down is closed. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired after the drop down is closed. */ igTextEditor(optionLiteral: 'option', optionName: "dropDownListClosed"): DropDownListClosedEvent; /** - * Event which is raised after the drop down is closed. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired after the drop down is closed. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "dropDownListClosed", optionValue: DropDownListClosedEvent): void; /** - * Event which is raised when an item in the drop down list is being selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. - * Use ui.item to obtain reference to the list item which is about to be selected. + * Fired when an item in the drop down list is being selected. */ igTextEditor(optionLiteral: 'option', optionName: "dropDownItemSelecting"): DropDownItemSelectingEvent; /** - * Event which is raised when an item in the drop down list is being selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. - * Use ui.item to obtain reference to the list item which is about to be selected. + * Fired when an item in the drop down list is being selected. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "dropDownItemSelecting", optionValue: DropDownItemSelectingEvent): void; /** - * Event which is raised after an item in the drop down list is selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. - * Use ui.item to obtain reference to the list item which is selected. + * Fired after an item in the drop down list is selected. */ igTextEditor(optionLiteral: 'option', optionName: "dropDownItemSelected"): DropDownItemSelectedEvent; /** - * Event which is raised after an item in the drop down list is selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. - * Use ui.item to obtain reference to the list item which is selected. + * Fired after an item in the drop down list is selected. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "dropDownItemSelected", optionValue: DropDownItemSelectedEvent): void; /** - * Event which is raised after text in the editor was changed. It can be raised when keyUp event occurs, + * Fired after the editor's text has been changed. It can be raised when keyUp event occurs, * when the clear button is clicked or when an item from a list is selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.text to obtain new text - * Use ui.oldText to obtain the old text. */ igTextEditor(optionLiteral: 'option', optionName: "textChanged"): TextChangedEvent; /** - * Event which is raised after text in the editor was changed. It can be raised when keyUp event occurs, + * Fired after the editor's text has been changed. It can be raised when keyUp event occurs, * when the clear button is clicked or when an item from a list is selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.text to obtain new text - * Use ui.oldText to obtain the old text. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "textChanged", optionValue: TextChangedEvent): void; /** - * Event which is raised before rendering of the editor completes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the editor performing rendering. - * Use ui.element to get a reference to the editor element. + * Fired before rendering of the editor has finished. */ igTextEditor(optionLiteral: 'option', optionName: "rendering"): RenderingEvent; /** - * Event which is raised before rendering of the editor completes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the editor performing rendering. - * Use ui.element to get a reference to the editor element. + * Fired before rendering of the editor has finished. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "rendering", optionValue: RenderingEvent): void; /** - * Event which is raised after rendering of the editor completes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the editor performing rendering. - * Use ui.element to get a reference to the editor element. + * Fired after rendering of the editor has finished. */ igTextEditor(optionLiteral: 'option', optionName: "rendered"): RenderedEvent; /** - * Event which is raised after rendering of the editor completes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the editor performing rendering. - * Use ui.element to get a reference to the editor element. + * Fired after rendering of the editor has finished. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "rendered", optionValue: RenderedEvent): void; /** - * Event which is raised on mousedown event. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mousedown event. */ igTextEditor(optionLiteral: 'option', optionName: "mousedown"): MousedownEvent; /** - * Event which is raised on mousedown event. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mousedown event. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "mousedown", optionValue: MousedownEvent): void; /** - * Event which is raised on mouseup event. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseup event. */ igTextEditor(optionLiteral: 'option', optionName: "mouseup"): MouseupEvent; /** - * Event which is raised on mouseup event. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseup event. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "mouseup", optionValue: MouseupEvent): void; /** - * Event which is raised on mousemove at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mousemove at any part of editor including the drop-down list. */ igTextEditor(optionLiteral: 'option', optionName: "mousemove"): MousemoveEvent; /** - * Event which is raised on mousemove at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mousemove at any part of editor including the drop-down list. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "mousemove", optionValue: MousemoveEvent): void; /** - * Event which is raised on mouseover at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseover at any part of editor including the drop-down list. */ igTextEditor(optionLiteral: 'option', optionName: "mouseover"): MouseoverEvent; /** - * Event which is raised on mouseover at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseover at any part of editor including the drop-down list. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "mouseover", optionValue: MouseoverEvent): void; /** - * Event which is raised on mouseleave at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseleave at any part of editor including the drop-down list. */ igTextEditor(optionLiteral: 'option', optionName: "mouseout"): MouseoutEvent; /** - * Event which is raised on mouseleave at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseleave at any part of editor including the drop-down list. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "mouseout", optionValue: MouseoutEvent): void; /** - * Event which is raised when input field of editor loses focus. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired when the input field of the editor loses focus. */ igTextEditor(optionLiteral: 'option', optionName: "blur"): BlurEvent; /** - * Event which is raised when input field of editor loses focus. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired when the input field of the editor loses focus. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "blur", optionValue: BlurEvent): void; /** - * Event which is raised when input field of editor gets focus. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired when the input field of the editor gets focus. */ igTextEditor(optionLiteral: 'option', optionName: "focus"): IgFocusEvent; /** - * Event which is raised when input field of editor gets focus. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired when the input field of the editor gets focus. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "focus", optionValue: IgFocusEvent): void; /** - * Event which is raised on keydown event. + * Fired on keydown event. * Return false in order to cancel key action. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. */ igTextEditor(optionLiteral: 'option', optionName: "keydown"): KeydownEvent; /** - * Event which is raised on keydown event. + * Fired on keydown event. * Return false in order to cancel key action. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "keydown", optionValue: KeydownEvent): void; /** - * Event which is raised on keypress event. + * Fired on keypress event. * Return false in order to cancel key action. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. */ igTextEditor(optionLiteral: 'option', optionName: "keypress"): KeypressEvent; /** - * Event which is raised on keypress event. + * Fired on keypress event. * Return false in order to cancel key action. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "keypress", optionValue: KeypressEvent): void; /** - * Event which is raised on keyup event. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. + * Fired on keyup event. */ igTextEditor(optionLiteral: 'option', optionName: "keyup"): KeyupEvent; /** - * Event which is raised on keyup event. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. + * Fired on keyup event. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "keyup", optionValue: KeyupEvent): void; /** - * Event which is raised before the editor value is changed. + * Fired before changing the editor's value. * Return false in order to cancel change. * It can be raised after loosing focus or on spin events. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the new value. - * Use ui.oldValue to obtain the old value. - * Use ui.editorInput to obtain reference to the editor input. */ igTextEditor(optionLiteral: 'option', optionName: "valueChanging"): ValueChangingEvent; /** - * Event which is raised before the editor value is changed. + * Fired before changing the editor's value. * Return false in order to cancel change. * It can be raised after loosing focus or on spin events. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the new value. - * Use ui.oldValue to obtain the old value. - * Use ui.editorInput to obtain reference to the editor input. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "valueChanging", optionValue: ValueChangingEvent): void; /** - * Event which is raised after the editor value is changed. It can be raised after loosing focus or on spin events. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the value entered from the user after internal formatting. - * Use ui.originalValue to obtain the value entered from the user before internal formatting. - * Use ui.editorInput to obtain reference to the editor input. + * Fired after the editor value is changed. It can be raised after loosing focus or on spin events. */ igTextEditor(optionLiteral: 'option', optionName: "valueChanged"): ValueChangedEvent; /** - * Event which is raised after the editor value is changed. It can be raised after loosing focus or on spin events. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the value entered from the user after internal formatting. - * Use ui.originalValue to obtain the value entered from the user before internal formatting. - * Use ui.editorInput to obtain reference to the editor input. + * Fired after the editor value is changed. It can be raised after loosing focus or on spin events. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igTextEditor(optionLiteral: 'option', optionName: "valueChanged", optionValue: ValueChangedEvent): void; igTextEditor(options: IgTextEditor): JQuery; @@ -30503,6 +31613,7 @@ interface JQuery { /** * Gets/Sets list of items which are used as a source for the drop-down list. * Items in the list can be of type number. + * */ igNumericEditor(optionLiteral: 'option', optionName: "listItems"): any[]; @@ -30510,6 +31621,7 @@ interface JQuery { * /Sets list of items which are used as a source for the drop-down list. * Items in the list can be of type number. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "listItems", optionValue: any[]): void; @@ -30519,6 +31631,7 @@ interface JQuery { * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) options. + * */ igNumericEditor(optionLiteral: 'option', optionName: "negativeSign"): string; @@ -30528,6 +31641,7 @@ interface JQuery { * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) options. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "negativeSign", optionValue: string): void; @@ -30536,6 +31650,7 @@ interface JQuery { * Gets/Sets the string, which is used as negative pattern. The "n" flag represents the value of number. The "-" and "()" flags are static part of pattern. * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * */ igNumericEditor(optionLiteral: 'option', optionName: "negativePattern"): string; @@ -30544,6 +31659,7 @@ interface JQuery { * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "negativePattern", optionValue: string): void; @@ -30553,6 +31669,7 @@ interface JQuery { * Note: this option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. + * */ igNumericEditor(optionLiteral: 'option', optionName: "decimalSeparator"): string; @@ -30562,6 +31679,7 @@ interface JQuery { * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "decimalSeparator", optionValue: string): void; @@ -30572,6 +31690,7 @@ interface JQuery { * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. + * */ igNumericEditor(optionLiteral: 'option', optionName: "groupSeparator"): string; @@ -30582,6 +31701,7 @@ interface JQuery { * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "groupSeparator", optionValue: string): void; @@ -30595,6 +31715,7 @@ interface JQuery { * Note: The numbers in the array must be positive integers. * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * */ igNumericEditor(optionLiteral: 'option', optionName: "groups"): any[]; @@ -30608,6 +31729,7 @@ interface JQuery { * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "groups", optionValue: any[]): void; @@ -30618,6 +31740,7 @@ interface JQuery { * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. + * */ igNumericEditor(optionLiteral: 'option', optionName: "maxDecimals"): number; @@ -30628,6 +31751,7 @@ interface JQuery { * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "maxDecimals", optionValue: number): void; @@ -30639,6 +31763,7 @@ interface JQuery { * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. + * */ igNumericEditor(optionLiteral: 'option', optionName: "minDecimals"): number; @@ -30650,6 +31775,7 @@ interface JQuery { * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "minDecimals", optionValue: number): void; @@ -30658,6 +31784,7 @@ interface JQuery { * Gets/Sets whether the last decimal place will be rounded, when the maxDecimal option is defined and applied. * For example if the initial editor value is set to 123.4567, maxDecimals option is set to 3 and roundDecimals is enabled, * then editor will round the value and will display it as 123.457. If roundDecimals is disabled then editor value will be truncated to 123.456. + * */ igNumericEditor(optionLiteral: 'option', optionName: "roundDecimals"): boolean; @@ -30666,12 +31793,14 @@ interface JQuery { * For example if the initial editor value is set to 123.4567, maxDecimals option is set to 3 and roundDecimals is enabled, * then editor will round the value and will display it as 123.457. If roundDecimals is disabled then editor value will be truncated to 123.456. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "roundDecimals", optionValue: boolean): void; /** * Gets/Sets the horizontal alignment of the text in the editor. + * */ igNumericEditor(optionLiteral: 'option', optionName: "textAlign"): string; @@ -30679,6 +31808,7 @@ interface JQuery { /** * /Sets the horizontal alignment of the text in the editor. * + * * @optionValue New value to be set. */ @@ -30688,6 +31818,7 @@ interface JQuery { * Defines the range that editor's value can accept.This is achieved by setting the [minValue](ui.igNumericEditor#options:minValue) and [maxValue](ui.igNumericEditor#options:maxValue) editor's options, accordingly to the lowest and highest accepted values for the defined numeric mode. * The range for the specific type follows the numeric type standards, e.g. in .NET Framework [floating-point](https://msdn.microsoft.com/en-us/library/9ahet949.aspx) types and [integral types](https://msdn.microsoft.com/en-us/library/exx3b86w.aspx). * In addition, the maximum value that can be set to [minDecimals](ui.igNumericEditor#options:minDecimals) and [maxDecimals](ui.igNumericEditor#options:maxDecimals) options can be 15, when editor is in 'double' mode and 7, when in 'float' mode. + * */ igNumericEditor(optionLiteral: 'option', optionName: "dataMode"): string; @@ -30697,6 +31828,7 @@ interface JQuery { * The range for the specific type follows the numeric type standards, e.g. in .NET Framework [floating-point](https://msdn.microsoft.com/en-us/library/9ahet949.aspx) types and [integral types](https://msdn.microsoft.com/en-us/library/exx3b86w.aspx). * In addition, the maximum value that can be set to [minDecimals](ui.igNumericEditor#options:minDecimals) and [maxDecimals](ui.igNumericEditor#options:maxDecimals) options can be 15, when editor is in 'double' mode and 7, when in 'float' mode. * + * * @optionValue New value to be set. */ @@ -30704,24 +31836,28 @@ interface JQuery { /** * Gets/Sets the minimum value which can be entered in the editor by the end user. + * */ igNumericEditor(optionLiteral: 'option', optionName: "minValue"): number; /** * /Sets the minimum value which can be entered in the editor by the end user. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "minValue", optionValue: number): void; /** * Gets/Sets the maximum value which can be entered in the editor by the end user. + * */ igNumericEditor(optionLiteral: 'option', optionName: "maxValue"): number; /** * /Sets the maximum value which can be entered in the editor by the end user. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "maxValue", optionValue: number): void; @@ -30729,6 +31865,7 @@ interface JQuery { /** * Gets/Sets whether the editor value can become null. * If that option is disabled, and editor has no value, then value is set to 0 (or minValue/maxValue). + * */ igNumericEditor(optionLiteral: 'option', optionName: "allowNullValue"): boolean; @@ -30736,18 +31873,21 @@ interface JQuery { * /Sets whether the editor value can become null. * If that option is disabled, and editor has no value, then value is set to 0 (or minValue/maxValue). * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "allowNullValue", optionValue: boolean): void; /** * Gets/Sets the default delta-value which is used with "spin" [buttonType](ui.igNumericEditor#options:buttonType) or [spinUp](ui.igNumericEditor#methods:spinUp) and [spinDown](ui.igNumericEditor#methods:spinDown) methods to increment or decrement value in the editor. The value can not be negative. Non integer value is supported only for dataMode double and float. + * */ igNumericEditor(optionLiteral: 'option', optionName: "spinDelta"): number; /** * /Sets the default delta-value which is used with "spin" [buttonType](ui.igNumericEditor#options:buttonType) or [spinUp](ui.igNumericEditor#methods:spinUp) and [spinDown](ui.igNumericEditor#methods:spinDown) methods to increment or decrement value in the editor. The value can not be negative. Non integer value is supported only for dataMode double and float. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "spinDelta", optionValue: number): void; @@ -30756,6 +31896,7 @@ interface JQuery { * Gets/Sets support for scientific format. * If that option is set, then numeric value appears as a string with possible E-power flag. In edit mode the "E" or "e" character can be entered as well. * Notes: The "+" character is not supported in edit mode. + * */ igNumericEditor(optionLiteral: 'option', optionName: "scientificFormat"): string; @@ -30765,6 +31906,7 @@ interface JQuery { * If that option is set, then numeric value appears as a string with possible E-power flag. In edit mode the "E" or "e" character can be entered as well. * Notes: The "+" character is not supported in edit mode. * + * * @optionValue New value to be set. */ @@ -30773,6 +31915,7 @@ interface JQuery { /** * Gets/Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. + * */ igNumericEditor(optionLiteral: 'option', optionName: "spinWrapAround"): boolean; @@ -30780,18 +31923,21 @@ interface JQuery { * /Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "spinWrapAround", optionValue: boolean): void; /** * Gets/Sets if the editor should only allow values from the list of items. Enabling this also causes spin actions to cycle through list items instead. + * */ igNumericEditor(optionLiteral: 'option', optionName: "isLimitedToListValues"): boolean; /** * /Sets if the editor should only allow values from the list of items. Enabling this also causes spin actions to cycle through list items instead. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "isLimitedToListValues", optionValue: boolean): void; @@ -30863,6 +32009,7 @@ interface JQuery { /** * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. * + * */ igNumericEditor(optionLiteral: 'option', optionName: "value"): any; @@ -30870,12 +32017,14 @@ interface JQuery { * /Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. * * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "value", optionValue: any): void; /** * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. + * */ igNumericEditor(optionLiteral: 'option', optionName: "buttonType"): string; @@ -30883,6 +32032,7 @@ interface JQuery { /** * Visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. * + * * @optionValue New value to be set. */ @@ -30890,24 +32040,28 @@ interface JQuery { /** * Gets/Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * */ igNumericEditor(optionLiteral: 'option', optionName: "listWidth"): number; /** * /Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "listWidth", optionValue: number): void; /** * Gets/Sets the hover/unhover animation duration of a drop-down list item. + * */ igNumericEditor(optionLiteral: 'option', optionName: "listItemHoverDuration"): number; /** * /Sets the hover/unhover animation duration of a drop-down list item. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "listItemHoverDuration", optionValue: number): void; @@ -30917,6 +32071,7 @@ interface JQuery { * If the option is set to false the editor will attach the drop-down list element to the editor container * If the option is set to true the editor will attach its drop-down list to as a child of the body. * Note! This option can not be set runtime. + * */ igNumericEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody"): boolean; @@ -30926,18 +32081,21 @@ interface JQuery { * If the option is set to true the editor will attach its drop-down list to as a child of the body. * Note! This option can not be set runtime. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody", optionValue: boolean): void; /** * Gets/Sets show/hide drop-down list animation duration in milliseconds. + * */ igNumericEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration"): number; /** * /Sets show/hide drop-down list animation duration in milliseconds. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration", optionValue: number): void; @@ -30947,6 +32105,7 @@ interface JQuery { * Notes: * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. * This option can not be set runtime. + * */ igNumericEditor(optionLiteral: 'option', optionName: "visibleItemsCount"): number; @@ -30956,24 +32115,28 @@ interface JQuery { * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. * This option can not be set runtime. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "visibleItemsCount", optionValue: number): void; /** * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * */ igNumericEditor(optionLiteral: 'option', optionName: "placeHolder"): string; /** * /Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "placeHolder", optionValue: string): void; /** * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * */ igNumericEditor(optionLiteral: 'option', optionName: "selectionOnFocus"): string; @@ -30981,6 +32144,7 @@ interface JQuery { /** * /Sets the action when the editor gets focused. The default value is selectAll. * + * * @optionValue New value to be set. */ @@ -30988,30 +32152,35 @@ interface JQuery { /** * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * */ igNumericEditor(optionLiteral: 'option', optionName: "revertIfNotValid"): boolean; /** * /Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "revertIfNotValid", optionValue: boolean): void; /** * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * */ igNumericEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter"): boolean; /** * /Sets if the editor should prevent form submition when enter key is pressed. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter", optionValue: boolean): void; /** * Gets/Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * */ igNumericEditor(optionLiteral: 'option', optionName: "dropDownOrientation"): string; @@ -31019,6 +32188,7 @@ interface JQuery { /** * /Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. * + * * @optionValue New value to be set. */ @@ -31028,6 +32198,7 @@ interface JQuery { * Gets the ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. * Note! In case there are no list items - the editor will reamin readonly * Note! This option can not be set runtime. + * */ igNumericEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly"): boolean; @@ -31036,18 +32207,21 @@ interface JQuery { * Note! In case there are no list items - the editor will reamin readonly * Note! This option can not be set runtime. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly", optionValue: boolean): void; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * */ igNumericEditor(optionLiteral: 'option', optionName: "suppressNotifications"): boolean; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "suppressNotifications", optionValue: boolean): void; @@ -31056,6 +32230,7 @@ interface JQuery { * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. * Note: The option does not perform device detection so its behavior is always active if enabled. * Note: When drop down is opened the only way to close it will be using the drop down button. + * */ igNumericEditor(optionLiteral: 'option', optionName: "suppressKeyboard"): boolean; @@ -31064,12 +32239,14 @@ interface JQuery { * Note: The option does not perform device detection so its behavior is always active if enabled. * Note: When drop down is opened the only way to close it will be using the drop down button. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "suppressKeyboard", optionValue: boolean): void; /** * Gets/Sets the width of the control. + * */ igNumericEditor(optionLiteral: 'option', optionName: "width"): string|number; @@ -31077,6 +32254,7 @@ interface JQuery { /** * /Sets the width of the control. * + * * @optionValue New value to be set. */ @@ -31084,6 +32262,7 @@ interface JQuery { /** * Gets/Sets the height of the control. + * */ igNumericEditor(optionLiteral: 'option', optionName: "height"): string|number; @@ -31091,6 +32270,7 @@ interface JQuery { /** * /Sets the height of the control. * + * * @optionValue New value to be set. */ @@ -31098,18 +32278,21 @@ interface JQuery { /** * Gets/Sets tabIndex attribute for the editor input. + * */ igNumericEditor(optionLiteral: 'option', optionName: "tabIndex"): number; /** * /Sets tabIndex attribute for the editor input. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; /** * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * */ igNumericEditor(optionLiteral: 'option', optionName: "nullValue"): string|number; @@ -31117,6 +32300,7 @@ interface JQuery { /** * /Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string * + * * @optionValue New value to be set. */ @@ -31124,36 +32308,42 @@ interface JQuery { /** * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * */ igNumericEditor(optionLiteral: 'option', optionName: "inputName"): string; /** * /Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; /** * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * */ igNumericEditor(optionLiteral: 'option', optionName: "readOnly"): boolean; /** * /Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "readOnly", optionValue: boolean): void; /** * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * */ igNumericEditor(optionLiteral: 'option', optionName: "disabled"): boolean; /** * /Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "disabled", optionValue: boolean): void; @@ -31162,6 +32352,7 @@ interface JQuery { * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * */ igNumericEditor(optionLiteral: 'option', optionName: "validatorOptions"): any; @@ -31170,36 +32361,42 @@ interface JQuery { * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; /** * Set/Get the locale setting for the widget. + * */ igNumericEditor(optionLiteral: 'option', optionName: "locale"): any; /** * Set/Get the locale setting for the widget. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "locale", optionValue: any): void; /** * Set/Get the locale language setting for the widget. + * */ igNumericEditor(optionLiteral: 'option', optionName: "language"): string; /** * Set/Get the locale language setting for the widget. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "language", optionValue: string): void; /** * Set/Get the regional setting for the widget. + * */ igNumericEditor(optionLiteral: 'option', optionName: "regional"): string|Object; @@ -31207,154 +32404,95 @@ interface JQuery { /** * Set/Get the regional setting for the widget. * + * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; /** - * Event which is raised when the drop down is opening. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired when the drop down is opening. */ igNumericEditor(optionLiteral: 'option', optionName: "dropDownListOpening"): DropDownListOpeningEvent; /** - * Event which is raised when the drop down is opening. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired when the drop down is opening. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "dropDownListOpening", optionValue: DropDownListOpeningEvent): void; /** - * Event which is raised after the drop down is opened. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired after the drop down is opened. */ igNumericEditor(optionLiteral: 'option', optionName: "dropDownListOpened"): DropDownListOpenedEvent; /** - * Event which is raised after the drop down is opened. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired after the drop down is opened. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "dropDownListOpened", optionValue: DropDownListOpenedEvent): void; /** - * Event which is raised when the drop down is closing. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired when the drop down is closing. */ igNumericEditor(optionLiteral: 'option', optionName: "dropDownListClosing"): DropDownListClosingEvent; /** - * Event which is raised when the drop down is closing. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired when the drop down is closing. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "dropDownListClosing", optionValue: DropDownListClosingEvent): void; /** - * Event which is raised after the drop down is closed. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired after the drop down is closed. */ igNumericEditor(optionLiteral: 'option', optionName: "dropDownListClosed"): DropDownListClosedEvent; /** - * Event which is raised after the drop down is closed. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. + * Fired after the drop down is closed. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "dropDownListClosed", optionValue: DropDownListClosedEvent): void; /** - * Event which is raised when an item in the drop down list is being selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. - * Use ui.item to obtain reference to the list item which is about to be selected. + * Fired when an item in the drop down list is being selected. */ igNumericEditor(optionLiteral: 'option', optionName: "dropDownItemSelecting"): DropDownItemSelectingEvent; /** - * Event which is raised when an item in the drop down list is being selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. - * Use ui.item to obtain reference to the list item which is about to be selected. + * Fired when an item in the drop down list is being selected. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "dropDownItemSelecting", optionValue: DropDownItemSelectingEvent): void; /** - * Event which is raised after an item in the drop down list is selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. - * Use ui.item to obtain reference to the list item which is selected. + * Fired after an item in the drop down list is selected. */ igNumericEditor(optionLiteral: 'option', optionName: "dropDownItemSelected"): DropDownItemSelectedEvent; /** - * Event which is raised after an item in the drop down list is selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.list to obtain reference to the list contaier. - * Use ui.item to obtain reference to the list item which is selected. + * Fired after an item in the drop down list is selected. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "dropDownItemSelected", optionValue: DropDownItemSelectedEvent): void; /** - * Event which is raised after text in the editor was changed. It can be raised when keyUp event occurs, + * Fired after the editor's text has been changed. It can be raised when keyUp event occurs, * when the clear button is clicked or when an item from a list is selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.text to obtain new text - * Use ui.oldText to obtain the old text. */ igNumericEditor(optionLiteral: 'option', optionName: "textChanged"): TextChangedEvent; /** - * Event which is raised after text in the editor was changed. It can be raised when keyUp event occurs, + * Fired after the editor's text has been changed. It can be raised when keyUp event occurs, * when the clear button is clicked or when an item from a list is selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.text to obtain new text - * Use ui.oldText to obtain the old text. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "textChanged", optionValue: TextChangedEvent): void; igNumericEditor(options: IgNumericEditor): JQuery; @@ -31381,6 +32519,7 @@ interface JQuery { * Gets/Sets the string, which is used as positive pattern. The "n" flag represents the value of number. * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "positivePattern"): string; @@ -31389,18 +32528,21 @@ interface JQuery { * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "positivePattern", optionValue: string): void; /** * Gets/Sets a string that is used as the currency symbol that is shown in display mode. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "currencySymbol"): string; /** * /Sets a string that is used as the currency symbol that is shown in display mode. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "currencySymbol", optionValue: string): void; @@ -31408,6 +32550,7 @@ interface JQuery { /** * Gets/Sets list of items which are used as a source for the drop-down list. * Items in the list can be of type number. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "listItems"): any[]; @@ -31415,6 +32558,7 @@ interface JQuery { * /Sets list of items which are used as a source for the drop-down list. * Items in the list can be of type number. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "listItems", optionValue: any[]): void; @@ -31424,6 +32568,7 @@ interface JQuery { * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) options. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "negativeSign"): string; @@ -31433,6 +32578,7 @@ interface JQuery { * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) options. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "negativeSign", optionValue: string): void; @@ -31441,6 +32587,7 @@ interface JQuery { * Gets/Sets the string, which is used as negative pattern. The "n" flag represents the value of number. The "-" and "()" flags are static part of pattern. * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "negativePattern"): string; @@ -31449,6 +32596,7 @@ interface JQuery { * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "negativePattern", optionValue: string): void; @@ -31458,6 +32606,7 @@ interface JQuery { * Note: this option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "decimalSeparator"): string; @@ -31467,6 +32616,7 @@ interface JQuery { * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "decimalSeparator", optionValue: string): void; @@ -31477,6 +32627,7 @@ interface JQuery { * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "groupSeparator"): string; @@ -31487,6 +32638,7 @@ interface JQuery { * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "groupSeparator", optionValue: string): void; @@ -31500,6 +32652,7 @@ interface JQuery { * Note: The numbers in the array must be positive integers. * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "groups"): any[]; @@ -31513,6 +32666,7 @@ interface JQuery { * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "groups", optionValue: any[]): void; @@ -31523,6 +32677,7 @@ interface JQuery { * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "maxDecimals"): number; @@ -31533,6 +32688,7 @@ interface JQuery { * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "maxDecimals", optionValue: number): void; @@ -31544,6 +32700,7 @@ interface JQuery { * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "minDecimals"): number; @@ -31555,6 +32712,7 @@ interface JQuery { * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "minDecimals", optionValue: number): void; @@ -31563,6 +32721,7 @@ interface JQuery { * Gets/Sets whether the last decimal place will be rounded, when the maxDecimal option is defined and applied. * For example if the initial editor value is set to 123.4567, maxDecimals option is set to 3 and roundDecimals is enabled, * then editor will round the value and will display it as 123.457. If roundDecimals is disabled then editor value will be truncated to 123.456. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "roundDecimals"): boolean; @@ -31571,12 +32730,14 @@ interface JQuery { * For example if the initial editor value is set to 123.4567, maxDecimals option is set to 3 and roundDecimals is enabled, * then editor will round the value and will display it as 123.457. If roundDecimals is disabled then editor value will be truncated to 123.456. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "roundDecimals", optionValue: boolean): void; /** * Gets/Sets the horizontal alignment of the text in the editor. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "textAlign"): string; @@ -31584,6 +32745,7 @@ interface JQuery { /** * /Sets the horizontal alignment of the text in the editor. * + * * @optionValue New value to be set. */ @@ -31593,6 +32755,7 @@ interface JQuery { * Defines the range that editor's value can accept.This is achieved by setting the [minValue](ui.igNumericEditor#options:minValue) and [maxValue](ui.igNumericEditor#options:maxValue) editor's options, accordingly to the lowest and highest accepted values for the defined numeric mode. * The range for the specific type follows the numeric type standards, e.g. in .NET Framework [floating-point](https://msdn.microsoft.com/en-us/library/9ahet949.aspx) types and [integral types](https://msdn.microsoft.com/en-us/library/exx3b86w.aspx). * In addition, the maximum value that can be set to [minDecimals](ui.igNumericEditor#options:minDecimals) and [maxDecimals](ui.igNumericEditor#options:maxDecimals) options can be 15, when editor is in 'double' mode and 7, when in 'float' mode. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "dataMode"): string; @@ -31602,6 +32765,7 @@ interface JQuery { * The range for the specific type follows the numeric type standards, e.g. in .NET Framework [floating-point](https://msdn.microsoft.com/en-us/library/9ahet949.aspx) types and [integral types](https://msdn.microsoft.com/en-us/library/exx3b86w.aspx). * In addition, the maximum value that can be set to [minDecimals](ui.igNumericEditor#options:minDecimals) and [maxDecimals](ui.igNumericEditor#options:maxDecimals) options can be 15, when editor is in 'double' mode and 7, when in 'float' mode. * + * * @optionValue New value to be set. */ @@ -31609,24 +32773,28 @@ interface JQuery { /** * Gets/Sets the minimum value which can be entered in the editor by the end user. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "minValue"): number; /** * /Sets the minimum value which can be entered in the editor by the end user. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "minValue", optionValue: number): void; /** * Gets/Sets the maximum value which can be entered in the editor by the end user. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "maxValue"): number; /** * /Sets the maximum value which can be entered in the editor by the end user. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "maxValue", optionValue: number): void; @@ -31634,6 +32802,7 @@ interface JQuery { /** * Gets/Sets whether the editor value can become null. * If that option is disabled, and editor has no value, then value is set to 0 (or minValue/maxValue). + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "allowNullValue"): boolean; @@ -31641,18 +32810,21 @@ interface JQuery { * /Sets whether the editor value can become null. * If that option is disabled, and editor has no value, then value is set to 0 (or minValue/maxValue). * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "allowNullValue", optionValue: boolean): void; /** * Gets/Sets the default delta-value which is used with "spin" [buttonType](ui.igNumericEditor#options:buttonType) or [spinUp](ui.igNumericEditor#methods:spinUp) and [spinDown](ui.igNumericEditor#methods:spinDown) methods to increment or decrement value in the editor. The value can not be negative. Non integer value is supported only for dataMode double and float. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "spinDelta"): number; /** * /Sets the default delta-value which is used with "spin" [buttonType](ui.igNumericEditor#options:buttonType) or [spinUp](ui.igNumericEditor#methods:spinUp) and [spinDown](ui.igNumericEditor#methods:spinDown) methods to increment or decrement value in the editor. The value can not be negative. Non integer value is supported only for dataMode double and float. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "spinDelta", optionValue: number): void; @@ -31661,6 +32833,7 @@ interface JQuery { * Gets/Sets support for scientific format. * If that option is set, then numeric value appears as a string with possible E-power flag. In edit mode the "E" or "e" character can be entered as well. * Notes: The "+" character is not supported in edit mode. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "scientificFormat"): string; @@ -31670,6 +32843,7 @@ interface JQuery { * If that option is set, then numeric value appears as a string with possible E-power flag. In edit mode the "E" or "e" character can be entered as well. * Notes: The "+" character is not supported in edit mode. * + * * @optionValue New value to be set. */ @@ -31678,6 +32852,7 @@ interface JQuery { /** * Gets/Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "spinWrapAround"): boolean; @@ -31685,18 +32860,21 @@ interface JQuery { * /Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "spinWrapAround", optionValue: boolean): void; /** * Gets/Sets if the editor should only allow values from the list of items. Enabling this also causes spin actions to cycle through list items instead. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "isLimitedToListValues"): boolean; /** * /Sets if the editor should only allow values from the list of items. Enabling this also causes spin actions to cycle through list items instead. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "isLimitedToListValues", optionValue: boolean): void; @@ -31768,6 +32946,7 @@ interface JQuery { /** * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. * + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "value"): any; @@ -31775,12 +32954,14 @@ interface JQuery { * /Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. * * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "value", optionValue: any): void; /** * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "buttonType"): string; @@ -31788,6 +32969,7 @@ interface JQuery { /** * Visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. * + * * @optionValue New value to be set. */ @@ -31795,24 +32977,28 @@ interface JQuery { /** * Gets/Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "listWidth"): number; /** * /Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "listWidth", optionValue: number): void; /** * Gets/Sets the hover/unhover animation duration of a drop-down list item. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "listItemHoverDuration"): number; /** * /Sets the hover/unhover animation duration of a drop-down list item. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "listItemHoverDuration", optionValue: number): void; @@ -31822,6 +33008,7 @@ interface JQuery { * If the option is set to false the editor will attach the drop-down list element to the editor container * If the option is set to true the editor will attach its drop-down list to as a child of the body. * Note! This option can not be set runtime. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody"): boolean; @@ -31831,18 +33018,21 @@ interface JQuery { * If the option is set to true the editor will attach its drop-down list to as a child of the body. * Note! This option can not be set runtime. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody", optionValue: boolean): void; /** * Gets/Sets show/hide drop-down list animation duration in milliseconds. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration"): number; /** * /Sets show/hide drop-down list animation duration in milliseconds. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration", optionValue: number): void; @@ -31852,6 +33042,7 @@ interface JQuery { * Notes: * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. * This option can not be set runtime. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "visibleItemsCount"): number; @@ -31861,24 +33052,28 @@ interface JQuery { * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. * This option can not be set runtime. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "visibleItemsCount", optionValue: number): void; /** * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "placeHolder"): string; /** * /Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "placeHolder", optionValue: string): void; /** * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "selectionOnFocus"): string; @@ -31886,6 +33081,7 @@ interface JQuery { /** * /Sets the action when the editor gets focused. The default value is selectAll. * + * * @optionValue New value to be set. */ @@ -31893,30 +33089,35 @@ interface JQuery { /** * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "revertIfNotValid"): boolean; /** * /Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "revertIfNotValid", optionValue: boolean): void; /** * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter"): boolean; /** * /Sets if the editor should prevent form submition when enter key is pressed. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter", optionValue: boolean): void; /** * Gets/Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "dropDownOrientation"): string; @@ -31924,6 +33125,7 @@ interface JQuery { /** * /Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. * + * * @optionValue New value to be set. */ @@ -31933,6 +33135,7 @@ interface JQuery { * Gets the ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. * Note! In case there are no list items - the editor will reamin readonly * Note! This option can not be set runtime. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly"): boolean; @@ -31941,18 +33144,21 @@ interface JQuery { * Note! In case there are no list items - the editor will reamin readonly * Note! This option can not be set runtime. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly", optionValue: boolean): void; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "suppressNotifications"): boolean; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "suppressNotifications", optionValue: boolean): void; @@ -31961,6 +33167,7 @@ interface JQuery { * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. * Note: The option does not perform device detection so its behavior is always active if enabled. * Note: When drop down is opened the only way to close it will be using the drop down button. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "suppressKeyboard"): boolean; @@ -31969,12 +33176,14 @@ interface JQuery { * Note: The option does not perform device detection so its behavior is always active if enabled. * Note: When drop down is opened the only way to close it will be using the drop down button. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "suppressKeyboard", optionValue: boolean): void; /** * Gets/Sets the width of the control. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "width"): string|number; @@ -31982,6 +33191,7 @@ interface JQuery { /** * /Sets the width of the control. * + * * @optionValue New value to be set. */ @@ -31989,6 +33199,7 @@ interface JQuery { /** * Gets/Sets the height of the control. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "height"): string|number; @@ -31996,6 +33207,7 @@ interface JQuery { /** * /Sets the height of the control. * + * * @optionValue New value to be set. */ @@ -32003,18 +33215,21 @@ interface JQuery { /** * Gets/Sets tabIndex attribute for the editor input. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "tabIndex"): number; /** * /Sets tabIndex attribute for the editor input. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; /** * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "nullValue"): string|number; @@ -32022,6 +33237,7 @@ interface JQuery { /** * /Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string * + * * @optionValue New value to be set. */ @@ -32029,36 +33245,42 @@ interface JQuery { /** * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "inputName"): string; /** * /Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; /** * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "readOnly"): boolean; /** * /Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "readOnly", optionValue: boolean): void; /** * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "disabled"): boolean; /** * /Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "disabled", optionValue: boolean): void; @@ -32067,6 +33289,7 @@ interface JQuery { * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "validatorOptions"): any; @@ -32075,36 +33298,42 @@ interface JQuery { * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; /** * Set/Get the locale setting for the widget. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "locale"): any; /** * Set/Get the locale setting for the widget. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "locale", optionValue: any): void; /** * Set/Get the locale language setting for the widget. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "language"): string; /** * Set/Get the locale language setting for the widget. * + * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "language", optionValue: string): void; /** * Set/Get the regional setting for the widget. + * */ igCurrencyEditor(optionLiteral: 'option', optionName: "regional"): string|Object; @@ -32112,6 +33341,7 @@ interface JQuery { /** * Set/Get the regional setting for the widget. * + * * @optionValue New value to be set. */ @@ -32141,6 +33371,7 @@ interface JQuery { * Gets/Sets the pattern for positive numeric values, which is used in display (no focus) state. * If you use the "en-US" culture the default value for "positivePattern" will be "n$" where the "$" flag represents the "numericSymbol" and the "n" flag represents the value of the number. * Note: this option has priority over possible regional settings. + * */ igPercentEditor(optionLiteral: 'option', optionName: "positivePattern"): string; @@ -32149,6 +33380,7 @@ interface JQuery { * If you use the "en-US" culture the default value for "positivePattern" will be "n$" where the "$" flag represents the "numericSymbol" and the "n" flag represents the value of the number. * Note: this option has priority over possible regional settings. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "positivePattern", optionValue: string): void; @@ -32156,6 +33388,7 @@ interface JQuery { /** * Gets/Sets the symbol, which is used in display (no focus) state. * Note: this option has priority over possible regional settings. + * */ igPercentEditor(optionLiteral: 'option', optionName: "percentSymbol"): string; @@ -32163,6 +33396,7 @@ interface JQuery { * /Sets the symbol, which is used in display (no focus) state. * Note: this option has priority over possible regional settings. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "percentSymbol", optionValue: string): void; @@ -32173,6 +33407,7 @@ interface JQuery { * For example, if the factor is 100 and the "value" is set to 0.123, then the editor will show string "12.3". * Possible values: 1 or 100. * Note: this option has priority over possible regional settings. + * */ igPercentEditor(optionLiteral: 'option', optionName: "displayFactor"): number; @@ -32183,6 +33418,7 @@ interface JQuery { * Possible values: 1 or 100. * Note: this option has priority over possible regional settings. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "displayFactor", optionValue: number): void; @@ -32191,6 +33427,7 @@ interface JQuery { * Defines the range that editor's value can accept.This is achieved by setting the [minValue](ui.igPercentEditor#options:minValue) and [maxValue](ui.igPercentEditor#options:maxValue) editor's options, accordingly to the lowest and highest accepted values for the defined numeric mode. * The range for the specific type follows the numeric type standards, e.g. in .NET Framework [floating-point](https://msdn.microsoft.com/en-us/library/9ahet949.aspx) types and [integral types](https://msdn.microsoft.com/en-us/library/exx3b86w.aspx). * In addition, the maximum value that can be set to [minDecimals](ui.igPercentEditor#options:minDecimals) and [maxDecimals](ui.igPercentEditor#options:maxDecimals) options can be 15, when editor is in 'double' mode and 7, when in 'float' mode. + * */ igPercentEditor(optionLiteral: 'option', optionName: "dataMode"): string; @@ -32200,6 +33437,7 @@ interface JQuery { * The range for the specific type follows the numeric type standards, e.g. in .NET Framework [floating-point](https://msdn.microsoft.com/en-us/library/9ahet949.aspx) types and [integral types](https://msdn.microsoft.com/en-us/library/exx3b86w.aspx). * In addition, the maximum value that can be set to [minDecimals](ui.igPercentEditor#options:minDecimals) and [maxDecimals](ui.igPercentEditor#options:maxDecimals) options can be 15, when editor is in 'double' mode and 7, when in 'float' mode. * + * * @optionValue New value to be set. */ @@ -32207,12 +33445,14 @@ interface JQuery { /** * Gets/Sets the default delta-value which is used with "spin" [buttonType](ui.igpercenteditor#options:buttonType) or [spinUp](ui.igpercenteditor#methods:spinUp) and [spinDown](ui.igpercenteditor#methods:spinDown) methods to increment or decrement value in the editor. The value can not be negative. Non integer value is supported only for dataMode double and float. + * */ igPercentEditor(optionLiteral: 'option', optionName: "spinDelta"): number; /** * /Sets the default delta-value which is used with "spin" [buttonType](ui.igpercenteditor#options:buttonType) or [spinUp](ui.igpercenteditor#methods:spinUp) and [spinDown](ui.igpercenteditor#methods:spinDown) methods to increment or decrement value in the editor. The value can not be negative. Non integer value is supported only for dataMode double and float. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "spinDelta", optionValue: number): void; @@ -32220,6 +33460,7 @@ interface JQuery { /** * Gets/Sets list of items which are used as a source for the drop-down list. * Items in the list can be of type number. + * */ igPercentEditor(optionLiteral: 'option', optionName: "listItems"): any[]; @@ -32227,6 +33468,7 @@ interface JQuery { * /Sets list of items which are used as a source for the drop-down list. * Items in the list can be of type number. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "listItems", optionValue: any[]): void; @@ -32236,6 +33478,7 @@ interface JQuery { * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) options. + * */ igPercentEditor(optionLiteral: 'option', optionName: "negativeSign"): string; @@ -32245,6 +33488,7 @@ interface JQuery { * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) options. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "negativeSign", optionValue: string): void; @@ -32253,6 +33497,7 @@ interface JQuery { * Gets/Sets the string, which is used as negative pattern. The "n" flag represents the value of number. The "-" and "()" flags are static part of pattern. * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * */ igPercentEditor(optionLiteral: 'option', optionName: "negativePattern"): string; @@ -32261,6 +33506,7 @@ interface JQuery { * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "negativePattern", optionValue: string): void; @@ -32270,6 +33516,7 @@ interface JQuery { * Note: this option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. + * */ igPercentEditor(optionLiteral: 'option', optionName: "decimalSeparator"): string; @@ -32279,6 +33526,7 @@ interface JQuery { * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "decimalSeparator", optionValue: string): void; @@ -32289,6 +33537,7 @@ interface JQuery { * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. + * */ igPercentEditor(optionLiteral: 'option', optionName: "groupSeparator"): string; @@ -32299,6 +33548,7 @@ interface JQuery { * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option's value should not be equal to the value of [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "groupSeparator", optionValue: string): void; @@ -32312,6 +33562,7 @@ interface JQuery { * Note: The numbers in the array must be positive integers. * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. + * */ igPercentEditor(optionLiteral: 'option', optionName: "groups"): any[]; @@ -32325,6 +33576,7 @@ interface JQuery { * Note: This option has priority over possible regional settings. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "groups", optionValue: any[]): void; @@ -32335,6 +33587,7 @@ interface JQuery { * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. + * */ igPercentEditor(optionLiteral: 'option', optionName: "maxDecimals"): number; @@ -32345,6 +33598,7 @@ interface JQuery { * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "maxDecimals", optionValue: number): void; @@ -32356,6 +33610,7 @@ interface JQuery { * Note: In case of min decimals value higher than max decimals - max decimals are equaled to min decimals property. * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. + * */ igPercentEditor(optionLiteral: 'option', optionName: "minDecimals"): number; @@ -32367,6 +33622,7 @@ interface JQuery { * Note: Even if the default value is null - if internationalization file is provided and it contains default values for those properties the values are imlicitly set. * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "minDecimals", optionValue: number): void; @@ -32375,6 +33631,7 @@ interface JQuery { * Gets/Sets whether the last decimal place will be rounded, when the maxDecimal option is defined and applied. * For example if the initial editor value is set to 123.4567, maxDecimals option is set to 3 and roundDecimals is enabled, * then editor will round the value and will display it as 123.457. If roundDecimals is disabled then editor value will be truncated to 123.456. + * */ igPercentEditor(optionLiteral: 'option', optionName: "roundDecimals"): boolean; @@ -32383,12 +33640,14 @@ interface JQuery { * For example if the initial editor value is set to 123.4567, maxDecimals option is set to 3 and roundDecimals is enabled, * then editor will round the value and will display it as 123.457. If roundDecimals is disabled then editor value will be truncated to 123.456. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "roundDecimals", optionValue: boolean): void; /** * Gets/Sets the horizontal alignment of the text in the editor. + * */ igPercentEditor(optionLiteral: 'option', optionName: "textAlign"): string; @@ -32396,6 +33655,7 @@ interface JQuery { /** * /Sets the horizontal alignment of the text in the editor. * + * * @optionValue New value to be set. */ @@ -32403,24 +33663,28 @@ interface JQuery { /** * Gets/Sets the minimum value which can be entered in the editor by the end user. + * */ igPercentEditor(optionLiteral: 'option', optionName: "minValue"): number; /** * /Sets the minimum value which can be entered in the editor by the end user. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "minValue", optionValue: number): void; /** * Gets/Sets the maximum value which can be entered in the editor by the end user. + * */ igPercentEditor(optionLiteral: 'option', optionName: "maxValue"): number; /** * /Sets the maximum value which can be entered in the editor by the end user. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "maxValue", optionValue: number): void; @@ -32428,6 +33692,7 @@ interface JQuery { /** * Gets/Sets whether the editor value can become null. * If that option is disabled, and editor has no value, then value is set to 0 (or minValue/maxValue). + * */ igPercentEditor(optionLiteral: 'option', optionName: "allowNullValue"): boolean; @@ -32435,6 +33700,7 @@ interface JQuery { * /Sets whether the editor value can become null. * If that option is disabled, and editor has no value, then value is set to 0 (or minValue/maxValue). * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "allowNullValue", optionValue: boolean): void; @@ -32443,6 +33709,7 @@ interface JQuery { * Gets/Sets support for scientific format. * If that option is set, then numeric value appears as a string with possible E-power flag. In edit mode the "E" or "e" character can be entered as well. * Notes: The "+" character is not supported in edit mode. + * */ igPercentEditor(optionLiteral: 'option', optionName: "scientificFormat"): string; @@ -32452,6 +33719,7 @@ interface JQuery { * If that option is set, then numeric value appears as a string with possible E-power flag. In edit mode the "E" or "e" character can be entered as well. * Notes: The "+" character is not supported in edit mode. * + * * @optionValue New value to be set. */ @@ -32460,6 +33728,7 @@ interface JQuery { /** * Gets/Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. + * */ igPercentEditor(optionLiteral: 'option', optionName: "spinWrapAround"): boolean; @@ -32467,18 +33736,21 @@ interface JQuery { * /Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "spinWrapAround", optionValue: boolean): void; /** * Gets/Sets if the editor should only allow values from the list of items. Enabling this also causes spin actions to cycle through list items instead. + * */ igPercentEditor(optionLiteral: 'option', optionName: "isLimitedToListValues"): boolean; /** * /Sets if the editor should only allow values from the list of items. Enabling this also causes spin actions to cycle through list items instead. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "isLimitedToListValues", optionValue: boolean): void; @@ -32550,6 +33822,7 @@ interface JQuery { /** * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. * + * */ igPercentEditor(optionLiteral: 'option', optionName: "value"): any; @@ -32557,12 +33830,14 @@ interface JQuery { * /Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. * * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "value", optionValue: any): void; /** * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. + * */ igPercentEditor(optionLiteral: 'option', optionName: "buttonType"): string; @@ -32570,6 +33845,7 @@ interface JQuery { /** * Visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too.Note! This option can not be set runtime. * + * * @optionValue New value to be set. */ @@ -32577,24 +33853,28 @@ interface JQuery { /** * Gets/Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. + * */ igPercentEditor(optionLiteral: 'option', optionName: "listWidth"): number; /** * /Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of editor is set as a drop-down width. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "listWidth", optionValue: number): void; /** * Gets/Sets the hover/unhover animation duration of a drop-down list item. + * */ igPercentEditor(optionLiteral: 'option', optionName: "listItemHoverDuration"): number; /** * /Sets the hover/unhover animation duration of a drop-down list item. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "listItemHoverDuration", optionValue: number): void; @@ -32604,6 +33884,7 @@ interface JQuery { * If the option is set to false the editor will attach the drop-down list element to the editor container * If the option is set to true the editor will attach its drop-down list to as a child of the body. * Note! This option can not be set runtime. + * */ igPercentEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody"): boolean; @@ -32613,18 +33894,21 @@ interface JQuery { * If the option is set to true the editor will attach its drop-down list to as a child of the body. * Note! This option can not be set runtime. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "dropDownAttachedToBody", optionValue: boolean): void; /** * Gets/Sets show/hide drop-down list animation duration in milliseconds. + * */ igPercentEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration"): number; /** * /Sets show/hide drop-down list animation duration in milliseconds. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "dropDownAnimationDuration", optionValue: number): void; @@ -32634,6 +33918,7 @@ interface JQuery { * Notes: * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. * This option can not be set runtime. + * */ igPercentEditor(optionLiteral: 'option', optionName: "visibleItemsCount"): number; @@ -32643,24 +33928,28 @@ interface JQuery { * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. * This option can not be set runtime. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "visibleItemsCount", optionValue: number): void; /** * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * */ igPercentEditor(optionLiteral: 'option', optionName: "placeHolder"): string; /** * /Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "placeHolder", optionValue: string): void; /** * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * */ igPercentEditor(optionLiteral: 'option', optionName: "selectionOnFocus"): string; @@ -32668,6 +33957,7 @@ interface JQuery { /** * /Sets the action when the editor gets focused. The default value is selectAll. * + * * @optionValue New value to be set. */ @@ -32675,30 +33965,35 @@ interface JQuery { /** * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * */ igPercentEditor(optionLiteral: 'option', optionName: "revertIfNotValid"): boolean; /** * /Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "revertIfNotValid", optionValue: boolean): void; /** * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * */ igPercentEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter"): boolean; /** * /Sets if the editor should prevent form submition when enter key is pressed. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter", optionValue: boolean): void; /** * Gets/Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * */ igPercentEditor(optionLiteral: 'option', optionName: "dropDownOrientation"): string; @@ -32706,6 +34001,7 @@ interface JQuery { /** * /Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the editor has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. * + * * @optionValue New value to be set. */ @@ -32715,6 +34011,7 @@ interface JQuery { * Gets the ability to limit the editor to be used only as a dropdown list. When set to true the editor input is not editable. * Note! In case there are no list items - the editor will reamin readonly * Note! This option can not be set runtime. + * */ igPercentEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly"): boolean; @@ -32723,18 +34020,21 @@ interface JQuery { * Note! In case there are no list items - the editor will reamin readonly * Note! This option can not be set runtime. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly", optionValue: boolean): void; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * */ igPercentEditor(optionLiteral: 'option', optionName: "suppressNotifications"): boolean; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "suppressNotifications", optionValue: boolean): void; @@ -32743,6 +34043,7 @@ interface JQuery { * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. * Note: The option does not perform device detection so its behavior is always active if enabled. * Note: When drop down is opened the only way to close it will be using the drop down button. + * */ igPercentEditor(optionLiteral: 'option', optionName: "suppressKeyboard"): boolean; @@ -32751,12 +34052,14 @@ interface JQuery { * Note: The option does not perform device detection so its behavior is always active if enabled. * Note: When drop down is opened the only way to close it will be using the drop down button. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "suppressKeyboard", optionValue: boolean): void; /** * Gets/Sets the width of the control. + * */ igPercentEditor(optionLiteral: 'option', optionName: "width"): string|number; @@ -32764,6 +34067,7 @@ interface JQuery { /** * /Sets the width of the control. * + * * @optionValue New value to be set. */ @@ -32771,6 +34075,7 @@ interface JQuery { /** * Gets/Sets the height of the control. + * */ igPercentEditor(optionLiteral: 'option', optionName: "height"): string|number; @@ -32778,6 +34083,7 @@ interface JQuery { /** * /Sets the height of the control. * + * * @optionValue New value to be set. */ @@ -32785,18 +34091,21 @@ interface JQuery { /** * Gets/Sets tabIndex attribute for the editor input. + * */ igPercentEditor(optionLiteral: 'option', optionName: "tabIndex"): number; /** * /Sets tabIndex attribute for the editor input. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; /** * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * */ igPercentEditor(optionLiteral: 'option', optionName: "nullValue"): string|number; @@ -32804,6 +34113,7 @@ interface JQuery { /** * /Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string * + * * @optionValue New value to be set. */ @@ -32811,36 +34121,42 @@ interface JQuery { /** * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * */ igPercentEditor(optionLiteral: 'option', optionName: "inputName"): string; /** * /Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; /** * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * */ igPercentEditor(optionLiteral: 'option', optionName: "readOnly"): boolean; /** * /Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "readOnly", optionValue: boolean): void; /** * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * */ igPercentEditor(optionLiteral: 'option', optionName: "disabled"): boolean; /** * /Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "disabled", optionValue: boolean): void; @@ -32849,6 +34165,7 @@ interface JQuery { * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * */ igPercentEditor(optionLiteral: 'option', optionName: "validatorOptions"): any; @@ -32857,36 +34174,42 @@ interface JQuery { * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; /** * Set/Get the locale setting for the widget. + * */ igPercentEditor(optionLiteral: 'option', optionName: "locale"): any; /** * Set/Get the locale setting for the widget. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "locale", optionValue: any): void; /** * Set/Get the locale language setting for the widget. + * */ igPercentEditor(optionLiteral: 'option', optionName: "language"): string; /** * Set/Get the locale language setting for the widget. * + * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "language", optionValue: string): void; /** * Set/Get the regional setting for the widget. + * */ igPercentEditor(optionLiteral: 'option', optionName: "regional"): string|Object; @@ -32894,6 +34217,7 @@ interface JQuery { /** * Set/Get the regional setting for the widget. * + * * @optionValue New value to be set. */ @@ -32930,6 +34254,7 @@ interface JQuery { /** * Gets visibility of the clear button. That option can be set only on initialization. + * */ igMaskEditor(optionLiteral: 'option', optionName: "buttonType"): string; @@ -32937,6 +34262,7 @@ interface JQuery { /** * Visibility of the clear button. That option can be set only on initialization. * + * * @optionValue New value to be set. */ @@ -32960,6 +34286,7 @@ interface JQuery { * >: all letters to the right are converted to the upper case. In order to disable conversion, the ">" flag should be used again. * <: all letters to the right are converted to the lower case. In order to disable conversion, the "<" flag should be used again. * Note! This option can not be set runtime. + * */ igMaskEditor(optionLiteral: 'option', optionName: "inputMask"): string; @@ -32982,12 +34309,14 @@ interface JQuery { * <: all letters to the right are converted to the lower case. In order to disable conversion, the "<" flag should be used again. * Note! This option can not be set runtime. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "inputMask", optionValue: string): void; /** * It affects the value of the control (value method/option and submitted in forms). It defines what the value should contain from text, unfilled prompts and literals. The default is allText and when used value method/option returns the text entered, all prompts (positions) and literals. + * */ igMaskEditor(optionLiteral: 'option', optionName: "dataMode"): string; @@ -32995,6 +34324,7 @@ interface JQuery { /** * It affects the value of the control (value method/option and submitted in forms). It defines what the value should contain from text, unfilled prompts and literals. The default is allText and when used value method/option returns the text entered, all prompts (positions) and literals. * + * * @optionValue New value to be set. */ @@ -33002,36 +34332,42 @@ interface JQuery { /** * Gets character which is used as prompt in edit mode for available entry position. + * */ igMaskEditor(optionLiteral: 'option', optionName: "unfilledCharsPrompt"): string; /** * Character which is used as prompt in edit mode for available entry position. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "unfilledCharsPrompt", optionValue: string): void; /** * Gets/Sets character which is used as replacement of not-filled required position in mask when editor is in display mode (not focused). + * */ igMaskEditor(optionLiteral: 'option', optionName: "padChar"): string; /** * /Sets character which is used as replacement of not-filled required position in mask when editor is in display mode (not focused). * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "padChar", optionValue: string): void; /** * Gets/Sets character which is used as replacement of not-filled required position in mask when application calls get for the [value](ui.igmaskeditor#methods:value) methods. + * */ igMaskEditor(optionLiteral: 'option', optionName: "emptyChar"): string; /** * /Sets character which is used as replacement of not-filled required position in mask when application calls get for the [value](ui.igmaskeditor#methods:value) methods. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "emptyChar", optionValue: string): void; @@ -33041,6 +34377,7 @@ interface JQuery { * Notes: * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. * Note! This option can not be se runtime. + * */ igMaskEditor(optionLiteral: 'option', optionName: "includeKeys"): string; @@ -33050,6 +34387,7 @@ interface JQuery { * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. * Note! This option can not be se runtime. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "includeKeys", optionValue: string): void; @@ -33059,6 +34397,7 @@ interface JQuery { * Notes: * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. * Note! This option can not be se runtime. + * */ igMaskEditor(optionLiteral: 'option', optionName: "excludeKeys"): string; @@ -33068,6 +34407,7 @@ interface JQuery { * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. * Note! This option can not be se runtime. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "excludeKeys", optionValue: string): void; @@ -33218,12 +34558,14 @@ interface JQuery { /** * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * */ igMaskEditor(optionLiteral: 'option', optionName: "value"): any; /** * /Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "value", optionValue: any): void; @@ -33232,6 +34574,7 @@ interface JQuery { /** * Gets/Sets the horizontal alignment of the text in the editor. + * */ igMaskEditor(optionLiteral: 'option', optionName: "textAlign"): string; @@ -33239,6 +34582,7 @@ interface JQuery { /** * /Sets the horizontal alignment of the text in the editor. * + * * @optionValue New value to be set. */ @@ -33246,18 +34590,21 @@ interface JQuery { /** * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * */ igMaskEditor(optionLiteral: 'option', optionName: "placeHolder"): string; /** * /Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "placeHolder", optionValue: string): void; /** * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * */ igMaskEditor(optionLiteral: 'option', optionName: "selectionOnFocus"): string; @@ -33265,6 +34612,7 @@ interface JQuery { /** * /Sets the action when the editor gets focused. The default value is selectAll. * + * * @optionValue New value to be set. */ @@ -33272,24 +34620,28 @@ interface JQuery { /** * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * */ igMaskEditor(optionLiteral: 'option', optionName: "revertIfNotValid"): boolean; /** * /Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "revertIfNotValid", optionValue: boolean): void; /** * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * */ igMaskEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter"): boolean; /** * /Sets if the editor should prevent form submition when enter key is pressed. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter", optionValue: boolean): void; @@ -33297,6 +34649,7 @@ interface JQuery { /** * Gets/Sets the ability to convert the input characters to upper case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. * Note! When the option is set at runtime the editor is not changing the current value. + * */ igMaskEditor(optionLiteral: 'option', optionName: "toUpper"): boolean; @@ -33304,6 +34657,7 @@ interface JQuery { * /Sets the ability to convert the input characters to upper case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. * Note! When the option is set at runtime the editor is not changing the current value. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "toUpper", optionValue: boolean): void; @@ -33311,6 +34665,7 @@ interface JQuery { /** * Gets/Sets the ability to convert the input characters to lower case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. * Note! When the option is set at runtime the editor is not changing the current value. + * */ igMaskEditor(optionLiteral: 'option', optionName: "toLower"): boolean; @@ -33318,24 +34673,28 @@ interface JQuery { * /Sets the ability to convert the input characters to lower case (true) or keeps the characters as they are (false). The option has effect only while keyboard entries and paste. * Note! When the option is set at runtime the editor is not changing the current value. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "toLower", optionValue: boolean): void; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * */ igMaskEditor(optionLiteral: 'option', optionName: "suppressNotifications"): boolean; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "suppressNotifications", optionValue: boolean): void; /** * Gets/Sets the width of the control. + * */ igMaskEditor(optionLiteral: 'option', optionName: "width"): string|number; @@ -33343,6 +34702,7 @@ interface JQuery { /** * /Sets the width of the control. * + * * @optionValue New value to be set. */ @@ -33350,6 +34710,7 @@ interface JQuery { /** * Gets/Sets the height of the control. + * */ igMaskEditor(optionLiteral: 'option', optionName: "height"): string|number; @@ -33357,6 +34718,7 @@ interface JQuery { /** * /Sets the height of the control. * + * * @optionValue New value to be set. */ @@ -33364,12 +34726,14 @@ interface JQuery { /** * Gets/Sets tabIndex attribute for the editor input. + * */ igMaskEditor(optionLiteral: 'option', optionName: "tabIndex"): number; /** * /Sets tabIndex attribute for the editor input. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; @@ -33377,6 +34741,7 @@ interface JQuery { /** * Gets/Sets whether the editor value can become null. * If that option is false, and editor has no value, then value is set to an empty string. + * */ igMaskEditor(optionLiteral: 'option', optionName: "allowNullValue"): boolean; @@ -33384,12 +34749,14 @@ interface JQuery { * /Sets whether the editor value can become null. * If that option is false, and editor has no value, then value is set to an empty string. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "allowNullValue", optionValue: boolean): void; /** * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * */ igMaskEditor(optionLiteral: 'option', optionName: "nullValue"): string|number; @@ -33397,6 +34764,7 @@ interface JQuery { /** * /Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string * + * * @optionValue New value to be set. */ @@ -33404,36 +34772,42 @@ interface JQuery { /** * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * */ igMaskEditor(optionLiteral: 'option', optionName: "inputName"): string; /** * /Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; /** * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * */ igMaskEditor(optionLiteral: 'option', optionName: "readOnly"): boolean; /** * /Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "readOnly", optionValue: boolean): void; /** * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * */ igMaskEditor(optionLiteral: 'option', optionName: "disabled"): boolean; /** * /Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "disabled", optionValue: boolean): void; @@ -33442,6 +34816,7 @@ interface JQuery { * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * */ igMaskEditor(optionLiteral: 'option', optionName: "validatorOptions"): any; @@ -33450,36 +34825,42 @@ interface JQuery { * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; /** * Set/Get the locale setting for the widget. + * */ igMaskEditor(optionLiteral: 'option', optionName: "locale"): any; /** * Set/Get the locale setting for the widget. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "locale", optionValue: any): void; /** * Set/Get the locale language setting for the widget. + * */ igMaskEditor(optionLiteral: 'option', optionName: "language"): string; /** * Set/Get the locale language setting for the widget. * + * * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "language", optionValue: string): void; /** * Set/Get the regional setting for the widget. + * */ igMaskEditor(optionLiteral: 'option', optionName: "regional"): string|Object; @@ -33487,6 +34868,7 @@ interface JQuery { /** * Set/Get the regional setting for the widget. * + * * @optionValue New value to be set. */ @@ -33505,24 +34887,16 @@ interface JQuery { igMaskEditor(optionLiteral: 'option', optionName: "dropDownItemSelected", optionValue: DropDownItemSelectedEvent): void; /** - * Event which is raised after text in the editor was changed. It can be raised when keyUp event occurs, + * Fired after the editor's text has been changed. It can be raised when keyUp event occurs, * when the clear button is clicked or when an item from a list is selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.text to obtain new text - * Use ui.oldText to obtain the old text. */ igMaskEditor(optionLiteral: 'option', optionName: "textChanged"): TextChangedEvent; /** - * Event which is raised after text in the editor was changed. It can be raised when keyUp event occurs, + * Fired after the editor's text has been changed. It can be raised when keyUp event occurs, * when the clear button is clicked or when an item from a list is selected. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.text to obtain new text - * Use ui.oldText to obtain the old text. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igMaskEditor(optionLiteral: 'option', optionName: "textChanged", optionValue: TextChangedEvent): void; igMaskEditor(options: IgMaskEditor): JQuery; @@ -33553,6 +34927,7 @@ interface JQuery { /** * Gets/Sets the value of the editor. Date object can be set as value. String can be set and the editor will pass it to the Date object constructor and use the corresponding Date object as the value. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. + * */ igDateEditor(optionLiteral: 'option', optionName: "value"): Date; @@ -33560,6 +34935,7 @@ interface JQuery { * /Sets the value of the editor. Date object can be set as value. String can be set and the editor will pass it to the Date object constructor and use the corresponding Date object as the value. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "value", optionValue: Date): void; @@ -33567,6 +34943,7 @@ interface JQuery { /** * Gets the minimum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. + * */ igDateEditor(optionLiteral: 'option', optionName: "minValue"): Date; @@ -33574,6 +34951,7 @@ interface JQuery { * The minimum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "minValue", optionValue: Date): void; @@ -33581,6 +34959,7 @@ interface JQuery { /** * Gets the maximum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. + * */ igDateEditor(optionLiteral: 'option', optionName: "maxValue"): Date; @@ -33588,6 +34967,7 @@ interface JQuery { * The maximum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "maxValue", optionValue: Date): void; @@ -33630,6 +35010,7 @@ interface JQuery { * "f": milliseconds field in hundreds * "ff": milliseconds field in tenths * "fff": milliseconds field + * */ igDateEditor(optionLiteral: 'option', optionName: "dateDisplayFormat"): string; @@ -33672,6 +35053,7 @@ interface JQuery { * "ff": milliseconds field in tenths * "fff": milliseconds field * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "dateDisplayFormat", optionValue: string): void; @@ -33703,6 +35085,7 @@ interface JQuery { * "ff": milliseconds field in tenths * "fff": milliseconds field * Note! This option can not be set runtime. + * */ igDateEditor(optionLiteral: 'option', optionName: "dateInputFormat"): string; @@ -33734,6 +35117,7 @@ interface JQuery { * "fff": milliseconds field * Note! This option can not be set runtime. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "dateInputFormat", optionValue: string): void; @@ -33743,6 +35127,7 @@ interface JQuery { * The [enableUTCDates](ui.%%WidgetNameLowered%%#options:enableUTCDates) option can be used to output an UTC ISO string instead. * For example 10:00 AM from a client with local offset of 5 hours ahead of GMT will be serialized as: * "2016-11-11T10:00:00+05:00" + * */ igDateEditor(optionLiteral: 'option', optionName: "dataMode"): string; @@ -33753,6 +35138,7 @@ interface JQuery { * For example 10:00 AM from a client with local offset of 5 hours ahead of GMT will be serialized as: * "2016-11-11T10:00:00+05:00" * + * * @optionValue New value to be set. */ @@ -33762,6 +35148,7 @@ interface JQuery { * Gets/Sets time zone offset from UTC, in minutes. The client date values are displayed with this offset instead of the local one. * Note: It is recommended that this option is used with an UTC value (e.g. "2016-11-03T14:08:08.504Z") so the outcome is consistent. * Values with ambiguous time zone could map to unpredictable times depending on the user agent local zone. + * */ igDateEditor(optionLiteral: 'option', optionName: "displayTimeOffset"): any; @@ -33770,12 +35157,14 @@ interface JQuery { * Note: It is recommended that this option is used with an UTC value (e.g. "2016-11-03T14:08:08.504Z") so the outcome is consistent. * Values with ambiguous time zone could map to unpredictable times depending on the user agent local zone. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "displayTimeOffset", optionValue: any): void; /** * Gets visibility of the spin and clear buttons. That option can be set only on initialization. Combinations like 'spin,clear' are supported too. + * */ igDateEditor(optionLiteral: 'option', optionName: "buttonType"): string; @@ -33783,6 +35172,7 @@ interface JQuery { /** * Visibility of the spin and clear buttons. That option can be set only on initialization. Combinations like 'spin,clear' are supported too. * + * * @optionValue New value to be set. */ @@ -33802,6 +35192,7 @@ interface JQuery { * milliseconds: 100 * } * Time periods that don't have values use 1 as default. + * */ igDateEditor(optionLiteral: 'option', optionName: "spinDelta"): number|Object; @@ -33821,6 +35212,7 @@ interface JQuery { * } * Time periods that don't have values use 1 as default. * + * * @optionValue New value to be set. */ @@ -33830,6 +35222,7 @@ interface JQuery { * Gets/Sets ability to modify only 1 date field on spin events. * Value false enables changes of other date fields when incremented or decremented date-field reaches its limits. * Value true modifies only value of one field. + * */ igDateEditor(optionLiteral: 'option', optionName: "limitSpinToCurrentField"): boolean; @@ -33838,6 +35231,7 @@ interface JQuery { * Value false enables changes of other date fields when incremented or decremented date-field reaches its limits. * Value true modifies only value of one field. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "limitSpinToCurrentField", optionValue: boolean): void; @@ -33845,6 +35239,7 @@ interface JQuery { /** * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. * The option is only applied in "date" [dataMode](ui.%%WidgetNameLowered%%#options:dataMode). + * */ igDateEditor(optionLiteral: 'option', optionName: "enableUTCDates"): boolean; @@ -33852,6 +35247,7 @@ interface JQuery { * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. * The option is only applied in "date" [dataMode](ui.%%WidgetNameLowered%%#options:dataMode). * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "enableUTCDates", optionValue: boolean): void; @@ -33860,6 +35256,7 @@ interface JQuery { * Gets/Sets year for auto detection of 20th and 21st centuries. * That option is used to automatically fill century when the user entered only 1 or 2 digits into the year field or when the date pattern contains only 1 or 2 year positions, e.g. "yy" or "y". * If user entered value larger than value of this option, then 20th century is used, otherwise the 21st. + * */ igDateEditor(optionLiteral: 'option', optionName: "centuryThreshold"): number; @@ -33868,24 +35265,28 @@ interface JQuery { * That option is used to automatically fill century when the user entered only 1 or 2 digits into the year field or when the date pattern contains only 1 or 2 year positions, e.g. "yy" or "y". * If user entered value larger than value of this option, then 20th century is used, otherwise the 21st. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "centuryThreshold", optionValue: number): void; /** * Gets/Set value used to increase/decrease year part of the date, in order to set difference between year in Gregorian calendar and displayed year. + * */ igDateEditor(optionLiteral: 'option', optionName: "yearShift"): number; /** * /Set value used to increase/decrease year part of the date, in order to set difference between year in Gregorian calendar and displayed year. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "yearShift", optionValue: number): void; /** * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * */ igDateEditor(optionLiteral: 'option', optionName: "nullValue"): string|number|Date; @@ -33893,6 +35294,7 @@ interface JQuery { /** * /Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string * + * * @optionValue New value to be set. */ @@ -34061,6 +35463,7 @@ interface JQuery { * Notes: * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. * Note! This option can not be se runtime. + * */ igDateEditor(optionLiteral: 'option', optionName: "includeKeys"): string; @@ -34070,6 +35473,7 @@ interface JQuery { * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. * Note! This option can not be se runtime. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "includeKeys", optionValue: string): void; @@ -34079,6 +35483,7 @@ interface JQuery { * Notes: * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. * Note! This option can not be se runtime. + * */ igDateEditor(optionLiteral: 'option', optionName: "excludeKeys"): string; @@ -34088,6 +35493,7 @@ interface JQuery { * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. * Note! This option can not be se runtime. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "excludeKeys", optionValue: string): void; @@ -34152,6 +35558,7 @@ interface JQuery { /** * Gets/Sets the horizontal alignment of the text in the editor. + * */ igDateEditor(optionLiteral: 'option', optionName: "textAlign"): string; @@ -34159,6 +35566,7 @@ interface JQuery { /** * /Sets the horizontal alignment of the text in the editor. * + * * @optionValue New value to be set. */ @@ -34166,18 +35574,21 @@ interface JQuery { /** * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * */ igDateEditor(optionLiteral: 'option', optionName: "placeHolder"): string; /** * /Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "placeHolder", optionValue: string): void; /** * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * */ igDateEditor(optionLiteral: 'option', optionName: "selectionOnFocus"): string; @@ -34185,6 +35596,7 @@ interface JQuery { /** * /Sets the action when the editor gets focused. The default value is selectAll. * + * * @optionValue New value to be set. */ @@ -34192,42 +35604,49 @@ interface JQuery { /** * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * */ igDateEditor(optionLiteral: 'option', optionName: "revertIfNotValid"): boolean; /** * /Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "revertIfNotValid", optionValue: boolean): void; /** * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * */ igDateEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter"): boolean; /** * /Sets if the editor should prevent form submition when enter key is pressed. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "preventSubmitOnEnter", optionValue: boolean): void; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * */ igDateEditor(optionLiteral: 'option', optionName: "suppressNotifications"): boolean; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "suppressNotifications", optionValue: boolean): void; /** * Gets/Sets the width of the control. + * */ igDateEditor(optionLiteral: 'option', optionName: "width"): string|number; @@ -34235,6 +35654,7 @@ interface JQuery { /** * /Sets the width of the control. * + * * @optionValue New value to be set. */ @@ -34242,6 +35662,7 @@ interface JQuery { /** * Gets/Sets the height of the control. + * */ igDateEditor(optionLiteral: 'option', optionName: "height"): string|number; @@ -34249,6 +35670,7 @@ interface JQuery { /** * /Sets the height of the control. * + * * @optionValue New value to be set. */ @@ -34256,12 +35678,14 @@ interface JQuery { /** * Gets/Sets tabIndex attribute for the editor input. + * */ igDateEditor(optionLiteral: 'option', optionName: "tabIndex"): number; /** * /Sets tabIndex attribute for the editor input. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; @@ -34269,6 +35693,7 @@ interface JQuery { /** * Gets/Sets whether the editor value can become null. * If that option is false, and editor has no value, then value is set to an empty string. + * */ igDateEditor(optionLiteral: 'option', optionName: "allowNullValue"): boolean; @@ -34276,42 +35701,49 @@ interface JQuery { * /Sets whether the editor value can become null. * If that option is false, and editor has no value, then value is set to an empty string. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "allowNullValue", optionValue: boolean): void; /** * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * */ igDateEditor(optionLiteral: 'option', optionName: "inputName"): string; /** * /Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; /** * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * */ igDateEditor(optionLiteral: 'option', optionName: "readOnly"): boolean; /** * /Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "readOnly", optionValue: boolean): void; /** * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * */ igDateEditor(optionLiteral: 'option', optionName: "disabled"): boolean; /** * /Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "disabled", optionValue: boolean): void; @@ -34320,6 +35752,7 @@ interface JQuery { * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * */ igDateEditor(optionLiteral: 'option', optionName: "validatorOptions"): any; @@ -34328,36 +35761,42 @@ interface JQuery { * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; /** * Set/Get the locale setting for the widget. + * */ igDateEditor(optionLiteral: 'option', optionName: "locale"): any; /** * Set/Get the locale setting for the widget. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "locale", optionValue: any): void; /** * Set/Get the locale language setting for the widget. + * */ igDateEditor(optionLiteral: 'option', optionName: "language"): string; /** * Set/Get the locale language setting for the widget. * + * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "language", optionValue: string): void; /** * Set/Get the regional setting for the widget. + * */ igDateEditor(optionLiteral: 'option', optionName: "regional"): string|Object; @@ -34365,6 +35804,7 @@ interface JQuery { /** * Set/Get the regional setting for the widget. * + * * @optionValue New value to be set. */ @@ -34470,6 +35910,7 @@ interface JQuery { /** * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too. + * */ igDatePicker(optionLiteral: 'option', optionName: "buttonType"): string; @@ -34477,6 +35918,7 @@ interface JQuery { /** * Visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown,spin' or 'spin,clear' are supported too. * + * * @optionValue New value to be set. */ @@ -34484,12 +35926,14 @@ interface JQuery { /** * Gets/Sets the options supported by the [jquery.ui.datepicker](http://api.jqueryui.com/datepicker/). Only options related to the drop-down calendar are supported. + * */ igDatePicker(optionLiteral: 'option', optionName: "datepickerOptions"): any; /** * /Sets the options supported by the [jquery.ui.datepicker](http://api.jqueryui.com/datepicker/). Only options related to the drop-down calendar are supported. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "datepickerOptions", optionValue: any): void; @@ -34497,6 +35941,7 @@ interface JQuery { /** * Gets the ability to limit igDatePicker to be used only as s calendar. When set to true the editor input is not editable. * Note! This option can not be set runtime. + * */ igDatePicker(optionLiteral: 'option', optionName: "dropDownOnReadOnly"): boolean; @@ -34504,6 +35949,7 @@ interface JQuery { * The ability to limit igDatePicker to be used only as s calendar. When set to true the editor input is not editable. * Note! This option can not be set runtime. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "dropDownOnReadOnly", optionValue: boolean): void; @@ -34571,6 +36017,7 @@ interface JQuery { /** * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. * Note: The option does not perform device detection so its behavior is always active if enabled. + * */ igDatePicker(optionLiteral: 'option', optionName: "suppressKeyboard"): boolean; @@ -34578,6 +36025,7 @@ interface JQuery { * /Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. * Note: The option does not perform device detection so its behavior is always active if enabled. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "suppressKeyboard", optionValue: boolean): void; @@ -34585,6 +36033,7 @@ interface JQuery { /** * Gets/Sets the value of the editor. Date object can be set as value. String can be set and the editor will pass it to the Date object constructor and use the corresponding Date object as the value. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. + * */ igDatePicker(optionLiteral: 'option', optionName: "value"): Date; @@ -34592,6 +36041,7 @@ interface JQuery { * /Sets the value of the editor. Date object can be set as value. String can be set and the editor will pass it to the Date object constructor and use the corresponding Date object as the value. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "value", optionValue: Date): void; @@ -34599,6 +36049,7 @@ interface JQuery { /** * Gets the minimum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. + * */ igDatePicker(optionLiteral: 'option', optionName: "minValue"): Date; @@ -34606,6 +36057,7 @@ interface JQuery { * The minimum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "minValue", optionValue: Date): void; @@ -34613,6 +36065,7 @@ interface JQuery { /** * Gets the maximum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. + * */ igDatePicker(optionLiteral: 'option', optionName: "maxValue"): Date; @@ -34620,6 +36073,7 @@ interface JQuery { * The maximum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "maxValue", optionValue: Date): void; @@ -34662,6 +36116,7 @@ interface JQuery { * "f": milliseconds field in hundreds * "ff": milliseconds field in tenths * "fff": milliseconds field + * */ igDatePicker(optionLiteral: 'option', optionName: "dateDisplayFormat"): string; @@ -34704,6 +36159,7 @@ interface JQuery { * "ff": milliseconds field in tenths * "fff": milliseconds field * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "dateDisplayFormat", optionValue: string): void; @@ -34735,6 +36191,7 @@ interface JQuery { * "ff": milliseconds field in tenths * "fff": milliseconds field * Note! This option can not be set runtime. + * */ igDatePicker(optionLiteral: 'option', optionName: "dateInputFormat"): string; @@ -34766,6 +36223,7 @@ interface JQuery { * "fff": milliseconds field * Note! This option can not be set runtime. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "dateInputFormat", optionValue: string): void; @@ -34775,6 +36233,7 @@ interface JQuery { * The [enableUTCDates](ui.%%WidgetNameLowered%%#options:enableUTCDates) option can be used to output an UTC ISO string instead. * For example 10:00 AM from a client with local offset of 5 hours ahead of GMT will be serialized as: * "2016-11-11T10:00:00+05:00" + * */ igDatePicker(optionLiteral: 'option', optionName: "dataMode"): string; @@ -34785,6 +36244,7 @@ interface JQuery { * For example 10:00 AM from a client with local offset of 5 hours ahead of GMT will be serialized as: * "2016-11-11T10:00:00+05:00" * + * * @optionValue New value to be set. */ @@ -34794,6 +36254,7 @@ interface JQuery { * Gets/Sets time zone offset from UTC, in minutes. The client date values are displayed with this offset instead of the local one. * Note: It is recommended that this option is used with an UTC value (e.g. "2016-11-03T14:08:08.504Z") so the outcome is consistent. * Values with ambiguous time zone could map to unpredictable times depending on the user agent local zone. + * */ igDatePicker(optionLiteral: 'option', optionName: "displayTimeOffset"): any; @@ -34802,6 +36263,7 @@ interface JQuery { * Note: It is recommended that this option is used with an UTC value (e.g. "2016-11-03T14:08:08.504Z") so the outcome is consistent. * Values with ambiguous time zone could map to unpredictable times depending on the user agent local zone. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "displayTimeOffset", optionValue: any): void; @@ -34820,6 +36282,7 @@ interface JQuery { * milliseconds: 100 * } * Time periods that don't have values use 1 as default. + * */ igDatePicker(optionLiteral: 'option', optionName: "spinDelta"): number|Object; @@ -34839,6 +36302,7 @@ interface JQuery { * } * Time periods that don't have values use 1 as default. * + * * @optionValue New value to be set. */ @@ -34848,6 +36312,7 @@ interface JQuery { * Gets/Sets ability to modify only 1 date field on spin events. * Value false enables changes of other date fields when incremented or decremented date-field reaches its limits. * Value true modifies only value of one field. + * */ igDatePicker(optionLiteral: 'option', optionName: "limitSpinToCurrentField"): boolean; @@ -34856,6 +36321,7 @@ interface JQuery { * Value false enables changes of other date fields when incremented or decremented date-field reaches its limits. * Value true modifies only value of one field. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "limitSpinToCurrentField", optionValue: boolean): void; @@ -34863,6 +36329,7 @@ interface JQuery { /** * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. * The option is only applied in "date" [dataMode](ui.%%WidgetNameLowered%%#options:dataMode). + * */ igDatePicker(optionLiteral: 'option', optionName: "enableUTCDates"): boolean; @@ -34870,6 +36337,7 @@ interface JQuery { * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. * The option is only applied in "date" [dataMode](ui.%%WidgetNameLowered%%#options:dataMode). * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "enableUTCDates", optionValue: boolean): void; @@ -34878,6 +36346,7 @@ interface JQuery { * Gets/Sets year for auto detection of 20th and 21st centuries. * That option is used to automatically fill century when the user entered only 1 or 2 digits into the year field or when the date pattern contains only 1 or 2 year positions, e.g. "yy" or "y". * If user entered value larger than value of this option, then 20th century is used, otherwise the 21st. + * */ igDatePicker(optionLiteral: 'option', optionName: "centuryThreshold"): number; @@ -34886,24 +36355,28 @@ interface JQuery { * That option is used to automatically fill century when the user entered only 1 or 2 digits into the year field or when the date pattern contains only 1 or 2 year positions, e.g. "yy" or "y". * If user entered value larger than value of this option, then 20th century is used, otherwise the 21st. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "centuryThreshold", optionValue: number): void; /** * Gets/Set value used to increase/decrease year part of the date, in order to set difference between year in Gregorian calendar and displayed year. + * */ igDatePicker(optionLiteral: 'option', optionName: "yearShift"): number; /** * /Set value used to increase/decrease year part of the date, in order to set difference between year in Gregorian calendar and displayed year. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "yearShift", optionValue: number): void; /** * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * */ igDatePicker(optionLiteral: 'option', optionName: "nullValue"): string|number|Date; @@ -34911,6 +36384,7 @@ interface JQuery { /** * /Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string * + * * @optionValue New value to be set. */ @@ -35005,6 +36479,7 @@ interface JQuery { * Notes: * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. * Note! This option can not be se runtime. + * */ igDatePicker(optionLiteral: 'option', optionName: "includeKeys"): string; @@ -35014,6 +36489,7 @@ interface JQuery { * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. * Note! This option can not be se runtime. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "includeKeys", optionValue: string): void; @@ -35023,6 +36499,7 @@ interface JQuery { * Notes: * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. * Note! This option can not be se runtime. + * */ igDatePicker(optionLiteral: 'option', optionName: "excludeKeys"): string; @@ -35032,6 +36509,7 @@ interface JQuery { * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. * Note! This option can not be se runtime. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "excludeKeys", optionValue: string): void; @@ -35096,6 +36574,7 @@ interface JQuery { /** * Gets/Sets the horizontal alignment of the text in the editor. + * */ igDatePicker(optionLiteral: 'option', optionName: "textAlign"): string; @@ -35103,6 +36582,7 @@ interface JQuery { /** * /Sets the horizontal alignment of the text in the editor. * + * * @optionValue New value to be set. */ @@ -35110,18 +36590,21 @@ interface JQuery { /** * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * */ igDatePicker(optionLiteral: 'option', optionName: "placeHolder"): string; /** * /Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "placeHolder", optionValue: string): void; /** * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * */ igDatePicker(optionLiteral: 'option', optionName: "selectionOnFocus"): string; @@ -35129,6 +36612,7 @@ interface JQuery { /** * /Sets the action when the editor gets focused. The default value is selectAll. * + * * @optionValue New value to be set. */ @@ -35136,42 +36620,49 @@ interface JQuery { /** * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * */ igDatePicker(optionLiteral: 'option', optionName: "revertIfNotValid"): boolean; /** * /Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "revertIfNotValid", optionValue: boolean): void; /** * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * */ igDatePicker(optionLiteral: 'option', optionName: "preventSubmitOnEnter"): boolean; /** * /Sets if the editor should prevent form submition when enter key is pressed. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "preventSubmitOnEnter", optionValue: boolean): void; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * */ igDatePicker(optionLiteral: 'option', optionName: "suppressNotifications"): boolean; /** * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "suppressNotifications", optionValue: boolean): void; /** * Gets/Sets the width of the control. + * */ igDatePicker(optionLiteral: 'option', optionName: "width"): string|number; @@ -35179,6 +36670,7 @@ interface JQuery { /** * /Sets the width of the control. * + * * @optionValue New value to be set. */ @@ -35186,6 +36678,7 @@ interface JQuery { /** * Gets/Sets the height of the control. + * */ igDatePicker(optionLiteral: 'option', optionName: "height"): string|number; @@ -35193,6 +36686,7 @@ interface JQuery { /** * /Sets the height of the control. * + * * @optionValue New value to be set. */ @@ -35200,12 +36694,14 @@ interface JQuery { /** * Gets/Sets tabIndex attribute for the editor input. + * */ igDatePicker(optionLiteral: 'option', optionName: "tabIndex"): number; /** * /Sets tabIndex attribute for the editor input. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; @@ -35213,6 +36709,7 @@ interface JQuery { /** * Gets/Sets whether the editor value can become null. * If that option is false, and editor has no value, then value is set to an empty string. + * */ igDatePicker(optionLiteral: 'option', optionName: "allowNullValue"): boolean; @@ -35220,42 +36717,49 @@ interface JQuery { * /Sets whether the editor value can become null. * If that option is false, and editor has no value, then value is set to an empty string. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "allowNullValue", optionValue: boolean): void; /** * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * */ igDatePicker(optionLiteral: 'option', optionName: "inputName"): string; /** * /Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; /** * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * */ igDatePicker(optionLiteral: 'option', optionName: "readOnly"): boolean; /** * /Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "readOnly", optionValue: boolean): void; /** * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * */ igDatePicker(optionLiteral: 'option', optionName: "disabled"): boolean; /** * /Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "disabled", optionValue: boolean): void; @@ -35264,6 +36768,7 @@ interface JQuery { * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * */ igDatePicker(optionLiteral: 'option', optionName: "validatorOptions"): any; @@ -35272,36 +36777,42 @@ interface JQuery { * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; /** * Set/Get the locale setting for the widget. + * */ igDatePicker(optionLiteral: 'option', optionName: "locale"): any; /** * Set/Get the locale setting for the widget. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "locale", optionValue: any): void; /** * Set/Get the locale language setting for the widget. + * */ igDatePicker(optionLiteral: 'option', optionName: "language"): string; /** * Set/Get the locale language setting for the widget. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "language", optionValue: string): void; /** * Set/Get the regional setting for the widget. + * */ igDatePicker(optionLiteral: 'option', optionName: "regional"): string|Object; @@ -35309,48 +36820,33 @@ interface JQuery { /** * Set/Get the regional setting for the widget. * + * * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; /** - * Event which is raised when the drop down is opening. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.calendar to obtain a reference to jQuery UI date picker widget, used as a calendar from the igDatePicker. + * Fired when the drop down is opening. */ igDatePicker(optionLiteral: 'option', optionName: "dropDownListOpening"): DropDownListOpeningEvent; /** - * Event which is raised when the drop down is opening. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.calendar to obtain a reference to jQuery UI date picker widget, used as a calendar from the igDatePicker. + * Fired when the drop down is opening. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "dropDownListOpening", optionValue: DropDownListOpeningEvent): void; /** - * Event which is raised after the drop down is opened. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.calendar to obtain a reference to jQuery UI date picker widget, used as a calendar from the igDatePicker. + * Fired after the drop down is opened. */ igDatePicker(optionLiteral: 'option', optionName: "dropDownListOpened"): DropDownListOpenedEvent; /** - * Event which is raised after the drop down is opened. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.calendar to obtain a reference to jQuery UI date picker widget, used as a calendar from the igDatePicker. + * Fired after the drop down is opened. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "dropDownListOpened", optionValue: DropDownListOpenedEvent): void; @@ -35379,22 +36875,14 @@ interface JQuery { igDatePicker(optionLiteral: 'option', optionName: "dropDownItemSelecting", optionValue: DropDownItemSelectingEvent): void; /** - * Event which is raised after the drop down (calendar) is closed. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.calendar to obtain a reference to jQuery UI date picker widget, used as a calendar from the igDatePicker. + * Fired after the drop down (calendar) is closed. */ igDatePicker(optionLiteral: 'option', optionName: "dropDownListClosed"): DropDownListClosedEvent; /** - * Event which is raised after the drop down (calendar) is closed. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.editorInput to obtain reference to the editable input - * Use ui.calendar to obtain a reference to jQuery UI date picker widget, used as a calendar from the igDatePicker. + * Fired after the drop down (calendar) is closed. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "dropDownListClosed", optionValue: DropDownListClosedEvent): void; @@ -35411,24 +36899,14 @@ interface JQuery { igDatePicker(optionLiteral: 'option', optionName: "dropDownItemSelected", optionValue: DropDownItemSelectedEvent): void; /** - * Event which is raised after a date selection in the calendar. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.dateFromPicker to obtain reference to the date object which is selected. - * Use ui.item to obtain a referece to the selected html element from the calendar. - * Use ui.calendar to obtain a reference to jQuery UI date picker, used as a calendar from the igDatePicker. + * Fired after a date selection in the calendar. */ igDatePicker(optionLiteral: 'option', optionName: "itemSelected"): ItemSelectedEvent; /** - * Event which is raised after a date selection in the calendar. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.dateFromPicker to obtain reference to the date object which is selected. - * Use ui.item to obtain a referece to the selected html element from the calendar. - * Use ui.calendar to obtain a reference to jQuery UI date picker, used as a calendar from the igDatePicker. + * Fired after a date selection in the calendar. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igDatePicker(optionLiteral: 'option', optionName: "itemSelected", optionValue: ItemSelectedEvent): void; igDatePicker(options: IgDatePicker): JQuery; @@ -35454,18 +36932,21 @@ interface JQuery { /** * Gets/Sets whether the checkbox is checked. + * */ igCheckboxEditor(optionLiteral: 'option', optionName: "checked"): boolean; /** * /Sets whether the checkbox is checked. * + * * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "checked", optionValue: boolean): void; /** * Gets/Sets size of the checkbox based on preset styles.For different sizes, define 'width' and 'height' options instead. + * */ igCheckboxEditor(optionLiteral: 'option', optionName: "size"): string; @@ -35473,6 +36954,7 @@ interface JQuery { /** * /Sets size of the checkbox based on preset styles.For different sizes, define 'width' and 'height' options instead. * + * * @optionValue New value to be set. */ @@ -35481,6 +36963,7 @@ interface JQuery { /** * Gets/Sets a custom class on the checkbox. Custom image can be used this way. * The following jQuery classes can be used in addition http://api.jqueryui.com/theming/icons/ + * */ igCheckboxEditor(optionLiteral: 'option', optionName: "iconClass"): string; @@ -35488,30 +36971,35 @@ interface JQuery { * /Sets a custom class on the checkbox. Custom image can be used this way. * The following jQuery classes can be used in addition http://api.jqueryui.com/theming/icons/ * + * * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "iconClass", optionValue: string): void; /** * Gets/Sets tabIndex attribute for the editor input. + * */ igCheckboxEditor(optionLiteral: 'option', optionName: "tabIndex"): number; /** * /Sets tabIndex attribute for the editor input. * + * * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; /** * Gets/Sets the readonly attribute. Does not allow editing. Disables changing the checkbox state as an interaction, but it still can be changed programmatically. On submit the current value is sent into the request. + * */ igCheckboxEditor(optionLiteral: 'option', optionName: "readOnly"): boolean; /** * /Sets the readonly attribute. Does not allow editing. Disables changing the checkbox state as an interaction, but it still can be changed programmatically. On submit the current value is sent into the request. * + * * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "readOnly", optionValue: boolean): void; @@ -35522,6 +37010,7 @@ interface JQuery { /** * Gets/Sets the width of the control. + * */ igCheckboxEditor(optionLiteral: 'option', optionName: "width"): string|number; @@ -35529,6 +37018,7 @@ interface JQuery { /** * /Sets the width of the control. * + * * @optionValue New value to be set. */ @@ -35536,6 +37026,7 @@ interface JQuery { /** * Gets/Sets the height of the control. + * */ igCheckboxEditor(optionLiteral: 'option', optionName: "height"): string|number; @@ -35543,6 +37034,7 @@ interface JQuery { /** * /Sets the height of the control. * + * * @optionValue New value to be set. */ @@ -35550,36 +37042,42 @@ interface JQuery { /** * Gets/Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. + * */ igCheckboxEditor(optionLiteral: 'option', optionName: "value"): any; /** * /Sets value in editor. The effect of setting/getting that option depends on type of editor and on dataMode options for every type of editor. * + * * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "value", optionValue: any): void; /** * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * */ igCheckboxEditor(optionLiteral: 'option', optionName: "inputName"): string; /** * /Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. * + * * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; /** * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * */ igCheckboxEditor(optionLiteral: 'option', optionName: "disabled"): boolean; /** * /Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. * + * * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "disabled", optionValue: boolean): void; @@ -35588,6 +37086,7 @@ interface JQuery { * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * */ igCheckboxEditor(optionLiteral: 'option', optionName: "validatorOptions"): any; @@ -35596,36 +37095,42 @@ interface JQuery { * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, * while the corresponding options of the editor prevent values violating the defined rules from being entered. * + * * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; /** * Set/Get the locale setting for the widget. + * */ igCheckboxEditor(optionLiteral: 'option', optionName: "locale"): any; /** * Set/Get the locale setting for the widget. * + * * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "locale", optionValue: any): void; /** * Set/Get the locale language setting for the widget. + * */ igCheckboxEditor(optionLiteral: 'option', optionName: "language"): string; /** * Set/Get the locale language setting for the widget. * + * * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "language", optionValue: string): void; /** * Set/Get the regional setting for the widget. + * */ igCheckboxEditor(optionLiteral: 'option', optionName: "regional"): string|Object; @@ -35633,302 +37138,183 @@ interface JQuery { /** * Set/Get the regional setting for the widget. * + * * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; /** - * Event which is raised before value in editor was changed. + * Fired before changing the editor's value. * Return false in order to cancel change. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the new value. - * Use ui.newState to obtain the new state. - * Use ui.oldValue to obtain the old value. - * Use ui.oldState to obtain the old state. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput obtain reference to the editor element. */ igCheckboxEditor(optionLiteral: 'option', optionName: "valueChanging"): ValueChangingEvent; /** - * Event which is raised before value in editor was changed. + * Fired before changing the editor's value. * Return false in order to cancel change. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the new value. - * Use ui.newState to obtain the new state. - * Use ui.oldValue to obtain the old value. - * Use ui.oldState to obtain the old state. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput obtain reference to the editor element. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "valueChanging", optionValue: ValueChangingEvent): void; /** - * Event which is raised after value in editor was changed. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the new value. - * Use ui.newState to obtain the new state. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput obtain reference to the editor element. + * Fired after the editor's value has been changed. */ igCheckboxEditor(optionLiteral: 'option', optionName: "valueChanged"): ValueChangedEvent; /** - * Event which is raised after value in editor was changed. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the new value. - * Use ui.newState to obtain the new state. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput obtain reference to the editor element. + * Fired after the editor's value has been changed. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "valueChanged", optionValue: ValueChangedEvent): void; /** - * Event which is raised before rendering of the editor completes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the editor performing rendering. - * Use ui.element to get a reference to the editor element. + * Fired before rendering of the editor has finished. */ igCheckboxEditor(optionLiteral: 'option', optionName: "rendering"): RenderingEvent; /** - * Event which is raised before rendering of the editor completes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the editor performing rendering. - * Use ui.element to get a reference to the editor element. + * Fired before rendering of the editor has finished. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "rendering", optionValue: RenderingEvent): void; /** - * Event which is raised after rendering of the editor completes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the editor performing rendering. - * Use ui.element to get a reference to the editor element. + * Fired after rendering of the editor has finished. */ igCheckboxEditor(optionLiteral: 'option', optionName: "rendered"): RenderedEvent; /** - * Event which is raised after rendering of the editor completes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the editor performing rendering. - * Use ui.element to get a reference to the editor element. + * Fired after rendering of the editor has finished. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "rendered", optionValue: RenderedEvent): void; /** - * Event which is raised on mousedown event. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mousedown event. */ igCheckboxEditor(optionLiteral: 'option', optionName: "mousedown"): MousedownEvent; /** - * Event which is raised on mousedown event. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mousedown event. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "mousedown", optionValue: MousedownEvent): void; /** - * Event which is raised on mouseup event. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseup event. */ igCheckboxEditor(optionLiteral: 'option', optionName: "mouseup"): MouseupEvent; /** - * Event which is raised on mouseup event. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseup event. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "mouseup", optionValue: MouseupEvent): void; /** - * Event which is raised on mousemove at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mousemove at any part of editor including the drop-down list. */ igCheckboxEditor(optionLiteral: 'option', optionName: "mousemove"): MousemoveEvent; /** - * Event which is raised on mousemove at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mousemove at any part of editor including the drop-down list. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "mousemove", optionValue: MousemoveEvent): void; /** - * Event which is raised on mouseover at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseover at any part of editor including the drop-down list. */ igCheckboxEditor(optionLiteral: 'option', optionName: "mouseover"): MouseoverEvent; /** - * Event which is raised on mouseover at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseover at any part of editor including the drop-down list. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "mouseover", optionValue: MouseoverEvent): void; /** - * Event which is raised on mouseleave at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseleave at any part of editor including the drop-down list. */ igCheckboxEditor(optionLiteral: 'option', optionName: "mouseout"): MouseoutEvent; /** - * Event which is raised on mouseleave at any part of editor including drop-down list. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired on mouseleave at any part of editor including the drop-down list. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "mouseout", optionValue: MouseoutEvent): void; /** - * Event which is raised when input field of editor loses focus. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired when the input field of the editor loses focus. */ igCheckboxEditor(optionLiteral: 'option', optionName: "blur"): BlurEvent; /** - * Event which is raised when input field of editor loses focus. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired when the input field of the editor loses focus. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "blur", optionValue: BlurEvent): void; /** - * Event which is raised when input field of editor gets focus. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired when the input field of the editor gets focus. */ igCheckboxEditor(optionLiteral: 'option', optionName: "focus"): IgFocusEvent; /** - * Event which is raised when input field of editor gets focus. - * Function takes arguments evt and ui. - * Use ui.owner to obtain reference to igEditor. - * Use ui.element to obtain a reference to the event target. - * Use ui.editorInput to get a reference to the editor field. + * Fired when the input field of the editor gets focus. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "focus", optionValue: IgFocusEvent): void; /** - * Event which is raised on keydown event. + * Fired on keydown event. * Return false in order to cancel key action. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. */ igCheckboxEditor(optionLiteral: 'option', optionName: "keydown"): KeydownEvent; /** - * Event which is raised on keydown event. + * Fired on keydown event. * Return false in order to cancel key action. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "keydown", optionValue: KeydownEvent): void; /** - * Event which is raised on keypress event. + * Fired on keypress event. * Return false in order to cancel key action. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. */ igCheckboxEditor(optionLiteral: 'option', optionName: "keypress"): KeypressEvent; /** - * Event which is raised on keypress event. + * Fired on keypress event. * Return false in order to cancel key action. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "keypress", optionValue: KeypressEvent): void; /** - * Event which is raised on keyup event. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. + * Fired on keyup event. */ igCheckboxEditor(optionLiteral: 'option', optionName: "keyup"): KeyupEvent; /** - * Event which is raised on keyup event. - * Function takes arguments evt and ui. - * Use evt.originalEvent to obtain reference to event of browser. - * Use ui.owner to obtain reference to igEditor. - * Use ui.key to obtain value of keyCode. + * Fired on keyup event. * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igCheckboxEditor(optionLiteral: 'option', optionName: "keyup", optionValue: KeyupEvent): void; igCheckboxEditor(options: IgCheckboxEditor): JQuery; @@ -35937,6 +37323,4447 @@ interface JQuery { igCheckboxEditor(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; igCheckboxEditor(methodName: string, ...methodParams: any[]): any; } +interface JQuery { + igTimePicker(methodName: "getSelectedListItem"): string; + igTimePicker(methodName: "dropDownVisible"): boolean; + igTimePicker(methodName: "dropDownButton"): string; + igTimePicker(methodName: "dropDownContainer"): string; + igTimePicker(methodName: "findListItemIndex", text: string, matchType?: Object): number; + igTimePicker(methodName: "selectedListIndex", index?: number): number; + igTimePicker(methodName: "value", newValue: Object): void; + igTimePicker(methodName: "selectDate"): void; + igTimePicker(methodName: "changeRegional"): void; + igTimePicker(methodName: "getSelectedDate"): Date; + igTimePicker(methodName: "spinUp", delta?: number): void; + igTimePicker(methodName: "spinDown", delta?: number): void; + igTimePicker(methodName: "spinUpButton"): string; + igTimePicker(methodName: "spinDownButton"): string; + igTimePicker(methodName: "isValid"): boolean; + + /** + * Gets delta-value which is used to generate the drop-down items for the time picker. + * Accepted values for deltas are positive integer numbers, and the fractional portion of floating point numbers is ignored. + * + * object A configuration object, which defines specific values for each time period. The option can accept the following format: + * itemsDelta: { + * hours: 0, + * minutes: 30, + * } + * Time periods that don't have values use 0 as default for hours and 30 for minutes. + */ + igTimePicker(optionLiteral: 'option', optionName: "itemsDelta"): IgTimePickerItemsDelta; + + /** + * Delta-value which is used to generate the drop-down items for the time picker. + * Accepted values for deltas are positive integer numbers, and the fractional portion of floating point numbers is ignored. + * + * object A configuration object, which defines specific values for each time period. The option can accept the following format: + * itemsDelta: { + * hours: 0, + * minutes: 30, + * } + * Time periods that don't have values use 0 as default for hours and 30 for minutes. + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "itemsDelta", optionValue: IgTimePickerItemsDelta): void; + + /** + * Gets/Sets delta-value which is used to increment or decrement the editor time on spin actions.When not editing (focused) the delta is applied on the day if available in the input mask or the lowest available period. + * When in edit mode the time period, where the cursor is positioned, is incremented or decremented with the defined delta value. + * Accepted values for deltas are positive integer numbers, and the fractional portion of floating point numbers is ignored. + * spinDelta: { + * hours: 12, + * minutes: 15 + * } + * Default value is {hours: 1, minutes: 30}. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "spinDelta"): any; + + /** + * /Sets delta-value which is used to increment or decrement the editor time on spin actions.When not editing (focused) the delta is applied on the day if available in the input mask or the lowest available period. + * When in edit mode the time period, where the cursor is positioned, is incremented or decremented with the defined delta value. + * Accepted values for deltas are positive integer numbers, and the fractional portion of floating point numbers is ignored. + * spinDelta: { + * hours: 12, + * minutes: 15 + * } + * Default value is {hours: 1, minutes: 30}. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "spinDelta", optionValue: any): void; + + /** + * Gets format of time while timepicker has focus. + * Value of that option can be set to explicit time pattern or to a flag defined by regional settings. + * If value is set to explicit time pattern and pattern besides date-flags has explicit characters which match with time-flags or mask-flags, then the "escape" character should be used in front of them. + * If option is not set, then the "time" is used automatically. + * List of predefined regional flags: + * "time": the timePattern member of regional option is used + * List of explicit characters, which should have escape \\ character in front of them: C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f. + * List of time-flags when explicit time pattern is used: + * "t": first character of string which represents AM/PM field + * "tt": 2 characters of string which represents AM/PM field + * "hh": hours field in 12-hours format with leading zero + * "HH": hours field in 24-hours format with leading zero + * "mm": minutes field with leading zero + * Note! This option can not be set runtime. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "timeInputFormat"): string; + + /** + * Format of time while timepicker has focus. + * Value of that option can be set to explicit time pattern or to a flag defined by regional settings. + * If value is set to explicit time pattern and pattern besides date-flags has explicit characters which match with time-flags or mask-flags, then the "escape" character should be used in front of them. + * If option is not set, then the "time" is used automatically. + * List of predefined regional flags: + * "time": the timePattern member of regional option is used + * List of explicit characters, which should have escape \\ character in front of them: C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f. + * List of time-flags when explicit time pattern is used: + * "t": first character of string which represents AM/PM field + * "tt": 2 characters of string which represents AM/PM field + * "hh": hours field in 12-hours format with leading zero + * "HH": hours field in 24-hours format with leading zero + * "mm": minutes field with leading zero + * Note! This option can not be set runtime. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "timeInputFormat", optionValue: string): void; + + /** + * Gets/Sets format of time while timepicker has no focus. + * Value of that option can be set to a specific time pattern or to a flag defined by regional settings. + * If value is not set, then the timeInputFormat is used automatically. + * If value is set to explicit time pattern and pattern besides time-flags has explicit characters which match with time-flags or mask-flags, then the "escape" character should be used in front of them. + * List of predefined regional flags: + * "time": the timePattern member of regional option is used + * List of explicit characters, which should have escape \\ character in front of them: + * C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f. + * List of time-flags when explicit time pattern is used: + * "t": first character of string which represents AM/PM field + * "tt": 2 characters of string which represents AM/PM field + * "h": hours field in 12-hours format without leading zero + * "hh": hours field in 12-hours format with leading zero + * "H": hours field in 24-hours format without leading zero + * "HH": hours field in 24-hours format with leading zero + * "m": minutes field without leading zero + * "mm": minutes field with leading zero + * + */ + igTimePicker(optionLiteral: 'option', optionName: "timeDisplayFormat"): string; + + /** + * /Sets format of time while timepicker has no focus. + * Value of that option can be set to a specific time pattern or to a flag defined by regional settings. + * If value is not set, then the timeInputFormat is used automatically. + * If value is set to explicit time pattern and pattern besides time-flags has explicit characters which match with time-flags or mask-flags, then the "escape" character should be used in front of them. + * List of predefined regional flags: + * "time": the timePattern member of regional option is used + * List of explicit characters, which should have escape \\ character in front of them: + * C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f. + * List of time-flags when explicit time pattern is used: + * "t": first character of string which represents AM/PM field + * "tt": 2 characters of string which represents AM/PM field + * "h": hours field in 12-hours format without leading zero + * "hh": hours field in 12-hours format with leading zero + * "H": hours field in 24-hours format without leading zero + * "HH": hours field in 24-hours format with leading zero + * "m": minutes field without leading zero + * "mm": minutes field with leading zero + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "timeDisplayFormat", optionValue: string): void; + + /** + * Gets/Sets if the editor should only allow values from the list of items. Matching is case-insensitive. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "isLimitedToListValues"): boolean; + + /** + * /Sets if the editor should only allow values from the list of items. Matching is case-insensitive. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "isLimitedToListValues", optionValue: boolean): void; + + /** + * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. + * Note: The option does not perform device detection so its behavior is always active if enabled. + * Note: When drop down is opened the only way to close it will be using the drop down button. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "suppressKeyboard"): boolean; + + /** + * /Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. + * Note: The option does not perform device detection so its behavior is always active if enabled. + * Note: When drop down is opened the only way to close it will be using the drop down button. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "suppressKeyboard", optionValue: boolean): void; + + /** + * Gets/Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the timepicker has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * + */ + + igTimePicker(optionLiteral: 'option', optionName: "dropDownOrientation"): string; + + /** + * /Sets the drop-down list opening orientation when the list gets open. If the option is set to auto the timepicker has priority to open the drop-down list bottom. If the space is not enough it tries to open the list top. If the space is not enough in both directions then the list gets opened at the bottom of the editor. + * + * + * @optionValue New value to be set. + */ + + igTimePicker(optionLiteral: 'option', optionName: "dropDownOrientation", optionValue: string): void; + + /** + * Gets the number of the items to be shown at once when the drop-down list get opened. + * Notes: + * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. + * This option can not be set runtime. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "visibleItemsCount"): number; + + /** + * The number of the items to be shown at once when the drop-down list get opened. + * Notes: + * This option is overwritten if the number of list items is less than the set value. In that case the drop-down list displays all the items. + * This option can not be set runtime. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "visibleItemsCount", optionValue: number): void; + + /** + * Gets/Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of timepicker is set as a drop-down width. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "listWidth"): number; + + /** + * /Sets custom width of the drop-down list in pixels. If the value is equal to 0 or negative, then the width of timepicker is set as a drop-down width. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "listWidth", optionValue: number): void; + + /** + * Gets/Sets the hover/unhover animation duration of a drop-down list item. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "listItemHoverDuration"): number; + + /** + * /Sets the hover/unhover animation duration of a drop-down list item. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "listItemHoverDuration", optionValue: number): void; + + /** + * Gets wheather the drop-down list element is attached to the body of the document, or to the timepicker container element. + * If the option is set to false the timepicker will attach the drop-down list element to the timepicker container + * If the option is set to true the timepicker will attach its drop-down list to as a child of the body. + * Note! This option can not be set runtime. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "dropDownAttachedToBody"): boolean; + + /** + * Wheather the drop-down list element is attached to the body of the document, or to the timepicker container element. + * If the option is set to false the timepicker will attach the drop-down list element to the timepicker container + * If the option is set to true the timepicker will attach its drop-down list to as a child of the body. + * Note! This option can not be set runtime. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "dropDownAttachedToBody", optionValue: boolean): void; + + /** + * Gets/Sets show/hide drop-down list animation duration in milliseconds. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "dropDownAnimationDuration"): number; + + /** + * /Sets show/hide drop-down list animation duration in milliseconds. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "dropDownAnimationDuration", optionValue: number): void; + + /** + * Gets visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown, clear' or 'spin, clear' are supported too.Note! This option can not be set runtime. + * Note! A combination like 'dropdown, spin' is not allowed. + * + */ + + igTimePicker(optionLiteral: 'option', optionName: "buttonType"): string; + + /** + * Visibility of the spin, clear and drop-down button. That option can be set only on initialization. Combinations like 'dropdown, clear' or 'spin, clear' are supported too.Note! This option can not be set runtime. + * Note! A combination like 'dropdown, spin' is not allowed. + * + * + * @optionValue New value to be set. + */ + + igTimePicker(optionLiteral: 'option', optionName: "buttonType", optionValue: string): void; + + /** + * Gets/Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. + * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "spinWrapAround"): boolean; + + /** + * /Set the ability of the editor to automatically set value in the editor to the opposite side of the limit, when the spin action reaches minimum or maximum limit. + * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "spinWrapAround", optionValue: boolean): void; + + /** + * Removed from timepicker options + */ + igTimePicker(optionLiteral: 'option', optionName: "dateDisplayFormat"): any; + + /** + * Removed from timepicker options + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "dateDisplayFormat", optionValue: any): void; + + /** + * Removed from timepicker options + */ + igTimePicker(optionLiteral: 'option', optionName: "dateInputFormat"): any; + + /** + * Removed from timepicker options + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "dateInputFormat", optionValue: any): void; + + /** + * Removed from timepicker options + */ + igTimePicker(optionLiteral: 'option', optionName: "yearShift"): any; + + /** + * Removed from timepicker options + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "yearShift", optionValue: any): void; + + /** + * Removed from timepicker options + */ + igTimePicker(optionLiteral: 'option', optionName: "displayTimeOffset"): any; + + /** + * Removed from timepicker options + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "displayTimeOffset", optionValue: any): void; + + /** + * Gets/Sets the value of the editor. Date object can be set as value. String can be set and the editor will pass it to the Date object constructor and use the corresponding Date object as the value. MVC date format can be used too. + * Note! This option doesn't use the dateInputFormat to extract the date. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "value"): Date; + + /** + * /Sets the value of the editor. Date object can be set as value. String can be set and the editor will pass it to the Date object constructor and use the corresponding Date object as the value. MVC date format can be used too. + * Note! This option doesn't use the dateInputFormat to extract the date. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "value", optionValue: Date): void; + + /** + * Gets the minimum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. + * Note! This option doesn't use the dateInputFormat to extract the date. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "minValue"): Date; + + /** + * The minimum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. + * Note! This option doesn't use the dateInputFormat to extract the date. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "minValue", optionValue: Date): void; + + /** + * Gets the maximum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. + * Note! This option doesn't use the dateInputFormat to extract the date. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "maxValue"): Date; + + /** + * The maximum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. + * Note! This option doesn't use the dateInputFormat to extract the date. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "maxValue", optionValue: Date): void; + + /** + * Gets the value type returned by the get of value() method and option. Also affects how the value is stored for form submit. + * The [enableUTCDates](ui.%%WidgetNameLowered%%#options:enableUTCDates) option can be used to output an UTC ISO string instead. + * For example 10:00 AM from a client with local offset of 5 hours ahead of GMT will be serialized as: + * "2016-11-11T10:00:00+05:00" + * + */ + + igTimePicker(optionLiteral: 'option', optionName: "dataMode"): string; + + /** + * The value type returned by the get of value() method and option. Also affects how the value is stored for form submit. + * The [enableUTCDates](ui.%%WidgetNameLowered%%#options:enableUTCDates) option can be used to output an UTC ISO string instead. + * For example 10:00 AM from a client with local offset of 5 hours ahead of GMT will be serialized as: + * "2016-11-11T10:00:00+05:00" + * + * + * @optionValue New value to be set. + */ + + igTimePicker(optionLiteral: 'option', optionName: "dataMode", optionValue: string): void; + + /** + * Gets/Sets ability to modify only 1 date field on spin events. + * Value false enables changes of other date fields when incremented or decremented date-field reaches its limits. + * Value true modifies only value of one field. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "limitSpinToCurrentField"): boolean; + + /** + * /Sets ability to modify only 1 date field on spin events. + * Value false enables changes of other date fields when incremented or decremented date-field reaches its limits. + * Value true modifies only value of one field. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "limitSpinToCurrentField", optionValue: boolean): void; + + /** + * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * The option is only applied in "date" [dataMode](ui.%%WidgetNameLowered%%#options:dataMode). + * + */ + igTimePicker(optionLiteral: 'option', optionName: "enableUTCDates"): boolean; + + /** + * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * The option is only applied in "date" [dataMode](ui.%%WidgetNameLowered%%#options:dataMode). + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "enableUTCDates", optionValue: boolean): void; + + /** + * Gets/Sets year for auto detection of 20th and 21st centuries. + * That option is used to automatically fill century when the user entered only 1 or 2 digits into the year field or when the date pattern contains only 1 or 2 year positions, e.g. "yy" or "y". + * If user entered value larger than value of this option, then 20th century is used, otherwise the 21st. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "centuryThreshold"): number; + + /** + * /Sets year for auto detection of 20th and 21st centuries. + * That option is used to automatically fill century when the user entered only 1 or 2 digits into the year field or when the date pattern contains only 1 or 2 year positions, e.g. "yy" or "y". + * If user entered value larger than value of this option, then 20th century is used, otherwise the 21st. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "centuryThreshold", optionValue: number): void; + + /** + * Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + */ + + igTimePicker(optionLiteral: 'option', optionName: "nullValue"): string|number|Date; + + /** + * /Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string + * + * + * @optionValue New value to be set. + */ + + igTimePicker(optionLiteral: 'option', optionName: "nullValue", optionValue: string|number|Date): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igTimePicker(optionLiteral: 'option', optionName: "listItems"): any; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "listItems", optionValue: any): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igTimePicker(optionLiteral: 'option', optionName: "dropDownOnReadOnly"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "dropDownOnReadOnly", optionValue: boolean): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igTimePicker(optionLiteral: 'option', optionName: "inputMask"): string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "inputMask", optionValue: string): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igTimePicker(optionLiteral: 'option', optionName: "unfilledCharsPrompt"): string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "unfilledCharsPrompt", optionValue: string): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igTimePicker(optionLiteral: 'option', optionName: "padChar"): string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "padChar", optionValue: string): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igTimePicker(optionLiteral: 'option', optionName: "emptyChar"): string; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "emptyChar", optionValue: string): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igTimePicker(optionLiteral: 'option', optionName: "toUpper"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "toUpper", optionValue: boolean): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + */ + igTimePicker(optionLiteral: 'option', optionName: "toLower"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for igDateEditor + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "toLower", optionValue: boolean): void; + + /** + * Gets ability to enter only specific characters in input-field from keyboard and on paste. + * Notes: + * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "includeKeys"): string; + + /** + * Ability to enter only specific characters in input-field from keyboard and on paste. + * Notes: + * If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "includeKeys", optionValue: string): void; + + /** + * Gets ability to prevent entering specific characters from keyboard or on paste. + * Notes: + * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "excludeKeys"): string; + + /** + * Ability to prevent entering specific characters from keyboard or on paste. + * Notes: + * If a character is specified in "includeKeys" option also, then "excludeKeys" has priority. + * Note! This option can not be se runtime. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "excludeKeys", optionValue: string): void; + + igTimePicker(optionLiteral: 'option', optionName: "textMode"): any; + + igTimePicker(optionLiteral: 'option', optionName: "textMode", optionValue: any): void; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + */ + igTimePicker(optionLiteral: 'option', optionName: "maxLength"): any; + + /** + * This option is inherited from a parent widget and it's not applicable for igMaskEditor + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "maxLength", optionValue: any): void; + + /** + * Gets/Sets the horizontal alignment of the text in the editor. + * + */ + + igTimePicker(optionLiteral: 'option', optionName: "textAlign"): string; + + /** + * /Sets the horizontal alignment of the text in the editor. + * + * + * @optionValue New value to be set. + */ + + igTimePicker(optionLiteral: 'option', optionName: "textAlign", optionValue: string): void; + + /** + * Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "placeHolder"): string; + + /** + * /Sets the text which appears in the editor when it has no focus and the "value" is null or empty string. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "placeHolder", optionValue: string): void; + + /** + * Gets/Sets the action when the editor gets focused. The default value is selectAll. + * + */ + + igTimePicker(optionLiteral: 'option', optionName: "selectionOnFocus"): string; + + /** + * /Sets the action when the editor gets focused. The default value is selectAll. + * + * + * @optionValue New value to be set. + */ + + igTimePicker(optionLiteral: 'option', optionName: "selectionOnFocus", optionValue: string): void; + + /** + * Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "revertIfNotValid"): boolean; + + /** + * /Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "revertIfNotValid", optionValue: boolean): void; + + /** + * Gets/Sets if the editor should prevent form submition when enter key is pressed. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "preventSubmitOnEnter"): boolean; + + /** + * /Sets if the editor should prevent form submition when enter key is pressed. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "preventSubmitOnEnter", optionValue: boolean): void; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "suppressNotifications"): boolean; + + /** + * Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "suppressNotifications", optionValue: boolean): void; + + /** + * Gets/Sets the width of the control. + * + */ + + igTimePicker(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * /Sets the width of the control. + * + * + * @optionValue New value to be set. + */ + + igTimePicker(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * Gets/Sets the height of the control. + * + */ + + igTimePicker(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * /Sets the height of the control. + * + * + * @optionValue New value to be set. + */ + + igTimePicker(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets/Sets tabIndex attribute for the editor input. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "tabIndex"): number; + + /** + * /Sets tabIndex attribute for the editor input. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; + + /** + * Gets/Sets whether the editor value can become null. + * If that option is false, and editor has no value, then value is set to an empty string. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "allowNullValue"): boolean; + + /** + * /Sets whether the editor value can become null. + * If that option is false, and editor has no value, then value is set to an empty string. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "allowNullValue", optionValue: boolean): void; + + /** + * Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "inputName"): string; + + /** + * /Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; + + /** + * Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "readOnly"): boolean; + + /** + * /Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "readOnly", optionValue: boolean): void; + + /** + * Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "disabled"): boolean; + + /** + * /Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "disabled", optionValue: boolean): void; + + /** + * Gets/Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "validatorOptions"): any; + + /** + * /Sets options supported by the [igValidator](ui.igvalidator#options) widget. + * Note: Validation rules of [igValidator](ui.igvalidator#options), such as min and max value/length are applied separately triggering errors, + * while the corresponding options of the editor prevent values violating the defined rules from being entered. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; + + /** + * Set/Get the locale setting for the widget. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igTimePicker(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igTimePicker(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igTimePicker(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + + /** + * Fired when the drop down is opening. + */ + igTimePicker(optionLiteral: 'option', optionName: "dropDownListOpening"): DropDownListOpeningEvent; + + /** + * Fired when the drop down is opening. + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "dropDownListOpening", optionValue: DropDownListOpeningEvent): void; + + /** + * Fired after the drop down is opened. + */ + igTimePicker(optionLiteral: 'option', optionName: "dropDownListOpened"): DropDownListOpenedEvent; + + /** + * Fired after the drop down is opened. + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "dropDownListOpened", optionValue: DropDownListOpenedEvent): void; + + /** + * Fired when the drop down is closing. + */ + igTimePicker(optionLiteral: 'option', optionName: "dropDownListClosing"): DropDownListClosingEvent; + + /** + * Fired when the drop down is closing. + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "dropDownListClosing", optionValue: DropDownListClosingEvent): void; + + /** + * Fired after the drop down is closed. + */ + igTimePicker(optionLiteral: 'option', optionName: "dropDownListClosed"): DropDownListClosedEvent; + + /** + * Fired after the drop down is closed. + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "dropDownListClosed", optionValue: DropDownListClosedEvent): void; + + /** + * Fired when an item in the drop down list is being selected. + */ + igTimePicker(optionLiteral: 'option', optionName: "dropDownItemSelecting"): DropDownItemSelectingEvent; + + /** + * Fired when an item in the drop down list is being selected. + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "dropDownItemSelecting", optionValue: DropDownItemSelectingEvent): void; + + /** + * Fired after an item in the drop down list is selected. + */ + igTimePicker(optionLiteral: 'option', optionName: "dropDownItemSelected"): DropDownItemSelectedEvent; + + /** + * Fired after an item in the drop down list is selected. + * + * @optionValue New value to be set. + */ + igTimePicker(optionLiteral: 'option', optionName: "dropDownItemSelected", optionValue: DropDownItemSelectedEvent): void; + igTimePicker(options: IgTimePicker): JQuery; + igTimePicker(optionLiteral: 'option', optionName: string): any; + igTimePicker(optionLiteral: 'option', options: IgTimePicker): JQuery; + igTimePicker(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igTimePicker(methodName: string, ...methodParams: any[]): any; +} +interface ApplyCustomIndicatorsEvent { + (event: Event, ui: ApplyCustomIndicatorsEventUIParam): void; +} + +interface ApplyCustomIndicatorsEventUIParam {} + +interface IgFinancialChart { + /** + * Gets or sets the id of a template element to use for tooltips, or markup representing the tooltip template. + */ + tooltipTemplate?: any; + + /** + * Gets or sets the names of tooltip templates + */ + tooltipTemplates?: any; + + /** + * Gets or sets the left margin of chart title + */ + titleLeftMargin?: number; + + /** + * Gets or sets the right margin of chart title + */ + titleRightMargin?: number; + + /** + * Gets or sets the top margin of chart title + */ + titleTopMargin?: number; + + /** + * Gets or sets the bottom margin of chart title + */ + titleBottomMargin?: number; + + /** + * Gets or sets the left margin of chart subtitle + */ + subtitleLeftMargin?: number; + + /** + * Gets or sets the top margin of chart subtitle + */ + subtitleTopMargin?: number; + + /** + * Gets or sets the right margin of chart subtitle + */ + subtitleRightMargin?: number; + + /** + * Gets or sets the bottom margin of chart subtitle + */ + subtitleBottomMargin?: number; + + /** + * Gets or sets color of chart subtitle + */ + subtitleTextColor?: string; + + /** + * Gets or sets color of chart title + */ + titleTextColor?: string; + + /** + * Gets or sets the left margin of the chart content. + */ + leftMargin?: number; + + /** + * Gets or sets the top margin of the chart content. + */ + topMargin?: number; + + /** + * Gets or sets the right margin of the chart content. + */ + rightMargin?: number; + + /** + * Gets or sets the bottom margin around the chart content. + */ + bottomMargin?: number; + + /** + * Gets or sets the duration used for animating series plots when the data is changing + */ + transitionDuration?: number; + + /** + * Gets or sets the easing function used for animating series plots when the data is changing. + * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. + */ + transitionEasingFunction?: any; + + /** + * Gets or sets a function for creating wrapped tooltip + */ + createWrappedTooltip?: any; + + /** + * Gets or sets the widget of this control + */ + widget?: any; + + /** + * Gets or sets CSS font property for the chart subtitle + */ + subtitleTextStyle?: string; + + /** + * Gets or sets CSS font property for the chart title + */ + titleTextStyle?: string; + + /** + * Gets or sets a collection of data items used to generate the chart. + * The ItemsSource of this chart can be a list of objects containing one or more numeric properties. + * Additionally, if the objects in the list implement the IEnumerable interface, + * the Chart will attempt to delve into the sub-collections when reading through the data source. + * Databinding can be further configured by attributing the data item classes + * with the DataSeriesMemberIntentAttribute. + */ + itemsSource?: any; + + /** + * Gets or sets a set of property paths that should be included for consideration by the category chart, leaving the remainder excluded. If null, all properties will be considered. + */ + includedProperties?: any; + + /** + * Gets or sets a set of property paths that should be excluded from consideration by the category chart. + */ + excludedProperties?: any; + + /** + * Gets or sets the palette of brushes to use for coloring the chart series. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + brushes?: any; + + /** + * Gets or sets the palette of brushes to use for outlines on the chart series. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + outlines?: any; + + /** + * Gets or sets the legend to connect this chart to. + * When the legend property is set, the chart will use it to display information about its series. Legends can be shared by multiple chart controls. + */ + legend?: any; + + /** + * Gets or sets whether the chart can be horizontally zoomed through user interactions. + */ + isHorizontalZoomEnabled?: boolean; + + /** + * Gets or sets whether the chart can be vertically zoomed through user interactions. + */ + isVerticalZoomEnabled?: boolean; + + /** + * Gets or sets the rectangle representing the current scroll and zoom state of the chart. + * WindowRect is expressed as a Rectangle with coordinates and sizes between 0 and 1. + * The provided object should have numeric properties called left, top, width and height. + */ + windowRect?: any; + + /** + * Gets or sets text to display above the plot area. + */ + title?: string; + + /** + * Gets or sets text to display below the Title, above the plot area. + */ + subtitle?: string; + + /** + * Gets or sets horizontal alignment which determines the title position, relative to the left and right edges of the control. + * + * Valid values: + * "left" Align the item to the left + * "center" Center the item + * "right" Align the item to the right + * "stretch" Stretch the item to the full width + */ + titleAlignment?: string; + + /** + * Gets or sets horizontal alignment which determines the subtitle position, relative to the left and right edges of the control. + * + * Valid values: + * "left" Align the item to the left + * "center" Center the item + * "right" Align the item to the right + * "stretch" Stretch the item to the full width + */ + subtitleAlignment?: string; + + /** + * Gets or sets the behavior that determines how unknown values will be plotted on the chart.Null and Double.NaN are two examples of unknown values. + * + * + * Valid values: + * "linearInterpolate" Plot the unknown value as the midpoint between surrounding known values using linear interpolation. + * "dontPlot" Do not plot the unknown value on the chart. + */ + unknownValuePlotting?: string; + + /** + * Gets or sets the rendering resolution for all series in this chart. + * Where n = Resolution, for every n horizontal pixels, combine all items into a single datapoint. When Resolution = 0, all datapoints will be rendered as graphical objects. Charts with a higher resolution will have faster performance. + */ + resolution?: number; + + /** + * Gets or sets the thickness for all series in this chart. Depending on the ChartType, this can be the main brush used, or just the outline. + */ + thickness?: number; + + /** + * Gets or sets the marker shapes used for indicating location of data points in this chart. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + */ + markerTypes?: any; + + /** + * Gets or sets the palette of brushes used for rendering fill area of data point markers. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + markerBrushes?: any; + + /** + * Gets or sets the palette of brushes used for rendering outlines of data point markers. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + markerOutlines?: any; + + /** + * Gets or sets the maximum number of markers displyed in the plot area of the chart. + */ + markerMaxCount?: number; + + /** + * Gets or sets the palette of brushes to used for coloring trend lines in this chart. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + trendLineBrushes?: any; + + /** + * Gets or sets the formula used for calculating trend lines in this chart.This property applies only to these chart types: point, line, spline, and bubble + * + * + * Valid values: + * "none" No trend line will be displayed. + * "linearFit" Linear fit. + * "quadraticFit" Quadratic polynomial fit. + * "cubicFit" Cubic polynomial fit. + * "quarticFit" Quartic polynomial fit. + * "quinticFit" Quintic polynomial fit. + * "logarithmicFit" Logarithmic fit. + * "exponentialFit" Exponential fit. + * "powerLawFit" Powerlaw fit. + * "simpleAverage" Simple moving average. + * "exponentialAverage" Exponential moving average. + * "modifiedAverage" Modified moving average. + * "cumulativeAverage" Cumulative moving average. + * "weightedAverage" Weighted moving average. + */ + trendLineType?: string; + + /** + * Gets or sets the thickness of the trend lines in this chart. + * This property applies only to these chart types: point, line, spline, and bubble + */ + trendLineThickness?: number; + + /** + * Gets or sets a value indicating whether grid and tick lines are aligned to device pixels. + */ + alignsGridLinesToPixels?: boolean; + trendLinePeriod?: number; + + /** + * Gets or sets function which takes an context object and returns a formatted label for the X-axis. + */ + xAxisFormatLabel?: any; + + /** + * Gets or sets function which takes a context object and returns a formatted label for the Y-axis. + */ + yAxisFormatLabel?: any; + + /** + * Gets or sets the left margin of labels on the X-axis + */ + xAxisLabelLeftMargin?: number; + + /** + * Gets or sets the top margin of labels on the X-axis + */ + xAxisLabelTopMargin?: number; + + /** + * Gets or sets the right margin of labels on the X-axis + */ + xAxisLabelRightMargin?: number; + + /** + * Gets or sets the bottom margin of labels on the X-axis + */ + xAxisLabelBottomMargin?: number; + + /** + * Gets or sets the left margin of labels on the Y-axis + */ + yAxisLabelLeftMargin?: number; + + /** + * Gets or sets the top margin of labels on the Y-axis + */ + yAxisLabelTopMargin?: number; + + /** + * Gets or sets the right margin of labels on the Y-axis + */ + yAxisLabelRightMargin?: number; + + /** + * Gets or sets the bottom margin of labels on the Y-axis + */ + yAxisLabelBottomMargin?: number; + + /** + * Gets or sets color of labels on the X-axis + */ + xAxisLabelTextColor?: string; + + /** + * Gets or sets color of labels on the Y-axis + */ + yAxisLabelTextColor?: string; + + /** + * Gets or sets the margin around a title on the X-axis + */ + xAxisTitleMargin?: number; + + /** + * Gets or sets the margin around a title on the Y-axis + */ + yAxisTitleMargin?: number; + + /** + * Gets or sets the left margin of a title on the X-axis + */ + xAxisTitleLeftMargin?: number; + + /** + * Gets or sets the left margin of a title on the Y-axis + */ + yAxisTitleLeftMargin?: number; + + /** + * Gets or sets the top margin of a title on the X-axis + */ + xAxisTitleTopMargin?: number; + + /** + * Gets or sets the top margin of a title on the Y-axis + */ + yAxisTitleTopMargin?: number; + + /** + * Gets or sets the right margin of a title on the X-axis + */ + xAxisTitleRightMargin?: number; + + /** + * Gets or sets the right margin of a title on the Y-axis + */ + yAxisTitleRightMargin?: number; + + /** + * Gets or sets the bottom margin of a title on the X-axis + */ + xAxisTitleBottomMargin?: number; + + /** + * Gets or sets the bottom margin of a title on the Y-axis + */ + yAxisTitleBottomMargin?: number; + + /** + * Gets or sets color of title on the X-axis + */ + xAxisTitleTextColor?: string; + + /** + * Gets or sets color of title on the Y-axis + */ + yAxisTitleTextColor?: string; + + /** + * Gets or sets CSS font property for labels on X-axis + */ + xAxisLabelTextStyle?: string; + + /** + * Gets or sets CSS font property for labels on Y-axis + */ + yAxisLabelTextStyle?: string; + + /** + * Gets or sets CSS font property for title on X-axis + */ + xAxisTitleTextStyle?: string; + + /** + * Gets or sets CSS font property for title on Y-axis + */ + yAxisTitleTextStyle?: string; + + /** + * Gets or sets the format for labels along the X-axis. + */ + xAxisLabel?: any; + + /** + * Gets or sets the format for labels along the Y-axis. + */ + yAxisLabel?: any; + + /** + * Gets or sets the color to apply to major gridlines along the X-axis. + */ + xAxisMajorStroke?: string; + + /** + * Gets or sets the color to apply to major gridlines along the Y-axis. + */ + yAxisMajorStroke?: string; + + /** + * Gets or sets the thickness to apply to major gridlines along the X-axis. + */ + xAxisMajorStrokeThickness?: number; + + /** + * Gets or sets the thickness to apply to major gridlines along the Y-axis. + */ + yAxisMajorStrokeThickness?: number; + + /** + * Gets or sets the thickness to apply to minor gridlines along the X-axis. + */ + xAxisMinorStrokeThickness?: number; + + /** + * Gets or sets the thickness to apply to minor gridlines along the Y-axis. + */ + yAxisMinorStrokeThickness?: number; + + /** + * Gets or sets the color to apply to stripes along the X-axis. + */ + xAxisStrip?: string; + + /** + * Gets or sets the color to apply to stripes along the Y-axis. + */ + yAxisStrip?: string; + + /** + * Gets or sets the color to apply to the X-axis line. + */ + xAxisStroke?: string; + + /** + * Gets or sets the color to apply to the Y-axis line. + */ + yAxisStroke?: string; + + /** + * Gets or sets the thickness to apply to the X-axis line. + */ + xAxisStrokeThickness?: number; + + /** + * Gets or sets the thickness to apply to the Y-axis line. + */ + yAxisStrokeThickness?: number; + + /** + * Gets or sets the length of tickmarks along the X-axis. + */ + xAxisTickLength?: number; + + /** + * Gets or sets the length of tickmarks along the Y-axis. + */ + yAxisTickLength?: number; + + /** + * Gets or sets the color to apply to tickmarks along the X-axis. + */ + xAxisTickStroke?: string; + + /** + * Gets or sets the color to apply to tickmarks along the Y-axis. + */ + yAxisTickStroke?: string; + + /** + * Gets or sets the thickness to apply to tickmarks along the X-axis. + */ + xAxisTickStrokeThickness?: number; + + /** + * Gets or sets the thickness to apply to tickmarks along the Y-axis. + */ + yAxisTickStrokeThickness?: number; + + /** + * Gets or sets the Text to display below the X-axis. + */ + xAxisTitle?: string; + + /** + * Gets or sets the Text to display to the left of the Y-axis. + */ + yAxisTitle?: string; + + /** + * Gets or sets the color to apply to minor gridlines along the X-axis. + */ + xAxisMinorStroke?: string; + + /** + * Gets or sets the color to apply to minor gridlines along the Y-axis. + */ + yAxisMinorStroke?: string; + + /** + * Gets or sets the angle of rotation for labels along the X-axis. + */ + xAxisLabelAngle?: number; + + /** + * Gets or sets the angle of rotation for labels along the Y-axis. + */ + yAxisLabelAngle?: number; + + /** + * Gets or sets the distance between the X-axis and the bottom of the chart. + */ + xAxisExtent?: number; + + /** + * Gets or sets the distance between the Y-axis and the left edge of the chart. + */ + yAxisExtent?: number; + + /** + * Gets or sets the angle of rotation for the X-axis title. + */ + xAxisTitleAngle?: number; + + /** + * Gets or sets the angle of rotation for the Y-axis title. + */ + yAxisTitleAngle?: number; + + /** + * Gets or sets whether to invert the direction of the X-axis by placing the first data items on the right side of the chart. + */ + xAxisInverted?: boolean; + + /** + * Gets or sets whether to invert the direction of the Y-axis by placing the minimum numeric value at the top of the chart. + */ + yAxisInverted?: boolean; + + /** + * Gets or sets Horizontal alignment of the X-axis title. + * + * Valid values: + * "left" Align the item to the left + * "center" Center the item + * "right" Align the item to the right + * "stretch" Stretch the item to the full width + */ + xAxisTitleAlignment?: string; + + /** + * Gets or sets Vertical alignment of the Y-axis title. + * + * Valid values: + * "top" Align the item to the top + * "center" Center the item + * "bottom" Align the item to the bottom + * "stretch" Stretch the item to the full height + */ + yAxisTitleAlignment?: string; + + /** + * Gets or sets Horizontal alignment of X-axis labels. + * + * Valid values: + * "left" Align the item to the left + * "center" Center the item + * "right" Align the item to the right + * "stretch" Stretch the item to the full width + */ + xAxisLabelHorizontalAlignment?: string; + + /** + * Gets or sets Horizontal alignment of Y-axis labels. + * + * Valid values: + * "left" Align the item to the left + * "center" Center the item + * "right" Align the item to the right + * "stretch" Stretch the item to the full width + */ + yAxisLabelHorizontalAlignment?: string; + + /** + * Gets or sets Vertical alignment of X-axis labels. + * + * Valid values: + * "top" Align the item to the top + * "center" Center the item + * "bottom" Align the item to the bottom + * "stretch" Stretch the item to the full height + */ + xAxisLabelVerticalAlignment?: string; + + /** + * Gets or sets Vertical alignment of Y-axis labels. + * + * Valid values: + * "top" Align the item to the top + * "center" Center the item + * "bottom" Align the item to the bottom + * "stretch" Stretch the item to the full height + */ + yAxisLabelVerticalAlignment?: string; + + /** + * Gets or sets Visibility of X-axis labels. + * + * Valid values: + * "visible" Display the element. + * "collapsed" Do not display the element. + */ + xAxisLabelVisibility?: string; + + /** + * Gets or sets Visibility of Y-axis labels. + * + * Valid values: + * "visible" Display the element. + * "collapsed" Do not display the element. + */ + yAxisLabelVisibility?: string; + + /** + * The location of Y-axis labels, relative to the plot area. + * + * Valid values: + * "outsideTop" Places the axis labels at the top, outside of the plotting area. + * "outsideBottom" Places the axis labels at the bottom, outside of the plotting area + * "outsideLeft" Places the axis labels to the left, outside of the plotting area. + * "outsideRight" Places the axis labels to the right, outside of the plotting area. + * "insideTop" Places the axis labels inside the plotting area above the axis line. + * "insideBottom" Places the axis labels inside the plotting area below the axis line. + * "insideLeft" Places the axis labels inside the plotting area and to the left of the axis line. + * "insideRight" Places the axis labels inside the plotting area and to the right of the axis line. + */ + yAxisLabelLocation?: string; + rangeSelectorTemplate?: any; + toolbarTemplate?: any; + chartTypePickerTemplate?: any; + trendLineTypePickerTemplate?: any; + volumeTypePickerTemplate?: any; + indicatorPickerTemplate?: any; + overlayPickerTemplate?: any; + toolbarHeight?: number; + + /** + * Gets or sets whether the Y-axis should use a logarithmic scale instead of a linear one. + * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the Y-axis minimum is greater than zero. + */ + yAxisIsLogarithmic?: boolean; + + /** + * Gets or sets the base value to use in the log function when mapping the position of data items along the Y-axis. + * This property is effective only when YAxisIsLogarithmic is true. + */ + yAxisLogarithmBase?: number; + + /** + * Gets or sets the distance between each label and grid line along the Y-axis. + */ + yAxisInterval?: number; + + /** + * Gets or sets the data value corresponding to the minimum value of the Y-axis. + */ + yAxisMinimumValue?: number; + + /** + * Gets or sets the data value corresponding to the maximum value of the Y-axis. + */ + yAxisMaximumValue?: number; + + /** + * Gets or sets the frequency of displayed minor lines along the Y-axis. + */ + yAxisMinorInterval?: number; + + /** + * The type of series to display in the volume pane. + * + * Valid values: + * "none" Do not display the volume pane. + * "column" Display column series in the volume pane. + * "line" Display line series in the volume pane. + * "area" Display area series in the volume pane. + */ + volumeType?: string; + + /** + * The scaling mode of the X-axis. + * + * Valid values: + * "ordinal" An ordinal scale with time labels. + * "time" A time scale. + */ + xAxisMode?: string; + + /** + * The scaling mode of the Y-axis. + * + * Valid values: + * "numeric" A linear or logarithmic numeric scale. + * "percentChange" A numeric scale where all values are scaled proportionally to a reference value. + */ + yAxisMode?: string; + + /** + * A boolean property controlling the visibility of the toolbar. + */ + isToolbarVisible?: boolean; + + /** + * The type of price series to display in the main chart. + * + * Valid values: + * "auto" Automatically determine the price series type to display in the main chart. + * "bar" Display financial bar series in the main chart. + * "candle" Display candlestick series in the main chart. + * "column" Display column series in the main chart. + * "line" Display line series in the main chart. + */ + chartType?: string; + + /** + * A boolean indicating whether the chart should automatically zoom in vertically on the currently visible range of data. + * When this property is set to true, panning and zooming along the X-axis will result in a corresponding zoom on the Y-axis, so that the visible range of data fills the zoom window as fully as possible. + */ + isWindowSyncedToVisibleRange?: boolean; + + /** + * A collection indicating what financial indicator types to display on the Financial Chart. + */ + indicatorTypes?: any; + + /** + * A collection indicating what financial overlay types to display on the Financial Chart. + */ + overlayTypes?: any; + + /** + * Gets or sets whether the large numbers on the Y-axis labels are abbreviated. + */ + yAxisAbbreviateLargeNumbers?: boolean; + + /** + * The type of series to display in the zoom slider pane. + * + * Valid values: + * "none" Do not display the zoom slider pane. + * "bar" Display financial bar series in the zoom slider pane. + * "candle" Display candle series in the zoom slider pane. + * "column" Display column series in the zoom slider pane. + * "line" Display line series in the zoom slider pane. + * "area" Display an area series in the zoom slider pane. + */ + zoomSliderType?: string; + + /** + * Gets or sets the palette used for coloring negative items of Waterfall chart type. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + negativeBrushes?: any; + + /** + * Brushes to use for drawing negative elements, when using a chart type with contextual coloring, such as Waterfall. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + negativeOutlines?: any; + + /** + * Brushes to use for filling financial overlays. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + overlayBrushes?: any; + + /** + * Brushes to use for outlining financial overlays. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + overlayOutlines?: any; + + /** + * Brushes to use for outlining volume series in the volume pane. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + volumeOutlines?: any; + + /** + * Brushes to use for filling volume series in the volume pane. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + volumeBrushes?: any; + + /** + * Brushes to use for negative elements in financial indicators. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + indicatorNegativeBrushes?: any; + + /** + * Brushes to use for financial indicators. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + indicatorBrushes?: any; + + /** + * The outline thickness of volume series in the volume pane. + */ + volumeThickness?: number; + + /** + * The outline thickness of financial overlays. + */ + overlayThickness?: number; + + /** + * The outline or stroke thickness of financial indicators. + */ + indicatorThickness?: number; + + /** + * The display types of financial indicators. + */ + indicatorDisplayTypes?: any; + + /** + * The period of financial indicators, where applicable. + */ + indicatorPeriod?: number; + + /** + * The multiplier of financial indicators, where applicable. + */ + indicatorMultiplier?: number; + + /** + * The smoothing period of financial indicators, where applicable. + */ + indicatorSmoothingPeriod?: number; + + /** + * The short period of financial indicators, where applicable. + */ + indicatorShortPeriod?: number; + + /** + * The long period of financial indicators, where applicable. + */ + indicatorLongPeriod?: number; + + /** + * The signal period of financial indicators, where applicable. + */ + indicatorSignalPeriod?: number; + + /** + * A FinancialChartRangeSelectorOptionCollection containing the available range selector options on the toolbar. + */ + rangeSelectorOptions?: any; + + /** + * A FinancialChartRangeSelectorOptionCollection containing the available range selector options on the toolbar. + * This will be the intersection of the user-defined range selector options, if any, and the range selector options which are automatically determined based on the range of data. + */ + actualRangeSelectorOptions?: any; + + /** + * The names of custom indicators to add to the chart. + * When CustomIndicatorNames is set, the ApplyCustomIndicators event will be raised for each custom indicator name. + */ + customIndicatorNames?: any; + + /** + * The width of the chart. + */ + width?: number; + + /** + * The height of the chart. + */ + height?: number; + + /** + * Gets sets maximum number of displayed records in chart. + */ + maxRecCount?: number; + + /** + * Gets sets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + */ + dataSource?: any; + + /** + * Gets sets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + */ + dataSourceType?: string; + + /** + * Gets sets url which is used for sending JSON on request for remote data. + */ + dataSourceUrl?: string; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + */ + responseTotalRecCountKey?: string; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + */ + responseDataKey?: string; + + /** + * Event raised when a property value is changed on this chart + */ + propertyChanged?: PropertyChangedEvent; + + /** + * Event raised when a series is initialized and added to this chart. + */ + seriesAdded?: SeriesAddedEvent; + + /** + * Event raised when a series is removed from this chart. + */ + seriesRemoved?: SeriesRemovedEvent; + + /** + * Occurs when the pointer enters a Series. + */ + seriesPointerEnter?: SeriesPointerEnterEvent; + + /** + * Occurs when the pointer leaves a Series. + */ + seriesPointerLeave?: SeriesPointerLeaveEvent; + + /** + * Occurs when the pointer moves over a Series. + */ + seriesPointerMove?: SeriesPointerMoveEvent; + + /** + * Occurs when the pointer is pressed down over a Series. + */ + seriesPointerDown?: SeriesPointerDownEvent; + + /** + * Occurs when the pointer is released over a Series. + */ + seriesPointerUp?: SeriesPointerUpEvent; + + /** + * Event raised by the chart when custom indicator data is needed from the application. + * During series rendering, event will be raised once for each value in the CustomIndicatorNames collection. + */ + applyCustomIndicators?: ApplyCustomIndicatorsEvent; + + /** + * Event which is raised before data binding. + * Return false in order to cancel data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + dataBinding?: DataBindingEvent; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + dataBound?: DataBoundEvent; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + */ + updateTooltip?: UpdateTooltipEvent; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + */ + hideTooltip?: HideTooltipEvent; + + /** + * Option for igFinancialChart + */ + [optionName: string]: any; +} +interface IgFinancialChartMethods { + destroy(): void; + id(): void; + exportVisualData(): void; + + /** + * Find index of item within actual data used by chart. + * + * @param item The reference to item. + */ + findIndexOfItem(item: Object): number; + + /** + * Get item within actual data used by chart. That is similar to this.getData()[ index ]. + * + * @param index Index of data item. + */ + getDataItem(index: Object): Object; + + /** + * Get reference of actual data used by chart. + */ + getData(): any[]; + + /** + * Adds a new item to the data source and notifies the chart. + * + * @param item The item that we want to add to the data source. + */ + addItem(item: Object): Object; + + /** + * Inserts a new item to the data source and notifies the chart. + * + * @param item the new item that we want to insert in the data source. + * @param index The index in the data source where the new item will be inserted. + */ + insertItem(item: Object, index: number): Object; + + /** + * Deletes an item from the data source and notifies the chart. + * + * @param index The index in the data source from where the item will be been removed. + */ + removeItem(index: number): Object; + + /** + * Updates an item in the data source and notifies the chart. + * + * @param index The index of the item in the data source that we want to change. + * @param item The new item object that will be set in the data source. + */ + setItem(index: number, item: Object): Object; + + /** + * Notifies the chart that an item has been set in an associated data source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source that has been changed. + * @param newItem the new item that has been set in the collection. + * @param oldItem the old item that has been overwritten in the collection. + */ + notifySetItem(dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; + + /** + * Notifies the chart that the items have been cleared from an associated data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + */ + notifyClearItems(dataSource: Object): Object; + + /** + * Notifies the target axis or series that an item has been inserted at the specified index in its data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source where the new item has been inserted. + * @param newItem the new item that has been set in the collection. + */ + notifyInsertItem(dataSource: Object, index: number, newItem: Object): Object; + + /** + * Notifies the target axis or series that an item has been removed from the specified index in its data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source from where the old item has been removed. + * @param oldItem the old item that has been removed from the collection. + */ + notifyRemoveItem(dataSource: Object, index: number, oldItem: Object): Object; + + /** + * Get reference to chart object. + */ + chart(): Object; + + /** + * Binds data to the chart + */ + dataBind(): void; + + /** + * Forces any pending deferred work to render on the chart before continuing + */ + flush(): void; +} +interface JQuery { + data(propertyName: "igFinancialChart"): IgFinancialChartMethods; +} + +interface JQuery { + igFinancialChart(methodName: "destroy"): void; + igFinancialChart(methodName: "id"): void; + igFinancialChart(methodName: "exportVisualData"): void; + igFinancialChart(methodName: "findIndexOfItem", item: Object): number; + igFinancialChart(methodName: "getDataItem", index: Object): Object; + igFinancialChart(methodName: "getData"): any[]; + igFinancialChart(methodName: "addItem", item: Object): Object; + igFinancialChart(methodName: "insertItem", item: Object, index: number): Object; + igFinancialChart(methodName: "removeItem", index: number): Object; + igFinancialChart(methodName: "setItem", index: number, item: Object): Object; + igFinancialChart(methodName: "notifySetItem", dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; + igFinancialChart(methodName: "notifyClearItems", dataSource: Object): Object; + igFinancialChart(methodName: "notifyInsertItem", dataSource: Object, index: number, newItem: Object): Object; + igFinancialChart(methodName: "notifyRemoveItem", dataSource: Object, index: number, oldItem: Object): Object; + igFinancialChart(methodName: "chart"): Object; + igFinancialChart(methodName: "dataBind"): void; + igFinancialChart(methodName: "flush"): void; + + /** + * Gets the id of a template element to use for tooltips, or markup representing the tooltip template. + */ + igFinancialChart(optionLiteral: 'option', optionName: "tooltipTemplate"): any; + + /** + * Sets the id of a template element to use for tooltips, or markup representing the tooltip template. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "tooltipTemplate", optionValue: any): void; + + /** + * Gets the names of tooltip templates + */ + igFinancialChart(optionLiteral: 'option', optionName: "tooltipTemplates"): any; + + /** + * Sets the names of tooltip templates + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "tooltipTemplates", optionValue: any): void; + + /** + * Gets the left margin of chart title + */ + igFinancialChart(optionLiteral: 'option', optionName: "titleLeftMargin"): number; + + /** + * Sets the left margin of chart title + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "titleLeftMargin", optionValue: number): void; + + /** + * Gets the right margin of chart title + */ + igFinancialChart(optionLiteral: 'option', optionName: "titleRightMargin"): number; + + /** + * Sets the right margin of chart title + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "titleRightMargin", optionValue: number): void; + + /** + * Gets the top margin of chart title + */ + igFinancialChart(optionLiteral: 'option', optionName: "titleTopMargin"): number; + + /** + * Sets the top margin of chart title + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "titleTopMargin", optionValue: number): void; + + /** + * Gets the bottom margin of chart title + */ + igFinancialChart(optionLiteral: 'option', optionName: "titleBottomMargin"): number; + + /** + * Sets the bottom margin of chart title + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "titleBottomMargin", optionValue: number): void; + + /** + * Gets the left margin of chart subtitle + */ + igFinancialChart(optionLiteral: 'option', optionName: "subtitleLeftMargin"): number; + + /** + * Sets the left margin of chart subtitle + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "subtitleLeftMargin", optionValue: number): void; + + /** + * Gets the top margin of chart subtitle + */ + igFinancialChart(optionLiteral: 'option', optionName: "subtitleTopMargin"): number; + + /** + * Sets the top margin of chart subtitle + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "subtitleTopMargin", optionValue: number): void; + + /** + * Gets the right margin of chart subtitle + */ + igFinancialChart(optionLiteral: 'option', optionName: "subtitleRightMargin"): number; + + /** + * Sets the right margin of chart subtitle + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "subtitleRightMargin", optionValue: number): void; + + /** + * Gets the bottom margin of chart subtitle + */ + igFinancialChart(optionLiteral: 'option', optionName: "subtitleBottomMargin"): number; + + /** + * Sets the bottom margin of chart subtitle + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "subtitleBottomMargin", optionValue: number): void; + + /** + * Gets color of chart subtitle + */ + igFinancialChart(optionLiteral: 'option', optionName: "subtitleTextColor"): string; + + /** + * Sets color of chart subtitle + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "subtitleTextColor", optionValue: string): void; + + /** + * Gets color of chart title + */ + igFinancialChart(optionLiteral: 'option', optionName: "titleTextColor"): string; + + /** + * Sets color of chart title + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "titleTextColor", optionValue: string): void; + + /** + * Gets the left margin of the chart content. + */ + igFinancialChart(optionLiteral: 'option', optionName: "leftMargin"): number; + + /** + * Sets the left margin of the chart content. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "leftMargin", optionValue: number): void; + + /** + * Gets the top margin of the chart content. + */ + igFinancialChart(optionLiteral: 'option', optionName: "topMargin"): number; + + /** + * Sets the top margin of the chart content. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "topMargin", optionValue: number): void; + + /** + * Gets the right margin of the chart content. + */ + igFinancialChart(optionLiteral: 'option', optionName: "rightMargin"): number; + + /** + * Sets the right margin of the chart content. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "rightMargin", optionValue: number): void; + + /** + * Gets the bottom margin around the chart content. + */ + igFinancialChart(optionLiteral: 'option', optionName: "bottomMargin"): number; + + /** + * Sets the bottom margin around the chart content. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "bottomMargin", optionValue: number): void; + + /** + * Gets the duration used for animating series plots when the data is changing + */ + igFinancialChart(optionLiteral: 'option', optionName: "transitionDuration"): number; + + /** + * Sets the duration used for animating series plots when the data is changing + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "transitionDuration", optionValue: number): void; + + /** + * Gets the easing function used for animating series plots when the data is changing. + * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. + */ + igFinancialChart(optionLiteral: 'option', optionName: "transitionEasingFunction"): any; + + /** + * Sets the easing function used for animating series plots when the data is changing. + * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "transitionEasingFunction", optionValue: any): void; + + /** + * Gets a function for creating wrapped tooltip + */ + igFinancialChart(optionLiteral: 'option', optionName: "createWrappedTooltip"): any; + + /** + * Sets a function for creating wrapped tooltip + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "createWrappedTooltip", optionValue: any): void; + + /** + * Gets the widget of this control + */ + igFinancialChart(optionLiteral: 'option', optionName: "widget"): any; + + /** + * Sets the widget of this control + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "widget", optionValue: any): void; + + /** + * Gets CSS font property for the chart subtitle + */ + igFinancialChart(optionLiteral: 'option', optionName: "subtitleTextStyle"): string; + + /** + * Sets CSS font property for the chart subtitle + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "subtitleTextStyle", optionValue: string): void; + + /** + * Gets CSS font property for the chart title + */ + igFinancialChart(optionLiteral: 'option', optionName: "titleTextStyle"): string; + + /** + * Sets CSS font property for the chart title + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "titleTextStyle", optionValue: string): void; + + /** + * Gets a collection of data items used to generate the chart. + * The ItemsSource of this chart can be a list of objects containing one or more numeric properties. + * Additionally, if the objects in the list implement the IEnumerable interface, + * the Chart will attempt to delve into the sub-collections when reading through the data source. + * Databinding can be further configured by attributing the data item classes + * with the DataSeriesMemberIntentAttribute. + */ + igFinancialChart(optionLiteral: 'option', optionName: "itemsSource"): any; + + /** + * Sets a collection of data items used to generate the chart. + * The ItemsSource of this chart can be a list of objects containing one or more numeric properties. + * Additionally, if the objects in the list implement the IEnumerable interface, + * the Chart will attempt to delve into the sub-collections when reading through the data source. + * Databinding can be further configured by attributing the data item classes + * with the DataSeriesMemberIntentAttribute. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "itemsSource", optionValue: any): void; + + /** + * Gets a set of property paths that should be included for consideration by the category chart, leaving the remainder excluded. If null, all properties will be considered. + */ + igFinancialChart(optionLiteral: 'option', optionName: "includedProperties"): any; + + /** + * Sets a set of property paths that should be included for consideration by the category chart, leaving the remainder excluded. If null, all properties will be considered. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "includedProperties", optionValue: any): void; + + /** + * Gets a set of property paths that should be excluded from consideration by the category chart. + */ + igFinancialChart(optionLiteral: 'option', optionName: "excludedProperties"): any; + + /** + * Sets a set of property paths that should be excluded from consideration by the category chart. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "excludedProperties", optionValue: any): void; + + /** + * Gets the palette of brushes to use for coloring the chart series. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igFinancialChart(optionLiteral: 'option', optionName: "brushes"): any; + + /** + * Sets the palette of brushes to use for coloring the chart series. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "brushes", optionValue: any): void; + + /** + * Gets the palette of brushes to use for outlines on the chart series. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igFinancialChart(optionLiteral: 'option', optionName: "outlines"): any; + + /** + * Sets the palette of brushes to use for outlines on the chart series. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "outlines", optionValue: any): void; + + /** + * Gets the legend to connect this chart to. + * When the legend property is set, the chart will use it to display information about its series. Legends can be shared by multiple chart controls. + */ + igFinancialChart(optionLiteral: 'option', optionName: "legend"): any; + + /** + * Sets the legend to connect this chart to. + * When the legend property is set, the chart will use it to display information about its series. Legends can be shared by multiple chart controls. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "legend", optionValue: any): void; + + /** + * Gets whether the chart can be horizontally zoomed through user interactions. + */ + igFinancialChart(optionLiteral: 'option', optionName: "isHorizontalZoomEnabled"): boolean; + + /** + * Sets whether the chart can be horizontally zoomed through user interactions. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "isHorizontalZoomEnabled", optionValue: boolean): void; + + /** + * Gets whether the chart can be vertically zoomed through user interactions. + */ + igFinancialChart(optionLiteral: 'option', optionName: "isVerticalZoomEnabled"): boolean; + + /** + * Sets whether the chart can be vertically zoomed through user interactions. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "isVerticalZoomEnabled", optionValue: boolean): void; + + /** + * Gets the rectangle representing the current scroll and zoom state of the chart. + * WindowRect is expressed as a Rectangle with coordinates and sizes between 0 and 1. + * The provided object should have numeric properties called left, top, width and height. + */ + igFinancialChart(optionLiteral: 'option', optionName: "windowRect"): any; + + /** + * Sets the rectangle representing the current scroll and zoom state of the chart. + * WindowRect is expressed as a Rectangle with coordinates and sizes between 0 and 1. + * The provided object should have numeric properties called left, top, width and height. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "windowRect", optionValue: any): void; + + /** + * Gets text to display above the plot area. + */ + igFinancialChart(optionLiteral: 'option', optionName: "title"): string; + + /** + * Sets text to display above the plot area. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "title", optionValue: string): void; + + /** + * Gets text to display below the Title, above the plot area. + */ + igFinancialChart(optionLiteral: 'option', optionName: "subtitle"): string; + + /** + * Sets text to display below the Title, above the plot area. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "subtitle", optionValue: string): void; + + /** + * Gets horizontal alignment which determines the title position, relative to the left and right edges of the control. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "titleAlignment"): string; + + /** + * Sets horizontal alignment which determines the title position, relative to the left and right edges of the control. + * + * @optionValue New value to be set. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "titleAlignment", optionValue: string): void; + + /** + * Gets horizontal alignment which determines the subtitle position, relative to the left and right edges of the control. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "subtitleAlignment"): string; + + /** + * Sets horizontal alignment which determines the subtitle position, relative to the left and right edges of the control. + * + * @optionValue New value to be set. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "subtitleAlignment", optionValue: string): void; + + /** + * Gets the behavior that determines how unknown values will be plotted on the chart.Null and Double.NaN are two examples of unknown values. + * + */ + + igFinancialChart(optionLiteral: 'option', optionName: "unknownValuePlotting"): string; + + /** + * Sets the behavior that determines how unknown values will be plotted on the chart.Null and Double.NaN are two examples of unknown values. + * + * + * @optionValue New value to be set. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "unknownValuePlotting", optionValue: string): void; + + /** + * Gets the rendering resolution for all series in this chart. + * Where n = Resolution, for every n horizontal pixels, combine all items into a single datapoint. When Resolution = 0, all datapoints will be rendered as graphical objects. Charts with a higher resolution will have faster performance. + */ + igFinancialChart(optionLiteral: 'option', optionName: "resolution"): number; + + /** + * Sets the rendering resolution for all series in this chart. + * Where n = Resolution, for every n horizontal pixels, combine all items into a single datapoint. When Resolution = 0, all datapoints will be rendered as graphical objects. Charts with a higher resolution will have faster performance. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "resolution", optionValue: number): void; + + /** + * Gets the thickness for all series in this chart. Depending on the ChartType, this can be the main brush used, or just the outline. + */ + igFinancialChart(optionLiteral: 'option', optionName: "thickness"): number; + + /** + * Sets the thickness for all series in this chart. Depending on the ChartType, this can be the main brush used, or just the outline. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "thickness", optionValue: number): void; + + /** + * Gets the marker shapes used for indicating location of data points in this chart. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + */ + igFinancialChart(optionLiteral: 'option', optionName: "markerTypes"): any; + + /** + * Sets the marker shapes used for indicating location of data points in this chart. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "markerTypes", optionValue: any): void; + + /** + * Gets the palette of brushes used for rendering fill area of data point markers. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igFinancialChart(optionLiteral: 'option', optionName: "markerBrushes"): any; + + /** + * Sets the palette of brushes used for rendering fill area of data point markers. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "markerBrushes", optionValue: any): void; + + /** + * Gets the palette of brushes used for rendering outlines of data point markers. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igFinancialChart(optionLiteral: 'option', optionName: "markerOutlines"): any; + + /** + * Sets the palette of brushes used for rendering outlines of data point markers. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "markerOutlines", optionValue: any): void; + + /** + * Gets the maximum number of markers displyed in the plot area of the chart. + */ + igFinancialChart(optionLiteral: 'option', optionName: "markerMaxCount"): number; + + /** + * Sets the maximum number of markers displyed in the plot area of the chart. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "markerMaxCount", optionValue: number): void; + + /** + * Gets the palette of brushes to used for coloring trend lines in this chart. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igFinancialChart(optionLiteral: 'option', optionName: "trendLineBrushes"): any; + + /** + * Sets the palette of brushes to used for coloring trend lines in this chart. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "trendLineBrushes", optionValue: any): void; + + /** + * Gets the formula used for calculating trend lines in this chart.This property applies only to these chart types: point, line, spline, and bubble + * + */ + + igFinancialChart(optionLiteral: 'option', optionName: "trendLineType"): string; + + /** + * Sets the formula used for calculating trend lines in this chart.This property applies only to these chart types: point, line, spline, and bubble + * + * + * @optionValue New value to be set. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "trendLineType", optionValue: string): void; + + /** + * Gets the thickness of the trend lines in this chart. + * This property applies only to these chart types: point, line, spline, and bubble + */ + igFinancialChart(optionLiteral: 'option', optionName: "trendLineThickness"): number; + + /** + * Sets the thickness of the trend lines in this chart. + * This property applies only to these chart types: point, line, spline, and bubble + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "trendLineThickness", optionValue: number): void; + + /** + * Gets a value indicating whether grid and tick lines are aligned to device pixels. + */ + igFinancialChart(optionLiteral: 'option', optionName: "alignsGridLinesToPixels"): boolean; + + /** + * Sets a value indicating whether grid and tick lines are aligned to device pixels. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "alignsGridLinesToPixels", optionValue: boolean): void; + igFinancialChart(optionLiteral: 'option', optionName: "trendLinePeriod"): number; + igFinancialChart(optionLiteral: 'option', optionName: "trendLinePeriod", optionValue: number): void; + + /** + * Gets function which takes an context object and returns a formatted label for the X-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisFormatLabel"): any; + + /** + * Sets function which takes an context object and returns a formatted label for the X-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisFormatLabel", optionValue: any): void; + + /** + * Gets function which takes a context object and returns a formatted label for the Y-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisFormatLabel"): any; + + /** + * Sets function which takes a context object and returns a formatted label for the Y-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisFormatLabel", optionValue: any): void; + + /** + * Gets the left margin of labels on the X-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelLeftMargin"): number; + + /** + * Sets the left margin of labels on the X-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelLeftMargin", optionValue: number): void; + + /** + * Gets the top margin of labels on the X-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelTopMargin"): number; + + /** + * Sets the top margin of labels on the X-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelTopMargin", optionValue: number): void; + + /** + * Gets the right margin of labels on the X-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelRightMargin"): number; + + /** + * Sets the right margin of labels on the X-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelRightMargin", optionValue: number): void; + + /** + * Gets the bottom margin of labels on the X-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelBottomMargin"): number; + + /** + * Sets the bottom margin of labels on the X-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelBottomMargin", optionValue: number): void; + + /** + * Gets the left margin of labels on the Y-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelLeftMargin"): number; + + /** + * Sets the left margin of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelLeftMargin", optionValue: number): void; + + /** + * Gets the top margin of labels on the Y-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelTopMargin"): number; + + /** + * Sets the top margin of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelTopMargin", optionValue: number): void; + + /** + * Gets the right margin of labels on the Y-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelRightMargin"): number; + + /** + * Sets the right margin of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelRightMargin", optionValue: number): void; + + /** + * Gets the bottom margin of labels on the Y-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelBottomMargin"): number; + + /** + * Sets the bottom margin of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelBottomMargin", optionValue: number): void; + + /** + * Gets color of labels on the X-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelTextColor"): string; + + /** + * Sets color of labels on the X-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelTextColor", optionValue: string): void; + + /** + * Gets color of labels on the Y-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelTextColor"): string; + + /** + * Sets color of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelTextColor", optionValue: string): void; + + /** + * Gets the margin around a title on the X-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitleMargin"): number; + + /** + * Sets the margin around a title on the X-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitleMargin", optionValue: number): void; + + /** + * Gets the margin around a title on the Y-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitleMargin"): number; + + /** + * Sets the margin around a title on the Y-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitleMargin", optionValue: number): void; + + /** + * Gets the left margin of a title on the X-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitleLeftMargin"): number; + + /** + * Sets the left margin of a title on the X-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitleLeftMargin", optionValue: number): void; + + /** + * Gets the left margin of a title on the Y-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitleLeftMargin"): number; + + /** + * Sets the left margin of a title on the Y-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitleLeftMargin", optionValue: number): void; + + /** + * Gets the top margin of a title on the X-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitleTopMargin"): number; + + /** + * Sets the top margin of a title on the X-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitleTopMargin", optionValue: number): void; + + /** + * Gets the top margin of a title on the Y-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitleTopMargin"): number; + + /** + * Sets the top margin of a title on the Y-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitleTopMargin", optionValue: number): void; + + /** + * Gets the right margin of a title on the X-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitleRightMargin"): number; + + /** + * Sets the right margin of a title on the X-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitleRightMargin", optionValue: number): void; + + /** + * Gets the right margin of a title on the Y-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitleRightMargin"): number; + + /** + * Sets the right margin of a title on the Y-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitleRightMargin", optionValue: number): void; + + /** + * Gets the bottom margin of a title on the X-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitleBottomMargin"): number; + + /** + * Sets the bottom margin of a title on the X-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitleBottomMargin", optionValue: number): void; + + /** + * Gets the bottom margin of a title on the Y-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitleBottomMargin"): number; + + /** + * Sets the bottom margin of a title on the Y-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitleBottomMargin", optionValue: number): void; + + /** + * Gets color of title on the X-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitleTextColor"): string; + + /** + * Sets color of title on the X-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitleTextColor", optionValue: string): void; + + /** + * Gets color of title on the Y-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitleTextColor"): string; + + /** + * Sets color of title on the Y-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitleTextColor", optionValue: string): void; + + /** + * Gets CSS font property for labels on X-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelTextStyle"): string; + + /** + * Sets CSS font property for labels on X-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelTextStyle", optionValue: string): void; + + /** + * Gets CSS font property for labels on Y-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelTextStyle"): string; + + /** + * Sets CSS font property for labels on Y-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelTextStyle", optionValue: string): void; + + /** + * Gets CSS font property for title on X-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitleTextStyle"): string; + + /** + * Sets CSS font property for title on X-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitleTextStyle", optionValue: string): void; + + /** + * Gets CSS font property for title on Y-axis + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitleTextStyle"): string; + + /** + * Sets CSS font property for title on Y-axis + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitleTextStyle", optionValue: string): void; + + /** + * Gets the format for labels along the X-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabel"): any; + + /** + * Sets the format for labels along the X-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabel", optionValue: any): void; + + /** + * Gets the format for labels along the Y-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabel"): any; + + /** + * Sets the format for labels along the Y-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabel", optionValue: any): void; + + /** + * Gets the color to apply to major gridlines along the X-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisMajorStroke"): string; + + /** + * Sets the color to apply to major gridlines along the X-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisMajorStroke", optionValue: string): void; + + /** + * Gets the color to apply to major gridlines along the Y-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisMajorStroke"): string; + + /** + * Sets the color to apply to major gridlines along the Y-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisMajorStroke", optionValue: string): void; + + /** + * Gets the thickness to apply to major gridlines along the X-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisMajorStrokeThickness"): number; + + /** + * Sets the thickness to apply to major gridlines along the X-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisMajorStrokeThickness", optionValue: number): void; + + /** + * Gets the thickness to apply to major gridlines along the Y-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisMajorStrokeThickness"): number; + + /** + * Sets the thickness to apply to major gridlines along the Y-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisMajorStrokeThickness", optionValue: number): void; + + /** + * Gets the thickness to apply to minor gridlines along the X-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisMinorStrokeThickness"): number; + + /** + * Sets the thickness to apply to minor gridlines along the X-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisMinorStrokeThickness", optionValue: number): void; + + /** + * Gets the thickness to apply to minor gridlines along the Y-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisMinorStrokeThickness"): number; + + /** + * Sets the thickness to apply to minor gridlines along the Y-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisMinorStrokeThickness", optionValue: number): void; + + /** + * Gets the color to apply to stripes along the X-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisStrip"): string; + + /** + * Sets the color to apply to stripes along the X-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisStrip", optionValue: string): void; + + /** + * Gets the color to apply to stripes along the Y-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisStrip"): string; + + /** + * Sets the color to apply to stripes along the Y-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisStrip", optionValue: string): void; + + /** + * Gets the color to apply to the X-axis line. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisStroke"): string; + + /** + * Sets the color to apply to the X-axis line. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisStroke", optionValue: string): void; + + /** + * Gets the color to apply to the Y-axis line. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisStroke"): string; + + /** + * Sets the color to apply to the Y-axis line. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisStroke", optionValue: string): void; + + /** + * Gets the thickness to apply to the X-axis line. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisStrokeThickness"): number; + + /** + * Sets the thickness to apply to the X-axis line. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisStrokeThickness", optionValue: number): void; + + /** + * Gets the thickness to apply to the Y-axis line. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisStrokeThickness"): number; + + /** + * Sets the thickness to apply to the Y-axis line. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisStrokeThickness", optionValue: number): void; + + /** + * Gets the length of tickmarks along the X-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTickLength"): number; + + /** + * Sets the length of tickmarks along the X-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTickLength", optionValue: number): void; + + /** + * Gets the length of tickmarks along the Y-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTickLength"): number; + + /** + * Sets the length of tickmarks along the Y-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTickLength", optionValue: number): void; + + /** + * Gets the color to apply to tickmarks along the X-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTickStroke"): string; + + /** + * Sets the color to apply to tickmarks along the X-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTickStroke", optionValue: string): void; + + /** + * Gets the color to apply to tickmarks along the Y-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTickStroke"): string; + + /** + * Sets the color to apply to tickmarks along the Y-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTickStroke", optionValue: string): void; + + /** + * Gets the thickness to apply to tickmarks along the X-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTickStrokeThickness"): number; + + /** + * Sets the thickness to apply to tickmarks along the X-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTickStrokeThickness", optionValue: number): void; + + /** + * Gets the thickness to apply to tickmarks along the Y-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTickStrokeThickness"): number; + + /** + * Sets the thickness to apply to tickmarks along the Y-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTickStrokeThickness", optionValue: number): void; + + /** + * Gets the Text to display below the X-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitle"): string; + + /** + * Sets the Text to display below the X-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitle", optionValue: string): void; + + /** + * Gets the Text to display to the left of the Y-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitle"): string; + + /** + * Sets the Text to display to the left of the Y-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitle", optionValue: string): void; + + /** + * Gets the color to apply to minor gridlines along the X-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisMinorStroke"): string; + + /** + * Sets the color to apply to minor gridlines along the X-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisMinorStroke", optionValue: string): void; + + /** + * Gets the color to apply to minor gridlines along the Y-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisMinorStroke"): string; + + /** + * Sets the color to apply to minor gridlines along the Y-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisMinorStroke", optionValue: string): void; + + /** + * Gets the angle of rotation for labels along the X-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelAngle"): number; + + /** + * Sets the angle of rotation for labels along the X-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelAngle", optionValue: number): void; + + /** + * Gets the angle of rotation for labels along the Y-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelAngle"): number; + + /** + * Sets the angle of rotation for labels along the Y-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelAngle", optionValue: number): void; + + /** + * Gets the distance between the X-axis and the bottom of the chart. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisExtent"): number; + + /** + * Sets the distance between the X-axis and the bottom of the chart. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisExtent", optionValue: number): void; + + /** + * Gets the distance between the Y-axis and the left edge of the chart. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisExtent"): number; + + /** + * Sets the distance between the Y-axis and the left edge of the chart. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisExtent", optionValue: number): void; + + /** + * Gets the angle of rotation for the X-axis title. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitleAngle"): number; + + /** + * Sets the angle of rotation for the X-axis title. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitleAngle", optionValue: number): void; + + /** + * Gets the angle of rotation for the Y-axis title. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitleAngle"): number; + + /** + * Sets the angle of rotation for the Y-axis title. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitleAngle", optionValue: number): void; + + /** + * Gets whether to invert the direction of the X-axis by placing the first data items on the right side of the chart. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisInverted"): boolean; + + /** + * Sets whether to invert the direction of the X-axis by placing the first data items on the right side of the chart. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "xAxisInverted", optionValue: boolean): void; + + /** + * Gets whether to invert the direction of the Y-axis by placing the minimum numeric value at the top of the chart. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisInverted"): boolean; + + /** + * Sets whether to invert the direction of the Y-axis by placing the minimum numeric value at the top of the chart. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisInverted", optionValue: boolean): void; + + /** + * Gets Horizontal alignment of the X-axis title. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitleAlignment"): string; + + /** + * Sets Horizontal alignment of the X-axis title. + * + * @optionValue New value to be set. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "xAxisTitleAlignment", optionValue: string): void; + + /** + * Gets Vertical alignment of the Y-axis title. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitleAlignment"): string; + + /** + * Sets Vertical alignment of the Y-axis title. + * + * @optionValue New value to be set. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "yAxisTitleAlignment", optionValue: string): void; + + /** + * Gets Horizontal alignment of X-axis labels. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelHorizontalAlignment"): string; + + /** + * Sets Horizontal alignment of X-axis labels. + * + * @optionValue New value to be set. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelHorizontalAlignment", optionValue: string): void; + + /** + * Gets Horizontal alignment of Y-axis labels. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelHorizontalAlignment"): string; + + /** + * Sets Horizontal alignment of Y-axis labels. + * + * @optionValue New value to be set. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelHorizontalAlignment", optionValue: string): void; + + /** + * Gets Vertical alignment of X-axis labels. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelVerticalAlignment"): string; + + /** + * Sets Vertical alignment of X-axis labels. + * + * @optionValue New value to be set. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelVerticalAlignment", optionValue: string): void; + + /** + * Gets Vertical alignment of Y-axis labels. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelVerticalAlignment"): string; + + /** + * Sets Vertical alignment of Y-axis labels. + * + * @optionValue New value to be set. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelVerticalAlignment", optionValue: string): void; + + /** + * Gets Visibility of X-axis labels. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelVisibility"): string; + + /** + * Sets Visibility of X-axis labels. + * + * @optionValue New value to be set. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "xAxisLabelVisibility", optionValue: string): void; + + /** + * Gets Visibility of Y-axis labels. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelVisibility"): string; + + /** + * Sets Visibility of Y-axis labels. + * + * @optionValue New value to be set. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelVisibility", optionValue: string): void; + + /** + * The location of Y-axis labels, relative to the plot area. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelLocation"): string; + + /** + * The location of Y-axis labels, relative to the plot area. + * + * @optionValue New value to be set. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLabelLocation", optionValue: string): void; + igFinancialChart(optionLiteral: 'option', optionName: "rangeSelectorTemplate"): any; + igFinancialChart(optionLiteral: 'option', optionName: "rangeSelectorTemplate", optionValue: any): void; + igFinancialChart(optionLiteral: 'option', optionName: "toolbarTemplate"): any; + igFinancialChart(optionLiteral: 'option', optionName: "toolbarTemplate", optionValue: any): void; + igFinancialChart(optionLiteral: 'option', optionName: "chartTypePickerTemplate"): any; + igFinancialChart(optionLiteral: 'option', optionName: "chartTypePickerTemplate", optionValue: any): void; + igFinancialChart(optionLiteral: 'option', optionName: "trendLineTypePickerTemplate"): any; + igFinancialChart(optionLiteral: 'option', optionName: "trendLineTypePickerTemplate", optionValue: any): void; + igFinancialChart(optionLiteral: 'option', optionName: "volumeTypePickerTemplate"): any; + igFinancialChart(optionLiteral: 'option', optionName: "volumeTypePickerTemplate", optionValue: any): void; + igFinancialChart(optionLiteral: 'option', optionName: "indicatorPickerTemplate"): any; + igFinancialChart(optionLiteral: 'option', optionName: "indicatorPickerTemplate", optionValue: any): void; + igFinancialChart(optionLiteral: 'option', optionName: "overlayPickerTemplate"): any; + igFinancialChart(optionLiteral: 'option', optionName: "overlayPickerTemplate", optionValue: any): void; + igFinancialChart(optionLiteral: 'option', optionName: "toolbarHeight"): number; + igFinancialChart(optionLiteral: 'option', optionName: "toolbarHeight", optionValue: number): void; + + /** + * Gets whether the Y-axis should use a logarithmic scale instead of a linear one. + * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the Y-axis minimum is greater than zero. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisIsLogarithmic"): boolean; + + /** + * Sets whether the Y-axis should use a logarithmic scale instead of a linear one. + * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the Y-axis minimum is greater than zero. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisIsLogarithmic", optionValue: boolean): void; + + /** + * Gets the base value to use in the log function when mapping the position of data items along the Y-axis. + * This property is effective only when YAxisIsLogarithmic is true. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLogarithmBase"): number; + + /** + * Sets the base value to use in the log function when mapping the position of data items along the Y-axis. + * This property is effective only when YAxisIsLogarithmic is true. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisLogarithmBase", optionValue: number): void; + + /** + * Gets the distance between each label and grid line along the Y-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisInterval"): number; + + /** + * Sets the distance between each label and grid line along the Y-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisInterval", optionValue: number): void; + + /** + * Gets the data value corresponding to the minimum value of the Y-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisMinimumValue"): number; + + /** + * Sets the data value corresponding to the minimum value of the Y-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisMinimumValue", optionValue: number): void; + + /** + * Gets the data value corresponding to the maximum value of the Y-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisMaximumValue"): number; + + /** + * Sets the data value corresponding to the maximum value of the Y-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisMaximumValue", optionValue: number): void; + + /** + * Gets the frequency of displayed minor lines along the Y-axis. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisMinorInterval"): number; + + /** + * Sets the frequency of displayed minor lines along the Y-axis. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisMinorInterval", optionValue: number): void; + + /** + * The type of series to display in the volume pane. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "volumeType"): string; + + /** + * The type of series to display in the volume pane. + * + * @optionValue New value to be set. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "volumeType", optionValue: string): void; + + /** + * The scaling mode of the X-axis. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "xAxisMode"): string; + + /** + * The scaling mode of the X-axis. + * + * @optionValue New value to be set. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "xAxisMode", optionValue: string): void; + + /** + * The scaling mode of the Y-axis. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "yAxisMode"): string; + + /** + * The scaling mode of the Y-axis. + * + * @optionValue New value to be set. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "yAxisMode", optionValue: string): void; + + /** + * A boolean property controlling the visibility of the toolbar. + */ + igFinancialChart(optionLiteral: 'option', optionName: "isToolbarVisible"): boolean; + + /** + * A boolean property controlling the visibility of the toolbar. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "isToolbarVisible", optionValue: boolean): void; + + /** + * The type of price series to display in the main chart. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "chartType"): string; + + /** + * The type of price series to display in the main chart. + * + * @optionValue New value to be set. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "chartType", optionValue: string): void; + + /** + * A boolean indicating whether the chart should automatically zoom in vertically on the currently visible range of data. + * When this property is set to true, panning and zooming along the X-axis will result in a corresponding zoom on the Y-axis, so that the visible range of data fills the zoom window as fully as possible. + */ + igFinancialChart(optionLiteral: 'option', optionName: "isWindowSyncedToVisibleRange"): boolean; + + /** + * A boolean indicating whether the chart should automatically zoom in vertically on the currently visible range of data. + * When this property is set to true, panning and zooming along the X-axis will result in a corresponding zoom on the Y-axis, so that the visible range of data fills the zoom window as fully as possible. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "isWindowSyncedToVisibleRange", optionValue: boolean): void; + + /** + * A collection indicating what financial indicator types to display on the Financial Chart. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorTypes"): any; + + /** + * A collection indicating what financial indicator types to display on the Financial Chart. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorTypes", optionValue: any): void; + + /** + * A collection indicating what financial overlay types to display on the Financial Chart. + */ + igFinancialChart(optionLiteral: 'option', optionName: "overlayTypes"): any; + + /** + * A collection indicating what financial overlay types to display on the Financial Chart. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "overlayTypes", optionValue: any): void; + + /** + * Gets whether the large numbers on the Y-axis labels are abbreviated. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisAbbreviateLargeNumbers"): boolean; + + /** + * Sets whether the large numbers on the Y-axis labels are abbreviated. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "yAxisAbbreviateLargeNumbers", optionValue: boolean): void; + + /** + * The type of series to display in the zoom slider pane. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "zoomSliderType"): string; + + /** + * The type of series to display in the zoom slider pane. + * + * @optionValue New value to be set. + */ + + igFinancialChart(optionLiteral: 'option', optionName: "zoomSliderType", optionValue: string): void; + + /** + * Gets the palette used for coloring negative items of Waterfall chart type. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igFinancialChart(optionLiteral: 'option', optionName: "negativeBrushes"): any; + + /** + * Sets the palette used for coloring negative items of Waterfall chart type. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "negativeBrushes", optionValue: any): void; + + /** + * Brushes to use for drawing negative elements, when using a chart type with contextual coloring, such as Waterfall. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igFinancialChart(optionLiteral: 'option', optionName: "negativeOutlines"): any; + + /** + * Brushes to use for drawing negative elements, when using a chart type with contextual coloring, such as Waterfall. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "negativeOutlines", optionValue: any): void; + + /** + * Brushes to use for filling financial overlays. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igFinancialChart(optionLiteral: 'option', optionName: "overlayBrushes"): any; + + /** + * Brushes to use for filling financial overlays. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "overlayBrushes", optionValue: any): void; + + /** + * Brushes to use for outlining financial overlays. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igFinancialChart(optionLiteral: 'option', optionName: "overlayOutlines"): any; + + /** + * Brushes to use for outlining financial overlays. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "overlayOutlines", optionValue: any): void; + + /** + * Brushes to use for outlining volume series in the volume pane. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igFinancialChart(optionLiteral: 'option', optionName: "volumeOutlines"): any; + + /** + * Brushes to use for outlining volume series in the volume pane. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "volumeOutlines", optionValue: any): void; + + /** + * Brushes to use for filling volume series in the volume pane. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igFinancialChart(optionLiteral: 'option', optionName: "volumeBrushes"): any; + + /** + * Brushes to use for filling volume series in the volume pane. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "volumeBrushes", optionValue: any): void; + + /** + * Brushes to use for negative elements in financial indicators. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorNegativeBrushes"): any; + + /** + * Brushes to use for negative elements in financial indicators. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorNegativeBrushes", optionValue: any): void; + + /** + * Brushes to use for financial indicators. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorBrushes"): any; + + /** + * Brushes to use for financial indicators. + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorBrushes", optionValue: any): void; + + /** + * The outline thickness of volume series in the volume pane. + */ + igFinancialChart(optionLiteral: 'option', optionName: "volumeThickness"): number; + + /** + * The outline thickness of volume series in the volume pane. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "volumeThickness", optionValue: number): void; + + /** + * The outline thickness of financial overlays. + */ + igFinancialChart(optionLiteral: 'option', optionName: "overlayThickness"): number; + + /** + * The outline thickness of financial overlays. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "overlayThickness", optionValue: number): void; + + /** + * The outline or stroke thickness of financial indicators. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorThickness"): number; + + /** + * The outline or stroke thickness of financial indicators. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorThickness", optionValue: number): void; + + /** + * The display types of financial indicators. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorDisplayTypes"): any; + + /** + * The display types of financial indicators. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorDisplayTypes", optionValue: any): void; + + /** + * The period of financial indicators, where applicable. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorPeriod"): number; + + /** + * The period of financial indicators, where applicable. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorPeriod", optionValue: number): void; + + /** + * The multiplier of financial indicators, where applicable. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorMultiplier"): number; + + /** + * The multiplier of financial indicators, where applicable. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorMultiplier", optionValue: number): void; + + /** + * The smoothing period of financial indicators, where applicable. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorSmoothingPeriod"): number; + + /** + * The smoothing period of financial indicators, where applicable. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorSmoothingPeriod", optionValue: number): void; + + /** + * The short period of financial indicators, where applicable. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorShortPeriod"): number; + + /** + * The short period of financial indicators, where applicable. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorShortPeriod", optionValue: number): void; + + /** + * The long period of financial indicators, where applicable. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorLongPeriod"): number; + + /** + * The long period of financial indicators, where applicable. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorLongPeriod", optionValue: number): void; + + /** + * The signal period of financial indicators, where applicable. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorSignalPeriod"): number; + + /** + * The signal period of financial indicators, where applicable. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "indicatorSignalPeriod", optionValue: number): void; + + /** + * A FinancialChartRangeSelectorOptionCollection containing the available range selector options on the toolbar. + */ + igFinancialChart(optionLiteral: 'option', optionName: "rangeSelectorOptions"): any; + + /** + * A FinancialChartRangeSelectorOptionCollection containing the available range selector options on the toolbar. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "rangeSelectorOptions", optionValue: any): void; + + /** + * A FinancialChartRangeSelectorOptionCollection containing the available range selector options on the toolbar. + * This will be the intersection of the user-defined range selector options, if any, and the range selector options which are automatically determined based on the range of data. + */ + igFinancialChart(optionLiteral: 'option', optionName: "actualRangeSelectorOptions"): any; + + /** + * A FinancialChartRangeSelectorOptionCollection containing the available range selector options on the toolbar. + * This will be the intersection of the user-defined range selector options, if any, and the range selector options which are automatically determined based on the range of data. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "actualRangeSelectorOptions", optionValue: any): void; + + /** + * The names of custom indicators to add to the chart. + * When CustomIndicatorNames is set, the ApplyCustomIndicators event will be raised for each custom indicator name. + */ + igFinancialChart(optionLiteral: 'option', optionName: "customIndicatorNames"): any; + + /** + * The names of custom indicators to add to the chart. + * When CustomIndicatorNames is set, the ApplyCustomIndicators event will be raised for each custom indicator name. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "customIndicatorNames", optionValue: any): void; + + /** + * The width of the chart. + */ + igFinancialChart(optionLiteral: 'option', optionName: "width"): number; + + /** + * The width of the chart. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "width", optionValue: number): void; + + /** + * The height of the chart. + */ + igFinancialChart(optionLiteral: 'option', optionName: "height"): number; + + /** + * The height of the chart. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "height", optionValue: number): void; + + /** + * Gets maximum number of displayed records in chart. + */ + igFinancialChart(optionLiteral: 'option', optionName: "maxRecCount"): number; + + /** + * Sets maximum number of displayed records in chart. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "maxRecCount", optionValue: number): void; + + /** + * Gets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + */ + igFinancialChart(optionLiteral: 'option', optionName: "dataSource"): any; + + /** + * Sets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; + + /** + * Gets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + */ + igFinancialChart(optionLiteral: 'option', optionName: "dataSourceType"): string; + + /** + * Sets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; + + /** + * Gets url which is used for sending JSON on request for remote data. + */ + igFinancialChart(optionLiteral: 'option', optionName: "dataSourceUrl"): string; + + /** + * Sets url which is used for sending JSON on request for remote data. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "dataSourceUrl", optionValue: string): void; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + */ + igFinancialChart(optionLiteral: 'option', optionName: "responseTotalRecCountKey"): string; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "responseTotalRecCountKey", optionValue: string): void; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + */ + igFinancialChart(optionLiteral: 'option', optionName: "responseDataKey"): string; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; + + /** + * Event raised when a property value is changed on this chart + */ + igFinancialChart(optionLiteral: 'option', optionName: "propertyChanged"): PropertyChangedEvent; + + /** + * Event raised when a property value is changed on this chart + * + * @optionValue Define event handler function. + */ + igFinancialChart(optionLiteral: 'option', optionName: "propertyChanged", optionValue: PropertyChangedEvent): void; + + /** + * Event raised when a series is initialized and added to this chart. + */ + igFinancialChart(optionLiteral: 'option', optionName: "seriesAdded"): SeriesAddedEvent; + + /** + * Event raised when a series is initialized and added to this chart. + * + * @optionValue Define event handler function. + */ + igFinancialChart(optionLiteral: 'option', optionName: "seriesAdded", optionValue: SeriesAddedEvent): void; + + /** + * Event raised when a series is removed from this chart. + */ + igFinancialChart(optionLiteral: 'option', optionName: "seriesRemoved"): SeriesRemovedEvent; + + /** + * Event raised when a series is removed from this chart. + * + * @optionValue Define event handler function. + */ + igFinancialChart(optionLiteral: 'option', optionName: "seriesRemoved", optionValue: SeriesRemovedEvent): void; + + /** + * Occurs when the pointer enters a Series. + */ + igFinancialChart(optionLiteral: 'option', optionName: "seriesPointerEnter"): SeriesPointerEnterEvent; + + /** + * Occurs when the pointer enters a Series. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "seriesPointerEnter", optionValue: SeriesPointerEnterEvent): void; + + /** + * Occurs when the pointer leaves a Series. + */ + igFinancialChart(optionLiteral: 'option', optionName: "seriesPointerLeave"): SeriesPointerLeaveEvent; + + /** + * Occurs when the pointer leaves a Series. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "seriesPointerLeave", optionValue: SeriesPointerLeaveEvent): void; + + /** + * Occurs when the pointer moves over a Series. + */ + igFinancialChart(optionLiteral: 'option', optionName: "seriesPointerMove"): SeriesPointerMoveEvent; + + /** + * Occurs when the pointer moves over a Series. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "seriesPointerMove", optionValue: SeriesPointerMoveEvent): void; + + /** + * Occurs when the pointer is pressed down over a Series. + */ + igFinancialChart(optionLiteral: 'option', optionName: "seriesPointerDown"): SeriesPointerDownEvent; + + /** + * Occurs when the pointer is pressed down over a Series. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "seriesPointerDown", optionValue: SeriesPointerDownEvent): void; + + /** + * Occurs when the pointer is released over a Series. + */ + igFinancialChart(optionLiteral: 'option', optionName: "seriesPointerUp"): SeriesPointerUpEvent; + + /** + * Occurs when the pointer is released over a Series. + * + * @optionValue New value to be set. + */ + igFinancialChart(optionLiteral: 'option', optionName: "seriesPointerUp", optionValue: SeriesPointerUpEvent): void; + + /** + * Event raised by the chart when custom indicator data is needed from the application. + * During series rendering, event will be raised once for each value in the CustomIndicatorNames collection. + */ + igFinancialChart(optionLiteral: 'option', optionName: "applyCustomIndicators"): ApplyCustomIndicatorsEvent; + + /** + * Event raised by the chart when custom indicator data is needed from the application. + * During series rendering, event will be raised once for each value in the CustomIndicatorNames collection. + * + * @optionValue Define event handler function. + */ + igFinancialChart(optionLiteral: 'option', optionName: "applyCustomIndicators", optionValue: ApplyCustomIndicatorsEvent): void; + + /** + * Event which is raised before data binding. + * Return false in order to cancel data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + igFinancialChart(optionLiteral: 'option', optionName: "dataBinding"): DataBindingEvent; + + /** + * Event which is raised before data binding. + * Return false in order to cancel data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + * + * @optionValue Define event handler function. + */ + igFinancialChart(optionLiteral: 'option', optionName: "dataBinding", optionValue: DataBindingEvent): void; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + igFinancialChart(optionLiteral: 'option', optionName: "dataBound"): DataBoundEvent; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + * + * @optionValue Define event handler function. + */ + igFinancialChart(optionLiteral: 'option', optionName: "dataBound", optionValue: DataBoundEvent): void; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + */ + igFinancialChart(optionLiteral: 'option', optionName: "updateTooltip"): UpdateTooltipEvent; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + * + * @optionValue Define event handler function. + */ + igFinancialChart(optionLiteral: 'option', optionName: "updateTooltip", optionValue: UpdateTooltipEvent): void; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + */ + igFinancialChart(optionLiteral: 'option', optionName: "hideTooltip"): HideTooltipEvent; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + * + * @optionValue Define event handler function. + */ + igFinancialChart(optionLiteral: 'option', optionName: "hideTooltip", optionValue: HideTooltipEvent): void; + igFinancialChart(options: IgFinancialChart): JQuery; + igFinancialChart(optionLiteral: 'option', optionName: string): any; + igFinancialChart(optionLiteral: 'option', options: IgFinancialChart): JQuery; + igFinancialChart(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igFinancialChart(methodName: string, ...methodParams: any[]): any; +} interface SliceClickedEvent { (event: Event, ui: SliceClickedEventUIParam): void; } @@ -37104,6 +42931,7 @@ interface JQuery { interface IgGridAppendRowsOnDemandLocale { /** * Specifies caption text for the "load more data" button. + * */ loadMoreDataButtonText?: string; @@ -37164,6 +42992,7 @@ interface IgGridAppendRowsOnDemand { /** * Defines local or remote type of appending rows on demand in igGrid * + * * Valid values: * "remote" request data from the remote endpoint * "local" loading data on the client-side @@ -37172,37 +43001,44 @@ interface IgGridAppendRowsOnDemand { /** * Default number of records per chunk + * */ chunkSize?: number; /** * The property in the response that will hold the total number of records in the data source + * */ recordCountKey?: string; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested chunk size + * */ chunkSizeUrlKey?: string; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested chunk index + * */ chunkIndexUrlKey?: string; /** * Initial chunk index position + * */ defaultChunkIndex?: number; /** * Current chunk index position + * */ currentChunkIndex?: number; /** * denotes the append rows on demand request method * + * * Valid values: * "auto" new record will be appended to the grid while the user scrolls the scrollbar * "button" a button will be rendered at the bottom of the grid. The user should press it to load more rows @@ -37253,6 +43089,7 @@ interface JQuery { /** * Defines local or remote type of appending rows on demand in igGrid + * */ igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "type"): string; @@ -37260,6 +43097,7 @@ interface JQuery { /** * Defines local or remote type of appending rows on demand in igGrid * + * * @optionValue New value to be set. */ @@ -37267,78 +43105,91 @@ interface JQuery { /** * Default number of records per chunk + * */ igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "chunkSize"): number; /** * Default number of records per chunk * + * * @optionValue New value to be set. */ igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "chunkSize", optionValue: number): void; /** * The property in the response that will hold the total number of records in the data source + * */ igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "recordCountKey"): string; /** * The property in the response that will hold the total number of records in the data source * + * * @optionValue New value to be set. */ igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "recordCountKey", optionValue: string): void; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested chunk size + * */ igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "chunkSizeUrlKey"): string; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested chunk size * + * * @optionValue New value to be set. */ igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "chunkSizeUrlKey", optionValue: string): void; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested chunk index + * */ igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "chunkIndexUrlKey"): string; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested chunk index * + * * @optionValue New value to be set. */ igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "chunkIndexUrlKey", optionValue: string): void; /** * Initial chunk index position + * */ igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "defaultChunkIndex"): number; /** * Initial chunk index position * + * * @optionValue New value to be set. */ igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "defaultChunkIndex", optionValue: number): void; /** * Current chunk index position + * */ igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "currentChunkIndex"): number; /** * Current chunk index position * + * * @optionValue New value to be set. */ igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "currentChunkIndex", optionValue: number): void; /** * Denotes the append rows on demand request method + * */ igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "loadTrigger"): string; @@ -37346,6 +43197,7 @@ interface JQuery { /** * Denotes the append rows on demand request method * + * * @optionValue New value to be set. */ @@ -37401,17 +43253,20 @@ interface JQuery { interface IgGridCellMergingColumnSetting { /** * Column index. This is a required property in every column setting if columnKey is not set. + * */ columnIndex?: number; /** * Column key. This is a required property in every column setting if columnIndex is not set. + * */ columnKey?: string; /** * Defines when merging should be applied. * + * * Valid values: * "sorting" The column will only be merged when sorted * "always" The column will always be merged @@ -37422,6 +43277,7 @@ interface IgGridCellMergingColumnSetting { /** * Defines the rules merging is based on. * + * * Valid values: * "duplicate" Duplicate values in the column will be merged together. * "null" Merging will be applied for each subsequent null value after a non-null value. @@ -37525,6 +43381,7 @@ interface IgGridCellMerging { /** * Defines the type of merging. * + * * Valid values: * "visual" the grid cells will be merged only visually * "physical" the grid cell will be merged physically throughout rowspan @@ -37534,6 +43391,7 @@ interface IgGridCellMerging { /** * Defines when merging should be applied. * + * * Valid values: * "sorting" Only sorted columns will have merging applied * "always" Merging will be applied to all columns always @@ -37544,6 +43402,7 @@ interface IgGridCellMerging { /** * Defines the rules merging is based on. * + * * Valid values: * "duplicate" Duplicate values in the column will be merged together. * "null" Merging will be applied for each subsequent null value after a non-null value. @@ -37552,6 +43411,7 @@ interface IgGridCellMerging { /** * A list of column settings that specifies hiding options on a per column basis. + * */ columnSettings?: IgGridCellMergingColumnSetting[]; @@ -37560,6 +43420,24 @@ interface IgGridCellMerging { */ inherit?: boolean; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event fired before a new merged cells group is created. */ @@ -37572,6 +43450,9 @@ interface IgGridCellMerging { [optionName: string]: any; } interface IgGridCellMergingMethods { + changeGlobalLanguage(): void; + changeGlobalRegional(): void; + /** * Removes all igGridCellMerging UI changes and destroys the widget */ @@ -37598,19 +43479,31 @@ interface IgGridCellMergingMethods { * @param column The column index or column key to get the state for. */ isMerged(column: Object): boolean; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; } interface JQuery { data(propertyName: "igGridCellMerging"): IgGridCellMergingMethods; } interface JQuery { + igGridCellMerging(methodName: "changeGlobalLanguage"): void; + igGridCellMerging(methodName: "changeGlobalRegional"): void; igGridCellMerging(methodName: "destroy"): void; igGridCellMerging(methodName: "mergeColumn", column: Object, raiseEvents: boolean): string; igGridCellMerging(methodName: "unmergeColumn", column: Object): string; igGridCellMerging(methodName: "isMerged", column: Object): boolean; + igGridCellMerging(methodName: "changeLocale", $container: Object): void; /** * Defines the type of merging. + * */ igGridCellMerging(optionLiteral: 'option', optionName: "mergeType"): string; @@ -37618,6 +43511,7 @@ interface JQuery { /** * Defines the type of merging. * + * * @optionValue New value to be set. */ @@ -37625,6 +43519,7 @@ interface JQuery { /** * Defines when merging should be applied. + * */ igGridCellMerging(optionLiteral: 'option', optionName: "mergeOn"): string; @@ -37632,6 +43527,7 @@ interface JQuery { /** * Defines when merging should be applied. * + * * @optionValue New value to be set. */ @@ -37639,6 +43535,7 @@ interface JQuery { /** * Defines the rules merging is based on. + * */ igGridCellMerging(optionLiteral: 'option', optionName: "mergeStrategy"): string|Function; @@ -37646,6 +43543,7 @@ interface JQuery { /** * Defines the rules merging is based on. * + * * @optionValue New value to be set. */ @@ -37653,12 +43551,14 @@ interface JQuery { /** * A list of column settings that specifies hiding options on a per column basis. + * */ igGridCellMerging(optionLiteral: 'option', optionName: "columnSettings"): IgGridCellMergingColumnSetting[]; /** * A list of column settings that specifies hiding options on a per column basis. * + * * @optionValue New value to be set. */ igGridCellMerging(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridCellMergingColumnSetting[]): void; @@ -37675,6 +43575,50 @@ interface JQuery { */ igGridCellMerging(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igGridCellMerging(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igGridCellMerging(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igGridCellMerging(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igGridCellMerging(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igGridCellMerging(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igGridCellMerging(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event fired before a new merged cells group is created. */ @@ -37697,53 +43641,25 @@ interface JQuery { interface IgGridColumnFixingLocale { /** * Specifies the tooltip text on the column fixing header icon when column is not fixed. - * ``` - * //Initialize - * $(".selector").%%ParentWidgetName%%({ - * features: [ - * { - * name : "ColumnFixing", - * locale: { headerFixButtonText : "Click to fix this column"} - * } - * ] - * }); * - * //Get - * var headerFixButtonText = $(".selector").%%WidgetName%%("option", "locale").headerFixButtonText; - * - * //Set - * $(".selector").%%WidgetName%%("option", "locale", { headerFixButtonText : "Click to fix this column"}); */ headerFixButtonText?: string; /** * Specifies the tooltip text on the column fixing header icon when column is not fixed. - * ``` - * //Initialize - * $(".selector").%%ParentWidgetName%%({ - * features: [ - * { - * name : "ColumnFixing", - * locale: { headerUnfixButtonText : "Click to unfix this column"} - * } - * ] - * }); * - * //Get - * var headerUnfixButtonText = $(".selector").%%WidgetName%%("option", "locale").headerUnfixButtonText; - * - * //Set - * $(".selector").%%WidgetName%%("option", "locale", { headerUnfixButtonText : "Click to unfix this column"}); */ headerUnfixButtonText?: string; /** * Text of the feature chooser button for fixing a currently unfixed column. + * */ featureChooserTextFixedColumn?: string; /** * Text of the feature chooser button for unfixing a currently fixed column. + * */ featureChooserTextUnfixedColumn?: string; @@ -37756,21 +43672,25 @@ interface IgGridColumnFixingLocale { interface IgGridColumnFixingColumnSetting { /** * Identifies the grid column by key. Either key or index must be set in every column setting. + * */ columnKey?: string; /** * Identifies the grid column by index. Either key or index must be set in every column setting. + * */ columnIndex?: number; /** * Specifies whether the column can be fixed or not. If allow fixing is false, then the fixing pin will not be rendered for the column. + * */ allowFixing?: boolean; /** * Specifies whether the column is initially fixed or not. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#initial-state) out for more information. + * */ isFixed?: boolean; @@ -37944,22 +43864,26 @@ interface IgGridColumnFixing { /** * Specifies whether to show the column fixing buttons in header cells/feature chooser. + * */ showFixButtons?: boolean; /** * Enable row height sync for the fixed and unfixed portion of the grid. If you're observing row misalignment, please refer to [this article](http://www.igniteui.com/help/iggrid-known-issues#misalignment-ie9). + * */ syncRowHeights?: boolean; /** * Scroll delta in pixels when scrolling with the mouse wheel or the keyboard in the fixed columns area of the grid. + * */ scrollDelta?: number; /** * Configures which side the fixed columns of the grid will be rendered on. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#direction) out of more information. * + * * Valid values: * "left" Fixed columns are rendered on the left side of the main grid. * "right" Fixed columns are rendered on the right side of the main grid. @@ -37968,12 +43892,14 @@ interface IgGridColumnFixing { /** * List of column settings that specifies custom column fixing options on a per column basis. + * */ columnSettings?: IgGridColumnFixingColumnSetting[]; /** * Minimal visible area in pixels for the unfixed columns. If the end user tries to fix a column(or columns), which causes the width of the fixed columns to grow such that the width of visible area of unfixed columns is less than this option then fixing will be canceled. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#non-fixable-min-width) out for more information. * + * * Valid values: * "string" The width can be set in pixels (px) and percentage (%). * "number" The width can be set in pixels as a number. @@ -37982,6 +43908,7 @@ interface IgGridColumnFixing { /** * Specify initial fixing of all non data columns. Non-data columns are columns in the grid rendered for specific features, like the row selectors feature. The column containing the row numbering is such a column. This option is applicable when [fixingDirection](ui.iggridcolumnfixing#options:fixingDirection) is set to left. For a full column fixing configuration summary please refer to [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#configuration-summary). + * */ fixNondataColumns?: boolean; @@ -37990,6 +43917,18 @@ interface IgGridColumnFixing { */ populateDataRowsAttributes?: boolean; + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event which is fired when column fixing operation is initiated. */ @@ -38026,6 +43965,9 @@ interface IgGridColumnFixing { [optionName: string]: any; } interface IgGridColumnFixingMethods { + changeGlobalLanguage(): void; + changeGlobalRegional(): void; + /** * Unfixes a column by specified column identifier - column key or column index. * @@ -38047,6 +43989,11 @@ interface IgGridColumnFixingMethods { * @param clearRowsHeights Clears row heigths for all visible rows. */ syncHeights(check?: boolean, clearRowsHeights?: boolean): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.iggridcolumnfixing#options:language) + * Note that this method is for rare scenarios, see [language](ui.iggridcolumnfixing#options:language) or [locale](ui.iggridcolumnfixing#options:locale) option setter + */ changeLocale(): void; /** @@ -38131,6 +44078,8 @@ interface JQuery { } interface JQuery { + igGridColumnFixing(methodName: "changeGlobalLanguage"): void; + igGridColumnFixing(methodName: "changeGlobalRegional"): void; igGridColumnFixing(methodName: "unfixColumn", colIdentifier: Object, target?: string, after?: boolean): Object; igGridColumnFixing(methodName: "checkAndSyncHeights"): void; igGridColumnFixing(methodName: "syncHeights", check?: boolean, clearRowsHeights?: boolean): void; @@ -38208,42 +44157,49 @@ interface JQuery { /** * Gets whether to show the column fixing buttons in header cells/feature chooser. + * */ igGridColumnFixing(optionLiteral: 'option', optionName: "showFixButtons"): boolean; /** * Sets whether to show the column fixing buttons in header cells/feature chooser. * + * * @optionValue New value to be set. */ igGridColumnFixing(optionLiteral: 'option', optionName: "showFixButtons", optionValue: boolean): void; /** * Enable row height sync for the fixed and unfixed portion of the grid. If you're observing row misalignment, please refer to [this article](http://www.igniteui.com/help/iggrid-known-issues#misalignment-ie9). + * */ igGridColumnFixing(optionLiteral: 'option', optionName: "syncRowHeights"): boolean; /** * Enable row height sync for the fixed and unfixed portion of the grid. If you're observing row misalignment, please refer to [this article](http://www.igniteui.com/help/iggrid-known-issues#misalignment-ie9). * + * * @optionValue New value to be set. */ igGridColumnFixing(optionLiteral: 'option', optionName: "syncRowHeights", optionValue: boolean): void; /** * Scroll delta in pixels when scrolling with the mouse wheel or the keyboard in the fixed columns area of the grid. + * */ igGridColumnFixing(optionLiteral: 'option', optionName: "scrollDelta"): number; /** * Scroll delta in pixels when scrolling with the mouse wheel or the keyboard in the fixed columns area of the grid. * + * * @optionValue New value to be set. */ igGridColumnFixing(optionLiteral: 'option', optionName: "scrollDelta", optionValue: number): void; /** * Configures which side the fixed columns of the grid will be rendered on. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#direction) out of more information. + * */ igGridColumnFixing(optionLiteral: 'option', optionName: "fixingDirection"): string; @@ -38251,6 +44207,7 @@ interface JQuery { /** * Configures which side the fixed columns of the grid will be rendered on. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#direction) out of more information. * + * * @optionValue New value to be set. */ @@ -38258,18 +44215,21 @@ interface JQuery { /** * List of column settings that specifies custom column fixing options on a per column basis. + * */ igGridColumnFixing(optionLiteral: 'option', optionName: "columnSettings"): IgGridColumnFixingColumnSetting[]; /** * List of column settings that specifies custom column fixing options on a per column basis. * + * * @optionValue New value to be set. */ igGridColumnFixing(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridColumnFixingColumnSetting[]): void; /** * Minimal visible area in pixels for the unfixed columns. If the end user tries to fix a column(or columns), which causes the width of the fixed columns to grow such that the width of visible area of unfixed columns is less than this option then fixing will be canceled. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#non-fixable-min-width) out for more information. + * */ igGridColumnFixing(optionLiteral: 'option', optionName: "minimalVisibleAreaWidth"): string|number; @@ -38277,6 +44237,7 @@ interface JQuery { /** * Minimal visible area in pixels for the unfixed columns. If the end user tries to fix a column(or columns), which causes the width of the fixed columns to grow such that the width of visible area of unfixed columns is less than this option then fixing will be canceled. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#non-fixable-min-width) out for more information. * + * * @optionValue New value to be set. */ @@ -38284,12 +44245,14 @@ interface JQuery { /** * Specify initial fixing of all non data columns. Non-data columns are columns in the grid rendered for specific features, like the row selectors feature. The column containing the row numbering is such a column. This option is applicable when [fixingDirection](ui.iggridcolumnfixing#options:fixingDirection) is set to left. For a full column fixing configuration summary please refer to [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#configuration-summary). + * */ igGridColumnFixing(optionLiteral: 'option', optionName: "fixNondataColumns"): boolean; /** * Specify initial fixing of all non data columns. Non-data columns are columns in the grid rendered for specific features, like the row selectors feature. The column containing the row numbering is such a column. This option is applicable when [fixingDirection](ui.iggridcolumnfixing#options:fixingDirection) is set to left. For a full column fixing configuration summary please refer to [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#configuration-summary). * + * * @optionValue New value to be set. */ igGridColumnFixing(optionLiteral: 'option', optionName: "fixNondataColumns", optionValue: boolean): void; @@ -38306,6 +44269,36 @@ interface JQuery { */ igGridColumnFixing(optionLiteral: 'option', optionName: "populateDataRowsAttributes", optionValue: boolean): void; + /** + * Set/Get the locale language setting for the widget. + * + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igGridColumnFixing(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igGridColumnFixing(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event which is fired when column fixing operation is initiated. */ @@ -38386,16 +44379,19 @@ interface JQuery { interface IgGridColumnMovingColumnSetting { /** * Column key. This is a required property in every column setting if columnIndex is not set. + * */ columnKey?: string; /** * Column index. Can be used in place of column key. The preferred way of populating a column setting is to always use the column keys as identifiers. + * */ columnIndex?: number; /** * Allows the column to be moved. + * */ allowMoving?: boolean; @@ -38408,71 +44404,85 @@ interface IgGridColumnMovingColumnSetting { interface IgGridColumnMovingLocale { /** * Specifies the apply button text. + * */ movingDialogButtonApplyText?: string; /** * Specifies the cancel button text. + * */ movingDialogButtonCancelText?: string; /** * Specifies caption for each move down button in the column moving dialog. + * */ movingDialogCaptionButtonDesc?: string; /** * Specifies caption for each move up button in the column moving dialog. + * */ movingDialogCaptionButtonAsc?: string; /** * Specifies caption text for the column moving dialog. + * */ movingDialogCaptionText?: string; /** * Specifies caption text for the feature chooser entry. + * */ movingDialogDisplayText?: string; /** * Specifies text for drop tooltip in column moving dialog. + * */ movingDialogDropTooltipText?: string; /** * Specifies title for close dialog button. + * */ movingDialogCloseButtonTitle?: string; /** * Specifies caption for the move left dropdown button. + * */ dropDownMoveLeftText?: string; /** * Specifies caption for the move right dropdown button. + * */ dropDownMoveRightText?: string; /** * Specifies caption for the move first dropdown button. + * */ dropDownMoveFirstText?: string; /** * Specifies caption for the move last dropdown button. + * */ dropDownMoveLastText?: string; /** * Specifies tooltip text for the move indicator. + * */ movingToolTipMove?: string; /** * Specifies caption text for the feature chooser submenu button. + * */ featureChooserSubmenuText?: string; @@ -38751,12 +44761,14 @@ interface MovingDialogDragColumnMovedEventUIParam { interface IgGridColumnMoving { /** * A list of column settings that specifies moving options on a per column basis. + * */ columnSettings?: IgGridColumnMovingColumnSetting[]; /** * Specify the drag-and-drop mode for the feature * + * * Valid values: * "immediate" Column headers will rearange as you drag with a space opening under the cursor for the header to be dropped on * "deferred" A clone of the header dragged will be created and indicators will be shown between columns to help navigate the drop. @@ -38766,6 +44778,7 @@ interface IgGridColumnMoving { /** * Specify the way columns will be rearranged * + * * Valid values: * "dom" Columns will be rearranged through dom manipulation * "render" Columns will not be rearranged but the grid will be rendered again with the new column order. Please note this option is incompatible with immediate move mode. @@ -38774,47 +44787,56 @@ interface IgGridColumnMoving { /** * Specifies if header cells should include an additional button that opens a moving helper dropdown. + * */ addMovingDropdown?: boolean; /** * Specifies width of column moving dialog + * */ movingDialogWidth?: number; /** * Specifies height of column moving dialog + * */ movingDialogHeight?: number; /** * Specifies time in milliseconds for animation duration to show/hide modal dialog + * */ movingDialogAnimationDuration?: number; /** * Specifies the length (in pixels) between the dragged column and the column edges below which the move operation is accepted + * */ movingAcceptanceTolerance?: number; /** * Specifies the length (in pixels) between the dragged column and the grid edges below which horizontal scrolling occurs + * */ movingScrollTolerance?: number; /** * Specifies a multiplier for the delay between subsequent scroll operations. The larger this number is, the slower scrolling will appear to be. + * */ scrollSpeedMultiplier?: number; /** * Specifies the length (in pixels) of each individual scroll operation + * */ scrollDelta?: number; /** * Specifies whether the contents of the column being dragged will get hidden. The option is only * relevant in immediate moving mode. + * */ hideHeaderContentsDuringDrag?: boolean; @@ -38822,6 +44844,7 @@ interface IgGridColumnMoving { * Specifies the opacity of the drag markup, while a column header is being dragged. * The value must be between 0 and 1. When GroupBy is enabled, the corresponding option in the GroupBy configuration * will be used with priority over this one. + * */ dragHelperOpacity?: number; @@ -38894,6 +44917,7 @@ interface IgGridColumnMoving { /** * Specifies markup for drop tooltip in column moving dialog + * */ movingDialogDropTooltipMarkup?: string; @@ -38907,6 +44931,7 @@ interface IgGridColumnMoving { /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * */ dialogWidget?: string; @@ -38915,6 +44940,18 @@ interface IgGridColumnMoving { */ inherit?: boolean; + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event which is fired when a drag operation begins on a column header */ @@ -39001,6 +45038,13 @@ interface IgGridColumnMoving { [optionName: string]: any; } interface IgGridColumnMovingMethods { + changeGlobalLanguage(): void; + changeGlobalRegional(): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.iggridcolumnmoving#options:language) + * Note that this method is for rare scenarios, see [language](ui.iggridcolumnmoving#options:language) or [locale](ui.iggridcolumnmoving#options:locale) option setter + */ changeLocale(): void; /** @@ -39025,24 +45069,29 @@ interface JQuery { } interface JQuery { + igGridColumnMoving(methodName: "changeGlobalLanguage"): void; + igGridColumnMoving(methodName: "changeGlobalRegional"): void; igGridColumnMoving(methodName: "changeLocale"): void; igGridColumnMoving(methodName: "destroy"): void; igGridColumnMoving(methodName: "moveColumn", column: Object, target: Object, after?: boolean, inDom?: boolean, callback?: Function): void; /** * A list of column settings that specifies moving options on a per column basis. + * */ igGridColumnMoving(optionLiteral: 'option', optionName: "columnSettings"): IgGridColumnMovingColumnSetting[]; /** * A list of column settings that specifies moving options on a per column basis. * + * * @optionValue New value to be set. */ igGridColumnMoving(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridColumnMovingColumnSetting[]): void; /** * Specify the drag-and-drop mode for the feature + * */ igGridColumnMoving(optionLiteral: 'option', optionName: "mode"): string; @@ -39050,6 +45099,7 @@ interface JQuery { /** * Specify the drag-and-drop mode for the feature * + * * @optionValue New value to be set. */ @@ -39057,6 +45107,7 @@ interface JQuery { /** * Specify the way columns will be rearranged + * */ igGridColumnMoving(optionLiteral: 'option', optionName: "moveType"): string; @@ -39064,6 +45115,7 @@ interface JQuery { /** * Specify the way columns will be rearranged * + * * @optionValue New value to be set. */ @@ -39071,96 +45123,112 @@ interface JQuery { /** * Gets if header cells should include an additional button that opens a moving helper dropdown. + * */ igGridColumnMoving(optionLiteral: 'option', optionName: "addMovingDropdown"): boolean; /** * Sets if header cells should include an additional button that opens a moving helper dropdown. * + * * @optionValue New value to be set. */ igGridColumnMoving(optionLiteral: 'option', optionName: "addMovingDropdown", optionValue: boolean): void; /** * Gets width of column moving dialog + * */ igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogWidth"): number; /** * Sets width of column moving dialog * + * * @optionValue New value to be set. */ igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogWidth", optionValue: number): void; /** * Gets height of column moving dialog + * */ igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogHeight"): number; /** * Sets height of column moving dialog * + * * @optionValue New value to be set. */ igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogHeight", optionValue: number): void; /** * Gets time in milliseconds for animation duration to show/hide modal dialog + * */ igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogAnimationDuration"): number; /** * Sets time in milliseconds for animation duration to show/hide modal dialog * + * * @optionValue New value to be set. */ igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogAnimationDuration", optionValue: number): void; /** * Gets the length (in pixels) between the dragged column and the column edges below which the move operation is accepted + * */ igGridColumnMoving(optionLiteral: 'option', optionName: "movingAcceptanceTolerance"): number; /** * Sets the length (in pixels) between the dragged column and the column edges below which the move operation is accepted * + * * @optionValue New value to be set. */ igGridColumnMoving(optionLiteral: 'option', optionName: "movingAcceptanceTolerance", optionValue: number): void; /** * Gets the length (in pixels) between the dragged column and the grid edges below which horizontal scrolling occurs + * */ igGridColumnMoving(optionLiteral: 'option', optionName: "movingScrollTolerance"): number; /** * Sets the length (in pixels) between the dragged column and the grid edges below which horizontal scrolling occurs * + * * @optionValue New value to be set. */ igGridColumnMoving(optionLiteral: 'option', optionName: "movingScrollTolerance", optionValue: number): void; /** * Gets a multiplier for the delay between subsequent scroll operations. The larger this number is, the slower scrolling will appear to be. + * */ igGridColumnMoving(optionLiteral: 'option', optionName: "scrollSpeedMultiplier"): number; /** * Sets a multiplier for the delay between subsequent scroll operations. The larger this number is, the slower scrolling will appear to be. * + * * @optionValue New value to be set. */ igGridColumnMoving(optionLiteral: 'option', optionName: "scrollSpeedMultiplier", optionValue: number): void; /** * Gets the length (in pixels) of each individual scroll operation + * */ igGridColumnMoving(optionLiteral: 'option', optionName: "scrollDelta"): number; /** * Sets the length (in pixels) of each individual scroll operation * + * * @optionValue New value to be set. */ igGridColumnMoving(optionLiteral: 'option', optionName: "scrollDelta", optionValue: number): void; @@ -39168,6 +45236,7 @@ interface JQuery { /** * Gets whether the contents of the column being dragged will get hidden. The option is only * relevant in immediate moving mode. + * */ igGridColumnMoving(optionLiteral: 'option', optionName: "hideHeaderContentsDuringDrag"): boolean; @@ -39175,6 +45244,7 @@ interface JQuery { * Sets whether the contents of the column being dragged will get hidden. The option is only * relevant in immediate moving mode. * + * * @optionValue New value to be set. */ igGridColumnMoving(optionLiteral: 'option', optionName: "hideHeaderContentsDuringDrag", optionValue: boolean): void; @@ -39183,6 +45253,7 @@ interface JQuery { * Gets the opacity of the drag markup, while a column header is being dragged. * The value must be between 0 and 1. When GroupBy is enabled, the corresponding option in the GroupBy configuration * will be used with priority over this one. + * */ igGridColumnMoving(optionLiteral: 'option', optionName: "dragHelperOpacity"): number; @@ -39191,6 +45262,7 @@ interface JQuery { * The value must be between 0 and 1. When GroupBy is enabled, the corresponding option in the GroupBy configuration * will be used with priority over this one. * + * * @optionValue New value to be set. */ igGridColumnMoving(optionLiteral: 'option', optionName: "dragHelperOpacity", optionValue: number): void; @@ -39353,12 +45425,14 @@ interface JQuery { /** * Gets markup for drop tooltip in column moving dialog + * */ igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDropTooltipMarkup"): string; /** * Sets markup for drop tooltip in column moving dialog * + * * @optionValue New value to be set. */ igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDropTooltipMarkup", optionValue: string): void; @@ -39383,12 +45457,14 @@ interface JQuery { /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * */ igGridColumnMoving(optionLiteral: 'option', optionName: "dialogWidget"): string; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. * + * * @optionValue New value to be set. */ igGridColumnMoving(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; @@ -39405,6 +45481,36 @@ interface JQuery { */ igGridColumnMoving(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + /** + * Set/Get the locale language setting for the widget. + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igGridColumnMoving(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igGridColumnMoving(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event which is fired when a drag operation begins on a column header */ @@ -39732,6 +45838,7 @@ interface IgGridFeatureChooserPopover { /** * controls the direction in which the control shows relative to the target element * + * * Valid values: * "auto" lets the control show on the side where enough space is available with the priority specified by the [directionPriority](ui.%%WidgetNameLowered%%#options:directionPriority) property * "left" shows popover on the left side of the target element @@ -39744,12 +45851,14 @@ interface IgGridFeatureChooserPopover { /** * Controls the priority in which the control searches for space to show relative to the target element. * This property has effect only if the [direction](ui.%%WidgetNameLowered%%#options:direction) property value is "auto" or unset. + * */ directionPriority?: any[]; /** * controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area * + * * Valid values: * "auto" lets the control choose a position depending on available space with the following priority balanced > end > start * "balanced" the popover is positioned at the middle of the target element @@ -39760,37 +45869,44 @@ interface IgGridFeatureChooserPopover { /** * defines width for the popover. leave null for auto. + * */ width?: number|string; /** * defines height for the popover. leave null for auto + * */ height?: number|string; /** * defines width the popover won't go under the value even if no specific one is set. + * */ minWidth?: number|string; /** * defines width the popover won't exceed even if no specific one is set. + * */ maxWidth?: number|string; /** * defines height the popover won't exceed even if no specific one is set. + * */ maxHeight?: number|string; /** * Sets the time popover fades in and out when showing/hiding + * */ animationDuration?: number; /** * sets the content for the popover container. If left null the content will be get from the target. * + * * Valid values: * "string" String content of the popover container * "function" Function which is a callback that should return the content. Use the 'this' value to access the target DOM element. @@ -39799,17 +45915,20 @@ interface IgGridFeatureChooserPopover { /** * Selectors indicating which items should show popovers. The predefined value is [title]. Customize if you're using something other then the title attribute for the popover content, or if you need a different selector for event delegation. When changing this option, you likely need to also change the contentTemplate option + * */ selectors?: string; /** * Sets the content for the popover header + * */ headerTemplate?: IgPopoverHeaderTemplate; /** * sets the event on which the popover will be shown. Predefined values are "mouseenter", "click" and "focus" * + * * Valid values: * "mouseenter" the popover is shown on mouse enter in the target element * "click" the popover is shown on click on the target element @@ -39820,6 +45939,7 @@ interface IgGridFeatureChooserPopover { /** * Controls where the popover DOM should be attached to. * + * * Valid values: * "string" A valid jQuery selector for the element * "object" A reference to the parent jQuery object @@ -39957,6 +46077,24 @@ interface FeatureToggledEventUIParam {} interface IgGridFeatureChooser { dropDownWidth?: any; animationDuration?: number; + + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; featureChooserRendering?: FeatureChooserRenderingEvent; featureChooserRendered?: FeatureChooserRenderedEvent; featureChooserDropDownOpening?: FeatureChooserDropDownOpeningEvent; @@ -39972,6 +46110,11 @@ interface IgGridFeatureChooser { } interface IgGridFeatureChooserMethods { shouldShowFeatureIcon(key: Object): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.iggridfeaturechooser#options:language) + * Note that this method is for rare scenarios, see [language](ui.iggridfeaturechooser#options:language) or [locale](ui.iggridfeaturechooser#options:locale) option setter + */ changeLocale(): void; /** @@ -40002,6 +46145,16 @@ interface IgGridFeatureChooserMethods { */ toggleDropDown(columnKey: string): void; destroy(e: Object, args: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igGridFeatureChooser"): IgGridFeatureChooserMethods; @@ -40031,6 +46184,7 @@ interface JQuery { /** * Controls the direction in which the control shows relative to the target element + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "direction"): string; @@ -40038,6 +46192,7 @@ interface JQuery { /** * Controls the direction in which the control shows relative to the target element * + * * @optionValue New value to be set. */ @@ -40046,6 +46201,7 @@ interface JQuery { /** * Controls the priority in which the control searches for space to show relative to the target element. * This property has effect only if the [direction](ui.%%WidgetNameLowered%%#options:direction) property value is "auto" or unset. + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "directionPriority"): any[]; @@ -40053,12 +46209,14 @@ interface JQuery { * Controls the priority in which the control searches for space to show relative to the target element. * This property has effect only if the [direction](ui.%%WidgetNameLowered%%#options:direction) property value is "auto" or unset. * + * * @optionValue New value to be set. */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "directionPriority", optionValue: any[]): void; /** * Controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "position"): string; @@ -40066,6 +46224,7 @@ interface JQuery { /** * Controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area * + * * @optionValue New value to be set. */ @@ -40073,6 +46232,7 @@ interface JQuery { /** * Defines width for the popover. leave null for auto. + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "width"): number|string; @@ -40080,6 +46240,7 @@ interface JQuery { /** * Defines width for the popover. leave null for auto. * + * * @optionValue New value to be set. */ @@ -40087,6 +46248,7 @@ interface JQuery { /** * Defines height for the popover. leave null for auto + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "height"): number|string; @@ -40094,6 +46256,7 @@ interface JQuery { /** * Defines height for the popover. leave null for auto * + * * @optionValue New value to be set. */ @@ -40101,6 +46264,7 @@ interface JQuery { /** * Defines width the popover won't go under the value even if no specific one is set. + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "minWidth"): number|string; @@ -40108,6 +46272,7 @@ interface JQuery { /** * Defines width the popover won't go under the value even if no specific one is set. * + * * @optionValue New value to be set. */ @@ -40115,6 +46280,7 @@ interface JQuery { /** * Defines width the popover won't exceed even if no specific one is set. + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "maxWidth"): number|string; @@ -40122,6 +46288,7 @@ interface JQuery { /** * Defines width the popover won't exceed even if no specific one is set. * + * * @optionValue New value to be set. */ @@ -40129,6 +46296,7 @@ interface JQuery { /** * Defines height the popover won't exceed even if no specific one is set. + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "maxHeight"): number|string; @@ -40136,6 +46304,7 @@ interface JQuery { /** * Defines height the popover won't exceed even if no specific one is set. * + * * @optionValue New value to be set. */ @@ -40143,18 +46312,21 @@ interface JQuery { /** * The time popover fades in and out when showing/hiding + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "animationDuration"): number; /** * Sets the time popover fades in and out when showing/hiding * + * * @optionValue New value to be set. */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "animationDuration", optionValue: number): void; /** * The content for the popover container. If left null the content will be get from the target. + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "contentTemplate"): string|Function; @@ -40162,6 +46334,7 @@ interface JQuery { /** * Sets the content for the popover container. If left null the content will be get from the target. * + * * @optionValue New value to be set. */ @@ -40169,30 +46342,35 @@ interface JQuery { /** * Selectors indicating which items should show popovers. The predefined value is [title]. Customize if you're using something other then the title attribute for the popover content, or if you need a different selector for event delegation. When changing this option, you likely need to also change the contentTemplate option + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "selectors"): string; /** * Selectors indicating which items should show popovers. The predefined value is [title]. Customize if you're using something other then the title attribute for the popover content, or if you need a different selector for event delegation. When changing this option, you likely need to also change the contentTemplate option * + * * @optionValue New value to be set. */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "selectors", optionValue: string): void; /** * The content for the popover header + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "headerTemplate"): IgPopoverHeaderTemplate; /** * Sets the content for the popover header * + * * @optionValue New value to be set. */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "headerTemplate", optionValue: IgPopoverHeaderTemplate): void; /** * The event on which the popover will be shown. Predefined values are "mouseenter", "click" and "focus" + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "showOn"): string; @@ -40200,6 +46378,7 @@ interface JQuery { /** * Sets the event on which the popover will be shown. Predefined values are "mouseenter", "click" and "focus" * + * * @optionValue New value to be set. */ @@ -40207,6 +46386,7 @@ interface JQuery { /** * Controls where the popover DOM should be attached to. + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "appendTo"): string|Object; @@ -40214,6 +46394,7 @@ interface JQuery { /** * Controls where the popover DOM should be attached to. * + * * @optionValue New value to be set. */ @@ -40280,10 +46461,56 @@ interface JQuery { igGridFeatureChooser(methodName: "getDropDownByColumnKey", columnKey: string): void; igGridFeatureChooser(methodName: "toggleDropDown", columnKey: string): void; igGridFeatureChooser(methodName: "destroy", e: Object, args: Object): void; + igGridFeatureChooser(methodName: "changeGlobalLanguage"): void; + igGridFeatureChooser(methodName: "changeGlobalRegional"): void; igGridFeatureChooser(optionLiteral: 'option', optionName: "dropDownWidth"): any; igGridFeatureChooser(optionLiteral: 'option', optionName: "dropDownWidth", optionValue: any): void; igGridFeatureChooser(optionLiteral: 'option', optionName: "animationDuration"): number; igGridFeatureChooser(optionLiteral: 'option', optionName: "animationDuration", optionValue: number): void; + + /** + * Set/Get the locale setting for the widget. + * + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igGridFeatureChooser(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igGridFeatureChooser(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igGridFeatureChooser(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; igGridFeatureChooser(optionLiteral: 'option', optionName: "featureChooserRendering"): FeatureChooserRenderingEvent; igGridFeatureChooser(optionLiteral: 'option', optionName: "featureChooserRendering", optionValue: FeatureChooserRenderingEvent): void; igGridFeatureChooser(optionLiteral: 'option', optionName: "featureChooserRendered"): FeatureChooserRenderedEvent; @@ -40314,22 +46541,26 @@ interface IgGridFilteringColumnSettingDefaultExpressions { interface IgGridFilteringColumnSetting { /** * Identifies the grid column by key. Either key or index must be set in every column setting. + * */ columnKey?: string; /** * Identifies the grid column by index. Either key or index must be set in every column setting. + * */ columnIndex?: number; /** * Enables/disables filtering for the column. + * */ allowFiltering?: boolean; /** * Initial filtering condition for the column. * + * * Valid values: * "empty" * "notEmpty" @@ -40364,11 +46595,13 @@ interface IgGridFilteringColumnSetting { /** * An array of strings that determine which [conditions](ui.iggridfiltering#options:columnSettings.condition) to display for this column. + * */ conditionList?: any[]; /** * Initial filtering expressions - if set they will be applied on initialization together with the preset [condition](ui.iggridfiltering#options:columnSettings.condition). + * */ defaultExpressions?: IgGridFilteringColumnSettingDefaultExpressions; @@ -40392,316 +46625,379 @@ interface IgGridFilteringColumnSetting { interface IgGridFilteringLocale { /** * StartsWith null text that will be used for the filter editors. + * */ startsWithNullText?: string; /** * EndsWith null text that will be used for the filter editors. + * */ endsWithNullText?: string; /** * Contains null text that will be used for the filter editors. + * */ containsNullText?: string; /** * Does not contain null text that will be used for the filter editors. + * */ doesNotContainNullText?: string; /** * Equals null text that will be used for the filter editors. + * */ equalsNullText?: string; /** * Does not equal null text that will be used for the filter editors. + * */ doesNotEqualNullText?: string; /** * Greater than null text that will be used for the filter editors. + * */ greaterThanNullText?: string; /** * Less than null text that will be used for the filter editors. + * */ lessThanNullText?: string; /** * Greater than or equal to null text that will be used for the filter editors. + * */ greaterThanOrEqualToNullText?: string; /** * Less than or equal to null text that will be used for the filter editors. + * */ lessThanOrEqualToNullText?: string; /** * On null text that will be used for the filter editors. + * */ onNullText?: string; /** * Not on null text that will be used for the filter editors. + * */ notOnNullText?: string; /** * After null text that will be used for the filter editors. + * */ afterNullText?: string; /** * Before null text that will be used for the filter editors. + * */ beforeNullText?: string; /** * Empty null text that will be used for the filter editors. + * */ emptyNullText?: string; /** * Not empty null text that will be used for the filter editors. + * */ notEmptyNullText?: string; /** * Not empty null text that will be used for the filter editors. + * */ nullNullText?: string; /** * Not empty null text that will be used for the filter editors. + * */ notNullNullText?: string; /** * 'Starts with' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ startsWithLabel?: string; /** * 'Starts with' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ endsWithLabel?: string; /** * 'Contains' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ containsLabel?: string; /** * 'Does not contain' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ doesNotContainLabel?: string; /** * 'Equals' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ equalsLabel?: string; /** * 'Does not Equal' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ doesNotEqualLabel?: string; /** * 'Greater Than' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ greaterThanLabel?: string; /** * 'Less Than' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ lessThanLabel?: string; /** * 'Greater Than or Equal' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ greaterThanOrEqualToLabel?: string; /** * 'Less Than or Equal' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ lessThanOrEqualToLabel?: string; /** * 'True' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ trueLabel?: string; /** * 'False' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ falseLabel?: string; /** * 'After' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ afterLabel?: string; /** * 'Before' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ beforeLabel?: string; /** * 'Today' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ todayLabel?: string; /** * 'Yesterday' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ yesterdayLabel?: string; /** * 'This Month' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ thisMonthLabel?: string; /** * 'Last Month' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ lastMonthLabel?: string; /** * 'Next Month' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ nextMonthLabel?: string; /** * 'This Year' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ thisYearLabel?: string; /** * 'Last Year' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ lastYearLabel?: string; /** * 'Next Year' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ nextYearLabel?: string; /** * 'Clear' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ clearLabel?: string; /** * 'No Filter' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ noFilterLabel?: string; /** * 'On' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ onLabel?: string; /** * 'Not On' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ notOnLabel?: string; /** * 'Advance Button' label that is used for the predefined filtering conditions in the filter dropdowns. + * */ advancedButtonLabel?: string; /** * Specifies the filter dialog caption label. + * */ filterDialogCaptionLabel?: string; /** * Specifies the filter condition label. + * */ filterDialogConditionLabel1?: string; /** * Specifies the filter condition label. + * */ filterDialogConditionLabel2?: string; /** * Specifies the filter condition drop-down label. + * */ filterDialogConditionDropDownLabel?: string; /** * Specifies the dialog's Ok button label. + * */ filterDialogOkLabel?: string; /** * Specifies the dialog's Cancel button label. + * */ filterDialogCancelLabel?: string; /** * Specifies the Any label for the filtering dialog. + * */ filterDialogAnyLabel?: string; /** * Specifies the All label for the filtering dialog. + * */ filterDialogAllLabel?: string; /** * Specifies the Add button label for the filtering dialog. + * */ filterDialogAddLabel?: string; /** * Specifies the Error label for the filtering dialog. + * */ filterDialogErrorLabel?: string; /** * Specifies the Close label for the filtering dialog. + * */ filterDialogCloseLabel?: string; /** * Specifies the Filtering summary title. + * */ filterSummaryTitleLabel?: string; /** * Specifies the summary template for the matching records. + * */ filterSummaryTemplate?: string; /** * Specifies clear all label in the filter dialog. + * */ filterDialogClearAllLabel?: string; /** * Custom tooltip template for the filter button, when a filter is applied. + * */ tooltipTemplate?: string; /** * Feature chooser text when filter is shown and filter [mode](ui.iggridfiltering#options:mode) is simple. + * */ featureChooserText?: string; /** * Feature chooser text when filter is hidden and filter [mode](ui.iggridfiltering#options:mode) is simple. + * */ featureChooserTextHide?: string; /** * Feature chooser text when filter [mode](ui.iggridfiltering#options:mode) is advanced. + * */ featureChooserTextAdvancedFilter?: string; @@ -40711,9 +47007,222 @@ interface IgGridFilteringLocale { [optionName: string]: any; } +interface DataFilteringEvent { + (event: Event, ui: DataFilteringEventUIParam): void; +} + +interface DataFilteringEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets the column index. Applicable only when filtering mode is "simple". + */ + columnIndex?: number; + + /** + * Gets the column key. Applicable only when filtering mode is "simple". + */ + columnKey?: string; + + /** + * Gets the filtering expressions. Filtering expressions could be changed in this event handler and after that data binding is applied. In this way the user could control filtering more easily before applying data-binding. + */ + newExpressions?: any[]; +} + +interface DataFilteredEvent { + (event: Event, ui: DataFilteredEventUIParam): void; +} + +interface DataFilteredEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets the column index. Applicable only when filtering mode is "simple". + */ + columnIndex?: number; + + /** + * Gets the column key. Applicable only when filtering mode is "simple". + */ + columnKey?: string; + + /** + * Gets the filtered expressions. + */ + expressions?: any[]; +} + +interface FilterDialogOpeningEvent { + (event: Event, ui: FilterDialogOpeningEventUIParam): void; +} + +interface FilterDialogOpeningEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets reference to the filtering dialog DOM element. + */ + dialog?: string; +} + +interface FilterDialogOpenedEvent { + (event: Event, ui: FilterDialogOpenedEventUIParam): void; +} + +interface FilterDialogOpenedEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets reference to the filtering dialog DOM element. + */ + dialog?: string; +} + +interface FilterDialogMovingEvent { + (event: Event, ui: FilterDialogMovingEventUIParam): void; +} + +interface FilterDialogMovingEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets reference to filtering dialog DOM element. + */ + dialog?: string; + + /** + * Gets the original position of the groupby dialog div as { top, left } object, relative to the page. + */ + originalPosition?: any; + + /** + * Gets the current position of the groupby dialog div as { top, left } object, relative to the page. + */ + position?: any; +} + +interface FilterDialogFilterAddingEvent { + (event: Event, ui: FilterDialogFilterAddingEventUIParam): void; +} + +interface FilterDialogFilterAddingEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets reference to filters table body DOM element. + */ + filtersTableBody?: string; +} + +interface FilterDialogFilterAddedEvent { + (event: Event, ui: FilterDialogFilterAddedEventUIParam): void; +} + +interface FilterDialogFilterAddedEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets reference to the filters table row DOM element. + */ + filter?: string; +} + +interface FilterDialogClosingEvent { + (event: Event, ui: FilterDialogClosingEventUIParam): void; +} + +interface FilterDialogClosingEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; +} + +interface FilterDialogClosedEvent { + (event: Event, ui: FilterDialogClosedEventUIParam): void; +} + +interface FilterDialogClosedEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; +} + +interface FilterDialogContentsRenderingEvent { + (event: Event, ui: FilterDialogContentsRenderingEventUIParam): void; +} + +interface FilterDialogContentsRenderingEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets reference to the filtering dialog DOM element. + */ + dialogElement?: string; +} + +interface FilterDialogContentsRenderedEvent { + (event: Event, ui: FilterDialogContentsRenderedEventUIParam): void; +} + +interface FilterDialogContentsRenderedEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets reference to the filtering dialog DOM element. + */ + dialogElement?: string; +} + +interface FilterDialogFilteringEvent { + (event: Event, ui: FilterDialogFilteringEventUIParam): void; +} + +interface FilterDialogFilteringEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets reference to filtering dialog DOM element. + */ + dialog?: string; +} + interface IgGridFiltering { /** * Enables or disables the filtering case sensitivity. Works only for local filtering. If true, it case sensitive filtering is performed. If false, filtering is case insensitive. + * */ caseSensitive?: boolean; @@ -40721,11 +47230,13 @@ interface IgGridFiltering { * Enable/disable footer visibility with summary info about the filter. * When false, the filter summary row (in the footer) will only be visible when paging is enabled (or some other feature that renders a footer). * When true, the filter summary row will only be visible when a filter is applied i.e. it's not visible by default. + * */ filterSummaryAlwaysVisible?: boolean; /** * Render in [Feature Chooser](http://www.igniteui.com/help/iggrid-feature-chooser) + * */ renderFC?: boolean; @@ -40738,6 +47249,7 @@ interface IgGridFiltering { /** * Type of animations for the column filter dropdowns. * + * * Valid values: * "linear" The column filtering drop downs are shown with a linear animation. * "none" No animation is used when showing the filtering drop downs. @@ -40746,12 +47258,14 @@ interface IgGridFiltering { /** * Animation duration in milliseconds for the [filterDropDownAnimations](ui.iggridfiltering#options:filterDropDownAnimations). + * */ filterDropDownAnimationDuration?: number; /** * Width of the column filter dropdowns. * + * * Valid values: * "string" The width in pixels (0px) * "number" The width in pixels as a number (0) @@ -40768,12 +47282,14 @@ interface IgGridFiltering { /** * URL key name that specifies how the filtering expressions will be encoded for remote requests, e.g. &filter('col') = startsWith. Default is OData. + * */ filterExprUrlKey?: string; /** * Enable/disable filter icons visibility. * + * * Valid values: * "true" All predefined filters in the filter dropdowns will have icons rendered in front of the text. * "false" No icons will be rendered. @@ -40782,12 +47298,14 @@ interface IgGridFiltering { /** * A list of column settings that specifies custom filtering options on a per column basis. + * */ columnSettings?: IgGridFilteringColumnSetting[]; /** * Type of filtering. Delegates all filtering functionality to the [$.ig.DataSource](ig.datasource). * + * * Valid values: * "remote" Filtering is performed by a remote end-point. * "local" Filtering is performed locally by the [$.ig.DataSource](ig.datasource). @@ -40796,12 +47314,14 @@ interface IgGridFiltering { /** * Time in milliseconds for which widget will wait between keystrokes before sending filtering requests. + * */ filterDelay?: number; /** * Default is 'simple' for non-virtualized grids, and 'advanced' when [virtualization](ui.iggrid#options:virtualization) is enabled. * + * * Valid values: * "simple" Renders just a filter row. * "advanced" Allows to configure multiple filters from a dialog - Excel style. @@ -40810,12 +47330,14 @@ interface IgGridFiltering { /** * Defines whether to render editors in advanced [mode](ui.iggridfiltering#options:mode). If false, no editors will be rendered in the advanced [mode](ui.iggridfiltering#options:mode). + * */ advancedModeEditorsVisible?: boolean; /** * Location of the advanced filtering button when [advancedModeEditorsVisible](ui.iggridfiltering#options:advancedModeEditorsVisible) is false (i.e. when the button is rendered in the header). * + * * Valid values: * "left" * "right" @@ -40825,6 +47347,7 @@ interface IgGridFiltering { /** * Default filter dialog width (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). * + * * Valid values: * "string" The dialog window width in pixels (370px). * "number" The dialog window width in pixels as a number (370). @@ -40834,6 +47357,7 @@ interface IgGridFiltering { /** * default filter dialog height (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). * + * * Valid values: * "string" The dialog window height in pixels (350px). * "number" The dialog window height in pixels as a number (350). @@ -40843,6 +47367,7 @@ interface IgGridFiltering { /** * Width of the filtering condition dropdowns in the advanced filter dialog. * + * * Valid values: * "string" The filtering condition dropdowns width in pixels (80px). * "number" The filtering condition dropdowns width in pixels as a number (80). @@ -40852,6 +47377,7 @@ interface IgGridFiltering { /** * Width of the filtering expression input boxes in the advanced filter dialog. * + * * Valid values: * "string" The filtering expression input boxes width in pixels (80px). * "number" The filtering expression input boxes width in pixels as a number (80). @@ -40861,6 +47387,7 @@ interface IgGridFiltering { /** * Width of the column chooser dropdowns in the advanced filter dialog. * + * * Valid values: * "string" The column chooser dropdowns width in pixels (80px). * "number" The column chooser dropdowns width in pixels as a number (80). @@ -40869,12 +47396,14 @@ interface IgGridFiltering { /** * Enable/disable filter button visibility. If false, no filter dropdown buttons will be rendered and a predefined list of filters will not be rendered for the columns. + * */ renderFilterButton?: boolean; /** * The filtering button for filter dropdowns can be rendered either on the left of the filter editor, or on the right. * + * * Valid values: * "left" The button is rendered on the left. * "right" The button is rendered on the right. @@ -40920,11 +47449,13 @@ interface IgGridFiltering { /** * Custom template for add condition area in the filter dialog. The default template is "
${label1}
${label2}
". + * */ filterDialogAddConditionTemplate?: string; /** * Custom template for options in dropdown in add condition area in the filter dialog. The default template is "". + * */ filterDialogAddConditionDropDownTemplate?: string; @@ -40934,17 +47465,20 @@ interface IgGridFiltering { * E.g.: DOM element used for selecting column has attribute "data-af-col", for selecting filter condition - "data-af-cond", for filter expression- "data-af-expr". * NOTE: The template is supported only with . * The default template is " ". + * */ filterDialogFilterTemplate?: string; /** * Custom template for options in condition list in filter dialog. The default template is "". + * */ filterDialogFilterConditionTemplate?: string; /** * Add button width - in the advanced filter dialog. * + * * Valid values: * "string" The dialog Add button width in pixels (100px). * "number" The dialog Add button width in pixels as a number (100). @@ -40954,6 +47488,7 @@ interface IgGridFiltering { /** * Width of the Ok and Cancel buttons in the advanced filtering dialogs. * + * * Valid values: * "string" The advanced filter dialog Ok and Cancel buttons width in pixels (120px). * "number" The advanced filter dialog Ok and Cancel buttons width in pixels as a number (120). @@ -40962,6 +47497,7 @@ interface IgGridFiltering { /** * Maximum number of filter rows in the advanced filtering dialog. If this number is exceeded, an error message will be rendered. + * */ filterDialogMaxFilterCount?: number; @@ -40975,44 +47511,212 @@ interface IgGridFiltering { /** * Enable/disable empty condition visibility in the filter. If true, shows empty and not empty filtering conditions in the dropdowns. + * */ showEmptyConditions?: boolean; /** * Enable/disable visibility of null and not null filtering conditions in the dropdowns. If true, shows null and not null filtering conditions in the dropdowns. + * */ showNullConditions?: boolean; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * */ dialogWidget?: string; /** * Enables/disables filtering persistence between states. + * */ persist?: boolean; /** * Enables/disables feature inheritance for the child [layouts](ui.ighierarchicalgrid#options:columnLayouts). NOTE: It only applies for [igHierarchicalGrid](ui.ighierarchicalgrid). + * */ inherit?: boolean; + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + + /** + * Event fired before a filtering operation is executed (remote request or local). + * Return false in order to cancel filtering operation. + */ + dataFiltering?: DataFilteringEvent; + + /** + * Event fired after the filtering has been executed and results are rendered. + */ + dataFiltered?: DataFilteredEvent; + + /** + * Event fired before the filter dropdown is opened for a specific column. + * Return false in order to cancel dropdown opening. + */ + dropDownOpening?: DropDownOpeningEvent; + + /** + * Event fired after the filter dropdown is opened for a specific column. + */ + dropDownOpened?: DropDownOpenedEvent; + + /** + * Event fired before the filter dropdown starts closing. + * Return false in order to cancel dropdown closing. + */ + dropDownClosing?: DropDownClosingEvent; + + /** + * Event fired after a filter column dropdown is completely closed. + */ + dropDownClosed?: DropDownClosedEvent; + + /** + * Event fired before the advanced filtering dialog is opened. + * Return false in order to cancel filter dialog opening. + */ + filterDialogOpening?: FilterDialogOpeningEvent; + + /** + * Event fired after the advanced filter dialog is already opened. + */ + filterDialogOpened?: FilterDialogOpenedEvent; + + /** + * Event fired every time the advanced filter dialog changes its position. + */ + filterDialogMoving?: FilterDialogMovingEvent; + + /** + * Event fired before a filter row is added to the advanced filter dialog. + * Return false in order to cancel filter adding to the advanced filtering dialog. + */ + filterDialogFilterAdding?: FilterDialogFilterAddingEvent; + + /** + * Event fired after a filter row is added to the advanced filter dialog. + */ + filterDialogFilterAdded?: FilterDialogFilterAddedEvent; + + /** + * Event fired before the advanced filter dialog is closed. + * Return false in order to cancel filtering dialog closing. + */ + filterDialogClosing?: FilterDialogClosingEvent; + + /** + * Event fired after the advanced filter dialog has been closed. + */ + filterDialogClosed?: FilterDialogClosedEvent; + + /** + * Event fired before the contents of the advanced filter dialog are rendered. + * Return false in order to cancel filtering dialog rendering. + */ + filterDialogContentsRendering?: FilterDialogContentsRenderingEvent; + + /** + * Event fired after the contents of the advanced filter dialog are rendered. + */ + filterDialogContentsRendered?: FilterDialogContentsRenderedEvent; + + /** + * Event fired when the OK button in the advanced filter dialog is pressed. + */ + filterDialogFiltering?: FilterDialogFilteringEvent; + /** * Option for igGridFiltering */ [optionName: string]: any; } +interface IgGridFilteringMethods { + changeGlobalLanguage(): void; + changeGlobalRegional(): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.iggridfiltering#options:language) + * Note that this method is for rare scenarios, see [language](ui.iggridfiltering#options:language) or [locale](ui.iggridfiltering#options:locale) option setter + */ + changeLocale(): void; + + /** + * Changes the the regional settings of widget element to the language specified in [options.regional](ui.iggridfiltering#options:regional) + * Note that this method is for rare scenarios, use [regional](ui.iggridfiltering#options:regional) option setter + */ + changeRegional(): void; + + /** + * Destroys the filtering widget - remove fitler row, unbinds events, returns the grid to its previous state. + */ + destroy(): void; + + /** + * Returns the count of data records that match filtering conditions + */ + getFilteringMatchesCount(): number; + + /** + * Toggle filter row when mode is simple or [advancedModeEditorsVisible](ui.iggridfiltering#options:advancedModeEditorsVisible) is true. Otherwise show/hide advanced dialog. + * + * @param event Column key + */ + toggleFilterRowByFeatureChooser(event: string): void; + + /** + * Applies filtering programmatically and updates the UI by default. + * + * @param expressions An array of filtering expressions, each one having the format {fieldName: , expr: , cond: , logic: } where fieldName is the key of the column, expr is the actual expression string with which we would like to filter, logic is 'AND' or 'OR', and cond is one of the following strings: "equals", "doesNotEqual", "contains", "doesNotContain", "greaterThan", "lessThan", "greaterThanOrEqualTo", "lessThanOrEqualTo", "true", "false", "null", "notNull", "empty", "notEmpty", "startsWith", "endsWith", "today", "yesterday", "on", "notOn", "thisMonth", "lastMonth", "nextMonth", "before", "after", "thisYear", "lastYear", "nextYear". The difference between the empty and null filtering conditions is that empty includes null, NaN, and undefined, as well as the empty string. + * @param updateUI specifies whether the filter row should be also updated once the grid is filtered + * @param addedFromAdvanced + */ + filter(expressions: any[], updateUI?: boolean, addedFromAdvanced?: boolean): void; + + /** + * Check whether filterCondition requires or not filtering expression - e.g. if filterCondition is "lastMonth", "thisMonth", "null", "notNull", "true", "false", etc. then filtering expression is NOT required + * + * @param filterCondition filtering condition - e.g. "true", "false", "yesterday", "empty", "null", etc. + */ + requiresFilteringExpression(filterCondition: string): boolean; +} +interface JQuery { + data(propertyName: "igGridFiltering"): IgGridFilteringMethods; +} interface JQuery { + igGridFiltering(methodName: "changeGlobalLanguage"): void; + igGridFiltering(methodName: "changeGlobalRegional"): void; + igGridFiltering(methodName: "changeLocale"): void; + igGridFiltering(methodName: "changeRegional"): void; + igGridFiltering(methodName: "destroy"): void; + igGridFiltering(methodName: "getFilteringMatchesCount"): number; + igGridFiltering(methodName: "toggleFilterRowByFeatureChooser", event: string): void; + igGridFiltering(methodName: "filter", expressions: any[], updateUI?: boolean, addedFromAdvanced?: boolean): void; + igGridFiltering(methodName: "requiresFilteringExpression", filterCondition: string): boolean; + /** * Enables or disables the filtering case sensitivity. Works only for local filtering. If true, it case sensitive filtering is performed. If false, filtering is case insensitive. + * */ igGridFiltering(optionLiteral: 'option', optionName: "caseSensitive"): boolean; /** * Enables or disables the filtering case sensitivity. Works only for local filtering. If true, it case sensitive filtering is performed. If false, filtering is case insensitive. * + * * @optionValue New value to be set. */ igGridFiltering(optionLiteral: 'option', optionName: "caseSensitive", optionValue: boolean): void; @@ -41021,6 +47725,7 @@ interface JQuery { * Enable/disable footer visibility with summary info about the filter. * When false, the filter summary row (in the footer) will only be visible when paging is enabled (or some other feature that renders a footer). * When true, the filter summary row will only be visible when a filter is applied i.e. it's not visible by default. + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterSummaryAlwaysVisible"): boolean; @@ -41029,18 +47734,21 @@ interface JQuery { * When false, the filter summary row (in the footer) will only be visible when paging is enabled (or some other feature that renders a footer). * When true, the filter summary row will only be visible when a filter is applied i.e. it's not visible by default. * + * * @optionValue New value to be set. */ igGridFiltering(optionLiteral: 'option', optionName: "filterSummaryAlwaysVisible", optionValue: boolean): void; /** * Render in [Feature Chooser](http://www.igniteui.com/help/iggrid-feature-chooser) + * */ igGridFiltering(optionLiteral: 'option', optionName: "renderFC"): boolean; /** * Render in [Feature Chooser](http://www.igniteui.com/help/iggrid-feature-chooser) * + * * @optionValue New value to be set. */ igGridFiltering(optionLiteral: 'option', optionName: "renderFC", optionValue: boolean): void; @@ -41061,6 +47769,7 @@ interface JQuery { /** * Type of animations for the column filter dropdowns. + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterDropDownAnimations"): string; @@ -41068,6 +47777,7 @@ interface JQuery { /** * Type of animations for the column filter dropdowns. * + * * @optionValue New value to be set. */ @@ -41075,18 +47785,21 @@ interface JQuery { /** * Animation duration in milliseconds for the [filterDropDownAnimations](ui.iggridfiltering#options:filterDropDownAnimations). + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterDropDownAnimationDuration"): number; /** * Animation duration in milliseconds for the [filterDropDownAnimations](ui.iggridfiltering#options:filterDropDownAnimations). * + * * @optionValue New value to be set. */ igGridFiltering(optionLiteral: 'option', optionName: "filterDropDownAnimationDuration", optionValue: number): void; /** * Width of the column filter dropdowns. + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterDropDownWidth"): string|number; @@ -41094,6 +47807,7 @@ interface JQuery { /** * Width of the column filter dropdowns. * + * * @optionValue New value to be set. */ @@ -41119,18 +47833,21 @@ interface JQuery { /** * URL key name that specifies how the filtering expressions will be encoded for remote requests, e.g. &filter('col') = startsWith. Default is OData. + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterExprUrlKey"): string; /** * URL key name that specifies how the filtering expressions will be encoded for remote requests, e.g. &filter('col') = startsWith. Default is OData. * + * * @optionValue New value to be set. */ igGridFiltering(optionLiteral: 'option', optionName: "filterExprUrlKey", optionValue: string): void; /** * Enable/disable filter icons visibility. + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterDropDownItemIcons"): boolean; @@ -41138,6 +47855,7 @@ interface JQuery { /** * Enable/disable filter icons visibility. * + * * @optionValue New value to be set. */ @@ -41145,18 +47863,21 @@ interface JQuery { /** * A list of column settings that specifies custom filtering options on a per column basis. + * */ igGridFiltering(optionLiteral: 'option', optionName: "columnSettings"): IgGridFilteringColumnSetting[]; /** * A list of column settings that specifies custom filtering options on a per column basis. * + * * @optionValue New value to be set. */ igGridFiltering(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridFilteringColumnSetting[]): void; /** * Type of filtering. Delegates all filtering functionality to the [$.ig.DataSource](ig.datasource). + * */ igGridFiltering(optionLiteral: 'option', optionName: "type"): string; @@ -41164,6 +47885,7 @@ interface JQuery { /** * Type of filtering. Delegates all filtering functionality to the [$.ig.DataSource](ig.datasource). * + * * @optionValue New value to be set. */ @@ -41171,18 +47893,21 @@ interface JQuery { /** * Time in milliseconds for which widget will wait between keystrokes before sending filtering requests. + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterDelay"): number; /** * Time in milliseconds for which widget will wait between keystrokes before sending filtering requests. * + * * @optionValue New value to be set. */ igGridFiltering(optionLiteral: 'option', optionName: "filterDelay", optionValue: number): void; /** * Default is 'simple' for non-virtualized grids, and 'advanced' when [virtualization](ui.iggrid#options:virtualization) is enabled. + * */ igGridFiltering(optionLiteral: 'option', optionName: "mode"): string; @@ -41190,6 +47915,7 @@ interface JQuery { /** * Default is 'simple' for non-virtualized grids, and 'advanced' when [virtualization](ui.iggrid#options:virtualization) is enabled. * + * * @optionValue New value to be set. */ @@ -41197,18 +47923,21 @@ interface JQuery { /** * Defines whether to render editors in advanced [mode](ui.iggridfiltering#options:mode). If false, no editors will be rendered in the advanced [mode](ui.iggridfiltering#options:mode). + * */ igGridFiltering(optionLiteral: 'option', optionName: "advancedModeEditorsVisible"): boolean; /** * Defines whether to render editors in advanced [mode](ui.iggridfiltering#options:mode). If false, no editors will be rendered in the advanced [mode](ui.iggridfiltering#options:mode). * + * * @optionValue New value to be set. */ igGridFiltering(optionLiteral: 'option', optionName: "advancedModeEditorsVisible", optionValue: boolean): void; /** * Location of the advanced filtering button when [advancedModeEditorsVisible](ui.iggridfiltering#options:advancedModeEditorsVisible) is false (i.e. when the button is rendered in the header). + * */ igGridFiltering(optionLiteral: 'option', optionName: "advancedModeHeaderButtonLocation"): string; @@ -41216,6 +47945,7 @@ interface JQuery { /** * Location of the advanced filtering button when [advancedModeEditorsVisible](ui.iggridfiltering#options:advancedModeEditorsVisible) is false (i.e. when the button is rendered in the header). * + * * @optionValue New value to be set. */ @@ -41223,6 +47953,7 @@ interface JQuery { /** * Default filter dialog width (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterDialogWidth"): string|number; @@ -41230,6 +47961,7 @@ interface JQuery { /** * Default filter dialog width (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). * + * * @optionValue New value to be set. */ @@ -41237,6 +47969,7 @@ interface JQuery { /** * Default filter dialog height (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterDialogHeight"): string|number; @@ -41244,6 +47977,7 @@ interface JQuery { /** * Default filter dialog height (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). * + * * @optionValue New value to be set. */ @@ -41251,6 +47985,7 @@ interface JQuery { /** * Width of the filtering condition dropdowns in the advanced filter dialog. + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterDropDownDefaultWidth"): string|number; @@ -41258,6 +47993,7 @@ interface JQuery { /** * Width of the filtering condition dropdowns in the advanced filter dialog. * + * * @optionValue New value to be set. */ @@ -41265,6 +48001,7 @@ interface JQuery { /** * Width of the filtering expression input boxes in the advanced filter dialog. + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterDialogExprInputDefaultWidth"): string|number; @@ -41272,6 +48009,7 @@ interface JQuery { /** * Width of the filtering expression input boxes in the advanced filter dialog. * + * * @optionValue New value to be set. */ @@ -41279,6 +48017,7 @@ interface JQuery { /** * Width of the column chooser dropdowns in the advanced filter dialog. + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterDialogColumnDropDownDefaultWidth"): string|number; @@ -41286,6 +48025,7 @@ interface JQuery { /** * Width of the column chooser dropdowns in the advanced filter dialog. * + * * @optionValue New value to be set. */ @@ -41293,18 +48033,21 @@ interface JQuery { /** * Enable/disable filter button visibility. If false, no filter dropdown buttons will be rendered and a predefined list of filters will not be rendered for the columns. + * */ igGridFiltering(optionLiteral: 'option', optionName: "renderFilterButton"): boolean; /** * Enable/disable filter button visibility. If false, no filter dropdown buttons will be rendered and a predefined list of filters will not be rendered for the columns. * + * * @optionValue New value to be set. */ igGridFiltering(optionLiteral: 'option', optionName: "renderFilterButton", optionValue: boolean): void; /** * The filtering button for filter dropdowns can be rendered either on the left of the filter editor, or on the right. + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterButtonLocation"): string; @@ -41312,6 +48055,7 @@ interface JQuery { /** * The filtering button for filter dropdowns can be rendered either on the left of the filter editor, or on the right. * + * * @optionValue New value to be set. */ @@ -41405,24 +48149,28 @@ interface JQuery { /** * Custom template for add condition area in the filter dialog. The default template is "
${label1}
${label2}
". + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddConditionTemplate"): string; /** * Custom template for add condition area in the filter dialog. The default template is "
${label1}
${label2}
". * + * * @optionValue New value to be set. */ igGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddConditionTemplate", optionValue: string): void; /** * Custom template for options in dropdown in add condition area in the filter dialog. The default template is "". + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddConditionDropDownTemplate"): string; /** * Custom template for options in dropdown in add condition area in the filter dialog. The default template is "". * + * * @optionValue New value to be set. */ igGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddConditionDropDownTemplate", optionValue: string): void; @@ -41433,6 +48181,7 @@ interface JQuery { * E.g.: DOM element used for selecting column has attribute "data-af-col", for selecting filter condition - "data-af-cond", for filter expression- "data-af-expr". * NOTE: The template is supported only with . * The default template is " ". + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterTemplate"): string; @@ -41443,24 +48192,28 @@ interface JQuery { * NOTE: The template is supported only with . * The default template is " ". * + * * @optionValue New value to be set. */ igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterTemplate", optionValue: string): void; /** * Custom template for options in condition list in filter dialog. The default template is "". + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterConditionTemplate"): string; /** * Custom template for options in condition list in filter dialog. The default template is "". * + * * @optionValue New value to be set. */ igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterConditionTemplate", optionValue: string): void; /** * Add button width - in the advanced filter dialog. + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddButtonWidth"): string|number; @@ -41468,6 +48221,7 @@ interface JQuery { /** * Add button width - in the advanced filter dialog. * + * * @optionValue New value to be set. */ @@ -41475,6 +48229,7 @@ interface JQuery { /** * Width of the Ok and Cancel buttons in the advanced filtering dialogs. + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterDialogOkCancelButtonWidth"): string|number; @@ -41482,6 +48237,7 @@ interface JQuery { /** * Width of the Ok and Cancel buttons in the advanced filtering dialogs. * + * * @optionValue New value to be set. */ @@ -41489,12 +48245,14 @@ interface JQuery { /** * Maximum number of filter rows in the advanced filtering dialog. If this number is exceeded, an error message will be rendered. + * */ igGridFiltering(optionLiteral: 'option', optionName: "filterDialogMaxFilterCount"): number; /** * Maximum number of filter rows in the advanced filtering dialog. If this number is exceeded, an error message will be rendered. * + * * @optionValue New value to be set. */ igGridFiltering(optionLiteral: 'option', optionName: "filterDialogMaxFilterCount", optionValue: number): void; @@ -41519,63 +48277,309 @@ interface JQuery { /** * Enable/disable empty condition visibility in the filter. If true, shows empty and not empty filtering conditions in the dropdowns. + * */ igGridFiltering(optionLiteral: 'option', optionName: "showEmptyConditions"): boolean; /** * Enable/disable empty condition visibility in the filter. If true, shows empty and not empty filtering conditions in the dropdowns. * + * * @optionValue New value to be set. */ igGridFiltering(optionLiteral: 'option', optionName: "showEmptyConditions", optionValue: boolean): void; /** * Enable/disable visibility of null and not null filtering conditions in the dropdowns. If true, shows null and not null filtering conditions in the dropdowns. + * */ igGridFiltering(optionLiteral: 'option', optionName: "showNullConditions"): boolean; /** * Enable/disable visibility of null and not null filtering conditions in the dropdowns. If true, shows null and not null filtering conditions in the dropdowns. * + * * @optionValue New value to be set. */ igGridFiltering(optionLiteral: 'option', optionName: "showNullConditions", optionValue: boolean): void; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * */ igGridFiltering(optionLiteral: 'option', optionName: "dialogWidget"): string; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. * + * * @optionValue New value to be set. */ igGridFiltering(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; /** * Enables/disables filtering persistence between states. + * */ igGridFiltering(optionLiteral: 'option', optionName: "persist"): boolean; /** * Enables/disables filtering persistence between states. * + * * @optionValue New value to be set. */ igGridFiltering(optionLiteral: 'option', optionName: "persist", optionValue: boolean): void; /** * Enables/disables feature inheritance for the child [layouts](ui.ighierarchicalgrid#options:columnLayouts). NOTE: It only applies for [igHierarchicalGrid](ui.ighierarchicalgrid). + * */ igGridFiltering(optionLiteral: 'option', optionName: "inherit"): boolean; /** * Enables/disables feature inheritance for the child [layouts](ui.ighierarchicalgrid#options:columnLayouts). NOTE: It only applies for [igHierarchicalGrid](ui.ighierarchicalgrid). * + * * @optionValue New value to be set. */ igGridFiltering(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igGridFiltering(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igGridFiltering(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + + /** + * Event fired before a filtering operation is executed (remote request or local). + * Return false in order to cancel filtering operation. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dataFiltering"): DataFilteringEvent; + + /** + * Event fired before a filtering operation is executed (remote request or local). + * Return false in order to cancel filtering operation. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dataFiltering", optionValue: DataFilteringEvent): void; + + /** + * Event fired after the filtering has been executed and results are rendered. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dataFiltered"): DataFilteredEvent; + + /** + * Event fired after the filtering has been executed and results are rendered. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dataFiltered", optionValue: DataFilteredEvent): void; + + /** + * Event fired before the filter dropdown is opened for a specific column. + * Return false in order to cancel dropdown opening. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dropDownOpening"): DropDownOpeningEvent; + + /** + * Event fired before the filter dropdown is opened for a specific column. + * Return false in order to cancel dropdown opening. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dropDownOpening", optionValue: DropDownOpeningEvent): void; + + /** + * Event fired after the filter dropdown is opened for a specific column. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dropDownOpened"): DropDownOpenedEvent; + + /** + * Event fired after the filter dropdown is opened for a specific column. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dropDownOpened", optionValue: DropDownOpenedEvent): void; + + /** + * Event fired before the filter dropdown starts closing. + * Return false in order to cancel dropdown closing. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dropDownClosing"): DropDownClosingEvent; + + /** + * Event fired before the filter dropdown starts closing. + * Return false in order to cancel dropdown closing. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dropDownClosing", optionValue: DropDownClosingEvent): void; + + /** + * Event fired after a filter column dropdown is completely closed. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dropDownClosed"): DropDownClosedEvent; + + /** + * Event fired after a filter column dropdown is completely closed. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dropDownClosed", optionValue: DropDownClosedEvent): void; + + /** + * Event fired before the advanced filtering dialog is opened. + * Return false in order to cancel filter dialog opening. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogOpening"): FilterDialogOpeningEvent; + + /** + * Event fired before the advanced filtering dialog is opened. + * Return false in order to cancel filter dialog opening. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogOpening", optionValue: FilterDialogOpeningEvent): void; + + /** + * Event fired after the advanced filter dialog is already opened. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogOpened"): FilterDialogOpenedEvent; + + /** + * Event fired after the advanced filter dialog is already opened. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogOpened", optionValue: FilterDialogOpenedEvent): void; + + /** + * Event fired every time the advanced filter dialog changes its position. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogMoving"): FilterDialogMovingEvent; + + /** + * Event fired every time the advanced filter dialog changes its position. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogMoving", optionValue: FilterDialogMovingEvent): void; + + /** + * Event fired before a filter row is added to the advanced filter dialog. + * Return false in order to cancel filter adding to the advanced filtering dialog. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterAdding"): FilterDialogFilterAddingEvent; + + /** + * Event fired before a filter row is added to the advanced filter dialog. + * Return false in order to cancel filter adding to the advanced filtering dialog. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterAdding", optionValue: FilterDialogFilterAddingEvent): void; + + /** + * Event fired after a filter row is added to the advanced filter dialog. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterAdded"): FilterDialogFilterAddedEvent; + + /** + * Event fired after a filter row is added to the advanced filter dialog. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterAdded", optionValue: FilterDialogFilterAddedEvent): void; + + /** + * Event fired before the advanced filter dialog is closed. + * Return false in order to cancel filtering dialog closing. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogClosing"): FilterDialogClosingEvent; + + /** + * Event fired before the advanced filter dialog is closed. + * Return false in order to cancel filtering dialog closing. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogClosing", optionValue: FilterDialogClosingEvent): void; + + /** + * Event fired after the advanced filter dialog has been closed. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogClosed"): FilterDialogClosedEvent; + + /** + * Event fired after the advanced filter dialog has been closed. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogClosed", optionValue: FilterDialogClosedEvent): void; + + /** + * Event fired before the contents of the advanced filter dialog are rendered. + * Return false in order to cancel filtering dialog rendering. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogContentsRendering"): FilterDialogContentsRenderingEvent; + + /** + * Event fired before the contents of the advanced filter dialog are rendered. + * Return false in order to cancel filtering dialog rendering. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogContentsRendering", optionValue: FilterDialogContentsRenderingEvent): void; + + /** + * Event fired after the contents of the advanced filter dialog are rendered. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogContentsRendered"): FilterDialogContentsRenderedEvent; + + /** + * Event fired after the contents of the advanced filter dialog are rendered. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogContentsRendered", optionValue: FilterDialogContentsRenderedEvent): void; + + /** + * Event fired when the OK button in the advanced filter dialog is pressed. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFiltering"): FilterDialogFilteringEvent; + + /** + * Event fired when the OK button in the advanced filter dialog is pressed. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFiltering", optionValue: FilterDialogFilteringEvent): void; igGridFiltering(options: IgGridFiltering): JQuery; igGridFiltering(optionLiteral: 'option', optionName: string): any; igGridFiltering(optionLiteral: 'option', options: IgGridFiltering): JQuery; @@ -41585,17 +48589,20 @@ interface JQuery { interface IgGridColumnGroupOptions { /** * Sets whether the group is expanded or collapsed. Applied only if the allowGroupCollapsing is set to true. + * */ expanded?: boolean; /** * Sets whether expansion indicators are visible in the group header. + * */ allowGroupCollapsing?: boolean; /** * Sets when should the group be hidden. Applied only if the allowGroupCollapsing is set to true. * + * * Valid values: * "never" never hide the group * "always" always hide the group @@ -41613,17 +48620,20 @@ interface IgGridColumnGroupOptions { interface IgGridColumn { /** * Header text for the specified column. + * */ headerText?: string; /** * The property in the data source to which the column is bound. Also used to identify the column by, and find specific columns with API methods such as [columnByKey](ui.iggrid#methods:columnByKey). + * */ key?: string; /** * Reference to a function (string or function) which will be used for formatting the cell values. The function should accept a value and return the new formatted value. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) * + * * Valid values: * "string" The name of the function which will be used for formatting the cell values. * "function" Function which will be used for formatting the cell values. The function should accept a value and return the new formatted value. @@ -41644,12 +48654,21 @@ interface IgGridColumn { /** * Data type of the column cell values: string, number, bool, date, object. + * + * + * Valid values: + * "string" Used when the data for the column is of type string + * "number" Used when the data for the column is of type number + * "boolean" Used when the data for the column is of type boolean + * "date" Used when the data for the column is of type date + * "object" Used when the data for the column is of type object */ - dataType?: string|number|boolean|Date|Object; + dataType?: string; /** * Width of the column in pixels or percentage. Can also be set as '*', in which case the width auto-size based on the content of the column cells (including the header text).If width is not defined and [defaultColumnWidth](ui.iggrid#options:defaultColumnWidth) is set, it is assumed for all columns. * + * * Valid values: * "string" The column width can be set in pixels (px), percentage (%) or as '*' in order to auto-size based on the cells and header content. * "number" The column width can be set as a number @@ -41658,32 +48677,38 @@ interface IgGridColumn { /** * Initial visibility of the column. A column can be hidden without the Hiding feature being enabled but there will be no UI for unhiding it. Columns can be defined as hidden in the options of the Hiding feature as well and those definitions take precedence. + * */ hidden?: boolean; /** * Sets a template for an individual column. the contents of the template should be the HTML markup that goes inside the table cell, or the entire table cell markup. [Here's an example of creating a basic column template](http://www.igniteui.com/help/creating-a-basic-column-template-in-the-iggrid) + * */ template?: string; /** * Sets whether column data is derived from the datasource. If set to true, then the cells in this column are not bound to the data source. The data in this column is populated using [formula](ui.iggrid#options:columns.formula), or using [unboundValues](ui.iggrid#options:columns.unboundValues), or through the [setUnboundValues](ui.iggrid#methods:setUnboundValues) API method. [Here's an overview of the unbound columns feature](http://www.igniteui.com/help/iggrid-unboundcolumns-overview) + * */ unbound?: boolean; /** * Options used to configure collapsible column [groups](ui.iggrid#options:columns.group). + * */ groupOptions?: IgGridColumnGroupOptions; /** * Array of child column definitions. If the column has the property group than the grid has multi column headers. + * */ group?: any[]; /** * Determines the way in which dates will be displayed in the grid for this column. * + * * Valid values: * "local" The dates for this column will be rendered in the client's local timezone. * "utc" The dates for this column will be rendered in their UTC representation. @@ -41699,6 +48724,7 @@ interface IgGridColumn { /** * A reference to or the name of a JavaScript function, which will calculate the value of the current cell based on other cell values in the same row. Used with [unbound columns](ui.iggrid#options:columns.unbound). * + * * Valid values: * "string" The name of the JavaScript function. * "function" Reference to the JavaScript function. @@ -41707,22 +48733,26 @@ interface IgGridColumn { /** * Array of values which will be populated in the column cells at initialization, if the column is [unbound](ui.iggrid#options:columns.unbound). + * */ unboundValues?: any[]; /** * Space-separated list of CSS classes to be applied on the header cell of this column. + * */ headerCssClass?: string; /** * Space-separated list of CSS classes to be applied on the data cells of this column. The class is not applied if the column has a column [template](ui.iggrid#options:columns.template) defined, which contains full definition in the template. + * */ columnCssClass?: string; /** * This option is applicable only for columns with [dataType](ui.iggrid#options:columns.dataType) of object. Reference to a function, or the name of the function, that will be used for complex data extraction from the data records, whose return value will be used for all data operations associated with this column and will be displayed as cell value. [Here you can find more examples of how to setup a column mapper](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-mapper) * + * * Valid values: * "string" The name of the mapper function. * "function" Reference to the mapper function. @@ -41731,26 +48761,31 @@ interface IgGridColumn { /** * Specifies the row index of the cell in a Multi-Row Layout configuration. All columns must have this property set for the multi-row-layout mode to be enabled. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout) + * */ rowIndex?: number; /** * Specifies the column index of the cell in a Multi-Row Layout configuration. All columns must have this property set for the multi-row-layout mode to be enabled. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout) + * */ columnIndex?: number; /** * Specifies the navigation index of the cell for the TAB sequence when the cells are in edit mode in a Multi-Row Layout grid. Has no effect otherwise. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout) + * */ navigationIndex?: number; /** * Specifies the colSpan of the cell in a Multi-Row Layout configuration. colSpan 0 is not supported and will be changed to 1 by the grid. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout) + * */ colSpan?: number; /** * Specifies the rowSpan of the cell in a Multi-Row Layout configuration. rowSpan 0 is not supported and will be changed to 1 by the grid. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout). If multi-row-layout is not used but multi-column-header is set then this option is used to adjust span of header cell. + * */ rowSpan?: number; @@ -41775,16 +48810,19 @@ interface IgGridFeature { interface IgGridRestSettingsCreate { /** * Specifies a remote URL to which create requests will be sent. This will be used for both batch and non-batch, however if template is also set, this URL will only be used for batch requests. + * */ url?: string; /** * Specifies a remote URL template. Use ${id} in place of the resource id. + * */ template?: string; /** * Specifies whether create requests will be sent in batches + * */ batch?: boolean; @@ -41841,6 +48879,7 @@ interface IgGridRestSettingsRemove { interface IgGridRestSettings { /** * Settings for create requests + * */ create?: IgGridRestSettingsCreate; @@ -41861,11 +48900,13 @@ interface IgGridRestSettings { /** * Specifies a custom function to serialize content sent to the server. It should accept a single object or an array of objects and return a string. If not specified, JSON.stringify() will be used. + * */ contentSerializer?: Function; /** * Specifies the content type of the request. See http://api.jquery.com/jQuery.ajax/ => contentType + * */ contentType?: string; @@ -41878,41 +48919,49 @@ interface IgGridRestSettings { interface IgGridScrollSettings { /** * Sets gets current vertical position. + * */ scrollTop?: number; /** * Sets gets current horizontal position. + * */ scrollLeft?: number; /** * Sets gets the step of the default scrolling behavior when using the mouse wheel. + * */ wheelStep?: number; /** * Sets gets if smoother scrolling with small intertia should be used when using the mouse wheel. + * */ smoothing?: boolean; /** * Sets or gets the modifier for how many pixels will be scrolled when using the mouse wheel once. This is used only for the [smooth scrolling behavior](ui.iggrid#options:scrollSettings.smoothing). + * */ smoothingStep?: number; /** * Sets or gets the modifier for how long the scroll ‘animation’ lasts when using the mouse wheel once. This is used only for the [smooth scrolling behavior](ui.iggrid#options:scrollSettings.smoothing). + * */ smoothingDuration?: number; /** * Sets gets the modifier for how much the inertia scrolls on touch devices. Note: Value set to 0 would disable touch movements. Value set to -1 would invert them. + * */ inertiaStep?: number; /** * Sets gets the modifier for how long the inertia last on touch devices. + * */ inertiaDuration?: number; @@ -42231,9 +49280,16 @@ interface DestroyedEventUIParam { } interface IgGrid { + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + /** * Defines the grid width in pixels or percents. [Here you can find more info about setting igGrid width](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). * + * * Valid values: * "string" The widget width can be set in pixels (px) or percentage (%). Example values: "800px", "800" (defaults to pixels), "100%". * "number" The widget width can be set in pixels as a number. Example values: 800, 700. @@ -42244,6 +49300,7 @@ interface IgGrid { /** * This is the total height of the grid, including all UI elements - scroll container with data rows, header, footer, filter row - (if any), etc. [Here you can find more info about setting igGrid height](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). * + * * Valid values: * "string" The widget height can be set in pixels (px) and percentage (%). * "number" The widget height can be set as a number @@ -42253,12 +49310,14 @@ interface IgGrid { /** * If autoAdjustHeight is set to false, the [height](ui.iggrid#options:height) will be set only on the scrolling container, and all other UI elements such as paging footer / filter row / headers will add on top of that, so the total height of the grid will be more than this value - the height of the scroll container (content area) will not be dynamically calculated. Setting this option to false will usually result in a lot better initial rendering performance for large data sets ( > 1000 rows rendered at once, no [virtualization](ui.iggrid#options:virtualization) enabled), since no reflows will be made by browsers when accessing DOM properties such as offsetHeight. + * */ autoAdjustHeight?: boolean; /** * Used for [row virtualization](ui.iggrid#options:rowVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels (default) that will be used to calculate how many rows to render as the end user scrolls. Also all rows' height will be automatically set to this value. * + * * Valid values: * "string" The avarage row height can be set in pixels ("25px"). * "number" The avarage row height can be set in pixels as a number (25). @@ -42268,6 +49327,7 @@ interface IgGrid { /** * Used for [column virtualization](ui.iggrid#options:columnVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels for a column width. * + * * Valid values: * "string" The avarage column width can be set in pixels ("25px"). * "number" The avarage column width can be set in pixels as a number (25). @@ -42275,10 +49335,11 @@ interface IgGrid { avgColumnWidth?: string|number; /** - * Default column width that will be set for all columns, that don't have [column width](ui.iggrid#options:columns.width) defined. + * Default column width that will be set for all columns, that don't have [column width](ui.iggrid#options:columns.width) defined. Can also be set as '*', in which case the width auto-size based on the content of the column cells (including the header text). + * * * Valid values: - * "string" The default column width can be set in pixels ("100px"). + * "string" The default column width can be set in pixels ("100px") or as '*' in order to auto-size based on the cells and header content. * "number" The default column width can be set in pixels as a number (100). */ defaultColumnWidth?: string|number; @@ -42287,17 +49348,20 @@ interface IgGrid { * If no [columns](ui.iggrid#options:columns) collection is defined, and autoGenerateColumns is set to true, [columns](ui.iggrid#options:columns) will be inferred from the data source before the [dataRendering](ui.iggrid#events:dataRendering) event is fired. The inferred [columns](ui.iggrid#options:columns) collection will be available to the developer for modification at [dataRendering](ui.iggrid#events:dataRendering). If autoGenerateColumns is not explicitly set and [columns](ui.iggrid#options:columns) has at least one column defined then autoGenerateColumns is automatically set to false. * If autoGenerateColumns is true and there are columns defined auto-generated columns will render after the explicitly defined ones. * Since auto-generated columns don't have width defined consider setting [defaultColumnWidth](ui.iggrid#options:defaultColumnWidth) as well. + * */ autoGenerateColumns?: boolean; /** * Enables/disables column and row virtualization at the same time. Virtualization can greatly enhance rendering performance. If enabled, the number of actual rendered rows (DOM elements) will be constant and related to the visible viewport of the grid. As the end user scrolls, those DOM elements will be dynamically reused to render the new data. [Here you can find more info about the performance guidelines when using the igGrid](http://www.igniteui.com/help/iggrid-performance-guide) + * */ virtualization?: boolean; /** * Determines row virtualization mode. * + * * Valid values: * "fixed" Renders only the visible rows and/or columns in the grid. On scrolling the same rows and/or columns are updated with new data from the data source. Only fixed virtualization can work with column virtualization at the same time. Fixed virtualization is not supported by some grid features: Resizing, Group By, Responsive. * "continuous" renders a pre-defined number of rows in the grid. On scrolling the continuous virtualization loads another portion of rows and disposes the current one. @@ -42306,27 +49370,32 @@ interface IgGrid { /** * Enables virtualization for rows only. [Here you can find more info about igGrid row virtualization](http://www.igniteui.com/help/iggrid-virtualization-overview) + * */ rowVirtualization?: boolean; /** * Enables virtualization for columns only. Column virtualization can work only in combination with fixed row virtalization. Setting columnVirtualization to true will automatically set [virtualization](ui.iggrid#options:virtualization) to true and [virtualizationMode](ui.iggrid#options:virtualizationMode) to "fixed". + * */ columnVirtualization?: boolean; /** * Number of pixels to scroll the grid by, when virtualization is enabled, and mouse wheel scrolling is performed over the virtual grid area. If "null" the step will be equal to the [avgRowHeight](ui.iggrid#options:avgRowHeight). + * */ virtualizationMouseWheelStep?: number; /** * If this option is set to true, the height of the grid row will be calculated automatically based on the [avgRowHeight](ui.iggrid#options:avgRowHeight) and the visible virtual records. If no [avgRowHeight](ui.iggrid#options:avgRowHeight) is specified, it will be calculated automatically at runtime. + * */ adjustVirtualHeights?: boolean; /** * The templating engine that will be used to render the grid [column templates](ui.iggrid#options:columns.template). [Here you can find](http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/05/30/using-different-template-engines-with-ignite-ui-controls.aspx) how to use templating engines other than igTemplating and jsRender. * + * * Valid values: * "infragistics" The grid will use the Infragistics Templating engine to render its [column templates](ui.iggrid#options:columns.template) and specific parts of the UI. * "jsRender" The grid will use jsRender to render its [column templates](ui.iggrid#options:columns.template) and specific parts of the UI. @@ -42335,12 +49404,14 @@ interface IgGrid { /** * An array of column objects. Checkout the [Columns and Layout](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-columns) topic for details on configuring the columns array. + * */ columns?: IgGridColumn[]; /** * Can be any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an $.ig.DataSource itself * + * * Valid values: * "array" dataSource as an array * "object" ddataSource as an object @@ -42350,86 +49421,102 @@ interface IgGrid { /** * Specifies a remote URL as a data source, from which data will be retrieved using the [$.ig.DataSource](ig.datasource). + * */ dataSourceUrl?: string; /** * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type). + * */ dataSourceType?: string; /** * See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). This is the property in the responses where data records are held, if the response is wrapped. + * */ responseDataKey?: string; /** - * See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. + * This option has been deprecated. See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. */ responseTotalRecCountKey?: string; /** * Specifies the HTTP verb to be used to issue the requests to a remote data source. + * */ requestType?: string; /** * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType + * */ responseContentType?: string; /** * Controls the visibility of the grid header. + * */ showHeader?: boolean; /** * Controls the visibility of the grid footer. + * */ showFooter?: boolean; /** * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedHeaders will always act as if it's true, no matter which value is set. + * */ fixedHeaders?: boolean; /** * Footers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedFooters will always act as if it's true, no matter which value is set. + * */ fixedFooters?: boolean; /** * Caption text that will be shown above the grid header. + * */ caption?: string; /** * List of grid feature definitions: sorting, paging, etc. Each feature goes with its separate options that are documented for the feature accordingly. [Here you can find detailed documentation for all igGrid features](http://www.igniteui.com/help/iggrid-features-landing-page) + * */ features?: IgGridFeature[]; /** * Initial tabIndex attribute that will be set on all focusable elements. + * */ tabIndex?: number; /** * If this option is set to false, the data to which the grid is bound will be used "as is" with no additional transformations based on [columns](ui.iggrid#options:columns) defined. Otherwise only the subset of data properties used in the [columns](ui.iggrid#options:columns) defined will be extracted in a new object and used. + * */ localSchemaTransform?: boolean; /** * Key of the column containing unique identifiers for the data records. + * */ primaryKey?: string; /** * If true, the transaction log will always be sent in the request for remote data, by the data source. Also this means that if there are values in the log, a POST will be performed instead of GET. + * */ serializeTransactionLog?: boolean; /** * Automatically commits the transactions as rows/cells are being edited to the client data source. A [saveChanges](ui.iggrid#methods:saveChanges) call still needs to be performed in order to commit the transactions to a server-side data source. + * */ autoCommit?: boolean; @@ -42439,12 +49526,14 @@ interface IgGrid { * If a new row is added, edited, then deleted, there will be no transaction added to the log. * If several edits are made to a row or an individual cell, this should result in a single transaction. * Note: This option takes effect only when [autoCommit](ui.iggrid#options:autoCommit) is set to false. + * */ aggregateTransactions?: boolean; /** * Sets gets ability to automatically format text in cells for numeric and date columns. The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) * + * * Valid values: * "date" formats only Date columns * "number" formats only number columns @@ -42456,58 +49545,69 @@ interface IgGrid { /** * Gets sets ability to render checkboxes and use checkbox editor when dataType of a column is "bool". Checkboxes are not rendered for boolean values in columns with a [column template](ui.iggrid#options:columns.template). + * */ renderCheckboxes?: boolean; /** * URL to which updating requests will be made. + * */ updateUrl?: string; /** * Settings related to REST compliant update routines. + * */ restSettings?: IgGridRestSettings; /** * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). + * */ alternateRowStyles?: boolean; /** * If set to true and all columns' widths are specified and their combined width is less than the grid width then the last column width will be automatically adjusted to fill the remaining empty space of the grid. + * */ autofitLastColumn?: boolean; /** * Enables/disables rendering of hover styles when the mouse is over a record. This can be useful in templating scenarios, for example, where we don't want to apply hover styling to templated content. + * */ enableHoverStyles?: boolean; /** * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * */ enableUTCDates?: boolean; /** * Merge unbound columns values inside data source when data source is remote. If true then the unbound columns are merged to the data source at runtime on the server. Note that data source is expanded with the new data and this could cause performance issues when the data is huge. If mergeUnboundColumns is false then the unbound data is sent and merged on the client. This option is used by the [igGrid MVC Helper](http://www.igniteui.com/help/iggrid-developing-asp-net-mvc-applications-with-iggrid). * Checkout [Populating Unbound Columns Remotely (igGrid)](http://www.igniteui.com/help/iggrid-unboundcolumns-populating-with-data-remotely) topic for more information. + * */ mergeUnboundColumns?: boolean; /** * When dataSource is a remote URL, defines whether to set the type of the remote data source to JSONP. + * */ jsonpRequest?: boolean; /** * Enables/disables grid adjusting its dimensions when its [width](ui.iggrid#options:width) and/or [height](ui.iggrid#options:height) is set in percent (%) and grid parent DOM container is resized. + * */ enableResizeContainerCheck?: boolean; /** * Configures how the feature chooser icon should display on header cells - e.g. to display as gear icon or not. * + * * Valid values: * "none" Always hide the feature chooser icon; The feature chooser is shown on tapping/clicking the column header. * "desktopOnly" Always show the icon on desktop but hide when touch device detected. @@ -42517,9 +49617,22 @@ interface IgGrid { /** * Settings related to content scrolling. + * */ scrollSettings?: IgGridScrollSettings; + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event fired when a cell is clicked. */ @@ -42658,6 +49771,11 @@ interface IgGridMethods { * Returns the element holding the data records */ widget(): void; + + /** + * Changes the the regional settings of widget element to the language specified in [options.regional](ui.iggrid#options:regional) + * Note that this method is for rare scenarios, use [regional](ui.iggrid#options:regional) option setter + */ changeRegional(): void; /** @@ -43001,6 +50119,8 @@ interface IgGridMethods { /** * Causes the grid to data bind to the data source (local or remote) , and re-render all of the data as well + * + * @param internal */ dataBind(internal: Object): void; @@ -43119,8 +50239,28 @@ interface IgGridMethods { * 1. Remove custom CSS classes that were added. * 2. Unwrap any wrapping elements such as scrolling divs and other containers. * 3. Unbind all events that were bound. + * + * @param notToCallDestroy */ destroy(notToCallDestroy: Object): void; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igGrid"): IgGridMethods; @@ -43199,9 +50339,27 @@ interface JQuery { igGrid(methodName: "virtualScrollTo", scrollerPosition: Object): void; igGrid(methodName: "getColumnByTD", $td: Object): Object; igGrid(methodName: "destroy", notToCallDestroy: Object): void; + igGrid(methodName: "changeLocale", $container: Object): void; + igGrid(methodName: "changeGlobalLanguage"): void; + igGrid(methodName: "changeGlobalRegional"): void; + + /** + * Set/Get the locale setting for the widget. + * + */ + igGrid(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "locale", optionValue: any): void; /** * Defines the grid width in pixels or percents. [Here you can find more info about setting igGrid width](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * */ igGrid(optionLiteral: 'option', optionName: "width"): string|number; @@ -43209,6 +50367,7 @@ interface JQuery { /** * Defines the grid width in pixels or percents. [Here you can find more info about setting igGrid width](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). * + * * @optionValue New value to be set. */ @@ -43216,6 +50375,7 @@ interface JQuery { /** * This is the total height of the grid, including all UI elements - scroll container with data rows, header, footer, filter row - (if any), etc. [Here you can find more info about setting igGrid height](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * */ igGrid(optionLiteral: 'option', optionName: "height"): string|number; @@ -43223,6 +50383,7 @@ interface JQuery { /** * This is the total height of the grid, including all UI elements - scroll container with data rows, header, footer, filter row - (if any), etc. [Here you can find more info about setting igGrid height](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). * + * * @optionValue New value to be set. */ @@ -43230,18 +50391,21 @@ interface JQuery { /** * If autoAdjustHeight is set to false, the [height](ui.iggrid#options:height) will be set only on the scrolling container, and all other UI elements such as paging footer / filter row / headers will add on top of that, so the total height of the grid will be more than this value - the height of the scroll container (content area) will not be dynamically calculated. Setting this option to false will usually result in a lot better initial rendering performance for large data ( > 1000 rows rendered at once, no [virtualization](ui.iggrid#options:virtualization) enabled), since no reflows will be made by browsers when accessing DOM properties such as offsetHeight. + * */ igGrid(optionLiteral: 'option', optionName: "autoAdjustHeight"): boolean; /** * If autoAdjustHeight is set to false, the [height](ui.iggrid#options:height) will be set only on the scrolling container, and all other UI elements such as paging footer / filter row / headers will add on top of that, so the total height of the grid will be more than this value - the height of the scroll container (content area) will not be dynamically calculated. Setting this option to false will usually result in a lot better initial rendering performance for large data sets ( > 1000 rows rendered at once, no [virtualization](ui.iggrid#options:virtualization) enabled), since no reflows will be made by browsers when accessing DOM properties such as offsetHeight. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "autoAdjustHeight", optionValue: boolean): void; /** * Used for [row virtualization](ui.iggrid#options:rowVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels (default) that will be used to calculate how many rows to render as the end user scrolls. Also all rows' height will be automatically set to this value. + * */ igGrid(optionLiteral: 'option', optionName: "avgRowHeight"): string|number; @@ -43249,6 +50413,7 @@ interface JQuery { /** * Used for [row virtualization](ui.iggrid#options:rowVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels (default) that will be used to calculate how many rows to render as the end user scrolls. Also all rows' height will be automatically set to this value. * + * * @optionValue New value to be set. */ @@ -43256,6 +50421,7 @@ interface JQuery { /** * Used for [column virtualization](ui.iggrid#options:columnVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels for a column width. + * */ igGrid(optionLiteral: 'option', optionName: "avgColumnWidth"): string|number; @@ -43263,19 +50429,22 @@ interface JQuery { /** * Used for [column virtualization](ui.iggrid#options:columnVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels for a column width. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "avgColumnWidth", optionValue: string|number): void; /** - * Default column width that will be set for all columns, that don't have [column width](ui.iggrid#options:columns.width) defined. + * Default column width that will be set for all columns, that don't have [column width](ui.iggrid#options:columns.width) defined. Can also be set as '*', in which case the width auto-size based on the content of the column cells (including the header text). + * */ igGrid(optionLiteral: 'option', optionName: "defaultColumnWidth"): string|number; /** - * Default column width that will be set for all columns, that don't have [column width](ui.iggrid#options:columns.width) defined. + * Default column width that will be set for all columns, that don't have [column width](ui.iggrid#options:columns.width) defined. Can also be set as '*', in which case the width auto-size based on the content of the column cells (including the header text). + * * * @optionValue New value to be set. */ @@ -43286,6 +50455,7 @@ interface JQuery { * If no [columns](ui.iggrid#options:columns) collection is defined, and autoGenerateColumns is set to true, [columns](ui.iggrid#options:columns) will be inferred from the data source before the [dataRendering](ui.iggrid#events:dataRendering) event is fired. The inferred [columns](ui.iggrid#options:columns) collection will be available to the developer for modification at [dataRendering](ui.iggrid#events:dataRendering). If autoGenerateColumns is not explicitly set and [columns](ui.iggrid#options:columns) has at least one column defined then autoGenerateColumns is automatically set to false. * If autoGenerateColumns is true and there are columns defined auto-generated columns will render after the explicitly defined ones. * Since auto-generated columns don't have width defined consider setting [defaultColumnWidth](ui.iggrid#options:defaultColumnWidth) as well. + * */ igGrid(optionLiteral: 'option', optionName: "autoGenerateColumns"): boolean; @@ -43294,24 +50464,28 @@ interface JQuery { * If autoGenerateColumns is true and there are columns defined auto-generated columns will render after the explicitly defined ones. * Since auto-generated columns don't have width defined consider setting [defaultColumnWidth](ui.iggrid#options:defaultColumnWidth) as well. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "autoGenerateColumns", optionValue: boolean): void; /** * Enables/disables column and row virtualization at the same time. Virtualization can greatly enhance rendering performance. If enabled, the number of actual rendered rows (DOM elements) will be constant and related to the visible viewport of the grid. As the end user scrolls, those DOM elements will be dynamically reused to render the new data. [Here you can find more info about the performance guidelines when using the igGrid](http://www.igniteui.com/help/iggrid-performance-guide) + * */ igGrid(optionLiteral: 'option', optionName: "virtualization"): boolean; /** * Enables/disables column and row virtualization at the same time. Virtualization can greatly enhance rendering performance. If enabled, the number of actual rendered rows (DOM elements) will be constant and related to the visible viewport of the grid. As the end user scrolls, those DOM elements will be dynamically reused to render the new data. [Here you can find more info about the performance guidelines when using the igGrid](http://www.igniteui.com/help/iggrid-performance-guide) * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "virtualization", optionValue: boolean): void; /** * Determines row virtualization mode. + * */ igGrid(optionLiteral: 'option', optionName: "virtualizationMode"): string; @@ -43319,6 +50493,7 @@ interface JQuery { /** * Determines row virtualization mode. * + * * @optionValue New value to be set. */ @@ -43326,54 +50501,63 @@ interface JQuery { /** * Enables virtualization for rows only. [Here you can find more info about igGrid row virtualization](http://www.igniteui.com/help/iggrid-virtualization-overview) + * */ igGrid(optionLiteral: 'option', optionName: "rowVirtualization"): boolean; /** * Enables virtualization for rows only. [Here you can find more info about igGrid row virtualization](http://www.igniteui.com/help/iggrid-virtualization-overview) * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "rowVirtualization", optionValue: boolean): void; /** * Enables virtualization for columns only. Column virtualization can work only in combination with fixed row virtalization. Setting columnVirtualization to true will automatically set [virtualization](ui.iggrid#options:virtualization) to true and [virtualizationMode](ui.iggrid#options:virtualizationMode) to "fixed". + * */ igGrid(optionLiteral: 'option', optionName: "columnVirtualization"): boolean; /** * Enables virtualization for columns only. Column virtualization can work only in combination with fixed row virtalization. Setting columnVirtualization to true will automatically set [virtualization](ui.iggrid#options:virtualization) to true and [virtualizationMode](ui.iggrid#options:virtualizationMode) to "fixed". * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "columnVirtualization", optionValue: boolean): void; /** * Number of pixels to scroll the grid by, when virtualization is enabled, and mouse wheel scrolling is performed over the virtual grid area. If "null" the step will be equal to the [avgRowHeight](ui.iggrid#options:avgRowHeight). + * */ igGrid(optionLiteral: 'option', optionName: "virtualizationMouseWheelStep"): number; /** * Number of pixels to scroll the grid by, when virtualization is enabled, and mouse wheel scrolling is performed over the virtual grid area. If "null" the step will be equal to the [avgRowHeight](ui.iggrid#options:avgRowHeight). * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "virtualizationMouseWheelStep", optionValue: number): void; /** * If this option is set to true, the height of the grid row will be calculated automatically based on the [avgRowHeight](ui.iggrid#options:avgRowHeight) and the visible virtual records. If no [avgRowHeight](ui.iggrid#options:avgRowHeight) is specified, it will be calculated automatically at runtime. + * */ igGrid(optionLiteral: 'option', optionName: "adjustVirtualHeights"): boolean; /** * If this option is set to true, the height of the grid row will be calculated automatically based on the [avgRowHeight](ui.iggrid#options:avgRowHeight) and the visible virtual records. If no [avgRowHeight](ui.iggrid#options:avgRowHeight) is specified, it will be calculated automatically at runtime. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "adjustVirtualHeights", optionValue: boolean): void; /** * The templating engine that will be used to render the grid [column templates](ui.iggrid#options:columns.template). [Here you can find](http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/05/30/using-different-template-engines-with-ignite-ui-controls.aspx) how to use templating engines other than igTemplating and jsRender. + * */ igGrid(optionLiteral: 'option', optionName: "templatingEngine"): string; @@ -43381,6 +50565,7 @@ interface JQuery { /** * The templating engine that will be used to render the grid [column templates](ui.iggrid#options:columns.template). [Here you can find](http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/05/30/using-different-template-engines-with-ignite-ui-controls.aspx) how to use templating engines other than igTemplating and jsRender. * + * * @optionValue New value to be set. */ @@ -43388,18 +50573,21 @@ interface JQuery { /** * An array of column objects. Checkout the [Columns and Layout](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-columns) topic for details on configuring the columns array. + * */ igGrid(optionLiteral: 'option', optionName: "columns"): IgGridColumn[]; /** * An array of column objects. Checkout the [Columns and Layout](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-columns) topic for details on configuring the columns array. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "columns", optionValue: IgGridColumn[]): void; /** * Can be any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an $.ig.DataSource itself + * */ igGrid(optionLiteral: 'option', optionName: "dataSource"): Array|Object|string; @@ -43407,6 +50595,7 @@ interface JQuery { /** * Can be any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an $.ig.DataSource itself * + * * @optionValue New value to be set. */ @@ -43414,47 +50603,53 @@ interface JQuery { /** * Gets a remote URL as a data source, from which data will be retrieved using the [$.ig.DataSource](ig.datasource). + * */ igGrid(optionLiteral: 'option', optionName: "dataSourceUrl"): string; /** * Sets a remote URL as a data source, from which data will be retrieved using the [$.ig.DataSource](ig.datasource). * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "dataSourceUrl", optionValue: string): void; /** * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type). + * */ igGrid(optionLiteral: 'option', optionName: "dataSourceType"): string; /** * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type). * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; /** * See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). This is the property in the responses where data records are held, if the response is wrapped. + * */ igGrid(optionLiteral: 'option', optionName: "responseDataKey"): string; /** * See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). This is the property in the responses where data records are held, if the response is wrapped. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; /** - * See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. + * This option has been deprecated. See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. */ igGrid(optionLiteral: 'option', optionName: "responseTotalRecCountKey"): string; /** - * See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. + * This option has been deprecated. See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. * * @optionValue New value to be set. */ @@ -43462,156 +50657,182 @@ interface JQuery { /** * Gets the HTTP verb to be used to issue the requests to a remote data source. + * */ igGrid(optionLiteral: 'option', optionName: "requestType"): string; /** * Sets the HTTP verb to be used to issue the requests to a remote data source. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "requestType", optionValue: string): void; /** * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType + * */ igGrid(optionLiteral: 'option', optionName: "responseContentType"): string; /** * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "responseContentType", optionValue: string): void; /** * Controls the visibility of the grid header. + * */ igGrid(optionLiteral: 'option', optionName: "showHeader"): boolean; /** * Controls the visibility of the grid header. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "showHeader", optionValue: boolean): void; /** * Controls the visibility of the grid footer. + * */ igGrid(optionLiteral: 'option', optionName: "showFooter"): boolean; /** * Controls the visibility of the grid footer. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "showFooter", optionValue: boolean): void; /** * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedHeaders will always act as if it's true, no matter which value is set. + * */ igGrid(optionLiteral: 'option', optionName: "fixedHeaders"): boolean; /** * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedHeaders will always act as if it's true, no matter which value is set. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "fixedHeaders", optionValue: boolean): void; /** * Footers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedFooters will always act as if it's true, no matter which value is set. + * */ igGrid(optionLiteral: 'option', optionName: "fixedFooters"): boolean; /** * Footers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedFooters will always act as if it's true, no matter which value is set. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "fixedFooters", optionValue: boolean): void; /** * Caption text that will be shown above the grid header. + * */ igGrid(optionLiteral: 'option', optionName: "caption"): string; /** * Caption text that will be shown above the grid header. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "caption", optionValue: string): void; /** * List of grid feature definitions: sorting, paging, etc. Each feature goes with its separate options that are documented for the feature accordingly. [Here you can find detailed documentation for all igGrid features](http://www.igniteui.com/help/iggrid-features-landing-page) + * */ igGrid(optionLiteral: 'option', optionName: "features"): IgGridFeature[]; /** * List of grid feature definitions: sorting, paging, etc. Each feature goes with its separate options that are documented for the feature accordingly. [Here you can find detailed documentation for all igGrid features](http://www.igniteui.com/help/iggrid-features-landing-page) * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "features", optionValue: IgGridFeature[]): void; /** * Initial tabIndex attribute that will be set on all focusable elements. + * */ igGrid(optionLiteral: 'option', optionName: "tabIndex"): number; /** * Initial tabIndex attribute that will be set on all focusable elements. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; /** * If this option is set to false, the data to which the grid is bound will be used "as is" with no additional transformations based on [columns](ui.iggrid#options:columns) defined. Otherwise only the subset of data properties used in the [columns](ui.iggrid#options:columns) defined will be extracted in a new object and used. + * */ igGrid(optionLiteral: 'option', optionName: "localSchemaTransform"): boolean; /** * If this option is set to false, the data to which the grid is bound will be used "as is" with no additional transformations based on [columns](ui.iggrid#options:columns) defined. Otherwise only the subset of data properties used in the [columns](ui.iggrid#options:columns) defined will be extracted in a new object and used. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "localSchemaTransform", optionValue: boolean): void; /** * Key of the column containing unique identifiers for the data records. + * */ igGrid(optionLiteral: 'option', optionName: "primaryKey"): string; /** * Key of the column containing unique identifiers for the data records. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "primaryKey", optionValue: string): void; /** * If true, the transaction log will always be sent in the request for remote data, by the data source. Also this means that if there are values in the log, a POST will be performed instead of GET. + * */ igGrid(optionLiteral: 'option', optionName: "serializeTransactionLog"): boolean; /** * If true, the transaction log will always be sent in the request for remote data, by the data source. Also this means that if there are values in the log, a POST will be performed instead of GET. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "serializeTransactionLog", optionValue: boolean): void; /** * Automatically commits the transactions as rows/cells are being edited to the client data source. A [saveChanges](ui.iggrid#methods:saveChanges) call still needs to be performed in order to commit the transactions to a server-side data source. + * */ igGrid(optionLiteral: 'option', optionName: "autoCommit"): boolean; /** * Automatically commits the transactions as rows/cells are being edited to the client data source. A [saveChanges](ui.iggrid#methods:saveChanges) call still needs to be performed in order to commit the transactions to a server-side data source. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "autoCommit", optionValue: boolean): void; @@ -43622,6 +50843,7 @@ interface JQuery { * If a new row is added, edited, then deleted, there will be no transaction added to the log. * If several edits are made to a row or an individual cell, this should result in a single transaction. * Note: This option takes effect only when [autoCommit](ui.iggrid#options:autoCommit) is set to false. + * */ igGrid(optionLiteral: 'option', optionName: "aggregateTransactions"): boolean; @@ -43632,12 +50854,14 @@ interface JQuery { * If several edits are made to a row or an individual cell, this should result in a single transaction. * Note: This option takes effect only when [autoCommit](ui.iggrid#options:autoCommit) is set to false. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "aggregateTransactions", optionValue: boolean): void; /** * Sets gets ability to automatically format text in cells for numeric and date columns. The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) + * */ igGrid(optionLiteral: 'option', optionName: "autoFormat"): string|boolean; @@ -43645,6 +50869,7 @@ interface JQuery { /** * Sets gets ability to automatically format text in cells for numeric and date columns. The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) * + * * @optionValue New value to be set. */ @@ -43652,84 +50877,98 @@ interface JQuery { /** * Gets ability to render checkboxes and use checkbox editor when dataType of a column is "bool". Checkboxes are not rendered for boolean values in columns with a [column template](ui.iggrid#options:columns.template). + * */ igGrid(optionLiteral: 'option', optionName: "renderCheckboxes"): boolean; /** * Sets ability to render checkboxes and use checkbox editor when dataType of a column is "bool". Checkboxes are not rendered for boolean values in columns with a [column template](ui.iggrid#options:columns.template). * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "renderCheckboxes", optionValue: boolean): void; /** * URL to which updating requests will be made. + * */ igGrid(optionLiteral: 'option', optionName: "updateUrl"): string; /** * URL to which updating requests will be made. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "updateUrl", optionValue: string): void; /** * Settings related to REST compliant update routines. + * */ igGrid(optionLiteral: 'option', optionName: "restSettings"): IgGridRestSettings; /** * Settings related to REST compliant update routines. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "restSettings", optionValue: IgGridRestSettings): void; /** * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). + * */ igGrid(optionLiteral: 'option', optionName: "alternateRowStyles"): boolean; /** * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "alternateRowStyles", optionValue: boolean): void; /** * If set to true and all columns' widths are specified and their combined width is less than the grid width then the last column width will be automatically adjusted to fill the remaining empty space of the grid. + * */ igGrid(optionLiteral: 'option', optionName: "autofitLastColumn"): boolean; /** * If set to true and all columns' widths are specified and their combined width is less than the grid width then the last column width will be automatically adjusted to fill the remaining empty space of the grid. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "autofitLastColumn", optionValue: boolean): void; /** * Enables/disables rendering of hover styles when the mouse is over a record. This can be useful in templating scenarios, for example, where we don't want to apply hover styling to templated content. + * */ igGrid(optionLiteral: 'option', optionName: "enableHoverStyles"): boolean; /** * Enables/disables rendering of hover styles when the mouse is over a record. This can be useful in templating scenarios, for example, where we don't want to apply hover styling to templated content. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "enableHoverStyles", optionValue: boolean): void; /** * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * */ igGrid(optionLiteral: 'option', optionName: "enableUTCDates"): boolean; /** * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "enableUTCDates", optionValue: boolean): void; @@ -43737,6 +50976,7 @@ interface JQuery { /** * Merge unbound columns values inside data source when data source is remote. If true then the unbound columns are merged to the data source at runtime on the server. Note that data source is expanded with the new data and this could cause performance issues when the data is huge. If mergeUnboundColumns is false then the unbound data is sent and merged on the client. This option is used by the [igGrid MVC Helper](http://www.igniteui.com/help/iggrid-developing-asp-net-mvc-applications-with-iggrid). * Checkout [Populating Unbound Columns Remotely (igGrid)](http://www.igniteui.com/help/iggrid-unboundcolumns-populating-with-data-remotely) topic for more information. + * */ igGrid(optionLiteral: 'option', optionName: "mergeUnboundColumns"): boolean; @@ -43744,36 +50984,42 @@ interface JQuery { * Merge unbound columns values inside data source when data source is remote. If true then the unbound columns are merged to the data source at runtime on the server. Note that data source is expanded with the new data and this could cause performance issues when the data is huge. If mergeUnboundColumns is false then the unbound data is sent and merged on the client. This option is used by the [igGrid MVC Helper](http://www.igniteui.com/help/iggrid-developing-asp-net-mvc-applications-with-iggrid). * Checkout [Populating Unbound Columns Remotely (igGrid)](http://www.igniteui.com/help/iggrid-unboundcolumns-populating-with-data-remotely) topic for more information. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "mergeUnboundColumns", optionValue: boolean): void; /** * When dataSource is a remote URL, defines whether to set the type of the remote data source to JSONP. + * */ igGrid(optionLiteral: 'option', optionName: "jsonpRequest"): boolean; /** * When dataSource is a remote URL, defines whether to set the type of the remote data source to JSONP. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "jsonpRequest", optionValue: boolean): void; /** * Enables/disables grid adjusting its dimensions when its [width](ui.iggrid#options:width) and/or [height](ui.iggrid#options:height) is set in percent (%) and grid parent DOM container is resized. + * */ igGrid(optionLiteral: 'option', optionName: "enableResizeContainerCheck"): boolean; /** * Enables/disables grid adjusting its dimensions when its [width](ui.iggrid#options:width) and/or [height](ui.iggrid#options:height) is set in percent (%) and grid parent DOM container is resized. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "enableResizeContainerCheck", optionValue: boolean): void; /** * Configures how the feature chooser icon should display on header cells - e.g. to display as gear icon or not. + * */ igGrid(optionLiteral: 'option', optionName: "featureChooserIconDisplay"): string; @@ -43781,6 +51027,7 @@ interface JQuery { /** * Configures how the feature chooser icon should display on header cells - e.g. to display as gear icon or not. * + * * @optionValue New value to be set. */ @@ -43788,16 +51035,48 @@ interface JQuery { /** * Settings related to content scrolling. + * */ igGrid(optionLiteral: 'option', optionName: "scrollSettings"): IgGridScrollSettings; /** * Settings related to content scrolling. * + * * @optionValue New value to be set. */ igGrid(optionLiteral: 'option', optionName: "scrollSettings", optionValue: IgGridScrollSettings): void; + /** + * Set/Get the locale language setting for the widget. + * + */ + igGrid(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igGrid(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igGrid(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event fired when a cell is clicked. */ @@ -44111,16 +51390,19 @@ interface IgGridGroupByGroupedColumn { /** * sort order - ascending or descending + * */ dir?: any; /** * Key of the columnLayout, if the grid is hierarchical + * */ layout?: string; /** * [column](ui.iggrid#options:columns) object for the column that is grouped + * */ col?: any; @@ -44133,11 +51415,13 @@ interface IgGridGroupByGroupedColumn { interface IgGridGroupBySummarySettings { /** * Specifies the delimiter for multiple summaries. + * */ multiSummaryDelimiter?: string; /** * Format of the summary value. By default, two digits are shown after the decimal place. Checkout [Formatting Dates, Numbers and Strings](http://www.igniteui.com/help/formatting-dates-numbers-and-strings) for details on the valid formatting specifiers. + * */ summaryFormat?: string; @@ -44151,6 +51435,7 @@ interface IgGridGroupByColumnSettingsSummaries { /** * the summary function key * + * * Valid values: * "avg" average summary function * "min" minimum summary function @@ -44163,6 +51448,7 @@ interface IgGridGroupByColumnSettingsSummaries { /** * Specifies the summary text that will be shown before the value + * */ text?: string; @@ -44173,6 +51459,7 @@ interface IgGridGroupByColumnSettingsSummaries { * key - key of the grouped column, * allGroupData - array of data records for the group(for the whole data source - not only for the data view) * + * * Valid values: * "string" the name of the function as a string located in the global window object. * "function" which will be used for calculating the summary value. @@ -44188,11 +51475,13 @@ interface IgGridGroupByColumnSettingsSummaries { interface IgGridGroupByColumnSettings { /** * Enables/disables grouping a column from the UI. By default all columns can be grouped. + * */ allowGrouping?: boolean; /** * Specifies the initial column grouped state. + * */ isGroupBy?: boolean; @@ -44207,6 +51496,7 @@ interface IgGridGroupByColumnSettings { * 1 - indicating that val1 > val2 * -1 - indicating that val1 < val2 * + * * Valid values: * "string" the name of the function as a string located in the global window object. * "function" function which will be used for custom comparison. @@ -44221,6 +51511,7 @@ interface IgGridGroupByColumnSettings { /** * Reference/name of a function (string or function) which will be used for formatting the cell values. The function should accept a value from the grouped column and return the new formatted value in the label of the row. * + * * Valid values: * "string" the name of the function as a string located in the global window object. * "function" which will be used for formatting the cell values. @@ -44229,16 +51520,19 @@ interface IgGridGroupByColumnSettings { /** * Specifies the sort order - ascending or descending when the column is initially grouped ([isGroupBy](ui.iggridgroupby#options:columnSettings.isGroupBy) = true). + * */ dir?: any; /** * A list of aggregation functions to calculate on the column values for each group. When not specified the default aggregate function is "count". + * */ summaries?: IgGridGroupByColumnSettingsSummaries; /** * Enables/disables default summaries per group data island or specifies summaries that are applied to specific column no matter the group. + * */ groupSummaries?: any; @@ -44251,96 +51545,115 @@ interface IgGridGroupByColumnSettings { interface IgGridGroupByLocale { /** * Specifies the group by area text. + * */ emptyGroupByAreaContent?: string; /** * Specifies the text for the hyperlink which opens the GroupBy Dialog. + * */ emptyGroupByAreaContentSelectColumns?: string; /** * Specifies the caption for the hyperlink which opens the GroupBy Dialog. + * */ emptyGroupByAreaContentSelectColumnsCaption?: string; /** * Specifies the expand groups button tooltip. + * */ expandTooltip?: string; /** * Specifies the collapse groups button tooltip. + * */ collapseTooltip?: string; /** * Specifies the remove group button tooltip. + * */ removeButtonTooltip?: string; /** * Specifies caption for each descending sorted column in GroupBy Dialog. + * */ modalDialogCaptionButtonDesc?: string; /** * Specifies caption for each descending sorted column in GroupBy Dialog. + * */ modalDialogCaptionButtonAsc?: string; /** * Specifies caption for ungroup button in GroupBy Dialog. + * */ modalDialogCaptionButtonUngroup?: string; /** * Specifies text for group button in GroupBy Dialog. + * */ modalDialogGroupByButtonText?: string; /** * Specifies caption text for the GroupBy Dialog. + * */ modalDialogCaptionText?: string; /** * Specifies label for layouts dropdown in the GroupBy Dialog. + * */ modalDialogDropDownLabel?: string; /** * Specifies label for "Clear all" button in the GroupBy Dialog. + * */ modalDialogClearAllButtonLabel?: string; /** * Specifies name of the root layout which is shown for the layouts in the modal dialog tree. + * */ modalDialogRootLevelHierarchicalGrid?: string; /** * Specifies caption of layouts dropdown button in the GroupBy Dialog. + * */ modalDialogDropDownButtonCaption?: string; /** * Specifies text of button which apply changes in modal dialog. + * */ modalDialogButtonApplyText?: string; /** * Specifies text of button which cancel changes in modal dialog. + * */ modalDialogButtonCancelText?: string; /** * Specifies the summary row title. + * */ summaryRowTitle?: string; /** * Specifies the summary icon title. + * */ summaryIconTitle?: string; @@ -44720,6 +52033,7 @@ interface IgGridGroupBy { /** * Sets the place in the grid where the GroupBy area will be * + * * Valid values: * "top" the GroupBy area will be rendered above the grid headers * "hidden" the GroupBy area will not be rendered @@ -44729,12 +52043,14 @@ interface IgGridGroupBy { /** * Specifies if after grouping, the grouped rows will be initially expanded or collapsed. + * */ initialExpand?: boolean; /** * Specifies when paging is applied and there is at least one grouped column which records should be included in page processing. * + * * Valid values: * "allRecords" All records are included in page processing - data records and group-by metadata records * "dataRecordsOnly" Only data records are included in page processing(metadata group-by records are ignored) @@ -44743,27 +52059,32 @@ interface IgGridGroupBy { /** * Specifies if grouped rows will have an expander image that will allow end users to expand and collapse them. This option can be set only at initialization. + * */ expansionIndicatorVisibility?: boolean; /** * By default, the column width for the header is taken. If this is specified it's used for all headers. + * */ groupByLabelWidth?: number; /** * Specifies the opacity of the drag markup, while a column header is being dragged. The value must be between 0 and 1. + * */ labelDragHelperOpacity?: number; /** * Specifies the indentation for a grouped row. If several columns are grouped, the total indentation will grow + * */ indentation?: number; /** * default sort order - ascending or descending * + * * Valid values: * "asc" The group is sorted in ascending order. * "desc" The group is sorted in descending order. @@ -44772,22 +52093,26 @@ interface IgGridGroupBy { /** * Returns the list of currently grouped columns. The option is read-only and cannot be set at initialization or at runtime. + * */ groupedColumns?: IgGridGroupByGroupedColumn[]; /** * Specifies a key to get group by data from the remote response. + * */ resultResponseKey?: string; /** * Template for the grouped row's text. Variables available for the template are ${key}, ${val} and ${count}. + * */ groupedRowTextTemplate?: string; /** * Specifies whether the GroupBy operation takes place locally on client-side or remotely on server-side. * + * * Valid values: * "local" Execute the GroupBy operation locally on client-side. * "remote" Execute the GroupBy operation by a request to the server. @@ -44796,26 +52121,31 @@ interface IgGridGroupBy { /** * URL param name which specifies a GroupBy [expression](ig.datasource#options:settings.sorting.expressions). When groupByUrlKey, [groupByUrlKeyAscValue](ui.iggridgroupby#options:groupByUrlKeyAscValue) and [groupByUrlKeyDescValue](ui.iggridgroupby#options:groupByUrlKeyDescValue) are set the request looks like: ?()= (Example: ?groupby(col1)=asc). Otherwise the OData conventions for sorting params are used. + * */ groupByUrlKey?: string; /** * URL param value denoting ascending grouping. When [groupByUrlKey](ui.iggridgroupby#options:groupByUrlKey), groupByUrlKeyAscValue and [groupByUrlKeyDescValue](ui.iggridgroupby#options:groupByUrlKeyDescValue) are set the request looks like: ?()= (Example: ?groupby(col1)=asc). Otherwise the OData conventions for sorting params are used. + * */ groupByUrlKeyAscValue?: string; /** * URL param value denoting descending grouping. When [groupByUrlKey](ui.iggridgroupby#options:groupByUrlKey), [groupByUrlKeyAscValue](ui.iggridgroupby#options:groupByUrlKeyAscValue) and groupByUrlKeyDescValue are set the request looks like: ?()= (Example: ?groupby(col1)=asc). Otherwise the OData conventions for sorting params are used. + * */ groupByUrlKeyDescValue?: string; /** * Specifies the settings for GroupBy summaries. + * */ summarySettings?: IgGridGroupBySummarySettings; /** * Configures individual column settings. + * */ columnSettings?: IgGridGroupByColumnSettings; @@ -44912,27 +52242,32 @@ interface IgGridGroupBy { /** * Enables/disables immediate column grouping/ungrouping. When false operation is delayed until after "Apply" button is clicked by the user. + * */ modalDialogGroupByOnClick?: boolean; /** * Specifies width of layouts dropdown in the GroupBy Dialog + * */ modalDialogDropDownWidth?: number; /** * Specifies width of layouts dropdown in the GroupBy Dialog + * */ modalDialogDropDownAreaWidth?: number; /** * Specifies time in milliseconds for animation duration to show/hide modal dialog + * */ modalDialogAnimationDuration?: number; /** * Specifies width of the GroupBy Dialog * + * * Valid values: * "string" The dialog width can be set in pixels (px) or percentage (%). Example values: "800px", "800" (defaults to pixels), "100%". * "number" The dialog width can be set in pixels as a number. Example values: 800, 700. @@ -44942,6 +52277,7 @@ interface IgGridGroupBy { /** * Specifies height of the GroupBy Dialog * + * * Valid values: * "string" The dialog height can be set in pixels (px) or percentage (%). Example values: "800px", "800" (defaults to pixels), "100%". * "number" The dialog height can be set in pixels as a number. Example values: 800, 700. @@ -44950,17 +52286,20 @@ interface IgGridGroupBy { /** * Format grouped column using the formatter set in [igGrid.columns.formatter](ui.iggrid#options:columns.formatter) or [igGrid.columns.format](ui.iggrid#options:columns.format). + * */ useGridColumnFormatter?: boolean; /** * Enables / disables GroupBy persistence between states. Checkout the [GroupBy Persistence](http://www.igniteui.com/help/iggrid-groupby-overview#groupBy-persistence) topic for details. + * */ persist?: boolean; /** * Controls containment behavior for the GroupBy Dialog. * + * * Valid values: * "owner" The GroupBy Dialog will be draggable only in the grid area * "window" The GroupBy Dialog will be draggable in the whole window area @@ -44969,6 +52308,7 @@ interface IgGridGroupBy { /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. Checkout the [Extending igGrid Modal Dialog](http://www.igniteui.com/help/extending-iggrid-modal-dialog) topic for details. + * */ dialogWidget?: string; @@ -44980,12 +52320,14 @@ interface IgGridGroupBy { /** * Specifies default summaries that will appear when grouping by a column on the bottom of each group as a row.This option has a lower priority than the groupSummaries defined under columnSettings for each column. * All default summaries are defined under $.ig.util.defaultSummaryMethods + * */ groupSummaries?: any; /** * Specifies the groupSummaries postion inside each group. * + * * Valid values: * "top" One summary row will be displayed at the top for each group * "bottom" One summary row will be displayed at the bottom for each group @@ -44993,6 +52335,18 @@ interface IgGridGroupBy { */ groupSummariesPosition?: string; + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event which is fired when the grouped columns collection is about to change. This event is fired even when button OK is clicked from the modal dialog(after event modalDialogButtonApplyClick is fired) */ @@ -45079,7 +52433,19 @@ interface IgGridGroupBy { [optionName: string]: any; } interface IgGridGroupByMethods { + changeGlobalLanguage(): void; + changeGlobalRegional(): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.iggridgroupby#options:language) + * Note that this method is for rare scenarios, see [language](ui.iggridgroupby#options:language) or [locale](ui.iggridgroupby#options:locale) option setter + */ changeLocale(): void; + + /** + * Changes the the regional settings of widget element to the language specified in [options.regional](ui.iggridgroupby#options:regional) + * Note that this method is for rare scenarios, use [regional](ui.iggridgroupby#options:regional) option setter + */ changeRegional(): void; /** @@ -45175,6 +52541,8 @@ interface JQuery { } interface JQuery { + igGridGroupBy(methodName: "changeGlobalLanguage"): void; + igGridGroupBy(methodName: "changeGlobalRegional"): void; igGridGroupBy(methodName: "changeLocale"): void; igGridGroupBy(methodName: "changeRegional"): void; igGridGroupBy(methodName: "openGroupByDialog"): void; @@ -45194,6 +52562,7 @@ interface JQuery { /** * Sets the place in the grid where the GroupBy area will be + * */ igGridGroupBy(optionLiteral: 'option', optionName: "groupByAreaVisibility"): string; @@ -45201,6 +52570,7 @@ interface JQuery { /** * Sets the place in the grid where the GroupBy area will be * + * * @optionValue New value to be set. */ @@ -45208,18 +52578,21 @@ interface JQuery { /** * Gets if after grouping, the grouped rows will be initially expanded or collapsed. + * */ igGridGroupBy(optionLiteral: 'option', optionName: "initialExpand"): boolean; /** * Sets if after grouping, the grouped rows will be initially expanded or collapsed. * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "initialExpand", optionValue: boolean): void; /** * Gets when paging is applied and there is at least one grouped column which records should be included in page processing. + * */ igGridGroupBy(optionLiteral: 'option', optionName: "pagingMode"): string; @@ -45227,6 +52600,7 @@ interface JQuery { /** * Sets when paging is applied and there is at least one grouped column which records should be included in page processing. * + * * @optionValue New value to be set. */ @@ -45234,54 +52608,63 @@ interface JQuery { /** * Gets if grouped rows will have an expander image that will allow end users to expand and collapse them. This option can be set only at initialization. + * */ igGridGroupBy(optionLiteral: 'option', optionName: "expansionIndicatorVisibility"): boolean; /** * Sets if grouped rows will have an expander image that will allow end users to expand and collapse them. This option can be set only at initialization. * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "expansionIndicatorVisibility", optionValue: boolean): void; /** * By default, the column width for the header is taken. If this is specified it's used for all headers. + * */ igGridGroupBy(optionLiteral: 'option', optionName: "groupByLabelWidth"): number; /** * By default, the column width for the header is taken. If this is specified it's used for all headers. * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "groupByLabelWidth", optionValue: number): void; /** * Gets the opacity of the drag markup, while a column header is being dragged. The value must be between 0 and 1. + * */ igGridGroupBy(optionLiteral: 'option', optionName: "labelDragHelperOpacity"): number; /** * Sets the opacity of the drag markup, while a column header is being dragged. The value must be between 0 and 1. * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "labelDragHelperOpacity", optionValue: number): void; /** * Specifies the indentation for a grouped row. If several columns are grouped, the total indentation will grow + * */ igGridGroupBy(optionLiteral: 'option', optionName: "indentation"): number; /** * Specifies the indentation for a grouped row. If several columns are grouped, the total indentation will grow * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "indentation", optionValue: number): void; /** * Default sort order - ascending or descending + * */ igGridGroupBy(optionLiteral: 'option', optionName: "defaultSortingDirection"): string; @@ -45289,6 +52672,7 @@ interface JQuery { /** * Default sort order - ascending or descending * + * * @optionValue New value to be set. */ @@ -45296,42 +52680,49 @@ interface JQuery { /** * Returns the list of currently grouped columns. The option is read-only and cannot be set at initialization or at runtime. + * */ igGridGroupBy(optionLiteral: 'option', optionName: "groupedColumns"): IgGridGroupByGroupedColumn[]; /** * Returns the list of currently grouped columns. The option is read-only and cannot be set at initialization or at runtime. * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "groupedColumns", optionValue: IgGridGroupByGroupedColumn[]): void; /** * Gets a key to get group by data from the remote response. + * */ igGridGroupBy(optionLiteral: 'option', optionName: "resultResponseKey"): string; /** * Sets a key to get group by data from the remote response. * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "resultResponseKey", optionValue: string): void; /** * Template for the grouped row's text. Variables available for the template are ${key}, ${val} and ${count}. + * */ igGridGroupBy(optionLiteral: 'option', optionName: "groupedRowTextTemplate"): string; /** * Template for the grouped row's text. Variables available for the template are ${key}, ${val} and ${count}. * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "groupedRowTextTemplate", optionValue: string): void; /** * Gets whether the GroupBy operation takes place locally on client-side or remotely on server-side. + * */ igGridGroupBy(optionLiteral: 'option', optionName: "type"): string; @@ -45339,6 +52730,7 @@ interface JQuery { /** * Sets whether the GroupBy operation takes place locally on client-side or remotely on server-side. * + * * @optionValue New value to be set. */ @@ -45346,60 +52738,70 @@ interface JQuery { /** * URL param name which specifies a GroupBy [expression](ig.datasource#options:settings.sorting.expressions). When groupByUrlKey, [groupByUrlKeyAscValue](ui.iggridgroupby#options:groupByUrlKeyAscValue) and [groupByUrlKeyDescValue](ui.iggridgroupby#options:groupByUrlKeyDescValue) are set the request looks like: ?()= (Example: ?groupby(col1)=asc). Otherwise the OData conventions for sorting params are used. + * */ igGridGroupBy(optionLiteral: 'option', optionName: "groupByUrlKey"): string; /** * URL param name which specifies a GroupBy [expression](ig.datasource#options:settings.sorting.expressions). When groupByUrlKey, [groupByUrlKeyAscValue](ui.iggridgroupby#options:groupByUrlKeyAscValue) and [groupByUrlKeyDescValue](ui.iggridgroupby#options:groupByUrlKeyDescValue) are set the request looks like: ?()= (Example: ?groupby(col1)=asc). Otherwise the OData conventions for sorting params are used. * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "groupByUrlKey", optionValue: string): void; /** * URL param value denoting ascending grouping. When [groupByUrlKey](ui.iggridgroupby#options:groupByUrlKey), groupByUrlKeyAscValue and [groupByUrlKeyDescValue](ui.iggridgroupby#options:groupByUrlKeyDescValue) are set the request looks like: ?()= (Example: ?groupby(col1)=asc). Otherwise the OData conventions for sorting params are used. + * */ igGridGroupBy(optionLiteral: 'option', optionName: "groupByUrlKeyAscValue"): string; /** * URL param value denoting ascending grouping. When [groupByUrlKey](ui.iggridgroupby#options:groupByUrlKey), groupByUrlKeyAscValue and [groupByUrlKeyDescValue](ui.iggridgroupby#options:groupByUrlKeyDescValue) are set the request looks like: ?()= (Example: ?groupby(col1)=asc). Otherwise the OData conventions for sorting params are used. * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "groupByUrlKeyAscValue", optionValue: string): void; /** * URL param value denoting descending grouping. When [groupByUrlKey](ui.iggridgroupby#options:groupByUrlKey), [groupByUrlKeyAscValue](ui.iggridgroupby#options:groupByUrlKeyAscValue) and groupByUrlKeyDescValue are set the request looks like: ?()= (Example: ?groupby(col1)=asc). Otherwise the OData conventions for sorting params are used. + * */ igGridGroupBy(optionLiteral: 'option', optionName: "groupByUrlKeyDescValue"): string; /** * URL param value denoting descending grouping. When [groupByUrlKey](ui.iggridgroupby#options:groupByUrlKey), [groupByUrlKeyAscValue](ui.iggridgroupby#options:groupByUrlKeyAscValue) and groupByUrlKeyDescValue are set the request looks like: ?()= (Example: ?groupby(col1)=asc). Otherwise the OData conventions for sorting params are used. * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "groupByUrlKeyDescValue", optionValue: string): void; /** * Gets the settings for GroupBy summaries. + * */ igGridGroupBy(optionLiteral: 'option', optionName: "summarySettings"): IgGridGroupBySummarySettings; /** * Sets the settings for GroupBy summaries. * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "summarySettings", optionValue: IgGridGroupBySummarySettings): void; /** * Configures individual column settings. + * */ igGridGroupBy(optionLiteral: 'option', optionName: "columnSettings"): IgGridGroupByColumnSettings; /** * Configures individual column settings. * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridGroupByColumnSettings): void; @@ -45618,54 +53020,63 @@ interface JQuery { /** * Enables/disables immediate column grouping/ungrouping. When false operation is delayed until after "Apply" button is clicked by the user. + * */ igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogGroupByOnClick"): boolean; /** * Enables/disables immediate column grouping/ungrouping. When false operation is delayed until after "Apply" button is clicked by the user. * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogGroupByOnClick", optionValue: boolean): void; /** * Gets width of layouts dropdown in the GroupBy Dialog + * */ igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogDropDownWidth"): number; /** * Sets width of layouts dropdown in the GroupBy Dialog * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogDropDownWidth", optionValue: number): void; /** * Gets width of layouts dropdown in the GroupBy Dialog + * */ igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogDropDownAreaWidth"): number; /** * Sets width of layouts dropdown in the GroupBy Dialog * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogDropDownAreaWidth", optionValue: number): void; /** * Gets time in milliseconds for animation duration to show/hide modal dialog + * */ igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogAnimationDuration"): number; /** * Sets time in milliseconds for animation duration to show/hide modal dialog * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogAnimationDuration", optionValue: number): void; /** * Gets width of the GroupBy Dialog + * */ igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogWidth"): string|number; @@ -45673,6 +53084,7 @@ interface JQuery { /** * Sets width of the GroupBy Dialog * + * * @optionValue New value to be set. */ @@ -45680,6 +53092,7 @@ interface JQuery { /** * Gets height of the GroupBy Dialog + * */ igGridGroupBy(optionLiteral: 'option', optionName: "modalDialogHeight"): string|number; @@ -45687,6 +53100,7 @@ interface JQuery { /** * Sets height of the GroupBy Dialog * + * * @optionValue New value to be set. */ @@ -45694,30 +53108,35 @@ interface JQuery { /** * Format grouped column using the formatter set in [igGrid.columns.formatter](ui.iggrid#options:columns.formatter) or [igGrid.columns.format](ui.iggrid#options:columns.format). + * */ igGridGroupBy(optionLiteral: 'option', optionName: "useGridColumnFormatter"): boolean; /** * Format grouped column using the formatter set in [igGrid.columns.formatter](ui.iggrid#options:columns.formatter) or [igGrid.columns.format](ui.iggrid#options:columns.format). * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "useGridColumnFormatter", optionValue: boolean): void; /** * Enables / disables GroupBy persistence between states. Checkout the [GroupBy Persistence](http://www.igniteui.com/help/iggrid-groupby-overview#groupBy-persistence) topic for details. + * */ igGridGroupBy(optionLiteral: 'option', optionName: "persist"): boolean; /** * Enables / disables GroupBy persistence between states. Checkout the [GroupBy Persistence](http://www.igniteui.com/help/iggrid-groupby-overview#groupBy-persistence) topic for details. * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "persist", optionValue: boolean): void; /** * Controls containment behavior for the GroupBy Dialog. + * */ igGridGroupBy(optionLiteral: 'option', optionName: "groupByDialogContainment"): string; @@ -45725,6 +53144,7 @@ interface JQuery { /** * Controls containment behavior for the GroupBy Dialog. * + * * @optionValue New value to be set. */ @@ -45732,12 +53152,14 @@ interface JQuery { /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. Checkout the [Extending igGrid Modal Dialog](http://www.igniteui.com/help/extending-iggrid-modal-dialog) topic for details. + * */ igGridGroupBy(optionLiteral: 'option', optionName: "dialogWidget"): string; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. Checkout the [Extending igGrid Modal Dialog](http://www.igniteui.com/help/extending-iggrid-modal-dialog) topic for details. * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; @@ -45757,6 +53179,7 @@ interface JQuery { /** * Gets default summaries that will appear when grouping by a column on the bottom of each group as a row.This option has a lower priority than the groupSummaries defined under columnSettings for each column. * All default summaries are defined under $.ig.util.defaultSummaryMethods + * */ igGridGroupBy(optionLiteral: 'option', optionName: "groupSummaries"): any; @@ -45764,12 +53187,14 @@ interface JQuery { * Sets default summaries that will appear when grouping by a column on the bottom of each group as a row.This option has a lower priority than the groupSummaries defined under columnSettings for each column. * All default summaries are defined under $.ig.util.defaultSummaryMethods * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "groupSummaries", optionValue: any): void; /** * Gets the groupSummaries postion inside each group. + * */ igGridGroupBy(optionLiteral: 'option', optionName: "groupSummariesPosition"): string; @@ -45777,11 +53202,42 @@ interface JQuery { /** * Sets the groupSummaries postion inside each group. * + * * @optionValue New value to be set. */ igGridGroupBy(optionLiteral: 'option', optionName: "groupSummariesPosition", optionValue: string): void; + /** + * Set/Get the locale language setting for the widget. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igGridGroupBy(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igGridGroupBy(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event which is fired when the grouped columns collection is about to change. This event is fired even when button OK is clicked from the modal dialog(after event modalDialogButtonApplyClick is fired) */ @@ -45982,21 +53438,25 @@ interface JQuery { interface IgGridHidingColumnSetting { /** * Column key. this is a required property in every column setting if columnIndex is not set. + * */ columnKey?: string; /** * Column index. Can be used in place of column key. the preferred way of populating a column setting is to always use the column keys as identifiers. + * */ columnIndex?: number; /** * Allows the column to be hidden. + * */ allowHiding?: boolean; /** * Sets the initial visibility of the column. + * */ hidden?: boolean; @@ -46009,56 +53469,67 @@ interface IgGridHidingColumnSetting { interface IgGridHidingLocale { /** * The text used in the drop down tools menu(Feature Chooser) to launch the column chooser dialog. + * */ columnChooserDisplayText?: string; /** * The text displayed in the tooltip of the hidden column indicator. + * */ hiddenColumnIndicatorTooltipText?: string; /** * The text used in the drop down tools menu(Feature Chooser) to hide a column. + * */ columnHideText?: string; /** * The caption of the column chooser dialog. + * */ columnChooserCaptionLabel?: string; /** * The close button tooltip of the column chooser dialog. + * */ columnChooserCloseButtonTooltip?: string; /** * Specifies the hiding column icon tooltip. + * */ hideColumnIconTooltip?: string; /** * The text used in the column chooser to show column. + * */ columnChooserShowText?: string; /** * The text used in the column chooser to hide column. + * */ columnChooserHideText?: string; /** * Text label for reset button. + * */ columnChooserResetButtonLabel?: string; /** * Specifies the text of the button which applies changes in the modal dialog. + * */ columnChooserButtonApplyText?: string; /** * Specifies the text of the button which cancels changes in the modal dialog. + * */ columnChooserButtonCancelText?: string; @@ -46367,11 +53838,13 @@ interface ColumnChooserButtonResetClickEventUIParam { interface IgGridHiding { /** * A list of column settings that specifies hiding options on a per column basis. + * */ columnSettings?: IgGridHidingColumnSetting[]; /** * The width in pixels of the hidden column indicator in the header. + * */ hiddenColumnIndicatorHeaderWidth?: number; @@ -46385,16 +53858,19 @@ interface IgGridHiding { /** * The default column chooser width. + * */ columnChooserWidth?: string; /** * The default column chooser height. + * */ columnChooserHeight?: string; /** * The duration of the dropdown animation in milliseconds. + * */ dropDownAnimationDuration?: number; @@ -46455,24 +53931,40 @@ interface IgGridHiding { /** * Specifies on click show/hide directly to be shown/hidden columns. If columnChooserHideOnClick is false then Apply and Cancel Buttons are shown on the bottom of modal dialog. Columns are Shown/Hidden after the Apply button is clicked + * */ columnChooserHideOnClick?: boolean; /** * Specifies time of milliseconds for animation duration to show/hide modal dialog + * */ columnChooserAnimationDuration?: number; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * */ dialogWidget?: string; /** * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * */ inherit?: boolean; + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event fired before a hiding operation is executed. */ @@ -46559,7 +54051,13 @@ interface IgGridHiding { [optionName: string]: any; } interface IgGridHidingMethods { + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.iggridhiding#options:language) + * Note that this method is for rare scenarios, see [language](ui.iggridhiding#options:language) or [locale](ui.iggridhiding#options:locale) option setter + */ changeLocale(): void; + changeGlobalLanguage(): void; + changeGlobalRegional(): void; /** * Destroys the hiding widget @@ -46638,6 +54136,8 @@ interface JQuery { interface JQuery { igGridHiding(methodName: "changeLocale"): void; + igGridHiding(methodName: "changeGlobalLanguage"): void; + igGridHiding(methodName: "changeGlobalRegional"): void; igGridHiding(methodName: "destroy"): void; igGridHiding(methodName: "showColumnChooser"): void; igGridHiding(methodName: "hideColumnChooser"): void; @@ -46652,24 +54152,28 @@ interface JQuery { /** * A list of column settings that specifies hiding options on a per column basis. + * */ igGridHiding(optionLiteral: 'option', optionName: "columnSettings"): IgGridHidingColumnSetting[]; /** * A list of column settings that specifies hiding options on a per column basis. * + * * @optionValue New value to be set. */ igGridHiding(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridHidingColumnSetting[]): void; /** * The width in pixels of the hidden column indicator in the header. + * */ igGridHiding(optionLiteral: 'option', optionName: "hiddenColumnIndicatorHeaderWidth"): number; /** * The width in pixels of the hidden column indicator in the header. * + * * @optionValue New value to be set. */ igGridHiding(optionLiteral: 'option', optionName: "hiddenColumnIndicatorHeaderWidth", optionValue: number): void; @@ -46694,36 +54198,42 @@ interface JQuery { /** * The default column chooser width. + * */ igGridHiding(optionLiteral: 'option', optionName: "columnChooserWidth"): string; /** * The default column chooser width. * + * * @optionValue New value to be set. */ igGridHiding(optionLiteral: 'option', optionName: "columnChooserWidth", optionValue: string): void; /** * The default column chooser height. + * */ igGridHiding(optionLiteral: 'option', optionName: "columnChooserHeight"): string; /** * The default column chooser height. * + * * @optionValue New value to be set. */ igGridHiding(optionLiteral: 'option', optionName: "columnChooserHeight", optionValue: string): void; /** * The duration of the dropdown animation in milliseconds. + * */ igGridHiding(optionLiteral: 'option', optionName: "dropDownAnimationDuration"): number; /** * The duration of the dropdown animation in milliseconds. * + * * @optionValue New value to be set. */ igGridHiding(optionLiteral: 'option', optionName: "dropDownAnimationDuration", optionValue: number): void; @@ -46858,52 +54368,90 @@ interface JQuery { /** * Gets on click show/hide directly to be shown/hidden columns. If columnChooserHideOnClick is false then Apply and Cancel Buttons are shown on the bottom of modal dialog. Columns are Shown/Hidden after the Apply button is clicked + * */ igGridHiding(optionLiteral: 'option', optionName: "columnChooserHideOnClick"): boolean; /** * Sets on click show/hide directly to be shown/hidden columns. If columnChooserHideOnClick is false then Apply and Cancel Buttons are shown on the bottom of modal dialog. Columns are Shown/Hidden after the Apply button is clicked * + * * @optionValue New value to be set. */ igGridHiding(optionLiteral: 'option', optionName: "columnChooserHideOnClick", optionValue: boolean): void; /** * Gets time of milliseconds for animation duration to show/hide modal dialog + * */ igGridHiding(optionLiteral: 'option', optionName: "columnChooserAnimationDuration"): number; /** * Sets time of milliseconds for animation duration to show/hide modal dialog * + * * @optionValue New value to be set. */ igGridHiding(optionLiteral: 'option', optionName: "columnChooserAnimationDuration", optionValue: number): void; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * */ igGridHiding(optionLiteral: 'option', optionName: "dialogWidget"): string; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. * + * * @optionValue New value to be set. */ igGridHiding(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; /** * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * */ igGridHiding(optionLiteral: 'option', optionName: "inherit"): boolean; /** * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. * + * * @optionValue New value to be set. */ igGridHiding(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + /** + * Set/Get the locale language setting for the widget. + * + */ + igGridHiding(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igGridHiding(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igGridHiding(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igGridHiding(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event fired before a hiding operation is executed. */ @@ -47104,11 +54652,13 @@ interface JQuery { interface IgHierarchicalGridLocale { /** * Specifies the default tooltip applied to an expand column cell, that is currently collapsed. + * */ expandTooltip?: string; /** * Specifies the default tooltip applied to an expand column cell, that is currently expanded. + * */ collapseTooltip?: string; @@ -47143,17 +54693,20 @@ interface IgHierarchicalGridColumnLayout { interface IgHierarchicalGridColumnGroupOptions { /** * Sets whether the group is expanded or collapsed. Applied only if the allowGroupCollapsing is set to true. + * */ expanded?: boolean; /** * Sets whether expansion indicators are visible in the group header. + * */ allowGroupCollapsing?: boolean; /** * Sets when should the group be hidden. Applied only if the allowGroupCollapsing is set to true. * + * * Valid values: * "never" never hide the group * "always" always hide the group @@ -47171,17 +54724,20 @@ interface IgHierarchicalGridColumnGroupOptions { interface IgHierarchicalGridColumn { /** * Header text for the specified column. + * */ headerText?: string; /** * The property in the data source to which the column is bound. Also used to identify the column by, and find specific columns with API methods such as [columnByKey](ui.ighierarchicalgrid#methods:columnByKey). + * */ key?: string; /** * Reference to a function (string or function) which will be used for formatting the cell values. The function should accept a value and return the new formatted value. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) * + * * Valid values: * "string" The name of the function which will be used for formatting the cell values. * "function" Function which will be used for formatting the cell values. The function should accept a value and return the new formatted value. @@ -47202,12 +54758,21 @@ interface IgHierarchicalGridColumn { /** * Data type of the column cell values: string, number, bool, date, object. + * + * + * Valid values: + * "string" The data inside the column is of type string + * "number" The data inside the column is of type number + * "boolean" The data inside the column is of type boolean + * "date" The data inside the column is of type date + * "object" The data inside the column is of type object */ - dataType?: string|number|boolean|Date|Object; + dataType?: string; /** * Width of the column in pixels or percentage. Can also be set as '*', in which case the width auto-size based on the content of the column cells (including the header text).If width is not defined and [defaultColumnWidth](ui.ighierarchicalgrid#options:defaultColumnWidth) is set, it is assumed for all columns. * + * * Valid values: * "string" The column width can be set in pixels (px), percentage (%) or as '*' in order to auto-size based on the cells and header content. * "number" The column width can be set as a number @@ -47216,32 +54781,38 @@ interface IgHierarchicalGridColumn { /** * Initial visibility of the column. A column can be hidden without the Hiding feature being enabled but there will be no UI for unhiding it. Columns can be defined as hidden in the options of the Hiding feature as well and those definitions take precedence. + * */ hidden?: boolean; /** * Sets a template for an individual column. the contents of the template should be the HTML markup that goes inside the table cell, or the entire table cell markup. [Here's an example of creating a basic column template](http://www.igniteui.com/help/creating-a-basic-column-template-in-the-iggrid) + * */ template?: string; /** * Sets whether column data is derived from the datasource. If set to true, then the cells in this column are not bound to the data source. The data in this column is populated using [formula](ui.ighierarchicalgrid#options:columns.formula), or using [unboundValues](ui.ighierarchicalgrid#options:columns.unboundValues), or through the [setUnboundValues](ui.ighierarchicalgrid#methods:setUnboundValues) API method. [Here's an overview of the unbound columns feature](http://www.igniteui.com/help/iggrid-unboundcolumns-overview) + * */ unbound?: boolean; /** * Options used to configure collapsible column [groups](ui.ighierarchicalgrid#options:columns.group). + * */ groupOptions?: IgHierarchicalGridColumnGroupOptions; /** * Array of child column definitions. If the column has the property group than the grid has multi column headers. + * */ group?: any[]; /** * Determines the way in which dates will be displayed in the grid for this column. * + * * Valid values: * "local" The dates for this column will be rendered in the client's local timezone. * "utc" The dates for this column will be rendered in their UTC representation. @@ -47257,6 +54828,7 @@ interface IgHierarchicalGridColumn { /** * A reference to or the name of a JavaScript function, which will calculate the value of the current cell based on other cell values in the same row. Used with [unbound columns](ui.ighierarchicalgrid#options:columns.unbound). * + * * Valid values: * "string" The name of the JavaScript function. * "function" Reference to the JavaScript function. @@ -47265,22 +54837,26 @@ interface IgHierarchicalGridColumn { /** * Array of values which will be populated in the column cells at initialization, if the column is [unbound](ui.ighierarchicalgrid#options:columns.unbound). + * */ unboundValues?: any[]; /** * Space-separated list of CSS classes to be applied on the header cell of this column. + * */ headerCssClass?: string; /** * Space-separated list of CSS classes to be applied on the data cells of this column. The class is not applied if the column has a column [template](ui.ighierarchicalgrid#options:columns.template) defined, which contains full definition in the template. + * */ columnCssClass?: string; /** * This option is applicable only for columns with [dataType](ui.ighierarchicalgrid#options:columns.dataType) of object. Reference to a function, or the name of the function, that will be used for complex data extraction from the data records, whose return value will be used for all data operations associated with this column and will be displayed as cell value. [Here you can find more examples of how to setup a column mapper](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-mapper) * + * * Valid values: * "string" The name of the mapper function. * "function" Reference to the mapper function. @@ -47289,26 +54865,31 @@ interface IgHierarchicalGridColumn { /** * Specifies the row index of the cell in a Multi-Row Layout configuration. All columns must have this property set for the multi-row-layout mode to be enabled. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout) + * */ rowIndex?: number; /** * Specifies the column index of the cell in a Multi-Row Layout configuration. All columns must have this property set for the multi-row-layout mode to be enabled. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout) + * */ columnIndex?: number; /** * Specifies the navigation index of the cell for the TAB sequence when the cells are in edit mode in a Multi-Row Layout grid. Has no effect otherwise. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout) + * */ navigationIndex?: number; /** * Specifies the colSpan of the cell in a Multi-Row Layout configuration. colSpan 0 is not supported and will be changed to 1 by the grid. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout) + * */ colSpan?: number; /** * Specifies the rowSpan of the cell in a Multi-Row Layout configuration. rowSpan 0 is not supported and will be changed to 1 by the grid. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout). If multi-row-layout is not used but multi-column-header is set then this option is used to adjust span of header cell. + * */ rowSpan?: number; @@ -47333,16 +54914,19 @@ interface IgHierarchicalGridFeature { interface IgHierarchicalGridRestSettingsCreate { /** * Specifies a remote URL to which create requests will be sent. This will be used for both batch and non-batch, however if template is also set, this URL will only be used for batch requests. + * */ url?: string; /** * Specifies a remote URL template. Use ${id} in place of the resource id. + * */ template?: string; /** * Specifies whether create requests will be sent in batches + * */ batch?: boolean; @@ -47399,6 +54983,7 @@ interface IgHierarchicalGridRestSettingsRemove { interface IgHierarchicalGridRestSettings { /** * Settings for create requests + * */ create?: IgHierarchicalGridRestSettingsCreate; @@ -47419,11 +55004,13 @@ interface IgHierarchicalGridRestSettings { /** * Specifies a custom function to serialize content sent to the server. It should accept a single object or an array of objects and return a string. If not specified, JSON.stringify() will be used. + * */ contentSerializer?: Function; /** * Specifies the content type of the request. See http://api.jquery.com/jQuery.ajax/ => contentType + * */ contentType?: string; @@ -47436,41 +55023,49 @@ interface IgHierarchicalGridRestSettings { interface IgHierarchicalGridScrollSettings { /** * Sets gets current vertical position. + * */ scrollTop?: number; /** * Sets gets current horizontal position. + * */ scrollLeft?: number; /** * Sets gets the step of the default scrolling behavior when using the mouse wheel. + * */ wheelStep?: number; /** * Sets gets if smoother scrolling with small intertia should be used when using the mouse wheel. + * */ smoothing?: boolean; /** * Sets or gets the modifier for how many pixels will be scrolled when using the mouse wheel once. This is used only for the [smooth scrolling behavior](ui.ighierarchicalgrid#options:scrollSettings.smoothing). + * */ smoothingStep?: number; /** * Sets or gets the modifier for how long the scroll ‘animation’ lasts when using the mouse wheel once. This is used only for the [smooth scrolling behavior](ui.ighierarchicalgrid#options:scrollSettings.smoothing). + * */ smoothingDuration?: number; /** * Sets gets the modifier for how much the inertia scrolls on touch devices. Note: Value set to 0 would disable touch movements. Value set to -1 would invert them. + * */ inertiaStep?: number; /** * Sets gets the modifier for how long the inertia last on touch devices. + * */ inertiaDuration?: number; @@ -47621,59 +55216,70 @@ interface ChildGridCreatedEventUIParam {} interface IgHierarchicalGrid { /** - * Only the first level will be data-bound initially. Also serves as "render" depth, meaning that depending on this prop, the grid will + * Only the first level will be data-bound initially. Also serves as "render" depth, meaning that depending on this prop, the grid will render the child grids up to the specified level. + * */ initialDataBindDepth?: number; /** * No levels will be automatically expanded when the widget is instantiated for the first time + * */ initialExpandDepth?: number; /** * If true, encodes all requests using OData conventions and the $expand syntax + * */ odata?: boolean; /** * If true, load on demand will be achieved using REST compliant resource access with appropriate url-s for * the ajax GET calls. + * */ rest?: boolean; /** * Specifies the limit on the number of levels to bind to + * */ maxDataBindDepth?: number; /** * Specifies the default property in the response where children will be located + * */ defaultChildrenDataProperty?: string; /** * If true, will autogenerate all layouts assuming default values for "childrenDataProperty" * When autoGenerateLayouts is enabled, it will automatically generate all columns recursively. (all columns on all levels) + * */ autoGenerateLayouts?: boolean; /** * Applies a linear animation - either expanding or collapsing depending on the parent row state + * */ expandCollapseAnimations?: boolean; /** * Specifies the expand column width + * */ expandColWidth?: number; /** * Specifies the delimiter for constructing paths , for hierarchical lookup of data + * */ pathSeparator?: string; /** * The row expanding/collapsing animation duration in ms. + * */ animationDuration?: number; @@ -47692,12 +55298,14 @@ interface IgHierarchicalGrid { /** * List of columnLayout objects that specify the structure of the child grids. All options that are applicable to a flat grid are also applicable here + * */ columnLayouts?: IgHierarchicalGridColumnLayout[]; /** * Defines the grid width in pixels or percents. [Here you can find more info about setting igGrid width](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). * + * * Valid values: * "string" The widget width can be set in pixels (px) or percentage (%). Example values: "800px", "800" (defaults to pixels), "100%". * "number" The widget width can be set in pixels as a number. Example values: 800, 700. @@ -47708,6 +55316,7 @@ interface IgHierarchicalGrid { /** * This is the total height of the grid, including all UI elements - scroll container with data rows, header, footer, filter row - (if any), etc. [Here you can find more info about setting igGrid height](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). * + * * Valid values: * "string" The widget height can be set in pixels (px) and percentage (%). * "number" The widget height can be set as a number @@ -47717,12 +55326,14 @@ interface IgHierarchicalGrid { /** * If autoAdjustHeight is set to false, the [height](ui.ighierarchicalgrid#options:height) will be set only on the scrolling container, and all other UI elements such as paging footer / filter row / headers will add on top of that, so the total height of the grid will be more than this value - the height of the scroll container (content area) will not be dynamically calculated. Setting this option to false will usually result in a lot better initial rendering performance for large data sets ( > 1000 rows rendered at once, no [virtualization](ui.ighierarchicalgrid#options:virtualization) enabled), since no reflows will be made by browsers when accessing DOM properties such as offsetHeight. + * */ autoAdjustHeight?: boolean; /** * Used for [row virtualization](ui.ighierarchicalgrid#options:rowVirtualization) in [fixed mode](ui.ighierarchicalgrid#options:virtualizationMode). This is the average value in pixels (default) that will be used to calculate how many rows to render as the end user scrolls. Also all rows' height will be automatically set to this value. * + * * Valid values: * "string" The avarage row height can be set in pixels ("25px"). * "number" The avarage row height can be set in pixels as a number (25). @@ -47732,6 +55343,7 @@ interface IgHierarchicalGrid { /** * Used for [column virtualization](ui.ighierarchicalgrid#options:columnVirtualization) in [fixed mode](ui.ighierarchicalgrid#options:virtualizationMode). This is the average value in pixels for a column width. * + * * Valid values: * "string" The avarage column width can be set in pixels ("25px"). * "number" The avarage column width can be set in pixels as a number (25). @@ -47741,6 +55353,7 @@ interface IgHierarchicalGrid { /** * Default column width that will be set for all columns, that don't have [column width](ui.ighierarchicalgrid#options:columns.width) defined. * + * * Valid values: * "string" The default column width can be set in pixels ("100px"). * "number" The default column width can be set in pixels as a number (100). @@ -47751,17 +55364,20 @@ interface IgHierarchicalGrid { * If no [columns](ui.ighierarchicalgrid#options:columns) collection is defined, and autoGenerateColumns is set to true, [columns](ui.ighierarchicalgrid#options:columns) will be inferred from the data source before the [dataRendering](ui.iggrid#events:dataRendering) event is fired. The inferred [columns](ui.ighierarchicalgrid#options:columns) collection will be available to the developer for modification at [dataRendering](ui.iggrid#events:dataRendering). If autoGenerateColumns is not explicitly set and [columns](ui.ighierarchicalgrid#options:columns) has at least one column defined then autoGenerateColumns is automatically set to false. * If autoGenerateColumns is true and there are columns defined auto-generated columns will render after the explicitly defined ones. * Since auto-generated columns don't have width defined consider setting [defaultColumnWidth](ui.ighierarchicalgrid#options:defaultColumnWidth) as well. + * */ autoGenerateColumns?: boolean; /** * Enables/disables column and row virtualization at the same time. Virtualization can greatly enhance rendering performance. If enabled, the number of actual rendered rows (DOM elements) will be constant and related to the visible viewport of the grid. As the end user scrolls, those DOM elements will be dynamically reused to render the new data. [Here you can find more info about the performance guidelines when using the igGrid](http://www.igniteui.com/help/iggrid-performance-guide) + * */ virtualization?: boolean; /** * Determines row virtualization mode. * + * * Valid values: * "fixed" Renders only the visible rows and/or columns in the grid. On scrolling the same rows and/or columns are updated with new data from the data source. Only fixed virtualization can work with column virtualization at the same time. Fixed virtualization is not supported by some grid features: Resizing, Group By, Responsive. * "continuous" renders a pre-defined number of rows in the grid. On scrolling the continuous virtualization loads another portion of rows and disposes the current one. @@ -47770,27 +55386,32 @@ interface IgHierarchicalGrid { /** * Enables virtualization for rows only. [Here you can find more info about igGrid row virtualization](http://www.igniteui.com/help/iggrid-virtualization-overview) + * */ rowVirtualization?: boolean; /** * Enables virtualization for columns only. Column virtualization can work only in combination with fixed row virtalization. Setting columnVirtualization to true will automatically set [virtualization](ui.ighierarchicalgrid#options:virtualization) to true and [virtualizationMode](ui.ighierarchicalgrid#options:virtualizationMode) to "fixed". + * */ columnVirtualization?: boolean; /** * Number of pixels to scroll the grid by, when virtualization is enabled, and mouse wheel scrolling is performed over the virtual grid area. If "null" the step will be equal to the [avgRowHeight](ui.ighierarchicalgrid#options:avgRowHeight). + * */ virtualizationMouseWheelStep?: number; /** * If this option is set to true, the height of the grid row will be calculated automatically based on the [avgRowHeight](ui.ighierarchicalgrid#options:avgRowHeight) and the visible virtual records. If no [avgRowHeight](ui.ighierarchicalgrid#options:avgRowHeight) is specified, it will be calculated automatically at runtime. + * */ adjustVirtualHeights?: boolean; /** * The templating engine that will be used to render the grid [column templates](ui.ighierarchicalgrid#options:columns.template). [Here you can find](http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/05/30/using-different-template-engines-with-ignite-ui-controls.aspx) how to use templating engines other than igTemplating and jsRender. * + * * Valid values: * "infragistics" The grid will use the Infragistics Templating engine to render its [column templates](ui.ighierarchicalgrid#options:columns.template) and specific parts of the UI. * "jsRender" The grid will use jsRender to render its [column templates](ui.ighierarchicalgrid#options:columns.template) and specific parts of the UI. @@ -47799,96 +55420,120 @@ interface IgHierarchicalGrid { /** * An array of column objects. Checkout the [Columns and Layout](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-columns) topic for details on configuring the columns array. + * */ columns?: IgHierarchicalGridColumn[]; /** * Can be any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an $.ig.DataSource itself + * + * + * Valid values: + * "string" DataSource as a string. For example a Url. + * "array" DataSource as an array. + * "object" DataSource as an object. For example a JSON object */ - dataSource?: any; + dataSource?: string|Array|Object; /** * Specifies a remote URL as a data source, from which data will be retrieved using the [$.ig.DataSource](ig.datasource). + * */ dataSourceUrl?: string; /** * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type). + * */ dataSourceType?: string; /** * See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). This is the property in the responses where data records are held, if the response is wrapped. + * */ responseDataKey?: string; /** * See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. + * */ responseTotalRecCountKey?: string; /** * Specifies the HTTP verb to be used to issue the requests to a remote data source. + * */ requestType?: string; /** * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType + * */ responseContentType?: string; /** * Controls the visibility of the grid header. + * */ showHeader?: boolean; /** * Controls the visibility of the grid footer. + * */ showFooter?: boolean; /** * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.ighierarchicalgrid#options:virtualization) is enabled, fixedHeaders will always act as if it's true, no matter which value is set. + * */ fixedHeaders?: boolean; /** * Footers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.ighierarchicalgrid#options:virtualization) is enabled, fixedFooters will always act as if it's true, no matter which value is set. + * */ fixedFooters?: boolean; /** * Caption text that will be shown above the grid header. + * */ caption?: string; /** * List of grid feature definitions: sorting, paging, etc. Each feature goes with its separate options that are documented for the feature accordingly. [Here you can find detailed documentation for all igGrid features](http://www.igniteui.com/help/iggrid-features-landing-page) + * */ features?: IgHierarchicalGridFeature[]; /** * Initial tabIndex attribute that will be set on all focusable elements. + * */ tabIndex?: number; /** * If this option is set to false, the data to which the grid is bound will be used "as is" with no additional transformations based on [columns](ui.ighierarchicalgrid#options:columns) defined. Otherwise only the subset of data properties used in the [columns](ui.ighierarchicalgrid#options:columns) defined will be extracted in a new object and used. + * */ localSchemaTransform?: boolean; /** * Key of the column containing unique identifiers for the data records. + * */ primaryKey?: string; /** * If true, the transaction log will always be sent in the request for remote data, by the data source. Also this means that if there are values in the log, a POST will be performed instead of GET. + * */ serializeTransactionLog?: boolean; /** * Automatically commits the transactions as rows/cells are being edited to the client data source. A [saveChanges](ui.ighierarchicalgrid#methods:saveChanges) call still needs to be performed in order to commit the transactions to a server-side data source. + * */ autoCommit?: boolean; @@ -47898,12 +55543,14 @@ interface IgHierarchicalGrid { * If a new row is added, edited, then deleted, there will be no transaction added to the log. * If several edits are made to a row or an individual cell, this should result in a single transaction. * Note: This option takes effect only when [autoCommit](ui.ighierarchicalgrid#options:autoCommit) is set to false. + * */ aggregateTransactions?: boolean; /** * Sets gets ability to automatically format text in cells for numeric and date columns. The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) * + * * Valid values: * "date" formats only Date columns * "number" formats only number columns @@ -47915,58 +55562,69 @@ interface IgHierarchicalGrid { /** * Gets sets ability to render checkboxes and use checkbox editor when dataType of a column is "bool". Checkboxes are not rendered for boolean values in columns with a [column template](ui.ighierarchicalgrid#options:columns.template). + * */ renderCheckboxes?: boolean; /** * URL to which updating requests will be made. + * */ updateUrl?: string; /** * Settings related to REST compliant update routines. + * */ restSettings?: IgHierarchicalGridRestSettings; /** * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). + * */ alternateRowStyles?: boolean; /** * If set to true and all columns' widths are specified and their combined width is less than the grid width then the last column width will be automatically adjusted to fill the remaining empty space of the grid. + * */ autofitLastColumn?: boolean; /** * Enables/disables rendering of hover styles when the mouse is over a record. This can be useful in templating scenarios, for example, where we don't want to apply hover styling to templated content. + * */ enableHoverStyles?: boolean; /** * Nables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * */ enableUTCDates?: boolean; /** * Merge unbound columns values inside data source when data source is remote. If true then the unbound columns are merged to the data source at runtime on the server. Note that data source is expanded with the new data and this could cause performance issues when the data is huge. If mergeUnboundColumns is false then the unbound data is sent and merged on the client. This option is used by the [igGrid MVC Helper](http://www.igniteui.com/help/iggrid-developing-asp-net-mvc-applications-with-iggrid). * Checkout [Populating Unbound Columns Remotely (igGrid)](http://www.igniteui.com/help/iggrid-unboundcolumns-populating-with-data-remotely) topic for more information. + * */ mergeUnboundColumns?: boolean; /** * When dataSource is a remote URL, defines whether to set the type of the remote data source to JSONP. + * */ jsonpRequest?: boolean; /** * Enables/disables grid adjusting its dimensions when its [width](ui.ighierarchicalgrid#options:width) and/or [height](ui.ighierarchicalgrid#options:height) is set in percent (%) and grid parent DOM container is resized. + * */ enableResizeContainerCheck?: boolean; /** * Configures how the feature chooser icon should display on header cells - e.g. to display as gear icon or not. * + * * Valid values: * "none" Always hide the feature chooser icon; The feature chooser is shown on tapping/clicking the column header. * "desktopOnly" Always show the icon on desktop but hide when touch device detected. @@ -47976,9 +55634,22 @@ interface IgHierarchicalGrid { /** * Settings related to content scrolling. + * */ scrollSettings?: IgHierarchicalGridScrollSettings; + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event which is fired when a hierarchical row is about to be expanded */ @@ -48158,7 +55829,16 @@ interface IgHierarchicalGrid { [optionName: string]: any; } interface IgHierarchicalGridMethods { + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.ighierarchicalgrid#options:language) + * Note that this method is for rare scenarios, see [language](ui.ighierarchicalgrid#options:language) or [locale](ui.ighierarchicalgrid#options:locale) option setter + */ changeLocale(): void; + + /** + * Changes the the regional settings of widget element to the language specified in [options.regional](ui.ighierarchicalgrid#options:regional) + * Note that this method is for rare scenarios, use [regional](ui.ighierarchicalgrid#options:regional) option setter + */ changeRegional(): void; /** @@ -48258,6 +55938,16 @@ interface IgHierarchicalGridMethods { * Destroys the hierarchical grid by recursively destroying all child grids */ destroy(): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igHierarchicalGrid"): IgHierarchicalGridMethods; @@ -48281,14 +55971,18 @@ interface JQuery { igHierarchicalGrid(methodName: "rollback", rebind?: boolean): void; igHierarchicalGrid(methodName: "saveChanges", success: Function, error: Function): void; igHierarchicalGrid(methodName: "destroy"): void; + igHierarchicalGrid(methodName: "changeGlobalLanguage"): void; + igHierarchicalGrid(methodName: "changeGlobalRegional"): void; /** - * Only the first level will be data-bound initially. Also serves as "render" depth, meaning that depending on this prop, the grid will + * Only the first level will be data-bound initially. Also serves as "render" depth, meaning that depending on this prop, the grid will render the child grids up to the specified level. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "initialDataBindDepth"): number; /** - * Only the first level will be data-bound initially. Also serves as "render" depth, meaning that depending on this prop, the grid will + * Only the first level will be data-bound initially. Also serves as "render" depth, meaning that depending on this prop, the grid will render the child grids up to the specified level. + * * * @optionValue New value to be set. */ @@ -48296,24 +55990,28 @@ interface JQuery { /** * No levels will be automatically expanded when the widget is instantiated for the first time + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "initialExpandDepth"): number; /** * No levels will be automatically expanded when the widget is instantiated for the first time * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "initialExpandDepth", optionValue: number): void; /** * If true, encodes all requests using OData conventions and the $expand syntax + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "odata"): boolean; /** * If true, encodes all requests using OData conventions and the $expand syntax * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "odata", optionValue: boolean): void; @@ -48321,6 +56019,7 @@ interface JQuery { /** * If true, load on demand will be achieved using REST compliant resource access with appropriate url-s for * the ajax GET calls. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "rest"): boolean; @@ -48328,30 +56027,35 @@ interface JQuery { * If true, load on demand will be achieved using REST compliant resource access with appropriate url-s for * the ajax GET calls. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "rest", optionValue: boolean): void; /** * Gets the limit on the number of levels to bind to + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "maxDataBindDepth"): number; /** * Sets the limit on the number of levels to bind to * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "maxDataBindDepth", optionValue: number): void; /** * Gets the default property in the response where children will be located + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "defaultChildrenDataProperty"): string; /** * Sets the default property in the response where children will be located * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "defaultChildrenDataProperty", optionValue: string): void; @@ -48359,6 +56063,7 @@ interface JQuery { /** * If true, will autogenerate all layouts assuming default values for "childrenDataProperty" * When autoGenerateLayouts is enabled, it will automatically generate all columns recursively. (all columns on all levels) + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "autoGenerateLayouts"): boolean; @@ -48366,54 +56071,63 @@ interface JQuery { * If true, will autogenerate all layouts assuming default values for "childrenDataProperty" * When autoGenerateLayouts is enabled, it will automatically generate all columns recursively. (all columns on all levels) * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "autoGenerateLayouts", optionValue: boolean): void; /** * Applies a linear animation - either expanding or collapsing depending on the parent row state + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "expandCollapseAnimations"): boolean; /** * Applies a linear animation - either expanding or collapsing depending on the parent row state * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "expandCollapseAnimations", optionValue: boolean): void; /** * Gets the expand column width + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "expandColWidth"): number; /** * Sets the expand column width * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "expandColWidth", optionValue: number): void; /** * Gets the delimiter for constructing paths , for hierarchical lookup of data + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "pathSeparator"): string; /** * Sets the delimiter for constructing paths , for hierarchical lookup of data * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "pathSeparator", optionValue: string): void; /** * The row expanding/collapsing animation duration in ms. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "animationDuration"): number; /** * The row expanding/collapsing animation duration in ms. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "animationDuration", optionValue: number): void; @@ -48450,18 +56164,21 @@ interface JQuery { /** * List of columnLayout objects that specify the structure of the child grids. All options that are applicable to a flat grid are also applicable here + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "columnLayouts"): IgHierarchicalGridColumnLayout[]; /** * List of columnLayout objects that specify the structure of the child grids. All options that are applicable to a flat grid are also applicable here * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "columnLayouts", optionValue: IgHierarchicalGridColumnLayout[]): void; /** * Defines the grid width in pixels or percents. [Here you can find more info about setting igGrid width](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "width"): string|number; @@ -48469,6 +56186,7 @@ interface JQuery { /** * Defines the grid width in pixels or percents. [Here you can find more info about setting igGrid width](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). * + * * @optionValue New value to be set. */ @@ -48476,6 +56194,7 @@ interface JQuery { /** * This is the total height of the grid, including all UI elements - scroll container with data rows, header, footer, filter row - (if any), etc. [Here you can find more info about setting igGrid height](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "height"): string|number; @@ -48483,6 +56202,7 @@ interface JQuery { /** * This is the total height of the grid, including all UI elements - scroll container with data rows, header, footer, filter row - (if any), etc. [Here you can find more info about setting igGrid height](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). * + * * @optionValue New value to be set. */ @@ -48490,18 +56210,21 @@ interface JQuery { /** * If autoAdjustHeight is set to false, the [height](ui.ighierarchicalgrid#options:height) will be set only on the scrolling container, and all other UI elements such as paging footer / filter row / headers will add on top of that, so the total height of the grid will be more than this value - the height of the scroll container (content area) will not be dynamically calculated. Setting this option to false will usually result in a lot better initial rendering performance for large data ( > 1000 rows rendered at once, no [virtualization](ui.ighierarchicalgrid#options:virtualization) enabled), since no reflows will be made by browsers when accessing DOM properties such as offsetHeight. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "autoAdjustHeight"): boolean; /** * If autoAdjustHeight is set to false, the [height](ui.ighierarchicalgrid#options:height) will be set only on the scrolling container, and all other UI elements such as paging footer / filter row / headers will add on top of that, so the total height of the grid will be more than this value - the height of the scroll container (content area) will not be dynamically calculated. Setting this option to false will usually result in a lot better initial rendering performance for large data sets ( > 1000 rows rendered at once, no [virtualization](ui.ighierarchicalgrid#options:virtualization) enabled), since no reflows will be made by browsers when accessing DOM properties such as offsetHeight. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "autoAdjustHeight", optionValue: boolean): void; /** * Used for [row virtualization](ui.ighierarchicalgrid#options:rowVirtualization) in [fixed mode](ui.ighierarchicalgrid#options:virtualizationMode). This is the average value in pixels (default) that will be used to calculate how many rows to render as the end user scrolls. Also all rows' height will be automatically set to this value. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "avgRowHeight"): string|number; @@ -48509,6 +56232,7 @@ interface JQuery { /** * Used for [row virtualization](ui.ighierarchicalgrid#options:rowVirtualization) in [fixed mode](ui.ighierarchicalgrid#options:virtualizationMode). This is the average value in pixels (default) that will be used to calculate how many rows to render as the end user scrolls. Also all rows' height will be automatically set to this value. * + * * @optionValue New value to be set. */ @@ -48516,6 +56240,7 @@ interface JQuery { /** * Used for [column virtualization](ui.ighierarchicalgrid#options:columnVirtualization) in [fixed mode](ui.ighierarchicalgrid#options:virtualizationMode). This is the average value in pixels for a column width. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "avgColumnWidth"): string|number; @@ -48523,6 +56248,7 @@ interface JQuery { /** * Used for [column virtualization](ui.ighierarchicalgrid#options:columnVirtualization) in [fixed mode](ui.ighierarchicalgrid#options:virtualizationMode). This is the average value in pixels for a column width. * + * * @optionValue New value to be set. */ @@ -48530,6 +56256,7 @@ interface JQuery { /** * Default column width that will be set for all columns, that don't have [column width](ui.ighierarchicalgrid#options:columns.width) defined. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "defaultColumnWidth"): string|number; @@ -48537,6 +56264,7 @@ interface JQuery { /** * Default column width that will be set for all columns, that don't have [column width](ui.ighierarchicalgrid#options:columns.width) defined. * + * * @optionValue New value to be set. */ @@ -48546,6 +56274,7 @@ interface JQuery { * If no [columns](ui.ighierarchicalgrid#options:columns) collection is defined, and autoGenerateColumns is set to true, [columns](ui.ighierarchicalgrid#options:columns) will be inferred from the data source before the [dataRendering](ui.iggrid#events:dataRendering) event is fired. The inferred [columns](ui.ighierarchicalgrid#options:columns) collection will be available to the developer for modification at [dataRendering](ui.iggrid#events:dataRendering). If autoGenerateColumns is not explicitly set and [columns](ui.ighierarchicalgrid#options:columns) has at least one column defined then autoGenerateColumns is automatically set to false. * If autoGenerateColumns is true and there are columns defined auto-generated columns will render after the explicitly defined ones. * Since auto-generated columns don't have width defined consider setting [defaultColumnWidth](ui.ighierarchicalgrid#options:defaultColumnWidth) as well. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "autoGenerateColumns"): boolean; @@ -48554,24 +56283,28 @@ interface JQuery { * If autoGenerateColumns is true and there are columns defined auto-generated columns will render after the explicitly defined ones. * Since auto-generated columns don't have width defined consider setting [defaultColumnWidth](ui.ighierarchicalgrid#options:defaultColumnWidth) as well. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "autoGenerateColumns", optionValue: boolean): void; /** * Enables/disables column and row virtualization at the same time. Virtualization can greatly enhance rendering performance. If enabled, the number of actual rendered rows (DOM elements) will be constant and related to the visible viewport of the grid. As the end user scrolls, those DOM elements will be dynamically reused to render the new data. [Here you can find more info about the performance guidelines when using the igGrid](http://www.igniteui.com/help/iggrid-performance-guide) + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "virtualization"): boolean; /** * Enables/disables column and row virtualization at the same time. Virtualization can greatly enhance rendering performance. If enabled, the number of actual rendered rows (DOM elements) will be constant and related to the visible viewport of the grid. As the end user scrolls, those DOM elements will be dynamically reused to render the new data. [Here you can find more info about the performance guidelines when using the igGrid](http://www.igniteui.com/help/iggrid-performance-guide) * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "virtualization", optionValue: boolean): void; /** * Determines row virtualization mode. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "virtualizationMode"): string; @@ -48579,6 +56312,7 @@ interface JQuery { /** * Determines row virtualization mode. * + * * @optionValue New value to be set. */ @@ -48586,54 +56320,63 @@ interface JQuery { /** * Enables virtualization for rows only. [Here you can find more info about igGrid row virtualization](http://www.igniteui.com/help/iggrid-virtualization-overview) + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "rowVirtualization"): boolean; /** * Enables virtualization for rows only. [Here you can find more info about igGrid row virtualization](http://www.igniteui.com/help/iggrid-virtualization-overview) * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "rowVirtualization", optionValue: boolean): void; /** * Enables virtualization for columns only. Column virtualization can work only in combination with fixed row virtalization. Setting columnVirtualization to true will automatically set [virtualization](ui.ighierarchicalgrid#options:virtualization) to true and [virtualizationMode](ui.ighierarchicalgrid#options:virtualizationMode) to "fixed". + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "columnVirtualization"): boolean; /** * Enables virtualization for columns only. Column virtualization can work only in combination with fixed row virtalization. Setting columnVirtualization to true will automatically set [virtualization](ui.ighierarchicalgrid#options:virtualization) to true and [virtualizationMode](ui.ighierarchicalgrid#options:virtualizationMode) to "fixed". * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "columnVirtualization", optionValue: boolean): void; /** * Number of pixels to scroll the grid by, when virtualization is enabled, and mouse wheel scrolling is performed over the virtual grid area. If "null" the step will be equal to the [avgRowHeight](ui.ighierarchicalgrid#options:avgRowHeight). + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "virtualizationMouseWheelStep"): number; /** * Number of pixels to scroll the grid by, when virtualization is enabled, and mouse wheel scrolling is performed over the virtual grid area. If "null" the step will be equal to the [avgRowHeight](ui.ighierarchicalgrid#options:avgRowHeight). * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "virtualizationMouseWheelStep", optionValue: number): void; /** * If this option is set to true, the height of the grid row will be calculated automatically based on the [avgRowHeight](ui.ighierarchicalgrid#options:avgRowHeight) and the visible virtual records. If no [avgRowHeight](ui.ighierarchicalgrid#options:avgRowHeight) is specified, it will be calculated automatically at runtime. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "adjustVirtualHeights"): boolean; /** * If this option is set to true, the height of the grid row will be calculated automatically based on the [avgRowHeight](ui.ighierarchicalgrid#options:avgRowHeight) and the visible virtual records. If no [avgRowHeight](ui.ighierarchicalgrid#options:avgRowHeight) is specified, it will be calculated automatically at runtime. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "adjustVirtualHeights", optionValue: boolean): void; /** * The templating engine that will be used to render the grid [column templates](ui.ighierarchicalgrid#options:columns.template). [Here you can find](http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/05/30/using-different-template-engines-with-ignite-ui-controls.aspx) how to use templating engines other than igTemplating and jsRender. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "templatingEngine"): string; @@ -48641,6 +56384,7 @@ interface JQuery { /** * The templating engine that will be used to render the grid [column templates](ui.ighierarchicalgrid#options:columns.template). [Here you can find](http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/05/30/using-different-template-engines-with-ignite-ui-controls.aspx) how to use templating engines other than igTemplating and jsRender. * + * * @optionValue New value to be set. */ @@ -48648,228 +56392,268 @@ interface JQuery { /** * An array of column objects. Checkout the [Columns and Layout](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-columns) topic for details on configuring the columns array. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "columns"): IgHierarchicalGridColumn[]; /** * An array of column objects. Checkout the [Columns and Layout](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-columns) topic for details on configuring the columns array. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "columns", optionValue: IgHierarchicalGridColumn[]): void; /** * Can be any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an $.ig.DataSource itself + * */ - igHierarchicalGrid(optionLiteral: 'option', optionName: "dataSource"): any; + + igHierarchicalGrid(optionLiteral: 'option', optionName: "dataSource"): string|Array|Object; /** * Can be any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an $.ig.DataSource itself * + * * @optionValue New value to be set. */ - igHierarchicalGrid(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; + + igHierarchicalGrid(optionLiteral: 'option', optionName: "dataSource", optionValue: string|Array|Object): void; /** * Gets a remote URL as a data source, from which data will be retrieved using the [$.ig.DataSource](ig.datasource). + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "dataSourceUrl"): string; /** * Sets a remote URL as a data source, from which data will be retrieved using the [$.ig.DataSource](ig.datasource). * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "dataSourceUrl", optionValue: string): void; /** * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type). + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "dataSourceType"): string; /** * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type). * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; /** * See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). This is the property in the responses where data records are held, if the response is wrapped. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "responseDataKey"): string; /** * See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). This is the property in the responses where data records are held, if the response is wrapped. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; /** * See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "responseTotalRecCountKey"): string; /** * See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "responseTotalRecCountKey", optionValue: string): void; /** * Gets the HTTP verb to be used to issue the requests to a remote data source. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "requestType"): string; /** * Sets the HTTP verb to be used to issue the requests to a remote data source. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "requestType", optionValue: string): void; /** * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "responseContentType"): string; /** * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "responseContentType", optionValue: string): void; /** * Controls the visibility of the grid header. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "showHeader"): boolean; /** * Controls the visibility of the grid header. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "showHeader", optionValue: boolean): void; /** * Controls the visibility of the grid footer. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "showFooter"): boolean; /** * Controls the visibility of the grid footer. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "showFooter", optionValue: boolean): void; /** * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.ighierarchicalgrid#options:virtualization) is enabled, fixedHeaders will always act as if it's true, no matter which value is set. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "fixedHeaders"): boolean; /** * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.ighierarchicalgrid#options:virtualization) is enabled, fixedHeaders will always act as if it's true, no matter which value is set. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "fixedHeaders", optionValue: boolean): void; /** * Footers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.ighierarchicalgrid#options:virtualization) is enabled, fixedFooters will always act as if it's true, no matter which value is set. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "fixedFooters"): boolean; /** * Footers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.ighierarchicalgrid#options:virtualization) is enabled, fixedFooters will always act as if it's true, no matter which value is set. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "fixedFooters", optionValue: boolean): void; /** * Caption text that will be shown above the grid header. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "caption"): string; /** * Caption text that will be shown above the grid header. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "caption", optionValue: string): void; /** * List of grid feature definitions: sorting, paging, etc. Each feature goes with its separate options that are documented for the feature accordingly. [Here you can find detailed documentation for all igGrid features](http://www.igniteui.com/help/iggrid-features-landing-page) + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "features"): IgHierarchicalGridFeature[]; /** * List of grid feature definitions: sorting, paging, etc. Each feature goes with its separate options that are documented for the feature accordingly. [Here you can find detailed documentation for all igGrid features](http://www.igniteui.com/help/iggrid-features-landing-page) * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "features", optionValue: IgHierarchicalGridFeature[]): void; /** * Initial tabIndex attribute that will be set on all focusable elements. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "tabIndex"): number; /** * Initial tabIndex attribute that will be set on all focusable elements. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; /** * If this option is set to false, the data to which the grid is bound will be used "as is" with no additional transformations based on [columns](ui.ighierarchicalgrid#options:columns) defined. Otherwise only the subset of data properties used in the [columns](ui.ighierarchicalgrid#options:columns) defined will be extracted in a new object and used. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "localSchemaTransform"): boolean; /** * If this option is set to false, the data to which the grid is bound will be used "as is" with no additional transformations based on [columns](ui.ighierarchicalgrid#options:columns) defined. Otherwise only the subset of data properties used in the [columns](ui.ighierarchicalgrid#options:columns) defined will be extracted in a new object and used. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "localSchemaTransform", optionValue: boolean): void; /** * Key of the column containing unique identifiers for the data records. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "primaryKey"): string; /** * Key of the column containing unique identifiers for the data records. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "primaryKey", optionValue: string): void; /** * If true, the transaction log will always be sent in the request for remote data, by the data source. Also this means that if there are values in the log, a POST will be performed instead of GET. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "serializeTransactionLog"): boolean; /** * If true, the transaction log will always be sent in the request for remote data, by the data source. Also this means that if there are values in the log, a POST will be performed instead of GET. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "serializeTransactionLog", optionValue: boolean): void; /** * Automatically commits the transactions as rows/cells are being edited to the client data source. A [saveChanges](ui.ighierarchicalgrid#methods:saveChanges) call still needs to be performed in order to commit the transactions to a server-side data source. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "autoCommit"): boolean; /** * Automatically commits the transactions as rows/cells are being edited to the client data source. A [saveChanges](ui.ighierarchicalgrid#methods:saveChanges) call still needs to be performed in order to commit the transactions to a server-side data source. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "autoCommit", optionValue: boolean): void; @@ -48880,6 +56664,7 @@ interface JQuery { * If a new row is added, edited, then deleted, there will be no transaction added to the log. * If several edits are made to a row or an individual cell, this should result in a single transaction. * Note: This option takes effect only when [autoCommit](ui.ighierarchicalgrid#options:autoCommit) is set to false. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "aggregateTransactions"): boolean; @@ -48890,12 +56675,14 @@ interface JQuery { * If several edits are made to a row or an individual cell, this should result in a single transaction. * Note: This option takes effect only when [autoCommit](ui.ighierarchicalgrid#options:autoCommit) is set to false. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "aggregateTransactions", optionValue: boolean): void; /** * Sets gets ability to automatically format text in cells for numeric and date columns. The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "autoFormat"): string|boolean; @@ -48903,6 +56690,7 @@ interface JQuery { /** * Sets gets ability to automatically format text in cells for numeric and date columns. The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) * + * * @optionValue New value to be set. */ @@ -48910,84 +56698,98 @@ interface JQuery { /** * Gets ability to render checkboxes and use checkbox editor when dataType of a column is "bool". Checkboxes are not rendered for boolean values in columns with a [column template](ui.ighierarchicalgrid#options:columns.template). + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "renderCheckboxes"): boolean; /** * Sets ability to render checkboxes and use checkbox editor when dataType of a column is "bool". Checkboxes are not rendered for boolean values in columns with a [column template](ui.ighierarchicalgrid#options:columns.template). * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "renderCheckboxes", optionValue: boolean): void; /** * URL to which updating requests will be made. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "updateUrl"): string; /** * URL to which updating requests will be made. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "updateUrl", optionValue: string): void; /** * Settings related to REST compliant update routines. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "restSettings"): IgHierarchicalGridRestSettings; /** * Settings related to REST compliant update routines. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "restSettings", optionValue: IgHierarchicalGridRestSettings): void; /** * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "alternateRowStyles"): boolean; /** * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "alternateRowStyles", optionValue: boolean): void; /** * If set to true and all columns' widths are specified and their combined width is less than the grid width then the last column width will be automatically adjusted to fill the remaining empty space of the grid. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "autofitLastColumn"): boolean; /** * If set to true and all columns' widths are specified and their combined width is less than the grid width then the last column width will be automatically adjusted to fill the remaining empty space of the grid. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "autofitLastColumn", optionValue: boolean): void; /** * Enables/disables rendering of hover styles when the mouse is over a record. This can be useful in templating scenarios, for example, where we don't want to apply hover styling to templated content. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "enableHoverStyles"): boolean; /** * Enables/disables rendering of hover styles when the mouse is over a record. This can be useful in templating scenarios, for example, where we don't want to apply hover styling to templated content. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "enableHoverStyles", optionValue: boolean): void; /** * Nables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "enableUTCDates"): boolean; /** * Nables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "enableUTCDates", optionValue: boolean): void; @@ -48995,6 +56797,7 @@ interface JQuery { /** * Merge unbound columns values inside data source when data source is remote. If true then the unbound columns are merged to the data source at runtime on the server. Note that data source is expanded with the new data and this could cause performance issues when the data is huge. If mergeUnboundColumns is false then the unbound data is sent and merged on the client. This option is used by the [igGrid MVC Helper](http://www.igniteui.com/help/iggrid-developing-asp-net-mvc-applications-with-iggrid). * Checkout [Populating Unbound Columns Remotely (igGrid)](http://www.igniteui.com/help/iggrid-unboundcolumns-populating-with-data-remotely) topic for more information. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "mergeUnboundColumns"): boolean; @@ -49002,36 +56805,42 @@ interface JQuery { * Merge unbound columns values inside data source when data source is remote. If true then the unbound columns are merged to the data source at runtime on the server. Note that data source is expanded with the new data and this could cause performance issues when the data is huge. If mergeUnboundColumns is false then the unbound data is sent and merged on the client. This option is used by the [igGrid MVC Helper](http://www.igniteui.com/help/iggrid-developing-asp-net-mvc-applications-with-iggrid). * Checkout [Populating Unbound Columns Remotely (igGrid)](http://www.igniteui.com/help/iggrid-unboundcolumns-populating-with-data-remotely) topic for more information. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "mergeUnboundColumns", optionValue: boolean): void; /** * When dataSource is a remote URL, defines whether to set the type of the remote data source to JSONP. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "jsonpRequest"): boolean; /** * When dataSource is a remote URL, defines whether to set the type of the remote data source to JSONP. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "jsonpRequest", optionValue: boolean): void; /** * Enables/disables grid adjusting its dimensions when its [width](ui.ighierarchicalgrid#options:width) and/or [height](ui.ighierarchicalgrid#options:height) is set in percent (%) and grid parent DOM container is resized. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "enableResizeContainerCheck"): boolean; /** * Enables/disables grid adjusting its dimensions when its [width](ui.ighierarchicalgrid#options:width) and/or [height](ui.ighierarchicalgrid#options:height) is set in percent (%) and grid parent DOM container is resized. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "enableResizeContainerCheck", optionValue: boolean): void; /** * Configures how the feature chooser icon should display on header cells - e.g. to display as gear icon or not. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "featureChooserIconDisplay"): string; @@ -49039,6 +56848,7 @@ interface JQuery { /** * Configures how the feature chooser icon should display on header cells - e.g. to display as gear icon or not. * + * * @optionValue New value to be set. */ @@ -49046,16 +56856,48 @@ interface JQuery { /** * Settings related to content scrolling. + * */ igHierarchicalGrid(optionLiteral: 'option', optionName: "scrollSettings"): IgHierarchicalGridScrollSettings; /** * Settings related to content scrolling. * + * * @optionValue New value to be set. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "scrollSettings", optionValue: IgHierarchicalGridScrollSettings): void; + /** + * Set/Get the locale language setting for the widget. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igHierarchicalGrid(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igHierarchicalGrid(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event which is fired when a hierarchical row is about to be expanded */ @@ -49580,6 +57422,10 @@ interface IgGridMultiColumnHeaders { [optionName: string]: any; } interface IgGridMultiColumnHeadersMethods { + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.iggridmulticolumnheader#options:language) + * Note that this method is for rare scenarios, see [language](ui.iggridmulticolumnheader#options:language) or [locale](ui.iggridmulticolumnheader#options:locale) option setter + */ changeLocale(): void; /** @@ -49699,87 +57545,104 @@ interface JQuery { interface IgGridPagingLocale { /** * Text rendered in front of the page size dropdown, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. + * */ pageSizeDropDownLabel?: string; /** * Trailing text for the page size dropdown, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. + * */ pageSizeDropDownTrailingLabel?: string; /** * Text for the next page label. + * */ nextPageLabelText?: string; /** * Text for the previous page label. + * */ prevPageLabelText?: string; /** * Text for the first page label. + * */ firstPageLabelText?: string; /** * Text for the last page label. + * */ lastPageLabelText?: string; /** * Leading label text for the drop down from where the page index can be switched. + * */ currentPageDropDownLeadingLabel?: string; /** * Trailing label text for the drop down from where the page index can be switched. + * */ currentPageDropDownTrailingLabel?: string; /** * Tooltip text for the page index drop down. + * */ currentPageDropDownTooltip?: string; /** * Tooltip text for the page size drop down. + * */ pageSizeDropDownTooltip?: string; /** * Tooltip text for the pager records label. + * */ pagerRecordsLabelTooltip?: string; /** * Tooltip text for the previous page button. + * */ prevPageTooltip?: string; /** * Tooltip text for the next page button. + * */ nextPageTooltip?: string; /** * Tooltip text for the first page button. + * */ firstPageTooltip?: string; /** * Tooltip text for the last page button. + * */ lastPageTooltip?: string; /** * Tooltip text templates of buttons that navigate to a particular page. The format string follows the [igTemplating](http://www.igniteui.com/help/igtemplating-overview) style and syntax. * See also the [pageCountLimit](ui.iggridpaging#options:pageCountLimit) option. + * */ pageTooltipFormat?: string; /** * Custom pager records label template - in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) style and syntax. + * */ pagerRecordsLabelTemplate?: string; @@ -49840,6 +57703,11 @@ interface PageSizeChangingEventUIParam { * Gets the current page size. */ currentPageSize?: number; + + /** + * Gets the new page size. + */ + newPageSize?: number; } interface PageSizeChangedEvent { @@ -49855,7 +57723,7 @@ interface PageSizeChangedEventUIParam { /** * Gets the current page size. */ - currentPageSize?: number; + pageSize?: number; } interface PagerRenderingEvent { @@ -49893,32 +57761,38 @@ interface PagerRenderedEventUIParam { interface IgGridPaging { /** * Number of records loaded and displayed per page. + * */ pageSize?: number; /** * The property in the response data, when using remote data source, that will hold the total number of records in the data source. + * */ recordCountKey?: string; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested page size. + * */ pageSizeUrlKey?: string; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested page index. + * */ pageIndexUrlKey?: string; /** * Current page index that's bound in the data source and rendered in the UI. + * */ currentPageIndex?: number; /** * Type of paging. Delegates all paging functionality to the [$.ig.DataSource](ig.datasource). * + * * Valid values: * "remote" Paging is performed by a remote end-point. * "local" Paging is performed locally by the [$.ig.DataSource](ig.datasource). @@ -49927,6 +57801,7 @@ interface IgGridPaging { /** * If false, a dropdown allowing to change the page size will not be rendered in the UI. + * */ showPageSizeDropDown?: boolean; @@ -50040,6 +57915,7 @@ interface IgGridPaging { /** * Page size dropdown location, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. Can be rendered above the grid header or inside the pager, next to the page links. * + * * Valid values: * "above" The page size drop down will be rendered above the grid header. * "inpager" The page size drop down will be rendered next to page links. @@ -50048,54 +57924,76 @@ interface IgGridPaging { /** * Option specifying whether to show summary label for the currently rendered records or not. + * */ showPagerRecordsLabel?: boolean; /** * Option specifying whether to render the first and last page navigation buttons. + * */ showFirstLastPages?: boolean; /** * Option specifying whether to render the previous and next page navigation buttons. + * */ showPrevNextPages?: boolean; /** * Predefined page sizes that are available to the end user to switch their grid paging to, through a drop down in the grid header. + * */ pageSizeList?: any; /** * Sets/Gets the number of pages which if exceeded a drop down list of page indices is displayed. If the number of pages is less than or equal to this option then buttons for each page are displayed. + * */ pageCountLimit?: number; /** * Number of page buttons, adjacent to and including the [active page](ui.iggridpaging#options:currentPageIndex), that are constantly visible. For the invisible pages, previous and next buttons are used. + * */ visiblePageCount?: number; /** * Drop down width for the page size and page index drop downs. + * */ defaultDropDownWidth?: number; /** * Time in milliseconds for which page drop down will wait for keystrokes before changing the page. + * */ delayOnPageChanged?: number; /** * Enables/disables paging persistence between states. + * */ persist?: boolean; /** * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * */ inherit?: boolean; + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event fired before the page index is changed. * Return false in order to cancel page index changing. @@ -50110,7 +58008,6 @@ interface IgGridPaging { /** * Event fired when the page size is about to be changed from the page size dropdown. * Return false in order to cancel page size changing. - * Use ui.newPageSize to get new page size. */ pageSizeChanging?: PageSizeChangingEvent; @@ -50136,6 +58033,13 @@ interface IgGridPaging { [optionName: string]: any; } interface IgGridPagingMethods { + changeGlobalLanguage(): void; + changeGlobalRegional(): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.iggridpaging#options:language) + * Note that this method is for rare scenarios, see [language](ui.iggridpaging#options:language) or [locale](ui.iggridpaging#options:locale) option setter + */ changeLocale(): void; /** @@ -50162,6 +58066,8 @@ interface JQuery { } interface JQuery { + igGridPaging(methodName: "changeGlobalLanguage"): void; + igGridPaging(methodName: "changeGlobalRegional"): void; igGridPaging(methodName: "changeLocale"): void; igGridPaging(methodName: "pageIndex", index?: number): number; igGridPaging(methodName: "pageSize", size?: number): number; @@ -50169,66 +58075,77 @@ interface JQuery { /** * Number of records loaded and displayed per page. + * */ igGridPaging(optionLiteral: 'option', optionName: "pageSize"): number; /** * Number of records loaded and displayed per page. * + * * @optionValue New value to be set. */ igGridPaging(optionLiteral: 'option', optionName: "pageSize", optionValue: number): void; /** * The property in the response data, when using remote data source, that will hold the total number of records in the data source. + * */ igGridPaging(optionLiteral: 'option', optionName: "recordCountKey"): string; /** * The property in the response data, when using remote data source, that will hold the total number of records in the data source. * + * * @optionValue New value to be set. */ igGridPaging(optionLiteral: 'option', optionName: "recordCountKey", optionValue: string): void; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested page size. + * */ igGridPaging(optionLiteral: 'option', optionName: "pageSizeUrlKey"): string; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested page size. * + * * @optionValue New value to be set. */ igGridPaging(optionLiteral: 'option', optionName: "pageSizeUrlKey", optionValue: string): void; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested page index. + * */ igGridPaging(optionLiteral: 'option', optionName: "pageIndexUrlKey"): string; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested page index. * + * * @optionValue New value to be set. */ igGridPaging(optionLiteral: 'option', optionName: "pageIndexUrlKey", optionValue: string): void; /** * Current page index that's bound in the data source and rendered in the UI. + * */ igGridPaging(optionLiteral: 'option', optionName: "currentPageIndex"): number; /** * Current page index that's bound in the data source and rendered in the UI. * + * * @optionValue New value to be set. */ igGridPaging(optionLiteral: 'option', optionName: "currentPageIndex", optionValue: number): void; /** * Type of paging. Delegates all paging functionality to the [$.ig.DataSource](ig.datasource). + * */ igGridPaging(optionLiteral: 'option', optionName: "type"): string; @@ -50236,6 +58153,7 @@ interface JQuery { /** * Type of paging. Delegates all paging functionality to the [$.ig.DataSource](ig.datasource). * + * * @optionValue New value to be set. */ @@ -50243,12 +58161,14 @@ interface JQuery { /** * If false, a dropdown allowing to change the page size will not be rendered in the UI. + * */ igGridPaging(optionLiteral: 'option', optionName: "showPageSizeDropDown"): boolean; /** * If false, a dropdown allowing to change the page size will not be rendered in the UI. * + * * @optionValue New value to be set. */ igGridPaging(optionLiteral: 'option', optionName: "showPageSizeDropDown", optionValue: boolean): void; @@ -50503,6 +58423,7 @@ interface JQuery { /** * Page size dropdown location, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. Can be rendered above the grid header or inside the pager, next to the page links. + * */ igGridPaging(optionLiteral: 'option', optionName: "pageSizeDropDownLocation"): string; @@ -50510,6 +58431,7 @@ interface JQuery { /** * Page size dropdown location, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. Can be rendered above the grid header or inside the pager, next to the page links. * + * * @optionValue New value to be set. */ @@ -50517,124 +58439,174 @@ interface JQuery { /** * Option specifying whether to show summary label for the currently rendered records or not. + * */ igGridPaging(optionLiteral: 'option', optionName: "showPagerRecordsLabel"): boolean; /** * Option specifying whether to show summary label for the currently rendered records or not. * + * * @optionValue New value to be set. */ igGridPaging(optionLiteral: 'option', optionName: "showPagerRecordsLabel", optionValue: boolean): void; /** * Option specifying whether to render the first and last page navigation buttons. + * */ igGridPaging(optionLiteral: 'option', optionName: "showFirstLastPages"): boolean; /** * Option specifying whether to render the first and last page navigation buttons. * + * * @optionValue New value to be set. */ igGridPaging(optionLiteral: 'option', optionName: "showFirstLastPages", optionValue: boolean): void; /** * Option specifying whether to render the previous and next page navigation buttons. + * */ igGridPaging(optionLiteral: 'option', optionName: "showPrevNextPages"): boolean; /** * Option specifying whether to render the previous and next page navigation buttons. * + * * @optionValue New value to be set. */ igGridPaging(optionLiteral: 'option', optionName: "showPrevNextPages", optionValue: boolean): void; /** * Predefined page sizes that are available to the end user to switch their grid paging to, through a drop down in the grid header. + * */ igGridPaging(optionLiteral: 'option', optionName: "pageSizeList"): any; /** * Predefined page sizes that are available to the end user to switch their grid paging to, through a drop down in the grid header. * + * * @optionValue New value to be set. */ igGridPaging(optionLiteral: 'option', optionName: "pageSizeList", optionValue: any): void; /** * Sets/Gets the number of pages which if exceeded a drop down list of page indices is displayed. If the number of pages is less than or equal to this option then buttons for each page are displayed. + * */ igGridPaging(optionLiteral: 'option', optionName: "pageCountLimit"): number; /** * Sets/ the number of pages which if exceeded a drop down list of page indices is displayed. If the number of pages is less than or equal to this option then buttons for each page are displayed. * + * * @optionValue New value to be set. */ igGridPaging(optionLiteral: 'option', optionName: "pageCountLimit", optionValue: number): void; /** * Number of page buttons, adjacent to and including the [active page](ui.iggridpaging#options:currentPageIndex), that are constantly visible. For the invisible pages, previous and next buttons are used. + * */ igGridPaging(optionLiteral: 'option', optionName: "visiblePageCount"): number; /** * Number of page buttons, adjacent to and including the [active page](ui.iggridpaging#options:currentPageIndex), that are constantly visible. For the invisible pages, previous and next buttons are used. * + * * @optionValue New value to be set. */ igGridPaging(optionLiteral: 'option', optionName: "visiblePageCount", optionValue: number): void; /** * Drop down width for the page size and page index drop downs. + * */ igGridPaging(optionLiteral: 'option', optionName: "defaultDropDownWidth"): number; /** * Drop down width for the page size and page index drop downs. * + * * @optionValue New value to be set. */ igGridPaging(optionLiteral: 'option', optionName: "defaultDropDownWidth", optionValue: number): void; /** * Time in milliseconds for which page drop down will wait for keystrokes before changing the page. + * */ igGridPaging(optionLiteral: 'option', optionName: "delayOnPageChanged"): number; /** * Time in milliseconds for which page drop down will wait for keystrokes before changing the page. * + * * @optionValue New value to be set. */ igGridPaging(optionLiteral: 'option', optionName: "delayOnPageChanged", optionValue: number): void; /** * Enables/disables paging persistence between states. + * */ igGridPaging(optionLiteral: 'option', optionName: "persist"): boolean; /** * Enables/disables paging persistence between states. * + * * @optionValue New value to be set. */ igGridPaging(optionLiteral: 'option', optionName: "persist", optionValue: boolean): void; /** * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * */ igGridPaging(optionLiteral: 'option', optionName: "inherit"): boolean; /** * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. * + * * @optionValue New value to be set. */ igGridPaging(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + /** + * Set/Get the locale language setting for the widget. + * + */ + igGridPaging(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igGridPaging(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igGridPaging(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igGridPaging(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event fired before the page index is changed. * Return false in order to cancel page index changing. @@ -50664,14 +58636,12 @@ interface JQuery { /** * Event fired when the page size is about to be changed from the page size dropdown. * Return false in order to cancel page size changing. - * Use ui.newPageSize to get new page size. */ igGridPaging(optionLiteral: 'option', optionName: "pageSizeChanging"): PageSizeChangingEvent; /** * Event fired when the page size is about to be changed from the page size dropdown. * Return false in order to cancel page size changing. - * Use ui.newPageSize to get new page size. * * @optionValue Define event handler function. */ @@ -50723,26 +58693,31 @@ interface JQuery { interface IgGridResizingColumnSetting { /** * Column key. this is a required property in every column setting if columnIndex is not set. + * */ columnKey?: string; /** * Column index. Can be used in place of column key. the preferred way of populating a column setting is to always use the column keys as identifiers. + * */ columnIndex?: number; /** * Enables disables resizing for the column. + * */ allowResizing?: boolean; /** * Minimum column width in pixels or percents. + * */ minimumWidth?: string|number; /** * Maximum column width in pixels or percents. + * */ maximumWidth?: string|number; @@ -50838,21 +58813,25 @@ interface ColumnResizedEventUIParam { interface IgGridResizing { /** * Resize the column to the size of the longest currently visible cell value. + * */ allowDoubleClickToResize?: boolean; /** * Specifies whether the resizing should be deferred until the user finishes resizing or applied immediately. + * */ deferredResizing?: boolean; /** * A list of column settings that specifies resizing options on a per column basis. + * */ columnSettings?: IgGridResizingColumnSetting[]; /** * The width in pixels of the resizing handle which is position at the right side of each resizeable column header. + * */ handleThreshold?: number; @@ -50861,6 +58840,24 @@ interface IgGridResizing { */ inherit?: boolean; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event fired before a resizing operation is executed. */ @@ -50882,6 +58879,9 @@ interface IgGridResizing { [optionName: string]: any; } interface IgGridResizingMethods { + changeGlobalLanguage(): void; + changeGlobalRegional(): void; + /** * Destroys the resizing widget */ @@ -50894,59 +58894,78 @@ interface IgGridResizingMethods { * @param width Width of the column in pixels or percents. If no width or "*" is specified the column will be auto-sized to the width of the data in it (including header and footer cells). */ resize(column: Object, width?: Object): void; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; } interface JQuery { data(propertyName: "igGridResizing"): IgGridResizingMethods; } interface JQuery { + igGridResizing(methodName: "changeGlobalLanguage"): void; + igGridResizing(methodName: "changeGlobalRegional"): void; igGridResizing(methodName: "destroy"): void; igGridResizing(methodName: "resize", column: Object, width?: Object): void; + igGridResizing(methodName: "changeLocale", $container: Object): void; /** * Resize the column to the size of the longest currently visible cell value. + * */ igGridResizing(optionLiteral: 'option', optionName: "allowDoubleClickToResize"): boolean; /** * Resize the column to the size of the longest currently visible cell value. * + * * @optionValue New value to be set. */ igGridResizing(optionLiteral: 'option', optionName: "allowDoubleClickToResize", optionValue: boolean): void; /** * Gets whether the resizing should be deferred until the user finishes resizing or applied immediately. + * */ igGridResizing(optionLiteral: 'option', optionName: "deferredResizing"): boolean; /** * Sets whether the resizing should be deferred until the user finishes resizing or applied immediately. * + * * @optionValue New value to be set. */ igGridResizing(optionLiteral: 'option', optionName: "deferredResizing", optionValue: boolean): void; /** * A list of column settings that specifies resizing options on a per column basis. + * */ igGridResizing(optionLiteral: 'option', optionName: "columnSettings"): IgGridResizingColumnSetting[]; /** * A list of column settings that specifies resizing options on a per column basis. * + * * @optionValue New value to be set. */ igGridResizing(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridResizingColumnSetting[]): void; /** * The width in pixels of the resizing handle which is position at the right side of each resizeable column header. + * */ igGridResizing(optionLiteral: 'option', optionName: "handleThreshold"): number; /** * The width in pixels of the resizing handle which is position at the right side of each resizeable column header. * + * * @optionValue New value to be set. */ igGridResizing(optionLiteral: 'option', optionName: "handleThreshold", optionValue: number): void; @@ -50963,6 +58982,50 @@ interface JQuery { */ igGridResizing(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igGridResizing(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igGridResizing(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igGridResizing(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igGridResizing(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igGridResizing(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igGridResizing(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event fired before a resizing operation is executed. */ @@ -51007,21 +59070,25 @@ interface JQuery { interface IgGridResponsiveColumnSetting { /** * Column key. This is a required property in every column setting if columnIndex is not set. + * */ columnKey?: string; /** * Column index. Can be used in place of column key. The preferred way of populating a column setting is to always use the column keys as identifiers. + * */ columnIndex?: number; /** * A list of predefined classes to decide element's visibility on. + * */ classes?: string; /** * A configuration object to use for the responsive functionality. Uses the keys defined in the widget's responsiveModes object. The classes property is not used if this one is set. + * */ configuration?: any; @@ -51034,26 +59101,31 @@ interface IgGridResponsiveColumnSetting { interface IgGridResponsiveAllowedColumnWidthPerType { /** * Minimal width in pixels string columns can take before forcing vertical rendering + * */ string?: number; /** * Minimal width in pixels number columns can take before forcing vertical rendering + * */ number?: number; /** * Minimal width in pixels bool columns can take before forcing vertical rendering + * */ bool?: number; /** * Minimal width in pixels date columns can take before forcing vertical rendering + * */ date?: number; /** * Minimal width in pixels object columns can take before forcing vertical rendering + * */ object?: number; @@ -51171,37 +59243,44 @@ interface ResponsiveModeChangedEventUIParam { interface IgGridResponsive { /** * A list of column settings that specifies how columns will react based on the environment the grid is run on. + * */ columnSettings?: IgGridResponsiveColumnSetting[]; /** * If this option is set to true an igResponsiveContainer widget will be attached to the igGrid control which will notify the feature when changes in the width of the container occur. + * */ reactOnContainerWidthChanges?: boolean; /** * If this option is set to true the widget will ensure the grid's width is always set to 100%. + * */ forceResponsiveGridWidth?: boolean; /** * The amount of pixels the window needs to resize with for the grid to respond. + * */ responsiveSensitivity?: number; /** * The recognized types of environments and their configuration. + * */ responsiveModes?: any; /** * Enable or disable the responsive vertical rendering for the grid. + * */ enableVerticalRendering?: boolean; /** * The window's width under which the grid will render its contents vertically. * + * * Valid values: * "string" The width in a (px) string * "number" The width as a number @@ -51212,6 +59291,7 @@ interface IgGridResponsive { /** * The width of the properties column when vertical rendering is enabled * + * * Valid values: * "string" The width in a (%) string * "number" The width as a number in percents @@ -51221,6 +59301,7 @@ interface IgGridResponsive { /** * The width of the values column when vertical rendering is enabled * + * * Valid values: * "string" The width in a (%) string * "number" The width as a number in percents @@ -51230,11 +59311,13 @@ interface IgGridResponsive { /** * When windowWidthToRenderVertically is null, determine minimal widths columns can take before * forcing vertical rendering for the grid + * */ allowedColumnWidthPerType?: IgGridResponsiveAllowedColumnWidthPerType; /** * Specifies a template to render a record with in a list-view style layout per mode. + * */ singleColumnTemplate?: any; @@ -51356,78 +59439,91 @@ interface JQuery { /** * A list of column settings that specifies how columns will react based on the environment the grid is run on. + * */ igGridResponsive(optionLiteral: 'option', optionName: "columnSettings"): IgGridResponsiveColumnSetting[]; /** * A list of column settings that specifies how columns will react based on the environment the grid is run on. * + * * @optionValue New value to be set. */ igGridResponsive(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridResponsiveColumnSetting[]): void; /** * If this option is set to true an igResponsiveContainer widget will be attached to the igGrid control which will notify the feature when changes in the width of the container occur. + * */ igGridResponsive(optionLiteral: 'option', optionName: "reactOnContainerWidthChanges"): boolean; /** * If this option is set to true an igResponsiveContainer widget will be attached to the igGrid control which will notify the feature when changes in the width of the container occur. * + * * @optionValue New value to be set. */ igGridResponsive(optionLiteral: 'option', optionName: "reactOnContainerWidthChanges", optionValue: boolean): void; /** * If this option is set to true the widget will ensure the grid's width is always set to 100%. + * */ igGridResponsive(optionLiteral: 'option', optionName: "forceResponsiveGridWidth"): boolean; /** * If this option is set to true the widget will ensure the grid's width is always set to 100%. * + * * @optionValue New value to be set. */ igGridResponsive(optionLiteral: 'option', optionName: "forceResponsiveGridWidth", optionValue: boolean): void; /** * The amount of pixels the window needs to resize with for the grid to respond. + * */ igGridResponsive(optionLiteral: 'option', optionName: "responsiveSensitivity"): number; /** * The amount of pixels the window needs to resize with for the grid to respond. * + * * @optionValue New value to be set. */ igGridResponsive(optionLiteral: 'option', optionName: "responsiveSensitivity", optionValue: number): void; /** * The recognized types of environments and their configuration. + * */ igGridResponsive(optionLiteral: 'option', optionName: "responsiveModes"): any; /** * The recognized types of environments and their configuration. * + * * @optionValue New value to be set. */ igGridResponsive(optionLiteral: 'option', optionName: "responsiveModes", optionValue: any): void; /** * Enable or disable the responsive vertical rendering for the grid. + * */ igGridResponsive(optionLiteral: 'option', optionName: "enableVerticalRendering"): boolean; /** * Enable or disable the responsive vertical rendering for the grid. * + * * @optionValue New value to be set. */ igGridResponsive(optionLiteral: 'option', optionName: "enableVerticalRendering", optionValue: boolean): void; /** * The window's width under which the grid will render its contents vertically. + * */ igGridResponsive(optionLiteral: 'option', optionName: "windowWidthToRenderVertically"): string|number; @@ -51435,6 +59531,7 @@ interface JQuery { /** * The window's width under which the grid will render its contents vertically. * + * * @optionValue New value to be set. */ @@ -51442,6 +59539,7 @@ interface JQuery { /** * The width of the properties column when vertical rendering is enabled + * */ igGridResponsive(optionLiteral: 'option', optionName: "propertiesColumnWidth"): string|number; @@ -51449,6 +59547,7 @@ interface JQuery { /** * The width of the properties column when vertical rendering is enabled * + * * @optionValue New value to be set. */ @@ -51456,6 +59555,7 @@ interface JQuery { /** * The width of the values column when vertical rendering is enabled + * */ igGridResponsive(optionLiteral: 'option', optionName: "valuesColumnWidth"): string|number; @@ -51463,6 +59563,7 @@ interface JQuery { /** * The width of the values column when vertical rendering is enabled * + * * @optionValue New value to be set. */ @@ -51471,6 +59572,7 @@ interface JQuery { /** * When windowWidthToRenderVertically is null, determine minimal widths columns can take before * forcing vertical rendering for the grid + * */ igGridResponsive(optionLiteral: 'option', optionName: "allowedColumnWidthPerType"): IgGridResponsiveAllowedColumnWidthPerType; @@ -51478,18 +59580,21 @@ interface JQuery { * When windowWidthToRenderVertically is null, determine minimal widths columns can take before * forcing vertical rendering for the grid * + * * @optionValue New value to be set. */ igGridResponsive(optionLiteral: 'option', optionName: "allowedColumnWidthPerType", optionValue: IgGridResponsiveAllowedColumnWidthPerType): void; /** * Gets a template to render a record with in a list-view style layout per mode. + * */ igGridResponsive(optionLiteral: 'option', optionName: "singleColumnTemplate"): any; /** * Sets a template to render a record with in a list-view style layout per mode. * + * * @optionValue New value to be set. */ igGridResponsive(optionLiteral: 'option', optionName: "singleColumnTemplate", optionValue: any): void; @@ -51574,21 +59679,25 @@ interface JQuery { interface IgGridRowSelectorsLocale { /** * Selected records text for the select/deselect all overlay. + * */ selectedRecordsText?: string; /** * Deselected records text for the select/deselect all overlay. + * */ deselectedRecordsText?: string; /** * Select all text for the select/deselect all overlay. + * */ selectAllText?: string; /** * Deselect all text for the select/deselect all overlay. + * */ deselectAllText?: string; @@ -51739,22 +59848,26 @@ interface CheckBoxStateChangedEventUIParam { interface IgGridRowSelectors { /** * Determines whether the row selectors column should contain row numbering + * */ enableRowNumbering?: boolean; /** * Determines whether the row selectors column should contain checkboxes + * */ enableCheckBoxes?: boolean; /** * The seed to be added to the default numbering + * */ rowNumberingSeed?: number; /** * defines width of the row selector`s column in pixels or percentage. * + * * Valid values: * "string" The row selector column width can be set in pixels (px) and percentage (%) * "number" The row selector width can be set as a number @@ -51766,11 +59879,13 @@ interface IgGridRowSelectors { * Determines whether the selection feature is required for the row selectors. If set to "false" * the widget will not check for Selection availability. If set to "true" an exception will be thrown if Selection is * not available. + * */ requireSelection?: boolean; /** * Determines whether checkboxes will be shown only if row selectors are on focus/selected. + * */ showCheckBoxesOnFocus?: boolean; @@ -51781,6 +59896,7 @@ interface IgGridRowSelectors { /** * Enables/disables showing an overlay after clicking on the header checkbox, which allows selecting all records from all pages. + * */ enableSelectAllForPaging?: boolean; @@ -51790,6 +59906,7 @@ interface IgGridRowSelectors { * Element with attribute data-rs-close-all is used for closing the overlay * The default template is "
" * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * */ selectAllForPagingTemplate?: string; @@ -51799,6 +59916,7 @@ interface IgGridRowSelectors { * Element with attribute data-rs-close-all is used for closing the overlay * The default template is "
You have deselected ${unchecked} records. Deselect all ${totalRecordsCount} records
" * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * */ deselectAllForPagingTemplate?: string; locale?: IgGridRowSelectorsLocale; @@ -51825,6 +59943,11 @@ interface IgGridRowSelectors { } interface IgGridRowSelectorsMethods { destroy(): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.iggridrowselectors#options:language) + * Note that this method is for rare scenarios, see [language](ui.iggridrowselectors#options:language) or [locale](ui.iggridrowselectors#options:locale) option setter + */ changeLocale(): void; } interface JQuery { @@ -51837,42 +59960,49 @@ interface JQuery { /** * Determines whether the row selectors column should contain row numbering + * */ igGridRowSelectors(optionLiteral: 'option', optionName: "enableRowNumbering"): boolean; /** * Determines whether the row selectors column should contain row numbering * + * * @optionValue New value to be set. */ igGridRowSelectors(optionLiteral: 'option', optionName: "enableRowNumbering", optionValue: boolean): void; /** * Determines whether the row selectors column should contain checkboxes + * */ igGridRowSelectors(optionLiteral: 'option', optionName: "enableCheckBoxes"): boolean; /** * Determines whether the row selectors column should contain checkboxes * + * * @optionValue New value to be set. */ igGridRowSelectors(optionLiteral: 'option', optionName: "enableCheckBoxes", optionValue: boolean): void; /** * The seed to be added to the default numbering + * */ igGridRowSelectors(optionLiteral: 'option', optionName: "rowNumberingSeed"): number; /** * The seed to be added to the default numbering * + * * @optionValue New value to be set. */ igGridRowSelectors(optionLiteral: 'option', optionName: "rowNumberingSeed", optionValue: number): void; /** * Defines width of the row selector`s column in pixels or percentage. + * */ igGridRowSelectors(optionLiteral: 'option', optionName: "rowSelectorColumnWidth"): string|number; @@ -51880,6 +60010,7 @@ interface JQuery { /** * Defines width of the row selector`s column in pixels or percentage. * + * * @optionValue New value to be set. */ @@ -51889,6 +60020,7 @@ interface JQuery { * Determines whether the selection feature is required for the row selectors. If set to "false" * the widget will not check for Selection availability. If set to "true" an exception will be thrown if Selection is * not available. + * */ igGridRowSelectors(optionLiteral: 'option', optionName: "requireSelection"): boolean; @@ -51897,18 +60029,21 @@ interface JQuery { * the widget will not check for Selection availability. If set to "true" an exception will be thrown if Selection is * not available. * + * * @optionValue New value to be set. */ igGridRowSelectors(optionLiteral: 'option', optionName: "requireSelection", optionValue: boolean): void; /** * Determines whether checkboxes will be shown only if row selectors are on focus/selected. + * */ igGridRowSelectors(optionLiteral: 'option', optionName: "showCheckBoxesOnFocus"): boolean; /** * Determines whether checkboxes will be shown only if row selectors are on focus/selected. * + * * @optionValue New value to be set. */ igGridRowSelectors(optionLiteral: 'option', optionName: "showCheckBoxesOnFocus", optionValue: boolean): void; @@ -51927,12 +60062,14 @@ interface JQuery { /** * Enables/disables showing an overlay after clicking on the header checkbox, which allows selecting all records from all pages. + * */ igGridRowSelectors(optionLiteral: 'option', optionName: "enableSelectAllForPaging"): boolean; /** * Enables/disables showing an overlay after clicking on the header checkbox, which allows selecting all records from all pages. * + * * @optionValue New value to be set. */ igGridRowSelectors(optionLiteral: 'option', optionName: "enableSelectAllForPaging", optionValue: boolean): void; @@ -51943,6 +60080,7 @@ interface JQuery { * Element with attribute data-rs-close-all is used for closing the overlay * The default template is "
You have selected ${checked} records. Select all ${totalRecordsCount} records
" * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * */ igGridRowSelectors(optionLiteral: 'option', optionName: "selectAllForPagingTemplate"): string; @@ -51953,6 +60091,7 @@ interface JQuery { * The default template is "
You have selected ${checked} records. Select all ${totalRecordsCount} records
" * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. * + * * @optionValue New value to be set. */ igGridRowSelectors(optionLiteral: 'option', optionName: "selectAllForPagingTemplate", optionValue: string): void; @@ -51963,6 +60102,7 @@ interface JQuery { * Element with attribute data-rs-close-all is used for closing the overlay * The default template is "
You have deselected ${unchecked} records. Deselect all ${totalRecordsCount} records
" * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * */ igGridRowSelectors(optionLiteral: 'option', optionName: "deselectAllForPagingTemplate"): string; @@ -51973,6 +60113,7 @@ interface JQuery { * The default template is "
You have deselected ${unchecked} records. Deselect all ${totalRecordsCount} records
" * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. * + * * @optionValue New value to be set. */ igGridRowSelectors(optionLiteral: 'option', optionName: "deselectAllForPagingTemplate", optionValue: string): void; @@ -52201,17 +60342,20 @@ interface ActiveRowChangedEventUIParam { interface IgGridSelection { /** * Enables / Disables multiple selection of cells and rows - depending on the mode + * */ multipleSelection?: boolean; /** * Enables / disables selection via dragging with the mouse - only applicable for cell selection + * */ mouseDragSelect?: boolean; /** * Defines type of the selection. * + * * Valid values: * "row" Defines row selection mode. * "cell" Defines cell selection mode. @@ -52220,36 +60364,43 @@ interface IgGridSelection { /** * Enables / disables activation of rows and cells. Activation implies ability to perform navigating through cells and rows via the keyboard, and selecting rows and cells using CTRL / SHIFT - in the way cells/rows are selected in Ms Excel + * */ activation?: boolean; /** * If wrapAround is enabled and selection is on the first or last row or cell, then when the end user tries to go beyond that, the first/last row or cell will be selected + * */ wrapAround?: boolean; /** * If true will basically skip going into child grids with down / up / right / left arrow keys, when in the context of hierarchical grid + * */ skipChildren?: boolean; /** * If true multiple selection of cells is done as if CTRL is being held. the option is disregarded if mode is set to row. this option is useful for enabling multiple discountinued selection on touch environments. + * */ multipleCellSelectOnClick?: boolean; /** - * Enables / disables selection via continuous touch event - only applicable for cell selection and touch-supported environments + * Deprecated="true" Enables / disables selection via continuous touch event - only applicable for cell selection and touch-supported environments + * */ touchDragSelect?: boolean; /** * Enables / disables selection persistance between states. + * */ persist?: boolean; /** * Enables / disables the ability to ctrl drag multiple selection windows when selection mode is 'cell' + * */ allowMultipleRangeSelection?: boolean; @@ -52548,30 +60699,35 @@ interface JQuery { /** * Enables / Disables multiple selection of cells and rows - depending on the mode + * */ igGridSelection(optionLiteral: 'option', optionName: "multipleSelection"): boolean; /** * Enables / Disables multiple selection of cells and rows - depending on the mode * + * * @optionValue New value to be set. */ igGridSelection(optionLiteral: 'option', optionName: "multipleSelection", optionValue: boolean): void; /** * Enables / disables selection via dragging with the mouse - only applicable for cell selection + * */ igGridSelection(optionLiteral: 'option', optionName: "mouseDragSelect"): boolean; /** * Enables / disables selection via dragging with the mouse - only applicable for cell selection * + * * @optionValue New value to be set. */ igGridSelection(optionLiteral: 'option', optionName: "mouseDragSelect", optionValue: boolean): void; /** * Defines type of the selection. + * */ igGridSelection(optionLiteral: 'option', optionName: "mode"): string; @@ -52579,6 +60735,7 @@ interface JQuery { /** * Defines type of the selection. * + * * @optionValue New value to be set. */ @@ -52586,59 +60743,69 @@ interface JQuery { /** * Enables / disables activation of rows and cells. Activation implies ability to perform navigating through cells and rows via the keyboard, and selecting rows and cells using CTRL / SHIFT - in the way cells/rows are selected in Ms Excel + * */ igGridSelection(optionLiteral: 'option', optionName: "activation"): boolean; /** * Enables / disables activation of rows and cells. Activation implies ability to perform navigating through cells and rows via the keyboard, and selecting rows and cells using CTRL / SHIFT - in the way cells/rows are selected in Ms Excel * + * * @optionValue New value to be set. */ igGridSelection(optionLiteral: 'option', optionName: "activation", optionValue: boolean): void; /** * If wrapAround is enabled and selection is on the first or last row or cell, then when the end user tries to go beyond that, the first/last row or cell will be selected + * */ igGridSelection(optionLiteral: 'option', optionName: "wrapAround"): boolean; /** * If wrapAround is enabled and selection is on the first or last row or cell, then when the end user tries to go beyond that, the first/last row or cell will be selected * + * * @optionValue New value to be set. */ igGridSelection(optionLiteral: 'option', optionName: "wrapAround", optionValue: boolean): void; /** * If true will basically skip going into child grids with down / up / right / left arrow keys, when in the context of hierarchical grid + * */ igGridSelection(optionLiteral: 'option', optionName: "skipChildren"): boolean; /** * If true will basically skip going into child grids with down / up / right / left arrow keys, when in the context of hierarchical grid * + * * @optionValue New value to be set. */ igGridSelection(optionLiteral: 'option', optionName: "skipChildren", optionValue: boolean): void; /** * If true multiple selection of cells is done as if CTRL is being held. the option is disregarded if mode is set to row. this option is useful for enabling multiple discountinued selection on touch environments. + * */ igGridSelection(optionLiteral: 'option', optionName: "multipleCellSelectOnClick"): boolean; /** * If true multiple selection of cells is done as if CTRL is being held. the option is disregarded if mode is set to row. this option is useful for enabling multiple discountinued selection on touch environments. * + * * @optionValue New value to be set. */ igGridSelection(optionLiteral: 'option', optionName: "multipleCellSelectOnClick", optionValue: boolean): void; /** - * Enables / disables selection via continuous touch event - only applicable for cell selection and touch-supported environments + * Deprecated="true" Enables / disables selection via continuous touch event - only applicable for cell selection and touch-supported environments + * */ igGridSelection(optionLiteral: 'option', optionName: "touchDragSelect"): boolean; /** - * Enables / disables selection via continuous touch event - only applicable for cell selection and touch-supported environments + * Deprecated="true" Enables / disables selection via continuous touch event - only applicable for cell selection and touch-supported environments + * * * @optionValue New value to be set. */ @@ -52646,24 +60813,28 @@ interface JQuery { /** * Enables / disables selection persistance between states. + * */ igGridSelection(optionLiteral: 'option', optionName: "persist"): boolean; /** * Enables / disables selection persistance between states. * + * * @optionValue New value to be set. */ igGridSelection(optionLiteral: 'option', optionName: "persist", optionValue: boolean): void; /** * Enables / disables the ability to ctrl drag multiple selection windows when selection mode is 'cell' + * */ igGridSelection(optionLiteral: 'option', optionName: "allowMultipleRangeSelection"): boolean; /** * Enables / disables the ability to ctrl drag multiple selection windows when selection mode is 'cell' * + * * @optionValue New value to be set. */ igGridSelection(optionLiteral: 'option', optionName: "allowMultipleRangeSelection", optionValue: boolean): void; @@ -52833,6 +61004,24 @@ interface IgGridModalDialog { */ tabIndex?: number; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event fired before the modal dialog is opened. */ @@ -52888,12 +61077,27 @@ interface IgGridModalDialog { } interface IgGridModalDialogMethods { openModalDialog(): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.iggridmodaldialog#options:language) + * Note that this method is for rare scenarios, see [language](ui.iggridmodaldialog#options:language) or [locale](ui.iggridmodaldialog#options:locale) option setter + */ changeLocale(): void; closeModalDialog(accepted: Object, e: Object): void; getCaptionButtonContainer(): void; getFooter(): void; getContent(): void; destroy(): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igGridModalDialog"): IgGridModalDialogMethods; @@ -52921,6 +61125,13 @@ declare namespace Infragistics { class EditorProvider { /** * Create handlers cache + * + * @param callbacks + * @param key + * @param editorOptions + * @param tabIndex + * @param format + * @param element */ createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; keyDown(evt: Object, ui: Object): void; @@ -52944,6 +61155,13 @@ declare namespace Infragistics { class EditorProviderBase { /** * Call parent createEditor + * + * @param callbacks + * @param key + * @param editorOptions + * @param tabIndex + * @param format + * @param element */ createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; textChanged(evt: Object, ui: Object): void; @@ -53152,6 +61370,10 @@ class SortingExpressionsManager { /** * Insert expr at the first position of the se (sorting expressions) if there are not any other expressions with flag group by * otherwise if there are such expressions inserts after the last + * + * @param se + * @param expr + * @param feature */ addSortingExpression(se: Object, expr: Object, feature: Object): void; setFormattersForSortingExprs(exprs: Object, grid: Object): void; @@ -53166,6 +61388,8 @@ interface JQuery { igGridModalDialog(methodName: "getFooter"): void; igGridModalDialog(methodName: "getContent"): void; igGridModalDialog(methodName: "destroy"): void; + igGridModalDialog(methodName: "changeGlobalLanguage"): void; + igGridModalDialog(methodName: "changeGlobalRegional"): void; /** * The default modal dialog width in pixels. @@ -53221,6 +61445,50 @@ interface JQuery { */ igGridModalDialog(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igGridModalDialog(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igGridModalDialog(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igGridModalDialog(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igGridModalDialog(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igGridModalDialog(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igGridModalDialog(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event fired before the modal dialog is opened. */ @@ -53356,76 +61624,91 @@ interface JQuery { interface IgGridSortingLocale { /** * Custom sorted column tooltip in [igTemplating](http://www.igniteui.com/help/igtemplating-overview) format. + * */ sortedColumnTooltipFormat?: string; /** * Unsorted column tooltip. + * */ unsortedColumnTooltip?: string; /** * Ascending text used for header title. + * */ ascending?: string; /** * Descending text used for header title. + * */ descending?: string; /** * Specifies sortby button text for each unsorted column in multiple sorting dialog. + * */ modalDialogSortByButtonText?: string; /** * Specifies reset button text in the modal dialog. + * */ modalDialogResetButton?: string; /** * Specifies caption for each descending sorted column in multiple sorting dialog. + * */ modalDialogCaptionButtonDesc?: string; /** * Specifies caption for each ascending sorted column in multiple sorting dialog. + * */ modalDialogCaptionButtonAsc?: string; /** * Specifies caption for unsort button in multiple sorting dialog. + * */ modalDialogCaptionButtonUnsort?: string; /** * Specifies the text of the feature chooser sorting button. + * */ featureChooserText?: string; /** * Specifies caption text for multiple sorting dialog. + * */ modalDialogCaptionText?: string; /** * Specifies text of button which applies changes in modal dialog. + * */ modalDialogButtonApplyText?: string; /** * Specifies text of button which cancels the changes in the advanced sorting modal dialog. + * */ modalDialogButtonCancelText?: string; /** * Specifies the text shown in the feature chooser item for sorting in ascending order (displayed only on touch environment). + * */ featureChooserSortAsc?: string; /** * Specifies the text shown in the feature chooser item for sorting in descending order (displayed only on touch environment). + * */ featureChooserSortDesc?: string; @@ -53438,17 +61721,20 @@ interface IgGridSortingLocale { interface IgGridSortingColumnSetting { /** * Identifies the grid column by key. Either key or index must be set in every column setting. + * */ columnKey?: string; /** * Identifies the grid column by index. Either key or index must be set in every column setting. + * */ columnIndex?: number; /** * This will be the first sort direction when the column hasn't been sorted before. * + * * Valid values: * "asc" The first sort of the column data will be in ascending order. * "desc" The first sort of the column data will be in descending order. @@ -53458,6 +61744,7 @@ interface IgGridSortingColumnSetting { /** * The current (or default) sort direction. If this setting is specified, the column will be rendered sorted according to this option. * + * * Valid values: * "asc" The initial sort of the column data will be in ascending order. * "desc" The initial sort of the column data will be in descending order. @@ -53466,6 +61753,7 @@ interface IgGridSortingColumnSetting { /** * Enables/disables sorting on the specified column. By default all columns are sortable. + * */ allowSorting?: boolean; @@ -53480,6 +61768,7 @@ interface IgGridSortingColumnSetting { * 1 - indicating that val1 > val2, * -1 - indicating that val1 < val2. * + * * Valid values: * "string" The name of the function as a string located in the global window object. * "function" Function which will be used for custom comparison. @@ -53616,6 +61905,7 @@ interface IgGridSorting { /** * Defines local or remote sorting operations. * + * * Valid values: * "remote" Sorting is performed remotely as a server-side operation. * "local" Sorting is performed locally by the [$.ig.DataSource](ig.datasource) component. @@ -53624,32 +61914,38 @@ interface IgGridSorting { /** * Enables or disables the case sensitivity of the sorting. Works only for [local](ui.iggridsorting#options:type) sorting. + * */ caseSensitive?: boolean; /** * Enables/disables special styling for sorted columns. If false, sorted column cells will not have any special sort-related styling. + * */ applySortedColumnCss?: boolean; /** * URL param name which specifies how sorting expressions will be encoded in the URL. Uses OData conventions. ex: ?sort(col1)=asc + * */ sortUrlKey?: string; /** * URL param value for ascending type of sorting. Uses OData conventions. Example: ?sort(col1)=asc + * */ sortUrlKeyAscValue?: string; /** * URL param value for descending type of sorting. Uses OData conventions. Example: ?sort(col1)=desc + * */ sortUrlKeyDescValue?: string; /** * Defines single column sorting or multiple column sorting. * + * * Valid values: * "single" Only a single column can be sorted. Previously sorted columns will not preserve their sorting upon sorting a new column. * "multi" If enabled, previous sorted state for columns won't be cleared @@ -53658,12 +61954,14 @@ interface IgGridSorting { /** * Custom sort function(or name of the function as a string) accepting three parameters - the data to be sorted, an array of data source field definitions, and the direction to sort with (optional). The function should return the sorted data array. + * */ customSortFunction?: Function; /** * Specifies which direction to use on the first click / keydown, if the column is sorted for the first time. * + * * Valid values: * "ascending" The first sort of the column data will be in ascending order. * "descending" The first sort of the column data will be in descending order. @@ -53672,6 +61970,7 @@ interface IgGridSorting { /** * Specifies whether sorting to be applied immediately when click sort/unsort columns when using the multiple sorting dialog. When it is false Apply button shows and sorting is applied when the button is clicked. + * */ modalDialogSortOnClick?: boolean; @@ -53763,6 +62062,7 @@ interface IgGridSorting { /** * Specifies width of multiple sorting dialog. * + * * Valid values: * "string" Specifies the width in pixels as a string ("300px"). * "number" Specifies the width in pixels as a number (300) @@ -53772,6 +62072,7 @@ interface IgGridSorting { /** * Specifies height of multiple sorting dialog. * + * * Valid values: * "string" The widget height can be set in pixels (px) and percentage (%). * "number" The widget height can be set in pixels as a number. @@ -53780,16 +62081,19 @@ interface IgGridSorting { /** * Specifies time of milliseconds for animation duration to show/hide modal dialog. + * */ modalDialogAnimationDuration?: number; /** * A list of custom column settings that specify custom sorting settings for a specific column (whether sorting is enabled / disabled, default sort direction, first sort direction, etc.). + * */ columnSettings?: IgGridSortingColumnSetting[]; /** * Enables/disables sorting persistence when the grid is rebound. + * */ persist?: boolean; @@ -53803,14 +62107,28 @@ interface IgGridSorting { /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * */ dialogWidget?: string; /** * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * */ inherit?: boolean; + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event fired before sorting is invoked for a certain column. * Return false in order to cancel column sorting. @@ -53888,6 +62206,13 @@ interface IgGridSorting { [optionName: string]: any; } interface IgGridSortingMethods { + changeGlobalLanguage(): void; + changeGlobalRegional(): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.iggridsorting#options:language) + * Note that this method is for rare scenarios, see [language](ui.iggridsorting#options:language) or [locale](ui.iggridsorting#options:locale) option setter + */ changeLocale(): void; /** @@ -53895,6 +62220,7 @@ interface IgGridSortingMethods { * * @param index Column key (string) or index (number) - for multi-row grid only column key can be used. Specifies the column which we want to sort. If the mode is multiple, previous sorting states are not cleared. * @param direction Specifies sorting direction (ascending or descending) + * @param header */ sortColumn(index: Object, direction: Object, header: Object): void; @@ -53935,6 +62261,8 @@ interface IgGridSortingMethods { /** * Renders content of multiple sorting dialog - sorted and unsorted columns. + * + * @param isToCallEvents */ renderMultipleSortingDialogContent(isToCallEvents: Object): void; @@ -53948,6 +62276,8 @@ interface JQuery { } interface JQuery { + igGridSorting(methodName: "changeGlobalLanguage"): void; + igGridSorting(methodName: "changeGlobalRegional"): void; igGridSorting(methodName: "changeLocale"): void; igGridSorting(methodName: "sortColumn", index: Object, direction: Object, header: Object): void; igGridSorting(methodName: "sortMultiple", exprs?: any[]): void; @@ -53961,6 +62291,7 @@ interface JQuery { /** * Defines local or remote sorting operations. + * */ igGridSorting(optionLiteral: 'option', optionName: "type"): string; @@ -53968,6 +62299,7 @@ interface JQuery { /** * Defines local or remote sorting operations. * + * * @optionValue New value to be set. */ @@ -53975,66 +62307,77 @@ interface JQuery { /** * Enables or disables the case sensitivity of the sorting. Works only for [local](ui.iggridsorting#options:type) sorting. + * */ igGridSorting(optionLiteral: 'option', optionName: "caseSensitive"): boolean; /** * Enables or disables the case sensitivity of the sorting. Works only for [local](ui.iggridsorting#options:type) sorting. * + * * @optionValue New value to be set. */ igGridSorting(optionLiteral: 'option', optionName: "caseSensitive", optionValue: boolean): void; /** * Enables/disables special styling for sorted columns. If false, sorted column cells will not have any special sort-related styling. + * */ igGridSorting(optionLiteral: 'option', optionName: "applySortedColumnCss"): boolean; /** * Enables/disables special styling for sorted columns. If false, sorted column cells will not have any special sort-related styling. * + * * @optionValue New value to be set. */ igGridSorting(optionLiteral: 'option', optionName: "applySortedColumnCss", optionValue: boolean): void; /** * URL param name which specifies how sorting expressions will be encoded in the URL. Uses OData conventions. ex: ?sort(col1)=asc + * */ igGridSorting(optionLiteral: 'option', optionName: "sortUrlKey"): string; /** * URL param name which specifies how sorting expressions will be encoded in the URL. Uses OData conventions. ex: ?sort(col1)=asc * + * * @optionValue New value to be set. */ igGridSorting(optionLiteral: 'option', optionName: "sortUrlKey", optionValue: string): void; /** * URL param value for ascending type of sorting. Uses OData conventions. Example: ?sort(col1)=asc + * */ igGridSorting(optionLiteral: 'option', optionName: "sortUrlKeyAscValue"): string; /** * URL param value for ascending type of sorting. Uses OData conventions. Example: ?sort(col1)=asc * + * * @optionValue New value to be set. */ igGridSorting(optionLiteral: 'option', optionName: "sortUrlKeyAscValue", optionValue: string): void; /** * URL param value for descending type of sorting. Uses OData conventions. Example: ?sort(col1)=desc + * */ igGridSorting(optionLiteral: 'option', optionName: "sortUrlKeyDescValue"): string; /** * URL param value for descending type of sorting. Uses OData conventions. Example: ?sort(col1)=desc * + * * @optionValue New value to be set. */ igGridSorting(optionLiteral: 'option', optionName: "sortUrlKeyDescValue", optionValue: string): void; /** * Defines single column sorting or multiple column sorting. + * */ igGridSorting(optionLiteral: 'option', optionName: "mode"): string; @@ -54042,6 +62385,7 @@ interface JQuery { /** * Defines single column sorting or multiple column sorting. * + * * @optionValue New value to be set. */ @@ -54049,18 +62393,21 @@ interface JQuery { /** * Custom sort function(or name of the function as a string) accepting three parameters - the data to be sorted, an array of data source field definitions, and the direction to sort with (optional). The function should return the sorted data array. + * */ igGridSorting(optionLiteral: 'option', optionName: "customSortFunction"): Function; /** * Custom sort function(or name of the function as a string) accepting three parameters - the data to be sorted, an array of data source field definitions, and the direction to sort with (optional). The function should return the sorted data array. * + * * @optionValue New value to be set. */ igGridSorting(optionLiteral: 'option', optionName: "customSortFunction", optionValue: Function): void; /** * Gets which direction to use on the first click / keydown, if the column is sorted for the first time. + * */ igGridSorting(optionLiteral: 'option', optionName: "firstSortDirection"): string; @@ -54068,6 +62415,7 @@ interface JQuery { /** * Sets which direction to use on the first click / keydown, if the column is sorted for the first time. * + * * @optionValue New value to be set. */ @@ -54075,12 +62423,14 @@ interface JQuery { /** * Gets whether sorting to be applied immediately when click sort/unsort columns when using the multiple sorting dialog. When it is false Apply button shows and sorting is applied when the button is clicked. + * */ igGridSorting(optionLiteral: 'option', optionName: "modalDialogSortOnClick"): boolean; /** * Sets whether sorting to be applied immediately when click sort/unsort columns when using the multiple sorting dialog. When it is false Apply button shows and sorting is applied when the button is clicked. * + * * @optionValue New value to be set. */ igGridSorting(optionLiteral: 'option', optionName: "modalDialogSortOnClick", optionValue: boolean): void; @@ -54281,6 +62631,7 @@ interface JQuery { /** * Gets width of multiple sorting dialog. + * */ igGridSorting(optionLiteral: 'option', optionName: "modalDialogWidth"): string|number; @@ -54288,6 +62639,7 @@ interface JQuery { /** * Sets width of multiple sorting dialog. * + * * @optionValue New value to be set. */ @@ -54295,6 +62647,7 @@ interface JQuery { /** * Gets height of multiple sorting dialog. + * */ igGridSorting(optionLiteral: 'option', optionName: "modalDialogHeight"): string|number; @@ -54302,6 +62655,7 @@ interface JQuery { /** * Sets height of multiple sorting dialog. * + * * @optionValue New value to be set. */ @@ -54309,36 +62663,42 @@ interface JQuery { /** * Gets time of milliseconds for animation duration to show/hide modal dialog. + * */ igGridSorting(optionLiteral: 'option', optionName: "modalDialogAnimationDuration"): number; /** * Sets time of milliseconds for animation duration to show/hide modal dialog. * + * * @optionValue New value to be set. */ igGridSorting(optionLiteral: 'option', optionName: "modalDialogAnimationDuration", optionValue: number): void; /** * A list of custom column settings that specify custom sorting settings for a specific column (whether sorting is enabled / disabled, default sort direction, first sort direction, etc.). + * */ igGridSorting(optionLiteral: 'option', optionName: "columnSettings"): IgGridSortingColumnSetting[]; /** * A list of custom column settings that specify custom sorting settings for a specific column (whether sorting is enabled / disabled, default sort direction, first sort direction, etc.). * + * * @optionValue New value to be set. */ igGridSorting(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridSortingColumnSetting[]): void; /** * Enables/disables sorting persistence when the grid is rebound. + * */ igGridSorting(optionLiteral: 'option', optionName: "persist"): boolean; /** * Enables/disables sorting persistence when the grid is rebound. * + * * @optionValue New value to be set. */ igGridSorting(optionLiteral: 'option', optionName: "persist", optionValue: boolean): void; @@ -54363,28 +62723,62 @@ interface JQuery { /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * */ igGridSorting(optionLiteral: 'option', optionName: "dialogWidget"): string; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. * + * * @optionValue New value to be set. */ igGridSorting(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; /** * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * */ igGridSorting(optionLiteral: 'option', optionName: "inherit"): boolean; /** * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. * + * * @optionValue New value to be set. */ igGridSorting(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + /** + * Set/Get the locale language setting for the widget. + * + */ + igGridSorting(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igGridSorting(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igGridSorting(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igGridSorting(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event fired before sorting is invoked for a certain column. * Return false in order to cancel column sorting. @@ -54563,12 +62957,14 @@ interface JQuery { interface IgGridSummariesColumnSettingSummaryOperand { /** * Text of the summary method which is shown in summary cell + * */ rowDisplayLabel?: string; /** * Set type of summary operand * + * * Valid values: * "count" calculate count of result rows for the specified column * "min" calculate min of result rows for the specified column @@ -54581,16 +62977,19 @@ interface IgGridSummariesColumnSettingSummaryOperand { /** * If it is false the summary operand will be shown in dropdown but it will not be made calculation + * */ active?: boolean; /** * Name of the custom summary function which should be executed when type is custom + * */ summaryCalculator?: string; /** * Specifies the order of elements in dropdown. It is recommended to set order of custom operands and to be greater or equal to 5 + * */ order?: number; @@ -54599,6 +62998,7 @@ interface IgGridSummariesColumnSettingSummaryOperand { * When this option is not set, the [format](ui.iggrid#options:columns.format) of the column it is in will taken into account. * When this option and the column [format](ui.iggrid#options:columns.format) is not set, the regional settings will be taken depending on the [autoFormat](ui.iggrid#options:autoFormat) option. * If the column type is not specified in the [autoFormat](ui.iggrid#options:autoFormat) option and no format is set for both column and summary operand, no formatting is applied. + * */ format?: string; @@ -54611,21 +63011,25 @@ interface IgGridSummariesColumnSettingSummaryOperand { interface IgGridSummariesColumnSetting { /** * Enables disables summaries for the column + * */ allowSummaries?: boolean; /** * Column key. This is a required property in every column setting if columnIndex is not set + * */ columnKey?: string; /** * Column index. Can be used in place of column key. The preferred way of populating a column setting is to always use the column keys as identifiers + * */ columnIndex?: number; /** * Check defaultSummaryOperands + * */ summaryOperands?: IgGridSummariesColumnSettingSummaryOperand[]; @@ -54638,31 +63042,37 @@ interface IgGridSummariesColumnSetting { interface IgGridSummariesLocale { /** * Text of the button OK in the summaries dropdown + * */ dialogButtonOKText?: string; /** * Text of the button Cancel in the summaries dropdown + * */ dialogButtonCancelText?: string; /** * Get or set text that is shown in the feature chooser dropdown when summaries are hidden + * */ featureChooserText?: string; /** * Get or set text that is shown in the feauture chooser dropdown when summaries are shown + * */ featureChooserTextHide?: string; /** * Empty text template to be shown for empty cells + * */ emptyCellText?: string; /** * Tooltip text for header cell button + * */ summariesHeaderButtonTooltip?: string; @@ -54798,6 +63208,7 @@ interface IgGridSummaries { /** * type of summaries calculating. * + * * Valid values: * "remote" when it is remote summaries calculations are made on the server * "local" When it is local calculations are made on the client @@ -54849,6 +63260,7 @@ interface IgGridSummaries { /** * Specifies when calculations are made. * + * * Valid values: * "onselect" summaries are updated when checkbox is checked/unchecked * "okcancelbuttons" summaries are updated only when OK button is clicked @@ -54860,47 +63272,56 @@ interface IgGridSummaries { * When true indicates that the summaries may be rendered compactly, even mixing different summaries on the same line. * False ensures that each summary type is occupying a separate line. * Auto will use True if the maximum number of visible summaries is one or less and False otherwise. + * */ compactRenderingMode?: any; /** * Show header button icon in the header cell. On click - shows/hides summaries. If false then summary icon should not be shown in the feature chooser(if shown). + * */ showSummariesButton?: boolean; /** * Result key by which we get data from the result returned by remote data source. + * */ summariesResponseKey?: string; /** * Set key in GET Request for summaries - used only when type is remote + * */ summaryExprUrlKey?: string; /** * Function reference - it is called when data is retrieved from the data source + * */ callee?: Function; /** * Height of the dropdown in pixels + * */ dropDownHeight?: number; /** * Width of the dropdown in pixels + * */ dropDownWidth?: number; /** * Show/hide footer button(on click show/hide dropdown) + * */ showDropDownButton?: boolean; /** * Determines when the summary values are calculated when type is local * + * * Valid values: * "priortofilteringandpaging" summaries are calculated prior to filtering and paging * "afterfilteringbeforepaging" summaries are calculated after filtering and before paging @@ -54910,21 +63331,25 @@ interface IgGridSummaries { /** * Dropdown animation duration + * */ dropDownDialogAnimationDuration?: number; /** * Result template for summary result(shown in table cell) + * */ resultTemplate?: string; /** * a reference or name of a javascript function - renders summary cell in grid footer.(if not set it is used default render function) It takes 3 parameters - methodName(summary method), columnKey, data(summary data which should be rendered) + * */ renderSummaryCellFunc?: string|Object; /** * A list of column settings that specifies custom summaries options per column basis + * */ columnSettings?: IgGridSummariesColumnSetting[]; @@ -54934,6 +63359,18 @@ interface IgGridSummaries { inherit?: boolean; locale?: IgGridSummariesLocale; + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event fired before drop down is opened for a specific column summary * Return false in order to cancel opening the drop down. @@ -54999,7 +63436,19 @@ interface IgGridSummaries { [optionName: string]: any; } interface IgGridSummariesMethods { + changeGlobalLanguage(): void; + changeGlobalRegional(): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.iggridsummaries#options:language) + * Note that this method is for rare scenarios, see [language](ui.iggridsummaries#options:language) or [locale](ui.iggridsummaries#options:locale) option setter + */ changeLocale(): void; + + /** + * Changes the the regional settings of widget element to the language specified in [options.regional](ui.iggridsummaries#options:regional) + * Note that this method is for rare scenarios, use [regional](ui.iggridsummaries#options:regional) option setter + */ changeRegional(): void; destroy(): void; @@ -55063,6 +63512,7 @@ interface IgGridSummariesMethods { * @param columnMethods Array of column methods objects * @param data Object which represents result * represents dataType for the current column + * @param dataType */ calculateSummaryColumn(ck: string, columnMethods: any[], data: Object, dataType: Object): void; @@ -55073,6 +63523,8 @@ interface IgGridSummariesMethods { /** * Return a JQUERY object which holds all summaries for column with the specified column key + * + * @param columnKey */ summariesFor(columnKey: Object): void; } @@ -55081,6 +63533,8 @@ interface JQuery { } interface JQuery { + igGridSummaries(methodName: "changeGlobalLanguage"): void; + igGridSummaries(methodName: "changeGlobalRegional"): void; igGridSummaries(methodName: "changeLocale"): void; igGridSummaries(methodName: "changeRegional"): void; igGridSummaries(methodName: "destroy"): void; @@ -55098,6 +63552,7 @@ interface JQuery { /** * Type of summaries calculating. + * */ igGridSummaries(optionLiteral: 'option', optionName: "type"): string; @@ -55105,6 +63560,7 @@ interface JQuery { /** * Type of summaries calculating. * + * * @optionValue New value to be set. */ @@ -55208,6 +63664,7 @@ interface JQuery { /** * Gets when calculations are made. + * */ igGridSummaries(optionLiteral: 'option', optionName: "calculateRenderMode"): string; @@ -55215,6 +63672,7 @@ interface JQuery { /** * Sets when calculations are made. * + * * @optionValue New value to be set. */ @@ -55225,6 +63683,7 @@ interface JQuery { * When true indicates that the summaries may be rendered compactly, even mixing different summaries on the same line. * False ensures that each summary type is occupying a separate line. * Auto will use True if the maximum number of visible summaries is one or less and False otherwise. + * */ igGridSummaries(optionLiteral: 'option', optionName: "compactRenderingMode"): any; @@ -55234,96 +63693,112 @@ interface JQuery { * False ensures that each summary type is occupying a separate line. * Auto will use True if the maximum number of visible summaries is one or less and False otherwise. * + * * @optionValue New value to be set. */ igGridSummaries(optionLiteral: 'option', optionName: "compactRenderingMode", optionValue: any): void; /** * Show header button icon in the header cell. On click - shows/hides summaries. If false then summary icon should not be shown in the feature chooser(if shown). + * */ igGridSummaries(optionLiteral: 'option', optionName: "showSummariesButton"): boolean; /** * Show header button icon in the header cell. On click - shows/hides summaries. If false then summary icon should not be shown in the feature chooser(if shown). * + * * @optionValue New value to be set. */ igGridSummaries(optionLiteral: 'option', optionName: "showSummariesButton", optionValue: boolean): void; /** * Result key by which we get data from the result returned by remote data source. + * */ igGridSummaries(optionLiteral: 'option', optionName: "summariesResponseKey"): string; /** * Result key by which we get data from the result returned by remote data source. * + * * @optionValue New value to be set. */ igGridSummaries(optionLiteral: 'option', optionName: "summariesResponseKey", optionValue: string): void; /** * Set key in GET Request for summaries - used only when type is remote + * */ igGridSummaries(optionLiteral: 'option', optionName: "summaryExprUrlKey"): string; /** * Set key in GET Request for summaries - used only when type is remote * + * * @optionValue New value to be set. */ igGridSummaries(optionLiteral: 'option', optionName: "summaryExprUrlKey", optionValue: string): void; /** * Function reference - it is called when data is retrieved from the data source + * */ igGridSummaries(optionLiteral: 'option', optionName: "callee"): Function; /** * Function reference - it is called when data is retrieved from the data source * + * * @optionValue New value to be set. */ igGridSummaries(optionLiteral: 'option', optionName: "callee", optionValue: Function): void; /** * Height of the dropdown in pixels + * */ igGridSummaries(optionLiteral: 'option', optionName: "dropDownHeight"): number; /** * Height of the dropdown in pixels * + * * @optionValue New value to be set. */ igGridSummaries(optionLiteral: 'option', optionName: "dropDownHeight", optionValue: number): void; /** * Width of the dropdown in pixels + * */ igGridSummaries(optionLiteral: 'option', optionName: "dropDownWidth"): number; /** * Width of the dropdown in pixels * + * * @optionValue New value to be set. */ igGridSummaries(optionLiteral: 'option', optionName: "dropDownWidth", optionValue: number): void; /** * Show/hide footer button(on click show/hide dropdown) + * */ igGridSummaries(optionLiteral: 'option', optionName: "showDropDownButton"): boolean; /** * Show/hide footer button(on click show/hide dropdown) * + * * @optionValue New value to be set. */ igGridSummaries(optionLiteral: 'option', optionName: "showDropDownButton", optionValue: boolean): void; /** * Determines when the summary values are calculated when type is local + * */ igGridSummaries(optionLiteral: 'option', optionName: "summaryExecution"): string; @@ -55331,6 +63806,7 @@ interface JQuery { /** * Determines when the summary values are calculated when type is local * + * * @optionValue New value to be set. */ @@ -55338,30 +63814,35 @@ interface JQuery { /** * Dropdown animation duration + * */ igGridSummaries(optionLiteral: 'option', optionName: "dropDownDialogAnimationDuration"): number; /** * Dropdown animation duration * + * * @optionValue New value to be set. */ igGridSummaries(optionLiteral: 'option', optionName: "dropDownDialogAnimationDuration", optionValue: number): void; /** * Result template for summary result(shown in table cell) + * */ igGridSummaries(optionLiteral: 'option', optionName: "resultTemplate"): string; /** * Result template for summary result(shown in table cell) * + * * @optionValue New value to be set. */ igGridSummaries(optionLiteral: 'option', optionName: "resultTemplate", optionValue: string): void; /** * A reference or name of a javascript function - renders summary cell in grid footer.(if not set it is used default render function) It takes 3 parameters - methodName(summary method), columnKey, data(summary data which should be rendered) + * */ igGridSummaries(optionLiteral: 'option', optionName: "renderSummaryCellFunc"): string|Object; @@ -55369,6 +63850,7 @@ interface JQuery { /** * A reference or name of a javascript function - renders summary cell in grid footer.(if not set it is used default render function) It takes 3 parameters - methodName(summary method), columnKey, data(summary data which should be rendered) * + * * @optionValue New value to be set. */ @@ -55376,12 +63858,14 @@ interface JQuery { /** * A list of column settings that specifies custom summaries options per column basis + * */ igGridSummaries(optionLiteral: 'option', optionName: "columnSettings"): IgGridSummariesColumnSetting[]; /** * A list of column settings that specifies custom summaries options per column basis * + * * @optionValue New value to be set. */ igGridSummaries(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridSummariesColumnSetting[]): void; @@ -55400,6 +63884,36 @@ interface JQuery { igGridSummaries(optionLiteral: 'option', optionName: "locale"): IgGridSummariesLocale; igGridSummaries(optionLiteral: 'option', optionName: "locale", optionValue: IgGridSummariesLocale): void; + /** + * Set/Get the locale language setting for the widget. + * + */ + igGridSummaries(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igGridSummaries(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igGridSummaries(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igGridSummaries(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event fired before drop down is opened for a specific column summary * Return false in order to cancel opening the drop down. @@ -55548,21 +64062,25 @@ interface JQuery { interface IgGridTooltipsColumnSettings { /** * Either key or index must be set in every column setting. + * */ columnKey?: string; /** * Either key or index must be set in every column setting. + * */ columnIndex?: number; /** * Enables / disables tooltips on the specified column. By default tooltips are displayed for each column. Note: This option is mandatory. + * */ allowTooltips?: boolean; /** * Specifies the maximum width (in pixels) of the tooltip when shown for the specified column. If unset the width of the column will be used instead. + * */ maxWidth?: number; @@ -55574,7 +64092,8 @@ interface IgGridTooltipsColumnSettings { interface IgGridTooltips { /** - * determines the tooltip visibility option + * Determines the tooltip visibility option + * * * Valid values: * "always" tooltips always show for hovered elements @@ -55584,7 +64103,8 @@ interface IgGridTooltips { visibility?: string; /** - * controls the tooltip's style + * Controls the tooltip's style + * * * Valid values: * "tooltip" The tooltip will be positioned according to the mouse cursor. Will render the tooltip content as plain text. @@ -55595,32 +64115,38 @@ interface IgGridTooltips { /** * The time in milliseconds after which tooltip will show when * mouse cursor is hovered over a cell. + * */ showDelay?: number; /** * Type="integer" The time in milliseconds after which tooltip hides when mouse * cursor gets outside of the cell. + * */ hideDelay?: number; /** * A list of custom column settings that specify custom tooltip settings for a specific column (whether tooltips are enabled / disabled) + * */ columnSettings?: IgGridTooltipsColumnSettings; /** * Sets the time tooltip fades in and out when showing/hiding + * */ fadeTimespan?: number; /** * Sets the left position of the tooltip relative to the mouse cursor + * */ cursorLeftOffset?: number; /** * Sets the top position of the tooltip relative to the mouse cursor + * */ cursorTopOffset?: number; @@ -55675,6 +64201,7 @@ interface JQuery { /** * Determines the tooltip visibility option + * */ igGridTooltips(optionLiteral: 'option', optionName: "visibility"): string; @@ -55682,6 +64209,7 @@ interface JQuery { /** * Determines the tooltip visibility option * + * * @optionValue New value to be set. */ @@ -55689,6 +64217,7 @@ interface JQuery { /** * Controls the tooltip's style + * */ igGridTooltips(optionLiteral: 'option', optionName: "style"): string; @@ -55696,6 +64225,7 @@ interface JQuery { /** * Controls the tooltip's style * + * * @optionValue New value to be set. */ @@ -55704,6 +64234,7 @@ interface JQuery { /** * The time in milliseconds after which tooltip will show when * mouse cursor is hovered over a cell. + * */ igGridTooltips(optionLiteral: 'option', optionName: "showDelay"): number; @@ -55711,6 +64242,7 @@ interface JQuery { * The time in milliseconds after which tooltip will show when * mouse cursor is hovered over a cell. * + * * @optionValue New value to be set. */ igGridTooltips(optionLiteral: 'option', optionName: "showDelay", optionValue: number): void; @@ -55718,6 +64250,7 @@ interface JQuery { /** * Type="integer" The time in milliseconds after which tooltip hides when mouse * cursor gets outside of the cell. + * */ igGridTooltips(optionLiteral: 'option', optionName: "hideDelay"): number; @@ -55725,54 +64258,63 @@ interface JQuery { * Type="integer" The time in milliseconds after which tooltip hides when mouse * cursor gets outside of the cell. * + * * @optionValue New value to be set. */ igGridTooltips(optionLiteral: 'option', optionName: "hideDelay", optionValue: number): void; /** * A list of custom column settings that specify custom tooltip settings for a specific column (whether tooltips are enabled / disabled) + * */ igGridTooltips(optionLiteral: 'option', optionName: "columnSettings"): IgGridTooltipsColumnSettings; /** * A list of custom column settings that specify custom tooltip settings for a specific column (whether tooltips are enabled / disabled) * + * * @optionValue New value to be set. */ igGridTooltips(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridTooltipsColumnSettings): void; /** * The time tooltip fades in and out when showing/hiding + * */ igGridTooltips(optionLiteral: 'option', optionName: "fadeTimespan"): number; /** * Sets the time tooltip fades in and out when showing/hiding * + * * @optionValue New value to be set. */ igGridTooltips(optionLiteral: 'option', optionName: "fadeTimespan", optionValue: number): void; /** * The left position of the tooltip relative to the mouse cursor + * */ igGridTooltips(optionLiteral: 'option', optionName: "cursorLeftOffset"): number; /** * Sets the left position of the tooltip relative to the mouse cursor * + * * @optionValue New value to be set. */ igGridTooltips(optionLiteral: 'option', optionName: "cursorLeftOffset", optionValue: number): void; /** * The top position of the tooltip relative to the mouse cursor + * */ igGridTooltips(optionLiteral: 'option', optionName: "cursorTopOffset"): number; /** * Sets the top position of the tooltip relative to the mouse cursor * + * * @optionValue New value to be set. */ igGridTooltips(optionLiteral: 'option', optionName: "cursorTopOffset", optionValue: number): void; @@ -55845,12 +64387,14 @@ interface JQuery { interface IgGridUpdatingColumnSetting { /** * Identifies the grid column by key. + * */ columnKey?: string; /** * Specifies the type of editor to use for the column. * + * * Valid values: * "text" An igTextEditor will be created * "mask" An igMaskEditor will be created @@ -55883,31 +64427,37 @@ interface IgGridUpdatingColumnSetting { * validate: function (noLabel) {}, * isValid: function () {} * }); + * */ editorProvider?: any; /** * Specifies options to initialize the corresponding editor with. + * */ editorOptions?: any; /** * Specifies if the end-user will be allowed to leave the editor's value empty during edit mode or not. + * */ required?: boolean; /** * Specifies if the column is read-only. In 'cell' and 'row' [editMode](ui.iggridupdating#options:editMode) no editor will be created for read-only columns. In 'dialog' mode enabling [showReadonlyEditors](ui.iggridupdating#options:rowEditDialogOptions.showReadonlyEditors) will display disabled editors for such columns. + * */ readOnly?: boolean; /** * Specifies if the column's value should be validated or not. The validation is done based on the rules of the corresponding editor. + * */ validation?: boolean; /** * Specifies the default value for the column when adding new rows. When in edit mode for adding a row the value will be pre-filled in the column's editor (if the column is not read-only). The value should be of the type specified for the column in the grid's [columns](ui.iggrid#options:columns) collection. + * */ defaultValue?: any; @@ -55921,6 +64471,7 @@ interface IgGridUpdatingRowEditDialogOptions { /** * Controls the containment of the dialog's drag operation. * + * * Valid values: * "owner" The row edit dialog will be draggable only in the grid area. * "window" The row edit dialog will be draggable in the whole window area. @@ -55930,6 +64481,7 @@ interface IgGridUpdatingRowEditDialogOptions { /** * Controls the default row edit dialog width. * + * * Valid values: * "string" The dialog window width in pixels (400px). * "number" The dialog window width as a number (400). @@ -55939,6 +64491,7 @@ interface IgGridUpdatingRowEditDialogOptions { /** * Controls the default row edit dialog height. * + * * Valid values: * "string" The dialog window height in pixels (350px). * "number" The dialog window height as a number (350). @@ -55947,22 +64500,26 @@ interface IgGridUpdatingRowEditDialogOptions { /** * Specifies the animation duration for the opening and closing operations. + * */ animationDuration?: number; /** * Controls if editors should be rendered for read-only columns. If rendered, these editors will be disabled. + * */ showReadonlyEditors?: boolean; /** * Controls if editors should be rendered for hidden columns. + * */ showEditorsForHiddenColumns?: boolean; /** * Controls the width of the column containing the column names in the default row edit dialog. * + * * Valid values: * "string" The width of the column in pixels (100px) or percents (20%). * "number" The width of the column as a number (100) in pixels. @@ -55973,6 +64530,7 @@ interface IgGridUpdatingRowEditDialogOptions { /** * Controls the width of the column containing the editors in the default row edit dialog. * + * * Valid values: * "string" The width of the column in pixels (100px) or percents (20%). * "number" The width of the column as a number (100) in pixels. @@ -55983,28 +64541,33 @@ interface IgGridUpdatingRowEditDialogOptions { /** * Controls the visibility of the done and cancel buttons for the dialog. * If disabled the end-user will be able to stop editing only with the Enter and Esc keys. + * */ showDoneCancelButtons?: boolean; /** * Specifies a template to be rendered against the currently edited record (or up-to-date key-value pairs in the case of not yet created records). It may contain an element decorated with the 'data-render-tmpl' attribute to specify where the control should render the editors template specified in the [editorsTemplate](ui.iggridupdating#options:rowEditDialogOptions.editorsTemplate) option. For custom dialogs, the elements can be decorated with 'data-editor-for-' attributes where columnKey is the key of the column that editor or input will be used to edit. If both dialogTemplate and [dialogTemplateSelector](ui.iggridupdating#options:rowEditDialogOptions.dialogTemplateSelector) are specified, dialogTemplateSelector will be used.The default template is '
'. + * */ dialogTemplate?: string; /** * Specifies a selector to a template rendered against the currently edited record (or up-to-date key-value pairs in the case of not yet created records). It may contain an element decorated with the 'data-render-tmpl' attribute to specify where the control should render the editors template specified in the [editorsTemplate](ui.iggridupdating#options:rowEditDialogOptions.editorsTemplate) option. For custom dialogs, the elements can be decorated with 'data-editor-for-' attributes where columnKey is the key of the column that editor or input will be used to edit. If both [dialogTemplate](ui.iggridupdating#options:rowEditDialogOptions.dialogTemplate) and dialogTemplateSelector are specified, dialogTemplateSelector will be used.The default template is '
'. + * */ dialogTemplateSelector?: string; /** * Specifies a template to be executed for each column in the grid's column collection (or just the read-write columns if [showReadonlyEditors](ui.iggridupdating#options:rowEditDialogOptions.showReadonlyEditors) is false). Decorate the element to be used as an editor with 'data-editor-for-${key}'. The ${key} template tag should be replaced with the chosen templating engine's syntax for rendering values. If any editors for columns are specified in the dialog markup they will be exluded from the data the template will be rendered for. This property is ignored if [dialogTemplate](ui.iggridupdating#options:rowEditDialogOptions.dialogTemplate) does not include an element with the 'data-render-tmpl' attribute. If both editorsTemplate and [editorsTemplateSelector](ui.iggridupdating#options:rowEditDialogOptions.editorsTemplateSelector) are specified, editorsTemplateSelector will be used. * The default template is '${headerText}' + * */ editorsTemplate?: string; /** * Specifies a selector to a template to be executed for each column in the grid's column collection (or just the read-write columns if [showReadonlyEditors](ui.iggridupdating#options:rowEditDialogOptions.showReadonlyEditors) is false). Decorate the element to be used as an editor with 'data-editor-for-${key}'. The ${key} template tag should be replaced with the chosen templating engine's syntax for rendering values. If any editors for columns are specified in the dialog markup they will be exluded from the data the template will be rendered for. This property is ignored if [dialogTemplate](ui.iggridupdating#options:rowEditDialogOptions.dialogTemplate) does not include an element with the 'data-render-tmpl' attribute. If both [editorsTemplate](ui.iggridupdating#options:rowEditDialogOptions.editorsTemplate) and editorsTemplateSelector are specified, editorsTemplateSelector will be used. * The default template is '${headerText}' + * */ editorsTemplateSelector?: string; @@ -56017,41 +64580,49 @@ interface IgGridUpdatingRowEditDialogOptions { interface IgGridUpdatingLocale { /** * Specifies the label for the Done editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.doneLabel is used. + * */ doneLabel?: string; /** * Specifies the title for the Done editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.doneTooltip is used. + * */ doneTooltip?: string; /** * Specifies the label for the Cancel editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.cancelLabel is used. + * */ cancelLabel?: string; /** * Specifies the title for the Cancel editing button (only applicable when the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) option is enabled). If not set, $.ig.GridUpdating.locale.cancelTooltip is used. + * */ cancelTooltip?: string; /** * Specifies the label for the button starting edit mode for row adding. If not set, $.ig.GridUpdating.locale.addRowLabel is used. + * */ addRowLabel?: string; /** * Specifies the title for the button starting edit mode for row adding. If not set, $.ig.GridUpdating.locale.addRowTooltip is used. + * */ addRowTooltip?: string; /** * Specifies the label for the delete button. If not set, $.ig.GridUpdating.locale.deleteRowLabel is used. + * */ deleteRowLabel?: string; /** * Specifies the title for the delete button. If not set, $.ig.GridUpdating.locale.deleteRowTooltip is used. + * */ deleteRowTooltip?: string; @@ -56453,12 +65024,14 @@ interface RowEditDialogContentsRenderedEventUIParam { interface IgGridUpdating { /** * A list of custom column options that specify editing and validation settings for a specific column. + * */ columnSettings?: IgGridUpdatingColumnSetting[]; /** * Specifies the edit mode. * + * * Valid values: * "row" Editors are shown for all columns that are not read-only. The editor of the clicked cell receives initial focus. Done and Cancel buttons may be displayed based on the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) property. * "cell" An editor is shown for the cell entering edit mode. The Done and Cancel buttons are not supported for this mode. @@ -56469,16 +65042,19 @@ interface IgGridUpdating { /** * Specifies if deleting rows through the UI is enabled. + * */ enableDeleteRow?: boolean; /** * Specifies if adding rows through the UI is enabled. When enabled an additional row is rendered at the bottom of the grid's header that works as a button. When the end-user clicks on it edit mode is initiated either through a dialog (when [editMode](ui.iggridupdating#options:editMode) is 'dialog') or mimicking the look and feel of 'row' [editMode](ui.iggridupdating#options:editMode) (when [editMode](ui.iggridupdating#options:editMode) is 'row' or 'cell'). + * */ enableAddRow?: boolean; /** * Specifies if the value of each editable column in the grid should be validated. The validation is done based on the rules of their corresponding editors. + * */ validation?: boolean; @@ -56540,56 +65116,67 @@ interface IgGridUpdating { /** * Determines if the Done and Cancel buttons will be available as means to end edit mode for [editMode](ui.iggridupdating#options:editMode) 'row' and when adding a new row. + * */ showDoneCancelButtons?: boolean; /** * Specifies if an exception should be thrown when the grid's data view changes while there are pending transactions in the data source. The data view changes when the data source performs a sorting, filtering, groupby or paging operation and the exception thrown will prevent the operation from succeeding. All pending transactions must be committed before a data view operation is able to complete. Committing transactions can be done manually through the grid's [commit](ui.iggrid#methods:commit) function or automatically by setting [autoCommit](ui.iggrid#options:autoCommit) to 'true'. + * */ enableDataDirtyException?: boolean; /** * Specifies how end-users are able to start edit mode. Possible values: "click", "dblclick", "F2", "enter" and their combinations separated by coma or in array. The keyboard triggers have effect only if the grid cells can receive focus (the grid's [tabIndex](ui.iggrid#options:tabIndex) property should not have a negative value) or Selection is enabled. If "dblclick" is included, then "click" has no effect. + * */ startEditTriggers?: string|Array; /** * Determines if pressing Enter to navigate away from the currently edited cell should move the focus horizontally or vertically (default). + * */ horizontalMoveOnEnter?: boolean; /** * Enables excel navigation style. When turned on, the arrow keys can be used for changing the currently edited cell similar to how Tab and Enter behave. When disabled, the arrow keys control the cursor inside editors. + * */ excelNavigationMode?: boolean; /** * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property succeeds. The function will be called with arguments representing the data returned by the server. + * */ saveChangesSuccessHandler?: Function|string; /** * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property fails. The function will be called with arguments representing the data returned by the server. + * */ saveChangesErrorHandler?: Function|string; /** * On touch-enabled devices specifies the swipe distance for the delete button to appear. + * */ swipeDistance?: string|number; /** * Controls if navigation will wrap around the grid. The feature will never wrap around virtual grids. + * */ wrapAround?: boolean; /** * A list of options controlling the rendering behavior of the row edit dialog. If [editMode](ui.iggridupdating#options:editMode) is not 'dialog' these have no effect. + * */ rowEditDialogOptions?: IgGridUpdatingRowEditDialogOptions; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. For more information on how to utilize this property, please refer to the [Extending igGrid Modal Dialog](http://www.igniteui.com/help/extending-iggrid-modal-dialog) topic. + * */ dialogWidget?: string; @@ -56793,7 +65380,17 @@ interface IgGridUpdatingMethods { * Destroys igGridUpdating. */ destroy(): Object; + + /** + * Changes the the regional settings of widget element to the language specified in [options.regional](ui.iggridupdating#options:regional) + * Note that this method is for rare scenarios, use [regional](ui.iggridupdating#options:regional) option setter + */ changeRegional(): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.iggridupdating#options:language) + * Note that this method is for rare scenarios, see [language](ui.iggridupdating#options:language) or [locale](ui.iggridupdating#options:locale) option setter + */ changeLocale(): void; /** @@ -56832,18 +65429,21 @@ interface JQuery { /** * A list of custom column options that specify editing and validation settings for a specific column. + * */ igGridUpdating(optionLiteral: 'option', optionName: "columnSettings"): IgGridUpdatingColumnSetting[]; /** * A list of custom column options that specify editing and validation settings for a specific column. * + * * @optionValue New value to be set. */ igGridUpdating(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridUpdatingColumnSetting[]): void; /** * Gets the edit mode. + * */ igGridUpdating(optionLiteral: 'option', optionName: "editMode"): string; @@ -56851,6 +65451,7 @@ interface JQuery { /** * Sets the edit mode. * + * * @optionValue New value to be set. */ @@ -56858,36 +65459,42 @@ interface JQuery { /** * Gets if deleting rows through the UI is enabled. + * */ igGridUpdating(optionLiteral: 'option', optionName: "enableDeleteRow"): boolean; /** * Sets if deleting rows through the UI is enabled. * + * * @optionValue New value to be set. */ igGridUpdating(optionLiteral: 'option', optionName: "enableDeleteRow", optionValue: boolean): void; /** * Gets if adding rows through the UI is enabled. When enabled an additional row is rendered at the bottom of the grid's header that works as a button. When the end-user clicks on it edit mode is initiated either through a dialog (when [editMode](ui.iggridupdating#options:editMode) is 'dialog') or mimicking the look and feel of 'row' [editMode](ui.iggridupdating#options:editMode) (when [editMode](ui.iggridupdating#options:editMode) is 'row' or 'cell'). + * */ igGridUpdating(optionLiteral: 'option', optionName: "enableAddRow"): boolean; /** * Sets if adding rows through the UI is enabled. When enabled an additional row is rendered at the bottom of the grid's header that works as a button. When the end-user clicks on it edit mode is initiated either through a dialog (when [editMode](ui.iggridupdating#options:editMode) is 'dialog') or mimicking the look and feel of 'row' [editMode](ui.iggridupdating#options:editMode) (when [editMode](ui.iggridupdating#options:editMode) is 'row' or 'cell'). * + * * @optionValue New value to be set. */ igGridUpdating(optionLiteral: 'option', optionName: "enableAddRow", optionValue: boolean): void; /** * Gets if the value of each editable column in the grid should be validated. The validation is done based on the rules of their corresponding editors. + * */ igGridUpdating(optionLiteral: 'option', optionName: "validation"): boolean; /** * Sets if the value of each editable column in the grid should be validated. The validation is done based on the rules of their corresponding editors. * + * * @optionValue New value to be set. */ igGridUpdating(optionLiteral: 'option', optionName: "validation", optionValue: boolean): void; @@ -57022,30 +65629,35 @@ interface JQuery { /** * Determines if the Done and Cancel buttons will be available as means to end edit mode for [editMode](ui.iggridupdating#options:editMode) 'row' and when adding a new row. + * */ igGridUpdating(optionLiteral: 'option', optionName: "showDoneCancelButtons"): boolean; /** * Determines if the Done and Cancel buttons will be available as means to end edit mode for [editMode](ui.iggridupdating#options:editMode) 'row' and when adding a new row. * + * * @optionValue New value to be set. */ igGridUpdating(optionLiteral: 'option', optionName: "showDoneCancelButtons", optionValue: boolean): void; /** * Gets if an exception should be thrown when the grid's data view changes while there are pending transactions in the data source. The data view changes when the data source performs a sorting, filtering, groupby or paging operation and the exception thrown will prevent the operation from succeeding. All pending transactions must be committed before a data view operation is able to complete. Committing transactions can be done manually through the grid's [commit](ui.iggrid#methods:commit) function or automatically by setting [autoCommit](ui.iggrid#options:autoCommit) to 'true'. + * */ igGridUpdating(optionLiteral: 'option', optionName: "enableDataDirtyException"): boolean; /** * Sets if an exception should be thrown when the grid's data view changes while there are pending transactions in the data source. The data view changes when the data source performs a sorting, filtering, groupby or paging operation and the exception thrown will prevent the operation from succeeding. All pending transactions must be committed before a data view operation is able to complete. Committing transactions can be done manually through the grid's [commit](ui.iggrid#methods:commit) function or automatically by setting [autoCommit](ui.iggrid#options:autoCommit) to 'true'. * + * * @optionValue New value to be set. */ igGridUpdating(optionLiteral: 'option', optionName: "enableDataDirtyException", optionValue: boolean): void; /** * Gets how end-users are able to start edit mode. Possible values: "click", "dblclick", "F2", "enter" and their combinations separated by coma or in array. The keyboard triggers have effect only if the grid cells can receive focus (the grid's [tabIndex](ui.iggrid#options:tabIndex) property should not have a negative value) or Selection is enabled. If "dblclick" is included, then "click" has no effect. + * */ igGridUpdating(optionLiteral: 'option', optionName: "startEditTriggers"): string|Array; @@ -57053,6 +65665,7 @@ interface JQuery { /** * Sets how end-users are able to start edit mode. Possible values: "click", "dblclick", "F2", "enter" and their combinations separated by coma or in array. The keyboard triggers have effect only if the grid cells can receive focus (the grid's [tabIndex](ui.iggrid#options:tabIndex) property should not have a negative value) or Selection is enabled. If "dblclick" is included, then "click" has no effect. * + * * @optionValue New value to be set. */ @@ -57060,30 +65673,35 @@ interface JQuery { /** * Determines if pressing Enter to navigate away from the currently edited cell should move the focus horizontally or vertically (default). + * */ igGridUpdating(optionLiteral: 'option', optionName: "horizontalMoveOnEnter"): boolean; /** * Determines if pressing Enter to navigate away from the currently edited cell should move the focus horizontally or vertically (default). * + * * @optionValue New value to be set. */ igGridUpdating(optionLiteral: 'option', optionName: "horizontalMoveOnEnter", optionValue: boolean): void; /** * Enables excel navigation style. When turned on, the arrow keys can be used for changing the currently edited cell similar to how Tab and Enter behave. When disabled, the arrow keys control the cursor inside editors. + * */ igGridUpdating(optionLiteral: 'option', optionName: "excelNavigationMode"): boolean; /** * Enables excel navigation style. When turned on, the arrow keys can be used for changing the currently edited cell similar to how Tab and Enter behave. When disabled, the arrow keys control the cursor inside editors. * + * * @optionValue New value to be set. */ igGridUpdating(optionLiteral: 'option', optionName: "excelNavigationMode", optionValue: boolean): void; /** * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property succeeds. The function will be called with arguments representing the data returned by the server. + * */ igGridUpdating(optionLiteral: 'option', optionName: "saveChangesSuccessHandler"): Function|string; @@ -57091,6 +65709,7 @@ interface JQuery { /** * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property succeeds. The function will be called with arguments representing the data returned by the server. * + * * @optionValue New value to be set. */ @@ -57098,6 +65717,7 @@ interface JQuery { /** * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property fails. The function will be called with arguments representing the data returned by the server. + * */ igGridUpdating(optionLiteral: 'option', optionName: "saveChangesErrorHandler"): Function|string; @@ -57105,6 +65725,7 @@ interface JQuery { /** * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property fails. The function will be called with arguments representing the data returned by the server. * + * * @optionValue New value to be set. */ @@ -57112,6 +65733,7 @@ interface JQuery { /** * On touch-enabled devices specifies the swipe distance for the delete button to appear. + * */ igGridUpdating(optionLiteral: 'option', optionName: "swipeDistance"): string|number; @@ -57119,6 +65741,7 @@ interface JQuery { /** * On touch-enabled devices specifies the swipe distance for the delete button to appear. * + * * @optionValue New value to be set. */ @@ -57126,36 +65749,42 @@ interface JQuery { /** * Controls if navigation will wrap around the grid. The feature will never wrap around virtual grids. + * */ igGridUpdating(optionLiteral: 'option', optionName: "wrapAround"): boolean; /** * Controls if navigation will wrap around the grid. The feature will never wrap around virtual grids. * + * * @optionValue New value to be set. */ igGridUpdating(optionLiteral: 'option', optionName: "wrapAround", optionValue: boolean): void; /** * A list of options controlling the rendering behavior of the row edit dialog. If [editMode](ui.iggridupdating#options:editMode) is not 'dialog' these have no effect. + * */ igGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogOptions"): IgGridUpdatingRowEditDialogOptions; /** * A list of options controlling the rendering behavior of the row edit dialog. If [editMode](ui.iggridupdating#options:editMode) is not 'dialog' these have no effect. * + * * @optionValue New value to be set. */ igGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogOptions", optionValue: IgGridUpdatingRowEditDialogOptions): void; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. For more information on how to utilize this property, please refer to the [Extending igGrid Modal Dialog](http://www.igniteui.com/help/extending-iggrid-modal-dialog) topic. + * */ igGridUpdating(optionLiteral: 'option', optionName: "dialogWidget"): string; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. For more information on how to utilize this property, please refer to the [Extending igGrid Modal Dialog](http://www.igniteui.com/help/extending-iggrid-modal-dialog) topic. * + * * @optionValue New value to be set. */ igGridUpdating(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; @@ -57496,54 +66125,82 @@ interface WorkspaceResizedEventUIParam {} interface IgHtmlEditor { /** * Shows/hides the "Formatting" toolbar. + * */ showFormattingToolbar?: boolean; /** * Shows/hides the "Text" toolbar. + * */ showTextToolbar?: boolean; /** * Shows/hides the "Insert Object" toolbar. + * */ showInsertObjectToolbar?: boolean; /** * Shows/hides the "Copy Paste" toolbar. + * */ showCopyPasteToolbar?: boolean; /** * The width of the html editor. It can be set as a number in pixels, string (px) or percentage (%). + * */ width?: string|number; /** * The height of the html editor. It can be set as a number in pixels, string (px) or percentage (%). + * */ height?: string|number; /** * The html editor toolbars list. + * */ toolbarSettings?: any[]; /** * The html editor custom toolbars list. + * */ customToolbars?: any[]; /** * The name attribute of the html editor source view. + * */ inputName?: string; /** * Used to render inside the html editor as initial content + * */ value?: string; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event fired after the html editor widget has been rendered. */ @@ -57624,6 +66281,11 @@ interface IgHtmlEditorMethods { * Returns the element on which the widget was instantiated */ widget(): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.ightmleditor#options:language) + * Note that this method is for rare scenarios, use [language](ui.ightmleditor#options:language) or [locale](ui.ightmleditor#options:locale) option setter + */ changeLocale(): void; /** @@ -57695,6 +66357,16 @@ interface IgHtmlEditorMethods { * @param element Accepts html string, DOM element or a jQuery object. */ insertAtCaret(element: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igHtmlEditor"): IgHtmlEditorMethods; @@ -57737,6 +66409,24 @@ interface IgHtmlEditorPopover { item?: any; target?: any; isHidden?: boolean; + + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; apply?: ApplyEvent; cancel?: CancelEvent; show?: ShowEvent; @@ -57750,6 +66440,32 @@ interface IgHtmlEditorPopover { interface IgHtmlEditorPopoverMethods { show(item: Object): void; hide(): void; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; + + /** + * Destroy is part of the jQuery UI widget API and does the following: + * 1. Remove custom CSS classes that were added. + * 2. Unwrap any wrapping elements such as scrolling divs and other containers. + * 3. Unbind all events that were bound. + */ + destroy(): void; } interface JQuery { data(propertyName: "igHtmlEditorPopover"): IgHtmlEditorPopoverMethods; @@ -57759,6 +66475,24 @@ interface IgLinkPropertiesDialog { item?: any; target?: any; isHidden?: boolean; + + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; apply?: ApplyEvent; cancel?: CancelEvent; show?: ShowEvent; @@ -57781,6 +66515,24 @@ interface IgTablePropertiesDialog { item?: any; target?: any; isHidden?: boolean; + + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; apply?: ApplyEvent; cancel?: CancelEvent; show?: ShowEvent; @@ -57803,6 +66555,24 @@ interface IgImagePropertiesDialog { item?: any; target?: any; isHidden?: boolean; + + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; apply?: ApplyEvent; cancel?: CancelEvent; show?: ShowEvent; @@ -57859,57 +66629,68 @@ interface JQuery { igHtmlEditor(methodName: "selection"): Object; igHtmlEditor(methodName: "range"): Object; igHtmlEditor(methodName: "insertAtCaret", element: Object): void; + igHtmlEditor(methodName: "changeGlobalLanguage"): void; + igHtmlEditor(methodName: "changeGlobalRegional"): void; /** * Shows/hides the "Formatting" toolbar. + * */ igHtmlEditor(optionLiteral: 'option', optionName: "showFormattingToolbar"): boolean; /** * Shows/hides the "Formatting" toolbar. * + * * @optionValue New value to be set. */ igHtmlEditor(optionLiteral: 'option', optionName: "showFormattingToolbar", optionValue: boolean): void; /** * Shows/hides the "Text" toolbar. + * */ igHtmlEditor(optionLiteral: 'option', optionName: "showTextToolbar"): boolean; /** * Shows/hides the "Text" toolbar. * + * * @optionValue New value to be set. */ igHtmlEditor(optionLiteral: 'option', optionName: "showTextToolbar", optionValue: boolean): void; /** * Shows/hides the "Insert Object" toolbar. + * */ igHtmlEditor(optionLiteral: 'option', optionName: "showInsertObjectToolbar"): boolean; /** * Shows/hides the "Insert Object" toolbar. * + * * @optionValue New value to be set. */ igHtmlEditor(optionLiteral: 'option', optionName: "showInsertObjectToolbar", optionValue: boolean): void; /** * Shows/hides the "Copy Paste" toolbar. + * */ igHtmlEditor(optionLiteral: 'option', optionName: "showCopyPasteToolbar"): boolean; /** * Shows/hides the "Copy Paste" toolbar. * + * * @optionValue New value to be set. */ igHtmlEditor(optionLiteral: 'option', optionName: "showCopyPasteToolbar", optionValue: boolean): void; /** * The width of the html editor. It can be set as a number in pixels, string (px) or percentage (%). + * */ igHtmlEditor(optionLiteral: 'option', optionName: "width"): string|number; @@ -57917,6 +66698,7 @@ interface JQuery { /** * The width of the html editor. It can be set as a number in pixels, string (px) or percentage (%). * + * * @optionValue New value to be set. */ @@ -57924,6 +66706,7 @@ interface JQuery { /** * The height of the html editor. It can be set as a number in pixels, string (px) or percentage (%). + * */ igHtmlEditor(optionLiteral: 'option', optionName: "height"): string|number; @@ -57931,6 +66714,7 @@ interface JQuery { /** * The height of the html editor. It can be set as a number in pixels, string (px) or percentage (%). * + * * @optionValue New value to be set. */ @@ -57938,52 +66722,104 @@ interface JQuery { /** * The html editor toolbars list. + * */ igHtmlEditor(optionLiteral: 'option', optionName: "toolbarSettings"): any[]; /** * The html editor toolbars list. * + * * @optionValue New value to be set. */ igHtmlEditor(optionLiteral: 'option', optionName: "toolbarSettings", optionValue: any[]): void; /** * The html editor custom toolbars list. + * */ igHtmlEditor(optionLiteral: 'option', optionName: "customToolbars"): any[]; /** * The html editor custom toolbars list. * + * * @optionValue New value to be set. */ igHtmlEditor(optionLiteral: 'option', optionName: "customToolbars", optionValue: any[]): void; /** * The name attribute of the html editor source view. + * */ igHtmlEditor(optionLiteral: 'option', optionName: "inputName"): string; /** * The name attribute of the html editor source view. * + * * @optionValue New value to be set. */ igHtmlEditor(optionLiteral: 'option', optionName: "inputName", optionValue: string): void; /** * Used to render inside the html editor as initial content + * */ igHtmlEditor(optionLiteral: 'option', optionName: "value"): string; /** * Used to render inside the html editor as initial content * + * * @optionValue New value to be set. */ igHtmlEditor(optionLiteral: 'option', optionName: "value", optionValue: string): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igHtmlEditor(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igHtmlEditor(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igHtmlEditor(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igHtmlEditor(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igHtmlEditor(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event fired after the html editor widget has been rendered. */ @@ -58169,12 +67005,60 @@ interface JQuery { interface JQuery { igHtmlEditorPopover(methodName: "show", item: Object): void; igHtmlEditorPopover(methodName: "hide"): void; + igHtmlEditorPopover(methodName: "changeLocale", $container: Object): void; + igHtmlEditorPopover(methodName: "changeGlobalLanguage"): void; + igHtmlEditorPopover(methodName: "changeGlobalRegional"): void; + igHtmlEditorPopover(methodName: "destroy"): void; igHtmlEditorPopover(optionLiteral: 'option', optionName: "item"): any; igHtmlEditorPopover(optionLiteral: 'option', optionName: "item", optionValue: any): void; igHtmlEditorPopover(optionLiteral: 'option', optionName: "target"): any; igHtmlEditorPopover(optionLiteral: 'option', optionName: "target", optionValue: any): void; igHtmlEditorPopover(optionLiteral: 'option', optionName: "isHidden"): boolean; igHtmlEditorPopover(optionLiteral: 'option', optionName: "isHidden", optionValue: boolean): void; + + /** + * Set/Get the locale setting for the widget. + * + */ + igHtmlEditorPopover(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igHtmlEditorPopover(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igHtmlEditorPopover(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igHtmlEditorPopover(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igHtmlEditorPopover(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igHtmlEditorPopover(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; igHtmlEditorPopover(optionLiteral: 'option', optionName: "apply"): ApplyEvent; igHtmlEditorPopover(optionLiteral: 'option', optionName: "apply", optionValue: ApplyEvent): void; igHtmlEditorPopover(optionLiteral: 'option', optionName: "cancel"): CancelEvent; @@ -58198,6 +67082,50 @@ interface JQuery { igLinkPropertiesDialog(optionLiteral: 'option', optionName: "target", optionValue: any): void; igLinkPropertiesDialog(optionLiteral: 'option', optionName: "isHidden"): boolean; igLinkPropertiesDialog(optionLiteral: 'option', optionName: "isHidden", optionValue: boolean): void; + + /** + * Set/Get the locale setting for the widget. + * + */ + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igLinkPropertiesDialog(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; igLinkPropertiesDialog(optionLiteral: 'option', optionName: "apply"): ApplyEvent; igLinkPropertiesDialog(optionLiteral: 'option', optionName: "apply", optionValue: ApplyEvent): void; igLinkPropertiesDialog(optionLiteral: 'option', optionName: "cancel"): CancelEvent; @@ -58221,6 +67149,50 @@ interface JQuery { igTablePropertiesDialog(optionLiteral: 'option', optionName: "target", optionValue: any): void; igTablePropertiesDialog(optionLiteral: 'option', optionName: "isHidden"): boolean; igTablePropertiesDialog(optionLiteral: 'option', optionName: "isHidden", optionValue: boolean): void; + + /** + * Set/Get the locale setting for the widget. + * + */ + igTablePropertiesDialog(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igTablePropertiesDialog(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igTablePropertiesDialog(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igTablePropertiesDialog(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igTablePropertiesDialog(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igTablePropertiesDialog(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; igTablePropertiesDialog(optionLiteral: 'option', optionName: "apply"): ApplyEvent; igTablePropertiesDialog(optionLiteral: 'option', optionName: "apply", optionValue: ApplyEvent): void; igTablePropertiesDialog(optionLiteral: 'option', optionName: "cancel"): CancelEvent; @@ -58244,6 +67216,50 @@ interface JQuery { igImagePropertiesDialog(optionLiteral: 'option', optionName: "target", optionValue: any): void; igImagePropertiesDialog(optionLiteral: 'option', optionName: "isHidden"): boolean; igImagePropertiesDialog(optionLiteral: 'option', optionName: "isHidden", optionValue: boolean): void; + + /** + * Set/Get the locale setting for the widget. + * + */ + igImagePropertiesDialog(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igImagePropertiesDialog(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igImagePropertiesDialog(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igImagePropertiesDialog(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igImagePropertiesDialog(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igImagePropertiesDialog(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; igImagePropertiesDialog(optionLiteral: 'option', optionName: "apply"): ApplyEvent; igImagePropertiesDialog(optionLiteral: 'option', optionName: "apply", optionValue: ApplyEvent): void; igImagePropertiesDialog(optionLiteral: 'option', optionName: "cancel"): CancelEvent; @@ -58261,31 +67277,37 @@ interface JQuery { interface IgLayoutManagerBorderLayout { /** * Option specifying the width of the left region, either in px or percentages + * */ leftWidth?: string; /** * Option specifying the width of the right region, either in px or percentages + * */ rightWidth?: string; /** * Option specifying whether the footer region in the border layout will be hidden or shown + * */ showFooter?: boolean; /** * Option specifying whether the header region in the border layout will be hidden or shown + * */ showHeader?: boolean; /** * Option specifying whether the left region in the border layout will be hidden or shown + * */ showLeft?: boolean; /** * Option specifying whether the right region in the border layout will be hidden or shown + * */ showRight?: boolean; @@ -58298,11 +67320,13 @@ interface IgLayoutManagerBorderLayout { interface IgLayoutManagerGridLayout { /** * Specifies the duration of the animations in the layout manager"s grid layout + * */ animationDuration?: number; /** * Number of columns in the grid + * */ cols?: number; @@ -58311,6 +67335,7 @@ interface IgLayoutManagerGridLayout { * It can also accept an array, specifying height for each column. If more than one column * has an asterisk value, the remaining height will be equally distributed between these columns. * array The column height can be set as an array of heights. + * */ columnHeight?: string|number|Array; @@ -58319,32 +67344,38 @@ interface IgLayoutManagerGridLayout { * It can also accept an array, specifying width for each column. If more than one column * has an asterisk value, the remaining width will be equally distributed between these columns. * array The column width can be set as an array of widths. + * */ columnWidth?: string|number|Array; /** * Specifies the margin left css property for items + * */ marginLeft?: number; /** * Specifies the margin top css property for items + * */ marginTop?: number; /** * Specifies whether the previous set options should be overriden when setting options + * */ overrideConfigOnSetOption?: boolean; /** * Specified whether the items should rearrange to fit in the container when it is resized. * Have effect only when fixed columnWidth option is set. + * */ rearrangeItems?: boolean; /** * Number of rows in the grid + * */ rows?: number; @@ -58357,33 +67388,39 @@ interface IgLayoutManagerGridLayout { interface IgLayoutManagerItem { /** * Column index of the item in the grid + * */ colIndex?: number; /** * ColSpan of the item + * */ colSpan?: number; /** * Gets/Sets individual item height, either in px or percentage * string The default height can be set in pixels (px), %, em and other units. + * */ height?: string; /** * Row index of the item in the grid + * */ rowIndex?: number; /** * RowSpan of the item + * */ rowSpan?: number; /** * Gets/Sets individual item width, either in px or percentage * string The default width can be set in pixels (px), %, em and other units. + * */ width?: number; @@ -58470,21 +67507,25 @@ interface ItemRenderingEventUIParam { interface IgLayoutManager { /** * Options specific to a border layout + * */ borderLayout?: IgLayoutManagerBorderLayout; /** * Options specific to grid layout mode + * */ gridLayout?: IgLayoutManagerGridLayout; /** * Gets/Sets height of the layout container. + * */ height?: string|number; /** * Number of items to render, this is only applicable to layouts: vertical and flow + * */ itemCount?: number; @@ -58496,6 +67537,7 @@ interface IgLayoutManager { * items can have various properties some of which may not be applicable * depending on the layoutMode. * for example rowSpan/colSpan/colIndex/rowIndex are only applicable to gridlayout + * */ items?: IgLayoutManagerItem[]; @@ -58507,6 +67549,7 @@ interface IgLayoutManager { * column Column type can be set with column layout * vertical Column type can be set with vertical layout * + * * Valid values: * "grid" * "border" @@ -58518,6 +67561,7 @@ interface IgLayoutManager { /** * Gets/Sets width of the layout container. + * */ width?: string|number; @@ -58594,30 +67638,35 @@ interface JQuery { /** * Options specific to a border layout + * */ igLayoutManager(optionLiteral: 'option', optionName: "borderLayout"): IgLayoutManagerBorderLayout; /** * Options specific to a border layout * + * * @optionValue New value to be set. */ igLayoutManager(optionLiteral: 'option', optionName: "borderLayout", optionValue: IgLayoutManagerBorderLayout): void; /** * Options specific to grid layout mode + * */ igLayoutManager(optionLiteral: 'option', optionName: "gridLayout"): IgLayoutManagerGridLayout; /** * Options specific to grid layout mode * + * * @optionValue New value to be set. */ igLayoutManager(optionLiteral: 'option', optionName: "gridLayout", optionValue: IgLayoutManagerGridLayout): void; /** * Gets/Sets height of the layout container. + * */ igLayoutManager(optionLiteral: 'option', optionName: "height"): string|number; @@ -58625,6 +67674,7 @@ interface JQuery { /** * /Sets height of the layout container. * + * * @optionValue New value to be set. */ @@ -58632,12 +67682,14 @@ interface JQuery { /** * Number of items to render, this is only applicable to layouts: vertical and flow + * */ igLayoutManager(optionLiteral: 'option', optionName: "itemCount"): number; /** * Number of items to render, this is only applicable to layouts: vertical and flow * + * * @optionValue New value to be set. */ igLayoutManager(optionLiteral: 'option', optionName: "itemCount", optionValue: number): void; @@ -58650,6 +67702,7 @@ interface JQuery { * items can have various properties some of which may not be applicable * depending on the layoutMode. * for example rowSpan/colSpan/colIndex/rowIndex are only applicable to gridlayout + * */ igLayoutManager(optionLiteral: 'option', optionName: "items"): IgLayoutManagerItem[]; @@ -58662,6 +67715,7 @@ interface JQuery { * depending on the layoutMode. * for example rowSpan/colSpan/colIndex/rowIndex are only applicable to gridlayout * + * * @optionValue New value to be set. */ igLayoutManager(optionLiteral: 'option', optionName: "items", optionValue: IgLayoutManagerItem[]): void; @@ -58673,6 +67727,7 @@ interface JQuery { * flow Column type can be set with flow layout * column Column type can be set with column layout * vertical Column type can be set with vertical layout + * */ igLayoutManager(optionLiteral: 'option', optionName: "layoutMode"): any; @@ -58684,12 +67739,14 @@ interface JQuery { * column Column type can be set with column layout * vertical Column type can be set with vertical layout * + * * @optionValue New value to be set. */ igLayoutManager(optionLiteral: 'option', optionName: "layoutMode", optionValue: any): void; /** * Gets/Sets width of the layout container. + * */ igLayoutManager(optionLiteral: 'option', optionName: "width"): string|number; @@ -58697,6 +67754,7 @@ interface JQuery { /** * /Sets width of the layout container. * + * * @optionValue New value to be set. */ @@ -59201,6 +68259,24 @@ interface IgLinearGauge { */ pixelScalingRatio?: number; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event which is raised when a label of the the gauge is formatted. * Function takes first argument evt and second argument ui. @@ -59266,6 +68342,9 @@ interface IgLinearGaugeMethods { /** * Gets the value for the main scale of the gauge for a given point within the bounds of the gauge. + * + * @param x + * @param y */ getValueForPoint(x: Object, y: Object): number; @@ -59296,6 +68375,24 @@ interface IgLinearGaugeMethods { * Re-polls the css styles for the widget. Use this method when the css styles have been modified. */ styleUpdated(): void; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igLinearGauge"): IgLinearGaugeMethods; @@ -59312,6 +68409,9 @@ interface JQuery { igLinearGauge(methodName: "flush"): void; igLinearGauge(methodName: "destroy"): void; igLinearGauge(methodName: "styleUpdated"): void; + igLinearGauge(methodName: "changeLocale", $container: Object): void; + igLinearGauge(methodName: "changeGlobalLanguage"): void; + igLinearGauge(methodName: "changeGlobalRegional"): void; /** * The width of the gauge. It can be set as a number in pixels, string (px) or percentage (%). @@ -60113,6 +69213,50 @@ interface JQuery { */ igLinearGauge(optionLiteral: 'option', optionName: "pixelScalingRatio", optionValue: number): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igLinearGauge(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igLinearGauge(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igLinearGauge(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igLinearGauge(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igLinearGauge(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event which is raised when a label of the the gauge is formatted. * Function takes first argument evt and second argument ui. @@ -60438,6 +69582,7 @@ interface IgMapSeries { /** * Gets or sets the marker type for the current series object.If the MarkerTemplate property is set, the setting of the MarkerType property will be ignored. * + * * Valid values: * "unset" * "none" @@ -60879,6 +70024,7 @@ interface IgMap { /** * The response to user panning and zooming: whether to update the view immediately while the user action is happening, or to defer the update to after the user action is complete. The user action will be an action such as a mouse drag which causes panning and/or zooming to occur. * + * * Valid values: * "deferred" Defer the view update until after the user action is complete. * "immediate" Update the view immediately while the user action is happening. @@ -61019,6 +70165,24 @@ interface IgMap { */ theme?: string; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event fired when the mouse has hovered on a series and the tooltip is about to show * Function takes arguments evt and ui. @@ -61358,11 +70522,15 @@ interface IgMapMethods { /** * Gets the actual minimum value of the target xAxis or yAxis + * + * @param targetName */ getActualMinimumValue(targetName: Object): void; /** * Gets the actual maximum value of the target xAxis or yAxis + * + * @param targetName */ getActualMaximumValue(targetName: Object): void; @@ -61404,147 +70572,29 @@ interface IgMapMethods { * @param animate Whether the change should be animated, if possible. */ renderSeries(targetName: string, animate: boolean): void; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igMap"): IgMapMethods; } -interface ShapeDataSourceSettings { - /** - * The unique identifier. - */ - id?: string; - - /** - * The Uri of the .shp portion of the Shapefile. - */ - shapefileSource?: string; - - /** - * The Uri of the .dbf portion of the Shapefile. - */ - databaseSource?: string; - - /** - * Callback function to call when data binding is complete. - */ - callback?: Function; - - /** - * Object on which to invoke the callback function. - */ - callee?: any; - - /** - * Callback function to call to allow shape records to be transformed. - * paramType="object" the shape record to be transformed. - */ - transformRecord?: Function; - - /** - * Callback function to call to allow points in the shape records to be transformed. - * paramType="object" the point to be transformed in place. The object will look like { x: value, y: value2 } - */ - transformPoint?: Function; - - /** - * Callback function to call to allow the bounds of the shape data source to be transformed. - * paramType="object" the bounds of the shape datasource to be transformed in place. The object will look like { top: value, left: value, width: value, height: value } - */ - transformBounds?: Function; - - /** - * Callback function to call when the import process has been completed - * paramType="object" the ShapeDataSource instance - */ - importCompleted?: Function; - - /** - * Option for ShapeDataSourceSettings - */ - [optionName: string]: any; -} - -declare namespace Infragistics { -class ShapeDataSource { - constructor(settings: ShapeDataSourceSettings); - - /** - * Loads to the current data source - */ - dataBind(): void; - - /** - * Returns true if data is loaded - */ - isBound(): boolean; - - /** - * Returns the current converter instance - */ - converter(): Object; -} -} -interface IgniteUIStatic { -ShapeDataSource: typeof Infragistics.ShapeDataSource; -} - -interface TriangulationDataSourceSettings { - /** - * The unique identifier. - */ - id?: string; - - /** - * A Uri specifying the location of the Itf file. - */ - source?: string; - - /** - * The TriangulationSource which is typically created after importing the Itf from the Source Uri. - */ - triangulationSource?: string; - - /** - * Callback function to call when data binding is complete - */ - callback?: Function; - - /** - * Object on which to invoke the callback function - */ - callee?: any; - - /** - * Option for TriangulationDataSourceSettings - */ - [optionName: string]: any; -} - -declare namespace Infragistics { -class TriangulationDataSource { - constructor(settings: TriangulationDataSourceSettings); - - /** - * Loads to the current data source - */ - dataBind(): void; - - /** - * Returns true if data is loaded - */ - isBound(): boolean; - - /** - * Returns the current converter instance - */ - converter(): Object; -} -} -interface IgniteUIStatic { -TriangulationDataSource: typeof Infragistics.TriangulationDataSource; -} - interface JQuery { igMap(methodName: "option"): void; igMap(methodName: "destroy"): void; @@ -61576,6 +70626,9 @@ interface JQuery { igMap(methodName: "getZoomFromGeographic", rect: Object): Object; igMap(methodName: "print"): void; igMap(methodName: "renderSeries", targetName: string, animate: boolean): void; + igMap(methodName: "changeLocale", $container: Object): void; + igMap(methodName: "changeGlobalLanguage"): void; + igMap(methodName: "changeGlobalRegional"): void; /** * The width of the map. It can be set as a number in pixels, string (px) or percentage (%). @@ -61821,6 +70874,7 @@ interface JQuery { /** * The response to user panning and zooming: whether to update the view immediately while the user action is happening, or to defer the update to after the user action is complete. The user action will be an action such as a mouse drag which causes panning and/or zooming to occur. + * */ igMap(optionLiteral: 'option', optionName: "windowResponse"): string; @@ -61828,6 +70882,7 @@ interface JQuery { /** * The response to user panning and zooming: whether to update the view immediately while the user action is happening, or to defer the update to after the user action is complete. The user action will be an action such as a mouse drag which causes panning and/or zooming to occur. * + * * @optionValue New value to be set. */ @@ -62141,6 +71196,50 @@ interface JQuery { */ igMap(optionLiteral: 'option', optionName: "theme", optionValue: string): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igMap(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igMap(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igMap(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igMap(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igMap(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event fired when the mouse has hovered on a series and the tooltip is about to show * Function takes arguments evt and ui. @@ -62535,11 +71634,13 @@ interface JQuery { interface IgNotifierHeaderTemplate { /** * Controls whether the popover renders a functional close button + * */ closeButton?: boolean; /** * Sets the content for the popover header. + * */ title?: string; @@ -62553,6 +71654,7 @@ interface IgNotifier { /** * Gets/Sets the current state of the igNotifier messages. State controls what CSS classes are applied to the messages and target and has interactions with other options as well. * + * * Valid values: * "success" Messages and target CSS have success styles applied. * "info" Messages have info applied. Target is unaffected. @@ -62564,6 +71666,7 @@ interface IgNotifier { /** * Controls the level of notifications shown by automatic and manual messages using the [notify](ui.ignotifier#methods:notify) method. Use [show](ui.ignotifier#methods:show) to ignore the level. * + * * Valid values: * "success" Show all types of messages * "info" Show everything from info level messages up @@ -62575,6 +71678,7 @@ interface IgNotifier { /** * Controls where the popover DOM should be attached to (only applies to popovers). * + * * Valid values: * "string" A valid jQuery selector for the element * "object" A reference to the parent jQuery object @@ -62584,6 +71688,7 @@ interface IgNotifier { /** * Controls the positioning mode of messages. Setting a mode will override the default behavior which is auto.Note: Inline element uses a block container as is always placed after the target. * + * * Valid values: * "auto" Uses popover for info and warning messages and inline for errors and success. * "popover" Displays messages in a configurable popover. @@ -62593,17 +71698,20 @@ interface IgNotifier { /** * Allows setting the respective state CSS on the target element (used to apply border color by default) + * */ allowCSSOnTarget?: boolean; /** * Allows rendering a span with the respective state CSS to display jQuery UI framework icons + * */ showIcon?: boolean; /** * Gets/Sets the content for the popover container. Templated with parameters by default: {0} - icon container class, {1} - the icon class and {2} - message text. * + * * Valid values: * "string" String content of the popover container * "function" Function which is a callback that should return the content. Use the 'this' value to access the target DOM element and passed argument for state value. Result can also include the same template parametes. @@ -62612,12 +71720,14 @@ interface IgNotifier { /** * Sets the content for the popover header + * */ headerTemplate?: IgNotifierHeaderTemplate; /** * Sets the event on which the notification will be shown. Predefined values are "mouseenter", "click" and "focus" * + * * Valid values: * "mouseenter" The popover is shown on mouse enter in the target element * "click" The popover is shown on click on the target element @@ -62628,16 +71738,19 @@ interface IgNotifier { /** * Controls whether the popover will close on blur or not. This option has effect only when the corresponding [showOn](ui.ignotifier#options:showOn) is set (manual by default) + * */ closeOnBlur?: boolean; /** * Gets/Sets the time in milliseconds the notification fades in and out when showing/hiding + * */ animationDuration?: number; /** * Gets/Sets the distance in pixels a notification popover slides outwards as it's shown. + * */ animationSlideDistance?: number; @@ -62649,6 +71762,7 @@ interface IgNotifier { /** * controls the direction in which the control shows relative to the target element * + * * Valid values: * "auto" lets the control show on the side where enough space is available with the priority specified by the [directionPriority](ui.%%WidgetNameLowered%%#options:directionPriority) property * "left" shows popover on the left side of the target element @@ -62661,12 +71775,14 @@ interface IgNotifier { /** * Controls the priority in which the control searches for space to show relative to the target element. * This property has effect only if the [direction](ui.%%WidgetNameLowered%%#options:direction) property value is "auto" or unset. + * */ directionPriority?: any[]; /** * controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area * + * * Valid values: * "auto" lets the control choose a position depending on available space with the following priority balanced > end > start * "balanced" the popover is positioned at the middle of the target element @@ -62677,31 +71793,37 @@ interface IgNotifier { /** * defines width for the popover. leave null for auto. + * */ width?: number|string; /** * defines height for the popover. leave null for auto + * */ height?: number|string; /** * defines width the popover won't go under the value even if no specific one is set. + * */ minWidth?: number|string; /** * defines width the popover won't exceed even if no specific one is set. + * */ maxWidth?: number|string; /** * defines height the popover won't exceed even if no specific one is set. + * */ maxHeight?: number|string; /** * Sets the containment for the popover. Accepts a jQuery object + * */ containment?: any; @@ -62731,6 +71853,10 @@ interface IgNotifier { [optionName: string]: any; } interface IgNotifierMethods { + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.ignotifier#options:language) + * Note that this method is for rare scenarios, use [language](ui.ignotifier#options:language) or [locale](ui.ignotifier#options:locale) option setter + */ changeLocale(): void; /** @@ -62824,6 +71950,7 @@ interface JQuery { /** * Gets/Sets the current state of the igNotifier messages. State controls what CSS classes are applied to the messages and target and has interactions with other options as well. + * */ igNotifier(optionLiteral: 'option', optionName: "state"): string; @@ -62831,6 +71958,7 @@ interface JQuery { /** * /Sets the current state of the igNotifier messages. State controls what CSS classes are applied to the messages and target and has interactions with other options as well. * + * * @optionValue New value to be set. */ @@ -62838,6 +71966,7 @@ interface JQuery { /** * Controls the level of notifications shown by automatic and manual messages using the [notify](ui.ignotifier#methods:notify) method. Use [show](ui.ignotifier#methods:show) to ignore the level. + * */ igNotifier(optionLiteral: 'option', optionName: "notifyLevel"): string; @@ -62845,6 +71974,7 @@ interface JQuery { /** * Controls the level of notifications shown by automatic and manual messages using the [notify](ui.ignotifier#methods:notify) method. Use [show](ui.ignotifier#methods:show) to ignore the level. * + * * @optionValue New value to be set. */ @@ -62852,6 +71982,7 @@ interface JQuery { /** * Controls where the popover DOM should be attached to (only applies to popovers). + * */ igNotifier(optionLiteral: 'option', optionName: "appendTo"): string|Object; @@ -62859,6 +71990,7 @@ interface JQuery { /** * Controls where the popover DOM should be attached to (only applies to popovers). * + * * @optionValue New value to be set. */ @@ -62866,6 +71998,7 @@ interface JQuery { /** * Controls the positioning mode of messages. Setting a mode will override the default behavior which is auto.Note: Inline element uses a block container as is always placed after the target. + * */ igNotifier(optionLiteral: 'option', optionName: "mode"): string; @@ -62873,6 +72006,7 @@ interface JQuery { /** * Controls the positioning mode of messages. Setting a mode will override the default behavior which is auto.Note: Inline element uses a block container as is always placed after the target. * + * * @optionValue New value to be set. */ @@ -62880,30 +72014,35 @@ interface JQuery { /** * Allows setting the respective state CSS on the target element (used to apply border color by default) + * */ igNotifier(optionLiteral: 'option', optionName: "allowCSSOnTarget"): boolean; /** * Allows setting the respective state CSS on the target element (used to apply border color by default) * + * * @optionValue New value to be set. */ igNotifier(optionLiteral: 'option', optionName: "allowCSSOnTarget", optionValue: boolean): void; /** * Allows rendering a span with the respective state CSS to display jQuery UI framework icons + * */ igNotifier(optionLiteral: 'option', optionName: "showIcon"): boolean; /** * Allows rendering a span with the respective state CSS to display jQuery UI framework icons * + * * @optionValue New value to be set. */ igNotifier(optionLiteral: 'option', optionName: "showIcon", optionValue: boolean): void; /** * Gets/Sets the content for the popover container. Templated with parameters by default: {0} - icon container class, {1} - the icon class and {2} - message text. + * */ igNotifier(optionLiteral: 'option', optionName: "contentTemplate"): string|Function; @@ -62911,6 +72050,7 @@ interface JQuery { /** * /Sets the content for the popover container. Templated with parameters by default: {0} - icon container class, {1} - the icon class and {2} - message text. * + * * @optionValue New value to be set. */ @@ -62918,18 +72058,21 @@ interface JQuery { /** * The content for the popover header + * */ igNotifier(optionLiteral: 'option', optionName: "headerTemplate"): IgNotifierHeaderTemplate; /** * Sets the content for the popover header * + * * @optionValue New value to be set. */ igNotifier(optionLiteral: 'option', optionName: "headerTemplate", optionValue: IgNotifierHeaderTemplate): void; /** * Sets the event on which the notification will be shown. Predefined values are "mouseenter", "click" and "focus" + * */ igNotifier(optionLiteral: 'option', optionName: "showOn"): string; @@ -62937,6 +72080,7 @@ interface JQuery { /** * Sets the event on which the notification will be shown. Predefined values are "mouseenter", "click" and "focus" * + * * @optionValue New value to be set. */ @@ -62944,36 +72088,42 @@ interface JQuery { /** * Controls whether the popover will close on blur or not. This option has effect only when the corresponding [showOn](ui.ignotifier#options:showOn) is set (manual by default) + * */ igNotifier(optionLiteral: 'option', optionName: "closeOnBlur"): boolean; /** * Controls whether the popover will close on blur or not. This option has effect only when the corresponding [showOn](ui.ignotifier#options:showOn) is set (manual by default) * + * * @optionValue New value to be set. */ igNotifier(optionLiteral: 'option', optionName: "closeOnBlur", optionValue: boolean): void; /** * Gets/Sets the time in milliseconds the notification fades in and out when showing/hiding + * */ igNotifier(optionLiteral: 'option', optionName: "animationDuration"): number; /** * /Sets the time in milliseconds the notification fades in and out when showing/hiding * + * * @optionValue New value to be set. */ igNotifier(optionLiteral: 'option', optionName: "animationDuration", optionValue: number): void; /** * Gets/Sets the distance in pixels a notification popover slides outwards as it's shown. + * */ igNotifier(optionLiteral: 'option', optionName: "animationSlideDistance"): number; /** * /Sets the distance in pixels a notification popover slides outwards as it's shown. * + * * @optionValue New value to be set. */ igNotifier(optionLiteral: 'option', optionName: "animationSlideDistance", optionValue: number): void; @@ -62992,6 +72142,7 @@ interface JQuery { /** * Controls the direction in which the control shows relative to the target element + * */ igNotifier(optionLiteral: 'option', optionName: "direction"): string; @@ -62999,6 +72150,7 @@ interface JQuery { /** * Controls the direction in which the control shows relative to the target element * + * * @optionValue New value to be set. */ @@ -63007,6 +72159,7 @@ interface JQuery { /** * Controls the priority in which the control searches for space to show relative to the target element. * This property has effect only if the [direction](ui.%%WidgetNameLowered%%#options:direction) property value is "auto" or unset. + * */ igNotifier(optionLiteral: 'option', optionName: "directionPriority"): any[]; @@ -63014,12 +72167,14 @@ interface JQuery { * Controls the priority in which the control searches for space to show relative to the target element. * This property has effect only if the [direction](ui.%%WidgetNameLowered%%#options:direction) property value is "auto" or unset. * + * * @optionValue New value to be set. */ igNotifier(optionLiteral: 'option', optionName: "directionPriority", optionValue: any[]): void; /** * Controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area + * */ igNotifier(optionLiteral: 'option', optionName: "position"): string; @@ -63027,6 +72182,7 @@ interface JQuery { /** * Controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area * + * * @optionValue New value to be set. */ @@ -63034,6 +72190,7 @@ interface JQuery { /** * Defines width for the popover. leave null for auto. + * */ igNotifier(optionLiteral: 'option', optionName: "width"): number|string; @@ -63041,6 +72198,7 @@ interface JQuery { /** * Defines width for the popover. leave null for auto. * + * * @optionValue New value to be set. */ @@ -63048,6 +72206,7 @@ interface JQuery { /** * Defines height for the popover. leave null for auto + * */ igNotifier(optionLiteral: 'option', optionName: "height"): number|string; @@ -63055,6 +72214,7 @@ interface JQuery { /** * Defines height for the popover. leave null for auto * + * * @optionValue New value to be set. */ @@ -63062,6 +72222,7 @@ interface JQuery { /** * Defines width the popover won't go under the value even if no specific one is set. + * */ igNotifier(optionLiteral: 'option', optionName: "minWidth"): number|string; @@ -63069,6 +72230,7 @@ interface JQuery { /** * Defines width the popover won't go under the value even if no specific one is set. * + * * @optionValue New value to be set. */ @@ -63076,6 +72238,7 @@ interface JQuery { /** * Defines width the popover won't exceed even if no specific one is set. + * */ igNotifier(optionLiteral: 'option', optionName: "maxWidth"): number|string; @@ -63083,6 +72246,7 @@ interface JQuery { /** * Defines width the popover won't exceed even if no specific one is set. * + * * @optionValue New value to be set. */ @@ -63090,6 +72254,7 @@ interface JQuery { /** * Defines height the popover won't exceed even if no specific one is set. + * */ igNotifier(optionLiteral: 'option', optionName: "maxHeight"): number|string; @@ -63097,6 +72262,7 @@ interface JQuery { /** * Defines height the popover won't exceed even if no specific one is set. * + * * @optionValue New value to be set. */ @@ -63104,12 +72270,14 @@ interface JQuery { /** * The containment for the popover. Accepts a jQuery object + * */ igNotifier(optionLiteral: 'option', optionName: "containment"): any; /** * Sets the containment for the popover. Accepts a jQuery object * + * * @optionValue New value to be set. */ igNotifier(optionLiteral: 'option', optionName: "containment", optionValue: any): void; @@ -63170,8 +72338,8 @@ interface JQuery { interface IgPivotDataSelectorDataSourceOptionsXmlaOptionsRequestOptions { /** * The value is applied to XmlHttpRequest.withCredentials if supported by the user agent. - * Setting this property to true will allow IE8/IE9 to make authenticated cross-origin requests to tusted domains through XmlHttpRequest instead of XDomainRequest - * and will prompt the user for credentials. + * Setting this property to true will allow IE8/IE9 to make authenticated cross-origin requests to tusted domains through XmlHttpRequest instead of XDomainRequest + * and will prompt the user for credentials. */ withCredentials?: boolean; @@ -63256,13 +72424,13 @@ interface IgPivotDataSelectorDataSourceOptionsXmlaOptions { /** * Additional properties sent with every discover request. - * The object is treated as a key/value store where each property name is used as the key and the property value as the value. + * The object is treated as a key/value store where each property name is used as the key and the property value as the value. */ discoverProperties?: any; /** * Additional properties sent with every execute request. - * The object is treated as a key/value store where each property name is used as the key and the property value as the value. + * The object is treated as a key/value store where each property name is used as the key and the property value as the value. */ executeProperties?: any; @@ -63290,7 +72458,7 @@ interface IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeMeasure /** * Optional="false" An aggregator function called when each cell is evaluated. - * Returns a value for the cell. If the returned value is null, no cell will be created in for the data source result. + * Returns a value for the cell. If the returned value is null, no cell will be created in for the data source result. */ aggregator?: Function; @@ -63308,14 +72476,14 @@ interface IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeMeasure interface IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeMeasuresDimension { /** * A unique name for the measures dimension. - * The default value is "Measures". This name is used to create the names of dimensions using the following pattern: - * [].[] + * The default value is "Measures". This name is used to create the names of dimensions using the following pattern: + * [].[] */ name?: string; /** * A caption for the measures dimension. - * The default value is "Measures". + * The default value is "Measures". */ caption?: string; @@ -63333,8 +72501,8 @@ interface IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeMeasure interface IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchieLevel { /** * Optional="false" A name for the level. - * The unique name of the level is formed using the following pattern: - * {}.[] + * The unique name of the level is formed using the following pattern: + * {}.[] */ name?: string; @@ -63345,7 +72513,7 @@ interface IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeDimensi /** * A function called for each item of the data source array when level members are created. - * Based on the item parameter the function should return a value that will form the $.ig.Member’s name and caption. + * Based on the item parameter the function should return a value that will form the $.ig.Member’s name and caption. */ memberProvider?: Function; @@ -63358,8 +72526,8 @@ interface IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeDimensi interface IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeDimensionHierarchie { /** * Optional="false" A name for the hierarchy. - * The unique name of the hierarchy is formed using the following pattern: - * [].[] + * The unique name of the hierarchy is formed using the following pattern: + * [].[] */ name?: string; @@ -63370,8 +72538,8 @@ interface IgPivotDataSelectorDataSourceOptionsFlatDataOptionsMetadataCubeDimensi /** * The path to be used when displaying the hierarchy in the user interface. - * Nested folders are indicated by a backslash (\). - * The folder hierarchy will appear under parent dimension node. + * Nested folders are indicated by a backslash (\). + * The folder hierarchy will appear under parent dimension node. */ displayFolder?: string; @@ -63465,14 +72633,14 @@ interface IgPivotDataSelectorDataSourceOptionsFlatDataOptions { /** * See $.ig.DataSource. - * string Specifies the name of the property in which data records are held if the response is wrapped. - * null Option is ignored. + * string Specifies the name of the property in which data records are held if the response is wrapped. + * null Option is ignored. */ responseDataKey?: string; /** * String Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. - * null Option is ignored. + * null Option is ignored. */ responseDataType?: string; @@ -63531,7 +72699,8 @@ interface IgPivotDataSelectorDragAndDropSettings { appendTo?: any; /** - * Specifies the containment for the drag helper. The area inside of which the helper is contained would be scrollable while dragging. + * Specifies the containment for the drag helper. The area inside of which thehelper is contained would be scrollable while dragging. + * */ containment?: boolean|string|Array; @@ -63552,7 +72721,7 @@ interface DataSelectorRenderedEvent { interface DataSelectorRenderedEventUIParam { /** - * Used to get a reference to the data selector. + * Gets a reference to the data selector. */ owner?: any; } @@ -63563,22 +72732,22 @@ interface DataSourceInitializedEvent { interface DataSourceInitializedEventUIParam { /** - * Used to get a reference to the data selector. + * Gets a reference to the data selector. */ owner?: any; /** - * Used to get a reference to the data source. + * Gets a reference to the data source. */ dataSource?: any; /** - * Used to see if an error has occured during initialization. + * See if an error has occured during initialization. */ - error?: any; + error?: string; /** - * Used to get a reference to the root of the data source metatadata root item. + * Gets a reference to the root of the data source metatadata root item. */ metadataTreeRoot?: any; } @@ -63589,22 +72758,22 @@ interface DataSourceUpdatedEvent { interface DataSourceUpdatedEventUIParam { /** - * Used to get a reference to the data selector. + * Gets a reference to the data selector. */ owner?: any; /** - * Used to get a reference to the data source. + * Gets a reference to the data source. */ dataSource?: any; /** - * Used to see if an error has occured during update. + * See if an error has occured during update. */ - error?: any; + error?: string; /** - * Used to get the result of the update operation. + * Gets the result of the update operation. */ result?: any; } @@ -63615,14 +72784,14 @@ interface DeferUpdateChangedEvent { interface DeferUpdateChangedEventUIParam { /** - * Used to get a reference to the data selector. + * Gets a reference to the data selector. */ owner?: any; /** - * Used to get the defer update value. + * Gets the defer update value. */ - deferUpdate?: any; + deferUpdate?: boolean; } interface DragStartEvent { @@ -63631,27 +72800,27 @@ interface DragStartEvent { interface DragStartEventUIParam { /** - * Used to get a reference to the data. + * Gets a reference to the data. */ metadata?: any; /** - * Used to get a reference to the helper. + * Gets a reference to the helper. */ - helper?: any; + helper?: string; /** - * Used to get a reference to the offset. + * Gets a reference to the offset. */ offset?: any; /** - * Used to get a reference to the original position of the draggable element. + * Gets a reference to the original position of the draggable element. */ originalPosition?: any; /** - * Used to get a reference to the current position of the draggable element. + * Gets a reference to the current position of the draggable element. */ position?: any; } @@ -63662,27 +72831,27 @@ interface DragEvent { interface DragEventUIParam { /** - * Used to get a reference to the data. + * Gets a reference to the data. */ metadata?: any; /** - * Used to get a reference to the helper. + * Gets a reference to the helper. */ - helper?: any; + helper?: string; /** - * Used to get a reference to the offset. + * Gets a reference to the offset. */ offset?: any; /** - * Used to get a reference to the original position of the draggable element. + * Gets a reference to the original position of the draggable element. */ originalPosition?: any; /** - * Used to get a reference to the current position of the draggable element. + * Gets a reference to the current position of the draggable element. */ position?: any; } @@ -63693,22 +72862,22 @@ interface DragStopEvent { interface DragStopEventUIParam { /** - * Used to get a reference to the helper. + * Gets a reference to the helper. */ - helper?: any; + helper?: string; /** - * Used to get a reference to the offset. + * Gets a reference to the offset. */ offset?: any; /** - * Used to get a reference to the original position of the draggable element. + * Gets a reference to the original position of the draggable element. */ originalPosition?: any; /** - * Used to get a reference to the current position of the draggable element. + * Gets a reference to the current position of the draggable element. */ position?: any; } @@ -63719,37 +72888,37 @@ interface MetadataDroppingEvent { interface MetadataDroppingEventUIParam { /** - * Used to the drop target. + * A reference to the drop target. */ - targetElement?: any; + targetElement?: string; /** - * Used to the dragged element. + * A reference to the dragged element. */ - draggedElement?: any; + draggedElement?: string; /** - * Used to get a reference to the data. + * Gets a reference to the data. */ metadata?: any; /** - * Used to get the index at which the metadata will be inserted. + * Gets the index at which the metadata will be inserted. */ - metadataIndex?: any; + metadataIndex?: number; /** - * Used to get a reference to the helper. + * Gets a reference to the helper. */ - helper?: any; + helper?: string; /** - * Used to get a reference to the offset. + * Gets a reference to the offset. */ offset?: any; /** - * Used to get a reference to the current position of the draggable element. + * Gets a reference to the current position of the draggable element. */ position?: any; } @@ -63760,37 +72929,37 @@ interface MetadataDroppedEvent { interface MetadataDroppedEventUIParam { /** - * Used to the drop target. + * A reference to the drop target. */ - targetElement?: any; + targetElement?: string; /** - * Used to the dragged element. + * A reference to the dragged element. */ - draggedElement?: any; + draggedElement?: string; /** - * Used to get a reference to the data. + * Gets a reference to the data. */ metadata?: any; /** - * Used to get the index at which the metadata is inserted. + * Gets the index at which the metadata is inserted. */ - metadataIndex?: any; + metadataIndex?: number; /** - * Used to get a reference to the helper. + * Gets a reference to the helper. */ - helper?: any; + helper?: string; /** - * Used to get a reference to the offset. + * Gets a reference to the offset. */ offset?: any; /** - * Used to get a reference to the current position of the draggable element. + * Gets a reference to the current position of the draggable element. */ position?: any; } @@ -63801,12 +72970,12 @@ interface MetadataRemovingEvent { interface MetadataRemovingEventUIParam { /** - * Used to the dragged element. + * A reference to the dragged element. */ - targetElement?: any; + targetElement?: string; /** - * Used to get a reference to the data. + * Gets a reference to the data. */ metadata?: any; } @@ -63817,7 +72986,7 @@ interface MetadataRemovedEvent { interface MetadataRemovedEventUIParam { /** - * Used to get a reference to the data. + * Gets a reference to the data. */ metadata?: any; } @@ -63828,7 +72997,7 @@ interface FilterDropDownOpeningEvent { interface FilterDropDownOpeningEventUIParam { /** - * Used to the hierarchy. + * A reference to the hierarchy. */ hierarchy?: any; } @@ -63839,14 +73008,14 @@ interface FilterDropDownOpenedEvent { interface FilterDropDownOpenedEventUIParam { /** - * Used to the hierarchy. + * A reference to the hierarchy. */ hierarchy?: any; /** - * Used to the drop down. + * A reference to the drop down. */ - dropDownElement?: any; + dropDownElement?: string; } interface FilterMembersLoadedEvent { @@ -63855,11 +73024,19 @@ interface FilterMembersLoadedEvent { interface FilterMembersLoadedEventUIParam { /** - * Used to get the parent node or the igTree instance in the initial load. + * Gets the parent node or the igTree instance in the initial load. */ - parent?: any; - rootFilterMembers?: any; - filterMembers?: any; + parent?: string; + + /** + * A collection with the root filter members . + */ + rootFilterMembers?: any[]; + + /** + * A collection with the newly loaded filter members. + */ + filterMembers?: any[]; } interface FilterDropDownOkEvent { @@ -63868,15 +73045,19 @@ interface FilterDropDownOkEvent { interface FilterDropDownOkEventUIParam { /** - * Used to the hierarchy. + * A reference to the hierarchy. */ hierarchy?: any; - filterMembers?: any; /** - * Used to the drop down. + * A collection with the selected filter members. If all filter members are selected the collection will be empty. */ - dropDownElement?: any; + filterMembers?: any[]; + + /** + * A reference to the drop down. + */ + dropDownElement?: string; } interface FilterDropDownClosingEvent { @@ -63885,14 +73066,14 @@ interface FilterDropDownClosingEvent { interface FilterDropDownClosingEventUIParam { /** - * Used to the hierarchy. + * A reference to the hierarchy. */ hierarchy?: any; /** - * Used to the drop down. + * A reference to the drop down. */ - dropDownElement?: any; + dropDownElement?: string; } interface FilterDropDownClosedEvent { @@ -63901,17 +73082,26 @@ interface FilterDropDownClosedEvent { interface FilterDropDownClosedEventUIParam { /** - * Used to the hierarchy. + * A reference to the hierarchy. */ hierarchy?: any; } interface IgPivotDataSelector { + /** + * + * + * Valid values: + * "string" The widget width can be set in pixels (px) and percentage (%). The recommended width is 250px. + * "number" The widget width can be set as a number. + * "null" will stretch to fit data, if no other widths are defined. + */ width?: string|number; /** * This is the total height of the grid, including all UI elements - scroll container with data rows, header, footer, filter row - (if any), etc. * + * * Valid values: * "string" The widget height can be set in pixels (px) and percentage (%). * "number" The widget height can be set as a number. @@ -63921,22 +73111,26 @@ interface IgPivotDataSelector { /** * An instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + * */ dataSource?: any; /** * An object that will be used to create an instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. - * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. + * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. + * */ dataSourceOptions?: IgPivotDataSelectorDataSourceOptions; /** * Setting deferUpdate to true will not apply changes to the data source until the update method is called or the update layout button is clicked. + * */ deferUpdate?: boolean; /** * Settings for the drag and drop functionality of the igPivotDataSelector. + * */ dragAndDropSettings?: IgPivotDataSelectorDragAndDropSettings; @@ -63947,173 +73141,138 @@ interface IgPivotDataSelector { /** * Disable the drag and drop for the rows drop area and the ability to use filtering and remove items from it. + * */ disableRowsDropArea?: boolean; /** * Disable the drag and drop for the columns drop area and the ability to use filtering and remove items from it. + * */ disableColumnsDropArea?: boolean; /** * Disable the drag and drop for the measures drop area and the ability to use filtering and remove items from it. + * */ disableMeasuresDropArea?: boolean; /** * Disable the drag and drop for the filters drop area and the ability to use filtering and remove items from it. + * */ disableFiltersDropArea?: boolean; /** * A function that will be called to determine if an item can be moved in or dropped on an area of the data selector. - * paramType="string" The location where the item will be moved - igPivotGrid, igPivotDataSelector, filters, rows, columns or measures. - * paramType="string" The type of the item - Hierarchy, Measure or MeasureList. - * paramType="string" The unique name of the item. - * returnType="bool" The function must return true if the item should be accepted. + * + * paramType="string" The location where the item will be moved - igPivotGrid, igPivotDataSelector, filters, rows, columns or measures. + * paramType="string" The type of the item - Hierarchy, Measure or MeasureList. + * paramType="string" The unique name of the item. + * returnType="bool" The function must return true if the item should be accepted. */ customMoveValidation?: Function; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Fired after the data selector is rendered. Changing the data source instance will re-render the data selector. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the data selector. */ dataSelectorRendered?: DataSelectorRenderedEvent; /** * Fired after the data source has initialized. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the data selector. - * Use ui.dataSource to get a reference to the data source. - * Use ui.error to see if an error has occured during initialization. - * Use ui.metadataTreeRoot to get a reference to the root of the data source metatadata root item. */ dataSourceInitialized?: DataSourceInitializedEvent; /** * Fired after the data source has updated. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the data selector. - * Use ui.dataSource to get a reference to the data source. - * Use ui.error to see if an error has occured during update. - * Use ui.result to get the result of the update operation. */ dataSourceUpdated?: DataSourceUpdatedEvent; /** * Fired when the defer update checkbox changes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the data selector. - * Use ui.deferUpdate to get the defer update value. */ deferUpdateChanged?: DeferUpdateChangedEvent; /** * Fired on drag start. Return false to cancel the drag. - * Use ui.metadatato get a reference to the data. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.originalPosition to get a reference to the original position of the draggable element. - * Use ui.position to get a reference to the current position of the draggable element. */ dragStart?: DragStartEvent; /** * Fired on drag. Return false to cancel the dragging. - * Use ui.metadatato get a reference to the data. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.originalPosition to get a reference to the original position of the draggable element. - * Use ui.position to get a reference to the current position of the draggable element. */ drag?: DragEvent; /** * Fired on drag stop. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.originalPosition to get a reference to the original position of the draggable element. - * Use ui.position to get a reference to the current position of the draggable element. */ dragStop?: DragStopEvent; /** * Fired before a metadata item drop. Return false to cancel the drop. - * Use ui.targetElement for a reference to the drop target. - * Use ui.draggedElement for a reference to the dragged element. - * Use ui.metadatato get a reference to the data. - * Use ui.metadataIndex to get the index at which the metadata will be inserted. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.position to get a reference to the current position of the draggable element. */ metadataDropping?: MetadataDroppingEvent; /** * Fired after a metadata item drop. - * Use ui.targetElement for a reference to the drop target. - * Use ui.draggedElement for a reference to the dragged element. - * Use ui.metadatato get a reference to the data. - * Use ui.metadataIndex to get the index at which the metadata is inserted. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.position to get a reference to the current position of the draggable element. */ metadataDropped?: MetadataDroppedEvent; /** * Fired before a metadata item is removed when the user clicks the close icon. Return false to cancel the removing. - * Use ui.targetElement for a reference to the dragged element. - * Use ui.metadatato get a reference to the data. */ metadataRemoving?: MetadataRemovingEvent; /** * Fired after a metadata item is removed when the user clicks the close icon. - * Use ui.metadatato get a reference to the data. */ metadataRemoved?: MetadataRemovedEvent; /** * Fired before the filter members drop down opens. Return false to cancel the opening. - * Use ui.hierarchy for a reference to the hierarchy. */ filterDropDownOpening?: FilterDropDownOpeningEvent; /** * Fired after the filter members drop down opens. - * Use ui.hierarchy for a reference to the hierarchy. - * Use ui.dropDownElement for a reference to the drop down. */ filterDropDownOpened?: FilterDropDownOpenedEvent; /** * Fired after the filter members are loaded. - * Use ui.parent to get the parent node or the igTree instance in the initial load. - * Use ui.rootFilterMembers for a collection with the root filter members . - * Use ui.filterMembers for a collection with the newly loaded filter members. */ filterMembersLoaded?: FilterMembersLoadedEvent; /** * Fired after the OK button in the filter members drop down is clicked. Return false to cancel the applying of the filters. - * Use ui.hierarchy for a reference to the hierarchy. - * Use ui.filterMembers for a collection with the selected filter members. If all filter members are selected the collection will be empty. - * Use ui.dropDownElement for a reference to the drop down. */ filterDropDownOk?: FilterDropDownOkEvent; /** * Fired before the filter members drop down closes. Return false to cancel the closing. - * Use ui.hierarchy for a reference to the hierarchy. - * Use ui.dropDownElement for a reference to the drop down. */ filterDropDownClosing?: FilterDropDownClosingEvent; /** * Fired after the filter members drop down closes. - * Use ui.hierarchy for a reference to the hierarchy. */ filterDropDownClosed?: FilterDropDownClosedEvent; @@ -64123,6 +73282,10 @@ interface IgPivotDataSelector { [optionName: string]: any; } interface IgPivotDataSelectorMethods { + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.igpivotdataselector#options:language) + * Note that this method is for rare scenarios, see [language](ui.igpivotdataselector#options:language) or [locale](ui.igpivotdataselector#options:locale) option setter + */ changeLocale(): void; /** @@ -64132,11 +73295,21 @@ interface IgPivotDataSelectorMethods { /** * Destroy is part of the jQuery UI widget API and does the following: - * 1. Remove custom CSS classes that were added. - * 2. Unwrap any wrapping elements such as scrolling divs and other containers. - * 3. Unbind all events that were bound. + * 1. Remove custom CSS classes that were added. + * 2. Unwrap any wrapping elements such as scrolling divs and other containers. + * 3. Unbind all events that were bound. */ destroy(): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igPivotDataSelector"): IgPivotDataSelectorMethods; @@ -64146,13 +73319,26 @@ interface JQuery { igPivotDataSelector(methodName: "changeLocale"): void; igPivotDataSelector(methodName: "update"): void; igPivotDataSelector(methodName: "destroy"): void; + igPivotDataSelector(methodName: "changeGlobalLanguage"): void; + igPivotDataSelector(methodName: "changeGlobalRegional"): void; + + /** + * * + */ igPivotDataSelector(optionLiteral: 'option', optionName: "width"): string|number; + /** + * * + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; /** * This is the total height of the grid, including all UI elements - scroll container with data rows, header, footer, filter row - (if any), etc. + * */ igPivotDataSelector(optionLiteral: 'option', optionName: "height"): string|number; @@ -64160,6 +73346,7 @@ interface JQuery { /** * This is the total height of the grid, including all UI elements - scroll container with data rows, header, footer, filter row - (if any), etc. * + * * @optionValue New value to be set. */ @@ -64167,25 +73354,29 @@ interface JQuery { /** * An instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + * */ igPivotDataSelector(optionLiteral: 'option', optionName: "dataSource"): any; /** * An instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. * + * * @optionValue New value to be set. */ igPivotDataSelector(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; /** * An object that will be used to create an instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. - * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. + * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. + * */ igPivotDataSelector(optionLiteral: 'option', optionName: "dataSourceOptions"): IgPivotDataSelectorDataSourceOptions; /** * An object that will be used to create an instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. - * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. + * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. + * * * @optionValue New value to be set. */ @@ -64193,24 +73384,28 @@ interface JQuery { /** * Setting deferUpdate to true will not apply changes to the data source until the update method is called or the update layout button is clicked. + * */ igPivotDataSelector(optionLiteral: 'option', optionName: "deferUpdate"): boolean; /** * Setting deferUpdate to true will not apply changes to the data source until the update method is called or the update layout button is clicked. * + * * @optionValue New value to be set. */ igPivotDataSelector(optionLiteral: 'option', optionName: "deferUpdate", optionValue: boolean): void; /** * Settings for the drag and drop functionality of the igPivotDataSelector. + * */ igPivotDataSelector(optionLiteral: 'option', optionName: "dragAndDropSettings"): IgPivotDataSelectorDragAndDropSettings; /** * Settings for the drag and drop functionality of the igPivotDataSelector. * + * * @optionValue New value to be set. */ igPivotDataSelector(optionLiteral: 'option', optionName: "dragAndDropSettings", optionValue: IgPivotDataSelectorDragAndDropSettings): void; @@ -64229,83 +73424,133 @@ interface JQuery { /** * Disable the drag and drop for the rows drop area and the ability to use filtering and remove items from it. + * */ igPivotDataSelector(optionLiteral: 'option', optionName: "disableRowsDropArea"): boolean; /** * Disable the drag and drop for the rows drop area and the ability to use filtering and remove items from it. * + * * @optionValue New value to be set. */ igPivotDataSelector(optionLiteral: 'option', optionName: "disableRowsDropArea", optionValue: boolean): void; /** * Disable the drag and drop for the columns drop area and the ability to use filtering and remove items from it. + * */ igPivotDataSelector(optionLiteral: 'option', optionName: "disableColumnsDropArea"): boolean; /** * Disable the drag and drop for the columns drop area and the ability to use filtering and remove items from it. * + * * @optionValue New value to be set. */ igPivotDataSelector(optionLiteral: 'option', optionName: "disableColumnsDropArea", optionValue: boolean): void; /** * Disable the drag and drop for the measures drop area and the ability to use filtering and remove items from it. + * */ igPivotDataSelector(optionLiteral: 'option', optionName: "disableMeasuresDropArea"): boolean; /** * Disable the drag and drop for the measures drop area and the ability to use filtering and remove items from it. * + * * @optionValue New value to be set. */ igPivotDataSelector(optionLiteral: 'option', optionName: "disableMeasuresDropArea", optionValue: boolean): void; /** * Disable the drag and drop for the filters drop area and the ability to use filtering and remove items from it. + * */ igPivotDataSelector(optionLiteral: 'option', optionName: "disableFiltersDropArea"): boolean; /** * Disable the drag and drop for the filters drop area and the ability to use filtering and remove items from it. * + * * @optionValue New value to be set. */ igPivotDataSelector(optionLiteral: 'option', optionName: "disableFiltersDropArea", optionValue: boolean): void; /** * A function that will be called to determine if an item can be moved in or dropped on an area of the data selector. - * paramType="string" The location where the item will be moved - igPivotGrid, igPivotDataSelector, filters, rows, columns or measures. - * paramType="string" The type of the item - Hierarchy, Measure or MeasureList. - * paramType="string" The unique name of the item. - * returnType="bool" The function must return true if the item should be accepted. + * + * paramType="string" The location where the item will be moved - igPivotGrid, igPivotDataSelector, filters, rows, columns or measures. + * paramType="string" The type of the item - Hierarchy, Measure or MeasureList. + * paramType="string" The unique name of the item. + * returnType="bool" The function must return true if the item should be accepted. */ igPivotDataSelector(optionLiteral: 'option', optionName: "customMoveValidation"): Function; /** * A function that will be called to determine if an item can be moved in or dropped on an area of the data selector. - * paramType="string" The location where the item will be moved - igPivotGrid, igPivotDataSelector, filters, rows, columns or measures. - * paramType="string" The type of the item - Hierarchy, Measure or MeasureList. - * paramType="string" The unique name of the item. - * returnType="bool" The function must return true if the item should be accepted. + * + * paramType="string" The location where the item will be moved - igPivotGrid, igPivotDataSelector, filters, rows, columns or measures. + * paramType="string" The type of the item - Hierarchy, Measure or MeasureList. + * paramType="string" The unique name of the item. + * returnType="bool" The function must return true if the item should be accepted. * * @optionValue New value to be set. */ igPivotDataSelector(optionLiteral: 'option', optionName: "customMoveValidation", optionValue: Function): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igPivotDataSelector(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igPivotDataSelector(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igPivotDataSelector(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Fired after the data selector is rendered. Changing the data source instance will re-render the data selector. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the data selector. */ igPivotDataSelector(optionLiteral: 'option', optionName: "dataSelectorRendered"): DataSelectorRenderedEvent; /** * Fired after the data selector is rendered. Changing the data source instance will re-render the data selector. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the data selector. * * @optionValue New value to be set. */ @@ -64313,21 +73558,11 @@ interface JQuery { /** * Fired after the data source has initialized. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the data selector. - * Use ui.dataSource to get a reference to the data source. - * Use ui.error to see if an error has occured during initialization. - * Use ui.metadataTreeRoot to get a reference to the root of the data source metatadata root item. */ igPivotDataSelector(optionLiteral: 'option', optionName: "dataSourceInitialized"): DataSourceInitializedEvent; /** * Fired after the data source has initialized. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the data selector. - * Use ui.dataSource to get a reference to the data source. - * Use ui.error to see if an error has occured during initialization. - * Use ui.metadataTreeRoot to get a reference to the root of the data source metatadata root item. * * @optionValue New value to be set. */ @@ -64335,21 +73570,11 @@ interface JQuery { /** * Fired after the data source has updated. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the data selector. - * Use ui.dataSource to get a reference to the data source. - * Use ui.error to see if an error has occured during update. - * Use ui.result to get the result of the update operation. */ igPivotDataSelector(optionLiteral: 'option', optionName: "dataSourceUpdated"): DataSourceUpdatedEvent; /** * Fired after the data source has updated. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the data selector. - * Use ui.dataSource to get a reference to the data source. - * Use ui.error to see if an error has occured during update. - * Use ui.result to get the result of the update operation. * * @optionValue New value to be set. */ @@ -64357,17 +73582,11 @@ interface JQuery { /** * Fired when the defer update checkbox changes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the data selector. - * Use ui.deferUpdate to get the defer update value. */ igPivotDataSelector(optionLiteral: 'option', optionName: "deferUpdateChanged"): DeferUpdateChangedEvent; /** * Fired when the defer update checkbox changes. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the data selector. - * Use ui.deferUpdate to get the defer update value. * * @optionValue New value to be set. */ @@ -64375,21 +73594,11 @@ interface JQuery { /** * Fired on drag start. Return false to cancel the drag. - * Use ui.metadatato get a reference to the data. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.originalPosition to get a reference to the original position of the draggable element. - * Use ui.position to get a reference to the current position of the draggable element. */ igPivotDataSelector(optionLiteral: 'option', optionName: "dragStart"): DragStartEvent; /** * Fired on drag start. Return false to cancel the drag. - * Use ui.metadatato get a reference to the data. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.originalPosition to get a reference to the original position of the draggable element. - * Use ui.position to get a reference to the current position of the draggable element. * * @optionValue New value to be set. */ @@ -64397,21 +73606,11 @@ interface JQuery { /** * Fired on drag. Return false to cancel the dragging. - * Use ui.metadatato get a reference to the data. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.originalPosition to get a reference to the original position of the draggable element. - * Use ui.position to get a reference to the current position of the draggable element. */ igPivotDataSelector(optionLiteral: 'option', optionName: "drag"): DragEvent; /** * Fired on drag. Return false to cancel the dragging. - * Use ui.metadatato get a reference to the data. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.originalPosition to get a reference to the original position of the draggable element. - * Use ui.position to get a reference to the current position of the draggable element. * * @optionValue New value to be set. */ @@ -64419,19 +73618,11 @@ interface JQuery { /** * Fired on drag stop. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.originalPosition to get a reference to the original position of the draggable element. - * Use ui.position to get a reference to the current position of the draggable element. */ igPivotDataSelector(optionLiteral: 'option', optionName: "dragStop"): DragStopEvent; /** * Fired on drag stop. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.originalPosition to get a reference to the original position of the draggable element. - * Use ui.position to get a reference to the current position of the draggable element. * * @optionValue New value to be set. */ @@ -64439,25 +73630,11 @@ interface JQuery { /** * Fired before a metadata item drop. Return false to cancel the drop. - * Use ui.targetElement for a reference to the drop target. - * Use ui.draggedElement for a reference to the dragged element. - * Use ui.metadatato get a reference to the data. - * Use ui.metadataIndex to get the index at which the metadata will be inserted. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.position to get a reference to the current position of the draggable element. */ igPivotDataSelector(optionLiteral: 'option', optionName: "metadataDropping"): MetadataDroppingEvent; /** * Fired before a metadata item drop. Return false to cancel the drop. - * Use ui.targetElement for a reference to the drop target. - * Use ui.draggedElement for a reference to the dragged element. - * Use ui.metadatato get a reference to the data. - * Use ui.metadataIndex to get the index at which the metadata will be inserted. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.position to get a reference to the current position of the draggable element. * * @optionValue New value to be set. */ @@ -64465,25 +73642,11 @@ interface JQuery { /** * Fired after a metadata item drop. - * Use ui.targetElement for a reference to the drop target. - * Use ui.draggedElement for a reference to the dragged element. - * Use ui.metadatato get a reference to the data. - * Use ui.metadataIndex to get the index at which the metadata is inserted. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.position to get a reference to the current position of the draggable element. */ igPivotDataSelector(optionLiteral: 'option', optionName: "metadataDropped"): MetadataDroppedEvent; /** * Fired after a metadata item drop. - * Use ui.targetElement for a reference to the drop target. - * Use ui.draggedElement for a reference to the dragged element. - * Use ui.metadatato get a reference to the data. - * Use ui.metadataIndex to get the index at which the metadata is inserted. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.position to get a reference to the current position of the draggable element. * * @optionValue New value to be set. */ @@ -64491,15 +73654,11 @@ interface JQuery { /** * Fired before a metadata item is removed when the user clicks the close icon. Return false to cancel the removing. - * Use ui.targetElement for a reference to the dragged element. - * Use ui.metadatato get a reference to the data. */ igPivotDataSelector(optionLiteral: 'option', optionName: "metadataRemoving"): MetadataRemovingEvent; /** * Fired before a metadata item is removed when the user clicks the close icon. Return false to cancel the removing. - * Use ui.targetElement for a reference to the dragged element. - * Use ui.metadatato get a reference to the data. * * @optionValue New value to be set. */ @@ -64507,13 +73666,11 @@ interface JQuery { /** * Fired after a metadata item is removed when the user clicks the close icon. - * Use ui.metadatato get a reference to the data. */ igPivotDataSelector(optionLiteral: 'option', optionName: "metadataRemoved"): MetadataRemovedEvent; /** * Fired after a metadata item is removed when the user clicks the close icon. - * Use ui.metadatato get a reference to the data. * * @optionValue New value to be set. */ @@ -64521,13 +73678,11 @@ interface JQuery { /** * Fired before the filter members drop down opens. Return false to cancel the opening. - * Use ui.hierarchy for a reference to the hierarchy. */ igPivotDataSelector(optionLiteral: 'option', optionName: "filterDropDownOpening"): FilterDropDownOpeningEvent; /** * Fired before the filter members drop down opens. Return false to cancel the opening. - * Use ui.hierarchy for a reference to the hierarchy. * * @optionValue New value to be set. */ @@ -64535,15 +73690,11 @@ interface JQuery { /** * Fired after the filter members drop down opens. - * Use ui.hierarchy for a reference to the hierarchy. - * Use ui.dropDownElement for a reference to the drop down. */ igPivotDataSelector(optionLiteral: 'option', optionName: "filterDropDownOpened"): FilterDropDownOpenedEvent; /** * Fired after the filter members drop down opens. - * Use ui.hierarchy for a reference to the hierarchy. - * Use ui.dropDownElement for a reference to the drop down. * * @optionValue New value to be set. */ @@ -64551,17 +73702,11 @@ interface JQuery { /** * Fired after the filter members are loaded. - * Use ui.parent to get the parent node or the igTree instance in the initial load. - * Use ui.rootFilterMembers for a collection with the root filter members . - * Use ui.filterMembers for a collection with the newly loaded filter members. */ igPivotDataSelector(optionLiteral: 'option', optionName: "filterMembersLoaded"): FilterMembersLoadedEvent; /** * Fired after the filter members are loaded. - * Use ui.parent to get the parent node or the igTree instance in the initial load. - * Use ui.rootFilterMembers for a collection with the root filter members . - * Use ui.filterMembers for a collection with the newly loaded filter members. * * @optionValue New value to be set. */ @@ -64569,17 +73714,11 @@ interface JQuery { /** * Fired after the OK button in the filter members drop down is clicked. Return false to cancel the applying of the filters. - * Use ui.hierarchy for a reference to the hierarchy. - * Use ui.filterMembers for a collection with the selected filter members. If all filter members are selected the collection will be empty. - * Use ui.dropDownElement for a reference to the drop down. */ igPivotDataSelector(optionLiteral: 'option', optionName: "filterDropDownOk"): FilterDropDownOkEvent; /** * Fired after the OK button in the filter members drop down is clicked. Return false to cancel the applying of the filters. - * Use ui.hierarchy for a reference to the hierarchy. - * Use ui.filterMembers for a collection with the selected filter members. If all filter members are selected the collection will be empty. - * Use ui.dropDownElement for a reference to the drop down. * * @optionValue New value to be set. */ @@ -64587,15 +73726,11 @@ interface JQuery { /** * Fired before the filter members drop down closes. Return false to cancel the closing. - * Use ui.hierarchy for a reference to the hierarchy. - * Use ui.dropDownElement for a reference to the drop down. */ igPivotDataSelector(optionLiteral: 'option', optionName: "filterDropDownClosing"): FilterDropDownClosingEvent; /** * Fired before the filter members drop down closes. Return false to cancel the closing. - * Use ui.hierarchy for a reference to the hierarchy. - * Use ui.dropDownElement for a reference to the drop down. * * @optionValue New value to be set. */ @@ -64603,13 +73738,11 @@ interface JQuery { /** * Fired after the filter members drop down closes. - * Use ui.hierarchy for a reference to the hierarchy. */ igPivotDataSelector(optionLiteral: 'option', optionName: "filterDropDownClosed"): FilterDropDownClosedEvent; /** * Fired after the filter members drop down closes. - * Use ui.hierarchy for a reference to the hierarchy. * * @optionValue New value to be set. */ @@ -65018,6 +74151,7 @@ interface IgPivotGridGridOptions { /** * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. + * */ fixedHeaders?: boolean; @@ -65028,11 +74162,13 @@ interface IgPivotGridGridOptions { /** * A list of grid features definitions. The supported features are Resizing and Tooltips. Each feature goes with its separate options that are documented for the feature accordingly. + * */ features?: IgPivotGridGridOptionsFeatures; /** * Initial tabIndex attribute that will be set on the container element. + * */ tabIndex?: number; @@ -65060,6 +74196,7 @@ interface IgPivotGridDragAndDropSettings { /** * Specifies the containment for the drag helper. The area inside of which thehelper is contained would be scrollable while dragging. + * */ containment?: boolean|string|Array; @@ -65080,19 +74217,19 @@ interface PivotGridHeadersRenderedEvent { interface PivotGridHeadersRenderedEventUIParam { /** - * Used to get a reference to the pivot grid. + * Gets a reference to the pivot grid. */ owner?: any; /** - * Used to get a reference to the igGrid widget, which holds the headers. + * Gets a reference to the igGrid widget, which holds the headers. */ grid?: any; /** - * Used to get a reference to the headers table DOM element. + * Gets a reference to the headers table DOM element. */ - table?: any; + table?: Element; } interface PivotGridRenderedEvent { @@ -65101,12 +74238,12 @@ interface PivotGridRenderedEvent { interface PivotGridRenderedEventUIParam { /** - * Used to get a reference to the pivot grid. + * Gets a reference to the pivot grid. */ owner?: any; /** - * Used to get reference to the igGrid widget, which represents the data. + * Gets reference to the igGrid widget, which represents the data. */ grid?: any; } @@ -65117,29 +74254,29 @@ interface TupleMemberExpandingEvent { interface TupleMemberExpandingEventUIParam { /** - * Used to get a reference to the pivot grid. + * Gets a reference to the pivot grid. */ owner?: any; /** - * Used to get a reference to the data source. + * Gets a reference to the data source. */ dataSource?: any; /** - * Used to get the name of axis, which holds the member and the tuple. + * Gets the name of axis, which holds the member and the tuple. */ - axisName?: any; + axisName?: string; /** - * Used to get the index of the tuple in the axis. + * Gets the index of the tuple in the axis. */ - tupleIndex?: any; + tupleIndex?: number; /** - * Used to get the index of the member in the tuple. + * Gets the index of the member in the tuple. */ - memberIndex?: any; + memberIndex?: number; } interface TupleMemberExpandedEvent { @@ -65148,29 +74285,29 @@ interface TupleMemberExpandedEvent { interface TupleMemberExpandedEventUIParam { /** - * Used to get a reference to the pivot grid. + * Gets a reference to the pivot grid. */ owner?: any; /** - * Used to get a reference to the data source. + * Gets a reference to the data source. */ dataSource?: any; /** - * Used to get the name of axis, which holds the member and the tuple. + * Gets the name of axis, which holds the member and the tuple. */ - axisName?: any; + axisName?: string; /** - * Used to get the index of the tuple in the axis. + * Gets the index of the tuple in the axis. */ - tupleIndex?: any; + tupleIndex?: number; /** - * Used to get the index of the member in the tuple. + * Gets the index of the member in the tuple. */ - memberIndex?: any; + memberIndex?: number; } interface TupleMemberCollapsingEvent { @@ -65179,29 +74316,29 @@ interface TupleMemberCollapsingEvent { interface TupleMemberCollapsingEventUIParam { /** - * Used to get a reference to the pivot grid. + * Gets a reference to the pivot grid. */ owner?: any; /** - * Used to get a reference to the data source. + * Gets a reference to the data source. */ dataSource?: any; /** - * Used to get the name of axis, which holds the member and the tuple. + * Gets the name of axis, which holds the member and the tuple. */ - axisName?: any; + axisName?: string; /** - * Used to get the index of the tuple in the axis. + * Gets the index of the tuple in the axis. */ - tupleIndex?: any; + tupleIndex?: number; /** - * Used to get the index of the member in the tuple. + * Gets the index of the member in the tuple. */ - memberIndex?: any; + memberIndex?: number; } interface TupleMemberCollapsedEvent { @@ -65210,29 +74347,29 @@ interface TupleMemberCollapsedEvent { interface TupleMemberCollapsedEventUIParam { /** - * Used to get a reference to the pivot grid. + * Gets a reference to the pivot grid. */ owner?: any; /** - * Used to get a reference to the data source. + * Gets a reference to the data source. */ dataSource?: any; /** - * Used to get the name of axis, which holds the member and the tuple. + * Gets the name of axis, which holds the member and the tuple. */ - axisName?: any; + axisName?: string; /** - * Used to get the index of the tuple in the axis. + * Gets the index of the tuple in the axis. */ - tupleIndex?: any; + tupleIndex?: number; /** - * Used to get the index of the member in the tuple. + * Gets the index of the member in the tuple. */ - memberIndex?: any; + memberIndex?: number; } interface SortingEvent { @@ -65241,14 +74378,14 @@ interface SortingEvent { interface SortingEventUIParam { /** - * Used to get a reference to the pivot grid. + * Gets a reference to the pivot grid. */ owner?: any; /** - * Used to get an array of the tuple indices and sort directions that will be used. + * Gets an array of the tuple indices and sort directions that will be used. */ - sortDirections?: any; + sortDirections?: any[]; } interface SortedEvent { @@ -65257,19 +74394,19 @@ interface SortedEvent { interface SortedEventUIParam { /** - * Used to get a reference to the pivot grid. + * Gets a reference to the pivot grid. */ owner?: any; /** - * Used to get an array of the tuple indices and sort directions that were passed to the table view. + * Gets an array of the tuple indices and sort directions that were passed to the table view. */ - sortDirections?: any; + sortDirections?: any[]; /** - * Used to get an array of the tuple indices and sort directions that were actually applied to the table view. + * Gets an array of the tuple indices and sort directions that were actually applied to the table view. */ - appliedSortDirections?: any; + appliedSortDirections?: any[]; } interface HeadersSortingEvent { @@ -65278,14 +74415,14 @@ interface HeadersSortingEvent { interface HeadersSortingEventUIParam { /** - * Used to get a reference to the pivot grid. + * Gets a reference to the pivot grid. */ owner?: any; /** - * Used to get an array of the level names and sort directions that will be used. + * Gets an array of the level names and sort directions that will be used. */ - levelSortDirections?: any; + levelSortDirections?: any[]; } interface HeadersSortedEvent { @@ -65294,27 +74431,34 @@ interface HeadersSortedEvent { interface HeadersSortedEventUIParam { /** - * Used to get a reference to the pivot grid. + * Gets a reference to the pivot grid. */ owner?: any; /** - * Used to get an array of the level names and sort directions that were used. + * Gets an array of the level names and sort directions that were used. */ - levelSortDirections?: any; + levelSortDirections?: any[]; /** - * Used to get an array of the level names and sort directions that were actually applied to the table view. + * Gets an array of the level names and sort directions that were actually applied to the table view. */ - appliedLevelSortDirections?: any; + appliedLevelSortDirections?: any[]; } interface IgPivotGrid { + /** + * + * + * Valid values: + * "null" Will stretch to fit the data, if no other widths are defined. + */ width?: string|number; /** * This is the total height of the grid. * + * * Valid values: * "null" Will stretch vertically to fit data, if no other heights are defined */ @@ -65322,17 +74466,20 @@ interface IgPivotGrid { /** * An instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + * */ dataSource?: any; /** * An object that will be used to create an instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. + * */ dataSourceOptions?: IgPivotGridDataSourceOptions; /** * Setting deferUpdate to true will not apply changes to the data source until the updateGrid method is called. + * */ deferUpdate?: boolean; @@ -65340,6 +74487,7 @@ interface IgPivotGrid { * A boolean value indicating whether a parent in the columns is in front of its children. * If set to true, the query set sorts members in a level in their natural order - child members immediately follow their parent members. * If set to false the query set sorts the members in a level using a post-natural order. In other words, child members precede their parents. + * */ isParentInFrontForColumns?: boolean; @@ -65347,16 +74495,19 @@ interface IgPivotGrid { * A boolean value indicating whether a parent in the rows is in front of its children. * If set to true, the query set sorts members in a level in their natural order - child members immediately follow their parent members. * If set to false the query set sorts the members in a level using a post-natural order. In other words, child members precede their parents. + * */ isParentInFrontForRows?: boolean; /** * A boolean value indicating whether the column headers should be arranged for compact header layout i.e. each hierarchy is in a single row. + * */ compactColumnHeaders?: boolean; /** * A boolean value indicating whether the row headers should be arranged for compact header layout i.e. each hierarchy is in a single column. + * */ compactRowHeaders?: boolean; @@ -65365,6 +74516,7 @@ interface IgPivotGrid { * superCompact Each hierarchy in the rows is displayed in a separate column. The child members of a member in the rows are displayed on above or below it (Depending on the isParentInFrontForRows setting). * tree All hierarchies in the rows are displayed in a tree-like structure in a single column (The column's width is dependent on the defaultRowHEaderWidth, which can be set to "null" to enable the built-in auto-sizing functionality). * + * * Valid values: * "standard" * "superCompact" @@ -65374,11 +74526,13 @@ interface IgPivotGrid { /** * The indentation for every level column when the compactColumnHeaders is set to true. + * */ compactColumnHeaderIndentation?: number; /** * The indentation for every level row when the rowHeadersLayout is set to 'superCompact'. + * */ compactRowHeaderIndentation?: number; @@ -65394,31 +74548,37 @@ interface IgPivotGrid { /** * Specifies the width of the row headers. + * */ defaultRowHeaderWidth?: number; /** * Enables sorting of the value cells in columns. + * */ allowSorting?: boolean; /** * Specifies the default sort direction for the rows. + * */ firstSortDirection?: any; /** * Enables sorting of the header cells in rows. + * */ allowHeaderRowsSorting?: boolean; /** * Enables sorting of the header cells in columns. + * */ allowHeaderColumnsSorting?: boolean; /** * An array of level sort direction items, which predefine the sorted header cells. + * */ levelSortDirections?: IgPivotGridLevelSortDirection[]; @@ -65433,16 +74593,19 @@ interface IgPivotGrid { /** * Specifies the default sort direction for the levels if no sort direction is specified in an item from the levelSortDirections option. + * */ firstLevelSortDirection?: any; /** * Options specific to the igGrid that will render the pivot grid view. + * */ gridOptions?: IgPivotGridGridOptions; /** * Settings for the drag and drop functionality of the igPivotGrid. + * */ dragAndDropSettings?: IgPivotGridDragAndDropSettings; @@ -65453,46 +74616,55 @@ interface IgPivotGrid { /** * Disable the drag and drop for the rows drop area and the ability to use filtering and remove items from it. + * */ disableRowsDropArea?: boolean; /** * Disable the drag and drop for the columns drop area and the ability to use filtering and remove items from it. + * */ disableColumnsDropArea?: boolean; /** * Disable the drag and drop for the measures drop area and the ability to use filtering and remove items from it. + * */ disableMeasuresDropArea?: boolean; /** * Disable the drag and drop for the filters drop area and the ability to use filtering and remove items from it. + * */ disableFiltersDropArea?: boolean; /** * Hide the rows drop area. + * */ hideRowsDropArea?: boolean; /** * Hide the columns drop area. + * */ hideColumnsDropArea?: boolean; /** * Hide the measures drop area. + * */ hideMeasuresDropArea?: boolean; /** * Hide the filters drop area. + * */ hideFiltersDropArea?: boolean; /** * A function that will be called to determine if an item can be moved in or dropped on an area of the pivot grid. + * * paramType="string" The location where the item will be moved - igPivotGrid, igPivotDataSelector, filters, rows, columns or measures. * paramType="string" The type of the item - Hierarchy, Measure or MeasureList. * paramType="string" The unique name of the item. @@ -65500,226 +74672,146 @@ interface IgPivotGrid { */ customMoveValidation?: Function; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Fired after the data source has initialized. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.dataSource to get a reference to the data source. - * Use ui.error to see if an error has occured during initialization. - * Use ui.metadataTreeRoot to get a reference to the root of the data source metatadata root item. */ dataSourceInitialized?: DataSourceInitializedEvent; /** * Fired after the data source has updated. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.dataSource to get a reference to the data source. - * Use ui.error to see if an error has occured during update. - * Use ui.result to get the result of the update operation. */ dataSourceUpdated?: DataSourceUpdatedEvent; /** * Event fired after the headers have been rendered. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.grid to get a reference to the igGrid widget, which holds the headers. - * Use ui.table to get a reference to the headers table DOM element. */ pivotGridHeadersRendered?: PivotGridHeadersRenderedEvent; /** * Event fired after the whole grid widget has been rendered (including headers, footers, etc.). - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.grid to get reference to the igGrid widget, which represents the data. */ pivotGridRendered?: PivotGridRenderedEvent; /** - * Fired before the expand of the tuple member. - * Function takes arguments evt and ui. Return false to cancel the expanding. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.dataSource to get a reference to the data source. - * Use ui.axisName to get the name of axis, which holds the member and the tuple. - * Use ui.tupleIndex to get the index of the tuple in the axis. - * Use ui.memberIndex to get the index of the member in the tuple. + * Fired before the expand of the tuple member. Return false to cancel the expanding. */ tupleMemberExpanding?: TupleMemberExpandingEvent; /** * Fired after the expand of the tuple member. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.dataSource to get a reference to the data source. - * Use ui.axisName to get the name of axis, which holds the member and the tuple. - * Use ui.tupleIndex to get the index of the tuple in the axis. - * Use ui.memberIndex to get the index of the member in the tuple. */ tupleMemberExpanded?: TupleMemberExpandedEvent; /** - * Fired before the collapse of the tuple member. - * Function takes arguments evt and ui. Return false to cancel the collapsing. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.dataSource to get a reference to the data source. - * Use ui.axisName to get the name of axis, which holds the member and the tuple. - * Use ui.tupleIndex to get the index of the tuple in the axis. - * Use ui.memberIndex to get the index of the member in the tuple. + * Fired before the collapse of the tuple member. Return false to cancel the collapsing. */ tupleMemberCollapsing?: TupleMemberCollapsingEvent; /** * Fired after the collapse of the tuple member. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.dataSource to get a reference to the data source. - * Use ui.axisName to get the name of axis, which holds the member and the tuple. - * Use ui.tupleIndex to get the index of the tuple in the axis. - * Use ui.memberIndex to get the index of the member in the tuple. */ tupleMemberCollapsed?: TupleMemberCollapsedEvent; /** - * Fired before the sorting of the columns. - * Function takes arguments evt and ui. Return false to cancel the sorting. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.sortDirections to get an array of the tuple indices and sort directions that will be used. + * Fired before the sorting of the columns. Return false to cancel the sorting. */ sorting?: SortingEvent; /** * Fired after the sorting of the columns. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.sortDirections to get an array of the tuple indices and sort directions that were passed to the table view. - * Use ui.appliedSortDirections to get an array of the tuple indices and sort directions that were actually applied to the table view. */ sorted?: SortedEvent; /** - * Fired before the sorting of the headers. - * Function takes arguments evt and ui. Return false to cancel the sorting. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.levelSortDirections to get an array of the level names and sort directions that will be used. + * Fired before the sorting of the headers. Return false to cancel the sorting. */ headersSorting?: HeadersSortingEvent; /** * Fired after the sorting of the headers. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.levelSortDirections to get an array of the level names and sort directions that were used. - * Use ui.appliedLevelSortDirections to get an array of the level names and sort directions that were actually applied to the table view. */ headersSorted?: HeadersSortedEvent; /** * Fired on drag start. Return false to cancel the dragging. - * Use ui.metadatato get a reference to the data. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.originalPosition to get a reference to the original position of the draggable element. - * Use ui.position to get a reference to the current position of the draggable element. */ dragStart?: DragStartEvent; /** * Fired on drag. Return false to cancel the drag. - * Use ui.metadatato get a reference to the data. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.originalPosition to get a reference to the original position of the draggable element. - * Use ui.position to get a reference to the current position of the draggable element. */ drag?: DragEvent; /** * Fired on drag stop. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.originalPosition to get a reference to the original position of the draggable element. - * Use ui.position to get a reference to the current position of the draggable element. */ dragStop?: DragStopEvent; /** * Fired before a metadata item drop. Return false to cancel the drop. - * Use ui.targetElement for a reference to the drop target. - * Use ui.draggedElement for a reference to the metadata item element. - * Use ui.metadatato get a reference to the data. - * Use ui.metadataIndex to get the index at which the metadata will be inserted. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.position to get a reference to the current position of the draggable element. */ metadataDropping?: MetadataDroppingEvent; /** * Fired after a metadata item drop. - * Use ui.targetElement for a reference to the drop target. - * Use ui.draggedElement for a reference to the dragged element. - * Use ui.metadatato get a reference to the data. - * Use ui.metadataIndex to get the index at which the metadata is inserted. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.position to get a reference to the current position of the draggable element. */ metadataDropped?: MetadataDroppedEvent; /** * Fired before a metadata item is removed when the user clicks the close icon. Return false to cancel the removing. - * Use ui.targetElement for a reference to the dragged element. - * Use ui.metadatato get a reference to the data. */ metadataRemoving?: MetadataRemovingEvent; /** * Fired after a metadata item is removed when the user clicks the close icon. - * Use ui.metadatato get a reference to the data. */ metadataRemoved?: MetadataRemovedEvent; /** * Fired before the filter members drop down opens. Return false to cancel the opening. - * Use ui.hierarchy for a reference to the hierarchy. */ filterDropDownOpening?: FilterDropDownOpeningEvent; /** * Fired after the filter members drop down opens. - * Use ui.hierarchy for a reference to the hierarchy. - * Use ui.dropDownElement for a reference to the drop down. */ filterDropDownOpened?: FilterDropDownOpenedEvent; /** * Fired after the filter members are loaded. - * Use ui.parent to get the parent node or the igTree instance in the initial load. - * Use ui.rootFilterMembers for a collection with the root filter members . - * Use ui.filterMembers for a collection with the newly loaded filter members. */ filterMembersLoaded?: FilterMembersLoadedEvent; /** * Fired after the OK button in the filter members drop down is clicked. Return false to cancel the applying of the filters. - * Use ui.hierarchy for a reference to the hierarchy. - * Use ui.filterMembers for a collection with the selected filter members. If all filter members are selected the collection will be empty. - * Use ui.dropDownElement for a reference to the drop down. */ filterDropDownOk?: FilterDropDownOkEvent; /** * Fired before the filter members drop down closes. Return false to cancel the closing. - * Use ui.hierarchy for a reference to the hierarchy. - * Use ui.dropDownElement for a reference to the drop down. */ filterDropDownClosing?: FilterDropDownClosingEvent; /** * Fired after the filter members drop down closes. - * Use ui.hierarchy for a reference to the hierarchy. */ filterDropDownClosed?: FilterDropDownClosedEvent; @@ -65729,7 +74821,16 @@ interface IgPivotGrid { [optionName: string]: any; } interface IgPivotGridMethods { + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.igpivotgrid#options:language) + * Note that this method is for rare scenarios, see [language](ui.igpivotgrid#options:language) or [locale](ui.igpivotgrid#options:locale) option setter + */ changeLocale(): void; + + /** + * Changes the the regional settings of widget element to the language specified in [options.regional](ui.igpivotgrid#options:regional) + * Note that this method is for rare scenarios, use [regional](ui.igpivotgrid#options:regional) option setter + */ changeRegional(): void; /** @@ -65764,6 +74865,7 @@ interface IgPivotGridMethods { /** * Returns an array with the applied sort directions on the igPivotGrid's columns. The returned array contains objects with the following properties: + * * memberNames: The names of the members in the tuple. * tupleIndex: The index of the tuple on the column axis in the original unsorted result. * sortDirection: The direction of the sort - ascending or descending. @@ -65772,6 +74874,7 @@ interface IgPivotGridMethods { /** * Returns an array with the applied level sort direction items, which were used for the sorting of the header cells. The returned array contains objects with the following properties: + * * levelUniqueName: Specifies the unique name of the level, which was sorted. * sortDirection: The direction of the header sort - ascending or descending. */ @@ -65784,6 +74887,16 @@ interface IgPivotGridMethods { * 3. Unbind all events that were bound. */ destroy(): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igPivotGrid"): IgPivotGridMethods; @@ -65799,13 +74912,26 @@ interface JQuery { igPivotGrid(methodName: "appliedColumnSortDirections"): any[]; igPivotGrid(methodName: "appliedLevelSortDirections"): any[]; igPivotGrid(methodName: "destroy"): void; + igPivotGrid(methodName: "changeGlobalLanguage"): void; + igPivotGrid(methodName: "changeGlobalRegional"): void; + + /** + * * + */ igPivotGrid(optionLiteral: 'option', optionName: "width"): string|number; + /** + * * + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; /** * This is the total height of the grid. + * */ igPivotGrid(optionLiteral: 'option', optionName: "height"): string|number; @@ -65813,6 +74939,7 @@ interface JQuery { /** * This is the total height of the grid. * + * * @optionValue New value to be set. */ @@ -65820,12 +74947,14 @@ interface JQuery { /** * An instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + * */ igPivotGrid(optionLiteral: 'option', optionName: "dataSource"): any; /** * An instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; @@ -65833,6 +74962,7 @@ interface JQuery { /** * An object that will be used to create an instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. + * */ igPivotGrid(optionLiteral: 'option', optionName: "dataSourceOptions"): IgPivotGridDataSourceOptions; @@ -65840,18 +74970,21 @@ interface JQuery { * An object that will be used to create an instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "dataSourceOptions", optionValue: IgPivotGridDataSourceOptions): void; /** * Setting deferUpdate to true will not apply changes to the data source until the updateGrid method is called. + * */ igPivotGrid(optionLiteral: 'option', optionName: "deferUpdate"): boolean; /** * Setting deferUpdate to true will not apply changes to the data source until the updateGrid method is called. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "deferUpdate", optionValue: boolean): void; @@ -65860,6 +74993,7 @@ interface JQuery { * A boolean value indicating whether a parent in the columns is in front of its children. * If set to true, the query set sorts members in a level in their natural order - child members immediately follow their parent members. * If set to false the query set sorts the members in a level using a post-natural order. In other words, child members precede their parents. + * */ igPivotGrid(optionLiteral: 'option', optionName: "isParentInFrontForColumns"): boolean; @@ -65868,6 +75002,7 @@ interface JQuery { * If set to true, the query set sorts members in a level in their natural order - child members immediately follow their parent members. * If set to false the query set sorts the members in a level using a post-natural order. In other words, child members precede their parents. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "isParentInFrontForColumns", optionValue: boolean): void; @@ -65876,6 +75011,7 @@ interface JQuery { * A boolean value indicating whether a parent in the rows is in front of its children. * If set to true, the query set sorts members in a level in their natural order - child members immediately follow their parent members. * If set to false the query set sorts the members in a level using a post-natural order. In other words, child members precede their parents. + * */ igPivotGrid(optionLiteral: 'option', optionName: "isParentInFrontForRows"): boolean; @@ -65884,30 +75020,35 @@ interface JQuery { * If set to true, the query set sorts members in a level in their natural order - child members immediately follow their parent members. * If set to false the query set sorts the members in a level using a post-natural order. In other words, child members precede their parents. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "isParentInFrontForRows", optionValue: boolean): void; /** * A boolean value indicating whether the column headers should be arranged for compact header layout i.e. each hierarchy is in a single row. + * */ igPivotGrid(optionLiteral: 'option', optionName: "compactColumnHeaders"): boolean; /** * A boolean value indicating whether the column headers should be arranged for compact header layout i.e. each hierarchy is in a single row. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "compactColumnHeaders", optionValue: boolean): void; /** * A boolean value indicating whether the row headers should be arranged for compact header layout i.e. each hierarchy is in a single column. + * */ igPivotGrid(optionLiteral: 'option', optionName: "compactRowHeaders"): boolean; /** * A boolean value indicating whether the row headers should be arranged for compact header layout i.e. each hierarchy is in a single column. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "compactRowHeaders", optionValue: boolean): void; @@ -65916,6 +75057,7 @@ interface JQuery { * A value indicating whether the layout that row headers should be arranged.standard Each hierarchy in the rows is displayed in a separate column. The child members of a member in the rows are displayed on its right. * superCompact Each hierarchy in the rows is displayed in a separate column. The child members of a member in the rows are displayed on above or below it (Depending on the isParentInFrontForRows setting). * tree All hierarchies in the rows are displayed in a tree-like structure in a single column (The column's width is dependent on the defaultRowHEaderWidth, which can be set to "null" to enable the built-in auto-sizing functionality). + * */ igPivotGrid(optionLiteral: 'option', optionName: "rowHeadersLayout"): any; @@ -65924,30 +75066,35 @@ interface JQuery { * superCompact Each hierarchy in the rows is displayed in a separate column. The child members of a member in the rows are displayed on above or below it (Depending on the isParentInFrontForRows setting). * tree All hierarchies in the rows are displayed in a tree-like structure in a single column (The column's width is dependent on the defaultRowHEaderWidth, which can be set to "null" to enable the built-in auto-sizing functionality). * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "rowHeadersLayout", optionValue: any): void; /** * The indentation for every level column when the compactColumnHeaders is set to true. + * */ igPivotGrid(optionLiteral: 'option', optionName: "compactColumnHeaderIndentation"): number; /** * The indentation for every level column when the compactColumnHeaders is set to true. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "compactColumnHeaderIndentation", optionValue: number): void; /** * The indentation for every level row when the rowHeadersLayout is set to 'superCompact'. + * */ igPivotGrid(optionLiteral: 'option', optionName: "compactRowHeaderIndentation"): number; /** * The indentation for every level row when the rowHeadersLayout is set to 'superCompact'. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "compactRowHeaderIndentation", optionValue: number): void; @@ -65978,72 +75125,84 @@ interface JQuery { /** * Gets the width of the row headers. + * */ igPivotGrid(optionLiteral: 'option', optionName: "defaultRowHeaderWidth"): number; /** * Sets the width of the row headers. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "defaultRowHeaderWidth", optionValue: number): void; /** * Enables sorting of the value cells in columns. + * */ igPivotGrid(optionLiteral: 'option', optionName: "allowSorting"): boolean; /** * Enables sorting of the value cells in columns. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "allowSorting", optionValue: boolean): void; /** * Gets the default sort direction for the rows. + * */ igPivotGrid(optionLiteral: 'option', optionName: "firstSortDirection"): any; /** * Sets the default sort direction for the rows. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "firstSortDirection", optionValue: any): void; /** * Enables sorting of the header cells in rows. + * */ igPivotGrid(optionLiteral: 'option', optionName: "allowHeaderRowsSorting"): boolean; /** * Enables sorting of the header cells in rows. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "allowHeaderRowsSorting", optionValue: boolean): void; /** * Enables sorting of the header cells in columns. + * */ igPivotGrid(optionLiteral: 'option', optionName: "allowHeaderColumnsSorting"): boolean; /** * Enables sorting of the header cells in columns. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "allowHeaderColumnsSorting", optionValue: boolean): void; /** * An array of level sort direction items, which predefine the sorted header cells. + * */ igPivotGrid(optionLiteral: 'option', optionName: "levelSortDirections"): IgPivotGridLevelSortDirection[]; /** * An array of level sort direction items, which predefine the sorted header cells. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "levelSortDirections", optionValue: IgPivotGridLevelSortDirection[]): void; @@ -66064,36 +75223,42 @@ interface JQuery { /** * Gets the default sort direction for the levels if no sort direction is specified in an item from the levelSortDirections option. + * */ igPivotGrid(optionLiteral: 'option', optionName: "firstLevelSortDirection"): any; /** * Sets the default sort direction for the levels if no sort direction is specified in an item from the levelSortDirections option. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "firstLevelSortDirection", optionValue: any): void; /** * Options specific to the igGrid that will render the pivot grid view. + * */ igPivotGrid(optionLiteral: 'option', optionName: "gridOptions"): IgPivotGridGridOptions; /** * Options specific to the igGrid that will render the pivot grid view. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "gridOptions", optionValue: IgPivotGridGridOptions): void; /** * Settings for the drag and drop functionality of the igPivotGrid. + * */ igPivotGrid(optionLiteral: 'option', optionName: "dragAndDropSettings"): IgPivotGridDragAndDropSettings; /** * Settings for the drag and drop functionality of the igPivotGrid. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "dragAndDropSettings", optionValue: IgPivotGridDragAndDropSettings): void; @@ -66112,102 +75277,119 @@ interface JQuery { /** * Disable the drag and drop for the rows drop area and the ability to use filtering and remove items from it. + * */ igPivotGrid(optionLiteral: 'option', optionName: "disableRowsDropArea"): boolean; /** * Disable the drag and drop for the rows drop area and the ability to use filtering and remove items from it. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "disableRowsDropArea", optionValue: boolean): void; /** * Disable the drag and drop for the columns drop area and the ability to use filtering and remove items from it. + * */ igPivotGrid(optionLiteral: 'option', optionName: "disableColumnsDropArea"): boolean; /** * Disable the drag and drop for the columns drop area and the ability to use filtering and remove items from it. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "disableColumnsDropArea", optionValue: boolean): void; /** * Disable the drag and drop for the measures drop area and the ability to use filtering and remove items from it. + * */ igPivotGrid(optionLiteral: 'option', optionName: "disableMeasuresDropArea"): boolean; /** * Disable the drag and drop for the measures drop area and the ability to use filtering and remove items from it. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "disableMeasuresDropArea", optionValue: boolean): void; /** * Disable the drag and drop for the filters drop area and the ability to use filtering and remove items from it. + * */ igPivotGrid(optionLiteral: 'option', optionName: "disableFiltersDropArea"): boolean; /** * Disable the drag and drop for the filters drop area and the ability to use filtering and remove items from it. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "disableFiltersDropArea", optionValue: boolean): void; /** * Hide the rows drop area. + * */ igPivotGrid(optionLiteral: 'option', optionName: "hideRowsDropArea"): boolean; /** * Hide the rows drop area. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "hideRowsDropArea", optionValue: boolean): void; /** * Hide the columns drop area. + * */ igPivotGrid(optionLiteral: 'option', optionName: "hideColumnsDropArea"): boolean; /** * Hide the columns drop area. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "hideColumnsDropArea", optionValue: boolean): void; /** * Hide the measures drop area. + * */ igPivotGrid(optionLiteral: 'option', optionName: "hideMeasuresDropArea"): boolean; /** * Hide the measures drop area. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "hideMeasuresDropArea", optionValue: boolean): void; /** * Hide the filters drop area. + * */ igPivotGrid(optionLiteral: 'option', optionName: "hideFiltersDropArea"): boolean; /** * Hide the filters drop area. * + * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "hideFiltersDropArea", optionValue: boolean): void; /** * A function that will be called to determine if an item can be moved in or dropped on an area of the pivot grid. + * * paramType="string" The location where the item will be moved - igPivotGrid, igPivotDataSelector, filters, rows, columns or measures. * paramType="string" The type of the item - Hierarchy, Measure or MeasureList. * paramType="string" The unique name of the item. @@ -66217,6 +75399,7 @@ interface JQuery { /** * A function that will be called to determine if an item can be moved in or dropped on an area of the pivot grid. + * * paramType="string" The location where the item will be moved - igPivotGrid, igPivotDataSelector, filters, rows, columns or measures. * paramType="string" The type of the item - Hierarchy, Measure or MeasureList. * paramType="string" The unique name of the item. @@ -66226,23 +75409,57 @@ interface JQuery { */ igPivotGrid(optionLiteral: 'option', optionName: "customMoveValidation", optionValue: Function): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igPivotGrid(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igPivotGrid(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igPivotGrid(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igPivotGrid(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igPivotGrid(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Fired after the data source has initialized. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.dataSource to get a reference to the data source. - * Use ui.error to see if an error has occured during initialization. - * Use ui.metadataTreeRoot to get a reference to the root of the data source metatadata root item. */ igPivotGrid(optionLiteral: 'option', optionName: "dataSourceInitialized"): DataSourceInitializedEvent; /** * Fired after the data source has initialized. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.dataSource to get a reference to the data source. - * Use ui.error to see if an error has occured during initialization. - * Use ui.metadataTreeRoot to get a reference to the root of the data source metatadata root item. * * @optionValue New value to be set. */ @@ -66250,21 +75467,11 @@ interface JQuery { /** * Fired after the data source has updated. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.dataSource to get a reference to the data source. - * Use ui.error to see if an error has occured during update. - * Use ui.result to get the result of the update operation. */ igPivotGrid(optionLiteral: 'option', optionName: "dataSourceUpdated"): DataSourceUpdatedEvent; /** * Fired after the data source has updated. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.dataSource to get a reference to the data source. - * Use ui.error to see if an error has occured during update. - * Use ui.result to get the result of the update operation. * * @optionValue New value to be set. */ @@ -66272,19 +75479,11 @@ interface JQuery { /** * Event fired after the headers have been rendered. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.grid to get a reference to the igGrid widget, which holds the headers. - * Use ui.table to get a reference to the headers table DOM element. */ igPivotGrid(optionLiteral: 'option', optionName: "pivotGridHeadersRendered"): PivotGridHeadersRenderedEvent; /** * Event fired after the headers have been rendered. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.grid to get a reference to the igGrid widget, which holds the headers. - * Use ui.table to get a reference to the headers table DOM element. * * @optionValue Define event handler function. */ @@ -66292,41 +75491,23 @@ interface JQuery { /** * Event fired after the whole grid widget has been rendered (including headers, footers, etc.). - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.grid to get reference to the igGrid widget, which represents the data. */ igPivotGrid(optionLiteral: 'option', optionName: "pivotGridRendered"): PivotGridRenderedEvent; /** * Event fired after the whole grid widget has been rendered (including headers, footers, etc.). - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.grid to get reference to the igGrid widget, which represents the data. * * @optionValue Define event handler function. */ igPivotGrid(optionLiteral: 'option', optionName: "pivotGridRendered", optionValue: PivotGridRenderedEvent): void; /** - * Fired before the expand of the tuple member. - * Function takes arguments evt and ui. Return false to cancel the expanding. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.dataSource to get a reference to the data source. - * Use ui.axisName to get the name of axis, which holds the member and the tuple. - * Use ui.tupleIndex to get the index of the tuple in the axis. - * Use ui.memberIndex to get the index of the member in the tuple. + * Fired before the expand of the tuple member. Return false to cancel the expanding. */ igPivotGrid(optionLiteral: 'option', optionName: "tupleMemberExpanding"): TupleMemberExpandingEvent; /** - * Fired before the expand of the tuple member. - * Function takes arguments evt and ui. Return false to cancel the expanding. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.dataSource to get a reference to the data source. - * Use ui.axisName to get the name of axis, which holds the member and the tuple. - * Use ui.tupleIndex to get the index of the tuple in the axis. - * Use ui.memberIndex to get the index of the member in the tuple. + * Fired before the expand of the tuple member. Return false to cancel the expanding. * * @optionValue New value to be set. */ @@ -66334,47 +75515,23 @@ interface JQuery { /** * Fired after the expand of the tuple member. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.dataSource to get a reference to the data source. - * Use ui.axisName to get the name of axis, which holds the member and the tuple. - * Use ui.tupleIndex to get the index of the tuple in the axis. - * Use ui.memberIndex to get the index of the member in the tuple. */ igPivotGrid(optionLiteral: 'option', optionName: "tupleMemberExpanded"): TupleMemberExpandedEvent; /** * Fired after the expand of the tuple member. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.dataSource to get a reference to the data source. - * Use ui.axisName to get the name of axis, which holds the member and the tuple. - * Use ui.tupleIndex to get the index of the tuple in the axis. - * Use ui.memberIndex to get the index of the member in the tuple. * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "tupleMemberExpanded", optionValue: TupleMemberExpandedEvent): void; /** - * Fired before the collapse of the tuple member. - * Function takes arguments evt and ui. Return false to cancel the collapsing. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.dataSource to get a reference to the data source. - * Use ui.axisName to get the name of axis, which holds the member and the tuple. - * Use ui.tupleIndex to get the index of the tuple in the axis. - * Use ui.memberIndex to get the index of the member in the tuple. + * Fired before the collapse of the tuple member. Return false to cancel the collapsing. */ igPivotGrid(optionLiteral: 'option', optionName: "tupleMemberCollapsing"): TupleMemberCollapsingEvent; /** - * Fired before the collapse of the tuple member. - * Function takes arguments evt and ui. Return false to cancel the collapsing. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.dataSource to get a reference to the data source. - * Use ui.axisName to get the name of axis, which holds the member and the tuple. - * Use ui.tupleIndex to get the index of the tuple in the axis. - * Use ui.memberIndex to get the index of the member in the tuple. + * Fired before the collapse of the tuple member. Return false to cancel the collapsing. * * @optionValue New value to be set. */ @@ -66382,41 +75539,23 @@ interface JQuery { /** * Fired after the collapse of the tuple member. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.dataSource to get a reference to the data source. - * Use ui.axisName to get the name of axis, which holds the member and the tuple. - * Use ui.tupleIndex to get the index of the tuple in the axis. - * Use ui.memberIndex to get the index of the member in the tuple. */ igPivotGrid(optionLiteral: 'option', optionName: "tupleMemberCollapsed"): TupleMemberCollapsedEvent; /** * Fired after the collapse of the tuple member. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.dataSource to get a reference to the data source. - * Use ui.axisName to get the name of axis, which holds the member and the tuple. - * Use ui.tupleIndex to get the index of the tuple in the axis. - * Use ui.memberIndex to get the index of the member in the tuple. * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "tupleMemberCollapsed", optionValue: TupleMemberCollapsedEvent): void; /** - * Fired before the sorting of the columns. - * Function takes arguments evt and ui. Return false to cancel the sorting. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.sortDirections to get an array of the tuple indices and sort directions that will be used. + * Fired before the sorting of the columns. Return false to cancel the sorting. */ igPivotGrid(optionLiteral: 'option', optionName: "sorting"): SortingEvent; /** - * Fired before the sorting of the columns. - * Function takes arguments evt and ui. Return false to cancel the sorting. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.sortDirections to get an array of the tuple indices and sort directions that will be used. + * Fired before the sorting of the columns. Return false to cancel the sorting. * * @optionValue New value to be set. */ @@ -66424,37 +75563,23 @@ interface JQuery { /** * Fired after the sorting of the columns. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.sortDirections to get an array of the tuple indices and sort directions that were passed to the table view. - * Use ui.appliedSortDirections to get an array of the tuple indices and sort directions that were actually applied to the table view. */ igPivotGrid(optionLiteral: 'option', optionName: "sorted"): SortedEvent; /** * Fired after the sorting of the columns. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.sortDirections to get an array of the tuple indices and sort directions that were passed to the table view. - * Use ui.appliedSortDirections to get an array of the tuple indices and sort directions that were actually applied to the table view. * * @optionValue New value to be set. */ igPivotGrid(optionLiteral: 'option', optionName: "sorted", optionValue: SortedEvent): void; /** - * Fired before the sorting of the headers. - * Function takes arguments evt and ui. Return false to cancel the sorting. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.levelSortDirections to get an array of the level names and sort directions that will be used. + * Fired before the sorting of the headers. Return false to cancel the sorting. */ igPivotGrid(optionLiteral: 'option', optionName: "headersSorting"): HeadersSortingEvent; /** - * Fired before the sorting of the headers. - * Function takes arguments evt and ui. Return false to cancel the sorting. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.levelSortDirections to get an array of the level names and sort directions that will be used. + * Fired before the sorting of the headers. Return false to cancel the sorting. * * @optionValue New value to be set. */ @@ -66462,19 +75587,11 @@ interface JQuery { /** * Fired after the sorting of the headers. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.levelSortDirections to get an array of the level names and sort directions that were used. - * Use ui.appliedLevelSortDirections to get an array of the level names and sort directions that were actually applied to the table view. */ igPivotGrid(optionLiteral: 'option', optionName: "headersSorted"): HeadersSortedEvent; /** * Fired after the sorting of the headers. - * Function takes arguments evt and ui. - * Use ui.owner to get a reference to the pivot grid. - * Use ui.levelSortDirections to get an array of the level names and sort directions that were used. - * Use ui.appliedLevelSortDirections to get an array of the level names and sort directions that were actually applied to the table view. * * @optionValue New value to be set. */ @@ -66482,21 +75599,11 @@ interface JQuery { /** * Fired on drag start. Return false to cancel the dragging. - * Use ui.metadatato get a reference to the data. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.originalPosition to get a reference to the original position of the draggable element. - * Use ui.position to get a reference to the current position of the draggable element. */ igPivotGrid(optionLiteral: 'option', optionName: "dragStart"): DragStartEvent; /** * Fired on drag start. Return false to cancel the dragging. - * Use ui.metadatato get a reference to the data. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.originalPosition to get a reference to the original position of the draggable element. - * Use ui.position to get a reference to the current position of the draggable element. * * @optionValue New value to be set. */ @@ -66504,21 +75611,11 @@ interface JQuery { /** * Fired on drag. Return false to cancel the drag. - * Use ui.metadatato get a reference to the data. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.originalPosition to get a reference to the original position of the draggable element. - * Use ui.position to get a reference to the current position of the draggable element. */ igPivotGrid(optionLiteral: 'option', optionName: "drag"): DragEvent; /** * Fired on drag. Return false to cancel the drag. - * Use ui.metadatato get a reference to the data. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.originalPosition to get a reference to the original position of the draggable element. - * Use ui.position to get a reference to the current position of the draggable element. * * @optionValue New value to be set. */ @@ -66526,19 +75623,11 @@ interface JQuery { /** * Fired on drag stop. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.originalPosition to get a reference to the original position of the draggable element. - * Use ui.position to get a reference to the current position of the draggable element. */ igPivotGrid(optionLiteral: 'option', optionName: "dragStop"): DragStopEvent; /** * Fired on drag stop. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.originalPosition to get a reference to the original position of the draggable element. - * Use ui.position to get a reference to the current position of the draggable element. * * @optionValue New value to be set. */ @@ -66546,25 +75635,11 @@ interface JQuery { /** * Fired before a metadata item drop. Return false to cancel the drop. - * Use ui.targetElement for a reference to the drop target. - * Use ui.draggedElement for a reference to the metadata item element. - * Use ui.metadatato get a reference to the data. - * Use ui.metadataIndex to get the index at which the metadata will be inserted. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.position to get a reference to the current position of the draggable element. */ igPivotGrid(optionLiteral: 'option', optionName: "metadataDropping"): MetadataDroppingEvent; /** * Fired before a metadata item drop. Return false to cancel the drop. - * Use ui.targetElement for a reference to the drop target. - * Use ui.draggedElement for a reference to the metadata item element. - * Use ui.metadatato get a reference to the data. - * Use ui.metadataIndex to get the index at which the metadata will be inserted. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.position to get a reference to the current position of the draggable element. * * @optionValue New value to be set. */ @@ -66572,25 +75647,11 @@ interface JQuery { /** * Fired after a metadata item drop. - * Use ui.targetElement for a reference to the drop target. - * Use ui.draggedElement for a reference to the dragged element. - * Use ui.metadatato get a reference to the data. - * Use ui.metadataIndex to get the index at which the metadata is inserted. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.position to get a reference to the current position of the draggable element. */ igPivotGrid(optionLiteral: 'option', optionName: "metadataDropped"): MetadataDroppedEvent; /** * Fired after a metadata item drop. - * Use ui.targetElement for a reference to the drop target. - * Use ui.draggedElement for a reference to the dragged element. - * Use ui.metadatato get a reference to the data. - * Use ui.metadataIndex to get the index at which the metadata is inserted. - * Use ui.helper to get a reference to the helper. - * Use ui.offset to get a reference to the offset. - * Use ui.position to get a reference to the current position of the draggable element. * * @optionValue New value to be set. */ @@ -66598,15 +75659,11 @@ interface JQuery { /** * Fired before a metadata item is removed when the user clicks the close icon. Return false to cancel the removing. - * Use ui.targetElement for a reference to the dragged element. - * Use ui.metadatato get a reference to the data. */ igPivotGrid(optionLiteral: 'option', optionName: "metadataRemoving"): MetadataRemovingEvent; /** * Fired before a metadata item is removed when the user clicks the close icon. Return false to cancel the removing. - * Use ui.targetElement for a reference to the dragged element. - * Use ui.metadatato get a reference to the data. * * @optionValue New value to be set. */ @@ -66614,13 +75671,11 @@ interface JQuery { /** * Fired after a metadata item is removed when the user clicks the close icon. - * Use ui.metadatato get a reference to the data. */ igPivotGrid(optionLiteral: 'option', optionName: "metadataRemoved"): MetadataRemovedEvent; /** * Fired after a metadata item is removed when the user clicks the close icon. - * Use ui.metadatato get a reference to the data. * * @optionValue New value to be set. */ @@ -66628,13 +75683,11 @@ interface JQuery { /** * Fired before the filter members drop down opens. Return false to cancel the opening. - * Use ui.hierarchy for a reference to the hierarchy. */ igPivotGrid(optionLiteral: 'option', optionName: "filterDropDownOpening"): FilterDropDownOpeningEvent; /** * Fired before the filter members drop down opens. Return false to cancel the opening. - * Use ui.hierarchy for a reference to the hierarchy. * * @optionValue New value to be set. */ @@ -66642,15 +75695,11 @@ interface JQuery { /** * Fired after the filter members drop down opens. - * Use ui.hierarchy for a reference to the hierarchy. - * Use ui.dropDownElement for a reference to the drop down. */ igPivotGrid(optionLiteral: 'option', optionName: "filterDropDownOpened"): FilterDropDownOpenedEvent; /** * Fired after the filter members drop down opens. - * Use ui.hierarchy for a reference to the hierarchy. - * Use ui.dropDownElement for a reference to the drop down. * * @optionValue New value to be set. */ @@ -66658,17 +75707,11 @@ interface JQuery { /** * Fired after the filter members are loaded. - * Use ui.parent to get the parent node or the igTree instance in the initial load. - * Use ui.rootFilterMembers for a collection with the root filter members . - * Use ui.filterMembers for a collection with the newly loaded filter members. */ igPivotGrid(optionLiteral: 'option', optionName: "filterMembersLoaded"): FilterMembersLoadedEvent; /** * Fired after the filter members are loaded. - * Use ui.parent to get the parent node or the igTree instance in the initial load. - * Use ui.rootFilterMembers for a collection with the root filter members . - * Use ui.filterMembers for a collection with the newly loaded filter members. * * @optionValue New value to be set. */ @@ -66676,17 +75719,11 @@ interface JQuery { /** * Fired after the OK button in the filter members drop down is clicked. Return false to cancel the applying of the filters. - * Use ui.hierarchy for a reference to the hierarchy. - * Use ui.filterMembers for a collection with the selected filter members. If all filter members are selected the collection will be empty. - * Use ui.dropDownElement for a reference to the drop down. */ igPivotGrid(optionLiteral: 'option', optionName: "filterDropDownOk"): FilterDropDownOkEvent; /** * Fired after the OK button in the filter members drop down is clicked. Return false to cancel the applying of the filters. - * Use ui.hierarchy for a reference to the hierarchy. - * Use ui.filterMembers for a collection with the selected filter members. If all filter members are selected the collection will be empty. - * Use ui.dropDownElement for a reference to the drop down. * * @optionValue New value to be set. */ @@ -66694,15 +75731,11 @@ interface JQuery { /** * Fired before the filter members drop down closes. Return false to cancel the closing. - * Use ui.hierarchy for a reference to the hierarchy. - * Use ui.dropDownElement for a reference to the drop down. */ igPivotGrid(optionLiteral: 'option', optionName: "filterDropDownClosing"): FilterDropDownClosingEvent; /** * Fired before the filter members drop down closes. Return false to cancel the closing. - * Use ui.hierarchy for a reference to the hierarchy. - * Use ui.dropDownElement for a reference to the drop down. * * @optionValue New value to be set. */ @@ -66710,13 +75743,11 @@ interface JQuery { /** * Fired after the filter members drop down closes. - * Use ui.hierarchy for a reference to the hierarchy. */ igPivotGrid(optionLiteral: 'option', optionName: "filterDropDownClosed"): FilterDropDownClosedEvent; /** * Fired after the filter members drop down closes. - * Use ui.hierarchy for a reference to the hierarchy. * * @optionValue New value to be set. */ @@ -67092,6 +76123,7 @@ interface IgPivotViewPivotGridOptionsLevelSortDirection { /** * optional="true" Specifies the sort direction. If no direction is specified,the level is going to be sorted in the direction specified by the firstLevelSortDirection option. + * */ sortDirection?: any; @@ -67161,7 +76193,8 @@ interface IgPivotViewPivotGridOptionsDragAndDropSettings { appendTo?: any; /** - * Specifies the containment for the drag helper. The area inside of which the helper is contained would be scrollable while dragging. + * Specifies the containment for the drag helper. The area inside of which thehelper is contained would be scrollable while dragging. + * */ containment?: boolean|string|Array; @@ -67323,7 +76356,8 @@ interface IgPivotViewDataSelectorOptionsDragAndDropSettings { appendTo?: any; /** - * Specifies the containment for the drag helper. The area inside of which the helper is contained would be scrollable while dragging. + * Specifies the containment for the drag helper. The area inside of which thehelper is contained would be scrollable while dragging. + * */ containment?: boolean|string|Array; @@ -67434,40 +76468,81 @@ interface IgPivotViewDataSelectorPanel { } interface IgPivotView { + /** + * + * + * Valid values: + * "string" The widget width can be set in pixels (px) and percentage (%). + * "number" The widget width can be set as a number. + * "null" will stretch to fit the parent, if no other widths are defined. + */ width?: string|number; + + /** + * + * + * Valid values: + * "string" The widget height can be set in pixels (px) and percentage (%). + * "number" The widget height can be set as a number. + * "null" will stretch vertically to fit the parent, if no other heights are defined. + */ height?: string|number; /** * An instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + * */ dataSource?: any; /** * An object that will be used to create an instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. + * */ dataSourceOptions?: IgPivotViewDataSourceOptions; /** * Configuration settings that will be assigned to the igPivotGrid widget. + * */ pivotGridOptions?: IgPivotViewPivotGridOptions; /** * Configuration settings that will be assigned to the igPivotDataSelector widget. + * */ dataSelectorOptions?: IgPivotViewDataSelectorOptions; /** * Configuration settings for the panel containing the igPivotGrid. + * */ pivotGridPanel?: IgPivotViewPivotGridPanel; /** * Configuration settings for the panel containing the igPivotDataSelector. + * */ dataSelectorPanel?: IgPivotViewDataSelectorPanel; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Option for igPivotView */ @@ -67496,6 +76571,24 @@ interface IgPivotViewMethods { * 3. Unbind all events that were bound. */ destroy(): void; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igPivotView"): IgPivotViewMethods; @@ -67506,23 +76599,48 @@ interface JQuery { igPivotView(methodName: "dataSelector"): Object; igPivotView(methodName: "splitter"): Object; igPivotView(methodName: "destroy"): void; + igPivotView(methodName: "changeLocale", $container: Object): void; + igPivotView(methodName: "changeGlobalLanguage"): void; + igPivotView(methodName: "changeGlobalRegional"): void; + + /** + * * + */ igPivotView(optionLiteral: 'option', optionName: "width"): string|number; + /** + * * + * + * @optionValue New value to be set. + */ + igPivotView(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + /** + * * + */ + igPivotView(optionLiteral: 'option', optionName: "height"): string|number; + /** + * * + * + * @optionValue New value to be set. + */ + igPivotView(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; /** * An instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. + * */ igPivotView(optionLiteral: 'option', optionName: "dataSource"): any; /** * An instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. * + * * @optionValue New value to be set. */ igPivotView(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; @@ -67530,6 +76648,7 @@ interface JQuery { /** * An object that will be used to create an instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. + * */ igPivotView(optionLiteral: 'option', optionName: "dataSourceOptions"): IgPivotViewDataSourceOptions; @@ -67537,57 +76656,110 @@ interface JQuery { * An object that will be used to create an instance of $.ig.OlapXmlaDataSource or $.ig.OlapFlatDataSource. * The provided value must contain an object with settings for one of the data source types - xmlaOptions or flatDataOptions. * + * * @optionValue New value to be set. */ igPivotView(optionLiteral: 'option', optionName: "dataSourceOptions", optionValue: IgPivotViewDataSourceOptions): void; /** * Configuration settings that will be assigned to the igPivotGrid widget. + * */ igPivotView(optionLiteral: 'option', optionName: "pivotGridOptions"): IgPivotViewPivotGridOptions; /** * Configuration settings that will be assigned to the igPivotGrid widget. * + * * @optionValue New value to be set. */ igPivotView(optionLiteral: 'option', optionName: "pivotGridOptions", optionValue: IgPivotViewPivotGridOptions): void; /** * Configuration settings that will be assigned to the igPivotDataSelector widget. + * */ igPivotView(optionLiteral: 'option', optionName: "dataSelectorOptions"): IgPivotViewDataSelectorOptions; /** * Configuration settings that will be assigned to the igPivotDataSelector widget. * + * * @optionValue New value to be set. */ igPivotView(optionLiteral: 'option', optionName: "dataSelectorOptions", optionValue: IgPivotViewDataSelectorOptions): void; /** * Configuration settings for the panel containing the igPivotGrid. + * */ igPivotView(optionLiteral: 'option', optionName: "pivotGridPanel"): IgPivotViewPivotGridPanel; /** * Configuration settings for the panel containing the igPivotGrid. * + * * @optionValue New value to be set. */ igPivotView(optionLiteral: 'option', optionName: "pivotGridPanel", optionValue: IgPivotViewPivotGridPanel): void; /** * Configuration settings for the panel containing the igPivotDataSelector. + * */ igPivotView(optionLiteral: 'option', optionName: "dataSelectorPanel"): IgPivotViewDataSelectorPanel; /** * Configuration settings for the panel containing the igPivotDataSelector. * + * * @optionValue New value to be set. */ igPivotView(optionLiteral: 'option', optionName: "dataSelectorPanel", optionValue: IgPivotViewDataSelectorPanel): void; + + /** + * Set/Get the locale setting for the widget. + * + */ + igPivotView(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igPivotView(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igPivotView(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igPivotView(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igPivotView(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igPivotView(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; igPivotView(options: IgPivotView): JQuery; igPivotView(optionLiteral: 'option', optionName: string): any; igPivotView(optionLiteral: 'option', options: IgPivotView): JQuery; @@ -67597,12 +76769,14 @@ interface JQuery { interface IgPopover { /** * Controls whether the popover will close on blur or not + * */ closeOnBlur?: boolean; /** * controls the direction in which the control shows relative to the target element * + * * Valid values: * "auto" lets the control show on the side where enough space is available with the priority specified by the [directionPriority](ui.%%WidgetNameLowered%%#options:directionPriority) property * "left" shows popover on the left side of the target element @@ -67615,12 +76789,14 @@ interface IgPopover { /** * Controls the priority in which the control searches for space to show relative to the target element. * This property has effect only if the [direction](ui.%%WidgetNameLowered%%#options:direction) property value is "auto" or unset. + * */ directionPriority?: any[]; /** * controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area * + * * Valid values: * "auto" lets the control choose a position depending on available space with the following priority balanced > end > start * "balanced" the popover is positioned at the middle of the target element @@ -67631,37 +76807,44 @@ interface IgPopover { /** * defines width for the popover. leave null for auto. + * */ width?: number|string; /** * defines height for the popover. leave null for auto + * */ height?: number|string; /** * defines width the popover won't go under the value even if no specific one is set. + * */ minWidth?: number|string; /** * defines width the popover won't exceed even if no specific one is set. + * */ maxWidth?: number|string; /** * defines height the popover won't exceed even if no specific one is set. + * */ maxHeight?: number|string; /** * Sets the time popover fades in and out when showing/hiding + * */ animationDuration?: number; /** * sets the content for the popover container. If left null the content will be get from the target. * + * * Valid values: * "string" String content of the popover container * "function" Function which is a callback that should return the content. Use the 'this' value to access the target DOM element. @@ -67670,17 +76853,20 @@ interface IgPopover { /** * Selectors indicating which items should show popovers. The predefined value is [title]. Customize if you're using something other then the title attribute for the popover content, or if you need a different selector for event delegation. When changing this option, you likely need to also change the contentTemplate option + * */ selectors?: string; /** * Sets the content for the popover header + * */ headerTemplate?: IgPopoverHeaderTemplate; /** * sets the event on which the popover will be shown. Predefined values are "mouseenter", "click" and "focus" * + * * Valid values: * "mouseenter" the popover is shown on mouse enter in the target element * "click" the popover is shown on click on the target element @@ -67690,18 +76876,38 @@ interface IgPopover { /** * Sets the containment for the popover. Accepts a jQuery object + * */ containment?: any; /** * Controls where the popover DOM should be attached to. * + * * Valid values: * "string" A valid jQuery selector for the element * "object" A reference to the parent jQuery object */ appendTo?: string|Object; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event fired before popover is shown. */ @@ -67784,6 +76990,24 @@ interface IgPopoverMethods { * @param pos The popover coordinates in pixels. */ setCoordinates(pos: Object): void; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igPopover"): IgPopoverMethods; @@ -67800,21 +77024,27 @@ interface JQuery { igPopover(methodName: "target"): Object; igPopover(methodName: "getCoordinates"): Object; igPopover(methodName: "setCoordinates", pos: Object): void; + igPopover(methodName: "changeLocale", $container: Object): void; + igPopover(methodName: "changeGlobalLanguage"): void; + igPopover(methodName: "changeGlobalRegional"): void; /** * Controls whether the popover will close on blur or not + * */ igPopover(optionLiteral: 'option', optionName: "closeOnBlur"): boolean; /** * Controls whether the popover will close on blur or not * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "closeOnBlur", optionValue: boolean): void; /** * Controls the direction in which the control shows relative to the target element + * */ igPopover(optionLiteral: 'option', optionName: "direction"): string; @@ -67822,6 +77052,7 @@ interface JQuery { /** * Controls the direction in which the control shows relative to the target element * + * * @optionValue New value to be set. */ @@ -67830,6 +77061,7 @@ interface JQuery { /** * Controls the priority in which the control searches for space to show relative to the target element. * This property has effect only if the [direction](ui.%%WidgetNameLowered%%#options:direction) property value is "auto" or unset. + * */ igPopover(optionLiteral: 'option', optionName: "directionPriority"): any[]; @@ -67837,12 +77069,14 @@ interface JQuery { * Controls the priority in which the control searches for space to show relative to the target element. * This property has effect only if the [direction](ui.%%WidgetNameLowered%%#options:direction) property value is "auto" or unset. * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "directionPriority", optionValue: any[]): void; /** * Controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area + * */ igPopover(optionLiteral: 'option', optionName: "position"): string; @@ -67850,6 +77084,7 @@ interface JQuery { /** * Controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area * + * * @optionValue New value to be set. */ @@ -67857,6 +77092,7 @@ interface JQuery { /** * Defines width for the popover. leave null for auto. + * */ igPopover(optionLiteral: 'option', optionName: "width"): number|string; @@ -67864,6 +77100,7 @@ interface JQuery { /** * Defines width for the popover. leave null for auto. * + * * @optionValue New value to be set. */ @@ -67871,6 +77108,7 @@ interface JQuery { /** * Defines height for the popover. leave null for auto + * */ igPopover(optionLiteral: 'option', optionName: "height"): number|string; @@ -67878,6 +77116,7 @@ interface JQuery { /** * Defines height for the popover. leave null for auto * + * * @optionValue New value to be set. */ @@ -67885,6 +77124,7 @@ interface JQuery { /** * Defines width the popover won't go under the value even if no specific one is set. + * */ igPopover(optionLiteral: 'option', optionName: "minWidth"): number|string; @@ -67892,6 +77132,7 @@ interface JQuery { /** * Defines width the popover won't go under the value even if no specific one is set. * + * * @optionValue New value to be set. */ @@ -67899,6 +77140,7 @@ interface JQuery { /** * Defines width the popover won't exceed even if no specific one is set. + * */ igPopover(optionLiteral: 'option', optionName: "maxWidth"): number|string; @@ -67906,6 +77148,7 @@ interface JQuery { /** * Defines width the popover won't exceed even if no specific one is set. * + * * @optionValue New value to be set. */ @@ -67913,6 +77156,7 @@ interface JQuery { /** * Defines height the popover won't exceed even if no specific one is set. + * */ igPopover(optionLiteral: 'option', optionName: "maxHeight"): number|string; @@ -67920,6 +77164,7 @@ interface JQuery { /** * Defines height the popover won't exceed even if no specific one is set. * + * * @optionValue New value to be set. */ @@ -67927,18 +77172,21 @@ interface JQuery { /** * The time popover fades in and out when showing/hiding + * */ igPopover(optionLiteral: 'option', optionName: "animationDuration"): number; /** * Sets the time popover fades in and out when showing/hiding * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "animationDuration", optionValue: number): void; /** * The content for the popover container. If left null the content will be get from the target. + * */ igPopover(optionLiteral: 'option', optionName: "contentTemplate"): string|Function; @@ -67946,6 +77194,7 @@ interface JQuery { /** * Sets the content for the popover container. If left null the content will be get from the target. * + * * @optionValue New value to be set. */ @@ -67953,30 +77202,35 @@ interface JQuery { /** * Selectors indicating which items should show popovers. The predefined value is [title]. Customize if you're using something other then the title attribute for the popover content, or if you need a different selector for event delegation. When changing this option, you likely need to also change the contentTemplate option + * */ igPopover(optionLiteral: 'option', optionName: "selectors"): string; /** * Selectors indicating which items should show popovers. The predefined value is [title]. Customize if you're using something other then the title attribute for the popover content, or if you need a different selector for event delegation. When changing this option, you likely need to also change the contentTemplate option * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "selectors", optionValue: string): void; /** * The content for the popover header + * */ igPopover(optionLiteral: 'option', optionName: "headerTemplate"): IgPopoverHeaderTemplate; /** * Sets the content for the popover header * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "headerTemplate", optionValue: IgPopoverHeaderTemplate): void; /** * The event on which the popover will be shown. Predefined values are "mouseenter", "click" and "focus" + * */ igPopover(optionLiteral: 'option', optionName: "showOn"): string; @@ -67984,6 +77238,7 @@ interface JQuery { /** * Sets the event on which the popover will be shown. Predefined values are "mouseenter", "click" and "focus" * + * * @optionValue New value to be set. */ @@ -67991,18 +77246,21 @@ interface JQuery { /** * The containment for the popover. Accepts a jQuery object + * */ igPopover(optionLiteral: 'option', optionName: "containment"): any; /** * Sets the containment for the popover. Accepts a jQuery object * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "containment", optionValue: any): void; /** * Controls where the popover DOM should be attached to. + * */ igPopover(optionLiteral: 'option', optionName: "appendTo"): string|Object; @@ -68010,11 +77268,56 @@ interface JQuery { /** * Controls where the popover DOM should be attached to. * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "appendTo", optionValue: string|Object): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igPopover(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igPopover(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igPopover(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igPopover(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igPopover(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igPopover(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event fired before popover is shown. */ @@ -68290,6 +77593,24 @@ interface IgQRCodeBarcode { */ applicationIndicator?: string; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Occurs when an error has happened. * Function takes first argument evt and second argument ui. @@ -68331,6 +77652,24 @@ interface IgQRCodeBarcodeMethods { * Re-polls the css styles for the widget. Use this method when the css styles have been modified. */ styleUpdated(): void; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igQRCodeBarcode"): IgQRCodeBarcodeMethods; @@ -68341,6 +77680,9 @@ interface JQuery { igQRCodeBarcode(methodName: "flush"): void; igQRCodeBarcode(methodName: "destroy"): void; igQRCodeBarcode(methodName: "styleUpdated"): void; + igQRCodeBarcode(methodName: "changeLocale", $container: Object): void; + igQRCodeBarcode(methodName: "changeGlobalLanguage"): void; + igQRCodeBarcode(methodName: "changeGlobalRegional"): void; /** * The width of the barcode. It can be set as a number in pixels, string (px) or percentage (%). @@ -68632,6 +77974,50 @@ interface JQuery { */ igQRCodeBarcode(optionLiteral: 'option', optionName: "applicationIndicator", optionValue: string): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igQRCodeBarcode(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igQRCodeBarcode(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Occurs when an error has happened. * Function takes first argument evt and second argument ui. @@ -69127,6 +78513,24 @@ interface IgRadialGauge { */ pixelScalingRatio?: number; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event which is raised when a label of the gauge is formatted. * Function takes first argument null and second argument ui. @@ -69177,16 +78581,22 @@ interface IgRadialGaugeMethods { /** * Adds a new range to the radial gauge. + * + * @param value */ addRange(value: Object): void; /** * Removes a specified range. + * + * @param value */ removeRange(value: Object): void; /** * Updates the range. + * + * @param value */ updateRange(value: Object): void; @@ -69197,26 +78607,39 @@ interface IgRadialGaugeMethods { /** * Scales a value on the gauge's main scale to an angle around the center point of the gauge, in radians. + * + * @param value */ scaleValue(value: Object): void; /** * Unscales a value from an angle in radians to the represented value along the main scale of the gauge. + * + * @param value */ unscaleValue(value: Object): void; /** * Gets the value for the main scale of the gauge for a given point within the bounds of the gauge. + * + * @param x + * @param y */ getValueForPoint(x: Object, y: Object): number; /** * Gets the point on the gauge for a given scale value and extent. + * + * @param value + * @param extent */ getPointForValue(value: Object, extent: Object): void; /** * Returns true if the main gauge needle bounding box contains the point provided, otherwise false. + * + * @param x + * @param y */ needleContainsPoint(x: Object, y: Object): void; @@ -69239,6 +78662,24 @@ interface IgRadialGaugeMethods { * Returns true if the style was updated for the radial gauge. */ styleUpdated(): void; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igRadialGauge"): IgRadialGaugeMethods; @@ -69259,6 +78700,9 @@ interface JQuery { igRadialGauge(methodName: "flush"): void; igRadialGauge(methodName: "destroy"): void; igRadialGauge(methodName: "styleUpdated"): void; + igRadialGauge(methodName: "changeLocale", $container: Object): void; + igRadialGauge(methodName: "changeGlobalLanguage"): void; + igRadialGauge(methodName: "changeGlobalRegional"): void; /** * The width of the gauge. It can be set as a number in pixels, string (px) or percentage (%). @@ -70112,6 +79556,50 @@ interface JQuery { */ igRadialGauge(optionLiteral: 'option', optionName: "pixelScalingRatio", optionValue: number): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igRadialGauge(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igRadialGauge(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igRadialGauge(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igRadialGauge(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igRadialGauge(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event which is raised when a label of the gauge is formatted. * Function takes first argument null and second argument ui. @@ -70201,6 +79689,7 @@ interface IgRadialMenuItem { /** * Gets or sets a value indicating what type of item is being provided. * + * * Valid values: * "button" * "coloritem" @@ -70666,6 +80155,24 @@ interface IgRadialMenu { wedgePaddingInDegrees?: number; pixelScalingRatio?: number; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Invoked when the IsOpen property is changed to false. * Function takes a first argument ui. @@ -70714,6 +80221,24 @@ interface IgRadialMenuMethods { * Notify the radial menu that style information used for rendering the menu may have been updated. */ styleUpdated(): void; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igRadialMenu"): IgRadialMenuMethods; @@ -70725,6 +80250,9 @@ interface JQuery { igRadialMenu(methodName: "flush"): void; igRadialMenu(methodName: "destroy"): void; igRadialMenu(methodName: "styleUpdated"): void; + igRadialMenu(methodName: "changeLocale", $container: Object): void; + igRadialMenu(methodName: "changeGlobalLanguage"): void; + igRadialMenu(methodName: "changeGlobalRegional"): void; /** * Gets the items in the menu. @@ -71040,6 +80568,50 @@ interface JQuery { igRadialMenu(optionLiteral: 'option', optionName: "pixelScalingRatio"): number; igRadialMenu(optionLiteral: 'option', optionName: "pixelScalingRatio", optionValue: number): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igRadialMenu(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igRadialMenu(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igRadialMenu(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igRadialMenu(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igRadialMenu(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Invoked when the IsOpen property is changed to false. * Function takes a first argument ui. @@ -71083,14 +80655,14 @@ interface HoverChangeEvent { interface HoverChangeEventUIParam { /** - * Used to get new value. + * Gets the new hovered value. */ - value?: any; + value?: number; /** - * Used to get old value. + * Gets the old value. */ - oldValue?: any; + oldValue?: number; } interface ValueChangeEvent { @@ -71099,45 +80671,51 @@ interface ValueChangeEvent { interface ValueChangeEventUIParam { /** - * Used to get new value. + * Gets the new selected value. */ - value?: any; + value?: number; /** - * Used to get old value. + * Gets the previously selected value. */ - oldValue?: any; + oldValue?: number; } interface IgRating { /** * Gets a vertical or horizontal orientation for the votes. * Change of that option is not supported after igRating was created. + * */ vertical?: boolean; /** * Gets/Sets value (selected votes or percent). If the value is of type string, it should be suitable for parsing to number. According to [valueAsPercent](ui.igrating#options:valueAsPercent) options the value is used as number of selected votes or as a percent of the votes. + * */ value?: number|string; /** * Gets/Sets value-hover (hovered votes or percent of hovered votes). The default is same as value. If the value is of type string, it should be suitable for parsing to number. According to [valueAsPercent](ui.igrating#options:valueAsPercent) options the valueHover is used as number of hovered votes or as a percent of the hovered votes. + * */ valueHover?: number|string; /** * Gets/Sets number of votes. + * */ voteCount?: number; /** * Gets/Sets custom width of a vote in pixels. In case of 0 the run time style value is used. + * */ voteWidth?: number; /** * Gets/Sets custom height of a vote in pixels. In case of 0 the run time style value is used. + * */ voteHeight?: number; @@ -71145,6 +80723,7 @@ interface IgRating { * Gets the direction of selected and hovered votes. Change of that option is not supported after igRating was created. * Value true: from left to right or from top to bottom. * Value false: from right to left or from bottom to left. + * */ swapDirection?: boolean; @@ -71152,6 +80731,7 @@ interface IgRating { * Gets/Sets percent or vote number to measure value and value-hover. * Value true: value is measured as percent (from 0 to 1). * Value false: value is measured in number of voted (from 0 to voteCount) + * */ valueAsPercent?: boolean; @@ -71159,12 +80739,14 @@ interface IgRating { * Gets if igRating can have focus. Change of that option is not supported after igRating was created. * Value true: can get focus and process key events. * Value false: cannot get focus. + * */ focusable?: boolean; /** * Gets/Sets precision. Precision of value and valueHover. * + * * Valid values: * "exact" Value corresponds location of mouse. * "half" Value is rounded to the half of vote. @@ -71177,6 +80759,7 @@ interface IgRating { * It has effect only when precision is set to "half" or "whole". * If user clicks between edge of the first vote and (sizeOfVote * precisionZeroVote), then value is set to 0. * Same is applied for mouseover as well. + * */ precisionZeroVote?: number; @@ -71187,6 +80770,7 @@ interface IgRating { * If precision is "whole" or "half" and roundedDecimalPlaces is set in range of 0..2, then 3 is used. * If valueAsPercent is enabled and roundedDecimalPlaces is set to 0, then 1 is used. * If it is larger than 15, then 15 is used. + * */ roundedDecimalPlaces?: number; @@ -71194,12 +80778,14 @@ interface IgRating { * Gets/Sets selector for css classes. * That option allows replacing all default css styles by custom values. * Application should provide css classes for all members defined in the css options with "theme" selector. + * */ theme?: string; /** * Gets/Sets object which contains options supported by igValidator. * Note that for onblur validation depends on the [focusable](ui.igrating#options:focusable) option. + * */ validatorOptions?: any; @@ -71215,26 +80801,37 @@ interface IgRating { * will customize only second vote with [normalCss](ui.igrating#theming:ui-igrating ui-state-default ui-widget-content) for normal state, [hoverCss](ui.igrating#theming:ui-igrating-hover ui-state-hover) for hover state and [selectedCss](ui.igrating#theming:ui-igrating-voteselected) for selected state. * [[null, 's1', 'h1'], [null, 's2', 'h2'], [null, 's3', 'h3']] * will customize selected and hover states for first 3 votes with classes h# and s#. + * */ cssVotes?: any; /** - * Event which is raised before hover value is changed. - * If application returns false, then action is canceled and hover value stays unchanged. + * Set/Get the locale setting for the widget. * - * Function takes arguments evt and ui. - * Use ui.value to get new value. - * Use ui.oldValue to get old value. + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + + /** + * Fired before hover value is changed. + * If the application returns false, then the action is canceled and the value remains unchanged. */ hoverChange?: HoverChangeEvent; /** - * Event which is raised before (selected) value is changed. - * If application returns false, then action is canceled and value stays unchanged. - * - * Function takes arguments evt and ui. - * Use ui.value to get new value. - * Use ui.oldValue to get old value. + * Fired before (selected) value is changed. + * If the application returns false, then the action is canceled and the value remains unchanged. */ valueChange?: ValueChangeEvent; @@ -71286,6 +80883,24 @@ interface IgRatingMethods { * Destroys igRating widget. */ destroy(): Object; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igRating"): IgRatingMethods; @@ -71299,10 +80914,14 @@ interface JQuery { igRating(methodName: "hasFocus"): boolean; igRating(methodName: "focus"): Object; igRating(methodName: "destroy"): Object; + igRating(methodName: "changeLocale", $container: Object): void; + igRating(methodName: "changeGlobalLanguage"): void; + igRating(methodName: "changeGlobalRegional"): void; /** * Gets a vertical or horizontal orientation for the votes. * Change of that option is not supported after igRating was created. + * */ igRating(optionLiteral: 'option', optionName: "vertical"): boolean; @@ -71310,12 +80929,14 @@ interface JQuery { * A vertical or horizontal orientation for the votes. * Change of that option is not supported after igRating was created. * + * * @optionValue New value to be set. */ igRating(optionLiteral: 'option', optionName: "vertical", optionValue: boolean): void; /** * Gets/Sets value (selected votes or percent). If the value is of type string, it should be suitable for parsing to number. According to [valueAsPercent](ui.igrating#options:valueAsPercent) options the value is used as number of selected votes or as a percent of the votes. + * */ igRating(optionLiteral: 'option', optionName: "value"): number|string; @@ -71323,6 +80944,7 @@ interface JQuery { /** * /Sets value (selected votes or percent). If the value is of type string, it should be suitable for parsing to number. According to [valueAsPercent](ui.igrating#options:valueAsPercent) options the value is used as number of selected votes or as a percent of the votes. * + * * @optionValue New value to be set. */ @@ -71330,6 +80952,7 @@ interface JQuery { /** * Gets/Sets value-hover (hovered votes or percent of hovered votes). The default is same as value. If the value is of type string, it should be suitable for parsing to number. According to [valueAsPercent](ui.igrating#options:valueAsPercent) options the valueHover is used as number of hovered votes or as a percent of the hovered votes. + * */ igRating(optionLiteral: 'option', optionName: "valueHover"): number|string; @@ -71337,6 +80960,7 @@ interface JQuery { /** * /Sets value-hover (hovered votes or percent of hovered votes). The default is same as value. If the value is of type string, it should be suitable for parsing to number. According to [valueAsPercent](ui.igrating#options:valueAsPercent) options the valueHover is used as number of hovered votes or as a percent of the hovered votes. * + * * @optionValue New value to be set. */ @@ -71344,36 +80968,42 @@ interface JQuery { /** * Gets/Sets number of votes. + * */ igRating(optionLiteral: 'option', optionName: "voteCount"): number; /** * /Sets number of votes. * + * * @optionValue New value to be set. */ igRating(optionLiteral: 'option', optionName: "voteCount", optionValue: number): void; /** * Gets/Sets custom width of a vote in pixels. In case of 0 the run time style value is used. + * */ igRating(optionLiteral: 'option', optionName: "voteWidth"): number; /** * /Sets custom width of a vote in pixels. In case of 0 the run time style value is used. * + * * @optionValue New value to be set. */ igRating(optionLiteral: 'option', optionName: "voteWidth", optionValue: number): void; /** * Gets/Sets custom height of a vote in pixels. In case of 0 the run time style value is used. + * */ igRating(optionLiteral: 'option', optionName: "voteHeight"): number; /** * /Sets custom height of a vote in pixels. In case of 0 the run time style value is used. * + * * @optionValue New value to be set. */ igRating(optionLiteral: 'option', optionName: "voteHeight", optionValue: number): void; @@ -71382,6 +81012,7 @@ interface JQuery { * Gets the direction of selected and hovered votes. Change of that option is not supported after igRating was created. * Value true: from left to right or from top to bottom. * Value false: from right to left or from bottom to left. + * */ igRating(optionLiteral: 'option', optionName: "swapDirection"): boolean; @@ -71390,6 +81021,7 @@ interface JQuery { * Value true: from left to right or from top to bottom. * Value false: from right to left or from bottom to left. * + * * @optionValue New value to be set. */ igRating(optionLiteral: 'option', optionName: "swapDirection", optionValue: boolean): void; @@ -71398,6 +81030,7 @@ interface JQuery { * Gets/Sets percent or vote number to measure value and value-hover. * Value true: value is measured as percent (from 0 to 1). * Value false: value is measured in number of voted (from 0 to voteCount) + * */ igRating(optionLiteral: 'option', optionName: "valueAsPercent"): boolean; @@ -71406,6 +81039,7 @@ interface JQuery { * Value true: value is measured as percent (from 0 to 1). * Value false: value is measured in number of voted (from 0 to voteCount) * + * * @optionValue New value to be set. */ igRating(optionLiteral: 'option', optionName: "valueAsPercent", optionValue: boolean): void; @@ -71414,6 +81048,7 @@ interface JQuery { * Gets if igRating can have focus. Change of that option is not supported after igRating was created. * Value true: can get focus and process key events. * Value false: cannot get focus. + * */ igRating(optionLiteral: 'option', optionName: "focusable"): boolean; @@ -71422,12 +81057,14 @@ interface JQuery { * Value true: can get focus and process key events. * Value false: cannot get focus. * + * * @optionValue New value to be set. */ igRating(optionLiteral: 'option', optionName: "focusable", optionValue: boolean): void; /** * Gets/Sets precision. Precision of value and valueHover. + * */ igRating(optionLiteral: 'option', optionName: "precision"): string; @@ -71435,6 +81072,7 @@ interface JQuery { /** * /Sets precision. Precision of value and valueHover. * + * * @optionValue New value to be set. */ @@ -71445,6 +81083,7 @@ interface JQuery { * It has effect only when precision is set to "half" or "whole". * If user clicks between edge of the first vote and (sizeOfVote * precisionZeroVote), then value is set to 0. * Same is applied for mouseover as well. + * */ igRating(optionLiteral: 'option', optionName: "precisionZeroVote"): number; @@ -71454,6 +81093,7 @@ interface JQuery { * If user clicks between edge of the first vote and (sizeOfVote * precisionZeroVote), then value is set to 0. * Same is applied for mouseover as well. * + * * @optionValue New value to be set. */ igRating(optionLiteral: 'option', optionName: "precisionZeroVote", optionValue: number): void; @@ -71465,6 +81105,7 @@ interface JQuery { * If precision is "whole" or "half" and roundedDecimalPlaces is set in range of 0..2, then 3 is used. * If valueAsPercent is enabled and roundedDecimalPlaces is set to 0, then 1 is used. * If it is larger than 15, then 15 is used. + * */ igRating(optionLiteral: 'option', optionName: "roundedDecimalPlaces"): number; @@ -71476,6 +81117,7 @@ interface JQuery { * If valueAsPercent is enabled and roundedDecimalPlaces is set to 0, then 1 is used. * If it is larger than 15, then 15 is used. * + * * @optionValue New value to be set. */ igRating(optionLiteral: 'option', optionName: "roundedDecimalPlaces", optionValue: number): void; @@ -71484,6 +81126,7 @@ interface JQuery { * Gets/Sets selector for css classes. * That option allows replacing all default css styles by custom values. * Application should provide css classes for all members defined in the css options with "theme" selector. + * */ igRating(optionLiteral: 'option', optionName: "theme"): string; @@ -71492,6 +81135,7 @@ interface JQuery { * That option allows replacing all default css styles by custom values. * Application should provide css classes for all members defined in the css options with "theme" selector. * + * * @optionValue New value to be set. */ igRating(optionLiteral: 'option', optionName: "theme", optionValue: string): void; @@ -71499,6 +81143,7 @@ interface JQuery { /** * Gets/Sets object which contains options supported by igValidator. * Note that for onblur validation depends on the [focusable](ui.igrating#options:focusable) option. + * */ igRating(optionLiteral: 'option', optionName: "validatorOptions"): any; @@ -71506,6 +81151,7 @@ interface JQuery { * /Sets object which contains options supported by igValidator. * Note that for onblur validation depends on the [focusable](ui.igrating#options:focusable) option. * + * * @optionValue New value to be set. */ igRating(optionLiteral: 'option', optionName: "validatorOptions", optionValue: any): void; @@ -71522,6 +81168,7 @@ interface JQuery { * will customize only second vote with [normalCss](ui.igrating#theming:ui-igrating ui-state-default ui-widget-content) for normal state, [hoverCss](ui.igrating#theming:ui-igrating-hover ui-state-hover) for hover state and [selectedCss](ui.igrating#theming:ui-igrating-voteselected) for selected state. * [[null, 's1', 'h1'], [null, 's2', 'h2'], [null, 's3', 'h3']] * will customize selected and hover states for first 3 votes with classes h# and s#. + * */ igRating(optionLiteral: 'option', optionName: "cssVotes"): any; @@ -71538,51 +81185,80 @@ interface JQuery { * [[null, 's1', 'h1'], [null, 's2', 'h2'], [null, 's3', 'h3']] * will customize selected and hover states for first 3 votes with classes h# and s#. * + * * @optionValue New value to be set. */ igRating(optionLiteral: 'option', optionName: "cssVotes", optionValue: any): void; /** - * Event which is raised before hover value is changed. - * If application returns false, then action is canceled and hover value stays unchanged. + * Set/Get the locale setting for the widget. * - * Function takes arguments evt and ui. - * Use ui.value to get new value. - * Use ui.oldValue to get old value. + */ + igRating(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igRating(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igRating(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igRating(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igRating(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igRating(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + + /** + * Fired before hover value is changed. + * If the application returns false, then the action is canceled and the value remains unchanged. */ igRating(optionLiteral: 'option', optionName: "hoverChange"): HoverChangeEvent; /** - * Event which is raised before hover value is changed. - * If application returns false, then action is canceled and hover value stays unchanged. + * Fired before hover value is changed. + * If the application returns false, then the action is canceled and the value remains unchanged. * - * Function takes arguments evt and ui. - * Use ui.value to get new value. - * Use ui.oldValue to get old value. - * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igRating(optionLiteral: 'option', optionName: "hoverChange", optionValue: HoverChangeEvent): void; /** - * Event which is raised before (selected) value is changed. - * If application returns false, then action is canceled and value stays unchanged. - * - * Function takes arguments evt and ui. - * Use ui.value to get new value. - * Use ui.oldValue to get old value. + * Fired before (selected) value is changed. + * If the application returns false, then the action is canceled and the value remains unchanged. */ igRating(optionLiteral: 'option', optionName: "valueChange"): ValueChangeEvent; /** - * Event which is raised before (selected) value is changed. - * If application returns false, then action is canceled and value stays unchanged. + * Fired before (selected) value is changed. + * If the application returns false, then the action is canceled and the value remains unchanged. * - * Function takes arguments evt and ui. - * Use ui.value to get new value. - * Use ui.oldValue to get old value. - * - * @optionValue Define event handler function. + * @optionValue New value to be set. */ igRating(optionLiteral: 'option', optionName: "valueChange", optionValue: ValueChangeEvent): void; igRating(options: IgRating): JQuery; @@ -71594,6 +81270,7 @@ interface JQuery { interface IgSchedulerAgendaViewSettings { /** * Gets/Sets the number of days shown in AgendaView mode. + * */ dateRangeInterval?: number; @@ -71603,6 +81280,56 @@ interface IgSchedulerAgendaViewSettings { [optionName: string]: any; } +interface IgSchedulerWeekViewSettings { + /** + * Gets/Sets the week view display mode (whether to show all days or just working days). + * + */ + weekViewDisplayMode?: number; + + /** + * Gets/Sets whether to display all hours or just working hours. + * + */ + workingHoursDisplayMode?: number; + + /** + * Gets/Sets the time slots duration. 5, 6, 10, 15, 30 and 60 minutes are supported. + * + */ + timeSlotInterval?: number; + + /** + * Option for IgSchedulerWeekViewSettings + */ + [optionName: string]: any; +} + +interface IgSchedulerDayViewSettings { + /** + * Gets/Sets the time slots duration. 5, 6, 10, 15, 30 and 60 minutes are supported. + * + */ + timeSlotInterval?: number; + + /** + * Gets/Sets the number of days are visible at a time in the day view. 1 to 7 days are supported. + * + */ + dayViewNumberOfDays?: number; + + /** + * Gets/Sets whether to display all hours or just working hours. + * + */ + workingHoursDisplayMode?: number; + + /** + * Option for IgSchedulerDayViewSettings + */ + [optionName: string]: any; +} + interface IgSchedulerMonthViewSettings { /** * Gets/Sets the type of content displayed in a MonthView day. @@ -71615,6 +81342,7 @@ interface IgSchedulerMonthViewSettings { /** * Gets/Sets the visibility of an AgendaView in a MonthView. When true, the MonthView will display an AgendaView showing the Appointments for the currently selected day at the top of its list of Appointments. + * */ isAgendaVisible?: boolean; @@ -71637,31 +81365,37 @@ interface IgSchedulerMonthViewSettings { /** * Gets/sets the visibility of the horizontal separators between weeks in the MonthView. + * */ isHorizontalSeparatorVisibile?: boolean; /** * Gets/sets the visibility of the vertical separators between days of the week in a MonthView. + * */ isVerticalSeparatorVisibile?: boolean; /** * Gets/sets the visibility of the weekday names in MonthView. + * */ isWeekdayVisible?: boolean; /** * Gets/sets the visibility of the week numbers in a MonthView. + * */ isWeekNumberVisible?: boolean; /** * Gets/sets the visibility of the days from the previous month that occur in the first week of a given month. + * */ isPreviousMonthShown?: boolean; /** * Gets/sets the visibility of the days from the next month that occur in the last week of a given month. + * */ isNextMonthShown?: boolean; @@ -71771,6 +81505,80 @@ interface MonthChangedEventUIParam { newSelectedDate?: any; } +interface WeekChangingEvent { + (event: Event, ui: WeekChangingEventUIParam): void; +} + +interface WeekChangingEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to newly selected date. + */ + newSelectedDate?: any; + + /** + * Gets a reference to the currently selected date. + */ + currentSelectedDate?: any; +} + +interface WeekChangedEvent { + (event: Event, ui: WeekChangedEventUIParam): void; +} + +interface WeekChangedEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to newly selected date. + */ + newSelectedDate?: any; +} + +interface DayChangingEvent { + (event: Event, ui: DayChangingEventUIParam): void; +} + +interface DayChangingEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to newly selected date. + */ + newSelectedDate?: any; + + /** + * Gets a reference to the currently selected date. + */ + currentSelectedDate?: any; +} + +interface DayChangedEvent { + (event: Event, ui: DayChangedEventUIParam): void; +} + +interface DayChangedEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to newly selected date. + */ + newSelectedDate?: any; +} + interface ViewChangingEvent { (event: Event, ui: ViewChangingEventUIParam): void; } @@ -71996,12 +81804,14 @@ interface AppointmentEditedEventUIParam { interface IgScheduler { /** * Lists of all the views, rendered in the Scheduler. + * */ views?: any[]; /** * Gets/Sets current view mode in the Scheduler. If this options is not defined, then the first defined view in the views property is taken. * + * * Valid values: * "monthView" Enables MonthView in the Scheduler. * "agendaView" Enables AgendaView in the Scheduler. @@ -72009,13 +81819,21 @@ interface IgScheduler { viewMode?: string; /** - * Enables/Disables today button. + * Gets/Sets selected date in the Scheduler. + * */ - selectedDate?: boolean; + selectedDate?: Date; + + /** + * Enables/Disables today button. + * + */ + enableTodayButton?: boolean; /** * Gets/Sets the width of the control. * + * * Valid values: * "null" will stretch to fit data, if no other widths are defined. */ @@ -72024,6 +81842,7 @@ interface IgScheduler { /** * Gets/Sets the height of the control. * + * * Valid values: * "null" will fit the editor inside its parent container, if no other heights are defined. */ @@ -72031,24 +81850,74 @@ interface IgScheduler { /** * Gets/Sets AgendaView settings. + * */ agendaViewSettings?: IgSchedulerAgendaViewSettings; + /** + * Gets/Sets WeekView settings. + * + */ + weekViewSettings?: IgSchedulerWeekViewSettings; + + /** + * Gets/Sets DayView settings. + * + */ + dayViewSettings?: IgSchedulerDayViewSettings; + /** * Gets/Sets MonthView settings. + * */ monthViewSettings?: IgSchedulerMonthViewSettings; /** * Gets/Sets whether the appointment dialog and the related day and appointment popups should be shown. + * */ appointmentDialogSuppress?: boolean; /** * Gets/Sets dataSource of type $.ig.scheduler.ScheduleListDataSource. + * */ dataSource?: any; + /** + * Gets the resources collection that holds the activities` owners + * + * //Initialize + * var resources = [ + * { id: 1, displayName: "Trina Friesen" }, + * { id: 2, displayName: "Mack Koch" }]; + * $(".selector").%%WidgetName%%({ + * resources: resources + * }); + * + * // Get + * var resources = $(".selector").%%WidgetName%%("option", "resources"); + */ + resources?: any; + + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Fired before agenda view range is changed when using previous and next buttons (fired only in Agenda View) */ @@ -72084,6 +81953,26 @@ interface IgScheduler { */ rendered?: RenderedEvent; + /** + * Fired before changing the week begins, when using previous and next buttons (fired only in Week View) + */ + weekChanging?: WeekChangingEvent; + + /** + * Fired after week is changed when using previous and next buttons (fired only in Week View) + */ + weekChanged?: WeekChangedEvent; + + /** + * Fired before changing the day begins, when using previous and next buttons (fired only in Day View) + */ + dayChanging?: DayChangingEvent; + + /** + * Fired after day is changed when using previous and next buttons (fired only in Day View) + */ + dayChanged?: DayChangedEvent; + /** * Fired before the view is changed, when using the menu buttons. */ @@ -72151,15 +82040,20 @@ interface IgScheduler { } interface IgSchedulerMethods { /** - * Gets reference to appointment by id - */ - getAppointmentById(id: Object): Object; - - /** - * Creates a new appointment and renders it to the scheduler + * Creates an appointment and adds it to the appointment collection + * + * @param appointment appointment */ createAppointment(appointment: Object): Object; + /** + * Gets reference to a collection of all appointments for the given time range + * + * @param start Start date. + * @param end End date. + */ + getAppointmentsInRange(start: Date, end: Date): Object; + /** * Deletes appointment from the appointment collection * @@ -72174,6 +82068,11 @@ interface IgSchedulerMethods { * @param updateAppoinment updateAppoinment */ editAppointment(appointment: Object, updateAppoinment: Object): Object; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.igscheduler#options:language) + * Note that this method is for rare scenarios, see [language](ui.igscheduler#options:language) or [locale](ui.igscheduler#options:locale) option setter + */ changeLocale(): void; /** @@ -72205,14 +82104,24 @@ interface IgSchedulerMethods { * Gets reference to the jQuery calendar UI control. */ getCalendar(): string; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igScheduler"): IgSchedulerMethods; } interface JQuery { - igScheduler(methodName: "getAppointmentById", id: Object): Object; igScheduler(methodName: "createAppointment", appointment: Object): Object; + igScheduler(methodName: "getAppointmentsInRange", start: Date, end: Date): Object; igScheduler(methodName: "deleteAppointment", appointment: Object): Object; igScheduler(methodName: "editAppointment", appointment: Object, updateAppoinment: Object): Object; igScheduler(methodName: "changeLocale"): void; @@ -72222,21 +82131,26 @@ interface JQuery { igScheduler(methodName: "dateRangeButton"): string; igScheduler(methodName: "nextButton"): string; igScheduler(methodName: "getCalendar"): string; + igScheduler(methodName: "changeGlobalLanguage"): void; + igScheduler(methodName: "changeGlobalRegional"): void; /** * Lists of all the views, rendered in the Scheduler. + * */ igScheduler(optionLiteral: 'option', optionName: "views"): any[]; /** * Lists of all the views, rendered in the Scheduler. * + * * @optionValue New value to be set. */ igScheduler(optionLiteral: 'option', optionName: "views", optionValue: any[]): void; /** * Gets/Sets current view mode in the Scheduler. If this options is not defined, then the first defined view in the views property is taken. + * */ igScheduler(optionLiteral: 'option', optionName: "viewMode"): string; @@ -72244,25 +82158,43 @@ interface JQuery { /** * /Sets current view mode in the Scheduler. If this options is not defined, then the first defined view in the views property is taken. * + * * @optionValue New value to be set. */ igScheduler(optionLiteral: 'option', optionName: "viewMode", optionValue: string): void; /** - * Enables/Disables today button. + * Gets/Sets selected date in the Scheduler. + * */ - igScheduler(optionLiteral: 'option', optionName: "selectedDate"): boolean; + igScheduler(optionLiteral: 'option', optionName: "selectedDate"): Date; + + /** + * /Sets selected date in the Scheduler. + * + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "selectedDate", optionValue: Date): void; /** * Enables/Disables today button. * + */ + igScheduler(optionLiteral: 'option', optionName: "enableTodayButton"): boolean; + + /** + * Enables/Disables today button. + * + * * @optionValue New value to be set. */ - igScheduler(optionLiteral: 'option', optionName: "selectedDate", optionValue: boolean): void; + igScheduler(optionLiteral: 'option', optionName: "enableTodayButton", optionValue: boolean): void; /** * Gets/Sets the width of the control. + * */ igScheduler(optionLiteral: 'option', optionName: "width"): string|number; @@ -72270,6 +82202,7 @@ interface JQuery { /** * /Sets the width of the control. * + * * @optionValue New value to be set. */ @@ -72277,6 +82210,7 @@ interface JQuery { /** * Gets/Sets the height of the control. + * */ igScheduler(optionLiteral: 'option', optionName: "height"): string|number; @@ -72284,6 +82218,7 @@ interface JQuery { /** * /Sets the height of the control. * + * * @optionValue New value to be set. */ @@ -72291,52 +82226,166 @@ interface JQuery { /** * Gets/Sets AgendaView settings. + * */ igScheduler(optionLiteral: 'option', optionName: "agendaViewSettings"): IgSchedulerAgendaViewSettings; /** * /Sets AgendaView settings. * + * * @optionValue New value to be set. */ igScheduler(optionLiteral: 'option', optionName: "agendaViewSettings", optionValue: IgSchedulerAgendaViewSettings): void; + /** + * Gets/Sets WeekView settings. + * + */ + igScheduler(optionLiteral: 'option', optionName: "weekViewSettings"): IgSchedulerWeekViewSettings; + + /** + * /Sets WeekView settings. + * + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "weekViewSettings", optionValue: IgSchedulerWeekViewSettings): void; + + /** + * Gets/Sets DayView settings. + * + */ + igScheduler(optionLiteral: 'option', optionName: "dayViewSettings"): IgSchedulerDayViewSettings; + + /** + * /Sets DayView settings. + * + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "dayViewSettings", optionValue: IgSchedulerDayViewSettings): void; + /** * Gets/Sets MonthView settings. + * */ igScheduler(optionLiteral: 'option', optionName: "monthViewSettings"): IgSchedulerMonthViewSettings; /** * /Sets MonthView settings. * + * * @optionValue New value to be set. */ igScheduler(optionLiteral: 'option', optionName: "monthViewSettings", optionValue: IgSchedulerMonthViewSettings): void; /** * Gets/Sets whether the appointment dialog and the related day and appointment popups should be shown. + * */ igScheduler(optionLiteral: 'option', optionName: "appointmentDialogSuppress"): boolean; /** * /Sets whether the appointment dialog and the related day and appointment popups should be shown. * + * * @optionValue New value to be set. */ igScheduler(optionLiteral: 'option', optionName: "appointmentDialogSuppress", optionValue: boolean): void; /** * Gets/Sets dataSource of type $.ig.scheduler.ScheduleListDataSource. + * */ igScheduler(optionLiteral: 'option', optionName: "dataSource"): any; /** * /Sets dataSource of type $.ig.scheduler.ScheduleListDataSource. * + * * @optionValue New value to be set. */ igScheduler(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; + /** + * Gets the resources collection that holds the activities` owners + * + * //Initialize + * var resources = [ + * { id: 1, displayName: "Trina Friesen" }, + * { id: 2, displayName: "Mack Koch" }]; + * $(".selector").%%WidgetName%%({ + * resources: resources + * }); + * + * // Get + * var resources = $(".selector").%%WidgetName%%("option", "resources"); + */ + igScheduler(optionLiteral: 'option', optionName: "resources"): any; + + /** + * The resources collection that holds the activities` owners + * + * //Initialize + * var resources = [ + * { id: 1, displayName: "Trina Friesen" }, + * { id: 2, displayName: "Mack Koch" }]; + * $(".selector").%%WidgetName%%({ + * resources: resources + * }); + * + * // Get + * var resources = $(".selector").%%WidgetName%%("option", "resources"); + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "resources", optionValue: any): void; + + /** + * Set/Get the locale setting for the widget. + * + */ + igScheduler(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igScheduler(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igScheduler(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igScheduler(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Fired before agenda view range is changed when using previous and next buttons (fired only in Agenda View) */ @@ -72421,6 +82470,54 @@ interface JQuery { */ igScheduler(optionLiteral: 'option', optionName: "rendered", optionValue: RenderedEvent): void; + /** + * Fired before changing the week begins, when using previous and next buttons (fired only in Week View) + */ + igScheduler(optionLiteral: 'option', optionName: "weekChanging"): WeekChangingEvent; + + /** + * Fired before changing the week begins, when using previous and next buttons (fired only in Week View) + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "weekChanging", optionValue: WeekChangingEvent): void; + + /** + * Fired after week is changed when using previous and next buttons (fired only in Week View) + */ + igScheduler(optionLiteral: 'option', optionName: "weekChanged"): WeekChangedEvent; + + /** + * Fired after week is changed when using previous and next buttons (fired only in Week View) + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "weekChanged", optionValue: WeekChangedEvent): void; + + /** + * Fired before changing the day begins, when using previous and next buttons (fired only in Day View) + */ + igScheduler(optionLiteral: 'option', optionName: "dayChanging"): DayChangingEvent; + + /** + * Fired before changing the day begins, when using previous and next buttons (fired only in Day View) + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "dayChanging", optionValue: DayChangingEvent): void; + + /** + * Fired after day is changed when using previous and next buttons (fired only in Day View) + */ + igScheduler(optionLiteral: 'option', optionName: "dayChanged"): DayChangedEvent; + + /** + * Fired after day is changed when using previous and next buttons (fired only in Day View) + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "dayChanged", optionValue: DayChangedEvent): void; + /** * Fired before the view is changed, when using the menu buttons. */ @@ -72715,12 +82812,14 @@ interface ResizedEventUIParam { interface IgScroll { /** * Sets or gets if the scrollbars should be always visible (on all environments). Otherwise it will be the default behavior. Note: this option is only for the custom scrollbars set through the scrollbarType option. + * */ alwaysVisible?: boolean; /** * Sets or gets what type of scrollbars should be using the igScroll (on all environments). * + * * Valid values: * "custom" Custom scrollbars with custom ui and events. * "native" Native scrollbars @@ -72728,126 +82827,174 @@ interface IgScroll { */ scrollbarType?: string; + /** + * Sets or gets the minimum size of the thumb drag in pixels. For the vertical thumb it means its minimum height, for the horizontal thumb it means its minimum width. This affects only the custom scrollblar when scrollbarType is set to "custom". + * + */ + minThumbSize?: number|string; + /** * Sets or gets if igScroll can modify the DOM when it is initialized on certain element so that the content can be scrollable. + * */ modifyDOM?: boolean; /** * Sets custom value for how high is actually the content. Useful when wanting to scroll and update the shown content manually. + * */ scrollHeight?: number; /** * Sets custom value for what width is actually the content. Useful when wanting to scroll and update the shown content manually. + * */ scrollWidth?: number; /** * Sets gets current vertical position of the content. + * */ scrollTop?: number; /** * Sets gets current horizontal position of the content. + * */ scrollLeft?: number; /** * Sets gets the step of the default scrolling behavior when using mouse wheel + * */ wheelStep?: number; /** * Sets gets the step of the default scrolling behavior when using any of the custom scrollbar arrows + * */ smallIncrementStep?: number; /** * Sets gets the step of the default scrolling behavior when using any of the custom scrollbar track areas. + * */ bigIncrementStep?: number; /** * Sets gets if smoother scrolling with small intertia should be used when using mouse wheel + * */ smoothing?: boolean; /** * Sets or gets the modifier for how many pixels will be scrolled when using the mouse wheel once. This is used only for the smooth scrolling behavior. + * */ smoothingStep?: number; /** * Sets or gets the modifier for how long the scroll ‘animation’ lasts when using the mouse wheel once. This is used only for the smooth scrolling behavior. + * */ smoothingDuration?: number; /** * Sets gets the modifier for how much the inertia scrolls on mobile devices + * */ inertiaStep?: number; /** * Sets gets the modifier for how long the inertia last on mobile devices + * */ inertiaDuration?: number; /** * Sets gets how much pixels of toleration there will be when initially swiping horizontally. This is to improve swiping up/down without scrolling left/right when not intended due to small deviation left/right + * */ swipeToleranceX?: number; /** * Sets gets at least how many times the horizontal speed should be bigger so the inertia proceeds only horizontally without scrolling vertically. This is to improve interactions due to not perfectly swiping left/right with some deviation down/up + * */ inertiaDeltaX?: number; /** * Sets gets at least how many times the vertical speed should be bigger so the inertia proceeds only vertically without scrolling horizontally. This is to improve interactions due to not perfectly swiping down/up with some deviation left/right + * */ inertiaDeltaY?: number; /** * Sets gets elements that are linked to the main content horizontally. When the content is scrolled on X axis the linked elements scroll accordingly. + * */ syncedElemsH?: any[]; /** * Sets gets elements that are linked to the main content vertically. When the content is scrolled on Y axis the linked elements scroll accordingly. + * */ syncedElemsV?: any[]; /** * Sets gets html or jQuery element which is used for horizontal scrolling. + * */ scrollbarH?: string; /** * Sets gets html or jQuery element which is used for vertical scrolling. + * */ scrollbarV?: string; /** * Sets gets if only the linked horizontal scrollbar should be used for horizontal scrolling. Note: The behavior when the linked scrollbar is scrolled in this case should be handled manually. + * */ scrollOnlyHBar?: boolean; /** * Sets gets if only the linked vertical scrollbar should be used for vertical scrolling. Note: The behavior when the linked scrollbar is scrolled in this case should be handled manually. + * */ scrollOnlyVBar?: boolean; /** * Sets gets html or jQuery element to which the horizontal scrollbar will be appended to. + * */ scrollbarHParent?: string; /** * Sets gets html or jQuery element to which the vertical scrollbar will be appended to. + * */ scrollbarVParent?: string; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event which is raised after the scroller has been rendered fully */ @@ -72902,9 +83049,24 @@ interface IgScroll { } interface IgScrollMethods { refresh(): void; + + /** + * This method overrides the base method and does nothing, because the scoll container shouldn't change the container locales + * Note that this method is for rare scenarios, use [language](ui.igupload#options:language) or [locale](ui.igupload#options:locale) option setter + */ changeLocale(): void; option(optionName: Object, value: Object): void; destroy(): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igScroll"): IgScrollMethods; @@ -72915,21 +83077,26 @@ interface JQuery { igScroll(methodName: "changeLocale"): void; igScroll(methodName: "option", optionName: Object, value: Object): void; igScroll(methodName: "destroy"): void; + igScroll(methodName: "changeGlobalLanguage"): void; + igScroll(methodName: "changeGlobalRegional"): void; /** * Sets or gets if the scrollbars should be always visible (on all environments). Otherwise it will be the default behavior. Note: this option is only for the custom scrollbars set through the scrollbarType option. + * */ igScroll(optionLiteral: 'option', optionName: "alwaysVisible"): boolean; /** * Sets or gets if the scrollbars should be always visible (on all environments). Otherwise it will be the default behavior. Note: this option is only for the custom scrollbars set through the scrollbarType option. * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "alwaysVisible", optionValue: boolean): void; /** * Sets or gets what type of scrollbars should be using the igScroll (on all environments). + * */ igScroll(optionLiteral: 'option', optionName: "scrollbarType"): string; @@ -72937,299 +83104,408 @@ interface JQuery { /** * Sets or gets what type of scrollbars should be using the igScroll (on all environments). * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "scrollbarType", optionValue: string): void; + /** + * Sets or gets the minimum size of the thumb drag in pixels. For the vertical thumb it means its minimum height, for the horizontal thumb it means its minimum width. This affects only the custom scrollblar when scrollbarType is set to "custom". + * + */ + + igScroll(optionLiteral: 'option', optionName: "minThumbSize"): number|string; + + /** + * Sets or gets the minimum size of the thumb drag in pixels. For the vertical thumb it means its minimum height, for the horizontal thumb it means its minimum width. This affects only the custom scrollblar when scrollbarType is set to "custom". + * + * + * @optionValue New value to be set. + */ + + igScroll(optionLiteral: 'option', optionName: "minThumbSize", optionValue: number|string): void; + /** * Sets or gets if igScroll can modify the DOM when it is initialized on certain element so that the content can be scrollable. + * */ igScroll(optionLiteral: 'option', optionName: "modifyDOM"): boolean; /** * Sets or gets if igScroll can modify the DOM when it is initialized on certain element so that the content can be scrollable. * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "modifyDOM", optionValue: boolean): void; /** * Sets custom value for how high is actually the content. Useful when wanting to scroll and update the shown content manually. + * */ igScroll(optionLiteral: 'option', optionName: "scrollHeight"): number; /** * Sets custom value for how high is actually the content. Useful when wanting to scroll and update the shown content manually. * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "scrollHeight", optionValue: number): void; /** * Sets custom value for what width is actually the content. Useful when wanting to scroll and update the shown content manually. + * */ igScroll(optionLiteral: 'option', optionName: "scrollWidth"): number; /** * Sets custom value for what width is actually the content. Useful when wanting to scroll and update the shown content manually. * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "scrollWidth", optionValue: number): void; /** * Sets gets current vertical position of the content. + * */ igScroll(optionLiteral: 'option', optionName: "scrollTop"): number; /** * Sets gets current vertical position of the content. * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "scrollTop", optionValue: number): void; /** * Sets gets current horizontal position of the content. + * */ igScroll(optionLiteral: 'option', optionName: "scrollLeft"): number; /** * Sets gets current horizontal position of the content. * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "scrollLeft", optionValue: number): void; /** * Sets gets the step of the default scrolling behavior when using mouse wheel + * */ igScroll(optionLiteral: 'option', optionName: "wheelStep"): number; /** * Sets gets the step of the default scrolling behavior when using mouse wheel * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "wheelStep", optionValue: number): void; /** * Sets gets the step of the default scrolling behavior when using any of the custom scrollbar arrows + * */ igScroll(optionLiteral: 'option', optionName: "smallIncrementStep"): number; /** * Sets gets the step of the default scrolling behavior when using any of the custom scrollbar arrows * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "smallIncrementStep", optionValue: number): void; /** * Sets gets the step of the default scrolling behavior when using any of the custom scrollbar track areas. + * */ igScroll(optionLiteral: 'option', optionName: "bigIncrementStep"): number; /** * Sets gets the step of the default scrolling behavior when using any of the custom scrollbar track areas. * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "bigIncrementStep", optionValue: number): void; /** * Sets gets if smoother scrolling with small intertia should be used when using mouse wheel + * */ igScroll(optionLiteral: 'option', optionName: "smoothing"): boolean; /** * Sets gets if smoother scrolling with small intertia should be used when using mouse wheel * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "smoothing", optionValue: boolean): void; /** * Sets or gets the modifier for how many pixels will be scrolled when using the mouse wheel once. This is used only for the smooth scrolling behavior. + * */ igScroll(optionLiteral: 'option', optionName: "smoothingStep"): number; /** * Sets or gets the modifier for how many pixels will be scrolled when using the mouse wheel once. This is used only for the smooth scrolling behavior. * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "smoothingStep", optionValue: number): void; /** * Sets or gets the modifier for how long the scroll ‘animation’ lasts when using the mouse wheel once. This is used only for the smooth scrolling behavior. + * */ igScroll(optionLiteral: 'option', optionName: "smoothingDuration"): number; /** * Sets or gets the modifier for how long the scroll ‘animation’ lasts when using the mouse wheel once. This is used only for the smooth scrolling behavior. * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "smoothingDuration", optionValue: number): void; /** * Sets gets the modifier for how much the inertia scrolls on mobile devices + * */ igScroll(optionLiteral: 'option', optionName: "inertiaStep"): number; /** * Sets gets the modifier for how much the inertia scrolls on mobile devices * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "inertiaStep", optionValue: number): void; /** * Sets gets the modifier for how long the inertia last on mobile devices + * */ igScroll(optionLiteral: 'option', optionName: "inertiaDuration"): number; /** * Sets gets the modifier for how long the inertia last on mobile devices * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "inertiaDuration", optionValue: number): void; /** * Sets gets how much pixels of toleration there will be when initially swiping horizontally. This is to improve swiping up/down without scrolling left/right when not intended due to small deviation left/right + * */ igScroll(optionLiteral: 'option', optionName: "swipeToleranceX"): number; /** * Sets gets how much pixels of toleration there will be when initially swiping horizontally. This is to improve swiping up/down without scrolling left/right when not intended due to small deviation left/right * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "swipeToleranceX", optionValue: number): void; /** * Sets gets at least how many times the horizontal speed should be bigger so the inertia proceeds only horizontally without scrolling vertically. This is to improve interactions due to not perfectly swiping left/right with some deviation down/up + * */ igScroll(optionLiteral: 'option', optionName: "inertiaDeltaX"): number; /** * Sets gets at least how many times the horizontal speed should be bigger so the inertia proceeds only horizontally without scrolling vertically. This is to improve interactions due to not perfectly swiping left/right with some deviation down/up * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "inertiaDeltaX", optionValue: number): void; /** * Sets gets at least how many times the vertical speed should be bigger so the inertia proceeds only vertically without scrolling horizontally. This is to improve interactions due to not perfectly swiping down/up with some deviation left/right + * */ igScroll(optionLiteral: 'option', optionName: "inertiaDeltaY"): number; /** * Sets gets at least how many times the vertical speed should be bigger so the inertia proceeds only vertically without scrolling horizontally. This is to improve interactions due to not perfectly swiping down/up with some deviation left/right * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "inertiaDeltaY", optionValue: number): void; /** * Sets gets elements that are linked to the main content horizontally. When the content is scrolled on X axis the linked elements scroll accordingly. + * */ igScroll(optionLiteral: 'option', optionName: "syncedElemsH"): any[]; /** * Sets gets elements that are linked to the main content horizontally. When the content is scrolled on X axis the linked elements scroll accordingly. * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "syncedElemsH", optionValue: any[]): void; /** * Sets gets elements that are linked to the main content vertically. When the content is scrolled on Y axis the linked elements scroll accordingly. + * */ igScroll(optionLiteral: 'option', optionName: "syncedElemsV"): any[]; /** * Sets gets elements that are linked to the main content vertically. When the content is scrolled on Y axis the linked elements scroll accordingly. * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "syncedElemsV", optionValue: any[]): void; /** * Sets gets html or jQuery element which is used for horizontal scrolling. + * */ igScroll(optionLiteral: 'option', optionName: "scrollbarH"): string; /** * Sets gets html or jQuery element which is used for horizontal scrolling. * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "scrollbarH", optionValue: string): void; /** * Sets gets html or jQuery element which is used for vertical scrolling. + * */ igScroll(optionLiteral: 'option', optionName: "scrollbarV"): string; /** * Sets gets html or jQuery element which is used for vertical scrolling. * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "scrollbarV", optionValue: string): void; /** * Sets gets if only the linked horizontal scrollbar should be used for horizontal scrolling. Note: The behavior when the linked scrollbar is scrolled in this case should be handled manually. + * */ igScroll(optionLiteral: 'option', optionName: "scrollOnlyHBar"): boolean; /** * Sets gets if only the linked horizontal scrollbar should be used for horizontal scrolling. Note: The behavior when the linked scrollbar is scrolled in this case should be handled manually. * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "scrollOnlyHBar", optionValue: boolean): void; /** * Sets gets if only the linked vertical scrollbar should be used for vertical scrolling. Note: The behavior when the linked scrollbar is scrolled in this case should be handled manually. + * */ igScroll(optionLiteral: 'option', optionName: "scrollOnlyVBar"): boolean; /** * Sets gets if only the linked vertical scrollbar should be used for vertical scrolling. Note: The behavior when the linked scrollbar is scrolled in this case should be handled manually. * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "scrollOnlyVBar", optionValue: boolean): void; /** * Sets gets html or jQuery element to which the horizontal scrollbar will be appended to. + * */ igScroll(optionLiteral: 'option', optionName: "scrollbarHParent"): string; /** * Sets gets html or jQuery element to which the horizontal scrollbar will be appended to. * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "scrollbarHParent", optionValue: string): void; /** * Sets gets html or jQuery element to which the vertical scrollbar will be appended to. + * */ igScroll(optionLiteral: 'option', optionName: "scrollbarVParent"): string; /** * Sets gets html or jQuery element to which the vertical scrollbar will be appended to. * + * * @optionValue New value to be set. */ igScroll(optionLiteral: 'option', optionName: "scrollbarVParent", optionValue: string): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igScroll(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igScroll(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igScroll(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igScroll(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igScroll(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event which is raised after the scroller has been rendered fully */ @@ -73345,6 +83621,3062 @@ interface JQuery { igScroll(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; igScroll(methodName: string, ...methodParams: any[]): any; } +interface IgShapeChart { + /** + * The triangulated file source URI or an instance of $.ig.ShapeDataSource. + */ + shapeDataSource?: string; + + /** + * String The database source URI. + */ + databaseSource?: string; + + /** + * The triangulated file source URI or an instance of $.ig.TriangulationDataSource. + */ + triangulationDataSource?: string; + + /** + * Gets or sets the id of a template element to use for tooltips, or markup representing the tooltip template. + */ + tooltipTemplate?: any; + + /** + * Gets or sets the names of tooltip templates + */ + tooltipTemplates?: any; + + /** + * Gets or sets the left margin of chart title + */ + titleLeftMargin?: number; + + /** + * Gets or sets the right margin of chart title + */ + titleRightMargin?: number; + + /** + * Gets or sets the top margin of chart title + */ + titleTopMargin?: number; + + /** + * Gets or sets the bottom margin of chart title + */ + titleBottomMargin?: number; + + /** + * Gets or sets the left margin of chart subtitle + */ + subtitleLeftMargin?: number; + + /** + * Gets or sets the top margin of chart subtitle + */ + subtitleTopMargin?: number; + + /** + * Gets or sets the right margin of chart subtitle + */ + subtitleRightMargin?: number; + + /** + * Gets or sets the bottom margin of chart subtitle + */ + subtitleBottomMargin?: number; + + /** + * Gets or sets color of chart subtitle + */ + subtitleTextColor?: string; + + /** + * Gets or sets color of chart title + */ + titleTextColor?: string; + + /** + * Gets or sets the left margin of the chart content. + */ + leftMargin?: number; + + /** + * Gets or sets the top margin of the chart content. + */ + topMargin?: number; + + /** + * Gets or sets the right margin of the chart content. + */ + rightMargin?: number; + + /** + * Gets or sets the bottom margin around the chart content. + */ + bottomMargin?: number; + + /** + * Gets or sets the duration used for animating series plots when the data is changing + */ + transitionDuration?: number; + + /** + * Gets or sets the easing function used for animating series plots when the data is changing. + * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. + */ + transitionEasingFunction?: any; + + /** + * Gets or sets a function for creating wrapped tooltip + */ + createWrappedTooltip?: any; + + /** + * Gets or sets the widget of this control + */ + widget?: any; + + /** + * Gets or sets CSS font property for the chart subtitle + */ + subtitleTextStyle?: string; + + /** + * Gets or sets CSS font property for the chart title + */ + titleTextStyle?: string; + + /** + * Gets or sets a collection of data items used to generate the chart. + * The ItemsSource of this chart can be a list of objects containing one or more numeric properties. + * Additionally, if the objects in the list implement the IEnumerable interface, + * the Chart will attempt to delve into the sub-collections when reading through the data source. + * Databinding can be further configured by attributing the data item classes + * with the DataSeriesMemberIntentAttribute. + */ + itemsSource?: any; + + /** + * Gets or sets a set of property paths that should be included for consideration by the category chart, leaving the remainder excluded. If null, all properties will be considered. + */ + includedProperties?: any; + + /** + * Gets or sets a set of property paths that should be excluded from consideration by the category chart. + */ + excludedProperties?: any; + + /** + * Gets or sets the palette of brushes to use for coloring the chart series. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + brushes?: any; + + /** + * Gets or sets the palette of brushes to use for outlines on the chart series. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + outlines?: any; + + /** + * Gets or sets the legend to connect this chart to. + * When the legend property is set, the chart will use it to display information about its series. Legends can be shared by multiple chart controls. + */ + legend?: any; + + /** + * Gets or sets whether the chart can be horizontally zoomed through user interactions. + */ + isHorizontalZoomEnabled?: boolean; + + /** + * Gets or sets whether the chart can be vertically zoomed through user interactions. + */ + isVerticalZoomEnabled?: boolean; + + /** + * Gets or sets the rectangle representing the current scroll and zoom state of the chart. + * WindowRect is expressed as a Rectangle with coordinates and sizes between 0 and 1. + * The provided object should have numeric properties called left, top, width and height. + */ + windowRect?: any; + + /** + * Gets or sets text to display above the plot area. + */ + title?: string; + + /** + * Gets or sets text to display below the Title, above the plot area. + */ + subtitle?: string; + + /** + * Gets or sets horizontal alignment which determines the title position, relative to the left and right edges of the control. + * + * Valid values: + * "left" Align the item to the left + * "center" Center the item + * "right" Align the item to the right + * "stretch" Stretch the item to the full width + */ + titleAlignment?: string; + + /** + * Gets or sets horizontal alignment which determines the subtitle position, relative to the left and right edges of the control. + * + * Valid values: + * "left" Align the item to the left + * "center" Center the item + * "right" Align the item to the right + * "stretch" Stretch the item to the full width + */ + subtitleAlignment?: string; + + /** + * Gets or sets the behavior that determines how unknown values will be plotted on the chart.Null and Double.NaN are two examples of unknown values. + * + * + * Valid values: + * "linearInterpolate" Plot the unknown value as the midpoint between surrounding known values using linear interpolation. + * "dontPlot" Do not plot the unknown value on the chart. + */ + unknownValuePlotting?: string; + + /** + * Gets or sets the rendering resolution for all series in this chart. + * Where n = Resolution, for every n horizontal pixels, combine all items into a single datapoint. When Resolution = 0, all datapoints will be rendered as graphical objects. Charts with a higher resolution will have faster performance. + */ + resolution?: number; + + /** + * Gets or sets the thickness for all series in this chart. Depending on the ChartType, this can be the main brush used, or just the outline. + */ + thickness?: number; + + /** + * Gets or sets the marker shapes used for indicating location of data points in this chart. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + */ + markerTypes?: any; + + /** + * Gets or sets the palette of brushes used for rendering fill area of data point markers. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + markerBrushes?: any; + + /** + * Gets or sets the palette of brushes used for rendering outlines of data point markers. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + markerOutlines?: any; + + /** + * Gets or sets the maximum number of markers displyed in the plot area of the chart. + */ + markerMaxCount?: number; + + /** + * Gets or sets the palette of brushes to used for coloring trend lines in this chart. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + trendLineBrushes?: any; + + /** + * Gets or sets the formula used for calculating trend lines in this chart.This property applies only to these chart types: point, line, spline, and bubble + * + * + * Valid values: + * "none" No trend line will be displayed. + * "linearFit" Linear fit. + * "quadraticFit" Quadratic polynomial fit. + * "cubicFit" Cubic polynomial fit. + * "quarticFit" Quartic polynomial fit. + * "quinticFit" Quintic polynomial fit. + * "logarithmicFit" Logarithmic fit. + * "exponentialFit" Exponential fit. + * "powerLawFit" Powerlaw fit. + * "simpleAverage" Simple moving average. + * "exponentialAverage" Exponential moving average. + * "modifiedAverage" Modified moving average. + * "cumulativeAverage" Cumulative moving average. + * "weightedAverage" Weighted moving average. + */ + trendLineType?: string; + + /** + * Gets or sets the thickness of the trend lines in this chart. + * This property applies only to these chart types: point, line, spline, and bubble + */ + trendLineThickness?: number; + + /** + * Gets or sets a value indicating whether grid and tick lines are aligned to device pixels. + */ + alignsGridLinesToPixels?: boolean; + trendLinePeriod?: number; + + /** + * Gets or sets function which takes an context object and returns a formatted label for the X-axis. + */ + xAxisFormatLabel?: any; + + /** + * Gets or sets function which takes a context object and returns a formatted label for the Y-axis. + */ + yAxisFormatLabel?: any; + + /** + * Gets or sets the left margin of labels on the X-axis + */ + xAxisLabelLeftMargin?: number; + + /** + * Gets or sets the top margin of labels on the X-axis + */ + xAxisLabelTopMargin?: number; + + /** + * Gets or sets the right margin of labels on the X-axis + */ + xAxisLabelRightMargin?: number; + + /** + * Gets or sets the bottom margin of labels on the X-axis + */ + xAxisLabelBottomMargin?: number; + + /** + * Gets or sets the left margin of labels on the Y-axis + */ + yAxisLabelLeftMargin?: number; + + /** + * Gets or sets the top margin of labels on the Y-axis + */ + yAxisLabelTopMargin?: number; + + /** + * Gets or sets the right margin of labels on the Y-axis + */ + yAxisLabelRightMargin?: number; + + /** + * Gets or sets the bottom margin of labels on the Y-axis + */ + yAxisLabelBottomMargin?: number; + + /** + * Gets or sets color of labels on the X-axis + */ + xAxisLabelTextColor?: string; + + /** + * Gets or sets color of labels on the Y-axis + */ + yAxisLabelTextColor?: string; + + /** + * Gets or sets the margin around a title on the X-axis + */ + xAxisTitleMargin?: number; + + /** + * Gets or sets the margin around a title on the Y-axis + */ + yAxisTitleMargin?: number; + + /** + * Gets or sets the left margin of a title on the X-axis + */ + xAxisTitleLeftMargin?: number; + + /** + * Gets or sets the left margin of a title on the Y-axis + */ + yAxisTitleLeftMargin?: number; + + /** + * Gets or sets the top margin of a title on the X-axis + */ + xAxisTitleTopMargin?: number; + + /** + * Gets or sets the top margin of a title on the Y-axis + */ + yAxisTitleTopMargin?: number; + + /** + * Gets or sets the right margin of a title on the X-axis + */ + xAxisTitleRightMargin?: number; + + /** + * Gets or sets the right margin of a title on the Y-axis + */ + yAxisTitleRightMargin?: number; + + /** + * Gets or sets the bottom margin of a title on the X-axis + */ + xAxisTitleBottomMargin?: number; + + /** + * Gets or sets the bottom margin of a title on the Y-axis + */ + yAxisTitleBottomMargin?: number; + + /** + * Gets or sets color of title on the X-axis + */ + xAxisTitleTextColor?: string; + + /** + * Gets or sets color of title on the Y-axis + */ + yAxisTitleTextColor?: string; + + /** + * Gets or sets CSS font property for labels on X-axis + */ + xAxisLabelTextStyle?: string; + + /** + * Gets or sets CSS font property for labels on Y-axis + */ + yAxisLabelTextStyle?: string; + + /** + * Gets or sets CSS font property for title on X-axis + */ + xAxisTitleTextStyle?: string; + + /** + * Gets or sets CSS font property for title on Y-axis + */ + yAxisTitleTextStyle?: string; + + /** + * Gets or sets the format for labels along the X-axis. + */ + xAxisLabel?: any; + + /** + * Gets or sets the format for labels along the Y-axis. + */ + yAxisLabel?: any; + + /** + * Gets or sets the color to apply to major gridlines along the X-axis. + */ + xAxisMajorStroke?: string; + + /** + * Gets or sets the color to apply to major gridlines along the Y-axis. + */ + yAxisMajorStroke?: string; + + /** + * Gets or sets the thickness to apply to major gridlines along the X-axis. + */ + xAxisMajorStrokeThickness?: number; + + /** + * Gets or sets the thickness to apply to major gridlines along the Y-axis. + */ + yAxisMajorStrokeThickness?: number; + + /** + * Gets or sets the thickness to apply to minor gridlines along the X-axis. + */ + xAxisMinorStrokeThickness?: number; + + /** + * Gets or sets the thickness to apply to minor gridlines along the Y-axis. + */ + yAxisMinorStrokeThickness?: number; + + /** + * Gets or sets the color to apply to stripes along the X-axis. + */ + xAxisStrip?: string; + + /** + * Gets or sets the color to apply to stripes along the Y-axis. + */ + yAxisStrip?: string; + + /** + * Gets or sets the color to apply to the X-axis line. + */ + xAxisStroke?: string; + + /** + * Gets or sets the color to apply to the Y-axis line. + */ + yAxisStroke?: string; + + /** + * Gets or sets the thickness to apply to the X-axis line. + */ + xAxisStrokeThickness?: number; + + /** + * Gets or sets the thickness to apply to the Y-axis line. + */ + yAxisStrokeThickness?: number; + + /** + * Gets or sets the length of tickmarks along the X-axis. + */ + xAxisTickLength?: number; + + /** + * Gets or sets the length of tickmarks along the Y-axis. + */ + yAxisTickLength?: number; + + /** + * Gets or sets the color to apply to tickmarks along the X-axis. + */ + xAxisTickStroke?: string; + + /** + * Gets or sets the color to apply to tickmarks along the Y-axis. + */ + yAxisTickStroke?: string; + + /** + * Gets or sets the thickness to apply to tickmarks along the X-axis. + */ + xAxisTickStrokeThickness?: number; + + /** + * Gets or sets the thickness to apply to tickmarks along the Y-axis. + */ + yAxisTickStrokeThickness?: number; + + /** + * Gets or sets the Text to display below the X-axis. + */ + xAxisTitle?: string; + + /** + * Gets or sets the Text to display to the left of the Y-axis. + */ + yAxisTitle?: string; + + /** + * Gets or sets the color to apply to minor gridlines along the X-axis. + */ + xAxisMinorStroke?: string; + + /** + * Gets or sets the color to apply to minor gridlines along the Y-axis. + */ + yAxisMinorStroke?: string; + + /** + * Gets or sets the angle of rotation for labels along the X-axis. + */ + xAxisLabelAngle?: number; + + /** + * Gets or sets the angle of rotation for labels along the Y-axis. + */ + yAxisLabelAngle?: number; + + /** + * Gets or sets the distance between the X-axis and the bottom of the chart. + */ + xAxisExtent?: number; + + /** + * Gets or sets the distance between the Y-axis and the left edge of the chart. + */ + yAxisExtent?: number; + + /** + * Gets or sets the angle of rotation for the X-axis title. + */ + xAxisTitleAngle?: number; + + /** + * Gets or sets the angle of rotation for the Y-axis title. + */ + yAxisTitleAngle?: number; + + /** + * Gets or sets whether to invert the direction of the X-axis by placing the first data items on the right side of the chart. + */ + xAxisInverted?: boolean; + + /** + * Gets or sets whether to invert the direction of the Y-axis by placing the minimum numeric value at the top of the chart. + */ + yAxisInverted?: boolean; + + /** + * Gets or sets Horizontal alignment of the X-axis title. + * + * Valid values: + * "left" Align the item to the left + * "center" Center the item + * "right" Align the item to the right + * "stretch" Stretch the item to the full width + */ + xAxisTitleAlignment?: string; + + /** + * Gets or sets Vertical alignment of the Y-axis title. + * + * Valid values: + * "top" Align the item to the top + * "center" Center the item + * "bottom" Align the item to the bottom + * "stretch" Stretch the item to the full height + */ + yAxisTitleAlignment?: string; + + /** + * Gets or sets Horizontal alignment of X-axis labels. + * + * Valid values: + * "left" Align the item to the left + * "center" Center the item + * "right" Align the item to the right + * "stretch" Stretch the item to the full width + */ + xAxisLabelHorizontalAlignment?: string; + + /** + * Gets or sets Horizontal alignment of Y-axis labels. + * + * Valid values: + * "left" Align the item to the left + * "center" Center the item + * "right" Align the item to the right + * "stretch" Stretch the item to the full width + */ + yAxisLabelHorizontalAlignment?: string; + + /** + * Gets or sets Vertical alignment of X-axis labels. + * + * Valid values: + * "top" Align the item to the top + * "center" Center the item + * "bottom" Align the item to the bottom + * "stretch" Stretch the item to the full height + */ + xAxisLabelVerticalAlignment?: string; + + /** + * Gets or sets Vertical alignment of Y-axis labels. + * + * Valid values: + * "top" Align the item to the top + * "center" Center the item + * "bottom" Align the item to the bottom + * "stretch" Stretch the item to the full height + */ + yAxisLabelVerticalAlignment?: string; + + /** + * Gets or sets Visibility of X-axis labels. + * + * Valid values: + * "visible" Display the element. + * "collapsed" Do not display the element. + */ + xAxisLabelVisibility?: string; + + /** + * Gets or sets Visibility of Y-axis labels. + * + * Valid values: + * "visible" Display the element. + * "collapsed" Do not display the element. + */ + yAxisLabelVisibility?: string; + + /** + * The location of Y-axis labels, relative to the plot area. + * + * Valid values: + * "outsideTop" Places the axis labels at the top, outside of the plotting area. + * "outsideBottom" Places the axis labels at the bottom, outside of the plotting area + * "outsideLeft" Places the axis labels to the left, outside of the plotting area. + * "outsideRight" Places the axis labels to the right, outside of the plotting area. + * "insideTop" Places the axis labels inside the plotting area above the axis line. + * "insideBottom" Places the axis labels inside the plotting area below the axis line. + * "insideLeft" Places the axis labels inside the plotting area and to the left of the axis line. + * "insideRight" Places the axis labels inside the plotting area and to the right of the axis line. + */ + yAxisLabelLocation?: string; + + /** + * Gets or sets the frequency of displayed labels along the X-axis. + * Gets or sets the set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label. + */ + xAxisInterval?: number; + + /** + * Gets or sets the frequency of displayed minor lines along the X-axis. + * Gets or sets the set value is a factor that determines how the minor lines will be displayed. + */ + xAxisMinorInterval?: number; + + /** + * Gets or sets the distance between each label and grid line along the Y-axis. + */ + yAxisInterval?: number; + + /** + * Gets or sets whether the Y-axis should use a logarithmic scale instead of a linear one. + * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the Y-axis minimum is greater than zero. + */ + yAxisIsLogarithmic?: boolean; + + /** + * Gets or sets the base value to use in the log function when mapping the position of data items along the Y-axis. + * This property is effective only when YAxisIsLogarithmic is true. + */ + yAxisLogarithmBase?: number; + + /** + * Gets or sets the data value corresponding to the minimum value of the Y-axis. + */ + yAxisMinimumValue?: number; + + /** + * Gets or sets the data value corresponding to the maximum value of the Y-axis. + */ + yAxisMaximumValue?: number; + + /** + * Gets or sets the frequency of displayed minor lines along the Y-axis. + */ + yAxisMinorInterval?: number; + + /** + * Gets or sets whether the X-axis will use a logarithmic scale, instead of a linear one. + * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the X-axis minimum is greater than zero. + */ + xAxisIsLogarithmic?: boolean; + + /** + * Gets or sets the base value to use in the log function when mapping the position of data items along the X-axis. + * This property is effective only when y-axis is logarithmic + */ + xAxisLogarithmBase?: number; + + /** + * Gets or sets the data value corresponding to the minimum value on the X-axis. + */ + xAxisMinimumValue?: number; + + /** + * Gets or sets the data value corresponding to the maximum value on the X-axis. + */ + xAxisMaximumValue?: number; + + /** + * Gets or sets whether the large numbers on the X-axis labels are abbreviated. + */ + xAxisAbbreviateLargeNumbers?: boolean; + + /** + * Gets or sets whether the large numbers on the Y-axis labels are abbreviated. + */ + yAxisAbbreviateLargeNumbers?: boolean; + + /** + * Gets or sets collision avoidance between markers on series that support this behaviour. + * + * Valid values: + * "none" Collision avoidance is disabled. + * "omit" Items colliding with other items will be hidden from view. + * "fade" Items colliding with other items will be partially hidden from view by reducing their opacity. + * "omitAndShift" Items colliding with other items will be either hidden from view or moved to new positions. + * "fadeAndShift" Items colliding with other items will be either partially hidden from view by reducing their opacity, or moved to new positions, or a combination of both. + */ + markerCollision?: string; + + /** + * Gets or sets the type of chart series to generate from the data. + * + * Valid values: + * "auto" Specifies automatic selection of chart type based on suggestion from internal Data Adapter + * "point" Specifies point chart with small markers at X/Y data + * "line" Specifies line chart with small markers at X/Y data and connected with lines + * "spline" Specifies spline chart with small markers at X/Y data and connected with splines + * "bubble" Specifies bubble chart with proportional markers at X/Y data + * "highDensity" Specifies high density chart with colored bitmap pixels at X/Y data based on density of nearby points + * "area" Specifies area chart with colored surface based on a triangulation of X/Y data with numeric values assigned to each point. + * "contour" Specifies area chart with colored lines based on a triangulation of X/Y data with numeric values assigned to each point. + * "polygon" Specifies polygon chart with polygons defined by X/Y data + * "polyline" Specifies polyline chart with polylines defined by X/Y data + */ + chartType?: string; + + /** + * The width of the chart. + */ + width?: number; + + /** + * The height of the chart. + */ + height?: number; + + /** + * Gets sets maximum number of displayed records in chart. + */ + maxRecCount?: number; + + /** + * Gets sets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + */ + dataSource?: any; + + /** + * Gets sets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + */ + dataSourceType?: string; + + /** + * Gets sets url which is used for sending JSON on request for remote data. + */ + dataSourceUrl?: string; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + */ + responseTotalRecCountKey?: string; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + */ + responseDataKey?: string; + + /** + * Event raised when a property value is changed on this chart + */ + propertyChanged?: PropertyChangedEvent; + + /** + * Event raised when a series is initialized and added to this chart. + */ + seriesAdded?: SeriesAddedEvent; + + /** + * Event raised when a series is removed from this chart. + */ + seriesRemoved?: SeriesRemovedEvent; + + /** + * Occurs when the pointer enters a Series. + */ + seriesPointerEnter?: SeriesPointerEnterEvent; + + /** + * Occurs when the pointer leaves a Series. + */ + seriesPointerLeave?: SeriesPointerLeaveEvent; + + /** + * Occurs when the pointer moves over a Series. + */ + seriesPointerMove?: SeriesPointerMoveEvent; + + /** + * Occurs when the pointer is pressed down over a Series. + */ + seriesPointerDown?: SeriesPointerDownEvent; + + /** + * Occurs when the pointer is released over a Series. + */ + seriesPointerUp?: SeriesPointerUpEvent; + + /** + * Event which is raised before data binding. + * Return false in order to cancel data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + dataBinding?: DataBindingEvent; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + dataBound?: DataBoundEvent; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + */ + updateTooltip?: UpdateTooltipEvent; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + */ + hideTooltip?: HideTooltipEvent; + + /** + * Option for igShapeChart + */ + [optionName: string]: any; +} +interface IgShapeChartMethods { + destroy(): void; + id(): void; + exportVisualData(): void; + + /** + * Find index of item within actual data used by chart. + * + * @param item The reference to item. + */ + findIndexOfItem(item: Object): number; + + /** + * Get item within actual data used by chart. That is similar to this.getData()[ index ]. + * + * @param index Index of data item. + */ + getDataItem(index: Object): Object; + + /** + * Get reference of actual data used by chart. + */ + getData(): any[]; + + /** + * Adds a new item to the data source and notifies the chart. + * + * @param item The item that we want to add to the data source. + */ + addItem(item: Object): Object; + + /** + * Inserts a new item to the data source and notifies the chart. + * + * @param item the new item that we want to insert in the data source. + * @param index The index in the data source where the new item will be inserted. + */ + insertItem(item: Object, index: number): Object; + + /** + * Deletes an item from the data source and notifies the chart. + * + * @param index The index in the data source from where the item will be been removed. + */ + removeItem(index: number): Object; + + /** + * Updates an item in the data source and notifies the chart. + * + * @param index The index of the item in the data source that we want to change. + * @param item The new item object that will be set in the data source. + */ + setItem(index: number, item: Object): Object; + + /** + * Notifies the chart that an item has been set in an associated data source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source that has been changed. + * @param newItem the new item that has been set in the collection. + * @param oldItem the old item that has been overwritten in the collection. + */ + notifySetItem(dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; + + /** + * Notifies the chart that the items have been cleared from an associated data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + */ + notifyClearItems(dataSource: Object): Object; + + /** + * Notifies the target axis or series that an item has been inserted at the specified index in its data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source where the new item has been inserted. + * @param newItem the new item that has been set in the collection. + */ + notifyInsertItem(dataSource: Object, index: number, newItem: Object): Object; + + /** + * Notifies the target axis or series that an item has been removed from the specified index in its data source. + * It's not necessary to notify more than one target of a change if they share the same items source. + * + * @param dataSource The data source in which the change happened. + * @param index The index in the items source from where the old item has been removed. + * @param oldItem the old item that has been removed from the collection. + */ + notifyRemoveItem(dataSource: Object, index: number, oldItem: Object): Object; + + /** + * Get reference to chart object. + */ + chart(): Object; + + /** + * Binds data to the chart + */ + dataBind(): void; + + /** + * Forces any pending deferred work to render on the chart before continuing + */ + flush(): void; +} +interface JQuery { + data(propertyName: "igShapeChart"): IgShapeChartMethods; +} + +interface JQuery { + igShapeChart(methodName: "destroy"): void; + igShapeChart(methodName: "id"): void; + igShapeChart(methodName: "exportVisualData"): void; + igShapeChart(methodName: "findIndexOfItem", item: Object): number; + igShapeChart(methodName: "getDataItem", index: Object): Object; + igShapeChart(methodName: "getData"): any[]; + igShapeChart(methodName: "addItem", item: Object): Object; + igShapeChart(methodName: "insertItem", item: Object, index: number): Object; + igShapeChart(methodName: "removeItem", index: number): Object; + igShapeChart(methodName: "setItem", index: number, item: Object): Object; + igShapeChart(methodName: "notifySetItem", dataSource: Object, index: number, newItem: Object, oldItem: Object): Object; + igShapeChart(methodName: "notifyClearItems", dataSource: Object): Object; + igShapeChart(methodName: "notifyInsertItem", dataSource: Object, index: number, newItem: Object): Object; + igShapeChart(methodName: "notifyRemoveItem", dataSource: Object, index: number, oldItem: Object): Object; + igShapeChart(methodName: "chart"): Object; + igShapeChart(methodName: "dataBind"): void; + igShapeChart(methodName: "flush"): void; + + /** + * The triangulated file source URI or an instance of $.ig.ShapeDataSource. + */ + igShapeChart(optionLiteral: 'option', optionName: "shapeDataSource"): string; + + /** + * The triangulated file source URI or an instance of $.ig.ShapeDataSource. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "shapeDataSource", optionValue: string): void; + + /** + * String The database source URI. + */ + igShapeChart(optionLiteral: 'option', optionName: "databaseSource"): string; + + /** + * String The database source URI. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "databaseSource", optionValue: string): void; + + /** + * The triangulated file source URI or an instance of $.ig.TriangulationDataSource. + */ + igShapeChart(optionLiteral: 'option', optionName: "triangulationDataSource"): string; + + /** + * The triangulated file source URI or an instance of $.ig.TriangulationDataSource. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "triangulationDataSource", optionValue: string): void; + + /** + * Gets the id of a template element to use for tooltips, or markup representing the tooltip template. + */ + igShapeChart(optionLiteral: 'option', optionName: "tooltipTemplate"): any; + + /** + * Sets the id of a template element to use for tooltips, or markup representing the tooltip template. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "tooltipTemplate", optionValue: any): void; + + /** + * Gets the names of tooltip templates + */ + igShapeChart(optionLiteral: 'option', optionName: "tooltipTemplates"): any; + + /** + * Sets the names of tooltip templates + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "tooltipTemplates", optionValue: any): void; + + /** + * Gets the left margin of chart title + */ + igShapeChart(optionLiteral: 'option', optionName: "titleLeftMargin"): number; + + /** + * Sets the left margin of chart title + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "titleLeftMargin", optionValue: number): void; + + /** + * Gets the right margin of chart title + */ + igShapeChart(optionLiteral: 'option', optionName: "titleRightMargin"): number; + + /** + * Sets the right margin of chart title + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "titleRightMargin", optionValue: number): void; + + /** + * Gets the top margin of chart title + */ + igShapeChart(optionLiteral: 'option', optionName: "titleTopMargin"): number; + + /** + * Sets the top margin of chart title + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "titleTopMargin", optionValue: number): void; + + /** + * Gets the bottom margin of chart title + */ + igShapeChart(optionLiteral: 'option', optionName: "titleBottomMargin"): number; + + /** + * Sets the bottom margin of chart title + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "titleBottomMargin", optionValue: number): void; + + /** + * Gets the left margin of chart subtitle + */ + igShapeChart(optionLiteral: 'option', optionName: "subtitleLeftMargin"): number; + + /** + * Sets the left margin of chart subtitle + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "subtitleLeftMargin", optionValue: number): void; + + /** + * Gets the top margin of chart subtitle + */ + igShapeChart(optionLiteral: 'option', optionName: "subtitleTopMargin"): number; + + /** + * Sets the top margin of chart subtitle + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "subtitleTopMargin", optionValue: number): void; + + /** + * Gets the right margin of chart subtitle + */ + igShapeChart(optionLiteral: 'option', optionName: "subtitleRightMargin"): number; + + /** + * Sets the right margin of chart subtitle + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "subtitleRightMargin", optionValue: number): void; + + /** + * Gets the bottom margin of chart subtitle + */ + igShapeChart(optionLiteral: 'option', optionName: "subtitleBottomMargin"): number; + + /** + * Sets the bottom margin of chart subtitle + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "subtitleBottomMargin", optionValue: number): void; + + /** + * Gets color of chart subtitle + */ + igShapeChart(optionLiteral: 'option', optionName: "subtitleTextColor"): string; + + /** + * Sets color of chart subtitle + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "subtitleTextColor", optionValue: string): void; + + /** + * Gets color of chart title + */ + igShapeChart(optionLiteral: 'option', optionName: "titleTextColor"): string; + + /** + * Sets color of chart title + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "titleTextColor", optionValue: string): void; + + /** + * Gets the left margin of the chart content. + */ + igShapeChart(optionLiteral: 'option', optionName: "leftMargin"): number; + + /** + * Sets the left margin of the chart content. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "leftMargin", optionValue: number): void; + + /** + * Gets the top margin of the chart content. + */ + igShapeChart(optionLiteral: 'option', optionName: "topMargin"): number; + + /** + * Sets the top margin of the chart content. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "topMargin", optionValue: number): void; + + /** + * Gets the right margin of the chart content. + */ + igShapeChart(optionLiteral: 'option', optionName: "rightMargin"): number; + + /** + * Sets the right margin of the chart content. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "rightMargin", optionValue: number): void; + + /** + * Gets the bottom margin around the chart content. + */ + igShapeChart(optionLiteral: 'option', optionName: "bottomMargin"): number; + + /** + * Sets the bottom margin around the chart content. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "bottomMargin", optionValue: number): void; + + /** + * Gets the duration used for animating series plots when the data is changing + */ + igShapeChart(optionLiteral: 'option', optionName: "transitionDuration"): number; + + /** + * Sets the duration used for animating series plots when the data is changing + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "transitionDuration", optionValue: number): void; + + /** + * Gets the easing function used for animating series plots when the data is changing. + * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. + */ + igShapeChart(optionLiteral: 'option', optionName: "transitionEasingFunction"): any; + + /** + * Sets the easing function used for animating series plots when the data is changing. + * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "transitionEasingFunction", optionValue: any): void; + + /** + * Gets a function for creating wrapped tooltip + */ + igShapeChart(optionLiteral: 'option', optionName: "createWrappedTooltip"): any; + + /** + * Sets a function for creating wrapped tooltip + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "createWrappedTooltip", optionValue: any): void; + + /** + * Gets the widget of this control + */ + igShapeChart(optionLiteral: 'option', optionName: "widget"): any; + + /** + * Sets the widget of this control + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "widget", optionValue: any): void; + + /** + * Gets CSS font property for the chart subtitle + */ + igShapeChart(optionLiteral: 'option', optionName: "subtitleTextStyle"): string; + + /** + * Sets CSS font property for the chart subtitle + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "subtitleTextStyle", optionValue: string): void; + + /** + * Gets CSS font property for the chart title + */ + igShapeChart(optionLiteral: 'option', optionName: "titleTextStyle"): string; + + /** + * Sets CSS font property for the chart title + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "titleTextStyle", optionValue: string): void; + + /** + * Gets a collection of data items used to generate the chart. + * The ItemsSource of this chart can be a list of objects containing one or more numeric properties. + * Additionally, if the objects in the list implement the IEnumerable interface, + * the Chart will attempt to delve into the sub-collections when reading through the data source. + * Databinding can be further configured by attributing the data item classes + * with the DataSeriesMemberIntentAttribute. + */ + igShapeChart(optionLiteral: 'option', optionName: "itemsSource"): any; + + /** + * Sets a collection of data items used to generate the chart. + * The ItemsSource of this chart can be a list of objects containing one or more numeric properties. + * Additionally, if the objects in the list implement the IEnumerable interface, + * the Chart will attempt to delve into the sub-collections when reading through the data source. + * Databinding can be further configured by attributing the data item classes + * with the DataSeriesMemberIntentAttribute. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "itemsSource", optionValue: any): void; + + /** + * Gets a set of property paths that should be included for consideration by the category chart, leaving the remainder excluded. If null, all properties will be considered. + */ + igShapeChart(optionLiteral: 'option', optionName: "includedProperties"): any; + + /** + * Sets a set of property paths that should be included for consideration by the category chart, leaving the remainder excluded. If null, all properties will be considered. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "includedProperties", optionValue: any): void; + + /** + * Gets a set of property paths that should be excluded from consideration by the category chart. + */ + igShapeChart(optionLiteral: 'option', optionName: "excludedProperties"): any; + + /** + * Sets a set of property paths that should be excluded from consideration by the category chart. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "excludedProperties", optionValue: any): void; + + /** + * Gets the palette of brushes to use for coloring the chart series. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igShapeChart(optionLiteral: 'option', optionName: "brushes"): any; + + /** + * Sets the palette of brushes to use for coloring the chart series. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "brushes", optionValue: any): void; + + /** + * Gets the palette of brushes to use for outlines on the chart series. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igShapeChart(optionLiteral: 'option', optionName: "outlines"): any; + + /** + * Sets the palette of brushes to use for outlines on the chart series. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "outlines", optionValue: any): void; + + /** + * Gets the legend to connect this chart to. + * When the legend property is set, the chart will use it to display information about its series. Legends can be shared by multiple chart controls. + */ + igShapeChart(optionLiteral: 'option', optionName: "legend"): any; + + /** + * Sets the legend to connect this chart to. + * When the legend property is set, the chart will use it to display information about its series. Legends can be shared by multiple chart controls. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "legend", optionValue: any): void; + + /** + * Gets whether the chart can be horizontally zoomed through user interactions. + */ + igShapeChart(optionLiteral: 'option', optionName: "isHorizontalZoomEnabled"): boolean; + + /** + * Sets whether the chart can be horizontally zoomed through user interactions. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "isHorizontalZoomEnabled", optionValue: boolean): void; + + /** + * Gets whether the chart can be vertically zoomed through user interactions. + */ + igShapeChart(optionLiteral: 'option', optionName: "isVerticalZoomEnabled"): boolean; + + /** + * Sets whether the chart can be vertically zoomed through user interactions. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "isVerticalZoomEnabled", optionValue: boolean): void; + + /** + * Gets the rectangle representing the current scroll and zoom state of the chart. + * WindowRect is expressed as a Rectangle with coordinates and sizes between 0 and 1. + * The provided object should have numeric properties called left, top, width and height. + */ + igShapeChart(optionLiteral: 'option', optionName: "windowRect"): any; + + /** + * Sets the rectangle representing the current scroll and zoom state of the chart. + * WindowRect is expressed as a Rectangle with coordinates and sizes between 0 and 1. + * The provided object should have numeric properties called left, top, width and height. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "windowRect", optionValue: any): void; + + /** + * Gets text to display above the plot area. + */ + igShapeChart(optionLiteral: 'option', optionName: "title"): string; + + /** + * Sets text to display above the plot area. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "title", optionValue: string): void; + + /** + * Gets text to display below the Title, above the plot area. + */ + igShapeChart(optionLiteral: 'option', optionName: "subtitle"): string; + + /** + * Sets text to display below the Title, above the plot area. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "subtitle", optionValue: string): void; + + /** + * Gets horizontal alignment which determines the title position, relative to the left and right edges of the control. + */ + + igShapeChart(optionLiteral: 'option', optionName: "titleAlignment"): string; + + /** + * Sets horizontal alignment which determines the title position, relative to the left and right edges of the control. + * + * @optionValue New value to be set. + */ + + igShapeChart(optionLiteral: 'option', optionName: "titleAlignment", optionValue: string): void; + + /** + * Gets horizontal alignment which determines the subtitle position, relative to the left and right edges of the control. + */ + + igShapeChart(optionLiteral: 'option', optionName: "subtitleAlignment"): string; + + /** + * Sets horizontal alignment which determines the subtitle position, relative to the left and right edges of the control. + * + * @optionValue New value to be set. + */ + + igShapeChart(optionLiteral: 'option', optionName: "subtitleAlignment", optionValue: string): void; + + /** + * Gets the behavior that determines how unknown values will be plotted on the chart.Null and Double.NaN are two examples of unknown values. + * + */ + + igShapeChart(optionLiteral: 'option', optionName: "unknownValuePlotting"): string; + + /** + * Sets the behavior that determines how unknown values will be plotted on the chart.Null and Double.NaN are two examples of unknown values. + * + * + * @optionValue New value to be set. + */ + + igShapeChart(optionLiteral: 'option', optionName: "unknownValuePlotting", optionValue: string): void; + + /** + * Gets the rendering resolution for all series in this chart. + * Where n = Resolution, for every n horizontal pixels, combine all items into a single datapoint. When Resolution = 0, all datapoints will be rendered as graphical objects. Charts with a higher resolution will have faster performance. + */ + igShapeChart(optionLiteral: 'option', optionName: "resolution"): number; + + /** + * Sets the rendering resolution for all series in this chart. + * Where n = Resolution, for every n horizontal pixels, combine all items into a single datapoint. When Resolution = 0, all datapoints will be rendered as graphical objects. Charts with a higher resolution will have faster performance. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "resolution", optionValue: number): void; + + /** + * Gets the thickness for all series in this chart. Depending on the ChartType, this can be the main brush used, or just the outline. + */ + igShapeChart(optionLiteral: 'option', optionName: "thickness"): number; + + /** + * Sets the thickness for all series in this chart. Depending on the ChartType, this can be the main brush used, or just the outline. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "thickness", optionValue: number): void; + + /** + * Gets the marker shapes used for indicating location of data points in this chart. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + */ + igShapeChart(optionLiteral: 'option', optionName: "markerTypes"): any; + + /** + * Sets the marker shapes used for indicating location of data points in this chart. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "markerTypes", optionValue: any): void; + + /** + * Gets the palette of brushes used for rendering fill area of data point markers. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igShapeChart(optionLiteral: 'option', optionName: "markerBrushes"): any; + + /** + * Sets the palette of brushes used for rendering fill area of data point markers. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "markerBrushes", optionValue: any): void; + + /** + * Gets the palette of brushes used for rendering outlines of data point markers. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igShapeChart(optionLiteral: 'option', optionName: "markerOutlines"): any; + + /** + * Sets the palette of brushes used for rendering outlines of data point markers. + * This property applies only to these chart types: point, line, spline, bubble, and polygon + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "markerOutlines", optionValue: any): void; + + /** + * Gets the maximum number of markers displyed in the plot area of the chart. + */ + igShapeChart(optionLiteral: 'option', optionName: "markerMaxCount"): number; + + /** + * Sets the maximum number of markers displyed in the plot area of the chart. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "markerMaxCount", optionValue: number): void; + + /** + * Gets the palette of brushes to used for coloring trend lines in this chart. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + */ + igShapeChart(optionLiteral: 'option', optionName: "trendLineBrushes"): any; + + /** + * Sets the palette of brushes to used for coloring trend lines in this chart. + * The value provided should be an array of CSS color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection + * The value provided should be an array of css color strings or JavaScript objects defining gradients. Optionally the first element can be a string reading "RGB" or "HSV" to specify the interpolation mode of the collection. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "trendLineBrushes", optionValue: any): void; + + /** + * Gets the formula used for calculating trend lines in this chart.This property applies only to these chart types: point, line, spline, and bubble + * + */ + + igShapeChart(optionLiteral: 'option', optionName: "trendLineType"): string; + + /** + * Sets the formula used for calculating trend lines in this chart.This property applies only to these chart types: point, line, spline, and bubble + * + * + * @optionValue New value to be set. + */ + + igShapeChart(optionLiteral: 'option', optionName: "trendLineType", optionValue: string): void; + + /** + * Gets the thickness of the trend lines in this chart. + * This property applies only to these chart types: point, line, spline, and bubble + */ + igShapeChart(optionLiteral: 'option', optionName: "trendLineThickness"): number; + + /** + * Sets the thickness of the trend lines in this chart. + * This property applies only to these chart types: point, line, spline, and bubble + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "trendLineThickness", optionValue: number): void; + + /** + * Gets a value indicating whether grid and tick lines are aligned to device pixels. + */ + igShapeChart(optionLiteral: 'option', optionName: "alignsGridLinesToPixels"): boolean; + + /** + * Sets a value indicating whether grid and tick lines are aligned to device pixels. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "alignsGridLinesToPixels", optionValue: boolean): void; + igShapeChart(optionLiteral: 'option', optionName: "trendLinePeriod"): number; + igShapeChart(optionLiteral: 'option', optionName: "trendLinePeriod", optionValue: number): void; + + /** + * Gets function which takes an context object and returns a formatted label for the X-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisFormatLabel"): any; + + /** + * Sets function which takes an context object and returns a formatted label for the X-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisFormatLabel", optionValue: any): void; + + /** + * Gets function which takes a context object and returns a formatted label for the Y-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisFormatLabel"): any; + + /** + * Sets function which takes a context object and returns a formatted label for the Y-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisFormatLabel", optionValue: any): void; + + /** + * Gets the left margin of labels on the X-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelLeftMargin"): number; + + /** + * Sets the left margin of labels on the X-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelLeftMargin", optionValue: number): void; + + /** + * Gets the top margin of labels on the X-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelTopMargin"): number; + + /** + * Sets the top margin of labels on the X-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelTopMargin", optionValue: number): void; + + /** + * Gets the right margin of labels on the X-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelRightMargin"): number; + + /** + * Sets the right margin of labels on the X-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelRightMargin", optionValue: number): void; + + /** + * Gets the bottom margin of labels on the X-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelBottomMargin"): number; + + /** + * Sets the bottom margin of labels on the X-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelBottomMargin", optionValue: number): void; + + /** + * Gets the left margin of labels on the Y-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelLeftMargin"): number; + + /** + * Sets the left margin of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelLeftMargin", optionValue: number): void; + + /** + * Gets the top margin of labels on the Y-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelTopMargin"): number; + + /** + * Sets the top margin of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelTopMargin", optionValue: number): void; + + /** + * Gets the right margin of labels on the Y-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelRightMargin"): number; + + /** + * Sets the right margin of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelRightMargin", optionValue: number): void; + + /** + * Gets the bottom margin of labels on the Y-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelBottomMargin"): number; + + /** + * Sets the bottom margin of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelBottomMargin", optionValue: number): void; + + /** + * Gets color of labels on the X-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelTextColor"): string; + + /** + * Sets color of labels on the X-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelTextColor", optionValue: string): void; + + /** + * Gets color of labels on the Y-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelTextColor"): string; + + /** + * Sets color of labels on the Y-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelTextColor", optionValue: string): void; + + /** + * Gets the margin around a title on the X-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitleMargin"): number; + + /** + * Sets the margin around a title on the X-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitleMargin", optionValue: number): void; + + /** + * Gets the margin around a title on the Y-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitleMargin"): number; + + /** + * Sets the margin around a title on the Y-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitleMargin", optionValue: number): void; + + /** + * Gets the left margin of a title on the X-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitleLeftMargin"): number; + + /** + * Sets the left margin of a title on the X-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitleLeftMargin", optionValue: number): void; + + /** + * Gets the left margin of a title on the Y-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitleLeftMargin"): number; + + /** + * Sets the left margin of a title on the Y-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitleLeftMargin", optionValue: number): void; + + /** + * Gets the top margin of a title on the X-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitleTopMargin"): number; + + /** + * Sets the top margin of a title on the X-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitleTopMargin", optionValue: number): void; + + /** + * Gets the top margin of a title on the Y-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitleTopMargin"): number; + + /** + * Sets the top margin of a title on the Y-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitleTopMargin", optionValue: number): void; + + /** + * Gets the right margin of a title on the X-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitleRightMargin"): number; + + /** + * Sets the right margin of a title on the X-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitleRightMargin", optionValue: number): void; + + /** + * Gets the right margin of a title on the Y-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitleRightMargin"): number; + + /** + * Sets the right margin of a title on the Y-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitleRightMargin", optionValue: number): void; + + /** + * Gets the bottom margin of a title on the X-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitleBottomMargin"): number; + + /** + * Sets the bottom margin of a title on the X-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitleBottomMargin", optionValue: number): void; + + /** + * Gets the bottom margin of a title on the Y-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitleBottomMargin"): number; + + /** + * Sets the bottom margin of a title on the Y-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitleBottomMargin", optionValue: number): void; + + /** + * Gets color of title on the X-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitleTextColor"): string; + + /** + * Sets color of title on the X-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitleTextColor", optionValue: string): void; + + /** + * Gets color of title on the Y-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitleTextColor"): string; + + /** + * Sets color of title on the Y-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitleTextColor", optionValue: string): void; + + /** + * Gets CSS font property for labels on X-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelTextStyle"): string; + + /** + * Sets CSS font property for labels on X-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelTextStyle", optionValue: string): void; + + /** + * Gets CSS font property for labels on Y-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelTextStyle"): string; + + /** + * Sets CSS font property for labels on Y-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelTextStyle", optionValue: string): void; + + /** + * Gets CSS font property for title on X-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitleTextStyle"): string; + + /** + * Sets CSS font property for title on X-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitleTextStyle", optionValue: string): void; + + /** + * Gets CSS font property for title on Y-axis + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitleTextStyle"): string; + + /** + * Sets CSS font property for title on Y-axis + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitleTextStyle", optionValue: string): void; + + /** + * Gets the format for labels along the X-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabel"): any; + + /** + * Sets the format for labels along the X-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabel", optionValue: any): void; + + /** + * Gets the format for labels along the Y-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabel"): any; + + /** + * Sets the format for labels along the Y-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabel", optionValue: any): void; + + /** + * Gets the color to apply to major gridlines along the X-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisMajorStroke"): string; + + /** + * Sets the color to apply to major gridlines along the X-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisMajorStroke", optionValue: string): void; + + /** + * Gets the color to apply to major gridlines along the Y-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisMajorStroke"): string; + + /** + * Sets the color to apply to major gridlines along the Y-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisMajorStroke", optionValue: string): void; + + /** + * Gets the thickness to apply to major gridlines along the X-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisMajorStrokeThickness"): number; + + /** + * Sets the thickness to apply to major gridlines along the X-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisMajorStrokeThickness", optionValue: number): void; + + /** + * Gets the thickness to apply to major gridlines along the Y-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisMajorStrokeThickness"): number; + + /** + * Sets the thickness to apply to major gridlines along the Y-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisMajorStrokeThickness", optionValue: number): void; + + /** + * Gets the thickness to apply to minor gridlines along the X-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisMinorStrokeThickness"): number; + + /** + * Sets the thickness to apply to minor gridlines along the X-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisMinorStrokeThickness", optionValue: number): void; + + /** + * Gets the thickness to apply to minor gridlines along the Y-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisMinorStrokeThickness"): number; + + /** + * Sets the thickness to apply to minor gridlines along the Y-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisMinorStrokeThickness", optionValue: number): void; + + /** + * Gets the color to apply to stripes along the X-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisStrip"): string; + + /** + * Sets the color to apply to stripes along the X-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisStrip", optionValue: string): void; + + /** + * Gets the color to apply to stripes along the Y-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisStrip"): string; + + /** + * Sets the color to apply to stripes along the Y-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisStrip", optionValue: string): void; + + /** + * Gets the color to apply to the X-axis line. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisStroke"): string; + + /** + * Sets the color to apply to the X-axis line. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisStroke", optionValue: string): void; + + /** + * Gets the color to apply to the Y-axis line. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisStroke"): string; + + /** + * Sets the color to apply to the Y-axis line. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisStroke", optionValue: string): void; + + /** + * Gets the thickness to apply to the X-axis line. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisStrokeThickness"): number; + + /** + * Sets the thickness to apply to the X-axis line. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisStrokeThickness", optionValue: number): void; + + /** + * Gets the thickness to apply to the Y-axis line. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisStrokeThickness"): number; + + /** + * Sets the thickness to apply to the Y-axis line. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisStrokeThickness", optionValue: number): void; + + /** + * Gets the length of tickmarks along the X-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTickLength"): number; + + /** + * Sets the length of tickmarks along the X-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTickLength", optionValue: number): void; + + /** + * Gets the length of tickmarks along the Y-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTickLength"): number; + + /** + * Sets the length of tickmarks along the Y-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTickLength", optionValue: number): void; + + /** + * Gets the color to apply to tickmarks along the X-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTickStroke"): string; + + /** + * Sets the color to apply to tickmarks along the X-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTickStroke", optionValue: string): void; + + /** + * Gets the color to apply to tickmarks along the Y-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTickStroke"): string; + + /** + * Sets the color to apply to tickmarks along the Y-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTickStroke", optionValue: string): void; + + /** + * Gets the thickness to apply to tickmarks along the X-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTickStrokeThickness"): number; + + /** + * Sets the thickness to apply to tickmarks along the X-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTickStrokeThickness", optionValue: number): void; + + /** + * Gets the thickness to apply to tickmarks along the Y-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTickStrokeThickness"): number; + + /** + * Sets the thickness to apply to tickmarks along the Y-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTickStrokeThickness", optionValue: number): void; + + /** + * Gets the Text to display below the X-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitle"): string; + + /** + * Sets the Text to display below the X-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitle", optionValue: string): void; + + /** + * Gets the Text to display to the left of the Y-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitle"): string; + + /** + * Sets the Text to display to the left of the Y-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitle", optionValue: string): void; + + /** + * Gets the color to apply to minor gridlines along the X-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisMinorStroke"): string; + + /** + * Sets the color to apply to minor gridlines along the X-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisMinorStroke", optionValue: string): void; + + /** + * Gets the color to apply to minor gridlines along the Y-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisMinorStroke"): string; + + /** + * Sets the color to apply to minor gridlines along the Y-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisMinorStroke", optionValue: string): void; + + /** + * Gets the angle of rotation for labels along the X-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelAngle"): number; + + /** + * Sets the angle of rotation for labels along the X-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelAngle", optionValue: number): void; + + /** + * Gets the angle of rotation for labels along the Y-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelAngle"): number; + + /** + * Sets the angle of rotation for labels along the Y-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelAngle", optionValue: number): void; + + /** + * Gets the distance between the X-axis and the bottom of the chart. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisExtent"): number; + + /** + * Sets the distance between the X-axis and the bottom of the chart. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisExtent", optionValue: number): void; + + /** + * Gets the distance between the Y-axis and the left edge of the chart. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisExtent"): number; + + /** + * Sets the distance between the Y-axis and the left edge of the chart. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisExtent", optionValue: number): void; + + /** + * Gets the angle of rotation for the X-axis title. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitleAngle"): number; + + /** + * Sets the angle of rotation for the X-axis title. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitleAngle", optionValue: number): void; + + /** + * Gets the angle of rotation for the Y-axis title. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitleAngle"): number; + + /** + * Sets the angle of rotation for the Y-axis title. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitleAngle", optionValue: number): void; + + /** + * Gets whether to invert the direction of the X-axis by placing the first data items on the right side of the chart. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisInverted"): boolean; + + /** + * Sets whether to invert the direction of the X-axis by placing the first data items on the right side of the chart. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisInverted", optionValue: boolean): void; + + /** + * Gets whether to invert the direction of the Y-axis by placing the minimum numeric value at the top of the chart. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisInverted"): boolean; + + /** + * Sets whether to invert the direction of the Y-axis by placing the minimum numeric value at the top of the chart. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisInverted", optionValue: boolean): void; + + /** + * Gets Horizontal alignment of the X-axis title. + */ + + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitleAlignment"): string; + + /** + * Sets Horizontal alignment of the X-axis title. + * + * @optionValue New value to be set. + */ + + igShapeChart(optionLiteral: 'option', optionName: "xAxisTitleAlignment", optionValue: string): void; + + /** + * Gets Vertical alignment of the Y-axis title. + */ + + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitleAlignment"): string; + + /** + * Sets Vertical alignment of the Y-axis title. + * + * @optionValue New value to be set. + */ + + igShapeChart(optionLiteral: 'option', optionName: "yAxisTitleAlignment", optionValue: string): void; + + /** + * Gets Horizontal alignment of X-axis labels. + */ + + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelHorizontalAlignment"): string; + + /** + * Sets Horizontal alignment of X-axis labels. + * + * @optionValue New value to be set. + */ + + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelHorizontalAlignment", optionValue: string): void; + + /** + * Gets Horizontal alignment of Y-axis labels. + */ + + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelHorizontalAlignment"): string; + + /** + * Sets Horizontal alignment of Y-axis labels. + * + * @optionValue New value to be set. + */ + + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelHorizontalAlignment", optionValue: string): void; + + /** + * Gets Vertical alignment of X-axis labels. + */ + + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelVerticalAlignment"): string; + + /** + * Sets Vertical alignment of X-axis labels. + * + * @optionValue New value to be set. + */ + + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelVerticalAlignment", optionValue: string): void; + + /** + * Gets Vertical alignment of Y-axis labels. + */ + + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelVerticalAlignment"): string; + + /** + * Sets Vertical alignment of Y-axis labels. + * + * @optionValue New value to be set. + */ + + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelVerticalAlignment", optionValue: string): void; + + /** + * Gets Visibility of X-axis labels. + */ + + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelVisibility"): string; + + /** + * Sets Visibility of X-axis labels. + * + * @optionValue New value to be set. + */ + + igShapeChart(optionLiteral: 'option', optionName: "xAxisLabelVisibility", optionValue: string): void; + + /** + * Gets Visibility of Y-axis labels. + */ + + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelVisibility"): string; + + /** + * Sets Visibility of Y-axis labels. + * + * @optionValue New value to be set. + */ + + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelVisibility", optionValue: string): void; + + /** + * The location of Y-axis labels, relative to the plot area. + */ + + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelLocation"): string; + + /** + * The location of Y-axis labels, relative to the plot area. + * + * @optionValue New value to be set. + */ + + igShapeChart(optionLiteral: 'option', optionName: "yAxisLabelLocation", optionValue: string): void; + + /** + * Gets the frequency of displayed labels along the X-axis. + * Gets the set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisInterval"): number; + + /** + * Sets the frequency of displayed labels along the X-axis. + * sets the set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisInterval", optionValue: number): void; + + /** + * Gets the frequency of displayed minor lines along the X-axis. + * Gets the set value is a factor that determines how the minor lines will be displayed. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisMinorInterval"): number; + + /** + * Sets the frequency of displayed minor lines along the X-axis. + * sets the set value is a factor that determines how the minor lines will be displayed. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisMinorInterval", optionValue: number): void; + + /** + * Gets the distance between each label and grid line along the Y-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisInterval"): number; + + /** + * Sets the distance between each label and grid line along the Y-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisInterval", optionValue: number): void; + + /** + * Gets whether the Y-axis should use a logarithmic scale instead of a linear one. + * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the Y-axis minimum is greater than zero. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisIsLogarithmic"): boolean; + + /** + * Sets whether the Y-axis should use a logarithmic scale instead of a linear one. + * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the Y-axis minimum is greater than zero. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisIsLogarithmic", optionValue: boolean): void; + + /** + * Gets the base value to use in the log function when mapping the position of data items along the Y-axis. + * This property is effective only when YAxisIsLogarithmic is true. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisLogarithmBase"): number; + + /** + * Sets the base value to use in the log function when mapping the position of data items along the Y-axis. + * This property is effective only when YAxisIsLogarithmic is true. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisLogarithmBase", optionValue: number): void; + + /** + * Gets the data value corresponding to the minimum value of the Y-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisMinimumValue"): number; + + /** + * Sets the data value corresponding to the minimum value of the Y-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisMinimumValue", optionValue: number): void; + + /** + * Gets the data value corresponding to the maximum value of the Y-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisMaximumValue"): number; + + /** + * Sets the data value corresponding to the maximum value of the Y-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisMaximumValue", optionValue: number): void; + + /** + * Gets the frequency of displayed minor lines along the Y-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisMinorInterval"): number; + + /** + * Sets the frequency of displayed minor lines along the Y-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisMinorInterval", optionValue: number): void; + + /** + * Gets whether the X-axis will use a logarithmic scale, instead of a linear one. + * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the X-axis minimum is greater than zero. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisIsLogarithmic"): boolean; + + /** + * Sets whether the X-axis will use a logarithmic scale, instead of a linear one. + * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the X-axis minimum is greater than zero. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisIsLogarithmic", optionValue: boolean): void; + + /** + * Gets the base value to use in the log function when mapping the position of data items along the X-axis. + * This property is effective only when y-axis is logarithmic + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisLogarithmBase"): number; + + /** + * Sets the base value to use in the log function when mapping the position of data items along the X-axis. + * This property is effective only when y-axis is logarithmic + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisLogarithmBase", optionValue: number): void; + + /** + * Gets the data value corresponding to the minimum value on the X-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisMinimumValue"): number; + + /** + * Sets the data value corresponding to the minimum value on the X-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisMinimumValue", optionValue: number): void; + + /** + * Gets the data value corresponding to the maximum value on the X-axis. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisMaximumValue"): number; + + /** + * Sets the data value corresponding to the maximum value on the X-axis. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisMaximumValue", optionValue: number): void; + + /** + * Gets whether the large numbers on the X-axis labels are abbreviated. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisAbbreviateLargeNumbers"): boolean; + + /** + * Sets whether the large numbers on the X-axis labels are abbreviated. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "xAxisAbbreviateLargeNumbers", optionValue: boolean): void; + + /** + * Gets whether the large numbers on the Y-axis labels are abbreviated. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisAbbreviateLargeNumbers"): boolean; + + /** + * Sets whether the large numbers on the Y-axis labels are abbreviated. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "yAxisAbbreviateLargeNumbers", optionValue: boolean): void; + + /** + * Gets collision avoidance between markers on series that support this behaviour. + */ + + igShapeChart(optionLiteral: 'option', optionName: "markerCollision"): string; + + /** + * Sets collision avoidance between markers on series that support this behaviour. + * + * @optionValue New value to be set. + */ + + igShapeChart(optionLiteral: 'option', optionName: "markerCollision", optionValue: string): void; + + /** + * Gets the type of chart series to generate from the data. + */ + + igShapeChart(optionLiteral: 'option', optionName: "chartType"): string; + + /** + * Sets the type of chart series to generate from the data. + * + * @optionValue New value to be set. + */ + + igShapeChart(optionLiteral: 'option', optionName: "chartType", optionValue: string): void; + + /** + * The width of the chart. + */ + igShapeChart(optionLiteral: 'option', optionName: "width"): number; + + /** + * The width of the chart. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "width", optionValue: number): void; + + /** + * The height of the chart. + */ + igShapeChart(optionLiteral: 'option', optionName: "height"): number; + + /** + * The height of the chart. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "height", optionValue: number): void; + + /** + * Gets maximum number of displayed records in chart. + */ + igShapeChart(optionLiteral: 'option', optionName: "maxRecCount"): number; + + /** + * Sets maximum number of displayed records in chart. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "maxRecCount", optionValue: number): void; + + /** + * Gets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + */ + igShapeChart(optionLiteral: 'option', optionName: "dataSource"): any; + + /** + * Sets a valid data source. + * That can be instance of array or primitives, array of objects, instance of $.ig.DataSource, or any other data accepted by $.ig.DataSource. + * Note: if it is set to string and "dataSourceType" option is not set, then $.ig.JSONPDataSource is used. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; + + /** + * Gets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + */ + igShapeChart(optionLiteral: 'option', optionName: "dataSourceType"): string; + + /** + * Sets data source type (such as "json", "xml", etc). Please refer to the documentation of $.ig.DataSource and its type property + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; + + /** + * Gets url which is used for sending JSON on request for remote data. + */ + igShapeChart(optionLiteral: 'option', optionName: "dataSourceUrl"): string; + + /** + * Sets url which is used for sending JSON on request for remote data. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "dataSourceUrl", optionValue: string): void; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + */ + igShapeChart(optionLiteral: 'option', optionName: "responseTotalRecCountKey"): string; + + /** + * See $.ig.DataSource. property in the response specifying the total number of records on the server. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "responseTotalRecCountKey", optionValue: string): void; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + */ + igShapeChart(optionLiteral: 'option', optionName: "responseDataKey"): string; + + /** + * See $.ig.DataSource. This is basically the property in the responses where data records are held, if the response is wrapped. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; + + /** + * Event raised when a property value is changed on this chart + */ + igShapeChart(optionLiteral: 'option', optionName: "propertyChanged"): PropertyChangedEvent; + + /** + * Event raised when a property value is changed on this chart + * + * @optionValue Define event handler function. + */ + igShapeChart(optionLiteral: 'option', optionName: "propertyChanged", optionValue: PropertyChangedEvent): void; + + /** + * Event raised when a series is initialized and added to this chart. + */ + igShapeChart(optionLiteral: 'option', optionName: "seriesAdded"): SeriesAddedEvent; + + /** + * Event raised when a series is initialized and added to this chart. + * + * @optionValue Define event handler function. + */ + igShapeChart(optionLiteral: 'option', optionName: "seriesAdded", optionValue: SeriesAddedEvent): void; + + /** + * Event raised when a series is removed from this chart. + */ + igShapeChart(optionLiteral: 'option', optionName: "seriesRemoved"): SeriesRemovedEvent; + + /** + * Event raised when a series is removed from this chart. + * + * @optionValue Define event handler function. + */ + igShapeChart(optionLiteral: 'option', optionName: "seriesRemoved", optionValue: SeriesRemovedEvent): void; + + /** + * Occurs when the pointer enters a Series. + */ + igShapeChart(optionLiteral: 'option', optionName: "seriesPointerEnter"): SeriesPointerEnterEvent; + + /** + * Occurs when the pointer enters a Series. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "seriesPointerEnter", optionValue: SeriesPointerEnterEvent): void; + + /** + * Occurs when the pointer leaves a Series. + */ + igShapeChart(optionLiteral: 'option', optionName: "seriesPointerLeave"): SeriesPointerLeaveEvent; + + /** + * Occurs when the pointer leaves a Series. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "seriesPointerLeave", optionValue: SeriesPointerLeaveEvent): void; + + /** + * Occurs when the pointer moves over a Series. + */ + igShapeChart(optionLiteral: 'option', optionName: "seriesPointerMove"): SeriesPointerMoveEvent; + + /** + * Occurs when the pointer moves over a Series. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "seriesPointerMove", optionValue: SeriesPointerMoveEvent): void; + + /** + * Occurs when the pointer is pressed down over a Series. + */ + igShapeChart(optionLiteral: 'option', optionName: "seriesPointerDown"): SeriesPointerDownEvent; + + /** + * Occurs when the pointer is pressed down over a Series. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "seriesPointerDown", optionValue: SeriesPointerDownEvent): void; + + /** + * Occurs when the pointer is released over a Series. + */ + igShapeChart(optionLiteral: 'option', optionName: "seriesPointerUp"): SeriesPointerUpEvent; + + /** + * Occurs when the pointer is released over a Series. + * + * @optionValue New value to be set. + */ + igShapeChart(optionLiteral: 'option', optionName: "seriesPointerUp", optionValue: SeriesPointerUpEvent): void; + + /** + * Event which is raised before data binding. + * Return false in order to cancel data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + igShapeChart(optionLiteral: 'option', optionName: "dataBinding"): DataBindingEvent; + + /** + * Event which is raised before data binding. + * Return false in order to cancel data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + * + * @optionValue Define event handler function. + */ + igShapeChart(optionLiteral: 'option', optionName: "dataBinding", optionValue: DataBindingEvent): void; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + */ + igShapeChart(optionLiteral: 'option', optionName: "dataBound"): DataBoundEvent; + + /** + * Event which is raised after data binding. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.data to obtain reference to array actual data which is displayed by chart. + * Use ui.dataSource to obtain reference to instance of $.ig.DataSource. + * + * @optionValue Define event handler function. + */ + igShapeChart(optionLiteral: 'option', optionName: "dataBound", optionValue: DataBoundEvent): void; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + */ + igShapeChart(optionLiteral: 'option', optionName: "updateTooltip"): UpdateTooltipEvent; + + /** + * Event which is raised before tooltip is updated. + * Return false in order to cancel updating and hide tooltip. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.text to obtain html of tooltip. Value of that member can be modified. If modified value is null or empty string, then current content of tooltip keeps old value. + * Use ui.item to obtain reference to item. Value of that member can be modified or replaced by custom item. + * Use ui.x to obtain left position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.y to obtain top position of tooltip in pixels relative to widget. Value of that member can be modified. + * Use ui.element to obtain reference to jquery object which represents tooltip. Value of that member can be replaced by custom element. + * + * @optionValue Define event handler function. + */ + igShapeChart(optionLiteral: 'option', optionName: "updateTooltip", optionValue: UpdateTooltipEvent): void; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + */ + igShapeChart(optionLiteral: 'option', optionName: "hideTooltip"): HideTooltipEvent; + + /** + * Event which is raised before tooltip is hidden. + * Return false in order to cancel hiding and keep tooltip visible. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to chart widget. + * Use ui.item to obtain reference to item. + * Use ui.element to obtain reference to jquery object which represents tooltip or value of ui.element from last updateTooltip event. Value of that member can be replaced by custom element. + * + * @optionValue Define event handler function. + */ + igShapeChart(optionLiteral: 'option', optionName: "hideTooltip", optionValue: HideTooltipEvent): void; + igShapeChart(options: IgShapeChart): JQuery; + igShapeChart(optionLiteral: 'option', optionName: string): any; + igShapeChart(optionLiteral: 'option', options: IgShapeChart): JQuery; + igShapeChart(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igShapeChart(methodName: string, ...methodParams: any[]): any; +} interface IgLoading { cssClass?: any; includeVerticalOffset?: boolean; @@ -75295,16 +88627,19 @@ interface IgSplitButtonItem { interface IgSplitButton { /** * Button items. + * */ items?: IgSplitButtonItem[]; /** * Default button item name. + * */ defaultItemName?: string; /** * Specifies whether the default button will be switched when another button is selected. + * */ swapDefaultEnabled?: boolean; @@ -75402,36 +88737,42 @@ interface JQuery { /** * Button items. + * */ igSplitButton(optionLiteral: 'option', optionName: "items"): IgSplitButtonItem[]; /** * Button items. * + * * @optionValue New value to be set. */ igSplitButton(optionLiteral: 'option', optionName: "items", optionValue: IgSplitButtonItem[]): void; /** * Default button item name. + * */ igSplitButton(optionLiteral: 'option', optionName: "defaultItemName"): string; /** * Default button item name. * + * * @optionValue New value to be set. */ igSplitButton(optionLiteral: 'option', optionName: "defaultItemName", optionValue: string): void; /** * Gets whether the default button will be switched when another button is selected. + * */ igSplitButton(optionLiteral: 'option', optionName: "swapDefaultEnabled"): boolean; /** * Sets whether the default button will be switched when another button is selected. * + * * @optionValue New value to be set. */ igSplitButton(optionLiteral: 'option', optionName: "swapDefaultEnabled", optionValue: boolean): void; @@ -75534,31 +88875,37 @@ interface JQuery { interface IgSplitterPanel { /** * Gets the size of the panel + * */ size?: string|number; /** * Gets the minimum size that the panel can have + * */ min?: string|number; /** * Gets the maximum size that the panel can have + * */ max?: string|number; /** * Gets whether the panel can be resized + * */ resizable?: boolean; /** * Gets whether the panel is initially collapsed + * */ collapsed?: boolean; /** * Gets whether the panel can be collapsed + * */ collapsible?: boolean; @@ -75616,6 +88963,7 @@ interface IgSplitter { /** * Gets/Sets the width of the container. * + * * Valid values: * "null" will stretch to fit data, if no other widths are defined. */ @@ -75624,6 +88972,7 @@ interface IgSplitter { /** * Gets/Sets the height of the container. * + * * Valid values: * "null" will fit the tree inside its parent container, if no other widths are defined. */ @@ -75632,6 +88981,7 @@ interface IgSplitter { /** * Specifies the orientation of the splitter. * + * * Valid values: * "vertical" * "horizontal" @@ -75640,19 +88990,40 @@ interface IgSplitter { /** * Array of objects options that specify the panels settings. The panels are no more than two. Settings are specified via enumeration. + * */ panels?: IgSplitterPanel[]; /** * Specifies drag delta of the split bar. In order to start dragging "move", the mouse has to be moved specific distance from its original position. + * */ dragDelta?: number; /** * Specifies whether the other splitters on the page will be resized as this splitter resizes. + * */ resizeOtherSplitters?: boolean; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Fired after collapsing is performed * @@ -75769,6 +89140,24 @@ interface IgSplitterMethods { * Destroys the igSplitter widget */ destroy(): void; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igSplitter"): IgSplitterMethods; @@ -75784,9 +89173,13 @@ interface JQuery { igSplitter(methodName: "setFirstPanelSize", size: Object): void; igSplitter(methodName: "setSecondPanelSize", size: Object): void; igSplitter(methodName: "destroy"): void; + igSplitter(methodName: "changeLocale", $container: Object): void; + igSplitter(methodName: "changeGlobalLanguage"): void; + igSplitter(methodName: "changeGlobalRegional"): void; /** * Gets/Sets the width of the container. + * */ igSplitter(optionLiteral: 'option', optionName: "width"): string|number; @@ -75794,6 +89187,7 @@ interface JQuery { /** * /Sets the width of the container. * + * * @optionValue New value to be set. */ @@ -75801,6 +89195,7 @@ interface JQuery { /** * Gets/Sets the height of the container. + * */ igSplitter(optionLiteral: 'option', optionName: "height"): string|number; @@ -75808,6 +89203,7 @@ interface JQuery { /** * /Sets the height of the container. * + * * @optionValue New value to be set. */ @@ -75815,6 +89211,7 @@ interface JQuery { /** * Gets the orientation of the splitter. + * */ igSplitter(optionLiteral: 'option', optionName: "orientation"): string; @@ -75822,6 +89219,7 @@ interface JQuery { /** * Sets the orientation of the splitter. * + * * @optionValue New value to be set. */ @@ -75829,40 +89227,90 @@ interface JQuery { /** * Array of objects options that specify the panels settings. The panels are no more than two. Settings are specified via enumeration. + * */ igSplitter(optionLiteral: 'option', optionName: "panels"): IgSplitterPanel[]; /** * Array of objects options that specify the panels settings. The panels are no more than two. Settings are specified via enumeration. * + * * @optionValue New value to be set. */ igSplitter(optionLiteral: 'option', optionName: "panels", optionValue: IgSplitterPanel[]): void; /** * Gets drag delta of the split bar. In order to start dragging "move", the mouse has to be moved specific distance from its original position. + * */ igSplitter(optionLiteral: 'option', optionName: "dragDelta"): number; /** * Sets drag delta of the split bar. In order to start dragging "move", the mouse has to be moved specific distance from its original position. * + * * @optionValue New value to be set. */ igSplitter(optionLiteral: 'option', optionName: "dragDelta", optionValue: number): void; /** * Gets whether the other splitters on the page will be resized as this splitter resizes. + * */ igSplitter(optionLiteral: 'option', optionName: "resizeOtherSplitters"): boolean; /** * Sets whether the other splitters on the page will be resized as this splitter resizes. * + * * @optionValue New value to be set. */ igSplitter(optionLiteral: 'option', optionName: "resizeOtherSplitters", optionValue: boolean): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igSplitter(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igSplitter(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igSplitter(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igSplitter(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igSplitter(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igSplitter(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Fired after collapsing is performed * @@ -76029,6 +89477,27 @@ interface ActivePaneChangedEventUIParam { visibleRange?: string; } +interface ActiveTableChangedEvent { + (event: Event, ui: ActiveTableChangedEventUIParam): void; +} + +interface ActiveTableChangedEventUIParam { + /** + * Gets a reference to the spreadsheet widget. + */ + owner?: any; + + /** + * Gets the previous active [Table](ig.excel.WorksheetTable). + */ + oldActiveTable?: any; + + /** + * Gets the current active [Table](ig.excel.WorksheetTable). + */ + newActiveTable?: any; +} + interface ActiveWorksheetChangedEvent { (event: Event, ui: ActiveWorksheetChangedEventUIParam): void; } @@ -76253,6 +89722,7 @@ interface IgSpreadsheet { /** * The width of the spreadsheet. It can be set as a number in pixels, string (px) or percentage (%). * + * * Valid values: * "string" The widget width can be set in pixels (px) and percentage (%). * "number" The widget width can be set as a number @@ -76262,6 +89732,7 @@ interface IgSpreadsheet { /** * The height of the spreadsheet. It can be set as a number in pixels, string (px) or percentage (%). * + * * Valid values: * "string" The widget height can be set in pixels (px) and percentage (%). * "number" The widget height can be set as a number @@ -76270,6 +89741,7 @@ interface IgSpreadsheet { /** * Returns or sets the A1 format address of the current active cell within the selected worksheet. + * */ activeCell?: string; @@ -76279,31 +89751,37 @@ interface IgSpreadsheet { * if an arrow key is pressed while the scroll lock is enabled the cell area will be scrolled rather than changing * the active cell. Note: This property is not maintained/changed by the control. It is just queried when * performing actions that consider whether the scroll lock is enabled. + * */ isScrollLocked?: boolean; /** * Returns or sets the Worksheet from the workbook whose content should be displayed within the control. + * */ activeWorksheet?: any; /** * Returns or sets a boolean indicating whether the spreadsheet allows adding worksheets. + * */ allowAddWorksheet?: boolean; /** * Returns or sets a boolean indicating whether the spreadsheet allows deleting worksheets. + * */ allowDeleteWorksheet?: boolean; /** * Returns or sets a boolean indicating if the grid lines are displayed in the selected worksheets. + * */ areGridlinesVisible?: boolean; /** * Returns or sets a boolean indicating if the row and column headers are displayed for the selected worksheets. + * */ areHeadersVisible?: boolean; @@ -76311,6 +89789,7 @@ interface IgSpreadsheet { * Returns or sets an enumeration indicating the direction of the cell adjacent to the activeCell that should be activated when the enter key is pressed.This property is only used if the isEnterKeyNavigationEnabled is set to true. Also, the reverse direction is * navigated when Shift + Enter are pressed. * + * * Valid values: * "down" The cell below should be activated. * "right" The cell to the right should be activated @@ -76321,21 +89800,25 @@ interface IgSpreadsheet { /** * Returns or sets the number of decimal places by which a whole number typed in during edit mode should be adjusted when isFixedDecimalEnabled is true + * */ fixedDecimalPlaceCount?: number; /** * Returns or sets a boolean indicating whether the adjacent cell indicated by the enterKeyNavigationDirection should be navigated to when the enter key is pressed. + * */ isEnterKeyNavigationEnabled?: boolean; /** * Returns or sets a boolean indicating whether a fixed decimal place is automatically added when a whole number is entered while in edit mode. + * */ isFixedDecimalEnabled?: boolean; /** * Returns or sets a boolean indicating if the formula bar is displayed within the Spreadsheet. + * */ isFormulaBarVisible?: boolean; @@ -76345,22 +89828,26 @@ interface IgSpreadsheet { * end mode and one presses the right arrow, the activeCell will be changed to be the first cell to the right of the current ActiveCell * that has a value (even if the value is ""). If there were no cells to the right with a value then it would activate the right most cell in that row. End * mode will end automatically such as when one presses an arrow key. + * */ isInEndMode?: boolean; /** * Returns or sets a boolean indicating whether undo is enabled for the control. + * */ isUndoEnabled?: boolean; /** * Returns or sets the width of the name box within the formula bar. + * */ nameBoxWidth?: number; /** * Returns or sets a value indicating how the selection is updated when interacting with the cells via the mouse or keyboard. * + * * Valid values: * "normal" The selection is replaced when dragging the mouse to select a cell or range of cells. Similarly when navigating via the keyboard a new selection is created. One may add a new range by holding the Ctrl key and using the mouse and one may alter the selection range containing the active cell by holding the Shift key down while clicking with the mouse or navigating with the keyboard such as with the arrow keys. * "extendSelection" The selection range in the cellRanges representing the active cell is updated as one uses the mouse to select a cell or navigating via the keyboard. @@ -76370,6 +89857,7 @@ interface IgSpreadsheet { /** * Type="ig.excel.Worksheet[]" Returns or sets an array of the Worksheets whose tabs are selected. + * */ selectedWorksheets?: any; @@ -76382,26 +89870,31 @@ interface IgSpreadsheet { /** * Returns or sets the workbook whose information is displayed in the control. + * */ workbook?: any; /** * Returns or sets the magnification of the selected worksheets. + * */ zoomLevel?: number; /** * Set/Get the locale setting for the widget. + * */ locale?: any; /** * Set/Get the locale language setting for the widget. + * */ language?: string; /** * Set/Get the regional setting for the widget. + * */ regional?: string|Object; @@ -76425,6 +89918,11 @@ interface IgSpreadsheet { */ activePaneChanged?: ActivePaneChangedEvent; + /** + * Invoked when the activeTable of the Spreadsheet has changed. + */ + activeTableChanged?: ActiveTableChangedEvent; + /** * Invoked when the activeWorksheet of the Spreadsheet has changed. */ @@ -76499,6 +89997,11 @@ interface IgSpreadsheetMethods { */ getActivePane(): Object; + /** + * Returns an object that represents the pane with the focus. + */ + getActiveTable(): Object; + /** * Returns an object that represents the current selection of the active pane. */ @@ -76542,6 +90045,22 @@ interface IgSpreadsheetMethods { */ executeAction(action: Object): boolean; + /** + * Shows the filter dialog for the specified relative column of the [filterSettings](ig.excel.worksheet#methods:filterSettings) of the [activeWorksheet](ui.igspreadsheet#options:activeWorksheet). + * + * @param relativeColumnIndex A zero based column index relative to the [region](ig.excel.worksheetFilterSettings#methods:region) of the active worksheet. + * @param spreadsheetFilterDialogOption Optional enumeration that specifies the initial display of the filter dialog. + */ + showFilterDialogForWorksheet(relativeColumnIndex: number, spreadsheetFilterDialogOption: Object): void; + + /** + * Shows the filter dialog for the specified relative column of the [filterSettings](ig.excel.Worksheet#methods:filterSettings) of the [activeWorksheet](ui.igspreadsheet#options:activeWorksheet). + * + * @param worksheetTableColumn A [region](ig.excel.WorksheetTableColumn) whose filter is to be viewed or changed. + * @param spreadsheetFilterDialogOption Optional enumeration that specifies the initial display of the filter dialog. + */ + showFilterDialogForTable(worksheetTableColumn: Object, spreadsheetFilterDialogOption: Object): void; + /** * Forces any pending deferred work to render on the spreadsheet before continuing */ @@ -76557,7 +90076,15 @@ interface IgSpreadsheetMethods { * Notify the spreadsheet that style information used for rendering the spreadsheet may have been updated. */ styleUpdated(): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ changeGlobalRegional(): void; } interface JQuery { @@ -76566,6 +90093,7 @@ interface JQuery { interface JQuery { igSpreadsheet(methodName: "getActivePane"): Object; + igSpreadsheet(methodName: "getActiveTable"): Object; igSpreadsheet(methodName: "getActiveSelection"): Object; igSpreadsheet(methodName: "getActiveSelectionCellRangeFormat"): Object; igSpreadsheet(methodName: "getCellEditMode"): Object; @@ -76573,6 +90101,8 @@ interface JQuery { igSpreadsheet(methodName: "getIsRenamingWorksheet"): boolean; igSpreadsheet(methodName: "getPanes"): void; igSpreadsheet(methodName: "executeAction", action: Object): boolean; + igSpreadsheet(methodName: "showFilterDialogForWorksheet", relativeColumnIndex: number, spreadsheetFilterDialogOption: Object): void; + igSpreadsheet(methodName: "showFilterDialogForTable", worksheetTableColumn: Object, spreadsheetFilterDialogOption: Object): void; igSpreadsheet(methodName: "flush"): void; igSpreadsheet(methodName: "destroy"): void; igSpreadsheet(methodName: "changeLocale", $container: Object): void; @@ -76582,6 +90112,7 @@ interface JQuery { /** * The width of the spreadsheet. It can be set as a number in pixels, string (px) or percentage (%). + * */ igSpreadsheet(optionLiteral: 'option', optionName: "width"): string|number; @@ -76589,6 +90120,7 @@ interface JQuery { /** * The width of the spreadsheet. It can be set as a number in pixels, string (px) or percentage (%). * + * * @optionValue New value to be set. */ @@ -76596,6 +90128,7 @@ interface JQuery { /** * The height of the spreadsheet. It can be set as a number in pixels, string (px) or percentage (%). + * */ igSpreadsheet(optionLiteral: 'option', optionName: "height"): string|number; @@ -76603,6 +90136,7 @@ interface JQuery { /** * The height of the spreadsheet. It can be set as a number in pixels, string (px) or percentage (%). * + * * @optionValue New value to be set. */ @@ -76610,12 +90144,14 @@ interface JQuery { /** * Returns the A1 format address of the current active cell within the selected worksheet. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "activeCell"): string; /** * Returns or sets the A1 format address of the current active cell within the selected worksheet. * + * * @optionValue New value to be set. */ igSpreadsheet(optionLiteral: 'option', optionName: "activeCell", optionValue: string): void; @@ -76626,6 +90162,7 @@ interface JQuery { * if an arrow key is pressed while the scroll lock is enabled the cell area will be scrolled rather than changing * the active cell. Note: This property is not maintained/changed by the control. It is just queried when * performing actions that consider whether the scroll lock is enabled. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "isScrollLocked"): boolean; @@ -76636,66 +90173,77 @@ interface JQuery { * the active cell. Note: This property is not maintained/changed by the control. It is just queried when * performing actions that consider whether the scroll lock is enabled. * + * * @optionValue New value to be set. */ igSpreadsheet(optionLiteral: 'option', optionName: "isScrollLocked", optionValue: boolean): void; /** * Returns the Worksheet from the workbook whose content should be displayed within the control. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "activeWorksheet"): any; /** * Returns or sets the Worksheet from the workbook whose content should be displayed within the control. * + * * @optionValue New value to be set. */ igSpreadsheet(optionLiteral: 'option', optionName: "activeWorksheet", optionValue: any): void; /** * Returns a boolean indicating whether the spreadsheet allows adding worksheets. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "allowAddWorksheet"): boolean; /** * Returns or sets a boolean indicating whether the spreadsheet allows adding worksheets. * + * * @optionValue New value to be set. */ igSpreadsheet(optionLiteral: 'option', optionName: "allowAddWorksheet", optionValue: boolean): void; /** * Returns a boolean indicating whether the spreadsheet allows deleting worksheets. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "allowDeleteWorksheet"): boolean; /** * Returns or sets a boolean indicating whether the spreadsheet allows deleting worksheets. * + * * @optionValue New value to be set. */ igSpreadsheet(optionLiteral: 'option', optionName: "allowDeleteWorksheet", optionValue: boolean): void; /** * Returns a boolean indicating if the grid lines are displayed in the selected worksheets. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "areGridlinesVisible"): boolean; /** * Returns or sets a boolean indicating if the grid lines are displayed in the selected worksheets. * + * * @optionValue New value to be set. */ igSpreadsheet(optionLiteral: 'option', optionName: "areGridlinesVisible", optionValue: boolean): void; /** * Returns a boolean indicating if the row and column headers are displayed for the selected worksheets. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "areHeadersVisible"): boolean; /** * Returns or sets a boolean indicating if the row and column headers are displayed for the selected worksheets. * + * * @optionValue New value to be set. */ igSpreadsheet(optionLiteral: 'option', optionName: "areHeadersVisible", optionValue: boolean): void; @@ -76703,6 +90251,7 @@ interface JQuery { /** * Returns an enumeration indicating the direction of the cell adjacent to the activeCell that should be activated when the enter key is pressed.This property is only used if the isEnterKeyNavigationEnabled is set to true. Also, the reverse direction is * navigated when Shift + Enter are pressed. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "enterKeyNavigationDirection"): string; @@ -76711,6 +90260,7 @@ interface JQuery { * Returns or sets an enumeration indicating the direction of the cell adjacent to the activeCell that should be activated when the enter key is pressed.This property is only used if the isEnterKeyNavigationEnabled is set to true. Also, the reverse direction is * navigated when Shift + Enter are pressed. * + * * @optionValue New value to be set. */ @@ -76718,48 +90268,56 @@ interface JQuery { /** * Returns the number of decimal places by which a whole number typed in during edit mode should be adjusted when isFixedDecimalEnabled is true + * */ igSpreadsheet(optionLiteral: 'option', optionName: "fixedDecimalPlaceCount"): number; /** * Returns or sets the number of decimal places by which a whole number typed in during edit mode should be adjusted when isFixedDecimalEnabled is true * + * * @optionValue New value to be set. */ igSpreadsheet(optionLiteral: 'option', optionName: "fixedDecimalPlaceCount", optionValue: number): void; /** * Returns a boolean indicating whether the adjacent cell indicated by the enterKeyNavigationDirection should be navigated to when the enter key is pressed. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "isEnterKeyNavigationEnabled"): boolean; /** * Returns or sets a boolean indicating whether the adjacent cell indicated by the enterKeyNavigationDirection should be navigated to when the enter key is pressed. * + * * @optionValue New value to be set. */ igSpreadsheet(optionLiteral: 'option', optionName: "isEnterKeyNavigationEnabled", optionValue: boolean): void; /** * Returns a boolean indicating whether a fixed decimal place is automatically added when a whole number is entered while in edit mode. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "isFixedDecimalEnabled"): boolean; /** * Returns or sets a boolean indicating whether a fixed decimal place is automatically added when a whole number is entered while in edit mode. * + * * @optionValue New value to be set. */ igSpreadsheet(optionLiteral: 'option', optionName: "isFixedDecimalEnabled", optionValue: boolean): void; /** * Returns a boolean indicating if the formula bar is displayed within the Spreadsheet. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "isFormulaBarVisible"): boolean; /** * Returns or sets a boolean indicating if the formula bar is displayed within the Spreadsheet. * + * * @optionValue New value to be set. */ igSpreadsheet(optionLiteral: 'option', optionName: "isFormulaBarVisible", optionValue: boolean): void; @@ -76770,6 +90328,7 @@ interface JQuery { * end mode and one presses the right arrow, the activeCell will be changed to be the first cell to the right of the current ActiveCell * that has a value (even if the value is ""). If there were no cells to the right with a value then it would activate the right most cell in that row. End * mode will end automatically such as when one presses an arrow key. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "isInEndMode"): boolean; @@ -76780,36 +90339,42 @@ interface JQuery { * that has a value (even if the value is ""). If there were no cells to the right with a value then it would activate the right most cell in that row. End * mode will end automatically such as when one presses an arrow key. * + * * @optionValue New value to be set. */ igSpreadsheet(optionLiteral: 'option', optionName: "isInEndMode", optionValue: boolean): void; /** * Returns a boolean indicating whether undo is enabled for the control. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "isUndoEnabled"): boolean; /** * Returns or sets a boolean indicating whether undo is enabled for the control. * + * * @optionValue New value to be set. */ igSpreadsheet(optionLiteral: 'option', optionName: "isUndoEnabled", optionValue: boolean): void; /** * Returns the width of the name box within the formula bar. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "nameBoxWidth"): number; /** * Returns or sets the width of the name box within the formula bar. * + * * @optionValue New value to be set. */ igSpreadsheet(optionLiteral: 'option', optionName: "nameBoxWidth", optionValue: number): void; /** * Returns a value indicating how the selection is updated when interacting with the cells via the mouse or keyboard. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "selectionMode"): string; @@ -76817,6 +90382,7 @@ interface JQuery { /** * Returns or sets a value indicating how the selection is updated when interacting with the cells via the mouse or keyboard. * + * * @optionValue New value to be set. */ @@ -76824,12 +90390,14 @@ interface JQuery { /** * Type="ig.excel.Worksheet[]" Returns an array of the Worksheets whose tabs are selected. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "selectedWorksheets"): any; /** * Type="ig.excel.Worksheet[]" Returns or sets an array of the Worksheets whose tabs are selected. * + * * @optionValue New value to be set. */ igSpreadsheet(optionLiteral: 'option', optionName: "selectedWorksheets", optionValue: any): void; @@ -76852,54 +90420,63 @@ interface JQuery { /** * Returns the workbook whose information is displayed in the control. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "workbook"): any; /** * Returns or sets the workbook whose information is displayed in the control. * + * * @optionValue New value to be set. */ igSpreadsheet(optionLiteral: 'option', optionName: "workbook", optionValue: any): void; /** * Returns the magnification of the selected worksheets. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "zoomLevel"): number; /** * Returns or sets the magnification of the selected worksheets. * + * * @optionValue New value to be set. */ igSpreadsheet(optionLiteral: 'option', optionName: "zoomLevel", optionValue: number): void; /** * Set/Get the locale setting for the widget. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "locale"): any; /** * Set/Get the locale setting for the widget. * + * * @optionValue New value to be set. */ igSpreadsheet(optionLiteral: 'option', optionName: "locale", optionValue: any): void; /** * Set/Get the locale language setting for the widget. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "language"): string; /** * Set/Get the locale language setting for the widget. * + * * @optionValue New value to be set. */ igSpreadsheet(optionLiteral: 'option', optionName: "language", optionValue: string): void; /** * Set/Get the regional setting for the widget. + * */ igSpreadsheet(optionLiteral: 'option', optionName: "regional"): string|Object; @@ -76907,6 +90484,7 @@ interface JQuery { /** * Set/Get the regional setting for the widget. * + * * @optionValue New value to be set. */ @@ -76960,6 +90538,18 @@ interface JQuery { */ igSpreadsheet(optionLiteral: 'option', optionName: "activePaneChanged", optionValue: ActivePaneChangedEvent): void; + /** + * Invoked when the activeTable of the Spreadsheet has changed. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "activeTableChanged"): ActiveTableChangedEvent; + + /** + * Invoked when the activeTable of the Spreadsheet has changed. + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "activeTableChanged", optionValue: ActiveTableChangedEvent): void; + /** * Invoked when the activeWorksheet of the Spreadsheet has changed. */ @@ -77141,21 +90731,25 @@ interface IgTileManagerSplitterOptionsEvents { interface IgTileManagerSplitterOptions { /** * Gets/Sets whether the splitter should be enabled. + * */ enabled?: boolean; /** * Gets whether the splitter can be collapsible. + * */ collapsible?: boolean; /** * Gets whether the splitter should be initially collapsed. + * */ collapsed?: boolean; /** * Gets/Sets splitter events. + * */ events?: IgTileManagerSplitterOptionsEvents; @@ -77273,6 +90867,7 @@ interface TileMinimizedEventUIParam { interface IgTileManager { /** + * * * Valid values: * "string" The container width can be set in pixels (px) and percentage (%). @@ -77283,6 +90878,7 @@ interface IgTileManager { /** * Gets/Sets the height of the container. * + * * Valid values: * "string" The height width can be set in pixels (px) and percentage (%). * "number" The height width can be set as a number in pixels. @@ -77293,6 +90889,7 @@ interface IgTileManager { /** * Gets/Sets the width of each column in the container. * + * * Valid values: * "string" The column width can be set in pixels (px), percentage (%) or asterisk (*) which will distribute all the width between all the columns equally. * "number" The column width can be set as a number representing value in pixels. @@ -77304,6 +90901,7 @@ interface IgTileManager { /** * Gets/Sets the height of each column in the container. * + * * Valid values: * "string" The column height can be set in pixels (px), percentage (%) or asterisk (*) which will distribute all the height between all the columns equally. * "number" The column height can be set as a number representing value in pixels. @@ -77315,6 +90913,7 @@ interface IgTileManager { /** * Gets/Sets the columns count in the container. * + * * Valid values: * "null" The column count will be automatically calculated. * "number" The column count can be set as a number. @@ -77324,6 +90923,7 @@ interface IgTileManager { /** * Gets/Sets the rows count in the container. * + * * Valid values: * "number" The row count can be set as a number. * "null" The row count will be automatically calculated. @@ -77346,12 +90946,14 @@ interface IgTileManager { /** * Gets/Sets whether the items will rearrange when the container is resized. + * */ rearrangeItems?: boolean; /** * Gets/Sets the tiles configurations. Every tile is described by rowSpan, colSpan, rowIndex and colIndex. * + * * Valid values: * "array" An array with colSpan, rowSpan, colIndex, rowIndex configurations for each tile. * "null" Default tile configurations of rowSpan: 1 and colSpan: 1 will be used. @@ -77360,12 +90962,14 @@ interface IgTileManager { /** * Specifies any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an [$.ig.DataSource](ig.datasource) itself. + * */ dataSource?: any; /** * Gets/Sets the content of the tiles in minimized state. * + * * Valid values: * "string" When initializing on html markup provide jQuery selector specifying what content of the tile to be shown in minimized state. When initializing on data source provide igTemplate that will be rendered for the minimized state. * "null" The whole content of the tile will be visible in minimized state. @@ -77375,6 +90979,7 @@ interface IgTileManager { /** * Gets/Sets the content of the tiles in maximized state. * + * * Valid values: * "string" When initializing on html markup provide jQuery selector specifying which elements of the tile to be shown in maximized state. When initializing on data source provide igTemplate that will be rendered for the maximized state. * "null" The whole content of the tile will be visible in maximized state. @@ -77384,6 +90989,7 @@ interface IgTileManager { /** * Gets/Sets the index of which items configuration will be used for positioning and sizing of the maximized tile. * + * * Valid values: * "number" The maximizedTileindex can be set as a number. * "null" Option is ignored. @@ -77393,6 +90999,7 @@ interface IgTileManager { /** * Gets/Sets how many columns to be displayed in the right panel when the tiles are minimized. * + * * Valid values: * "number" Set the number of right panel columns as a number. The minimum value is 1. * "null" Default of 1 column will be used. @@ -77402,6 +91009,7 @@ interface IgTileManager { /** * Gets/Sets the width of the minimized tiles in the right panel. * + * * Valid values: * "number" Set the width of the minimized tiles as a number. * "null" Default value equal to the column width will be used. @@ -77411,6 +91019,7 @@ interface IgTileManager { /** * Gets/Sets the height of the minimized tiles in the right panel. * + * * Valid values: * "number" Set the height of the minimized tiles as a number. * "null" Default value equal to the column height will be used. @@ -77419,32 +91028,38 @@ interface IgTileManager { /** * Gets/Sets whether the right panel should show scrollbar when tiles are overflowing. + * */ showRightPanelScroll?: boolean; /** * Configure the container variable representation, which defines splitter functionality. + * */ splitterOptions?: IgTileManagerSplitterOptions; /** * Gets/Sets JQuery selector that specifies which elements will not trigger maximizing when clicked on. + * */ preventMaximizingSelector?: string; /** * Gets/Sets the duration of the animations in the tile manager. + * */ animationDuration?: number; /** * Specifies a remote URL accepted by [$.ig.DataSource](ig.datasource) in order to request data from it. + * */ dataSourceUrl?: string; /** * Property in the response which specifies where the data records array will be held (if the response is wrapped). See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). * + * * Valid values: * "string" Specifies the name of the property in which data records are held if the response is wrapped. * "null" Option is ignored. @@ -77454,6 +91069,7 @@ interface IgTileManager { /** * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type) and its type property. * + * * Valid values: * "string" Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource and its type property. * "null" Option is ignored. @@ -77462,19 +91078,40 @@ interface IgTileManager { /** * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type) and its type property. + * */ dataSourceType?: string; /** * Specifies the HTTP request method. + * */ requestType?: string; /** * Gets/Sets the HTTP content type for the response object. See [Perform an asynchronous HTTP (Ajax) request](http://api.jquery.com/jQuery.ajax/). + * */ responseContentType?: string; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Fired before databinding is performed * @@ -77639,6 +91276,24 @@ interface IgTileManagerMethods { * Deletes the widget instance (client object). It is no longer accessible and all its event handlers stop working. Destroys all child widgets. Removes auto-generated HTML content, which is outside the widget, e.g. detached popups, dropdowns, etc. */ destroy(): Object; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igTileManager"): IgTileManagerMethods; @@ -77655,6 +91310,9 @@ interface JQuery { igTileManager(methodName: "widget"): Object; igTileManager(methodName: "dataBind"): void; igTileManager(methodName: "destroy"): Object; + igTileManager(methodName: "changeLocale", $container: Object): void; + igTileManager(methodName: "changeGlobalLanguage"): void; + igTileManager(methodName: "changeGlobalRegional"): void; /** * * @@ -77672,6 +91330,7 @@ interface JQuery { /** * Gets/Sets the height of the container. + * */ igTileManager(optionLiteral: 'option', optionName: "height"): string|number; @@ -77679,6 +91338,7 @@ interface JQuery { /** * /Sets the height of the container. * + * * @optionValue New value to be set. */ @@ -77686,6 +91346,7 @@ interface JQuery { /** * Gets/Sets the width of each column in the container. + * */ igTileManager(optionLiteral: 'option', optionName: "columnWidth"): string|number|Array; @@ -77693,6 +91354,7 @@ interface JQuery { /** * /Sets the width of each column in the container. * + * * @optionValue New value to be set. */ @@ -77700,6 +91362,7 @@ interface JQuery { /** * Gets/Sets the height of each column in the container. + * */ igTileManager(optionLiteral: 'option', optionName: "columnHeight"): string|number|Array; @@ -77707,6 +91370,7 @@ interface JQuery { /** * /Sets the height of each column in the container. * + * * @optionValue New value to be set. */ @@ -77714,6 +91378,7 @@ interface JQuery { /** * Gets/Sets the columns count in the container. + * */ igTileManager(optionLiteral: 'option', optionName: "cols"): number; @@ -77721,6 +91386,7 @@ interface JQuery { /** * /Sets the columns count in the container. * + * * @optionValue New value to be set. */ @@ -77728,6 +91394,7 @@ interface JQuery { /** * Gets/Sets the rows count in the container. + * */ igTileManager(optionLiteral: 'option', optionName: "rows"): number; @@ -77735,6 +91402,7 @@ interface JQuery { /** * /Sets the rows count in the container. * + * * @optionValue New value to be set. */ @@ -77774,18 +91442,21 @@ interface JQuery { /** * Gets/Sets whether the items will rearrange when the container is resized. + * */ igTileManager(optionLiteral: 'option', optionName: "rearrangeItems"): boolean; /** * /Sets whether the items will rearrange when the container is resized. * + * * @optionValue New value to be set. */ igTileManager(optionLiteral: 'option', optionName: "rearrangeItems", optionValue: boolean): void; /** * Gets/Sets the tiles configurations. Every tile is described by rowSpan, colSpan, rowIndex and colIndex. + * */ igTileManager(optionLiteral: 'option', optionName: "items"): Object; @@ -77793,6 +91464,7 @@ interface JQuery { /** * /Sets the tiles configurations. Every tile is described by rowSpan, colSpan, rowIndex and colIndex. * + * * @optionValue New value to be set. */ @@ -77800,18 +91472,21 @@ interface JQuery { /** * Gets any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an [$.ig.DataSource](ig.datasource) itself. + * */ igTileManager(optionLiteral: 'option', optionName: "dataSource"): any; /** * Sets any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an [$.ig.DataSource](ig.datasource) itself. * + * * @optionValue New value to be set. */ igTileManager(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; /** * Gets/Sets the content of the tiles in minimized state. + * */ igTileManager(optionLiteral: 'option', optionName: "minimizedState"): string; @@ -77819,6 +91494,7 @@ interface JQuery { /** * /Sets the content of the tiles in minimized state. * + * * @optionValue New value to be set. */ @@ -77826,6 +91502,7 @@ interface JQuery { /** * Gets/Sets the content of the tiles in maximized state. + * */ igTileManager(optionLiteral: 'option', optionName: "maximizedState"): string; @@ -77833,6 +91510,7 @@ interface JQuery { /** * /Sets the content of the tiles in maximized state. * + * * @optionValue New value to be set. */ @@ -77840,6 +91518,7 @@ interface JQuery { /** * Gets/Sets the index of which items configuration will be used for positioning and sizing of the maximized tile. + * */ igTileManager(optionLiteral: 'option', optionName: "maximizedTileIndex"): number; @@ -77847,6 +91526,7 @@ interface JQuery { /** * /Sets the index of which items configuration will be used for positioning and sizing of the maximized tile. * + * * @optionValue New value to be set. */ @@ -77854,6 +91534,7 @@ interface JQuery { /** * Gets/Sets how many columns to be displayed in the right panel when the tiles are minimized. + * */ igTileManager(optionLiteral: 'option', optionName: "rightPanelCols"): number; @@ -77861,6 +91542,7 @@ interface JQuery { /** * /Sets how many columns to be displayed in the right panel when the tiles are minimized. * + * * @optionValue New value to be set. */ @@ -77868,6 +91550,7 @@ interface JQuery { /** * Gets/Sets the width of the minimized tiles in the right panel. + * */ igTileManager(optionLiteral: 'option', optionName: "rightPanelTilesWidth"): number; @@ -77875,6 +91558,7 @@ interface JQuery { /** * /Sets the width of the minimized tiles in the right panel. * + * * @optionValue New value to be set. */ @@ -77882,6 +91566,7 @@ interface JQuery { /** * Gets/Sets the height of the minimized tiles in the right panel. + * */ igTileManager(optionLiteral: 'option', optionName: "rightPanelTilesHeight"): number; @@ -77889,6 +91574,7 @@ interface JQuery { /** * /Sets the height of the minimized tiles in the right panel. * + * * @optionValue New value to be set. */ @@ -77896,66 +91582,77 @@ interface JQuery { /** * Gets/Sets whether the right panel should show scrollbar when tiles are overflowing. + * */ igTileManager(optionLiteral: 'option', optionName: "showRightPanelScroll"): boolean; /** * /Sets whether the right panel should show scrollbar when tiles are overflowing. * + * * @optionValue New value to be set. */ igTileManager(optionLiteral: 'option', optionName: "showRightPanelScroll", optionValue: boolean): void; /** * Configure the container variable representation, which defines splitter functionality. + * */ igTileManager(optionLiteral: 'option', optionName: "splitterOptions"): IgTileManagerSplitterOptions; /** * Configure the container variable representation, which defines splitter functionality. * + * * @optionValue New value to be set. */ igTileManager(optionLiteral: 'option', optionName: "splitterOptions", optionValue: IgTileManagerSplitterOptions): void; /** * Gets/Sets JQuery selector that specifies which elements will not trigger maximizing when clicked on. + * */ igTileManager(optionLiteral: 'option', optionName: "preventMaximizingSelector"): string; /** * /Sets JQuery selector that specifies which elements will not trigger maximizing when clicked on. * + * * @optionValue New value to be set. */ igTileManager(optionLiteral: 'option', optionName: "preventMaximizingSelector", optionValue: string): void; /** * Gets/Sets the duration of the animations in the tile manager. + * */ igTileManager(optionLiteral: 'option', optionName: "animationDuration"): number; /** * /Sets the duration of the animations in the tile manager. * + * * @optionValue New value to be set. */ igTileManager(optionLiteral: 'option', optionName: "animationDuration", optionValue: number): void; /** * Gets a remote URL accepted by [$.ig.DataSource](ig.datasource) in order to request data from it. + * */ igTileManager(optionLiteral: 'option', optionName: "dataSourceUrl"): string; /** * Sets a remote URL accepted by [$.ig.DataSource](ig.datasource) in order to request data from it. * + * * @optionValue New value to be set. */ igTileManager(optionLiteral: 'option', optionName: "dataSourceUrl", optionValue: string): void; /** * Property in the response which specifies where the data records array will be held (if the response is wrapped). See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). + * */ igTileManager(optionLiteral: 'option', optionName: "responseDataKey"): string; @@ -77963,6 +91660,7 @@ interface JQuery { /** * Property in the response which specifies where the data records array will be held (if the response is wrapped). See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). * + * * @optionValue New value to be set. */ @@ -77970,6 +91668,7 @@ interface JQuery { /** * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type) and its type property. + * */ igTileManager(optionLiteral: 'option', optionName: "responseDataType"): string; @@ -77977,6 +91676,7 @@ interface JQuery { /** * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type) and its type property. * + * * @optionValue New value to be set. */ @@ -77984,40 +91684,90 @@ interface JQuery { /** * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type) and its type property. + * */ igTileManager(optionLiteral: 'option', optionName: "dataSourceType"): string; /** * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type) and its type property. * + * * @optionValue New value to be set. */ igTileManager(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; /** * Gets the HTTP request method. + * */ igTileManager(optionLiteral: 'option', optionName: "requestType"): string; /** * Sets the HTTP request method. * + * * @optionValue New value to be set. */ igTileManager(optionLiteral: 'option', optionName: "requestType", optionValue: string): void; /** * Gets/Sets the HTTP content type for the response object. See [Perform an asynchronous HTTP (Ajax) request](http://api.jquery.com/jQuery.ajax/). + * */ igTileManager(optionLiteral: 'option', optionName: "responseContentType"): string; /** * /Sets the HTTP content type for the response object. See [Perform an asynchronous HTTP (Ajax) request](http://api.jquery.com/jQuery.ajax/). * + * * @optionValue New value to be set. */ igTileManager(optionLiteral: 'option', optionName: "responseContentType", optionValue: string): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igTileManager(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igTileManager(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igTileManager(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igTileManager(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igTileManager(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Fired before databinding is performed * @@ -78234,11 +91984,13 @@ interface JQuery { interface IgToolbarLocale { /** * Gets/Sets collapse button title. + * */ collapseButtonTitle?: any; /** * Gets/Sets expand button title. + * */ expandButtonTitle?: any; @@ -78305,50 +92057,71 @@ interface WindowResizedEventUIParam {} interface IgToolbar { /** * Set/Get the widget height. + * */ height?: any; /** * Set/Get the widget width. + * */ width?: any; /** * Get/Set whether the toolbar can be collapsed. + * */ allowCollapsing?: boolean; /** * The css class that will be applied to collapseButtonIcon. + * */ collapseButtonIcon?: string; /** * The css class that will be applied to the expand/collapse button icon. + * */ expandButtonIcon?: string; /** * Formal name of the widget. + * */ name?: string; /** * Display Name of the widget. + * */ displayName?: string; /** * Get/Set Toolbar's items. + * */ items?: any[]; /** * Get/Set whether the widget is expanded initially. + * */ isExpanded?: boolean; locale?: IgToolbarLocale; + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event fired after a click on any toolbar button */ @@ -78472,6 +92245,16 @@ interface IgToolbarMethods { * Destroy the widget. */ destroy(): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igToolbar"): IgToolbarMethods; @@ -78487,117 +92270,167 @@ interface JQuery { igToolbar(methodName: "activateItem", index: Object, activated: Object): void; igToolbar(methodName: "deactivateAll"): void; igToolbar(methodName: "destroy"): void; + igToolbar(methodName: "changeGlobalLanguage"): void; + igToolbar(methodName: "changeGlobalRegional"): void; /** * Set/Get the widget height. + * */ igToolbar(optionLiteral: 'option', optionName: "height"): any; /** * Set/Get the widget height. * + * * @optionValue New value to be set. */ igToolbar(optionLiteral: 'option', optionName: "height", optionValue: any): void; /** * Set/Get the widget width. + * */ igToolbar(optionLiteral: 'option', optionName: "width"): any; /** * Set/Get the widget width. * + * * @optionValue New value to be set. */ igToolbar(optionLiteral: 'option', optionName: "width", optionValue: any): void; /** * Get/Set whether the toolbar can be collapsed. + * */ igToolbar(optionLiteral: 'option', optionName: "allowCollapsing"): boolean; /** * Get/Set whether the toolbar can be collapsed. * + * * @optionValue New value to be set. */ igToolbar(optionLiteral: 'option', optionName: "allowCollapsing", optionValue: boolean): void; /** * The css class that will be applied to collapseButtonIcon. + * */ igToolbar(optionLiteral: 'option', optionName: "collapseButtonIcon"): string; /** * The css class that will be applied to collapseButtonIcon. * + * * @optionValue New value to be set. */ igToolbar(optionLiteral: 'option', optionName: "collapseButtonIcon", optionValue: string): void; /** * The css class that will be applied to the expand/collapse button icon. + * */ igToolbar(optionLiteral: 'option', optionName: "expandButtonIcon"): string; /** * The css class that will be applied to the expand/collapse button icon. * + * * @optionValue New value to be set. */ igToolbar(optionLiteral: 'option', optionName: "expandButtonIcon", optionValue: string): void; /** * Formal name of the widget. + * */ igToolbar(optionLiteral: 'option', optionName: "name"): string; /** * Formal name of the widget. * + * * @optionValue New value to be set. */ igToolbar(optionLiteral: 'option', optionName: "name", optionValue: string): void; /** * Display Name of the widget. + * */ igToolbar(optionLiteral: 'option', optionName: "displayName"): string; /** * Display Name of the widget. * + * * @optionValue New value to be set. */ igToolbar(optionLiteral: 'option', optionName: "displayName", optionValue: string): void; /** * Get/Set Toolbar's items. + * */ igToolbar(optionLiteral: 'option', optionName: "items"): any[]; /** * Get/Set Toolbar's items. * + * * @optionValue New value to be set. */ igToolbar(optionLiteral: 'option', optionName: "items", optionValue: any[]): void; /** * Get/Set whether the widget is expanded initially. + * */ igToolbar(optionLiteral: 'option', optionName: "isExpanded"): boolean; /** * Get/Set whether the widget is expanded initially. * + * * @optionValue New value to be set. */ igToolbar(optionLiteral: 'option', optionName: "isExpanded", optionValue: boolean): void; igToolbar(optionLiteral: 'option', optionName: "locale"): IgToolbarLocale; igToolbar(optionLiteral: 'option', optionName: "locale", optionValue: IgToolbarLocale): void; + /** + * Set/Get the locale language setting for the widget. + * + */ + igToolbar(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igToolbar(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igToolbar(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igToolbar(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event fired after a click on any toolbar button */ @@ -78806,11 +92639,13 @@ interface DeactivatedEventUIParam { interface IgToolbarButton { /** * Enable/Disable the "Toggling" of a button. + * */ allowToggling?: boolean; /** * Get/Set whether the toolbar button is selected. + * */ isSelected?: boolean; @@ -78855,11 +92690,15 @@ interface IgToolbarButtonMethods { /** * Activate toolbar button + * + * @param event */ activate(event: Object): void; /** * Deactivate toolbar button + * + * @param event */ deactivate(event: Object): void; @@ -78886,24 +92725,28 @@ interface JQuery { /** * Gets the "Toggling" of a button. + * */ igToolbarButton(optionLiteral: 'option', optionName: "allowToggling"): boolean; /** * Enable/Disable the "Toggling" of a button. * + * * @optionValue New value to be set. */ igToolbarButton(optionLiteral: 'option', optionName: "allowToggling", optionValue: boolean): void; /** * Get/Set whether the toolbar button is selected. + * */ igToolbarButton(optionLiteral: 'option', optionName: "isSelected"): boolean; /** * Get/Set whether the toolbar button is selected. * + * * @optionValue New value to be set. */ igToolbarButton(optionLiteral: 'option', optionName: "isSelected", optionValue: boolean): void; @@ -78987,53 +92830,63 @@ interface IgTreeBindingsBindings { interface IgTreeBindings { /** * Gets the name of the data source property the value of which would be the node text. + * */ textKey?: string; /** * Gets the XPath to the text attribute/node. Used in client-only binding directly to XML. + * */ textXPath?: string; /** * Gets the name of the data source property the value of which would be the node value. + * */ valueKey?: string; /** * Gets the XPath to the value attribute/node. Used in client-only binding directly to XML. + * */ valueXPath?: string; /** * Gets the name of the data source property the value of which would be used as a URL for the node image. + * */ imageUrlKey?: string; /** * Gets the XPath to the image URL attribute/node. Used in client-only binding directly to XML. + * */ imageUrlXPath?: string; /** * Gets the name of the data source property the value of which would be used as an href attribute for the node anchor. + * */ navigateUrlKey?: string; /** * Gets the XPath to the navigate URL attribute/node. Used in client-only binding directly to XML. + * */ navigateUrlXPath?: string; /** * Gets the name of the data source property the value of which would be used as a target * attribute for the node anchor. + * */ targetKey?: string; /** * Gets the name of the data source property the value of which would hold the node`s * expanded state. The expanded state is represented by a boolean. + * */ expandedKey?: string; @@ -79041,6 +92894,7 @@ interface IgTreeBindings { * Gets the name of the data source property the value of which would hold the node's * check state. The check state itself is represented by a string enumeration with the * checked|partially checked|unchecked states being respectively "on|partial|off". + * */ checkedKey?: string; @@ -79048,32 +92902,38 @@ interface IgTreeBindings { * Gets the name of the data source property the value of which is the primary key attribute * for the data. This property is used when load on demand is enabled and if specified the node paths * would be generated using primary keys instead of indices. + * */ primaryKey?: string; /** * Gets the node content template for the current layer of bindings. The igTree utilizes igTemplating * for generating node content templates. A good example of how to setup templating can be found here http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/06/17/how-to-use-templates-to-style-the-different-nodes-of-the-ignite-ui-tree-control.aspx + * */ nodeContentTemplate?: string; /** * Gets the name of the data source property that holds the child data of the current layer node. + * */ childDataProperty?: string; /** * Gets the XPath to the child data node. Used in client-only binding directly to XML. + * */ childDataXPath?: string; /** * Gets the XPath to the root data node. Used in client-only binding directly to XML. + * */ searchFieldXPath?: string; /** * Gets the next layer of bindings in a recursive fashion. + * */ bindings?: IgTreeBindingsBindings; @@ -79086,12 +92946,14 @@ interface IgTreeBindings { interface IgTreeDragAndDropSettings { /** * Gets whether the widget will accept drag and drop from other controls. + * */ allowDrop?: boolean; /** * Gets the drag and drop mode. * + * * Valid values: * "default" Performs "copy" when holding the Ctrl key, otherwise "move" is performed. * "copy" Makes a copy of the dragged node at the drop location. @@ -79101,43 +92963,51 @@ interface IgTreeDragAndDropSettings { /** * Gets the opacity of the drag helper: 0 is fully transparent while 1 is fully opaque. + * */ dragOpacity?: number; /** * Gets whether the helper would revert to its original position upon an invalid drop. + * */ revert?: boolean; /** * Gets the duration of the revert animation. + * */ revertDuration?: number; /** * Gets the z-index that would be set for the drag helper. + * */ zIndex?: number; /** * Gets the delay between mousedown and the start of the actual drag. Smaller values make the nodes * more sensitive to drag and may interfere with selection. + * */ dragStartDelay?: number; /** * Gets whether when dragging over a collapsed node with children will trigger the node to expand. + * */ expandOnDragOver?: boolean; /** * Gets the delay after hovering a parent node before expanding that node during drag when [expandOnDragOver](ui.igtree#options:dragAndDropSettings.expandOnDragOver) is set to true. + * */ expandDelay?: number; /** * Gets the type of helper to be rendered for the drag operation. * + * * Valid values: * "function" A function that will return a DOMElement to use while dragging. * "default" would render the default igTree helper. @@ -79147,6 +93017,7 @@ interface IgTreeDragAndDropSettings { /** * Gets the method for custom drop point validation. Returning true from this function would render the drop point valid, while false would make it invalid. The function has one parameter which is the current drop point and the context (this) of the function is the drag element. * + * * Valid values: * "function" A function that will be used for validating drop points. * "null" Only built-in validation is applied. @@ -79156,6 +93027,7 @@ interface IgTreeDragAndDropSettings { /** * Gets the containment for the drag helper. The area inside of which thehelper is contained would be scrollable while dragging. * + * * Valid values: * "boolean" If set to false, then the draggable elements will be contained in their window. * "selector" The draggable element will be contained to the bounding box of the first element found by the selector. If no element is found, no containment will be set. @@ -79167,46 +93039,55 @@ interface IgTreeDragAndDropSettings { /** * Gets the HTML markup for the invalid helper. + * */ invalidMoveToMarkup?: string; /** * Gets the HTML markup for the "move to" helper. + * */ moveToMarkup?: string; /** * Gets the HTML markup for the "move between" helper. + * */ moveBetweenMarkup?: string; /** * Gets the HTML markup for the "move after" helper. + * */ moveAfterMarkup?: string; /** * Gets the HTML markup for the "move before" helper. + * */ moveBeforeMarkup?: string; /** * Gets the HTML markup for the "copy to" helper. + * */ copyToMarkup?: string; /** * Gets the HTML markup for the "copy between" helper. + * */ copyBetweenMarkup?: string; /** * Gets the HTML markup for the "copy after" helper. + * */ copyAfterMarkup?: string; /** * Gets the HTML markup for the "copy before" helper. + * */ copyBeforeMarkup?: string; @@ -79532,6 +93413,7 @@ interface IgTree { /** * Gets/Sets the width of the control container. * + * * Valid values: * "string" The widget width can be set in pixels (px) and percentage (%). * "number" The widget width can be set as a number in pixels. @@ -79542,6 +93424,7 @@ interface IgTree { /** * Gets/Sets how the height of of the control container. * + * * Valid values: * "string" The widget height can be set in pixels (px) and percentage (%). * "number" The widget height can be set as a number in pixels. @@ -79552,6 +93435,7 @@ interface IgTree { /** * Gets the behavior and type of the checkboxes rendered for the tree nodes. Can be set only at initialization. * + * * Valid values: * "off" Checkboxes are turned off and are not rendered for the tree. * "biState" Checkboxes are rendered and support two states (checked and unchecked). Checkboxes do not cascade down or up in this mode. @@ -79561,17 +93445,20 @@ interface IgTree { /** * Gets/Sets one or more branches to be expanded at a time. If set to true then only one branch at each level of the tree can be expanded at a time. Otherwise multiple branches can be expanded at a time. + * */ singleBranchExpand?: boolean; /** * Gets/Sets whether nodes are hoverable. Setting this option to false would make the tree to not apply hover styles on the nodes when they are hovered. + * */ hotTracking?: boolean; /** * Gets/Sets the image url applied to all parent nodes. * + * * Valid values: * "string" Image with the specified URL will be rendered for each node that has children (If you define both parentNodeImageUrl and parentNodeImageClass the parentNodeImageUrl would take priority). * "null" Option is ignored @@ -79581,6 +93468,7 @@ interface IgTree { /** * Gets/Sets the CSS class applied to all parent nodes. * + * * Valid values: * "string" Specified class with a CSS sprite that would be rendered for each node that has children (If you define both parentNodeImageUrl and parentNodeImageClass the parentNodeImageUrl would take priority). * "null" Option is ignored @@ -79590,6 +93478,7 @@ interface IgTree { /** * Gets/Sets the tooltip applied to all parent node images. * + * * Valid values: * "string" Specified a tooltip that would be rendered for each node that has children. * "null" Option is ignored @@ -79599,6 +93488,7 @@ interface IgTree { /** * Gets/Sets the image url applied to all leaf nodes. * + * * Valid values: * "string" Image with the specified URL will be rendered for each node that has no children (If you define both leafNodeImageUrl and leafNodeImageClass the leafNodeImageUrl would take priority). * "null" Option is ignored @@ -79608,6 +93498,7 @@ interface IgTree { /** * Gets/Sets the CSS class applied to all leaf nodes. * + * * Valid values: * "string" Specified class with a CSS sprite that would be rendered for each node that has no children (If you define both leafNodeImageUrl and leafNodeImageClass the leafNodeImageUrl would take priority). * "null" Option is ignored @@ -79617,6 +93508,7 @@ interface IgTree { /** * Gets/Sets the tooltip applied to all leaf node images. * + * * Valid values: * "string" Specified a tooltip that would be rendered for each node that has no children. * "null" Option is ignored @@ -79625,23 +93517,27 @@ interface IgTree { /** * Gets/Sets the duration of each animation such as the expand/collapse. + * */ animationDuration?: number; /** * Gets the node data-path attribute separator character. + * */ pathSeparator?: string; /** * Gets/Sets the igTree data source. Accepts any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself. * Once the data source is initialized, this option becomes an instance of the $.ig.HierarchicalDataSource. + * */ dataSource?: any; /** * Gets/Sets a remote URL accepted by [$.ig.DataSource](ig.datasource) in order to request data from it. * + * * Valid values: * "string" Specifies the remote url. * "null" Option is ignored. @@ -79651,6 +93547,7 @@ interface IgTree { /** * Gets the type of the data source. Delegates the value to [$.ig.DataSource.settings.type](ig.datasource#options:settings.type). Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource.settings.type. * + * * Valid values: * "string" Specifies the data source type implicitly. * "null" Type is inferred. @@ -79660,6 +93557,7 @@ interface IgTree { /** * Gets the JSON key at which a remote data source will write the data. Delegates the value to [$.ig.DataSource.settings.responseDataKey](ig.datasource#options:settings.responseDataKey). Please refer to the documentation of $.ig.DataSource.settings.responseDataKey. * + * * Valid values: * "string" Specifies the name of the property in which data records are held if the response is wrapped. * "null" Option is ignored. @@ -79669,6 +93567,7 @@ interface IgTree { /** * Gets the data type of the remote data source response. Delegates the value to [$.ig.DataSource.settings.responseDataType](ig.datasource#options:settings.responseDataType). Please refer to the documentation of $.ig.DataSource.settings.responseDataType. * + * * Valid values: * "string" Response type when a URL is set as the data source. See http://api.jquery.com/jQuery.ajax/ => dataType. * "null" Type is inferred. @@ -79677,49 +93576,76 @@ interface IgTree { /** * Gets the HTTP verb used for remote requests. Specifies the HTTP verb to be used to issue the requests to the [dataSourceUrl](ui.igtree#options:dataSourceUrl). + * */ requestType?: string; /** * Gets the type of the content in a remote data source response. Content type of the response from the [dataSourceUrl](ui.igtree#options:dataSourceUrl). See http://api.jquery.com/jQuery.ajax/ => contentType + * */ responseContentType?: string; /** * Gets the initial depth the igTree is going to be expanded to upon initial render. + * */ initialExpandDepth?: number; /** * Gets whether all the data would be bound initially or each child collection would be bound upon expand. + * */ loadOnDemand?: boolean; /** * Gets the data binding properties and keys. The igTree uses these to extract the corresponding data from the dataSource. + * */ bindings?: IgTreeBindings; /** * Gets the default target attribute value for the node anchors. + * */ defaultNodeTarget?: string; /** * Gets/Sets whether drag and drop functionality is enabled. + * */ dragAndDrop?: boolean; /** * Gets the URL to which updating requests will be made. + * */ updateUrl?: string; /** * Gets/Sets specific settings for the drag and drop functionality. + * */ dragAndDropSettings?: IgTreeDragAndDropSettings; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Fired before databinding is performed. */ @@ -79850,6 +93776,7 @@ interface IgTreeMethods { * Applies a checked state to a node. * * @param nodeObj Specifies the node element to apply the state to. + * @param cascadeDir */ checkNode(nodeObj: Object, cascadeDir: Object): void; @@ -79857,6 +93784,7 @@ interface IgTreeMethods { * Applies an unchecked state to a node. * * @param nodeObj Specifies the node element to apply the state to. + * @param cascadeDir */ uncheckNode(nodeObj: Object, cascadeDir: Object): void; @@ -79864,6 +93792,7 @@ interface IgTreeMethods { * Applies a partially checked state to a node. * * @param nodeObj Specifies the node element to apply the state to. + * @param cascadeDir */ partiallyCheckNode(nodeObj: Object, cascadeDir: Object): void; @@ -79987,9 +93916,9 @@ interface IgTreeMethods { /** * Retrieves a node object for the specified node element. * - * @param element Specifies the node element. + * @param element Specifies the node jQuery element. */ - nodeFromElement(element: Object): Object; + nodeFromElement(element: string): Object; /** * Retrieves a node object collection of the immediate children of the provided node element. @@ -80080,6 +94009,16 @@ interface IgTreeMethods { * Destructor for the igTree widget. */ destroy(): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igTree"): IgTreeMethods; @@ -80109,7 +94048,7 @@ interface JQuery { igTree(methodName: "findNodesByText", text: string, parent?: Object): any[]; igTree(methodName: "findImmediateNodesByText", text: string, parent?: Object): any[]; igTree(methodName: "nodeByIndex", index: number, parent?: Object): Object; - igTree(methodName: "nodeFromElement", element: Object): Object; + igTree(methodName: "nodeFromElement", element: string): Object; igTree(methodName: "children", parent: Object): any[]; igTree(methodName: "childrenByPath", path: string): any[]; igTree(methodName: "isSelected", node: Object): boolean; @@ -80123,9 +94062,12 @@ interface JQuery { igTree(methodName: "transactionLog"): any[]; igTree(methodName: "nodeDataFor", path: string): Object; igTree(methodName: "destroy"): void; + igTree(methodName: "changeGlobalLanguage"): void; + igTree(methodName: "changeGlobalRegional"): void; /** * Gets/Sets the width of the control container. + * */ igTree(optionLiteral: 'option', optionName: "width"): string|number; @@ -80133,6 +94075,7 @@ interface JQuery { /** * /Sets the width of the control container. * + * * @optionValue New value to be set. */ @@ -80140,6 +94083,7 @@ interface JQuery { /** * Gets/Sets how the height of of the control container. + * */ igTree(optionLiteral: 'option', optionName: "height"): string|number; @@ -80147,6 +94091,7 @@ interface JQuery { /** * /Sets how the height of of the control container. * + * * @optionValue New value to be set. */ @@ -80154,6 +94099,7 @@ interface JQuery { /** * Gets the behavior and type of the checkboxes rendered for the tree nodes. Can be set only at initialization. + * */ igTree(optionLiteral: 'option', optionName: "checkboxMode"): string; @@ -80161,6 +94107,7 @@ interface JQuery { /** * The behavior and type of the checkboxes rendered for the tree nodes. Can be set only at initialization. * + * * @optionValue New value to be set. */ @@ -80168,30 +94115,35 @@ interface JQuery { /** * Gets/Sets one or more branches to be expanded at a time. If set to true then only one branch at each level of the tree can be expanded at a time. Otherwise multiple branches can be expanded at a time. + * */ igTree(optionLiteral: 'option', optionName: "singleBranchExpand"): boolean; /** * /Sets one or more branches to be expanded at a time. If set to true then only one branch at each level of the tree can be expanded at a time. Otherwise multiple branches can be expanded at a time. * + * * @optionValue New value to be set. */ igTree(optionLiteral: 'option', optionName: "singleBranchExpand", optionValue: boolean): void; /** * Gets/Sets whether nodes are hoverable. Setting this option to false would make the tree to not apply hover styles on the nodes when they are hovered. + * */ igTree(optionLiteral: 'option', optionName: "hotTracking"): boolean; /** * /Sets whether nodes are hoverable. Setting this option to false would make the tree to not apply hover styles on the nodes when they are hovered. * + * * @optionValue New value to be set. */ igTree(optionLiteral: 'option', optionName: "hotTracking", optionValue: boolean): void; /** * Gets/Sets the image url applied to all parent nodes. + * */ igTree(optionLiteral: 'option', optionName: "parentNodeImageUrl"): string; @@ -80199,6 +94151,7 @@ interface JQuery { /** * /Sets the image url applied to all parent nodes. * + * * @optionValue New value to be set. */ @@ -80206,6 +94159,7 @@ interface JQuery { /** * Gets/Sets the CSS class applied to all parent nodes. + * */ igTree(optionLiteral: 'option', optionName: "parentNodeImageClass"): string; @@ -80213,6 +94167,7 @@ interface JQuery { /** * /Sets the CSS class applied to all parent nodes. * + * * @optionValue New value to be set. */ @@ -80220,6 +94175,7 @@ interface JQuery { /** * Gets/Sets the tooltip applied to all parent node images. + * */ igTree(optionLiteral: 'option', optionName: "parentNodeImageTooltip"): string; @@ -80227,6 +94183,7 @@ interface JQuery { /** * /Sets the tooltip applied to all parent node images. * + * * @optionValue New value to be set. */ @@ -80234,6 +94191,7 @@ interface JQuery { /** * Gets/Sets the image url applied to all leaf nodes. + * */ igTree(optionLiteral: 'option', optionName: "leafNodeImageUrl"): string; @@ -80241,6 +94199,7 @@ interface JQuery { /** * /Sets the image url applied to all leaf nodes. * + * * @optionValue New value to be set. */ @@ -80248,6 +94207,7 @@ interface JQuery { /** * Gets/Sets the CSS class applied to all leaf nodes. + * */ igTree(optionLiteral: 'option', optionName: "leafNodeImageClass"): string; @@ -80255,6 +94215,7 @@ interface JQuery { /** * /Sets the CSS class applied to all leaf nodes. * + * * @optionValue New value to be set. */ @@ -80262,6 +94223,7 @@ interface JQuery { /** * Gets/Sets the tooltip applied to all leaf node images. + * */ igTree(optionLiteral: 'option', optionName: "leafNodeImageTooltip"): string; @@ -80269,6 +94231,7 @@ interface JQuery { /** * /Sets the tooltip applied to all leaf node images. * + * * @optionValue New value to be set. */ @@ -80276,24 +94239,28 @@ interface JQuery { /** * Gets/Sets the duration of each animation such as the expand/collapse. + * */ igTree(optionLiteral: 'option', optionName: "animationDuration"): number; /** * /Sets the duration of each animation such as the expand/collapse. * + * * @optionValue New value to be set. */ igTree(optionLiteral: 'option', optionName: "animationDuration", optionValue: number): void; /** * Gets the node data-path attribute separator character. + * */ igTree(optionLiteral: 'option', optionName: "pathSeparator"): string; /** * The node data-path attribute separator character. * + * * @optionValue New value to be set. */ igTree(optionLiteral: 'option', optionName: "pathSeparator", optionValue: string): void; @@ -80301,6 +94268,7 @@ interface JQuery { /** * Gets/Sets the igTree data source. Accepts any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself. * Once the data source is initialized, this option becomes an instance of the $.ig.HierarchicalDataSource. + * */ igTree(optionLiteral: 'option', optionName: "dataSource"): any; @@ -80308,12 +94276,14 @@ interface JQuery { * /Sets the igTree data source. Accepts any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself. * Once the data source is initialized, this option becomes an instance of the $.ig.HierarchicalDataSource. * + * * @optionValue New value to be set. */ igTree(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; /** * Gets/Sets a remote URL accepted by [$.ig.DataSource](ig.datasource) in order to request data from it. + * */ igTree(optionLiteral: 'option', optionName: "dataSourceUrl"): string; @@ -80321,6 +94291,7 @@ interface JQuery { /** * /Sets a remote URL accepted by [$.ig.DataSource](ig.datasource) in order to request data from it. * + * * @optionValue New value to be set. */ @@ -80328,6 +94299,7 @@ interface JQuery { /** * Gets the type of the data source. Delegates the value to [$.ig.DataSource.settings.type](ig.datasource#options:settings.type). Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource.settings.type. + * */ igTree(optionLiteral: 'option', optionName: "dataSourceType"): string; @@ -80335,6 +94307,7 @@ interface JQuery { /** * The type of the data source. Delegates the value to [$.ig.DataSource.settings.type](ig.datasource#options:settings.type). Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource.settings.type. * + * * @optionValue New value to be set. */ @@ -80342,6 +94315,7 @@ interface JQuery { /** * Gets the JSON key at which a remote data source will write the data. Delegates the value to [$.ig.DataSource.settings.responseDataKey](ig.datasource#options:settings.responseDataKey). Please refer to the documentation of $.ig.DataSource.settings.responseDataKey. + * */ igTree(optionLiteral: 'option', optionName: "responseDataKey"): string; @@ -80349,6 +94323,7 @@ interface JQuery { /** * The JSON key at which a remote data source will write the data. Delegates the value to [$.ig.DataSource.settings.responseDataKey](ig.datasource#options:settings.responseDataKey). Please refer to the documentation of $.ig.DataSource.settings.responseDataKey. * + * * @optionValue New value to be set. */ @@ -80356,6 +94331,7 @@ interface JQuery { /** * Gets the data type of the remote data source response. Delegates the value to [$.ig.DataSource.settings.responseDataType](ig.datasource#options:settings.responseDataType). Please refer to the documentation of $.ig.DataSource.settings.responseDataType. + * */ igTree(optionLiteral: 'option', optionName: "responseDataType"): string; @@ -80363,6 +94339,7 @@ interface JQuery { /** * The data type of the remote data source response. Delegates the value to [$.ig.DataSource.settings.responseDataType](ig.datasource#options:settings.responseDataType). Please refer to the documentation of $.ig.DataSource.settings.responseDataType. * + * * @optionValue New value to be set. */ @@ -80370,112 +94347,174 @@ interface JQuery { /** * Gets the HTTP verb used for remote requests. Gets the HTTP verb to be used to issue the requests to the [dataSourceUrl](ui.igtree#options:dataSourceUrl). + * */ igTree(optionLiteral: 'option', optionName: "requestType"): string; /** * The HTTP verb used for remote requests. Sets the HTTP verb to be used to issue the requests to the [dataSourceUrl](ui.igtree#options:dataSourceUrl). * + * * @optionValue New value to be set. */ igTree(optionLiteral: 'option', optionName: "requestType", optionValue: string): void; /** * Gets the type of the content in a remote data source response. Content type of the response from the [dataSourceUrl](ui.igtree#options:dataSourceUrl). See http://api.jquery.com/jQuery.ajax/ => contentType + * */ igTree(optionLiteral: 'option', optionName: "responseContentType"): string; /** * The type of the content in a remote data source response. Content type of the response from the [dataSourceUrl](ui.igtree#options:dataSourceUrl). See http://api.jquery.com/jQuery.ajax/ => contentType * + * * @optionValue New value to be set. */ igTree(optionLiteral: 'option', optionName: "responseContentType", optionValue: string): void; /** * Gets the initial depth the igTree is going to be expanded to upon initial render. + * */ igTree(optionLiteral: 'option', optionName: "initialExpandDepth"): number; /** * The initial depth the igTree is going to be expanded to upon initial render. * + * * @optionValue New value to be set. */ igTree(optionLiteral: 'option', optionName: "initialExpandDepth", optionValue: number): void; /** * Gets whether all the data would be bound initially or each child collection would be bound upon expand. + * */ igTree(optionLiteral: 'option', optionName: "loadOnDemand"): boolean; /** * Whether all the data would be bound initially or each child collection would be bound upon expand. * + * * @optionValue New value to be set. */ igTree(optionLiteral: 'option', optionName: "loadOnDemand", optionValue: boolean): void; /** * Gets the data binding properties and keys. The igTree uses these to extract the corresponding data from the dataSource. + * */ igTree(optionLiteral: 'option', optionName: "bindings"): IgTreeBindings; /** * The data binding properties and keys. The igTree uses these to extract the corresponding data from the dataSource. * + * * @optionValue New value to be set. */ igTree(optionLiteral: 'option', optionName: "bindings", optionValue: IgTreeBindings): void; /** * Gets the default target attribute value for the node anchors. + * */ igTree(optionLiteral: 'option', optionName: "defaultNodeTarget"): string; /** * The default target attribute value for the node anchors. * + * * @optionValue New value to be set. */ igTree(optionLiteral: 'option', optionName: "defaultNodeTarget", optionValue: string): void; /** * Gets/Sets whether drag and drop functionality is enabled. + * */ igTree(optionLiteral: 'option', optionName: "dragAndDrop"): boolean; /** * /Sets whether drag and drop functionality is enabled. * + * * @optionValue New value to be set. */ igTree(optionLiteral: 'option', optionName: "dragAndDrop", optionValue: boolean): void; /** * Gets the URL to which updating requests will be made. + * */ igTree(optionLiteral: 'option', optionName: "updateUrl"): string; /** * The URL to which updating requests will be made. * + * * @optionValue New value to be set. */ igTree(optionLiteral: 'option', optionName: "updateUrl", optionValue: string): void; /** * Gets/Sets specific settings for the drag and drop functionality. + * */ igTree(optionLiteral: 'option', optionName: "dragAndDropSettings"): IgTreeDragAndDropSettings; /** * /Sets specific settings for the drag and drop functionality. * + * * @optionValue New value to be set. */ igTree(optionLiteral: 'option', optionName: "dragAndDropSettings", optionValue: IgTreeDragAndDropSettings): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igTree(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igTree(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igTree(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igTree(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Fired before databinding is performed. */ @@ -80761,22 +94800,26 @@ interface IgTreeGridColumnFixing { /** * Specifies whether to show the column fixing buttons in header cells/feature chooser. + * */ showFixButtons?: boolean; /** * Enable row height sync for the fixed and unfixed portion of the grid. If you're observing row misalignment, please refer to [this article](http://www.igniteui.com/help/iggrid-known-issues#misalignment-ie9). + * */ syncRowHeights?: boolean; /** * Scroll delta in pixels when scrolling with the mouse wheel or the keyboard in the fixed columns area of the grid. + * */ scrollDelta?: number; /** * Configures which side the fixed columns of the grid will be rendered on. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#direction) out of more information. * + * * Valid values: * "left" Fixed columns are rendered on the left side of the main grid. * "right" Fixed columns are rendered on the right side of the main grid. @@ -80785,12 +94828,14 @@ interface IgTreeGridColumnFixing { /** * List of column settings that specifies custom column fixing options on a per column basis. + * */ columnSettings?: IgGridColumnFixingColumnSetting[]; /** * Minimal visible area in pixels for the unfixed columns. If the end user tries to fix a column(or columns), which causes the width of the fixed columns to grow such that the width of visible area of unfixed columns is less than this option then fixing will be canceled. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#non-fixable-min-width) out for more information. * + * * Valid values: * "string" The width can be set in pixels (px) and percentage (%). * "number" The width can be set in pixels as a number. @@ -80799,6 +94844,7 @@ interface IgTreeGridColumnFixing { /** * Specify initial fixing of all non data columns. Non-data columns are columns in the grid rendered for specific features, like the row selectors feature. The column containing the row numbering is such a column. This option is applicable when [fixingDirection](ui.iggridcolumnfixing#options:fixingDirection) is set to left. For a full column fixing configuration summary please refer to [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#configuration-summary). + * */ fixNondataColumns?: boolean; @@ -80844,6 +94890,8 @@ interface IgTreeGridColumnFixing { } interface IgTreeGridColumnFixingMethods { destroy(): void; + changeGlobalLanguage(): void; + changeGlobalRegional(): void; /** * Unfixes a column by specified column identifier - column key or column index. @@ -80866,6 +94914,11 @@ interface IgTreeGridColumnFixingMethods { * @param clearRowsHeights Clears row heigths for all visible rows. */ syncHeights(check?: boolean, clearRowsHeights?: boolean): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.iggridcolumnfixing#options:language) + * Note that this method is for rare scenarios, see [language](ui.iggridcolumnfixing#options:language) or [locale](ui.iggridcolumnfixing#options:locale) option setter + */ changeLocale(): void; /** @@ -80946,6 +94999,8 @@ interface JQuery { interface JQuery { igTreeGridColumnFixing(methodName: "destroy"): void; + igTreeGridColumnFixing(methodName: "changeGlobalLanguage"): void; + igTreeGridColumnFixing(methodName: "changeGlobalRegional"): void; igTreeGridColumnFixing(methodName: "unfixColumn", colIdentifier: Object, target?: string, after?: boolean): Object; igTreeGridColumnFixing(methodName: "checkAndSyncHeights"): void; igTreeGridColumnFixing(methodName: "syncHeights", check?: boolean, clearRowsHeights?: boolean): void; @@ -81022,42 +95077,49 @@ interface JQuery { /** * Gets whether to show the column fixing buttons in header cells/feature chooser. + * */ igTreeGridColumnFixing(optionLiteral: 'option', optionName: "showFixButtons"): boolean; /** * Sets whether to show the column fixing buttons in header cells/feature chooser. * + * * @optionValue New value to be set. */ igTreeGridColumnFixing(optionLiteral: 'option', optionName: "showFixButtons", optionValue: boolean): void; /** * Enable row height sync for the fixed and unfixed portion of the grid. If you're observing row misalignment, please refer to [this article](http://www.igniteui.com/help/iggrid-known-issues#misalignment-ie9). + * */ igTreeGridColumnFixing(optionLiteral: 'option', optionName: "syncRowHeights"): boolean; /** * Enable row height sync for the fixed and unfixed portion of the grid. If you're observing row misalignment, please refer to [this article](http://www.igniteui.com/help/iggrid-known-issues#misalignment-ie9). * + * * @optionValue New value to be set. */ igTreeGridColumnFixing(optionLiteral: 'option', optionName: "syncRowHeights", optionValue: boolean): void; /** * Scroll delta in pixels when scrolling with the mouse wheel or the keyboard in the fixed columns area of the grid. + * */ igTreeGridColumnFixing(optionLiteral: 'option', optionName: "scrollDelta"): number; /** * Scroll delta in pixels when scrolling with the mouse wheel or the keyboard in the fixed columns area of the grid. * + * * @optionValue New value to be set. */ igTreeGridColumnFixing(optionLiteral: 'option', optionName: "scrollDelta", optionValue: number): void; /** * Configures which side the fixed columns of the grid will be rendered on. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#direction) out of more information. + * */ igTreeGridColumnFixing(optionLiteral: 'option', optionName: "fixingDirection"): string; @@ -81065,6 +95127,7 @@ interface JQuery { /** * Configures which side the fixed columns of the grid will be rendered on. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#direction) out of more information. * + * * @optionValue New value to be set. */ @@ -81072,18 +95135,21 @@ interface JQuery { /** * List of column settings that specifies custom column fixing options on a per column basis. + * */ igTreeGridColumnFixing(optionLiteral: 'option', optionName: "columnSettings"): IgGridColumnFixingColumnSetting[]; /** * List of column settings that specifies custom column fixing options on a per column basis. * + * * @optionValue New value to be set. */ igTreeGridColumnFixing(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridColumnFixingColumnSetting[]): void; /** * Minimal visible area in pixels for the unfixed columns. If the end user tries to fix a column(or columns), which causes the width of the fixed columns to grow such that the width of visible area of unfixed columns is less than this option then fixing will be canceled. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#non-fixable-min-width) out for more information. + * */ igTreeGridColumnFixing(optionLiteral: 'option', optionName: "minimalVisibleAreaWidth"): string|number; @@ -81091,6 +95157,7 @@ interface JQuery { /** * Minimal visible area in pixels for the unfixed columns. If the end user tries to fix a column(or columns), which causes the width of the fixed columns to grow such that the width of visible area of unfixed columns is less than this option then fixing will be canceled. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#non-fixable-min-width) out for more information. * + * * @optionValue New value to be set. */ @@ -81098,12 +95165,14 @@ interface JQuery { /** * Specify initial fixing of all non data columns. Non-data columns are columns in the grid rendered for specific features, like the row selectors feature. The column containing the row numbering is such a column. This option is applicable when [fixingDirection](ui.iggridcolumnfixing#options:fixingDirection) is set to left. For a full column fixing configuration summary please refer to [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#configuration-summary). + * */ igTreeGridColumnFixing(optionLiteral: 'option', optionName: "fixNondataColumns"): boolean; /** * Specify initial fixing of all non data columns. Non-data columns are columns in the grid rendered for specific features, like the row selectors feature. The column containing the row numbering is such a column. This option is applicable when [fixingDirection](ui.iggridcolumnfixing#options:fixingDirection) is set to left. For a full column fixing configuration summary please refer to [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#configuration-summary). * + * * @optionValue New value to be set. */ igTreeGridColumnFixing(optionLiteral: 'option', optionName: "fixNondataColumns", optionValue: boolean): void; @@ -81198,14 +95267,21 @@ interface JQuery { igTreeGridColumnFixing(methodName: string, ...methodParams: any[]): any; } interface IgTreeGridColumnMoving { + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + inherit?: boolean; + /** * A list of column settings that specifies moving options on a per column basis. + * */ columnSettings?: IgGridColumnMovingColumnSetting[]; /** * Specify the drag-and-drop mode for the feature * + * * Valid values: * "immediate" Column headers will rearange as you drag with a space opening under the cursor for the header to be dropped on * "deferred" A clone of the header dragged will be created and indicators will be shown between columns to help navigate the drop. @@ -81215,6 +95291,7 @@ interface IgTreeGridColumnMoving { /** * Specify the way columns will be rearranged * + * * Valid values: * "dom" Columns will be rearranged through dom manipulation * "render" Columns will not be rearranged but the grid will be rendered again with the new column order. Please note this option is incompatible with immediate move mode. @@ -81223,47 +95300,56 @@ interface IgTreeGridColumnMoving { /** * Specifies if header cells should include an additional button that opens a moving helper dropdown. + * */ addMovingDropdown?: boolean; /** * Specifies width of column moving dialog + * */ movingDialogWidth?: number; /** * Specifies height of column moving dialog + * */ movingDialogHeight?: number; /** * Specifies time in milliseconds for animation duration to show/hide modal dialog + * */ movingDialogAnimationDuration?: number; /** * Specifies the length (in pixels) between the dragged column and the column edges below which the move operation is accepted + * */ movingAcceptanceTolerance?: number; /** * Specifies the length (in pixels) between the dragged column and the grid edges below which horizontal scrolling occurs + * */ movingScrollTolerance?: number; /** * Specifies a multiplier for the delay between subsequent scroll operations. The larger this number is, the slower scrolling will appear to be. + * */ scrollSpeedMultiplier?: number; /** * Specifies the length (in pixels) of each individual scroll operation + * */ scrollDelta?: number; /** * Specifies whether the contents of the column being dragged will get hidden. The option is only * relevant in immediate moving mode. + * */ hideHeaderContentsDuringDrag?: boolean; @@ -81271,6 +95357,7 @@ interface IgTreeGridColumnMoving { * Specifies the opacity of the drag markup, while a column header is being dragged. * The value must be between 0 and 1. When GroupBy is enabled, the corresponding option in the GroupBy configuration * will be used with priority over this one. + * */ dragHelperOpacity?: number; @@ -81343,6 +95430,7 @@ interface IgTreeGridColumnMoving { /** * Specifies markup for drop tooltip in column moving dialog + * */ movingDialogDropTooltipMarkup?: string; @@ -81356,14 +95444,10 @@ interface IgTreeGridColumnMoving { /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * */ dialogWidget?: string; - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. - */ - inherit?: boolean; - /** * Event which is fired when a drag operation begins on a column header */ @@ -81451,6 +95535,13 @@ interface IgTreeGridColumnMoving { } interface IgTreeGridColumnMovingMethods { destroy(): void; + changeGlobalLanguage(): void; + changeGlobalRegional(): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.iggridcolumnmoving#options:language) + * Note that this method is for rare scenarios, see [language](ui.iggridcolumnmoving#options:language) or [locale](ui.iggridcolumnmoving#options:locale) option setter + */ changeLocale(): void; /** @@ -81471,23 +95562,40 @@ interface JQuery { interface JQuery { igTreeGridColumnMoving(methodName: "destroy"): void; + igTreeGridColumnMoving(methodName: "changeGlobalLanguage"): void; + igTreeGridColumnMoving(methodName: "changeGlobalRegional"): void; igTreeGridColumnMoving(methodName: "changeLocale"): void; igTreeGridColumnMoving(methodName: "moveColumn", column: Object, target: Object, after?: boolean, inDom?: boolean, callback?: Function): void; + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + /** * A list of column settings that specifies moving options on a per column basis. + * */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "columnSettings"): IgGridColumnMovingColumnSetting[]; /** * A list of column settings that specifies moving options on a per column basis. * + * * @optionValue New value to be set. */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridColumnMovingColumnSetting[]): void; /** * Specify the drag-and-drop mode for the feature + * */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "mode"): string; @@ -81495,6 +95603,7 @@ interface JQuery { /** * Specify the drag-and-drop mode for the feature * + * * @optionValue New value to be set. */ @@ -81502,6 +95611,7 @@ interface JQuery { /** * Specify the way columns will be rearranged + * */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "moveType"): string; @@ -81509,6 +95619,7 @@ interface JQuery { /** * Specify the way columns will be rearranged * + * * @optionValue New value to be set. */ @@ -81516,96 +95627,112 @@ interface JQuery { /** * Gets if header cells should include an additional button that opens a moving helper dropdown. + * */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "addMovingDropdown"): boolean; /** * Sets if header cells should include an additional button that opens a moving helper dropdown. * + * * @optionValue New value to be set. */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "addMovingDropdown", optionValue: boolean): void; /** * Gets width of column moving dialog + * */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogWidth"): number; /** * Sets width of column moving dialog * + * * @optionValue New value to be set. */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogWidth", optionValue: number): void; /** * Gets height of column moving dialog + * */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogHeight"): number; /** * Sets height of column moving dialog * + * * @optionValue New value to be set. */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogHeight", optionValue: number): void; /** * Gets time in milliseconds for animation duration to show/hide modal dialog + * */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogAnimationDuration"): number; /** * Sets time in milliseconds for animation duration to show/hide modal dialog * + * * @optionValue New value to be set. */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogAnimationDuration", optionValue: number): void; /** * Gets the length (in pixels) between the dragged column and the column edges below which the move operation is accepted + * */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingAcceptanceTolerance"): number; /** * Sets the length (in pixels) between the dragged column and the column edges below which the move operation is accepted * + * * @optionValue New value to be set. */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingAcceptanceTolerance", optionValue: number): void; /** * Gets the length (in pixels) between the dragged column and the grid edges below which horizontal scrolling occurs + * */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingScrollTolerance"): number; /** * Sets the length (in pixels) between the dragged column and the grid edges below which horizontal scrolling occurs * + * * @optionValue New value to be set. */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingScrollTolerance", optionValue: number): void; /** * Gets a multiplier for the delay between subsequent scroll operations. The larger this number is, the slower scrolling will appear to be. + * */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "scrollSpeedMultiplier"): number; /** * Sets a multiplier for the delay between subsequent scroll operations. The larger this number is, the slower scrolling will appear to be. * + * * @optionValue New value to be set. */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "scrollSpeedMultiplier", optionValue: number): void; /** * Gets the length (in pixels) of each individual scroll operation + * */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "scrollDelta"): number; /** * Sets the length (in pixels) of each individual scroll operation * + * * @optionValue New value to be set. */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "scrollDelta", optionValue: number): void; @@ -81613,6 +95740,7 @@ interface JQuery { /** * Gets whether the contents of the column being dragged will get hidden. The option is only * relevant in immediate moving mode. + * */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "hideHeaderContentsDuringDrag"): boolean; @@ -81620,6 +95748,7 @@ interface JQuery { * Sets whether the contents of the column being dragged will get hidden. The option is only * relevant in immediate moving mode. * + * * @optionValue New value to be set. */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "hideHeaderContentsDuringDrag", optionValue: boolean): void; @@ -81628,6 +95757,7 @@ interface JQuery { * Gets the opacity of the drag markup, while a column header is being dragged. * The value must be between 0 and 1. When GroupBy is enabled, the corresponding option in the GroupBy configuration * will be used with priority over this one. + * */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "dragHelperOpacity"): number; @@ -81636,6 +95766,7 @@ interface JQuery { * The value must be between 0 and 1. When GroupBy is enabled, the corresponding option in the GroupBy configuration * will be used with priority over this one. * + * * @optionValue New value to be set. */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "dragHelperOpacity", optionValue: number): void; @@ -81798,12 +95929,14 @@ interface JQuery { /** * Gets markup for drop tooltip in column moving dialog + * */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDropTooltipMarkup"): string; /** * Sets markup for drop tooltip in column moving dialog * + * * @optionValue New value to be set. */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDropTooltipMarkup", optionValue: string): void; @@ -81828,27 +95961,17 @@ interface JQuery { /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * */ igTreeGridColumnMoving(optionLiteral: 'option', optionName: "dialogWidget"): string; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. * - * @optionValue New value to be set. - */ - igTreeGridColumnMoving(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; - - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. - */ - igTreeGridColumnMoving(optionLiteral: 'option', optionName: "inherit"): boolean; - - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. * * @optionValue New value to be set. */ - igTreeGridColumnMoving(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; /** * Event which is fired when a drag operation begins on a column header @@ -82056,6 +96179,7 @@ interface IgTreeGridFilteringLocale { * ${startRecord} (paging) * ${endRecord} (paging) * ${recordCount} (paging) + * */ filterSummaryInPagerTemplate?: string; @@ -82068,21 +96192,25 @@ interface IgTreeGridFilteringLocale { interface IgTreeGridFiltering { /** * The property in the response that will hold the total number of records in the data source + * */ recordCountKey?: string; /** * Specifies from which data bound level to be applied filtering - 0 is the first level + * */ fromLevel?: number; /** * Specifies to which data bound level to be applied filtering - if -1 filtering should be applied to the last data bound level + * */ toLevel?: number; /** * If displayMode is showWithAncestorsAndDescendants, show all records that match filtering conditions and their child records, even if child records don"t match filtering conditions. If displayMode is showWithAncestors show only those records that match filtering conditions and do not show child records(if any) that don"t match filtering conditions + * */ displayMode?: any; @@ -82090,6 +96218,7 @@ interface IgTreeGridFiltering { * Specifies the name of a boolean property in the dataRecord object that indicates whether the dataRow matches the filtering conditions. * When filtering a boolean flag with the specified name is added on each data record object with a value of true if it matches the condition or false if it doesn"t. * This is used mainly for internal purposes. + * */ matchFiltering?: string; @@ -82107,8 +96236,14 @@ interface IgTreeGridFiltering { filterSummaryInPagerTemplate?: string; locale?: IgTreeGridFilteringLocale; + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + inherit?: boolean; + /** * Enables or disables the filtering case sensitivity. Works only for local filtering. If true, it case sensitive filtering is performed. If false, filtering is case insensitive. + * */ caseSensitive?: boolean; @@ -82116,11 +96251,13 @@ interface IgTreeGridFiltering { * Enable/disable footer visibility with summary info about the filter. * When false, the filter summary row (in the footer) will only be visible when paging is enabled (or some other feature that renders a footer). * When true, the filter summary row will only be visible when a filter is applied i.e. it's not visible by default. + * */ filterSummaryAlwaysVisible?: boolean; /** * Render in [Feature Chooser](http://www.igniteui.com/help/iggrid-feature-chooser) + * */ renderFC?: boolean; @@ -82133,6 +96270,7 @@ interface IgTreeGridFiltering { /** * Type of animations for the column filter dropdowns. * + * * Valid values: * "linear" The column filtering drop downs are shown with a linear animation. * "none" No animation is used when showing the filtering drop downs. @@ -82141,12 +96279,14 @@ interface IgTreeGridFiltering { /** * Animation duration in milliseconds for the [filterDropDownAnimations](ui.iggridfiltering#options:filterDropDownAnimations). + * */ filterDropDownAnimationDuration?: number; /** * Width of the column filter dropdowns. * + * * Valid values: * "string" The width in pixels (0px) * "number" The width in pixels as a number (0) @@ -82163,12 +96303,14 @@ interface IgTreeGridFiltering { /** * URL key name that specifies how the filtering expressions will be encoded for remote requests, e.g. &filter('col') = startsWith. Default is OData. + * */ filterExprUrlKey?: string; /** * Enable/disable filter icons visibility. * + * * Valid values: * "true" All predefined filters in the filter dropdowns will have icons rendered in front of the text. * "false" No icons will be rendered. @@ -82177,12 +96319,14 @@ interface IgTreeGridFiltering { /** * A list of column settings that specifies custom filtering options on a per column basis. + * */ columnSettings?: IgGridFilteringColumnSetting[]; /** * Type of filtering. Delegates all filtering functionality to the [$.ig.DataSource](ig.datasource). * + * * Valid values: * "remote" Filtering is performed by a remote end-point. * "local" Filtering is performed locally by the [$.ig.DataSource](ig.datasource). @@ -82191,12 +96335,14 @@ interface IgTreeGridFiltering { /** * Time in milliseconds for which widget will wait between keystrokes before sending filtering requests. + * */ filterDelay?: number; /** * Default is 'simple' for non-virtualized grids, and 'advanced' when [virtualization](ui.iggrid#options:virtualization) is enabled. * + * * Valid values: * "simple" Renders just a filter row. * "advanced" Allows to configure multiple filters from a dialog - Excel style. @@ -82205,12 +96351,14 @@ interface IgTreeGridFiltering { /** * Defines whether to render editors in advanced [mode](ui.iggridfiltering#options:mode). If false, no editors will be rendered in the advanced [mode](ui.iggridfiltering#options:mode). + * */ advancedModeEditorsVisible?: boolean; /** * Location of the advanced filtering button when [advancedModeEditorsVisible](ui.iggridfiltering#options:advancedModeEditorsVisible) is false (i.e. when the button is rendered in the header). * + * * Valid values: * "left" * "right" @@ -82220,6 +96368,7 @@ interface IgTreeGridFiltering { /** * Default filter dialog width (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). * + * * Valid values: * "string" The dialog window width in pixels (370px). * "number" The dialog window width in pixels as a number (370). @@ -82229,6 +96378,7 @@ interface IgTreeGridFiltering { /** * default filter dialog height (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). * + * * Valid values: * "string" The dialog window height in pixels (350px). * "number" The dialog window height in pixels as a number (350). @@ -82238,6 +96388,7 @@ interface IgTreeGridFiltering { /** * Width of the filtering condition dropdowns in the advanced filter dialog. * + * * Valid values: * "string" The filtering condition dropdowns width in pixels (80px). * "number" The filtering condition dropdowns width in pixels as a number (80). @@ -82247,6 +96398,7 @@ interface IgTreeGridFiltering { /** * Width of the filtering expression input boxes in the advanced filter dialog. * + * * Valid values: * "string" The filtering expression input boxes width in pixels (80px). * "number" The filtering expression input boxes width in pixels as a number (80). @@ -82256,6 +96408,7 @@ interface IgTreeGridFiltering { /** * Width of the column chooser dropdowns in the advanced filter dialog. * + * * Valid values: * "string" The column chooser dropdowns width in pixels (80px). * "number" The column chooser dropdowns width in pixels as a number (80). @@ -82264,12 +96417,14 @@ interface IgTreeGridFiltering { /** * Enable/disable filter button visibility. If false, no filter dropdown buttons will be rendered and a predefined list of filters will not be rendered for the columns. + * */ renderFilterButton?: boolean; /** * The filtering button for filter dropdowns can be rendered either on the left of the filter editor, or on the right. * + * * Valid values: * "left" The button is rendered on the left. * "right" The button is rendered on the right. @@ -82314,11 +96469,13 @@ interface IgTreeGridFiltering { /** * Custom template for add condition area in the filter dialog. The default template is "
${label1}
${label2}
". + * */ filterDialogAddConditionTemplate?: string; /** * Custom template for options in dropdown in add condition area in the filter dialog. The default template is "". + * */ filterDialogAddConditionDropDownTemplate?: string; @@ -82328,17 +96485,20 @@ interface IgTreeGridFiltering { * E.g.: DOM element used for selecting column has attribute "data-af-col", for selecting filter condition - "data-af-cond", for filter expression- "data-af-expr". * NOTE: The template is supported only with . * The default template is " ". + * */ filterDialogFilterTemplate?: string; /** * Custom template for options in condition list in filter dialog. The default template is "". + * */ filterDialogFilterConditionTemplate?: string; /** * Add button width - in the advanced filter dialog. * + * * Valid values: * "string" The dialog Add button width in pixels (100px). * "number" The dialog Add button width in pixels as a number (100). @@ -82348,6 +96508,7 @@ interface IgTreeGridFiltering { /** * Width of the Ok and Cancel buttons in the advanced filtering dialogs. * + * * Valid values: * "string" The advanced filter dialog Ok and Cancel buttons width in pixels (120px). * "number" The advanced filter dialog Ok and Cancel buttons width in pixels as a number (120). @@ -82356,6 +96517,7 @@ interface IgTreeGridFiltering { /** * Maximum number of filter rows in the advanced filtering dialog. If this number is exceeded, an error message will be rendered. + * */ filterDialogMaxFilterCount?: number; @@ -82369,28 +96531,114 @@ interface IgTreeGridFiltering { /** * Enable/disable empty condition visibility in the filter. If true, shows empty and not empty filtering conditions in the dropdowns. + * */ showEmptyConditions?: boolean; /** * Enable/disable visibility of null and not null filtering conditions in the dropdowns. If true, shows null and not null filtering conditions in the dropdowns. + * */ showNullConditions?: boolean; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * */ dialogWidget?: string; /** * Enables/disables filtering persistence between states. + * */ persist?: boolean; /** - * Enables/disables feature inheritance for the child [layouts](ui.ighierarchicalgrid#options:columnLayouts). NOTE: It only applies for [igHierarchicalGrid](ui.ighierarchicalgrid). + * Event fired before a filtering operation is executed (remote request or local). + * Return false in order to cancel filtering operation. */ - inherit?: boolean; + dataFiltering?: DataFilteringEvent; + + /** + * Event fired after the filtering has been executed and results are rendered. + */ + dataFiltered?: DataFilteredEvent; + + /** + * Event fired before the filter dropdown is opened for a specific column. + * Return false in order to cancel dropdown opening. + */ + dropDownOpening?: DropDownOpeningEvent; + + /** + * Event fired after the filter dropdown is opened for a specific column. + */ + dropDownOpened?: DropDownOpenedEvent; + + /** + * Event fired before the filter dropdown starts closing. + * Return false in order to cancel dropdown closing. + */ + dropDownClosing?: DropDownClosingEvent; + + /** + * Event fired after a filter column dropdown is completely closed. + */ + dropDownClosed?: DropDownClosedEvent; + + /** + * Event fired before the advanced filtering dialog is opened. + * Return false in order to cancel filter dialog opening. + */ + filterDialogOpening?: FilterDialogOpeningEvent; + + /** + * Event fired after the advanced filter dialog is already opened. + */ + filterDialogOpened?: FilterDialogOpenedEvent; + + /** + * Event fired every time the advanced filter dialog changes its position. + */ + filterDialogMoving?: FilterDialogMovingEvent; + + /** + * Event fired before a filter row is added to the advanced filter dialog. + * Return false in order to cancel filter adding to the advanced filtering dialog. + */ + filterDialogFilterAdding?: FilterDialogFilterAddingEvent; + + /** + * Event fired after a filter row is added to the advanced filter dialog. + */ + filterDialogFilterAdded?: FilterDialogFilterAddedEvent; + + /** + * Event fired before the advanced filter dialog is closed. + * Return false in order to cancel filtering dialog closing. + */ + filterDialogClosing?: FilterDialogClosingEvent; + + /** + * Event fired after the advanced filter dialog has been closed. + */ + filterDialogClosed?: FilterDialogClosedEvent; + + /** + * Event fired before the contents of the advanced filter dialog are rendered. + * Return false in order to cancel filtering dialog rendering. + */ + filterDialogContentsRendering?: FilterDialogContentsRenderingEvent; + + /** + * Event fired after the contents of the advanced filter dialog are rendered. + */ + filterDialogContentsRendered?: FilterDialogContentsRenderedEvent; + + /** + * Event fired when the OK button in the advanced filter dialog is pressed. + */ + filterDialogFiltering?: FilterDialogFilteringEvent; /** * Option for igTreeGridFiltering @@ -82403,6 +96651,43 @@ interface IgTreeGridFilteringMethods { */ getFilteringMatchesCount(): number; destroy(): void; + changeGlobalLanguage(): void; + changeGlobalRegional(): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.iggridfiltering#options:language) + * Note that this method is for rare scenarios, see [language](ui.iggridfiltering#options:language) or [locale](ui.iggridfiltering#options:locale) option setter + */ + changeLocale(): void; + + /** + * Changes the the regional settings of widget element to the language specified in [options.regional](ui.iggridfiltering#options:regional) + * Note that this method is for rare scenarios, use [regional](ui.iggridfiltering#options:regional) option setter + */ + changeRegional(): void; + + /** + * Toggle filter row when mode is simple or [advancedModeEditorsVisible](ui.iggridfiltering#options:advancedModeEditorsVisible) is true. Otherwise show/hide advanced dialog. + * + * @param event Column key + */ + toggleFilterRowByFeatureChooser(event: string): void; + + /** + * Applies filtering programmatically and updates the UI by default. + * + * @param expressions An array of filtering expressions, each one having the format {fieldName: , expr: , cond: , logic: } where fieldName is the key of the column, expr is the actual expression string with which we would like to filter, logic is 'AND' or 'OR', and cond is one of the following strings: "equals", "doesNotEqual", "contains", "doesNotContain", "greaterThan", "lessThan", "greaterThanOrEqualTo", "lessThanOrEqualTo", "true", "false", "null", "notNull", "empty", "notEmpty", "startsWith", "endsWith", "today", "yesterday", "on", "notOn", "thisMonth", "lastMonth", "nextMonth", "before", "after", "thisYear", "lastYear", "nextYear". The difference between the empty and null filtering conditions is that empty includes null, NaN, and undefined, as well as the empty string. + * @param updateUI specifies whether the filter row should be also updated once the grid is filtered + * @param addedFromAdvanced + */ + filter(expressions: any[], updateUI?: boolean, addedFromAdvanced?: boolean): void; + + /** + * Check whether filterCondition requires or not filtering expression - e.g. if filterCondition is "lastMonth", "thisMonth", "null", "notNull", "true", "false", etc. then filtering expression is NOT required + * + * @param filterCondition filtering condition - e.g. "true", "false", "yesterday", "empty", "null", etc. + */ + requiresFilteringExpression(filterCondition: string): boolean; } interface JQuery { data(propertyName: "igTreeGridFiltering"): IgTreeGridFilteringMethods; @@ -82411,51 +96696,66 @@ interface JQuery { interface JQuery { igTreeGridFiltering(methodName: "getFilteringMatchesCount"): number; igTreeGridFiltering(methodName: "destroy"): void; + igTreeGridFiltering(methodName: "changeGlobalLanguage"): void; + igTreeGridFiltering(methodName: "changeGlobalRegional"): void; + igTreeGridFiltering(methodName: "changeLocale"): void; + igTreeGridFiltering(methodName: "changeRegional"): void; + igTreeGridFiltering(methodName: "toggleFilterRowByFeatureChooser", event: string): void; + igTreeGridFiltering(methodName: "filter", expressions: any[], updateUI?: boolean, addedFromAdvanced?: boolean): void; + igTreeGridFiltering(methodName: "requiresFilteringExpression", filterCondition: string): boolean; /** * The property in the response that will hold the total number of records in the data source + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "recordCountKey"): string; /** * The property in the response that will hold the total number of records in the data source * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "recordCountKey", optionValue: string): void; /** * Specifies from which data bound level to be applied filtering - 0 is the first level + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "fromLevel"): number; /** * Specifies from which data bound level to be applied filtering - 0 is the first level * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "fromLevel", optionValue: number): void; /** * Specifies to which data bound level to be applied filtering - if -1 filtering should be applied to the last data bound level + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "toLevel"): number; /** * Specifies to which data bound level to be applied filtering - if -1 filtering should be applied to the last data bound level * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "toLevel", optionValue: number): void; /** * If displayMode is showWithAncestorsAndDescendants, show all records that match filtering conditions and their child records, even if child records don"t match filtering conditions. If displayMode is showWithAncestors show only those records that match filtering conditions and do not show child records(if any) that don"t match filtering conditions + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "displayMode"): any; /** * If displayMode is showWithAncestorsAndDescendants, show all records that match filtering conditions and their child records, even if child records don"t match filtering conditions. If displayMode is showWithAncestors show only those records that match filtering conditions and do not show child records(if any) that don"t match filtering conditions * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "displayMode", optionValue: any): void; @@ -82464,6 +96764,7 @@ interface JQuery { * Gets the name of a boolean property in the dataRecord object that indicates whether the dataRow matches the filtering conditions. * When filtering a boolean flag with the specified name is added on each data record object with a value of true if it matches the condition or false if it doesn"t. * This is used mainly for internal purposes. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "matchFiltering"): string; @@ -82472,6 +96773,7 @@ interface JQuery { * When filtering a boolean flag with the specified name is added on each data record object with a value of true if it matches the condition or false if it doesn"t. * This is used mainly for internal purposes. * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "matchFiltering", optionValue: string): void; @@ -82506,14 +96808,28 @@ interface JQuery { igTreeGridFiltering(optionLiteral: 'option', optionName: "locale"): IgTreeGridFilteringLocale; igTreeGridFiltering(optionLiteral: 'option', optionName: "locale", optionValue: IgTreeGridFilteringLocale): void; + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + /** * Enables or disables the filtering case sensitivity. Works only for local filtering. If true, it case sensitive filtering is performed. If false, filtering is case insensitive. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "caseSensitive"): boolean; /** * Enables or disables the filtering case sensitivity. Works only for local filtering. If true, it case sensitive filtering is performed. If false, filtering is case insensitive. * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "caseSensitive", optionValue: boolean): void; @@ -82522,6 +96838,7 @@ interface JQuery { * Enable/disable footer visibility with summary info about the filter. * When false, the filter summary row (in the footer) will only be visible when paging is enabled (or some other feature that renders a footer). * When true, the filter summary row will only be visible when a filter is applied i.e. it's not visible by default. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterSummaryAlwaysVisible"): boolean; @@ -82530,18 +96847,21 @@ interface JQuery { * When false, the filter summary row (in the footer) will only be visible when paging is enabled (or some other feature that renders a footer). * When true, the filter summary row will only be visible when a filter is applied i.e. it's not visible by default. * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterSummaryAlwaysVisible", optionValue: boolean): void; /** * Render in [Feature Chooser](http://www.igniteui.com/help/iggrid-feature-chooser) + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "renderFC"): boolean; /** * Render in [Feature Chooser](http://www.igniteui.com/help/iggrid-feature-chooser) * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "renderFC", optionValue: boolean): void; @@ -82562,6 +96882,7 @@ interface JQuery { /** * Type of animations for the column filter dropdowns. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDropDownAnimations"): string; @@ -82569,6 +96890,7 @@ interface JQuery { /** * Type of animations for the column filter dropdowns. * + * * @optionValue New value to be set. */ @@ -82576,18 +96898,21 @@ interface JQuery { /** * Animation duration in milliseconds for the [filterDropDownAnimations](ui.iggridfiltering#options:filterDropDownAnimations). + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDropDownAnimationDuration"): number; /** * Animation duration in milliseconds for the [filterDropDownAnimations](ui.iggridfiltering#options:filterDropDownAnimations). * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDropDownAnimationDuration", optionValue: number): void; /** * Width of the column filter dropdowns. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDropDownWidth"): string|number; @@ -82595,6 +96920,7 @@ interface JQuery { /** * Width of the column filter dropdowns. * + * * @optionValue New value to be set. */ @@ -82620,18 +96946,21 @@ interface JQuery { /** * URL key name that specifies how the filtering expressions will be encoded for remote requests, e.g. &filter('col') = startsWith. Default is OData. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterExprUrlKey"): string; /** * URL key name that specifies how the filtering expressions will be encoded for remote requests, e.g. &filter('col') = startsWith. Default is OData. * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterExprUrlKey", optionValue: string): void; /** * Enable/disable filter icons visibility. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDropDownItemIcons"): boolean; @@ -82639,6 +96968,7 @@ interface JQuery { /** * Enable/disable filter icons visibility. * + * * @optionValue New value to be set. */ @@ -82646,18 +96976,21 @@ interface JQuery { /** * A list of column settings that specifies custom filtering options on a per column basis. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "columnSettings"): IgGridFilteringColumnSetting[]; /** * A list of column settings that specifies custom filtering options on a per column basis. * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridFilteringColumnSetting[]): void; /** * Type of filtering. Delegates all filtering functionality to the [$.ig.DataSource](ig.datasource). + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "type"): string; @@ -82665,6 +96998,7 @@ interface JQuery { /** * Type of filtering. Delegates all filtering functionality to the [$.ig.DataSource](ig.datasource). * + * * @optionValue New value to be set. */ @@ -82672,18 +97006,21 @@ interface JQuery { /** * Time in milliseconds for which widget will wait between keystrokes before sending filtering requests. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDelay"): number; /** * Time in milliseconds for which widget will wait between keystrokes before sending filtering requests. * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDelay", optionValue: number): void; /** * Default is 'simple' for non-virtualized grids, and 'advanced' when [virtualization](ui.iggrid#options:virtualization) is enabled. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "mode"): string; @@ -82691,6 +97028,7 @@ interface JQuery { /** * Default is 'simple' for non-virtualized grids, and 'advanced' when [virtualization](ui.iggrid#options:virtualization) is enabled. * + * * @optionValue New value to be set. */ @@ -82698,18 +97036,21 @@ interface JQuery { /** * Defines whether to render editors in advanced [mode](ui.iggridfiltering#options:mode). If false, no editors will be rendered in the advanced [mode](ui.iggridfiltering#options:mode). + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "advancedModeEditorsVisible"): boolean; /** * Defines whether to render editors in advanced [mode](ui.iggridfiltering#options:mode). If false, no editors will be rendered in the advanced [mode](ui.iggridfiltering#options:mode). * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "advancedModeEditorsVisible", optionValue: boolean): void; /** * Location of the advanced filtering button when [advancedModeEditorsVisible](ui.iggridfiltering#options:advancedModeEditorsVisible) is false (i.e. when the button is rendered in the header). + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "advancedModeHeaderButtonLocation"): string; @@ -82717,6 +97058,7 @@ interface JQuery { /** * Location of the advanced filtering button when [advancedModeEditorsVisible](ui.iggridfiltering#options:advancedModeEditorsVisible) is false (i.e. when the button is rendered in the header). * + * * @optionValue New value to be set. */ @@ -82724,6 +97066,7 @@ interface JQuery { /** * Default filter dialog width (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogWidth"): string|number; @@ -82731,6 +97074,7 @@ interface JQuery { /** * Default filter dialog width (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). * + * * @optionValue New value to be set. */ @@ -82738,6 +97082,7 @@ interface JQuery { /** * Default filter dialog height (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogHeight"): string|number; @@ -82745,6 +97090,7 @@ interface JQuery { /** * Default filter dialog height (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). * + * * @optionValue New value to be set. */ @@ -82752,6 +97098,7 @@ interface JQuery { /** * Width of the filtering condition dropdowns in the advanced filter dialog. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterDropDownDefaultWidth"): string|number; @@ -82759,6 +97106,7 @@ interface JQuery { /** * Width of the filtering condition dropdowns in the advanced filter dialog. * + * * @optionValue New value to be set. */ @@ -82766,6 +97114,7 @@ interface JQuery { /** * Width of the filtering expression input boxes in the advanced filter dialog. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogExprInputDefaultWidth"): string|number; @@ -82773,6 +97122,7 @@ interface JQuery { /** * Width of the filtering expression input boxes in the advanced filter dialog. * + * * @optionValue New value to be set. */ @@ -82780,6 +97130,7 @@ interface JQuery { /** * Width of the column chooser dropdowns in the advanced filter dialog. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogColumnDropDownDefaultWidth"): string|number; @@ -82787,6 +97138,7 @@ interface JQuery { /** * Width of the column chooser dropdowns in the advanced filter dialog. * + * * @optionValue New value to be set. */ @@ -82794,18 +97146,21 @@ interface JQuery { /** * Enable/disable filter button visibility. If false, no filter dropdown buttons will be rendered and a predefined list of filters will not be rendered for the columns. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "renderFilterButton"): boolean; /** * Enable/disable filter button visibility. If false, no filter dropdown buttons will be rendered and a predefined list of filters will not be rendered for the columns. * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "renderFilterButton", optionValue: boolean): void; /** * The filtering button for filter dropdowns can be rendered either on the left of the filter editor, or on the right. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterButtonLocation"): string; @@ -82813,6 +97168,7 @@ interface JQuery { /** * The filtering button for filter dropdowns can be rendered either on the left of the filter editor, or on the right. * + * * @optionValue New value to be set. */ @@ -82904,24 +97260,28 @@ interface JQuery { /** * Custom template for add condition area in the filter dialog. The default template is "
${label1}
${label2}
". + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddConditionTemplate"): string; /** * Custom template for add condition area in the filter dialog. The default template is "
${label1}
${label2}
". * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddConditionTemplate", optionValue: string): void; /** * Custom template for options in dropdown in add condition area in the filter dialog. The default template is "". + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddConditionDropDownTemplate"): string; /** * Custom template for options in dropdown in add condition area in the filter dialog. The default template is "". * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddConditionDropDownTemplate", optionValue: string): void; @@ -82932,6 +97292,7 @@ interface JQuery { * E.g.: DOM element used for selecting column has attribute "data-af-col", for selecting filter condition - "data-af-cond", for filter expression- "data-af-expr". * NOTE: The template is supported only with . * The default template is " ". + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterTemplate"): string; @@ -82942,24 +97303,28 @@ interface JQuery { * NOTE: The template is supported only with . * The default template is " ". * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterTemplate", optionValue: string): void; /** * Custom template for options in condition list in filter dialog. The default template is "". + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterConditionTemplate"): string; /** * Custom template for options in condition list in filter dialog. The default template is "". * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterConditionTemplate", optionValue: string): void; /** * Add button width - in the advanced filter dialog. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddButtonWidth"): string|number; @@ -82967,6 +97332,7 @@ interface JQuery { /** * Add button width - in the advanced filter dialog. * + * * @optionValue New value to be set. */ @@ -82974,6 +97340,7 @@ interface JQuery { /** * Width of the Ok and Cancel buttons in the advanced filtering dialogs. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogOkCancelButtonWidth"): string|number; @@ -82981,6 +97348,7 @@ interface JQuery { /** * Width of the Ok and Cancel buttons in the advanced filtering dialogs. * + * * @optionValue New value to be set. */ @@ -82988,12 +97356,14 @@ interface JQuery { /** * Maximum number of filter rows in the advanced filtering dialog. If this number is exceeded, an error message will be rendered. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogMaxFilterCount"): number; /** * Maximum number of filter rows in the advanced filtering dialog. If this number is exceeded, an error message will be rendered. * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogMaxFilterCount", optionValue: number): void; @@ -83018,63 +97388,265 @@ interface JQuery { /** * Enable/disable empty condition visibility in the filter. If true, shows empty and not empty filtering conditions in the dropdowns. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "showEmptyConditions"): boolean; /** * Enable/disable empty condition visibility in the filter. If true, shows empty and not empty filtering conditions in the dropdowns. * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "showEmptyConditions", optionValue: boolean): void; /** * Enable/disable visibility of null and not null filtering conditions in the dropdowns. If true, shows null and not null filtering conditions in the dropdowns. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "showNullConditions"): boolean; /** * Enable/disable visibility of null and not null filtering conditions in the dropdowns. If true, shows null and not null filtering conditions in the dropdowns. * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "showNullConditions", optionValue: boolean): void; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "dialogWidget"): string; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; /** * Enables/disables filtering persistence between states. + * */ igTreeGridFiltering(optionLiteral: 'option', optionName: "persist"): boolean; /** * Enables/disables filtering persistence between states. * + * * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "persist", optionValue: boolean): void; /** - * Enables/disables feature inheritance for the child [layouts](ui.ighierarchicalgrid#options:columnLayouts). NOTE: It only applies for [igHierarchicalGrid](ui.ighierarchicalgrid). + * Event fired before a filtering operation is executed (remote request or local). + * Return false in order to cancel filtering operation. */ - igTreeGridFiltering(optionLiteral: 'option', optionName: "inherit"): boolean; + igTreeGridFiltering(optionLiteral: 'option', optionName: "dataFiltering"): DataFilteringEvent; /** - * Enables/disables feature inheritance for the child [layouts](ui.ighierarchicalgrid#options:columnLayouts). NOTE: It only applies for [igHierarchicalGrid](ui.ighierarchicalgrid). + * Event fired before a filtering operation is executed (remote request or local). + * Return false in order to cancel filtering operation. * - * @optionValue New value to be set. + * @optionValue Define event handler function. */ - igTreeGridFiltering(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + igTreeGridFiltering(optionLiteral: 'option', optionName: "dataFiltering", optionValue: DataFilteringEvent): void; + + /** + * Event fired after the filtering has been executed and results are rendered. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dataFiltered"): DataFilteredEvent; + + /** + * Event fired after the filtering has been executed and results are rendered. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dataFiltered", optionValue: DataFilteredEvent): void; + + /** + * Event fired before the filter dropdown is opened for a specific column. + * Return false in order to cancel dropdown opening. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dropDownOpening"): DropDownOpeningEvent; + + /** + * Event fired before the filter dropdown is opened for a specific column. + * Return false in order to cancel dropdown opening. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dropDownOpening", optionValue: DropDownOpeningEvent): void; + + /** + * Event fired after the filter dropdown is opened for a specific column. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dropDownOpened"): DropDownOpenedEvent; + + /** + * Event fired after the filter dropdown is opened for a specific column. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dropDownOpened", optionValue: DropDownOpenedEvent): void; + + /** + * Event fired before the filter dropdown starts closing. + * Return false in order to cancel dropdown closing. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dropDownClosing"): DropDownClosingEvent; + + /** + * Event fired before the filter dropdown starts closing. + * Return false in order to cancel dropdown closing. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dropDownClosing", optionValue: DropDownClosingEvent): void; + + /** + * Event fired after a filter column dropdown is completely closed. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dropDownClosed"): DropDownClosedEvent; + + /** + * Event fired after a filter column dropdown is completely closed. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dropDownClosed", optionValue: DropDownClosedEvent): void; + + /** + * Event fired before the advanced filtering dialog is opened. + * Return false in order to cancel filter dialog opening. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogOpening"): FilterDialogOpeningEvent; + + /** + * Event fired before the advanced filtering dialog is opened. + * Return false in order to cancel filter dialog opening. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogOpening", optionValue: FilterDialogOpeningEvent): void; + + /** + * Event fired after the advanced filter dialog is already opened. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogOpened"): FilterDialogOpenedEvent; + + /** + * Event fired after the advanced filter dialog is already opened. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogOpened", optionValue: FilterDialogOpenedEvent): void; + + /** + * Event fired every time the advanced filter dialog changes its position. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogMoving"): FilterDialogMovingEvent; + + /** + * Event fired every time the advanced filter dialog changes its position. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogMoving", optionValue: FilterDialogMovingEvent): void; + + /** + * Event fired before a filter row is added to the advanced filter dialog. + * Return false in order to cancel filter adding to the advanced filtering dialog. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterAdding"): FilterDialogFilterAddingEvent; + + /** + * Event fired before a filter row is added to the advanced filter dialog. + * Return false in order to cancel filter adding to the advanced filtering dialog. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterAdding", optionValue: FilterDialogFilterAddingEvent): void; + + /** + * Event fired after a filter row is added to the advanced filter dialog. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterAdded"): FilterDialogFilterAddedEvent; + + /** + * Event fired after a filter row is added to the advanced filter dialog. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterAdded", optionValue: FilterDialogFilterAddedEvent): void; + + /** + * Event fired before the advanced filter dialog is closed. + * Return false in order to cancel filtering dialog closing. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogClosing"): FilterDialogClosingEvent; + + /** + * Event fired before the advanced filter dialog is closed. + * Return false in order to cancel filtering dialog closing. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogClosing", optionValue: FilterDialogClosingEvent): void; + + /** + * Event fired after the advanced filter dialog has been closed. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogClosed"): FilterDialogClosedEvent; + + /** + * Event fired after the advanced filter dialog has been closed. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogClosed", optionValue: FilterDialogClosedEvent): void; + + /** + * Event fired before the contents of the advanced filter dialog are rendered. + * Return false in order to cancel filtering dialog rendering. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogContentsRendering"): FilterDialogContentsRenderingEvent; + + /** + * Event fired before the contents of the advanced filter dialog are rendered. + * Return false in order to cancel filtering dialog rendering. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogContentsRendering", optionValue: FilterDialogContentsRenderingEvent): void; + + /** + * Event fired after the contents of the advanced filter dialog are rendered. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogContentsRendered"): FilterDialogContentsRenderedEvent; + + /** + * Event fired after the contents of the advanced filter dialog are rendered. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogContentsRendered", optionValue: FilterDialogContentsRenderedEvent): void; + + /** + * Event fired when the OK button in the advanced filter dialog is pressed. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFiltering"): FilterDialogFilteringEvent; + + /** + * Event fired when the OK button in the advanced filter dialog is pressed. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFiltering", optionValue: FilterDialogFilteringEvent): void; igTreeGridFiltering(options: IgTreeGridFiltering): JQuery; igTreeGridFiltering(optionLiteral: 'option', optionName: string): any; igTreeGridFiltering(optionLiteral: 'option', options: IgTreeGridFiltering): JQuery; @@ -83082,13 +97654,20 @@ interface JQuery { igTreeGridFiltering(methodName: string, ...methodParams: any[]): any; } interface IgTreeGridHiding { + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + inherit?: boolean; + /** * A list of column settings that specifies hiding options on a per column basis. + * */ columnSettings?: IgGridHidingColumnSetting[]; /** * The width in pixels of the hidden column indicator in the header. + * */ hiddenColumnIndicatorHeaderWidth?: number; @@ -83102,16 +97681,19 @@ interface IgTreeGridHiding { /** * The default column chooser width. + * */ columnChooserWidth?: string; /** * The default column chooser height. + * */ columnChooserHeight?: string; /** * The duration of the dropdown animation in milliseconds. + * */ dropDownAnimationDuration?: number; @@ -83172,24 +97754,22 @@ interface IgTreeGridHiding { /** * Specifies on click show/hide directly to be shown/hidden columns. If columnChooserHideOnClick is false then Apply and Cancel Buttons are shown on the bottom of modal dialog. Columns are Shown/Hidden after the Apply button is clicked + * */ columnChooserHideOnClick?: boolean; /** * Specifies time of milliseconds for animation duration to show/hide modal dialog + * */ columnChooserAnimationDuration?: number; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * */ dialogWidget?: string; - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. - */ - inherit?: boolean; - /** * Event fired before a hiding operation is executed. */ @@ -83277,7 +97857,14 @@ interface IgTreeGridHiding { } interface IgTreeGridHidingMethods { destroy(): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.iggridhiding#options:language) + * Note that this method is for rare scenarios, see [language](ui.iggridhiding#options:language) or [locale](ui.iggridhiding#options:locale) option setter + */ changeLocale(): void; + changeGlobalLanguage(): void; + changeGlobalRegional(): void; /** * Shows the Column Chooser dialog. If it is visible the method does nothing. @@ -83352,6 +97939,8 @@ interface JQuery { interface JQuery { igTreeGridHiding(methodName: "destroy"): void; igTreeGridHiding(methodName: "changeLocale"): void; + igTreeGridHiding(methodName: "changeGlobalLanguage"): void; + igTreeGridHiding(methodName: "changeGlobalRegional"): void; igTreeGridHiding(methodName: "showColumnChooser"): void; igTreeGridHiding(methodName: "hideColumnChooser"): void; igTreeGridHiding(methodName: "showColumn", column: Object, callback?: Function): void; @@ -83363,26 +97952,42 @@ interface JQuery { igTreeGridHiding(methodName: "renderColumnChooserResetButton"): void; igTreeGridHiding(methodName: "removeColumnChooserResetButton"): void; + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + * + * @optionValue New value to be set. + */ + igTreeGridHiding(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + /** * A list of column settings that specifies hiding options on a per column basis. + * */ igTreeGridHiding(optionLiteral: 'option', optionName: "columnSettings"): IgGridHidingColumnSetting[]; /** * A list of column settings that specifies hiding options on a per column basis. * + * * @optionValue New value to be set. */ igTreeGridHiding(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridHidingColumnSetting[]): void; /** * The width in pixels of the hidden column indicator in the header. + * */ igTreeGridHiding(optionLiteral: 'option', optionName: "hiddenColumnIndicatorHeaderWidth"): number; /** * The width in pixels of the hidden column indicator in the header. * + * * @optionValue New value to be set. */ igTreeGridHiding(optionLiteral: 'option', optionName: "hiddenColumnIndicatorHeaderWidth", optionValue: number): void; @@ -83407,36 +98012,42 @@ interface JQuery { /** * The default column chooser width. + * */ igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserWidth"): string; /** * The default column chooser width. * + * * @optionValue New value to be set. */ igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserWidth", optionValue: string): void; /** * The default column chooser height. + * */ igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserHeight"): string; /** * The default column chooser height. * + * * @optionValue New value to be set. */ igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserHeight", optionValue: string): void; /** * The duration of the dropdown animation in milliseconds. + * */ igTreeGridHiding(optionLiteral: 'option', optionName: "dropDownAnimationDuration"): number; /** * The duration of the dropdown animation in milliseconds. * + * * @optionValue New value to be set. */ igTreeGridHiding(optionLiteral: 'option', optionName: "dropDownAnimationDuration", optionValue: number): void; @@ -83571,51 +98182,45 @@ interface JQuery { /** * Gets on click show/hide directly to be shown/hidden columns. If columnChooserHideOnClick is false then Apply and Cancel Buttons are shown on the bottom of modal dialog. Columns are Shown/Hidden after the Apply button is clicked + * */ igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserHideOnClick"): boolean; /** * Sets on click show/hide directly to be shown/hidden columns. If columnChooserHideOnClick is false then Apply and Cancel Buttons are shown on the bottom of modal dialog. Columns are Shown/Hidden after the Apply button is clicked * + * * @optionValue New value to be set. */ igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserHideOnClick", optionValue: boolean): void; /** * Gets time of milliseconds for animation duration to show/hide modal dialog + * */ igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserAnimationDuration"): number; /** * Sets time of milliseconds for animation duration to show/hide modal dialog * + * * @optionValue New value to be set. */ igTreeGridHiding(optionLiteral: 'option', optionName: "columnChooserAnimationDuration", optionValue: number): void; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * */ igTreeGridHiding(optionLiteral: 'option', optionName: "dialogWidget"): string; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. * - * @optionValue New value to be set. - */ - igTreeGridHiding(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; - - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. - */ - igTreeGridHiding(optionLiteral: 'option', optionName: "inherit"): boolean; - - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. * * @optionValue New value to be set. */ - igTreeGridHiding(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + igTreeGridHiding(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; /** * Event fired before a hiding operation is executed. @@ -83818,27 +98423,32 @@ interface IgTreeGridDataSourceSettings { /** * *** IMPORTANT DEPRECATED *** Use the expandedKey option instead. * The name of the property that keeps track of the expansion state of a data item. Defaults to __ig_options.expanded. + * */ propertyExpanded?: any; /** * *** IMPORTANT DEPRECATED *** Use the dataLevelKey option instead. * The name of the property that keeps track of the level in the hierarchy.Defaults to __ig_options.dataLevel. + * */ propertyDataLevel?: any; /** * The name of the property that keeps track of the expansion state of a data item. Defaults to __ig_options.expanded. + * */ expandedKey?: string; /** * The name of the property that keeps track of the level in the hierarchy.Defaults to __ig_options.dataLevel. + * */ dataLevelKey?: string; /** * If set to TRUE it is expected that the source of data is normalized and transformed(has set dataLevel and expansion state). The source of data is used as flatDataView. Usually used when the paging is remote and paging mode is allLevels, or features are remote(and the processing of the returned result should be made on the server) + * */ initialFlatDataView?: boolean; @@ -83851,11 +98461,13 @@ interface IgTreeGridDataSourceSettings { interface IgTreeGridLocale { /** * Specifies the expansion indicator tooltip text. + * */ expandTooltipText?: string; /** * Specifies the collapse indicator tooltip text. + * */ collapseTooltipText?: string; @@ -83865,19 +98477,29 @@ interface IgTreeGridLocale { [optionName: string]: any; } +interface IgTreeGridRestSettings { + /** + * Option for IgTreeGridRestSettings + */ + [optionName: string]: any; +} + interface IgTreeGrid { /** * Specifies the indentation (in pixels or percent) for a tree grid row. Nested indentation is achieved by calculating the level times the indentation value. Ex: '10px' or '5%'. Default is 30. + * */ indentation?: string; /** * If initial indentation level is set then it is used to be calculated width of the data skip column(usually used when remote load on demand is enabled) + * */ initialIndentationLevel?: number; /** * Specifies if rows(that have child rows) will have an expander image that will allow end users to expand and collapse them. This option can be set only at initialization. + * */ showExpansionIndicator?: boolean; @@ -83897,58 +98519,90 @@ interface IgTreeGrid { /** * Unique identifier used in a self-referencing flat data source. Used with primaryKey to create a relationship among flat data sources. + * */ foreignKey?: string; /** * Specifies the depth down to which the tree grid would be expanded upon initial render. To expand all rows set value to -1. Default is -1. + * */ initialExpandDepth?: number; /** * Specifies the foreign key value in the data source to treat as the root level once the grid is data bound. Defaults to -1 (which includes the entire data source) + * */ foreignKeyRootValue?: number|string; /** * Specify whether to render non-data column which contains expander indicators + * */ renderExpansionIndicatorColumn?: boolean; /** * a reference or name of a javascript function which changes first data cell - renders indentation according to databound level + * */ renderFirstDataCellFunction?: string|Object; /** * Property name of the array of child data in a hierarchical data source. + * */ childDataKey?: string; /** * a reference or name of a javascript function which renders expand indicators(called ONLY IF option renderExpansionIndicatorColumn is true) + * */ renderExpansionCellFunction?: string|Object; /** * Specifies to the tree grid if data is loaded on demand from a remote server. Default is false. + * */ enableRemoteLoadOnDemand?: boolean; /** * Options object to configure data source-specific settings + * */ dataSourceSettings?: IgTreeGridDataSourceSettings; locale?: IgTreeGridLocale; + /** + * Determines row virtualization mode. For igTreeGrid only continuous virtualization can be used. + * + * continuous renders a pre-defined number of rows in the grid. On scrolling the continuous virtualization loads another portion of rows and disposes the current one. + */ + virtualizationMode?: string; + /** * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. */ - restSettings?: any; + avgColumnWidth?: any; + + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + avgRowHeight?: any; + + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + columnVirtualization?: any; + + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + restSettings?: IgTreeGridRestSettings; /** * Defines the grid width in pixels or percents. [Here you can find more info about setting igGrid width](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). * + * * Valid values: * "string" The widget width can be set in pixels (px) or percentage (%). Example values: "800px", "800" (defaults to pixels), "100%". * "number" The widget width can be set in pixels as a number. Example values: 800, 700. @@ -83959,6 +98613,7 @@ interface IgTreeGrid { /** * This is the total height of the grid, including all UI elements - scroll container with data rows, header, footer, filter row - (if any), etc. [Here you can find more info about setting igGrid height](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). * + * * Valid values: * "string" The widget height can be set in pixels (px) and percentage (%). * "number" The widget height can be set as a number @@ -83968,32 +98623,16 @@ interface IgTreeGrid { /** * If autoAdjustHeight is set to false, the [height](ui.iggrid#options:height) will be set only on the scrolling container, and all other UI elements such as paging footer / filter row / headers will add on top of that, so the total height of the grid will be more than this value - the height of the scroll container (content area) will not be dynamically calculated. Setting this option to false will usually result in a lot better initial rendering performance for large data sets ( > 1000 rows rendered at once, no [virtualization](ui.iggrid#options:virtualization) enabled), since no reflows will be made by browsers when accessing DOM properties such as offsetHeight. + * */ autoAdjustHeight?: boolean; /** - * Used for [row virtualization](ui.iggrid#options:rowVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels (default) that will be used to calculate how many rows to render as the end user scrolls. Also all rows' height will be automatically set to this value. + * Default column width that will be set for all columns, that don't have [column width](ui.iggrid#options:columns.width) defined. Can also be set as '*', in which case the width auto-size based on the content of the column cells (including the header text). + * * * Valid values: - * "string" The avarage row height can be set in pixels ("25px"). - * "number" The avarage row height can be set in pixels as a number (25). - */ - avgRowHeight?: string|number; - - /** - * Used for [column virtualization](ui.iggrid#options:columnVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels for a column width. - * - * Valid values: - * "string" The avarage column width can be set in pixels ("25px"). - * "number" The avarage column width can be set in pixels as a number (25). - */ - avgColumnWidth?: string|number; - - /** - * Default column width that will be set for all columns, that don't have [column width](ui.iggrid#options:columns.width) defined. - * - * Valid values: - * "string" The default column width can be set in pixels ("100px"). + * "string" The default column width can be set in pixels ("100px") or as '*' in order to auto-size based on the cells and header content. * "number" The default column width can be set in pixels as a number (100). */ defaultColumnWidth?: string|number; @@ -84002,46 +98641,38 @@ interface IgTreeGrid { * If no [columns](ui.iggrid#options:columns) collection is defined, and autoGenerateColumns is set to true, [columns](ui.iggrid#options:columns) will be inferred from the data source before the [dataRendering](ui.iggrid#events:dataRendering) event is fired. The inferred [columns](ui.iggrid#options:columns) collection will be available to the developer for modification at [dataRendering](ui.iggrid#events:dataRendering). If autoGenerateColumns is not explicitly set and [columns](ui.iggrid#options:columns) has at least one column defined then autoGenerateColumns is automatically set to false. * If autoGenerateColumns is true and there are columns defined auto-generated columns will render after the explicitly defined ones. * Since auto-generated columns don't have width defined consider setting [defaultColumnWidth](ui.iggrid#options:defaultColumnWidth) as well. + * */ autoGenerateColumns?: boolean; /** * Enables/disables column and row virtualization at the same time. Virtualization can greatly enhance rendering performance. If enabled, the number of actual rendered rows (DOM elements) will be constant and related to the visible viewport of the grid. As the end user scrolls, those DOM elements will be dynamically reused to render the new data. [Here you can find more info about the performance guidelines when using the igGrid](http://www.igniteui.com/help/iggrid-performance-guide) + * */ virtualization?: boolean; - /** - * Determines row virtualization mode. - * - * Valid values: - * "fixed" Renders only the visible rows and/or columns in the grid. On scrolling the same rows and/or columns are updated with new data from the data source. Only fixed virtualization can work with column virtualization at the same time. Fixed virtualization is not supported by some grid features: Resizing, Group By, Responsive. - * "continuous" renders a pre-defined number of rows in the grid. On scrolling the continuous virtualization loads another portion of rows and disposes the current one. - */ - virtualizationMode?: string; - /** * Enables virtualization for rows only. [Here you can find more info about igGrid row virtualization](http://www.igniteui.com/help/iggrid-virtualization-overview) + * */ rowVirtualization?: boolean; - /** - * Enables virtualization for columns only. Column virtualization can work only in combination with fixed row virtalization. Setting columnVirtualization to true will automatically set [virtualization](ui.iggrid#options:virtualization) to true and [virtualizationMode](ui.iggrid#options:virtualizationMode) to "fixed". - */ - columnVirtualization?: boolean; - /** * Number of pixels to scroll the grid by, when virtualization is enabled, and mouse wheel scrolling is performed over the virtual grid area. If "null" the step will be equal to the [avgRowHeight](ui.iggrid#options:avgRowHeight). + * */ virtualizationMouseWheelStep?: number; /** * If this option is set to true, the height of the grid row will be calculated automatically based on the [avgRowHeight](ui.iggrid#options:avgRowHeight) and the visible virtual records. If no [avgRowHeight](ui.iggrid#options:avgRowHeight) is specified, it will be calculated automatically at runtime. + * */ adjustVirtualHeights?: boolean; /** * The templating engine that will be used to render the grid [column templates](ui.iggrid#options:columns.template). [Here you can find](http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/05/30/using-different-template-engines-with-ignite-ui-controls.aspx) how to use templating engines other than igTemplating and jsRender. * + * * Valid values: * "infragistics" The grid will use the Infragistics Templating engine to render its [column templates](ui.iggrid#options:columns.template) and specific parts of the UI. * "jsRender" The grid will use jsRender to render its [column templates](ui.iggrid#options:columns.template) and specific parts of the UI. @@ -84050,12 +98681,14 @@ interface IgTreeGrid { /** * An array of column objects. Checkout the [Columns and Layout](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-columns) topic for details on configuring the columns array. + * */ columns?: IgGridColumn[]; /** * Can be any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an $.ig.DataSource itself * + * * Valid values: * "array" dataSource as an array * "object" ddataSource as an object @@ -84065,86 +98698,102 @@ interface IgTreeGrid { /** * Specifies a remote URL as a data source, from which data will be retrieved using the [$.ig.DataSource](ig.datasource). + * */ dataSourceUrl?: string; /** * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type). + * */ dataSourceType?: string; /** * See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). This is the property in the responses where data records are held, if the response is wrapped. + * */ responseDataKey?: string; /** - * See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. + * This option has been deprecated. See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. */ responseTotalRecCountKey?: string; /** * Specifies the HTTP verb to be used to issue the requests to a remote data source. + * */ requestType?: string; /** * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType + * */ responseContentType?: string; /** * Controls the visibility of the grid header. + * */ showHeader?: boolean; /** * Controls the visibility of the grid footer. + * */ showFooter?: boolean; /** * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedHeaders will always act as if it's true, no matter which value is set. + * */ fixedHeaders?: boolean; /** * Footers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedFooters will always act as if it's true, no matter which value is set. + * */ fixedFooters?: boolean; /** * Caption text that will be shown above the grid header. + * */ caption?: string; /** * List of grid feature definitions: sorting, paging, etc. Each feature goes with its separate options that are documented for the feature accordingly. [Here you can find detailed documentation for all igGrid features](http://www.igniteui.com/help/iggrid-features-landing-page) + * */ features?: IgGridFeature[]; /** * Initial tabIndex attribute that will be set on all focusable elements. + * */ tabIndex?: number; /** * If this option is set to false, the data to which the grid is bound will be used "as is" with no additional transformations based on [columns](ui.iggrid#options:columns) defined. Otherwise only the subset of data properties used in the [columns](ui.iggrid#options:columns) defined will be extracted in a new object and used. + * */ localSchemaTransform?: boolean; /** * Key of the column containing unique identifiers for the data records. + * */ primaryKey?: string; /** * If true, the transaction log will always be sent in the request for remote data, by the data source. Also this means that if there are values in the log, a POST will be performed instead of GET. + * */ serializeTransactionLog?: boolean; /** * Automatically commits the transactions as rows/cells are being edited to the client data source. A [saveChanges](ui.iggrid#methods:saveChanges) call still needs to be performed in order to commit the transactions to a server-side data source. + * */ autoCommit?: boolean; @@ -84154,12 +98803,14 @@ interface IgTreeGrid { * If a new row is added, edited, then deleted, there will be no transaction added to the log. * If several edits are made to a row or an individual cell, this should result in a single transaction. * Note: This option takes effect only when [autoCommit](ui.iggrid#options:autoCommit) is set to false. + * */ aggregateTransactions?: boolean; /** * Sets gets ability to automatically format text in cells for numeric and date columns. The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) * + * * Valid values: * "date" formats only Date columns * "number" formats only number columns @@ -84171,53 +98822,63 @@ interface IgTreeGrid { /** * Gets sets ability to render checkboxes and use checkbox editor when dataType of a column is "bool". Checkboxes are not rendered for boolean values in columns with a [column template](ui.iggrid#options:columns.template). + * */ renderCheckboxes?: boolean; /** * URL to which updating requests will be made. + * */ updateUrl?: string; /** * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). + * */ alternateRowStyles?: boolean; /** * If set to true and all columns' widths are specified and their combined width is less than the grid width then the last column width will be automatically adjusted to fill the remaining empty space of the grid. + * */ autofitLastColumn?: boolean; /** * Enables/disables rendering of hover styles when the mouse is over a record. This can be useful in templating scenarios, for example, where we don't want to apply hover styling to templated content. + * */ enableHoverStyles?: boolean; /** * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * */ enableUTCDates?: boolean; /** * Merge unbound columns values inside data source when data source is remote. If true then the unbound columns are merged to the data source at runtime on the server. Note that data source is expanded with the new data and this could cause performance issues when the data is huge. If mergeUnboundColumns is false then the unbound data is sent and merged on the client. This option is used by the [igGrid MVC Helper](http://www.igniteui.com/help/iggrid-developing-asp-net-mvc-applications-with-iggrid). * Checkout [Populating Unbound Columns Remotely (igGrid)](http://www.igniteui.com/help/iggrid-unboundcolumns-populating-with-data-remotely) topic for more information. + * */ mergeUnboundColumns?: boolean; /** * When dataSource is a remote URL, defines whether to set the type of the remote data source to JSONP. + * */ jsonpRequest?: boolean; /** * Enables/disables grid adjusting its dimensions when its [width](ui.iggrid#options:width) and/or [height](ui.iggrid#options:height) is set in percent (%) and grid parent DOM container is resized. + * */ enableResizeContainerCheck?: boolean; /** * Configures how the feature chooser icon should display on header cells - e.g. to display as gear icon or not. * + * * Valid values: * "none" Always hide the feature chooser icon; The feature chooser is shown on tapping/clicking the column header. * "desktopOnly" Always show the icon on desktop but hide when touch device detected. @@ -84227,6 +98888,7 @@ interface IgTreeGrid { /** * Settings related to content scrolling. + * */ scrollSettings?: IgGridScrollSettings; @@ -84438,6 +99100,11 @@ interface IgTreeGridMethods { * Returns the element holding the data records */ widget(): void; + + /** + * Changes the the regional settings of widget element to the language specified in [options.regional](ui.iggrid#options:regional) + * Note that this method is for rare scenarios, use [regional](ui.iggrid#options:regional) option setter + */ changeRegional(): void; /** @@ -84965,36 +99632,42 @@ interface JQuery { /** * Gets the indentation (in pixels or percent) for a tree grid row. Nested indentation is achieved by calculating the level times the indentation value. Ex: '10px' or '5%'. Default is 30. + * */ igTreeGrid(optionLiteral: 'option', optionName: "indentation"): string; /** * Sets the indentation (in pixels or percent) for a tree grid row. Nested indentation is achieved by calculating the level times the indentation value. Ex: '10px' or '5%'. Default is 30. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "indentation", optionValue: string): void; /** * If initial indentation level is set then it is used to be calculated width of the data skip column(usually used when remote load on demand is enabled) + * */ igTreeGrid(optionLiteral: 'option', optionName: "initialIndentationLevel"): number; /** * If initial indentation level is set then it is used to be calculated width of the data skip column(usually used when remote load on demand is enabled) * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "initialIndentationLevel", optionValue: number): void; /** * Gets if rows(that have child rows) will have an expander image that will allow end users to expand and collapse them. This option can be set only at initialization. + * */ igTreeGrid(optionLiteral: 'option', optionName: "showExpansionIndicator"): boolean; /** * Sets if rows(that have child rows) will have an expander image that will allow end users to expand and collapse them. This option can be set only at initialization. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "showExpansionIndicator", optionValue: boolean): void; @@ -85033,30 +99706,35 @@ interface JQuery { /** * Unique identifier used in a self-referencing flat data source. Used with primaryKey to create a relationship among flat data sources. + * */ igTreeGrid(optionLiteral: 'option', optionName: "foreignKey"): string; /** * Unique identifier used in a self-referencing flat data source. Used with primaryKey to create a relationship among flat data sources. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "foreignKey", optionValue: string): void; /** * Gets the depth down to which the tree grid would be expanded upon initial render. To expand all rows set value to -1. Default is -1. + * */ igTreeGrid(optionLiteral: 'option', optionName: "initialExpandDepth"): number; /** * Sets the depth down to which the tree grid would be expanded upon initial render. To expand all rows set value to -1. Default is -1. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "initialExpandDepth", optionValue: number): void; /** * Gets the foreign key value in the data source to treat as the root level once the grid is data bound. Defaults to -1 (which includes the entire data source) + * */ igTreeGrid(optionLiteral: 'option', optionName: "foreignKeyRootValue"): number|string; @@ -85064,6 +99742,7 @@ interface JQuery { /** * Sets the foreign key value in the data source to treat as the root level once the grid is data bound. Defaults to -1 (which includes the entire data source) * + * * @optionValue New value to be set. */ @@ -85071,18 +99750,21 @@ interface JQuery { /** * Specify whether to render non-data column which contains expander indicators + * */ igTreeGrid(optionLiteral: 'option', optionName: "renderExpansionIndicatorColumn"): boolean; /** * Specify whether to render non-data column which contains expander indicators * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "renderExpansionIndicatorColumn", optionValue: boolean): void; /** * A reference or name of a javascript function which changes first data cell - renders indentation according to databound level + * */ igTreeGrid(optionLiteral: 'option', optionName: "renderFirstDataCellFunction"): string|Object; @@ -85090,6 +99772,7 @@ interface JQuery { /** * A reference or name of a javascript function which changes first data cell - renders indentation according to databound level * + * * @optionValue New value to be set. */ @@ -85097,18 +99780,21 @@ interface JQuery { /** * Property name of the array of child data in a hierarchical data source. + * */ igTreeGrid(optionLiteral: 'option', optionName: "childDataKey"): string; /** * Property name of the array of child data in a hierarchical data source. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "childDataKey", optionValue: string): void; /** * A reference or name of a javascript function which renders expand indicators(called ONLY IF option renderExpansionIndicatorColumn is true) + * */ igTreeGrid(optionLiteral: 'option', optionName: "renderExpansionCellFunction"): string|Object; @@ -85116,6 +99802,7 @@ interface JQuery { /** * A reference or name of a javascript function which renders expand indicators(called ONLY IF option renderExpansionIndicatorColumn is true) * + * * @optionValue New value to be set. */ @@ -85123,44 +99810,101 @@ interface JQuery { /** * Gets to the tree grid if data is loaded on demand from a remote server. Default is false. + * */ igTreeGrid(optionLiteral: 'option', optionName: "enableRemoteLoadOnDemand"): boolean; /** * Sets to the tree grid if data is loaded on demand from a remote server. Default is false. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "enableRemoteLoadOnDemand", optionValue: boolean): void; /** * Options object to configure data source-specific settings + * */ igTreeGrid(optionLiteral: 'option', optionName: "dataSourceSettings"): IgTreeGridDataSourceSettings; /** * Options object to configure data source-specific settings * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "dataSourceSettings", optionValue: IgTreeGridDataSourceSettings): void; igTreeGrid(optionLiteral: 'option', optionName: "locale"): IgTreeGridLocale; igTreeGrid(optionLiteral: 'option', optionName: "locale", optionValue: IgTreeGridLocale): void; + /** + * Determines row virtualization mode. For igTreeGrid only continuous virtualization can be used. + * + * continuous renders a pre-defined number of rows in the grid. On scrolling the continuous virtualization loads another portion of rows and disposes the current one. + */ + igTreeGrid(optionLiteral: 'option', optionName: "virtualizationMode"): string; + + /** + * Determines row virtualization mode. For igTreeGrid only continuous virtualization can be used. + * + * continuous renders a pre-defined number of rows in the grid. On scrolling the continuous virtualization loads another portion of rows and disposes the current one. + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "virtualizationMode", optionValue: string): void; + /** * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. */ - igTreeGrid(optionLiteral: 'option', optionName: "restSettings"): any; + igTreeGrid(optionLiteral: 'option', optionName: "avgColumnWidth"): any; /** * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. * * @optionValue New value to be set. */ - igTreeGrid(optionLiteral: 'option', optionName: "restSettings", optionValue: any): void; + igTreeGrid(optionLiteral: 'option', optionName: "avgColumnWidth", optionValue: any): void; + + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + igTreeGrid(optionLiteral: 'option', optionName: "avgRowHeight"): any; + + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "avgRowHeight", optionValue: any): void; + + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + igTreeGrid(optionLiteral: 'option', optionName: "columnVirtualization"): any; + + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "columnVirtualization", optionValue: any): void; + + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + igTreeGrid(optionLiteral: 'option', optionName: "restSettings"): IgTreeGridRestSettings; + + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "restSettings", optionValue: IgTreeGridRestSettings): void; /** * Defines the grid width in pixels or percents. [Here you can find more info about setting igGrid width](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * */ igTreeGrid(optionLiteral: 'option', optionName: "width"): string|number; @@ -85168,6 +99912,7 @@ interface JQuery { /** * Defines the grid width in pixels or percents. [Here you can find more info about setting igGrid width](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). * + * * @optionValue New value to be set. */ @@ -85175,6 +99920,7 @@ interface JQuery { /** * This is the total height of the grid, including all UI elements - scroll container with data rows, header, footer, filter row - (if any), etc. [Here you can find more info about setting igGrid height](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * */ igTreeGrid(optionLiteral: 'option', optionName: "height"): string|number; @@ -85182,6 +99928,7 @@ interface JQuery { /** * This is the total height of the grid, including all UI elements - scroll container with data rows, header, footer, filter row - (if any), etc. [Here you can find more info about setting igGrid height](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). * + * * @optionValue New value to be set. */ @@ -85189,52 +99936,28 @@ interface JQuery { /** * If autoAdjustHeight is set to false, the [height](ui.iggrid#options:height) will be set only on the scrolling container, and all other UI elements such as paging footer / filter row / headers will add on top of that, so the total height of the grid will be more than this value - the height of the scroll container (content area) will not be dynamically calculated. Setting this option to false will usually result in a lot better initial rendering performance for large data ( > 1000 rows rendered at once, no [virtualization](ui.iggrid#options:virtualization) enabled), since no reflows will be made by browsers when accessing DOM properties such as offsetHeight. + * */ igTreeGrid(optionLiteral: 'option', optionName: "autoAdjustHeight"): boolean; /** * If autoAdjustHeight is set to false, the [height](ui.iggrid#options:height) will be set only on the scrolling container, and all other UI elements such as paging footer / filter row / headers will add on top of that, so the total height of the grid will be more than this value - the height of the scroll container (content area) will not be dynamically calculated. Setting this option to false will usually result in a lot better initial rendering performance for large data sets ( > 1000 rows rendered at once, no [virtualization](ui.iggrid#options:virtualization) enabled), since no reflows will be made by browsers when accessing DOM properties such as offsetHeight. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "autoAdjustHeight", optionValue: boolean): void; /** - * Used for [row virtualization](ui.iggrid#options:rowVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels (default) that will be used to calculate how many rows to render as the end user scrolls. Also all rows' height will be automatically set to this value. - */ - - igTreeGrid(optionLiteral: 'option', optionName: "avgRowHeight"): string|number; - - /** - * Used for [row virtualization](ui.iggrid#options:rowVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels (default) that will be used to calculate how many rows to render as the end user scrolls. Also all rows' height will be automatically set to this value. + * Default column width that will be set for all columns, that don't have [column width](ui.iggrid#options:columns.width) defined. Can also be set as '*', in which case the width auto-size based on the content of the column cells (including the header text). * - * @optionValue New value to be set. - */ - - igTreeGrid(optionLiteral: 'option', optionName: "avgRowHeight", optionValue: string|number): void; - - /** - * Used for [column virtualization](ui.iggrid#options:columnVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels for a column width. - */ - - igTreeGrid(optionLiteral: 'option', optionName: "avgColumnWidth"): string|number; - - /** - * Used for [column virtualization](ui.iggrid#options:columnVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels for a column width. - * - * @optionValue New value to be set. - */ - - igTreeGrid(optionLiteral: 'option', optionName: "avgColumnWidth", optionValue: string|number): void; - - /** - * Default column width that will be set for all columns, that don't have [column width](ui.iggrid#options:columns.width) defined. */ igTreeGrid(optionLiteral: 'option', optionName: "defaultColumnWidth"): string|number; /** - * Default column width that will be set for all columns, that don't have [column width](ui.iggrid#options:columns.width) defined. + * Default column width that will be set for all columns, that don't have [column width](ui.iggrid#options:columns.width) defined. Can also be set as '*', in which case the width auto-size based on the content of the column cells (including the header text). + * * * @optionValue New value to be set. */ @@ -85245,6 +99968,7 @@ interface JQuery { * If no [columns](ui.iggrid#options:columns) collection is defined, and autoGenerateColumns is set to true, [columns](ui.iggrid#options:columns) will be inferred from the data source before the [dataRendering](ui.iggrid#events:dataRendering) event is fired. The inferred [columns](ui.iggrid#options:columns) collection will be available to the developer for modification at [dataRendering](ui.iggrid#events:dataRendering). If autoGenerateColumns is not explicitly set and [columns](ui.iggrid#options:columns) has at least one column defined then autoGenerateColumns is automatically set to false. * If autoGenerateColumns is true and there are columns defined auto-generated columns will render after the explicitly defined ones. * Since auto-generated columns don't have width defined consider setting [defaultColumnWidth](ui.iggrid#options:defaultColumnWidth) as well. + * */ igTreeGrid(optionLiteral: 'option', optionName: "autoGenerateColumns"): boolean; @@ -85253,86 +99977,70 @@ interface JQuery { * If autoGenerateColumns is true and there are columns defined auto-generated columns will render after the explicitly defined ones. * Since auto-generated columns don't have width defined consider setting [defaultColumnWidth](ui.iggrid#options:defaultColumnWidth) as well. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "autoGenerateColumns", optionValue: boolean): void; /** * Enables/disables column and row virtualization at the same time. Virtualization can greatly enhance rendering performance. If enabled, the number of actual rendered rows (DOM elements) will be constant and related to the visible viewport of the grid. As the end user scrolls, those DOM elements will be dynamically reused to render the new data. [Here you can find more info about the performance guidelines when using the igGrid](http://www.igniteui.com/help/iggrid-performance-guide) + * */ igTreeGrid(optionLiteral: 'option', optionName: "virtualization"): boolean; /** * Enables/disables column and row virtualization at the same time. Virtualization can greatly enhance rendering performance. If enabled, the number of actual rendered rows (DOM elements) will be constant and related to the visible viewport of the grid. As the end user scrolls, those DOM elements will be dynamically reused to render the new data. [Here you can find more info about the performance guidelines when using the igGrid](http://www.igniteui.com/help/iggrid-performance-guide) * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "virtualization", optionValue: boolean): void; - /** - * Determines row virtualization mode. - */ - - igTreeGrid(optionLiteral: 'option', optionName: "virtualizationMode"): string; - - /** - * Determines row virtualization mode. - * - * @optionValue New value to be set. - */ - - igTreeGrid(optionLiteral: 'option', optionName: "virtualizationMode", optionValue: string): void; - /** * Enables virtualization for rows only. [Here you can find more info about igGrid row virtualization](http://www.igniteui.com/help/iggrid-virtualization-overview) + * */ igTreeGrid(optionLiteral: 'option', optionName: "rowVirtualization"): boolean; /** * Enables virtualization for rows only. [Here you can find more info about igGrid row virtualization](http://www.igniteui.com/help/iggrid-virtualization-overview) * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "rowVirtualization", optionValue: boolean): void; - /** - * Enables virtualization for columns only. Column virtualization can work only in combination with fixed row virtalization. Setting columnVirtualization to true will automatically set [virtualization](ui.iggrid#options:virtualization) to true and [virtualizationMode](ui.iggrid#options:virtualizationMode) to "fixed". - */ - igTreeGrid(optionLiteral: 'option', optionName: "columnVirtualization"): boolean; - - /** - * Enables virtualization for columns only. Column virtualization can work only in combination with fixed row virtalization. Setting columnVirtualization to true will automatically set [virtualization](ui.iggrid#options:virtualization) to true and [virtualizationMode](ui.iggrid#options:virtualizationMode) to "fixed". - * - * @optionValue New value to be set. - */ - igTreeGrid(optionLiteral: 'option', optionName: "columnVirtualization", optionValue: boolean): void; - /** * Number of pixels to scroll the grid by, when virtualization is enabled, and mouse wheel scrolling is performed over the virtual grid area. If "null" the step will be equal to the [avgRowHeight](ui.iggrid#options:avgRowHeight). + * */ igTreeGrid(optionLiteral: 'option', optionName: "virtualizationMouseWheelStep"): number; /** * Number of pixels to scroll the grid by, when virtualization is enabled, and mouse wheel scrolling is performed over the virtual grid area. If "null" the step will be equal to the [avgRowHeight](ui.iggrid#options:avgRowHeight). * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "virtualizationMouseWheelStep", optionValue: number): void; /** * If this option is set to true, the height of the grid row will be calculated automatically based on the [avgRowHeight](ui.iggrid#options:avgRowHeight) and the visible virtual records. If no [avgRowHeight](ui.iggrid#options:avgRowHeight) is specified, it will be calculated automatically at runtime. + * */ igTreeGrid(optionLiteral: 'option', optionName: "adjustVirtualHeights"): boolean; /** * If this option is set to true, the height of the grid row will be calculated automatically based on the [avgRowHeight](ui.iggrid#options:avgRowHeight) and the visible virtual records. If no [avgRowHeight](ui.iggrid#options:avgRowHeight) is specified, it will be calculated automatically at runtime. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "adjustVirtualHeights", optionValue: boolean): void; /** * The templating engine that will be used to render the grid [column templates](ui.iggrid#options:columns.template). [Here you can find](http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/05/30/using-different-template-engines-with-ignite-ui-controls.aspx) how to use templating engines other than igTemplating and jsRender. + * */ igTreeGrid(optionLiteral: 'option', optionName: "templatingEngine"): string; @@ -85340,6 +100048,7 @@ interface JQuery { /** * The templating engine that will be used to render the grid [column templates](ui.iggrid#options:columns.template). [Here you can find](http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/05/30/using-different-template-engines-with-ignite-ui-controls.aspx) how to use templating engines other than igTemplating and jsRender. * + * * @optionValue New value to be set. */ @@ -85347,18 +100056,21 @@ interface JQuery { /** * An array of column objects. Checkout the [Columns and Layout](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-columns) topic for details on configuring the columns array. + * */ igTreeGrid(optionLiteral: 'option', optionName: "columns"): IgGridColumn[]; /** * An array of column objects. Checkout the [Columns and Layout](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-columns) topic for details on configuring the columns array. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "columns", optionValue: IgGridColumn[]): void; /** * Can be any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an $.ig.DataSource itself + * */ igTreeGrid(optionLiteral: 'option', optionName: "dataSource"): Array|Object|string; @@ -85366,6 +100078,7 @@ interface JQuery { /** * Can be any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an $.ig.DataSource itself * + * * @optionValue New value to be set. */ @@ -85373,47 +100086,53 @@ interface JQuery { /** * Gets a remote URL as a data source, from which data will be retrieved using the [$.ig.DataSource](ig.datasource). + * */ igTreeGrid(optionLiteral: 'option', optionName: "dataSourceUrl"): string; /** * Sets a remote URL as a data source, from which data will be retrieved using the [$.ig.DataSource](ig.datasource). * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "dataSourceUrl", optionValue: string): void; /** * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type). + * */ igTreeGrid(optionLiteral: 'option', optionName: "dataSourceType"): string; /** * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type). * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; /** * See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). This is the property in the responses where data records are held, if the response is wrapped. + * */ igTreeGrid(optionLiteral: 'option', optionName: "responseDataKey"): string; /** * See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). This is the property in the responses where data records are held, if the response is wrapped. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; /** - * See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. + * This option has been deprecated. See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. */ igTreeGrid(optionLiteral: 'option', optionName: "responseTotalRecCountKey"): string; /** - * See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. + * This option has been deprecated. See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. * * @optionValue New value to be set. */ @@ -85421,156 +100140,182 @@ interface JQuery { /** * Gets the HTTP verb to be used to issue the requests to a remote data source. + * */ igTreeGrid(optionLiteral: 'option', optionName: "requestType"): string; /** * Sets the HTTP verb to be used to issue the requests to a remote data source. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "requestType", optionValue: string): void; /** * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType + * */ igTreeGrid(optionLiteral: 'option', optionName: "responseContentType"): string; /** * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "responseContentType", optionValue: string): void; /** * Controls the visibility of the grid header. + * */ igTreeGrid(optionLiteral: 'option', optionName: "showHeader"): boolean; /** * Controls the visibility of the grid header. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "showHeader", optionValue: boolean): void; /** * Controls the visibility of the grid footer. + * */ igTreeGrid(optionLiteral: 'option', optionName: "showFooter"): boolean; /** * Controls the visibility of the grid footer. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "showFooter", optionValue: boolean): void; /** * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedHeaders will always act as if it's true, no matter which value is set. + * */ igTreeGrid(optionLiteral: 'option', optionName: "fixedHeaders"): boolean; /** * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedHeaders will always act as if it's true, no matter which value is set. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "fixedHeaders", optionValue: boolean): void; /** * Footers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedFooters will always act as if it's true, no matter which value is set. + * */ igTreeGrid(optionLiteral: 'option', optionName: "fixedFooters"): boolean; /** * Footers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedFooters will always act as if it's true, no matter which value is set. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "fixedFooters", optionValue: boolean): void; /** * Caption text that will be shown above the grid header. + * */ igTreeGrid(optionLiteral: 'option', optionName: "caption"): string; /** * Caption text that will be shown above the grid header. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "caption", optionValue: string): void; /** * List of grid feature definitions: sorting, paging, etc. Each feature goes with its separate options that are documented for the feature accordingly. [Here you can find detailed documentation for all igGrid features](http://www.igniteui.com/help/iggrid-features-landing-page) + * */ igTreeGrid(optionLiteral: 'option', optionName: "features"): IgGridFeature[]; /** * List of grid feature definitions: sorting, paging, etc. Each feature goes with its separate options that are documented for the feature accordingly. [Here you can find detailed documentation for all igGrid features](http://www.igniteui.com/help/iggrid-features-landing-page) * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "features", optionValue: IgGridFeature[]): void; /** * Initial tabIndex attribute that will be set on all focusable elements. + * */ igTreeGrid(optionLiteral: 'option', optionName: "tabIndex"): number; /** * Initial tabIndex attribute that will be set on all focusable elements. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; /** * If this option is set to false, the data to which the grid is bound will be used "as is" with no additional transformations based on [columns](ui.iggrid#options:columns) defined. Otherwise only the subset of data properties used in the [columns](ui.iggrid#options:columns) defined will be extracted in a new object and used. + * */ igTreeGrid(optionLiteral: 'option', optionName: "localSchemaTransform"): boolean; /** * If this option is set to false, the data to which the grid is bound will be used "as is" with no additional transformations based on [columns](ui.iggrid#options:columns) defined. Otherwise only the subset of data properties used in the [columns](ui.iggrid#options:columns) defined will be extracted in a new object and used. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "localSchemaTransform", optionValue: boolean): void; /** * Key of the column containing unique identifiers for the data records. + * */ igTreeGrid(optionLiteral: 'option', optionName: "primaryKey"): string; /** * Key of the column containing unique identifiers for the data records. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "primaryKey", optionValue: string): void; /** * If true, the transaction log will always be sent in the request for remote data, by the data source. Also this means that if there are values in the log, a POST will be performed instead of GET. + * */ igTreeGrid(optionLiteral: 'option', optionName: "serializeTransactionLog"): boolean; /** * If true, the transaction log will always be sent in the request for remote data, by the data source. Also this means that if there are values in the log, a POST will be performed instead of GET. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "serializeTransactionLog", optionValue: boolean): void; /** * Automatically commits the transactions as rows/cells are being edited to the client data source. A [saveChanges](ui.iggrid#methods:saveChanges) call still needs to be performed in order to commit the transactions to a server-side data source. + * */ igTreeGrid(optionLiteral: 'option', optionName: "autoCommit"): boolean; /** * Automatically commits the transactions as rows/cells are being edited to the client data source. A [saveChanges](ui.iggrid#methods:saveChanges) call still needs to be performed in order to commit the transactions to a server-side data source. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "autoCommit", optionValue: boolean): void; @@ -85581,6 +100326,7 @@ interface JQuery { * If a new row is added, edited, then deleted, there will be no transaction added to the log. * If several edits are made to a row or an individual cell, this should result in a single transaction. * Note: This option takes effect only when [autoCommit](ui.iggrid#options:autoCommit) is set to false. + * */ igTreeGrid(optionLiteral: 'option', optionName: "aggregateTransactions"): boolean; @@ -85591,12 +100337,14 @@ interface JQuery { * If several edits are made to a row or an individual cell, this should result in a single transaction. * Note: This option takes effect only when [autoCommit](ui.iggrid#options:autoCommit) is set to false. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "aggregateTransactions", optionValue: boolean): void; /** * Sets gets ability to automatically format text in cells for numeric and date columns. The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) + * */ igTreeGrid(optionLiteral: 'option', optionName: "autoFormat"): string|boolean; @@ -85604,6 +100352,7 @@ interface JQuery { /** * Sets gets ability to automatically format text in cells for numeric and date columns. The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) * + * * @optionValue New value to be set. */ @@ -85611,72 +100360,84 @@ interface JQuery { /** * Gets ability to render checkboxes and use checkbox editor when dataType of a column is "bool". Checkboxes are not rendered for boolean values in columns with a [column template](ui.iggrid#options:columns.template). + * */ igTreeGrid(optionLiteral: 'option', optionName: "renderCheckboxes"): boolean; /** * Sets ability to render checkboxes and use checkbox editor when dataType of a column is "bool". Checkboxes are not rendered for boolean values in columns with a [column template](ui.iggrid#options:columns.template). * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "renderCheckboxes", optionValue: boolean): void; /** * URL to which updating requests will be made. + * */ igTreeGrid(optionLiteral: 'option', optionName: "updateUrl"): string; /** * URL to which updating requests will be made. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "updateUrl", optionValue: string): void; /** * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). + * */ igTreeGrid(optionLiteral: 'option', optionName: "alternateRowStyles"): boolean; /** * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "alternateRowStyles", optionValue: boolean): void; /** * If set to true and all columns' widths are specified and their combined width is less than the grid width then the last column width will be automatically adjusted to fill the remaining empty space of the grid. + * */ igTreeGrid(optionLiteral: 'option', optionName: "autofitLastColumn"): boolean; /** * If set to true and all columns' widths are specified and their combined width is less than the grid width then the last column width will be automatically adjusted to fill the remaining empty space of the grid. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "autofitLastColumn", optionValue: boolean): void; /** * Enables/disables rendering of hover styles when the mouse is over a record. This can be useful in templating scenarios, for example, where we don't want to apply hover styling to templated content. + * */ igTreeGrid(optionLiteral: 'option', optionName: "enableHoverStyles"): boolean; /** * Enables/disables rendering of hover styles when the mouse is over a record. This can be useful in templating scenarios, for example, where we don't want to apply hover styling to templated content. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "enableHoverStyles", optionValue: boolean): void; /** * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * */ igTreeGrid(optionLiteral: 'option', optionName: "enableUTCDates"): boolean; /** * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "enableUTCDates", optionValue: boolean): void; @@ -85684,6 +100445,7 @@ interface JQuery { /** * Merge unbound columns values inside data source when data source is remote. If true then the unbound columns are merged to the data source at runtime on the server. Note that data source is expanded with the new data and this could cause performance issues when the data is huge. If mergeUnboundColumns is false then the unbound data is sent and merged on the client. This option is used by the [igGrid MVC Helper](http://www.igniteui.com/help/iggrid-developing-asp-net-mvc-applications-with-iggrid). * Checkout [Populating Unbound Columns Remotely (igGrid)](http://www.igniteui.com/help/iggrid-unboundcolumns-populating-with-data-remotely) topic for more information. + * */ igTreeGrid(optionLiteral: 'option', optionName: "mergeUnboundColumns"): boolean; @@ -85691,36 +100453,42 @@ interface JQuery { * Merge unbound columns values inside data source when data source is remote. If true then the unbound columns are merged to the data source at runtime on the server. Note that data source is expanded with the new data and this could cause performance issues when the data is huge. If mergeUnboundColumns is false then the unbound data is sent and merged on the client. This option is used by the [igGrid MVC Helper](http://www.igniteui.com/help/iggrid-developing-asp-net-mvc-applications-with-iggrid). * Checkout [Populating Unbound Columns Remotely (igGrid)](http://www.igniteui.com/help/iggrid-unboundcolumns-populating-with-data-remotely) topic for more information. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "mergeUnboundColumns", optionValue: boolean): void; /** * When dataSource is a remote URL, defines whether to set the type of the remote data source to JSONP. + * */ igTreeGrid(optionLiteral: 'option', optionName: "jsonpRequest"): boolean; /** * When dataSource is a remote URL, defines whether to set the type of the remote data source to JSONP. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "jsonpRequest", optionValue: boolean): void; /** * Enables/disables grid adjusting its dimensions when its [width](ui.iggrid#options:width) and/or [height](ui.iggrid#options:height) is set in percent (%) and grid parent DOM container is resized. + * */ igTreeGrid(optionLiteral: 'option', optionName: "enableResizeContainerCheck"): boolean; /** * Enables/disables grid adjusting its dimensions when its [width](ui.iggrid#options:width) and/or [height](ui.iggrid#options:height) is set in percent (%) and grid parent DOM container is resized. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "enableResizeContainerCheck", optionValue: boolean): void; /** * Configures how the feature chooser icon should display on header cells - e.g. to display as gear icon or not. + * */ igTreeGrid(optionLiteral: 'option', optionName: "featureChooserIconDisplay"): string; @@ -85728,6 +100496,7 @@ interface JQuery { /** * Configures how the feature chooser icon should display on header cells - e.g. to display as gear icon or not. * + * * @optionValue New value to be set. */ @@ -85735,12 +100504,14 @@ interface JQuery { /** * Settings related to content scrolling. + * */ igTreeGrid(optionLiteral: 'option', optionName: "scrollSettings"): IgGridScrollSettings; /** * Settings related to content scrolling. * + * * @optionValue New value to be set. */ igTreeGrid(optionLiteral: 'option', optionName: "scrollSettings", optionValue: IgGridScrollSettings): void; @@ -86100,7 +100871,7 @@ interface JQuery { } interface IgTreeGridMultiColumnHeaders { /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. */ inherit?: boolean; @@ -86131,6 +100902,11 @@ interface IgTreeGridMultiColumnHeaders { } interface IgTreeGridMultiColumnHeadersMethods { destroy(): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.iggridmulticolumnheader#options:language) + * Note that this method is for rare scenarios, see [language](ui.iggridmulticolumnheader#options:language) or [locale](ui.iggridmulticolumnheader#options:locale) option setter + */ changeLocale(): void; /** @@ -86178,12 +100954,12 @@ interface JQuery { igTreeGridMultiColumnHeaders(methodName: "getMultiColumnHeaders"): any[]; /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. */ igTreeGridMultiColumnHeaders(optionLiteral: 'option', optionName: "inherit"): boolean; /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. * * @optionValue New value to be set. */ @@ -86245,11 +101021,13 @@ interface JQuery { interface IgTreeGridPagingLocale { /** * Sets/gets the text message shown while loading content of the context row(while processing breadcrumb/immediate parent row). It is set via $.html(). If set to null loading message is not shown. + * */ contextRowLoadingText?: string; /** * Sets/gets the content of the context row when the first record in the page is root(hasn't ancestors) record. It is set via $.html() + * */ contextRowRootText?: string; @@ -86320,6 +101098,7 @@ interface IgTreeGridPaging { /** * Sets gets paging mode. * + * * Valid values: * "rootLevelOnly" Only pages records at the root of the tree grid are displayed. * "allLevels" includes all visible records in paging. @@ -86329,6 +101108,7 @@ interface IgTreeGridPaging { /** * When data flows to the next page there are a couple of different modes that can help communicate the context of a leaf level row. When mode option is "rootLevelOnly" then the context row always shows the value of the contextRowRootText option. * + * * Valid values: * "none" Does not render the contextual row * "parent" Renders a read-only representation of the immediate parent row @@ -86352,48 +101132,62 @@ interface IgTreeGridPaging { /** * Sets/gets the column key of ancestor to be shown in the breadcrumb trail. It is used only when contextRowMode is breadcrumb + * */ breadcrumbKey?: string; /** * Sets/gets (it is set via $.html()) delimiter between ancestors in the breadcrumb trail. It is used only when contextRowMode is breadcrumb + * */ breadcrumbDelimiter?: string; /** * Reference to the (or name of )function, called before rendering context row content(rendering loading message/bread crumb/parent row). The function takes 4 arguments- dataRow, $textArea- jQuery representation of the text area of the context row(when mode is loading/breadcrumb then it is otherwise ), array of parent rows and context mode - "loading"|"breadcrumb"|"parent". When the function returns string it is used as html set in $textArea. If the function does not return result or returns false/empty string then rendering of the content of the context row should be handled by the developer(similar to canceling rendering of context row content). + * */ renderContextRowFunc?: Function|string; locale?: IgTreeGridPagingLocale; + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + inherit?: boolean; + /** * Number of records loaded and displayed per page. + * */ pageSize?: number; /** * The property in the response data, when using remote data source, that will hold the total number of records in the data source. + * */ recordCountKey?: string; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested page size. + * */ pageSizeUrlKey?: string; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested page index. + * */ pageIndexUrlKey?: string; /** * Current page index that's bound in the data source and rendered in the UI. + * */ currentPageIndex?: number; /** * Type of paging. Delegates all paging functionality to the [$.ig.DataSource](ig.datasource). * + * * Valid values: * "remote" Paging is performed by a remote end-point. * "local" Paging is performed locally by the [$.ig.DataSource](ig.datasource). @@ -86402,6 +101196,7 @@ interface IgTreeGridPaging { /** * If false, a dropdown allowing to change the page size will not be rendered in the UI. + * */ showPageSizeDropDown?: boolean; @@ -86514,6 +101309,7 @@ interface IgTreeGridPaging { /** * Page size dropdown location, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. Can be rendered above the grid header or inside the pager, next to the page links. * + * * Valid values: * "above" The page size drop down will be rendered above the grid header. * "inpager" The page size drop down will be rendered next to page links. @@ -86522,54 +101318,58 @@ interface IgTreeGridPaging { /** * Option specifying whether to show summary label for the currently rendered records or not. + * */ showPagerRecordsLabel?: boolean; /** * Option specifying whether to render the first and last page navigation buttons. + * */ showFirstLastPages?: boolean; /** * Option specifying whether to render the previous and next page navigation buttons. + * */ showPrevNextPages?: boolean; /** * Predefined page sizes that are available to the end user to switch their grid paging to, through a drop down in the grid header. + * */ pageSizeList?: any; /** * Sets/Gets the number of pages which if exceeded a drop down list of page indices is displayed. If the number of pages is less than or equal to this option then buttons for each page are displayed. + * */ pageCountLimit?: number; /** * Number of page buttons, adjacent to and including the [active page](ui.iggridpaging#options:currentPageIndex), that are constantly visible. For the invisible pages, previous and next buttons are used. + * */ visiblePageCount?: number; /** * Drop down width for the page size and page index drop downs. + * */ defaultDropDownWidth?: number; /** * Time in milliseconds for which page drop down will wait for keystrokes before changing the page. + * */ delayOnPageChanged?: number; /** * Enables/disables paging persistence between states. + * */ persist?: boolean; - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. - */ - inherit?: boolean; - /** * Event fired before rendering context row content. * Return false in order to cancel this event. @@ -86595,7 +101395,6 @@ interface IgTreeGridPaging { /** * Event fired when the page size is about to be changed from the page size dropdown. * Return false in order to cancel page size changing. - * Use ui.newPageSize to get new page size. */ pageSizeChanging?: PageSizeChangingEvent; @@ -86621,6 +101420,10 @@ interface IgTreeGridPaging { [optionName: string]: any; } interface IgTreeGridPagingMethods { + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.igtreegridpaging#options:language) + * Note that this method is for rare scenarios, see [language](ui.igtreegridpaging#options:language) or [locale](ui.igtreegridpaging#options:locale) option setter + */ changeLocale(): void; /** @@ -86637,6 +101440,8 @@ interface IgTreeGridPagingMethods { * Get jQuery representation of element that holds text area of the context row. If there isn't such element - creates it. */ getContextRowTextArea(): Object; + changeGlobalLanguage(): void; + changeGlobalRegional(): void; /** * Gets/Sets the current page index, delegates data binding and paging to [$.ig.DataSource](ig.datasource). @@ -86661,11 +101466,14 @@ interface JQuery { igTreeGridPaging(methodName: "destroy"): void; igTreeGridPaging(methodName: "getContextRow"): Object; igTreeGridPaging(methodName: "getContextRowTextArea"): Object; + igTreeGridPaging(methodName: "changeGlobalLanguage"): void; + igTreeGridPaging(methodName: "changeGlobalRegional"): void; igTreeGridPaging(methodName: "pageIndex", index?: number): number; igTreeGridPaging(methodName: "pageSize", size?: number): number; /** * Sets gets paging mode. + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "mode"): string; @@ -86673,6 +101481,7 @@ interface JQuery { /** * Sets gets paging mode. * + * * @optionValue New value to be set. */ @@ -86680,6 +101489,7 @@ interface JQuery { /** * When data flows to the next page there are a couple of different modes that can help communicate the context of a leaf level row. When mode option is "rootLevelOnly" then the context row always shows the value of the contextRowRootText option. + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "contextRowMode"): string; @@ -86687,6 +101497,7 @@ interface JQuery { /** * When data flows to the next page there are a couple of different modes that can help communicate the context of a leaf level row. When mode option is "rootLevelOnly" then the context row always shows the value of the contextRowRootText option. * + * * @optionValue New value to be set. */ @@ -86726,30 +101537,35 @@ interface JQuery { /** * Sets/gets the column key of ancestor to be shown in the breadcrumb trail. It is used only when contextRowMode is breadcrumb + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "breadcrumbKey"): string; /** * Sets/gets the column key of ancestor to be shown in the breadcrumb trail. It is used only when contextRowMode is breadcrumb * + * * @optionValue New value to be set. */ igTreeGridPaging(optionLiteral: 'option', optionName: "breadcrumbKey", optionValue: string): void; /** * Sets/gets (it is set via $.html()) delimiter between ancestors in the breadcrumb trail. It is used only when contextRowMode is breadcrumb + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "breadcrumbDelimiter"): string; /** * Sets/gets (it is set via $.html()) delimiter between ancestors in the breadcrumb trail. It is used only when contextRowMode is breadcrumb * + * * @optionValue New value to be set. */ igTreeGridPaging(optionLiteral: 'option', optionName: "breadcrumbDelimiter", optionValue: string): void; /** * Reference to the (or name of )function, called before rendering context row content(rendering loading message/bread crumb/parent row). The function takes 4 arguments- dataRow, $textArea- jQuery representation of the text area of the context row(when mode is loading/breadcrumb then it is otherwise ), array of parent rows and context mode - "loading"|"breadcrumb"|"parent". When the function returns string it is used as html set in $textArea. If the function does not return result or returns false/empty string then rendering of the content of the context row should be handled by the developer(similar to canceling rendering of context row content). + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "renderContextRowFunc"): Function|string; @@ -86757,6 +101573,7 @@ interface JQuery { /** * Reference to the (or name of )function, called before rendering context row content(rendering loading message/bread crumb/parent row). The function takes 4 arguments- dataRow, $textArea- jQuery representation of the text area of the context row(when mode is loading/breadcrumb then it is otherwise ), array of parent rows and context mode - "loading"|"breadcrumb"|"parent". When the function returns string it is used as html set in $textArea. If the function does not return result or returns false/empty string then rendering of the content of the context row should be handled by the developer(similar to canceling rendering of context row content). * + * * @optionValue New value to be set. */ @@ -86764,68 +101581,91 @@ interface JQuery { igTreeGridPaging(optionLiteral: 'option', optionName: "locale"): IgTreeGridPagingLocale; igTreeGridPaging(optionLiteral: 'option', optionName: "locale", optionValue: IgTreeGridPagingLocale): void; + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + * + * @optionValue New value to be set. + */ + igTreeGridPaging(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + /** * Number of records loaded and displayed per page. + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "pageSize"): number; /** * Number of records loaded and displayed per page. * + * * @optionValue New value to be set. */ igTreeGridPaging(optionLiteral: 'option', optionName: "pageSize", optionValue: number): void; /** * The property in the response data, when using remote data source, that will hold the total number of records in the data source. + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "recordCountKey"): string; /** * The property in the response data, when using remote data source, that will hold the total number of records in the data source. * + * * @optionValue New value to be set. */ igTreeGridPaging(optionLiteral: 'option', optionName: "recordCountKey", optionValue: string): void; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested page size. + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeUrlKey"): string; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested page size. * + * * @optionValue New value to be set. */ igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeUrlKey", optionValue: string): void; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested page index. + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "pageIndexUrlKey"): string; /** * Denotes the name of the encoded URL parameter that will state what is the currently requested page index. * + * * @optionValue New value to be set. */ igTreeGridPaging(optionLiteral: 'option', optionName: "pageIndexUrlKey", optionValue: string): void; /** * Current page index that's bound in the data source and rendered in the UI. + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "currentPageIndex"): number; /** * Current page index that's bound in the data source and rendered in the UI. * + * * @optionValue New value to be set. */ igTreeGridPaging(optionLiteral: 'option', optionName: "currentPageIndex", optionValue: number): void; /** * Type of paging. Delegates all paging functionality to the [$.ig.DataSource](ig.datasource). + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "type"): string; @@ -86833,6 +101673,7 @@ interface JQuery { /** * Type of paging. Delegates all paging functionality to the [$.ig.DataSource](ig.datasource). * + * * @optionValue New value to be set. */ @@ -86840,12 +101681,14 @@ interface JQuery { /** * If false, a dropdown allowing to change the page size will not be rendered in the UI. + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "showPageSizeDropDown"): boolean; /** * If false, a dropdown allowing to change the page size will not be rendered in the UI. * + * * @optionValue New value to be set. */ igTreeGridPaging(optionLiteral: 'option', optionName: "showPageSizeDropDown", optionValue: boolean): void; @@ -87098,6 +101941,7 @@ interface JQuery { /** * Page size dropdown location, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. Can be rendered above the grid header or inside the pager, next to the page links. + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeDropDownLocation"): string; @@ -87105,6 +101949,7 @@ interface JQuery { /** * Page size dropdown location, when [showPageSizeDropDown](ui.iggridpaging#options:showPageSizeDropDown) is set to true. Can be rendered above the grid header or inside the pager, next to the page links. * + * * @optionValue New value to be set. */ @@ -87112,123 +101957,129 @@ interface JQuery { /** * Option specifying whether to show summary label for the currently rendered records or not. + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "showPagerRecordsLabel"): boolean; /** * Option specifying whether to show summary label for the currently rendered records or not. * + * * @optionValue New value to be set. */ igTreeGridPaging(optionLiteral: 'option', optionName: "showPagerRecordsLabel", optionValue: boolean): void; /** * Option specifying whether to render the first and last page navigation buttons. + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "showFirstLastPages"): boolean; /** * Option specifying whether to render the first and last page navigation buttons. * + * * @optionValue New value to be set. */ igTreeGridPaging(optionLiteral: 'option', optionName: "showFirstLastPages", optionValue: boolean): void; /** * Option specifying whether to render the previous and next page navigation buttons. + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "showPrevNextPages"): boolean; /** * Option specifying whether to render the previous and next page navigation buttons. * + * * @optionValue New value to be set. */ igTreeGridPaging(optionLiteral: 'option', optionName: "showPrevNextPages", optionValue: boolean): void; /** * Predefined page sizes that are available to the end user to switch their grid paging to, through a drop down in the grid header. + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeList"): any; /** * Predefined page sizes that are available to the end user to switch their grid paging to, through a drop down in the grid header. * + * * @optionValue New value to be set. */ igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeList", optionValue: any): void; /** * Sets/Gets the number of pages which if exceeded a drop down list of page indices is displayed. If the number of pages is less than or equal to this option then buttons for each page are displayed. + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "pageCountLimit"): number; /** * Sets/ the number of pages which if exceeded a drop down list of page indices is displayed. If the number of pages is less than or equal to this option then buttons for each page are displayed. * + * * @optionValue New value to be set. */ igTreeGridPaging(optionLiteral: 'option', optionName: "pageCountLimit", optionValue: number): void; /** * Number of page buttons, adjacent to and including the [active page](ui.iggridpaging#options:currentPageIndex), that are constantly visible. For the invisible pages, previous and next buttons are used. + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "visiblePageCount"): number; /** * Number of page buttons, adjacent to and including the [active page](ui.iggridpaging#options:currentPageIndex), that are constantly visible. For the invisible pages, previous and next buttons are used. * + * * @optionValue New value to be set. */ igTreeGridPaging(optionLiteral: 'option', optionName: "visiblePageCount", optionValue: number): void; /** * Drop down width for the page size and page index drop downs. + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "defaultDropDownWidth"): number; /** * Drop down width for the page size and page index drop downs. * + * * @optionValue New value to be set. */ igTreeGridPaging(optionLiteral: 'option', optionName: "defaultDropDownWidth", optionValue: number): void; /** * Time in milliseconds for which page drop down will wait for keystrokes before changing the page. + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "delayOnPageChanged"): number; /** * Time in milliseconds for which page drop down will wait for keystrokes before changing the page. * + * * @optionValue New value to be set. */ igTreeGridPaging(optionLiteral: 'option', optionName: "delayOnPageChanged", optionValue: number): void; /** * Enables/disables paging persistence between states. + * */ igTreeGridPaging(optionLiteral: 'option', optionName: "persist"): boolean; /** * Enables/disables paging persistence between states. * - * @optionValue New value to be set. - */ - igTreeGridPaging(optionLiteral: 'option', optionName: "persist", optionValue: boolean): void; - - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. - */ - igTreeGridPaging(optionLiteral: 'option', optionName: "inherit"): boolean; - - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. * * @optionValue New value to be set. */ - igTreeGridPaging(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + igTreeGridPaging(optionLiteral: 'option', optionName: "persist", optionValue: boolean): void; /** * Event fired before rendering context row content. @@ -87285,14 +102136,12 @@ interface JQuery { /** * Event fired when the page size is about to be changed from the page size dropdown. * Return false in order to cancel page size changing. - * Use ui.newPageSize to get new page size. */ igTreeGridPaging(optionLiteral: 'option', optionName: "pageSizeChanging"): PageSizeChangingEvent; /** * Event fired when the page size is about to be changed from the page size dropdown. * Return false in order to cancel page size changing. - * Use ui.newPageSize to get new page size. * * @optionValue Define event handler function. */ @@ -87342,31 +102191,35 @@ interface JQuery { igTreeGridPaging(methodName: string, ...methodParams: any[]): any; } interface IgTreeGridResizing { + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + inherit?: boolean; + /** * Resize the column to the size of the longest currently visible cell value. + * */ allowDoubleClickToResize?: boolean; /** * Specifies whether the resizing should be deferred until the user finishes resizing or applied immediately. + * */ deferredResizing?: boolean; /** * A list of column settings that specifies resizing options on a per column basis. + * */ columnSettings?: IgGridResizingColumnSetting[]; /** * The width in pixels of the resizing handle which is position at the right side of each resizeable column header. + * */ handleThreshold?: number; - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. - */ - inherit?: boolean; - /** * Event fired before a resizing operation is executed. */ @@ -87389,6 +102242,8 @@ interface IgTreeGridResizing { } interface IgTreeGridResizingMethods { destroy(): void; + changeGlobalLanguage(): void; + changeGlobalRegional(): void; /** * Resizes a column to a specified width in pixels, percents or auto if no width is specified. @@ -87404,67 +102259,77 @@ interface JQuery { interface JQuery { igTreeGridResizing(methodName: "destroy"): void; + igTreeGridResizing(methodName: "changeGlobalLanguage"): void; + igTreeGridResizing(methodName: "changeGlobalRegional"): void; igTreeGridResizing(methodName: "resize", column: Object, width?: Object): void; + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + igTreeGridResizing(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + * + * @optionValue New value to be set. + */ + igTreeGridResizing(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + /** * Resize the column to the size of the longest currently visible cell value. + * */ igTreeGridResizing(optionLiteral: 'option', optionName: "allowDoubleClickToResize"): boolean; /** * Resize the column to the size of the longest currently visible cell value. * + * * @optionValue New value to be set. */ igTreeGridResizing(optionLiteral: 'option', optionName: "allowDoubleClickToResize", optionValue: boolean): void; /** * Gets whether the resizing should be deferred until the user finishes resizing or applied immediately. + * */ igTreeGridResizing(optionLiteral: 'option', optionName: "deferredResizing"): boolean; /** * Sets whether the resizing should be deferred until the user finishes resizing or applied immediately. * + * * @optionValue New value to be set. */ igTreeGridResizing(optionLiteral: 'option', optionName: "deferredResizing", optionValue: boolean): void; /** * A list of column settings that specifies resizing options on a per column basis. + * */ igTreeGridResizing(optionLiteral: 'option', optionName: "columnSettings"): IgGridResizingColumnSetting[]; /** * A list of column settings that specifies resizing options on a per column basis. * + * * @optionValue New value to be set. */ igTreeGridResizing(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridResizingColumnSetting[]): void; /** * The width in pixels of the resizing handle which is position at the right side of each resizeable column header. + * */ igTreeGridResizing(optionLiteral: 'option', optionName: "handleThreshold"): number; /** * The width in pixels of the resizing handle which is position at the right side of each resizeable column header. * - * @optionValue New value to be set. - */ - igTreeGridResizing(optionLiteral: 'option', optionName: "handleThreshold", optionValue: number): void; - - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. - */ - igTreeGridResizing(optionLiteral: 'option', optionName: "inherit"): boolean; - - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. * * @optionValue New value to be set. */ - igTreeGridResizing(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + igTreeGridResizing(optionLiteral: 'option', optionName: "handleThreshold", optionValue: number): void; /** * Event fired before a resizing operation is executed. @@ -87511,6 +102376,7 @@ interface IgTreeGridRowSelectors { /** * Determines row numbering format. * + * * Valid values: * "sequential" Defines numbering format to be the index of the visible records. * "hierarchical" Defines numbering format to be concatenation of the parent and children indexes. @@ -87520,30 +102386,40 @@ interface IgTreeGridRowSelectors { /** * Gets the type of checkboxes rendered in the row selector. Can be set only at initialization. * + * * Valid values: * "biState" Checkboxes are rendered and support two states(checked and unchecked). Checkboxes do not cascade down or up in this mode. * "triState" Checkboxes are rendered and support three states(checked, partial and unchecked). Checkboxes cascade up and down in this mode. */ checkBoxMode?: string; + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + inherit?: boolean; + /** * Determines whether the row selectors column should contain row numbering + * */ enableRowNumbering?: boolean; /** * Determines whether the row selectors column should contain checkboxes + * */ enableCheckBoxes?: boolean; /** * The seed to be added to the default numbering + * */ rowNumberingSeed?: number; /** * defines width of the row selector`s column in pixels or percentage. * + * * Valid values: * "string" The row selector column width can be set in pixels (px) and percentage (%) * "number" The row selector width can be set as a number @@ -87555,21 +102431,19 @@ interface IgTreeGridRowSelectors { * Determines whether the selection feature is required for the row selectors. If set to "false" * the widget will not check for Selection availability. If set to "true" an exception will be thrown if Selection is * not available. + * */ requireSelection?: boolean; /** * Determines whether checkboxes will be shown only if row selectors are on focus/selected. + * */ showCheckBoxesOnFocus?: boolean; - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. - */ - inherit?: boolean; - /** * Enables/disables showing an overlay after clicking on the header checkbox, which allows selecting all records from all pages. + * */ enableSelectAllForPaging?: boolean; @@ -87579,6 +102453,7 @@ interface IgTreeGridRowSelectors { * Element with attribute data-rs-close-all is used for closing the overlay * The default template is "
You have selected ${checked} records. Select all ${totalRecordsCount} records
" * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * */ selectAllForPagingTemplate?: string; @@ -87588,6 +102463,7 @@ interface IgTreeGridRowSelectors { * Element with attribute data-rs-close-all is used for closing the overlay * The default template is "
You have deselected ${unchecked} records. Deselect all ${totalRecordsCount} records
" * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * */ deselectAllForPagingTemplate?: string; locale?: IgGridRowSelectorsLocale; @@ -87614,6 +102490,11 @@ interface IgTreeGridRowSelectors { } interface IgTreeGridRowSelectorsMethods { destroy(): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.igtreegridrowselectors#options:language) + * Note that this method is for rare scenarios, see [language](ui.igtreegridrowselectors#options:language) or [locale](ui.igtreegridrowselectors#options:locale) option setter + */ changeLocale(): void; /** @@ -87663,6 +102544,8 @@ interface IgTreeGridRowSelectorsMethods { /** * Returns the check state of the row by id. + * + * @param rowId */ checkStateById(rowId: Object): string; } @@ -87684,6 +102567,7 @@ interface JQuery { /** * Determines row numbering format. + * */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "rowSelectorNumberingMode"): string; @@ -87691,6 +102575,7 @@ interface JQuery { /** * Determines row numbering format. * + * * @optionValue New value to be set. */ @@ -87698,6 +102583,7 @@ interface JQuery { /** * Gets the type of checkboxes rendered in the row selector. Can be set only at initialization. + * */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "checkBoxMode"): string; @@ -87705,49 +102591,69 @@ interface JQuery { /** * The type of checkboxes rendered in the row selector. Can be set only at initialization. * + * * @optionValue New value to be set. */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "checkBoxMode", optionValue: string): void; + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + * + * @optionValue New value to be set. + */ + igTreeGridRowSelectors(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + /** * Determines whether the row selectors column should contain row numbering + * */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "enableRowNumbering"): boolean; /** * Determines whether the row selectors column should contain row numbering * + * * @optionValue New value to be set. */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "enableRowNumbering", optionValue: boolean): void; /** * Determines whether the row selectors column should contain checkboxes + * */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "enableCheckBoxes"): boolean; /** * Determines whether the row selectors column should contain checkboxes * + * * @optionValue New value to be set. */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "enableCheckBoxes", optionValue: boolean): void; /** * The seed to be added to the default numbering + * */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "rowNumberingSeed"): number; /** * The seed to be added to the default numbering * + * * @optionValue New value to be set. */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "rowNumberingSeed", optionValue: number): void; /** * Defines width of the row selector`s column in pixels or percentage. + * */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "rowSelectorColumnWidth"): string|number; @@ -87755,6 +102661,7 @@ interface JQuery { /** * Defines width of the row selector`s column in pixels or percentage. * + * * @optionValue New value to be set. */ @@ -87764,6 +102671,7 @@ interface JQuery { * Determines whether the selection feature is required for the row selectors. If set to "false" * the widget will not check for Selection availability. If set to "true" an exception will be thrown if Selection is * not available. + * */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "requireSelection"): boolean; @@ -87772,42 +102680,35 @@ interface JQuery { * the widget will not check for Selection availability. If set to "true" an exception will be thrown if Selection is * not available. * + * * @optionValue New value to be set. */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "requireSelection", optionValue: boolean): void; /** * Determines whether checkboxes will be shown only if row selectors are on focus/selected. + * */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "showCheckBoxesOnFocus"): boolean; /** * Determines whether checkboxes will be shown only if row selectors are on focus/selected. * + * * @optionValue New value to be set. */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "showCheckBoxesOnFocus", optionValue: boolean): void; - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. - */ - igTreeGridRowSelectors(optionLiteral: 'option', optionName: "inherit"): boolean; - - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. - * - * @optionValue New value to be set. - */ - igTreeGridRowSelectors(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; - /** * Enables/disables showing an overlay after clicking on the header checkbox, which allows selecting all records from all pages. + * */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "enableSelectAllForPaging"): boolean; /** * Enables/disables showing an overlay after clicking on the header checkbox, which allows selecting all records from all pages. * + * * @optionValue New value to be set. */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "enableSelectAllForPaging", optionValue: boolean): void; @@ -87818,6 +102719,7 @@ interface JQuery { * Element with attribute data-rs-close-all is used for closing the overlay * The default template is "
You have selected ${checked} records. Select all ${totalRecordsCount} records
" * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "selectAllForPagingTemplate"): string; @@ -87828,6 +102730,7 @@ interface JQuery { * The default template is "
You have selected ${checked} records. Select all ${totalRecordsCount} records
" * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. * + * * @optionValue New value to be set. */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "selectAllForPagingTemplate", optionValue: string): void; @@ -87838,6 +102741,7 @@ interface JQuery { * Element with attribute data-rs-close-all is used for closing the overlay * The default template is "
You have deselected ${unchecked} records. Deselect all ${totalRecordsCount} records
" * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. + * */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "deselectAllForPagingTemplate"): string; @@ -87848,6 +102752,7 @@ interface JQuery { * The default template is "
You have deselected ${unchecked} records. Deselect all ${totalRecordsCount} records
" * There is also ${allCheckedRecords} parameter which is not used in the default template, but it represents the checked records from all pages. * + * * @optionValue New value to be set. */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "deselectAllForPagingTemplate", optionValue: string): void; @@ -87898,17 +102803,20 @@ interface JQuery { interface IgTreeGridSelection { /** * Enables / Disables multiple selection of cells and rows - depending on the mode + * */ multipleSelection?: boolean; /** * Enables / disables selection via dragging with the mouse - only applicable for cell selection + * */ mouseDragSelect?: boolean; /** * Defines type of the selection. * + * * Valid values: * "row" Defines row selection mode. * "cell" Defines cell selection mode. @@ -87917,36 +102825,43 @@ interface IgTreeGridSelection { /** * Enables / disables activation of rows and cells. Activation implies ability to perform navigating through cells and rows via the keyboard, and selecting rows and cells using CTRL / SHIFT - in the way cells/rows are selected in Ms Excel + * */ activation?: boolean; /** * If wrapAround is enabled and selection is on the first or last row or cell, then when the end user tries to go beyond that, the first/last row or cell will be selected + * */ wrapAround?: boolean; /** * If true will basically skip going into child grids with down / up / right / left arrow keys, when in the context of hierarchical grid + * */ skipChildren?: boolean; /** * If true multiple selection of cells is done as if CTRL is being held. the option is disregarded if mode is set to row. this option is useful for enabling multiple discountinued selection on touch environments. + * */ multipleCellSelectOnClick?: boolean; /** - * Enables / disables selection via continuous touch event - only applicable for cell selection and touch-supported environments + * Deprecated="true" Enables / disables selection via continuous touch event - only applicable for cell selection and touch-supported environments + * */ touchDragSelect?: boolean; /** * Enables / disables selection persistance between states. + * */ persist?: boolean; /** * Enables / disables the ability to ctrl drag multiple selection windows when selection mode is 'cell' + * */ allowMultipleRangeSelection?: boolean; @@ -88131,30 +103046,35 @@ interface JQuery { /** * Enables / Disables multiple selection of cells and rows - depending on the mode + * */ igTreeGridSelection(optionLiteral: 'option', optionName: "multipleSelection"): boolean; /** * Enables / Disables multiple selection of cells and rows - depending on the mode * + * * @optionValue New value to be set. */ igTreeGridSelection(optionLiteral: 'option', optionName: "multipleSelection", optionValue: boolean): void; /** * Enables / disables selection via dragging with the mouse - only applicable for cell selection + * */ igTreeGridSelection(optionLiteral: 'option', optionName: "mouseDragSelect"): boolean; /** * Enables / disables selection via dragging with the mouse - only applicable for cell selection * + * * @optionValue New value to be set. */ igTreeGridSelection(optionLiteral: 'option', optionName: "mouseDragSelect", optionValue: boolean): void; /** * Defines type of the selection. + * */ igTreeGridSelection(optionLiteral: 'option', optionName: "mode"): string; @@ -88162,6 +103082,7 @@ interface JQuery { /** * Defines type of the selection. * + * * @optionValue New value to be set. */ @@ -88169,59 +103090,69 @@ interface JQuery { /** * Enables / disables activation of rows and cells. Activation implies ability to perform navigating through cells and rows via the keyboard, and selecting rows and cells using CTRL / SHIFT - in the way cells/rows are selected in Ms Excel + * */ igTreeGridSelection(optionLiteral: 'option', optionName: "activation"): boolean; /** * Enables / disables activation of rows and cells. Activation implies ability to perform navigating through cells and rows via the keyboard, and selecting rows and cells using CTRL / SHIFT - in the way cells/rows are selected in Ms Excel * + * * @optionValue New value to be set. */ igTreeGridSelection(optionLiteral: 'option', optionName: "activation", optionValue: boolean): void; /** * If wrapAround is enabled and selection is on the first or last row or cell, then when the end user tries to go beyond that, the first/last row or cell will be selected + * */ igTreeGridSelection(optionLiteral: 'option', optionName: "wrapAround"): boolean; /** * If wrapAround is enabled and selection is on the first or last row or cell, then when the end user tries to go beyond that, the first/last row or cell will be selected * + * * @optionValue New value to be set. */ igTreeGridSelection(optionLiteral: 'option', optionName: "wrapAround", optionValue: boolean): void; /** * If true will basically skip going into child grids with down / up / right / left arrow keys, when in the context of hierarchical grid + * */ igTreeGridSelection(optionLiteral: 'option', optionName: "skipChildren"): boolean; /** * If true will basically skip going into child grids with down / up / right / left arrow keys, when in the context of hierarchical grid * + * * @optionValue New value to be set. */ igTreeGridSelection(optionLiteral: 'option', optionName: "skipChildren", optionValue: boolean): void; /** * If true multiple selection of cells is done as if CTRL is being held. the option is disregarded if mode is set to row. this option is useful for enabling multiple discountinued selection on touch environments. + * */ igTreeGridSelection(optionLiteral: 'option', optionName: "multipleCellSelectOnClick"): boolean; /** * If true multiple selection of cells is done as if CTRL is being held. the option is disregarded if mode is set to row. this option is useful for enabling multiple discountinued selection on touch environments. * + * * @optionValue New value to be set. */ igTreeGridSelection(optionLiteral: 'option', optionName: "multipleCellSelectOnClick", optionValue: boolean): void; /** - * Enables / disables selection via continuous touch event - only applicable for cell selection and touch-supported environments + * Deprecated="true" Enables / disables selection via continuous touch event - only applicable for cell selection and touch-supported environments + * */ igTreeGridSelection(optionLiteral: 'option', optionName: "touchDragSelect"): boolean; /** - * Enables / disables selection via continuous touch event - only applicable for cell selection and touch-supported environments + * Deprecated="true" Enables / disables selection via continuous touch event - only applicable for cell selection and touch-supported environments + * * * @optionValue New value to be set. */ @@ -88229,24 +103160,28 @@ interface JQuery { /** * Enables / disables selection persistance between states. + * */ igTreeGridSelection(optionLiteral: 'option', optionName: "persist"): boolean; /** * Enables / disables selection persistance between states. * + * * @optionValue New value to be set. */ igTreeGridSelection(optionLiteral: 'option', optionName: "persist", optionValue: boolean): void; /** * Enables / disables the ability to ctrl drag multiple selection windows when selection mode is 'cell' + * */ igTreeGridSelection(optionLiteral: 'option', optionName: "allowMultipleRangeSelection"): boolean; /** * Enables / disables the ability to ctrl drag multiple selection windows when selection mode is 'cell' * + * * @optionValue New value to be set. */ igTreeGridSelection(optionLiteral: 'option', optionName: "allowMultipleRangeSelection", optionValue: boolean): void; @@ -88363,17 +103298,25 @@ interface JQuery { interface IgTreeGridSorting { /** * Specifies from which data bound level to be applied sorting - 0 is the first level + * */ fromLevel?: number; /** * Specifies to which data bound level to be applied sorting - if -1 sorting should be applied to the last data bound level + * */ toLevel?: number; + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + inherit?: boolean; + /** * Defines local or remote sorting operations. * + * * Valid values: * "remote" Sorting is performed remotely as a server-side operation. * "local" Sorting is performed locally by the [$.ig.DataSource](ig.datasource) component. @@ -88382,32 +103325,38 @@ interface IgTreeGridSorting { /** * Enables or disables the case sensitivity of the sorting. Works only for [local](ui.iggridsorting#options:type) sorting. + * */ caseSensitive?: boolean; /** * Enables/disables special styling for sorted columns. If false, sorted column cells will not have any special sort-related styling. + * */ applySortedColumnCss?: boolean; /** * URL param name which specifies how sorting expressions will be encoded in the URL. Uses OData conventions. ex: ?sort(col1)=asc + * */ sortUrlKey?: string; /** * URL param value for ascending type of sorting. Uses OData conventions. Example: ?sort(col1)=asc + * */ sortUrlKeyAscValue?: string; /** * URL param value for descending type of sorting. Uses OData conventions. Example: ?sort(col1)=desc + * */ sortUrlKeyDescValue?: string; /** * Defines single column sorting or multiple column sorting. * + * * Valid values: * "single" Only a single column can be sorted. Previously sorted columns will not preserve their sorting upon sorting a new column. * "multi" If enabled, previous sorted state for columns won't be cleared @@ -88416,12 +103365,14 @@ interface IgTreeGridSorting { /** * Custom sort function(or name of the function as a string) accepting three parameters - the data to be sorted, an array of data source field definitions, and the direction to sort with (optional). The function should return the sorted data array. + * */ customSortFunction?: Function; /** * Specifies which direction to use on the first click / keydown, if the column is sorted for the first time. * + * * Valid values: * "ascending" The first sort of the column data will be in ascending order. * "descending" The first sort of the column data will be in descending order. @@ -88430,6 +103381,7 @@ interface IgTreeGridSorting { /** * Specifies whether sorting to be applied immediately when click sort/unsort columns when using the multiple sorting dialog. When it is false Apply button shows and sorting is applied when the button is clicked. + * */ modalDialogSortOnClick?: boolean; @@ -88521,6 +103473,7 @@ interface IgTreeGridSorting { /** * Specifies width of multiple sorting dialog. * + * * Valid values: * "string" Specifies the width in pixels as a string ("300px"). * "number" Specifies the width in pixels as a number (300) @@ -88530,6 +103483,7 @@ interface IgTreeGridSorting { /** * Specifies height of multiple sorting dialog. * + * * Valid values: * "string" The widget height can be set in pixels (px) and percentage (%). * "number" The widget height can be set in pixels as a number. @@ -88538,16 +103492,19 @@ interface IgTreeGridSorting { /** * Specifies time of milliseconds for animation duration to show/hide modal dialog. + * */ modalDialogAnimationDuration?: number; /** * A list of custom column settings that specify custom sorting settings for a specific column (whether sorting is enabled / disabled, default sort direction, first sort direction, etc.). + * */ columnSettings?: IgGridSortingColumnSetting[]; /** * Enables/disables sorting persistence when the grid is rebound. + * */ persist?: boolean; @@ -88561,14 +103518,10 @@ interface IgTreeGridSorting { /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * */ dialogWidget?: string; - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. - */ - inherit?: boolean; - /** * Event fired before sorting is invoked for a certain column. * Return false in order to cancel column sorting. @@ -88646,6 +103599,10 @@ interface IgTreeGridSorting { [optionName: string]: any; } interface IgTreeGridSortingMethods { + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.igtreegridsorting#options:language) + * Note that this method is for rare scenarios, see [language](ui.igtreegridsorting#options:language) or [locale](ui.igtreegridsorting#options:locale) option setter + */ changeLocale(): void; /** @@ -88655,12 +103612,15 @@ interface IgTreeGridSortingMethods { */ isColumnSorted(columnKey: string): boolean; destroy(): void; + changeGlobalLanguage(): void; + changeGlobalRegional(): void; /** * Sorts the data in a grid column and updates the UI. * * @param index Column key (string) or index (number) - for multi-row grid only column key can be used. Specifies the column which we want to sort. If the mode is multiple, previous sorting states are not cleared. * @param direction Specifies sorting direction (ascending or descending) + * @param header */ sortColumn(index: Object, direction: Object, header: Object): void; @@ -88696,6 +103656,8 @@ interface IgTreeGridSortingMethods { /** * Renders content of multiple sorting dialog - sorted and unsorted columns. + * + * @param isToCallEvents */ renderMultipleSortingDialogContent(isToCallEvents: Object): void; @@ -88712,6 +103674,8 @@ interface JQuery { igTreeGridSorting(methodName: "changeLocale"): void; igTreeGridSorting(methodName: "isColumnSorted", columnKey: string): boolean; igTreeGridSorting(methodName: "destroy"): void; + igTreeGridSorting(methodName: "changeGlobalLanguage"): void; + igTreeGridSorting(methodName: "changeGlobalRegional"): void; igTreeGridSorting(methodName: "sortColumn", index: Object, direction: Object, header: Object): void; igTreeGridSorting(methodName: "sortMultiple", exprs?: any[]): void; igTreeGridSorting(methodName: "clearSorting"): void; @@ -88723,30 +103687,47 @@ interface JQuery { /** * Specifies from which data bound level to be applied sorting - 0 is the first level + * */ igTreeGridSorting(optionLiteral: 'option', optionName: "fromLevel"): number; /** * Specifies from which data bound level to be applied sorting - 0 is the first level * + * * @optionValue New value to be set. */ igTreeGridSorting(optionLiteral: 'option', optionName: "fromLevel", optionValue: number): void; /** * Specifies to which data bound level to be applied sorting - if -1 sorting should be applied to the last data bound level + * */ igTreeGridSorting(optionLiteral: 'option', optionName: "toLevel"): number; /** * Specifies to which data bound level to be applied sorting - if -1 sorting should be applied to the last data bound level * + * * @optionValue New value to be set. */ igTreeGridSorting(optionLiteral: 'option', optionName: "toLevel", optionValue: number): void; + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + * + * @optionValue New value to be set. + */ + igTreeGridSorting(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + /** * Defines local or remote sorting operations. + * */ igTreeGridSorting(optionLiteral: 'option', optionName: "type"): string; @@ -88754,6 +103735,7 @@ interface JQuery { /** * Defines local or remote sorting operations. * + * * @optionValue New value to be set. */ @@ -88761,66 +103743,77 @@ interface JQuery { /** * Enables or disables the case sensitivity of the sorting. Works only for [local](ui.iggridsorting#options:type) sorting. + * */ igTreeGridSorting(optionLiteral: 'option', optionName: "caseSensitive"): boolean; /** * Enables or disables the case sensitivity of the sorting. Works only for [local](ui.iggridsorting#options:type) sorting. * + * * @optionValue New value to be set. */ igTreeGridSorting(optionLiteral: 'option', optionName: "caseSensitive", optionValue: boolean): void; /** * Enables/disables special styling for sorted columns. If false, sorted column cells will not have any special sort-related styling. + * */ igTreeGridSorting(optionLiteral: 'option', optionName: "applySortedColumnCss"): boolean; /** * Enables/disables special styling for sorted columns. If false, sorted column cells will not have any special sort-related styling. * + * * @optionValue New value to be set. */ igTreeGridSorting(optionLiteral: 'option', optionName: "applySortedColumnCss", optionValue: boolean): void; /** * URL param name which specifies how sorting expressions will be encoded in the URL. Uses OData conventions. ex: ?sort(col1)=asc + * */ igTreeGridSorting(optionLiteral: 'option', optionName: "sortUrlKey"): string; /** * URL param name which specifies how sorting expressions will be encoded in the URL. Uses OData conventions. ex: ?sort(col1)=asc * + * * @optionValue New value to be set. */ igTreeGridSorting(optionLiteral: 'option', optionName: "sortUrlKey", optionValue: string): void; /** * URL param value for ascending type of sorting. Uses OData conventions. Example: ?sort(col1)=asc + * */ igTreeGridSorting(optionLiteral: 'option', optionName: "sortUrlKeyAscValue"): string; /** * URL param value for ascending type of sorting. Uses OData conventions. Example: ?sort(col1)=asc * + * * @optionValue New value to be set. */ igTreeGridSorting(optionLiteral: 'option', optionName: "sortUrlKeyAscValue", optionValue: string): void; /** * URL param value for descending type of sorting. Uses OData conventions. Example: ?sort(col1)=desc + * */ igTreeGridSorting(optionLiteral: 'option', optionName: "sortUrlKeyDescValue"): string; /** * URL param value for descending type of sorting. Uses OData conventions. Example: ?sort(col1)=desc * + * * @optionValue New value to be set. */ igTreeGridSorting(optionLiteral: 'option', optionName: "sortUrlKeyDescValue", optionValue: string): void; /** * Defines single column sorting or multiple column sorting. + * */ igTreeGridSorting(optionLiteral: 'option', optionName: "mode"): string; @@ -88828,6 +103821,7 @@ interface JQuery { /** * Defines single column sorting or multiple column sorting. * + * * @optionValue New value to be set. */ @@ -88835,18 +103829,21 @@ interface JQuery { /** * Custom sort function(or name of the function as a string) accepting three parameters - the data to be sorted, an array of data source field definitions, and the direction to sort with (optional). The function should return the sorted data array. + * */ igTreeGridSorting(optionLiteral: 'option', optionName: "customSortFunction"): Function; /** * Custom sort function(or name of the function as a string) accepting three parameters - the data to be sorted, an array of data source field definitions, and the direction to sort with (optional). The function should return the sorted data array. * + * * @optionValue New value to be set. */ igTreeGridSorting(optionLiteral: 'option', optionName: "customSortFunction", optionValue: Function): void; /** * Gets which direction to use on the first click / keydown, if the column is sorted for the first time. + * */ igTreeGridSorting(optionLiteral: 'option', optionName: "firstSortDirection"): string; @@ -88854,6 +103851,7 @@ interface JQuery { /** * Sets which direction to use on the first click / keydown, if the column is sorted for the first time. * + * * @optionValue New value to be set. */ @@ -88861,12 +103859,14 @@ interface JQuery { /** * Gets whether sorting to be applied immediately when click sort/unsort columns when using the multiple sorting dialog. When it is false Apply button shows and sorting is applied when the button is clicked. + * */ igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogSortOnClick"): boolean; /** * Sets whether sorting to be applied immediately when click sort/unsort columns when using the multiple sorting dialog. When it is false Apply button shows and sorting is applied when the button is clicked. * + * * @optionValue New value to be set. */ igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogSortOnClick", optionValue: boolean): void; @@ -89067,6 +104067,7 @@ interface JQuery { /** * Gets width of multiple sorting dialog. + * */ igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogWidth"): string|number; @@ -89074,6 +104075,7 @@ interface JQuery { /** * Sets width of multiple sorting dialog. * + * * @optionValue New value to be set. */ @@ -89081,6 +104083,7 @@ interface JQuery { /** * Gets height of multiple sorting dialog. + * */ igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogHeight"): string|number; @@ -89088,6 +104091,7 @@ interface JQuery { /** * Sets height of multiple sorting dialog. * + * * @optionValue New value to be set. */ @@ -89095,36 +104099,42 @@ interface JQuery { /** * Gets time of milliseconds for animation duration to show/hide modal dialog. + * */ igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogAnimationDuration"): number; /** * Sets time of milliseconds for animation duration to show/hide modal dialog. * + * * @optionValue New value to be set. */ igTreeGridSorting(optionLiteral: 'option', optionName: "modalDialogAnimationDuration", optionValue: number): void; /** * A list of custom column settings that specify custom sorting settings for a specific column (whether sorting is enabled / disabled, default sort direction, first sort direction, etc.). + * */ igTreeGridSorting(optionLiteral: 'option', optionName: "columnSettings"): IgGridSortingColumnSetting[]; /** * A list of custom column settings that specify custom sorting settings for a specific column (whether sorting is enabled / disabled, default sort direction, first sort direction, etc.). * + * * @optionValue New value to be set. */ igTreeGridSorting(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridSortingColumnSetting[]): void; /** * Enables/disables sorting persistence when the grid is rebound. + * */ igTreeGridSorting(optionLiteral: 'option', optionName: "persist"): boolean; /** * Enables/disables sorting persistence when the grid is rebound. * + * * @optionValue New value to be set. */ igTreeGridSorting(optionLiteral: 'option', optionName: "persist", optionValue: boolean): void; @@ -89149,27 +104159,17 @@ interface JQuery { /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * */ igTreeGridSorting(optionLiteral: 'option', optionName: "dialogWidget"): string; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. * - * @optionValue New value to be set. - */ - igTreeGridSorting(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; - - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. - */ - igTreeGridSorting(optionLiteral: 'option', optionName: "inherit"): boolean; - - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. * * @optionValue New value to be set. */ - igTreeGridSorting(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + igTreeGridSorting(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; /** * Event fired before sorting is invoked for a certain column. @@ -89348,7 +104348,13 @@ interface JQuery { } interface IgTreeGridTooltips { /** - * determines the tooltip visibility option + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + inherit?: boolean; + + /** + * Determines the tooltip visibility option + * * * Valid values: * "always" tooltips always show for hovered elements @@ -89358,7 +104364,8 @@ interface IgTreeGridTooltips { visibility?: string; /** - * controls the tooltip's style + * Controls the tooltip's style + * * * Valid values: * "tooltip" The tooltip will be positioned according to the mouse cursor. Will render the tooltip content as plain text. @@ -89369,40 +104376,41 @@ interface IgTreeGridTooltips { /** * The time in milliseconds after which tooltip will show when * mouse cursor is hovered over a cell. + * */ showDelay?: number; /** * Type="integer" The time in milliseconds after which tooltip hides when mouse * cursor gets outside of the cell. + * */ hideDelay?: number; /** * A list of custom column settings that specify custom tooltip settings for a specific column (whether tooltips are enabled / disabled) + * */ columnSettings?: IgGridTooltipsColumnSettings; /** * Sets the time tooltip fades in and out when showing/hiding + * */ fadeTimespan?: number; /** * Sets the left position of the tooltip relative to the mouse cursor + * */ cursorLeftOffset?: number; /** * Sets the top position of the tooltip relative to the mouse cursor + * */ cursorTopOffset?: number; - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. - */ - inherit?: boolean; - /** * Event fired when the mouse has hovered on an element long enough to display a tooltip */ @@ -89444,8 +104452,21 @@ interface JQuery { igTreeGridTooltips(methodName: "destroy"): void; igTreeGridTooltips(methodName: "id"): string; + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + * + * @optionValue New value to be set. + */ + igTreeGridTooltips(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + /** * Determines the tooltip visibility option + * */ igTreeGridTooltips(optionLiteral: 'option', optionName: "visibility"): string; @@ -89453,6 +104474,7 @@ interface JQuery { /** * Determines the tooltip visibility option * + * * @optionValue New value to be set. */ @@ -89460,6 +104482,7 @@ interface JQuery { /** * Controls the tooltip's style + * */ igTreeGridTooltips(optionLiteral: 'option', optionName: "style"): string; @@ -89467,6 +104490,7 @@ interface JQuery { /** * Controls the tooltip's style * + * * @optionValue New value to be set. */ @@ -89475,6 +104499,7 @@ interface JQuery { /** * The time in milliseconds after which tooltip will show when * mouse cursor is hovered over a cell. + * */ igTreeGridTooltips(optionLiteral: 'option', optionName: "showDelay"): number; @@ -89482,6 +104507,7 @@ interface JQuery { * The time in milliseconds after which tooltip will show when * mouse cursor is hovered over a cell. * + * * @optionValue New value to be set. */ igTreeGridTooltips(optionLiteral: 'option', optionName: "showDelay", optionValue: number): void; @@ -89489,6 +104515,7 @@ interface JQuery { /** * Type="integer" The time in milliseconds after which tooltip hides when mouse * cursor gets outside of the cell. + * */ igTreeGridTooltips(optionLiteral: 'option', optionName: "hideDelay"): number; @@ -89496,69 +104523,66 @@ interface JQuery { * Type="integer" The time in milliseconds after which tooltip hides when mouse * cursor gets outside of the cell. * + * * @optionValue New value to be set. */ igTreeGridTooltips(optionLiteral: 'option', optionName: "hideDelay", optionValue: number): void; /** * A list of custom column settings that specify custom tooltip settings for a specific column (whether tooltips are enabled / disabled) + * */ igTreeGridTooltips(optionLiteral: 'option', optionName: "columnSettings"): IgGridTooltipsColumnSettings; /** * A list of custom column settings that specify custom tooltip settings for a specific column (whether tooltips are enabled / disabled) * + * * @optionValue New value to be set. */ igTreeGridTooltips(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridTooltipsColumnSettings): void; /** * The time tooltip fades in and out when showing/hiding + * */ igTreeGridTooltips(optionLiteral: 'option', optionName: "fadeTimespan"): number; /** * Sets the time tooltip fades in and out when showing/hiding * + * * @optionValue New value to be set. */ igTreeGridTooltips(optionLiteral: 'option', optionName: "fadeTimespan", optionValue: number): void; /** * The left position of the tooltip relative to the mouse cursor + * */ igTreeGridTooltips(optionLiteral: 'option', optionName: "cursorLeftOffset"): number; /** * Sets the left position of the tooltip relative to the mouse cursor * + * * @optionValue New value to be set. */ igTreeGridTooltips(optionLiteral: 'option', optionName: "cursorLeftOffset", optionValue: number): void; /** * The top position of the tooltip relative to the mouse cursor + * */ igTreeGridTooltips(optionLiteral: 'option', optionName: "cursorTopOffset"): number; /** * Sets the top position of the tooltip relative to the mouse cursor * - * @optionValue New value to be set. - */ - igTreeGridTooltips(optionLiteral: 'option', optionName: "cursorTopOffset", optionValue: number): void; - - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. - */ - igTreeGridTooltips(optionLiteral: 'option', optionName: "inherit"): boolean; - - /** - * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. * * @optionValue New value to be set. */ - igTreeGridTooltips(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + igTreeGridTooltips(optionLiteral: 'option', optionName: "cursorTopOffset", optionValue: number): void; /** * Event fired when the mouse has hovered on an element long enough to display a tooltip @@ -89616,11 +104640,13 @@ interface JQuery { interface IgTreeGridUpdatingLocale { /** * Specifies the add child tooltip text. + * */ addChildTooltip?: string; /** * Specifies the label of the add child button in touch environment. + * */ addChildButtonLabel?: string; @@ -89633,6 +104659,7 @@ interface IgTreeGridUpdatingLocale { interface IgTreeGridUpdating { /** * Specifies whether to enable or disable adding children to rows. + * */ enableAddChild?: boolean; @@ -89649,14 +104676,21 @@ interface IgTreeGridUpdating { addChildButtonLabel?: string; locale?: IgTreeGridUpdatingLocale; + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + inherit?: boolean; + /** * A list of custom column options that specify editing and validation settings for a specific column. + * */ columnSettings?: IgGridUpdatingColumnSetting[]; /** * Specifies the edit mode. * + * * Valid values: * "row" Editors are shown for all columns that are not read-only. The editor of the clicked cell receives initial focus. Done and Cancel buttons may be displayed based on the [showDoneCancelButtons](ui.iggridupdating#options:showDoneCancelButtons) property. * "cell" An editor is shown for the cell entering edit mode. The Done and Cancel buttons are not supported for this mode. @@ -89667,16 +104701,19 @@ interface IgTreeGridUpdating { /** * Specifies if deleting rows through the UI is enabled. + * */ enableDeleteRow?: boolean; /** * Specifies if adding rows through the UI is enabled. When enabled an additional row is rendered at the bottom of the grid's header that works as a button. When the end-user clicks on it edit mode is initiated either through a dialog (when [editMode](ui.iggridupdating#options:editMode) is 'dialog') or mimicking the look and feel of 'row' [editMode](ui.iggridupdating#options:editMode) (when [editMode](ui.iggridupdating#options:editMode) is 'row' or 'cell'). + * */ enableAddRow?: boolean; /** * Specifies if the value of each editable column in the grid should be validated. The validation is done based on the rules of their corresponding editors. + * */ validation?: boolean; @@ -89738,64 +104775,70 @@ interface IgTreeGridUpdating { /** * Determines if the Done and Cancel buttons will be available as means to end edit mode for [editMode](ui.iggridupdating#options:editMode) 'row' and when adding a new row. + * */ showDoneCancelButtons?: boolean; /** * Specifies if an exception should be thrown when the grid's data view changes while there are pending transactions in the data source. The data view changes when the data source performs a sorting, filtering, groupby or paging operation and the exception thrown will prevent the operation from succeeding. All pending transactions must be committed before a data view operation is able to complete. Committing transactions can be done manually through the grid's [commit](ui.iggrid#methods:commit) function or automatically by setting [autoCommit](ui.iggrid#options:autoCommit) to 'true'. + * */ enableDataDirtyException?: boolean; /** * Specifies how end-users are able to start edit mode. Possible values: "click", "dblclick", "F2", "enter" and their combinations separated by coma or in array. The keyboard triggers have effect only if the grid cells can receive focus (the grid's [tabIndex](ui.iggrid#options:tabIndex) property should not have a negative value) or Selection is enabled. If "dblclick" is included, then "click" has no effect. + * */ startEditTriggers?: string|Array; /** * Determines if pressing Enter to navigate away from the currently edited cell should move the focus horizontally or vertically (default). + * */ horizontalMoveOnEnter?: boolean; /** * Enables excel navigation style. When turned on, the arrow keys can be used for changing the currently edited cell similar to how Tab and Enter behave. When disabled, the arrow keys control the cursor inside editors. + * */ excelNavigationMode?: boolean; /** * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property succeeds. The function will be called with arguments representing the data returned by the server. + * */ saveChangesSuccessHandler?: Function|string; /** * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property fails. The function will be called with arguments representing the data returned by the server. + * */ saveChangesErrorHandler?: Function|string; /** * On touch-enabled devices specifies the swipe distance for the delete button to appear. + * */ swipeDistance?: string|number; /** * Controls if navigation will wrap around the grid. The feature will never wrap around virtual grids. + * */ wrapAround?: boolean; /** * A list of options controlling the rendering behavior of the row edit dialog. If [editMode](ui.iggridupdating#options:editMode) is not 'dialog' these have no effect. + * */ rowEditDialogOptions?: IgGridUpdatingRowEditDialogOptions; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. For more information on how to utilize this property, please refer to the [Extending igGrid Modal Dialog](http://www.igniteui.com/help/extending-iggrid-modal-dialog) topic. + * */ dialogWidget?: string; - /** - * Enables/disables feature inheritance for the child layouts in igHierarchicalGrid. - */ - inherit?: boolean; - /** * Event fired before row editing begins. * Return false in order to cancel editing. @@ -89904,6 +104947,10 @@ interface IgTreeGridUpdating { [optionName: string]: any; } interface IgTreeGridUpdatingMethods { + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.igtreegridupdating#options:language) + * Note that this method is for rare scenarios, see [language](ui.igtreegridupdating#options:language) or [locale](ui.igtreegridupdating#options:locale) option setter + */ changeLocale(): void; /** @@ -90016,6 +105063,11 @@ interface IgTreeGridUpdatingMethods { * @param create Requests to create the editor if it has not been created yet. */ editorForCell(cell: string, create?: boolean): Object; + + /** + * Changes the the regional settings of widget element to the language specified in [options.regional](ui.iggridupdating#options:regional) + * Note that this method is for rare scenarios, use [regional](ui.iggridupdating#options:regional) option setter + */ changeRegional(): void; /** @@ -90058,12 +105110,14 @@ interface JQuery { /** * Gets whether to enable or disable adding children to rows. + * */ igTreeGridUpdating(optionLiteral: 'option', optionName: "enableAddChild"): boolean; /** * Sets whether to enable or disable adding children to rows. * + * * @optionValue New value to be set. */ igTreeGridUpdating(optionLiteral: 'option', optionName: "enableAddChild", optionValue: boolean): void; @@ -90098,20 +105152,35 @@ interface JQuery { igTreeGridUpdating(optionLiteral: 'option', optionName: "locale"): IgTreeGridUpdatingLocale; igTreeGridUpdating(optionLiteral: 'option', optionName: "locale", optionValue: IgTreeGridUpdatingLocale): void; + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + * + * @optionValue New value to be set. + */ + igTreeGridUpdating(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + /** * A list of custom column options that specify editing and validation settings for a specific column. + * */ igTreeGridUpdating(optionLiteral: 'option', optionName: "columnSettings"): IgGridUpdatingColumnSetting[]; /** * A list of custom column options that specify editing and validation settings for a specific column. * + * * @optionValue New value to be set. */ igTreeGridUpdating(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridUpdatingColumnSetting[]): void; /** * Gets the edit mode. + * */ igTreeGridUpdating(optionLiteral: 'option', optionName: "editMode"): string; @@ -90119,6 +105188,7 @@ interface JQuery { /** * Sets the edit mode. * + * * @optionValue New value to be set. */ @@ -90126,36 +105196,42 @@ interface JQuery { /** * Gets if deleting rows through the UI is enabled. + * */ igTreeGridUpdating(optionLiteral: 'option', optionName: "enableDeleteRow"): boolean; /** * Sets if deleting rows through the UI is enabled. * + * * @optionValue New value to be set. */ igTreeGridUpdating(optionLiteral: 'option', optionName: "enableDeleteRow", optionValue: boolean): void; /** * Gets if adding rows through the UI is enabled. When enabled an additional row is rendered at the bottom of the grid's header that works as a button. When the end-user clicks on it edit mode is initiated either through a dialog (when [editMode](ui.iggridupdating#options:editMode) is 'dialog') or mimicking the look and feel of 'row' [editMode](ui.iggridupdating#options:editMode) (when [editMode](ui.iggridupdating#options:editMode) is 'row' or 'cell'). + * */ igTreeGridUpdating(optionLiteral: 'option', optionName: "enableAddRow"): boolean; /** * Sets if adding rows through the UI is enabled. When enabled an additional row is rendered at the bottom of the grid's header that works as a button. When the end-user clicks on it edit mode is initiated either through a dialog (when [editMode](ui.iggridupdating#options:editMode) is 'dialog') or mimicking the look and feel of 'row' [editMode](ui.iggridupdating#options:editMode) (when [editMode](ui.iggridupdating#options:editMode) is 'row' or 'cell'). * + * * @optionValue New value to be set. */ igTreeGridUpdating(optionLiteral: 'option', optionName: "enableAddRow", optionValue: boolean): void; /** * Gets if the value of each editable column in the grid should be validated. The validation is done based on the rules of their corresponding editors. + * */ igTreeGridUpdating(optionLiteral: 'option', optionName: "validation"): boolean; /** * Sets if the value of each editable column in the grid should be validated. The validation is done based on the rules of their corresponding editors. * + * * @optionValue New value to be set. */ igTreeGridUpdating(optionLiteral: 'option', optionName: "validation", optionValue: boolean): void; @@ -90290,30 +105366,35 @@ interface JQuery { /** * Determines if the Done and Cancel buttons will be available as means to end edit mode for [editMode](ui.iggridupdating#options:editMode) 'row' and when adding a new row. + * */ igTreeGridUpdating(optionLiteral: 'option', optionName: "showDoneCancelButtons"): boolean; /** * Determines if the Done and Cancel buttons will be available as means to end edit mode for [editMode](ui.iggridupdating#options:editMode) 'row' and when adding a new row. * + * * @optionValue New value to be set. */ igTreeGridUpdating(optionLiteral: 'option', optionName: "showDoneCancelButtons", optionValue: boolean): void; /** * Gets if an exception should be thrown when the grid's data view changes while there are pending transactions in the data source. The data view changes when the data source performs a sorting, filtering, groupby or paging operation and the exception thrown will prevent the operation from succeeding. All pending transactions must be committed before a data view operation is able to complete. Committing transactions can be done manually through the grid's [commit](ui.iggrid#methods:commit) function or automatically by setting [autoCommit](ui.iggrid#options:autoCommit) to 'true'. + * */ igTreeGridUpdating(optionLiteral: 'option', optionName: "enableDataDirtyException"): boolean; /** * Sets if an exception should be thrown when the grid's data view changes while there are pending transactions in the data source. The data view changes when the data source performs a sorting, filtering, groupby or paging operation and the exception thrown will prevent the operation from succeeding. All pending transactions must be committed before a data view operation is able to complete. Committing transactions can be done manually through the grid's [commit](ui.iggrid#methods:commit) function or automatically by setting [autoCommit](ui.iggrid#options:autoCommit) to 'true'. * + * * @optionValue New value to be set. */ igTreeGridUpdating(optionLiteral: 'option', optionName: "enableDataDirtyException", optionValue: boolean): void; /** * Gets how end-users are able to start edit mode. Possible values: "click", "dblclick", "F2", "enter" and their combinations separated by coma or in array. The keyboard triggers have effect only if the grid cells can receive focus (the grid's [tabIndex](ui.iggrid#options:tabIndex) property should not have a negative value) or Selection is enabled. If "dblclick" is included, then "click" has no effect. + * */ igTreeGridUpdating(optionLiteral: 'option', optionName: "startEditTriggers"): string|Array; @@ -90321,6 +105402,7 @@ interface JQuery { /** * Sets how end-users are able to start edit mode. Possible values: "click", "dblclick", "F2", "enter" and their combinations separated by coma or in array. The keyboard triggers have effect only if the grid cells can receive focus (the grid's [tabIndex](ui.iggrid#options:tabIndex) property should not have a negative value) or Selection is enabled. If "dblclick" is included, then "click" has no effect. * + * * @optionValue New value to be set. */ @@ -90328,30 +105410,35 @@ interface JQuery { /** * Determines if pressing Enter to navigate away from the currently edited cell should move the focus horizontally or vertically (default). + * */ igTreeGridUpdating(optionLiteral: 'option', optionName: "horizontalMoveOnEnter"): boolean; /** * Determines if pressing Enter to navigate away from the currently edited cell should move the focus horizontally or vertically (default). * + * * @optionValue New value to be set. */ igTreeGridUpdating(optionLiteral: 'option', optionName: "horizontalMoveOnEnter", optionValue: boolean): void; /** * Enables excel navigation style. When turned on, the arrow keys can be used for changing the currently edited cell similar to how Tab and Enter behave. When disabled, the arrow keys control the cursor inside editors. + * */ igTreeGridUpdating(optionLiteral: 'option', optionName: "excelNavigationMode"): boolean; /** * Enables excel navigation style. When turned on, the arrow keys can be used for changing the currently edited cell similar to how Tab and Enter behave. When disabled, the arrow keys control the cursor inside editors. * + * * @optionValue New value to be set. */ igTreeGridUpdating(optionLiteral: 'option', optionName: "excelNavigationMode", optionValue: boolean): void; /** * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property succeeds. The function will be called with arguments representing the data returned by the server. + * */ igTreeGridUpdating(optionLiteral: 'option', optionName: "saveChangesSuccessHandler"): Function|string; @@ -90359,6 +105446,7 @@ interface JQuery { /** * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property succeeds. The function will be called with arguments representing the data returned by the server. * + * * @optionValue New value to be set. */ @@ -90366,6 +105454,7 @@ interface JQuery { /** * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property fails. The function will be called with arguments representing the data returned by the server. + * */ igTreeGridUpdating(optionLiteral: 'option', optionName: "saveChangesErrorHandler"): Function|string; @@ -90373,6 +105462,7 @@ interface JQuery { /** * Sets a custom function to be called when the AJAX request to the URL specified by the [updateUrl](ui.iggrid#options:updateUrl) property fails. The function will be called with arguments representing the data returned by the server. * + * * @optionValue New value to be set. */ @@ -90380,6 +105470,7 @@ interface JQuery { /** * On touch-enabled devices specifies the swipe distance for the delete button to appear. + * */ igTreeGridUpdating(optionLiteral: 'option', optionName: "swipeDistance"): string|number; @@ -90387,6 +105478,7 @@ interface JQuery { /** * On touch-enabled devices specifies the swipe distance for the delete button to appear. * + * * @optionValue New value to be set. */ @@ -90394,51 +105486,45 @@ interface JQuery { /** * Controls if navigation will wrap around the grid. The feature will never wrap around virtual grids. + * */ igTreeGridUpdating(optionLiteral: 'option', optionName: "wrapAround"): boolean; /** * Controls if navigation will wrap around the grid. The feature will never wrap around virtual grids. * + * * @optionValue New value to be set. */ igTreeGridUpdating(optionLiteral: 'option', optionName: "wrapAround", optionValue: boolean): void; /** * A list of options controlling the rendering behavior of the row edit dialog. If [editMode](ui.iggridupdating#options:editMode) is not 'dialog' these have no effect. + * */ igTreeGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogOptions"): IgGridUpdatingRowEditDialogOptions; /** * A list of options controlling the rendering behavior of the row edit dialog. If [editMode](ui.iggridupdating#options:editMode) is not 'dialog' these have no effect. * + * * @optionValue New value to be set. */ igTreeGridUpdating(optionLiteral: 'option', optionName: "rowEditDialogOptions", optionValue: IgGridUpdatingRowEditDialogOptions): void; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. For more information on how to utilize this property, please refer to the [Extending igGrid Modal Dialog](http://www.igniteui.com/help/extending-iggrid-modal-dialog) topic. + * */ igTreeGridUpdating(optionLiteral: 'option', optionName: "dialogWidget"): string; /** * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. For more information on how to utilize this property, please refer to the [Extending igGrid Modal Dialog](http://www.igniteui.com/help/extending-iggrid-modal-dialog) topic. * - * @optionValue New value to be set. - */ - igTreeGridUpdating(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; - - /** - * Enables/disables feature inheritance for the child layouts in igHierarchicalGrid. - */ - igTreeGridUpdating(optionLiteral: 'option', optionName: "inherit"): boolean; - - /** - * Enables/disables feature inheritance for the child layouts in igHierarchicalGrid. * * @optionValue New value to be set. */ - igTreeGridUpdating(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + igTreeGridUpdating(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; /** * Event fired before row editing begins. @@ -90717,171 +105803,205 @@ interface JQuery { interface IgUploadLocale { /** * Get or set label for the first shown browse button. When file is selected for the first time this button is hidden. + * */ labelUploadButton?: string; /** * Get or set label for browse button in main container. + * */ labelAddButton?: string; /** * Get or set label for summary Clear all button. It will be shown only in multiple upload mode. + * */ labelClearAllButton?: string; /** * Get or set template for showing summary template. {0} is count of uploaded files. {1} is total count of file to be uploaded. + * */ labelSummaryTemplate?: string; /** * Get or set template for showing uploading information in summary progress bar. It will be shown only in multiple upload mode. {0} uploaded filesize. {1} - total file size. + * */ labelSummaryProgressBarTemplate?: string; /** * Get or set label for show/hide details button when main container is hidden. + * */ labelShowDetails?: string; /** * Get or set label for show/hide details button when main container is shown. + * */ labelHideDetails?: string; /** * Get or set label for button cancelling all files. Shown only in multiple upload mode. + * */ labelSummaryProgressButtonCancel?: string; /** * Get or set label for start upload batch files. Shown only in multiple upload mode and autostartupload is false. + * */ labelSummaryProgressButtonContinue?: string; /** * Get or set label when upload is finished. Shown only in multiple upload mode. + * */ labelSummaryProgressButtonDone?: string; /** * Get or set filename when it could not be shown the whole file name and should be shorten. + * */ labelProgressBarFileNameContinue?: string; /** * Get or set message shown when max file size of the uploaded file exceeds the limit. + * */ errorMessageFileSizeExceeded?: string; /** * Get or set error message when ajax call to get file status throws error. + * */ errorMessageGetFileStatus?: string; /** * Get or set error message when ajax call to send cancel upload command. + * */ errorMessageCancelUpload?: string; /** * Get or set error message when file is not found. + * */ errorMessageNoSuchFile?: string; /** * Get or set error message different from the other messages. + * */ errorMessageOther?: string; /** * Get or set error message when file extension validation failed. + * */ errorMessageValidatingFileExtension?: string; /** * Get or set error message when AJAX Request to get file size throws error. + * */ errorMessageAJAXRequestFileSize?: string; /** * Get or set error message when maximum allowed files exceeded. + * */ errorMessageMaxUploadedFiles?: string; /** * Get or set error message when maximum simultaneous files is less or equal to 0. + * */ errorMessageMaxSimultaneousFiles?: string; /** * Get or set error message when trying to remove non existing file. + * */ errorMessageTryToRemoveNonExistingFile?: string; /** * Get or set error message when trying to start non existing file. + * */ errorMessageTryToStartNonExistingFile?: string; /** * Get or set error message when trying to drop more than 1 file and mode is single. + * */ errorMessageDropMultipleFilesWhenSingleModel?: string; /** * Get or set title for the first shown browse button. When file is selected for the first time this button is hidden. + * */ titleUploadFileButtonInit?: string; /** * Get or set title for browse button in main container. + * */ titleAddFileButton?: string; /** * Get or set title for the cancel upload button. + * */ titleCancelUploadButton?: string; /** * Get or set title for start upload batch files. Shown only in multiple upload mode and autostartupload is false. + * */ titleSummaryProgressButtonContinue?: string; /** * Get or set title for summary Clear all button. It will be shown only in multiple upload mode. + * */ titleClearUploaded?: string; /** * Get or set title for show details button. + * */ titleShowDetailsButton?: string; /** * Get or set title for hide details button. + * */ titleHideDetailsButton?: string; /** * Get or set title for button cancelling all files. Shown only in multiple upload mode. + * */ titleSummaryProgressButtonCancel?: string; /** * Get or set title when upload is finished. Shown only in multiple upload mode. + * */ titleSummaryProgressButtonDone?: string; /** * Get or set title for Continue button. + * */ titleSingleUploadButtonContinue?: string; /** * Get or set title for summary Clear all button. It will be shown only in multiple upload mode. + * */ titleClearAllButton?: string; @@ -91181,16 +106301,19 @@ interface OnFormDataSubmitEventUIParam { interface IgUpload { /** * Get or set width of the main container of the file upload control. Main container contains all buttons, progressbar, etc. + * */ width?: number|string; /** * Get or set height of the main container of the file upload control. Main container contains all buttons, progressbar, etc. + * */ height?: number|string; /** * Get or set whether the file start upload automatically when it is selected. Default is false. + * */ autostartupload?: boolean; @@ -91358,66 +106481,79 @@ interface IgUpload { /** * Get or set URL for uploading. + * */ uploadUrl?: string; /** * Get or set URL of HTTPHandler to get information about file upload, current size and also to get commands + * */ progressUrl?: string; /** * Get or set file allowed file extensions. When this array is empty - it is not made such validation. Example ["gif", "jpg", "bmp"]. + * */ allowedExtensions?: any[]; /** * Get or set whether to show File Extension icon + * */ showFileExtensionIcon?: boolean; /** * Get or set control specific CSS options. For example you can override specific control classes with custom ones. + * */ css?: any; /** * Set icon css classes for specified file extension + * */ fileExtensionIcons?: IgUploadFileExtensionIcons; /** * Get or set multiple or single file upload. In single upload it is possible to upload only one file at the same time. + * */ mode?: any; /** * Get or set a bool setting that allows user to select(for upload) more than 1 file from the browse dialog at once. HTML 5+ - it is supported by Chrome, MOzilla FF, Safar, Opera latest versions and IE10+ + * */ multipleFiles?: boolean; /** * Get or set the maximum number of allowed files to upload. + * */ maxUploadedFiles?: number; /** * Get or set count of files that could be uploaded at the same time. + * */ maxSimultaneousFilesUploads?: number; /** * Get or set file size metrics how to be shown files size. + * */ fileSizeMetric?: any; /** * UniqueId of the control - should not be changed by developer. Set from server-side wrapper. + * */ controlId?: string; /** * The number of digits after the decimal point. + * */ fileSizeDecimalDisplay?: number; @@ -91426,6 +106562,24 @@ interface IgUpload { */ maxFileSize?: any; + /** + * Get or set whether to use only one request for sending data, when you are sending more than one file. + * + */ + useSingleRequest?: boolean; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Defines the name of the file upload selecting event. Fired when browse button is pressed. * Return false in order to cancel selecting file. @@ -91519,7 +106673,7 @@ interface IgUploadMethods { /** * Start uploading file as submitting form with the specified formNumber. * - * @param formNumber id of the upload form + * @param formNumber id of the upload form. If left undefined and useSingleRequest is true all pending files will be uploaded. */ startUpload(formNumber: number): void; @@ -91530,6 +106684,11 @@ interface IgUploadMethods { * @param formNumber id of the form which should be cancelled */ cancelUpload(formNumber: number): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.igupload#options:language) + * Note that this method is for rare scenarios, use [language](ui.igupload#options:language) or [locale](ui.igupload#options:locale) option setter + */ changeLocale(): void; /** @@ -91553,6 +106712,16 @@ interface IgUploadMethods { * @param fileIndex unique identifier of the file */ getFileInfo(fileIndex: number): Object; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igUpload"): IgUploadMethods; @@ -91597,9 +106766,12 @@ interface JQuery { igUpload(methodName: "getFileInfoData"): Object; igUpload(methodName: "cancelAll"): void; igUpload(methodName: "getFileInfo", fileIndex: number): Object; + igUpload(methodName: "changeGlobalLanguage"): void; + igUpload(methodName: "changeGlobalRegional"): void; /** * Get or set width of the main container of the file upload control. Main container contains all buttons, progressbar, etc. + * */ igUpload(optionLiteral: 'option', optionName: "width"): number|string; @@ -91607,6 +106779,7 @@ interface JQuery { /** * Get or set width of the main container of the file upload control. Main container contains all buttons, progressbar, etc. * + * * @optionValue New value to be set. */ @@ -91614,6 +106787,7 @@ interface JQuery { /** * Get or set height of the main container of the file upload control. Main container contains all buttons, progressbar, etc. + * */ igUpload(optionLiteral: 'option', optionName: "height"): number|string; @@ -91621,6 +106795,7 @@ interface JQuery { /** * Get or set height of the main container of the file upload control. Main container contains all buttons, progressbar, etc. * + * * @optionValue New value to be set. */ @@ -91628,12 +106803,14 @@ interface JQuery { /** * Get or set whether the file start upload automatically when it is selected. Default is false. + * */ igUpload(optionLiteral: 'option', optionName: "autostartupload"): boolean; /** * Get or set whether the file start upload automatically when it is selected. Default is false. * + * * @optionValue New value to be set. */ igUpload(optionLiteral: 'option', optionName: "autostartupload", optionValue: boolean): void; @@ -92010,156 +107187,182 @@ interface JQuery { /** * Get or set URL for uploading. + * */ igUpload(optionLiteral: 'option', optionName: "uploadUrl"): string; /** * Get or set URL for uploading. * + * * @optionValue New value to be set. */ igUpload(optionLiteral: 'option', optionName: "uploadUrl", optionValue: string): void; /** * Get or set URL of HTTPHandler to get information about file upload, current size and also to get commands + * */ igUpload(optionLiteral: 'option', optionName: "progressUrl"): string; /** * Get or set URL of HTTPHandler to get information about file upload, current size and also to get commands * + * * @optionValue New value to be set. */ igUpload(optionLiteral: 'option', optionName: "progressUrl", optionValue: string): void; /** * Get or set file allowed file extensions. When this array is empty - it is not made such validation. Example ["gif", "jpg", "bmp"]. + * */ igUpload(optionLiteral: 'option', optionName: "allowedExtensions"): any[]; /** * Get or set file allowed file extensions. When this array is empty - it is not made such validation. Example ["gif", "jpg", "bmp"]. * + * * @optionValue New value to be set. */ igUpload(optionLiteral: 'option', optionName: "allowedExtensions", optionValue: any[]): void; /** * Get or set whether to show File Extension icon + * */ igUpload(optionLiteral: 'option', optionName: "showFileExtensionIcon"): boolean; /** * Get or set whether to show File Extension icon * + * * @optionValue New value to be set. */ igUpload(optionLiteral: 'option', optionName: "showFileExtensionIcon", optionValue: boolean): void; /** * Get or set control specific CSS options. For example you can override specific control classes with custom ones. + * */ igUpload(optionLiteral: 'option', optionName: "css"): any; /** * Get or set control specific CSS options. For example you can override specific control classes with custom ones. * + * * @optionValue New value to be set. */ igUpload(optionLiteral: 'option', optionName: "css", optionValue: any): void; /** * Set icon css classes for specified file extension + * */ igUpload(optionLiteral: 'option', optionName: "fileExtensionIcons"): IgUploadFileExtensionIcons; /** * Set icon css classes for specified file extension * + * * @optionValue New value to be set. */ igUpload(optionLiteral: 'option', optionName: "fileExtensionIcons", optionValue: IgUploadFileExtensionIcons): void; /** * Get or set multiple or single file upload. In single upload it is possible to upload only one file at the same time. + * */ igUpload(optionLiteral: 'option', optionName: "mode"): any; /** * Get or set multiple or single file upload. In single upload it is possible to upload only one file at the same time. * + * * @optionValue New value to be set. */ igUpload(optionLiteral: 'option', optionName: "mode", optionValue: any): void; /** * Get or set a bool setting that allows user to select(for upload) more than 1 file from the browse dialog at once. HTML 5+ - it is supported by Chrome, MOzilla FF, Safar, Opera latest versions and IE10+ + * */ igUpload(optionLiteral: 'option', optionName: "multipleFiles"): boolean; /** * Get or set a bool setting that allows user to select(for upload) more than 1 file from the browse dialog at once. HTML 5+ - it is supported by Chrome, MOzilla FF, Safar, Opera latest versions and IE10+ * + * * @optionValue New value to be set. */ igUpload(optionLiteral: 'option', optionName: "multipleFiles", optionValue: boolean): void; /** * Get or set the maximum number of allowed files to upload. + * */ igUpload(optionLiteral: 'option', optionName: "maxUploadedFiles"): number; /** * Get or set the maximum number of allowed files to upload. * + * * @optionValue New value to be set. */ igUpload(optionLiteral: 'option', optionName: "maxUploadedFiles", optionValue: number): void; /** * Get or set count of files that could be uploaded at the same time. + * */ igUpload(optionLiteral: 'option', optionName: "maxSimultaneousFilesUploads"): number; /** * Get or set count of files that could be uploaded at the same time. * + * * @optionValue New value to be set. */ igUpload(optionLiteral: 'option', optionName: "maxSimultaneousFilesUploads", optionValue: number): void; /** * Get or set file size metrics how to be shown files size. + * */ igUpload(optionLiteral: 'option', optionName: "fileSizeMetric"): any; /** * Get or set file size metrics how to be shown files size. * + * * @optionValue New value to be set. */ igUpload(optionLiteral: 'option', optionName: "fileSizeMetric", optionValue: any): void; /** * UniqueId of the control - should not be changed by developer. Set from server-side wrapper. + * */ igUpload(optionLiteral: 'option', optionName: "controlId"): string; /** * UniqueId of the control - should not be changed by developer. Set from server-side wrapper. * + * * @optionValue New value to be set. */ igUpload(optionLiteral: 'option', optionName: "controlId", optionValue: string): void; /** * The number of digits after the decimal point. + * */ igUpload(optionLiteral: 'option', optionName: "fileSizeDecimalDisplay"): number; /** * The number of digits after the decimal point. * + * * @optionValue New value to be set. */ igUpload(optionLiteral: 'option', optionName: "fileSizeDecimalDisplay", optionValue: number): void; @@ -92176,6 +107379,50 @@ interface JQuery { */ igUpload(optionLiteral: 'option', optionName: "maxFileSize", optionValue: any): void; + /** + * Get or set whether to use only one request for sending data, when you are sending more than one file. + * + */ + igUpload(optionLiteral: 'option', optionName: "useSingleRequest"): boolean; + + /** + * Get or set whether to use only one request for sending data, when you are sending more than one file. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "useSingleRequest", optionValue: boolean): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igUpload(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igUpload(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igUpload(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igUpload(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Defines the name of the file upload selecting event. Fired when browse button is pressed. * Return false in order to cancel selecting file. @@ -92311,6 +107558,7 @@ interface IgValidatorField { /** * Gets the target element (input or control target) to be validated. This field setting is required. * + * * Valid values: * "string" A valid jQuery selector for the element * "object" A reference to a jQuery object @@ -92749,23 +107997,27 @@ interface IgValidator { * Gets/Sets whether validation is triggered when the text in editor changes. * Note that this is more appropriate for selection controls such as checkbox, combo or rating. * As it can cause excessive messages with text-based fields, the initial validation can be delayed via the [threshold](ui.igvalidator#options:threshold) option. + * */ onchange?: boolean; /** * Gets/Sets whether validation is triggered when the editor loses focus. + * */ onblur?: boolean; /** * Gets/Sets whether validation is triggered when a form containing validation targets is submitting. If any of the validations fail, the submit action will be prevented. * Note that this doesn't apply to the native JavaScript submit function, but will handle the jQuery equivalent and the browser default action. + * */ onsubmit?: boolean; /** * Gets/Sets option to validate if a value was entered (not empty text, selected item, etc.) * + * * Valid values: * "boolean" A boolean value indicating if the field is required. * "object" A configuration object with optional error message (e.g. required: { errorMessage: "Error!"} ) @@ -92775,6 +108027,7 @@ interface IgValidator { /** * Gets/Sets number validation rule options.Default separators for decimals and thousands are '.' and ',' respectively and are defined in the "$.ui.igValidator.defaults" object. * + * * Valid values: * "boolean" A boolean value indicating if the field should be a number. Default separators are used. * "object" A configuration object with errorMessage, decimalSeparator and thousandsSeparator. Those properties are all optional. @@ -92784,6 +108037,7 @@ interface IgValidator { /** * Gets/Sets date validation rule options. This can additionally help guide the [valueRange](ui.igvalidator#options:valueRange) validation.Note: Dependant on JavaScript Date parsing which will accept a wide range of values. * + * * Valid values: * "boolean" A boolean value indicating if the field should be a valid JavaScript Date or can be parsed as one. * "object" A configuration object with optional error message (e.g. date: { errorMessage: "Enter a valid number"} ) @@ -92793,6 +108047,7 @@ interface IgValidator { /** * Gets/Sets email validation rule options. Uses a RegExp defined in the "$.ui.igValidator.defaults" object. * + * * Valid values: * "boolean" A boolean value indicating if the field should be an email. * "object" A configuration object with optional error message (e.g. email: { errorMessage: "Enter a valid email"} ) @@ -92802,6 +108057,7 @@ interface IgValidator { /** * Gets/Sets a minimum and/or maximum length of text or number of selected items. Null or 0 values are ignored. * + * * Valid values: * "array" An array of two numbers, where the first value is the minimum and the second is the maximum. (e.g. lengthRange: [ 1, 10] ) * "object" A configuration object with optional error message. Message strings can contain format items for min and max respectively (e.g. lengthRange: { min: 6, max: 20, errorMessage: "Password must be at least {0} long and no more than {1}." } ) @@ -92811,6 +108067,7 @@ interface IgValidator { /** * Gets/Sets a minimum and/or maximum value. Null values are ignored. * + * * Valid values: * "array" An array of two numbers or dates, where the first is the minimum and the second is the maximum. (e.g. valueRange: [ 1, 10] ) * "object" A configuration object with optional error message. Message strings can contain format items for min and max respectively (e.g. lengthRange: { min: 6, max: 20, errorMessage: "Value must be between {0} and {1}." } ) @@ -92820,6 +108077,7 @@ interface IgValidator { /** * Gets/Sets Credit Card number validation rule options.Note: This rule will only validate the checksum of the number using Luhn algorithm irregardless of card type. * + * * Valid values: * "boolean" A boolean value indicating if the field should be a valid Credit Card number. * "object" A configuration object with optional error message (e.g. creditCard: { errorMessage: "Enter a valid card number"} ) @@ -92829,6 +108087,7 @@ interface IgValidator { /** * Gets/Sets regular expression validation rule options. * + * * Valid values: * "string" A string containing regular expression. * "object" A RegExp object or an object with expression and errorMessage properties. @@ -92838,33 +108097,39 @@ interface IgValidator { /** * Gets/Sets if all rules for a field should be checked, so even if one fails the rest will continue executing. * Note: This will not force checks on an empty field for rules that don't normally execute without a value. + * */ executeAllRules?: boolean; /** * Gets/Sets a custom jQuery element to be used for validation messages. That inner HTML of the target is modified, can be a SPAN, LABEL or DIV. + * */ messageTarget?: Element; /** * Gets/Sets text for an error message to be used if none is set for the particular rule. Overrides default rule-specific error messages. + * */ errorMessage?: string; /** * Gets/Sets text for a success message. Note that since there is no default, setting this message will enable showing success indication. + * */ successMessage?: string; /** * Gets/Sets validation minimum input length. Validation won't be triggered for input before that value is reached on change and focus loss. * Note: This will not affect required fields on form submit. + * */ threshold?: number; /** * Gets/Sets a requirement for the value in this field to be the same as another input element or editor control. * + * * Valid values: * "string" A valid jQuery selector for the target element * "object" A reference to the jQuery object for the target or an object with selector property and custom errorMessage. @@ -92874,6 +108139,7 @@ interface IgValidator { /** * Gets/Sets a custom function to perform validation. Use 'this' to reference the calling validator and the value and optional field settings arguments to determine and return the state of the field. * + * * Valid values: * "function" The function to call * "string" Function name, must be in global namespace (window["name"]) @@ -92884,26 +108150,48 @@ interface IgValidator { /** * Gets a list of target field items describing each with validation options and a required selector. Fields can contain any of the validation rules and triggers but not other fields or event handlers. * Applicable options are also inherited from the global control configuration if not set. + * */ fields?: IgValidatorField[]; /** * Gets/Sets the options for the [igNotifier](ui.ignotifier#options) used to show error messages. + * */ notificationOptions?: any; /** * Gets/Sets the option to show an asterisks indication next to required fields. * Note: Indicators are not supported on grouped controls such as checkbox or radio button sets and the igRating control. + * */ requiredIndication?: boolean; /** * Gets/Sets the option to show a label indication next to optional fields. * Note: Indicators are not supported on grouped controls such as checkbox or radio button sets and the igRating control. + * */ optionalIndication?: boolean; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event which is raised on validation before default validation logic is applied. * Return false in order to cancel the event and consider the field valid. @@ -93097,6 +108385,24 @@ interface IgValidatorMethods { * Destroys the validator widget. */ destroy(): void; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igValidator"): IgValidatorMethods; @@ -93111,11 +108417,15 @@ class IgValidatorBaseRule { /** * Gets the error message type to get from locale settings (matching as "Message>"). Returns the rule name by default. * Only used when there's no errorMessage option available through getRuleMessage. + * + * @param options */ getMessageType(options: Object): string; /** * Gets an errorMessage from either the rule or field/global options. + * + * @param options */ getRuleMessage(options: Object): string; @@ -93162,6 +108472,8 @@ class IgValidatorRequiredRule { /** * Gets an errorMessage from either the rule or field/global options. + * + * @param options */ getRuleMessage(options: Object): string; @@ -93186,6 +108498,8 @@ class IgValidatorControlRule { /** * Returns an error message for the rule from options + * + * @param options */ getRuleMessage(options: Object): void; shouldRun(options: Object, value: Object): void; @@ -93213,11 +108527,15 @@ class IgValidatorNumberRule { /** * Gets the error message type to get from locale settings (matching as "Message>"). Returns the rule name by default. * Only used when there's no errorMessage option available through getRuleMessage. + * + * @param options */ getMessageType(options: Object): string; /** * Gets an errorMessage from either the rule or field/global options. + * + * @param options */ getRuleMessage(options: Object): string; @@ -93251,11 +108569,15 @@ class IgValidatorDateRule { /** * Gets the error message type to get from locale settings (matching as "Message>"). Returns the rule name by default. * Only used when there's no errorMessage option available through getRuleMessage. + * + * @param options */ getMessageType(options: Object): string; /** * Gets an errorMessage from either the rule or field/global options. + * + * @param options */ getRuleMessage(options: Object): string; @@ -93289,6 +108611,8 @@ class IgValidatorLengthRule { /** * Gets an errorMessage from either the rule or field/global options. + * + * @param options */ getRuleMessage(options: Object): string; @@ -93335,11 +108659,15 @@ class IgValidatorEqualToRule { /** * Gets the error message type to get from locale settings (matching as "Message>"). Returns the rule name by default. * Only used when there's no errorMessage option available through getRuleMessage. + * + * @param options */ getMessageType(options: Object): string; /** * Gets an errorMessage from either the rule or field/global options. + * + * @param options */ getRuleMessage(options: Object): string; @@ -93373,11 +108701,15 @@ class IgValidatorEmailRule { /** * Gets the error message type to get from locale settings (matching as "Message>"). Returns the rule name by default. * Only used when there's no errorMessage option available through getRuleMessage. + * + * @param options */ getMessageType(options: Object): string; /** * Gets an errorMessage from either the rule or field/global options. + * + * @param options */ getRuleMessage(options: Object): string; @@ -93411,11 +108743,15 @@ class IgValidatorPatternRule { /** * Gets the error message type to get from locale settings (matching as "Message>"). Returns the rule name by default. * Only used when there's no errorMessage option available through getRuleMessage. + * + * @param options */ getMessageType(options: Object): string; /** * Gets an errorMessage from either the rule or field/global options. + * + * @param options */ getRuleMessage(options: Object): string; @@ -93450,6 +108786,8 @@ class IgValidatorCustomRule { /** * Gets an errorMessage from either the rule or field/global options. + * + * @param options */ getRuleMessage(options: Object): string; @@ -93475,17 +108813,24 @@ class IgValidatorCreditCardRule { * Based on ASP.NET CreditCardAttribute check, * https://github.com/Microsoft/referencesource/blob/master/System.ComponentModel.DataAnnotations/DataAnnotations/CreditCardAttribute.cs * using Luhn algorithm https://en.wikipedia.org/wiki/Luhn_algorithm + * + * @param options + * @param value */ isValid(options: Object, value: Object): void; /** * Gets the error message type to get from locale settings (matching as "Message>"). Returns the rule name by default. * Only used when there's no errorMessage option available through getRuleMessage. + * + * @param options */ getMessageType(options: Object): string; /** * Gets an errorMessage from either the rule or field/global options. + * + * @param options */ getRuleMessage(options: Object): string; @@ -93520,11 +108865,15 @@ interface JQuery { igValidator(methodName: "removeField", field: Object): void; igValidator(methodName: "updateField", field: Object, fieldOptions?: Object): void; igValidator(methodName: "destroy"): void; + igValidator(methodName: "changeLocale", $container: Object): void; + igValidator(methodName: "changeGlobalLanguage"): void; + igValidator(methodName: "changeGlobalRegional"): void; /** * Gets/Sets whether validation is triggered when the text in editor changes. * Note that this is more appropriate for selection controls such as checkbox, combo or rating. * As it can cause excessive messages with text-based fields, the initial validation can be delayed via the [threshold](ui.igvalidator#options:threshold) option. + * */ igValidator(optionLiteral: 'option', optionName: "onchange"): boolean; @@ -93533,18 +108882,21 @@ interface JQuery { * Note that this is more appropriate for selection controls such as checkbox, combo or rating. * As it can cause excessive messages with text-based fields, the initial validation can be delayed via the [threshold](ui.igvalidator#options:threshold) option. * + * * @optionValue New value to be set. */ igValidator(optionLiteral: 'option', optionName: "onchange", optionValue: boolean): void; /** * Gets/Sets whether validation is triggered when the editor loses focus. + * */ igValidator(optionLiteral: 'option', optionName: "onblur"): boolean; /** * /Sets whether validation is triggered when the editor loses focus. * + * * @optionValue New value to be set. */ igValidator(optionLiteral: 'option', optionName: "onblur", optionValue: boolean): void; @@ -93552,6 +108904,7 @@ interface JQuery { /** * Gets/Sets whether validation is triggered when a form containing validation targets is submitting. If any of the validations fail, the submit action will be prevented. * Note that this doesn't apply to the native JavaScript submit function, but will handle the jQuery equivalent and the browser default action. + * */ igValidator(optionLiteral: 'option', optionName: "onsubmit"): boolean; @@ -93559,12 +108912,14 @@ interface JQuery { * /Sets whether validation is triggered when a form containing validation targets is submitting. If any of the validations fail, the submit action will be prevented. * Note that this doesn't apply to the native JavaScript submit function, but will handle the jQuery equivalent and the browser default action. * + * * @optionValue New value to be set. */ igValidator(optionLiteral: 'option', optionName: "onsubmit", optionValue: boolean): void; /** * Gets/Sets option to validate if a value was entered (not empty text, selected item, etc.) + * */ igValidator(optionLiteral: 'option', optionName: "required"): boolean|Object; @@ -93572,6 +108927,7 @@ interface JQuery { /** * /Sets option to validate if a value was entered (not empty text, selected item, etc.) * + * * @optionValue New value to be set. */ @@ -93579,6 +108935,7 @@ interface JQuery { /** * Gets/Sets number validation rule options.Default separators for decimals and thousands are '.' and ',' respectively and are defined in the "$.ui.igValidator.defaults" object. + * */ igValidator(optionLiteral: 'option', optionName: "number"): boolean|Object; @@ -93586,6 +108943,7 @@ interface JQuery { /** * /Sets number validation rule options.Default separators for decimals and thousands are '.' and ',' respectively and are defined in the "$.ui.igValidator.defaults" object. * + * * @optionValue New value to be set. */ @@ -93593,6 +108951,7 @@ interface JQuery { /** * Gets/Sets date validation rule options. This can additionally help guide the [valueRange](ui.igvalidator#options:valueRange) validation.Note: Dependant on JavaScript Date parsing which will accept a wide range of values. + * */ igValidator(optionLiteral: 'option', optionName: "date"): boolean|Object; @@ -93600,6 +108959,7 @@ interface JQuery { /** * /Sets date validation rule options. This can additionally help guide the [valueRange](ui.igvalidator#options:valueRange) validation.Note: Dependant on JavaScript Date parsing which will accept a wide range of values. * + * * @optionValue New value to be set. */ @@ -93607,6 +108967,7 @@ interface JQuery { /** * Gets/Sets email validation rule options. Uses a RegExp defined in the "$.ui.igValidator.defaults" object. + * */ igValidator(optionLiteral: 'option', optionName: "email"): boolean|Object; @@ -93614,6 +108975,7 @@ interface JQuery { /** * /Sets email validation rule options. Uses a RegExp defined in the "$.ui.igValidator.defaults" object. * + * * @optionValue New value to be set. */ @@ -93621,6 +108983,7 @@ interface JQuery { /** * Gets/Sets a minimum and/or maximum length of text or number of selected items. Null or 0 values are ignored. + * */ igValidator(optionLiteral: 'option', optionName: "lengthRange"): Array|Object; @@ -93628,6 +108991,7 @@ interface JQuery { /** * /Sets a minimum and/or maximum length of text or number of selected items. Null or 0 values are ignored. * + * * @optionValue New value to be set. */ @@ -93635,6 +108999,7 @@ interface JQuery { /** * Gets/Sets a minimum and/or maximum value. Null values are ignored. + * */ igValidator(optionLiteral: 'option', optionName: "valueRange"): Array|Object; @@ -93642,6 +109007,7 @@ interface JQuery { /** * /Sets a minimum and/or maximum value. Null values are ignored. * + * * @optionValue New value to be set. */ @@ -93649,6 +109015,7 @@ interface JQuery { /** * Gets/Sets Credit Card number validation rule options.Note: This rule will only validate the checksum of the number using Luhn algorithm irregardless of card type. + * */ igValidator(optionLiteral: 'option', optionName: "creditCard"): boolean|Object; @@ -93656,6 +109023,7 @@ interface JQuery { /** * /Sets Credit Card number validation rule options.Note: This rule will only validate the checksum of the number using Luhn algorithm irregardless of card type. * + * * @optionValue New value to be set. */ @@ -93663,6 +109031,7 @@ interface JQuery { /** * Gets/Sets regular expression validation rule options. + * */ igValidator(optionLiteral: 'option', optionName: "pattern"): string|Object; @@ -93670,6 +109039,7 @@ interface JQuery { /** * /Sets regular expression validation rule options. * + * * @optionValue New value to be set. */ @@ -93678,6 +109048,7 @@ interface JQuery { /** * Gets/Sets if all rules for a field should be checked, so even if one fails the rest will continue executing. * Note: This will not force checks on an empty field for rules that don't normally execute without a value. + * */ igValidator(optionLiteral: 'option', optionName: "executeAllRules"): boolean; @@ -93685,42 +109056,49 @@ interface JQuery { * /Sets if all rules for a field should be checked, so even if one fails the rest will continue executing. * Note: This will not force checks on an empty field for rules that don't normally execute without a value. * + * * @optionValue New value to be set. */ igValidator(optionLiteral: 'option', optionName: "executeAllRules", optionValue: boolean): void; /** * Gets/Sets a custom jQuery element to be used for validation messages. That inner HTML of the target is modified, can be a SPAN, LABEL or DIV. + * */ igValidator(optionLiteral: 'option', optionName: "messageTarget"): Element; /** * /Sets a custom jQuery element to be used for validation messages. That inner HTML of the target is modified, can be a SPAN, LABEL or DIV. * + * * @optionValue New value to be set. */ igValidator(optionLiteral: 'option', optionName: "messageTarget", optionValue: Element): void; /** * Gets/Sets text for an error message to be used if none is set for the particular rule. Overrides default rule-specific error messages. + * */ igValidator(optionLiteral: 'option', optionName: "errorMessage"): string; /** * /Sets text for an error message to be used if none is set for the particular rule. Overrides default rule-specific error messages. * + * * @optionValue New value to be set. */ igValidator(optionLiteral: 'option', optionName: "errorMessage", optionValue: string): void; /** * Gets/Sets text for a success message. Note that since there is no default, setting this message will enable showing success indication. + * */ igValidator(optionLiteral: 'option', optionName: "successMessage"): string; /** * /Sets text for a success message. Note that since there is no default, setting this message will enable showing success indication. * + * * @optionValue New value to be set. */ igValidator(optionLiteral: 'option', optionName: "successMessage", optionValue: string): void; @@ -93728,6 +109106,7 @@ interface JQuery { /** * Gets/Sets validation minimum input length. Validation won't be triggered for input before that value is reached on change and focus loss. * Note: This will not affect required fields on form submit. + * */ igValidator(optionLiteral: 'option', optionName: "threshold"): number; @@ -93735,12 +109114,14 @@ interface JQuery { * /Sets validation minimum input length. Validation won't be triggered for input before that value is reached on change and focus loss. * Note: This will not affect required fields on form submit. * + * * @optionValue New value to be set. */ igValidator(optionLiteral: 'option', optionName: "threshold", optionValue: number): void; /** * Gets/Sets a requirement for the value in this field to be the same as another input element or editor control. + * */ igValidator(optionLiteral: 'option', optionName: "equalTo"): string|Object; @@ -93748,6 +109129,7 @@ interface JQuery { /** * /Sets a requirement for the value in this field to be the same as another input element or editor control. * + * * @optionValue New value to be set. */ @@ -93755,6 +109137,7 @@ interface JQuery { /** * Gets/Sets a custom function to perform validation. Use 'this' to reference the calling validator and the value and optional field settings arguments to determine and return the state of the field. + * */ igValidator(optionLiteral: 'option', optionName: "custom"): Function|string|Object; @@ -93762,6 +109145,7 @@ interface JQuery { /** * /Sets a custom function to perform validation. Use 'this' to reference the calling validator and the value and optional field settings arguments to determine and return the state of the field. * + * * @optionValue New value to be set. */ @@ -93770,6 +109154,7 @@ interface JQuery { /** * Gets a list of target field items describing each with validation options and a required selector. Fields can contain any of the validation rules and triggers but not other fields or event handlers. * Applicable options are also inherited from the global control configuration if not set. + * */ igValidator(optionLiteral: 'option', optionName: "fields"): IgValidatorField[]; @@ -93777,18 +109162,21 @@ interface JQuery { * A list of target field items describing each with validation options and a required selector. Fields can contain any of the validation rules and triggers but not other fields or event handlers. * Applicable options are also inherited from the global control configuration if not set. * + * * @optionValue New value to be set. */ igValidator(optionLiteral: 'option', optionName: "fields", optionValue: IgValidatorField[]): void; /** * Gets/Sets the options for the [igNotifier](ui.ignotifier#options) used to show error messages. + * */ igValidator(optionLiteral: 'option', optionName: "notificationOptions"): any; /** * /Sets the options for the [igNotifier](ui.ignotifier#options) used to show error messages. * + * * @optionValue New value to be set. */ igValidator(optionLiteral: 'option', optionName: "notificationOptions", optionValue: any): void; @@ -93796,6 +109184,7 @@ interface JQuery { /** * Gets/Sets the option to show an asterisks indication next to required fields. * Note: Indicators are not supported on grouped controls such as checkbox or radio button and the igRating control. + * */ igValidator(optionLiteral: 'option', optionName: "requiredIndication"): boolean; @@ -93803,6 +109192,7 @@ interface JQuery { * /Sets the option to show an asterisks indication next to required fields. * Note: Indicators are not supported on grouped controls such as checkbox or radio button sets and the igRating control. * + * * @optionValue New value to be set. */ igValidator(optionLiteral: 'option', optionName: "requiredIndication", optionValue: boolean): void; @@ -93810,6 +109200,7 @@ interface JQuery { /** * Gets/Sets the option to show a label indication next to optional fields. * Note: Indicators are not supported on grouped controls such as checkbox or radio button and the igRating control. + * */ igValidator(optionLiteral: 'option', optionName: "optionalIndication"): boolean; @@ -93817,10 +109208,55 @@ interface JQuery { * /Sets the option to show a label indication next to optional fields. * Note: Indicators are not supported on grouped controls such as checkbox or radio button sets and the igRating control. * + * * @optionValue New value to be set. */ igValidator(optionLiteral: 'option', optionName: "optionalIndication", optionValue: boolean): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igValidator(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igValidator(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igValidator(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igValidator(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igValidator(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event which is raised on validation before default validation logic is applied. * Return false in order to cancel the event and consider the field valid. @@ -94093,16 +109529,19 @@ interface JQuery { interface IgVideoPlayerBookmark { /** * Gets/Sets where the bookmark will be positioned. Should be between 0 and movie duration in seconds. + * */ time?: number; /** * Gets/Sets bookmark title. It is shown as tooltip on hover. + * */ title?: string; /** * Gets/Sets whether the bookmark is disabled or not. + * */ disabled?: boolean; @@ -94115,36 +109554,43 @@ interface IgVideoPlayerBookmark { interface IgVideoPlayerRelatedVideo { /** * Gets/Sets the URL of the related video image. + * */ imageUrl?: string; /** * Gets/Sets the title of the video. + * */ title?: string; /** * Gets/Sets the width of the related video image. + * */ width?: number; /** * Gets/Sets the height of the related video image. + * */ height?: number; /** * Gets/Sets a link to a page that will play the related video. It will be opened in a new window. If there are sources also, the link property has a priority. + * */ link?: string; /** * Gets/Sets the sources of the related video. + * */ sources?: any[]; /** * Gets/Sets custom CSS class to be applied on the related video element. + * */ css?: string; @@ -94157,61 +109603,73 @@ interface IgVideoPlayerRelatedVideo { interface IgVideoPlayerBanner { /** * Gets/Sets the banner image url. + * */ imageUrl?: string; /** * Gets/Sets an array of numbers. Each number specifies on which second in the movie the banner will pop. + * */ times?: any[]; /** * Gets/Sets whether the user will be able to close the banner or not. + * */ closeBanner?: boolean; /** * Gets/Sets whether to apply animation effects when showing or hiding the banner. If set to true, the animation is played for banner.duration in milliseconds. + * */ animate?: boolean; /** * Gets/Sets whether the banner is visible or not. + * */ visible?: boolean; /** * Gets/Sets the banner animation duration. + * */ duration?: number; /** * Gets/Sets whether to automatically hide the banner. If set to true, the banner is hidden after [hidedelay](ui.igvideoplayer#options:banners.hidedelay) in milliseconds. + * */ autohide?: boolean; /** * Gets/Sets the banner autohide delay in milliseconds. It is taken into account only if the banner.autohide option is set to true. + * */ hidedelay?: number; /** * Gets/Sets the banner link that will open in new window. + * */ link?: string; /** * Gets/Sets the banner width + * */ width?: number|string; /** * Gets/Sets the banner height + * */ height?: number|string; /** * Gets/Sets the banner specific css class, that will be applied on the banner grid. + * */ css?: string; @@ -94224,21 +109682,25 @@ interface IgVideoPlayerBanner { interface IgVideoPlayerCommercialsLinkedCommercial { /** * Gets/Sets the sources of the linked commercial video. + * */ sources?: any[]; /** * Gets/Sets the second in the video at which the linked commercial should play. + * */ startTime?: number; /** * Gets/Sets the link to open on linked commercial click. + * */ link?: string; /** * Gets/Sets the tooltip for the linked commercial bookmark. + * */ title?: string; @@ -94251,21 +109713,25 @@ interface IgVideoPlayerCommercialsLinkedCommercial { interface IgVideoPlayerCommercialsEmbeddedCommercial { /** * Gets/Sets the start second of the embedded commercial. + * */ startTime?: number; /** * Gets/Sets the end second of the embedded commercial. + * */ endTime?: number; /** * Gets/Sets the sponsored link of the embedded commercial. + * */ link?: string; /** * Gets/Sets the tooltip for the bookmark of the embedded commercial. + * */ title?: string; @@ -94278,21 +109744,25 @@ interface IgVideoPlayerCommercialsEmbeddedCommercial { interface IgVideoPlayerCommercialsAdMessage { /** * Gets/Sets whether to apply an animation effect when showing or hiding the ad message. If set to true, the animation is played for [animationDuration](ui.igvideoplayer#options:commercials.adMessage.animationDuration) in milliseconds. + * */ animate?: boolean; /** * Gets/Sets the ad message auto hide of the commercial. + * */ autoHide?: boolean; /** * Gets/Sets the ad message hide delay. + * */ hideDelay?: number; /** * Gets/Sets the ad message animation duration of the commercial. + * */ animationDuration?: number; @@ -94305,26 +109775,31 @@ interface IgVideoPlayerCommercialsAdMessage { interface IgVideoPlayerCommercials { /** * Gets/Sets an array of linked commercial objects. A linked commercial is a separate video file that will be played in the specified position of the original movie clip by [startTime](ui.igvideoplayer#options:commercials.linkedCommercials.startTime). This feature is useful if you have frequently changing outside commercial sources. + * */ linkedCommercials?: IgVideoPlayerCommercialsLinkedCommercial[]; /** * Gets/Sets an array of embedded commercials objects. An embedded commercial is an ad that is contained in the original video file. It is suitable when you want to mark some sections of the video as commercials. + * */ embeddedCommercials?: IgVideoPlayerCommercialsEmbeddedCommercial[]; /** * Gets/Sets whether the commercials will play againg during the repetitive video plays. + * */ alwaysPlayCommercials?: boolean; /** * Gets/Sets whether to show commercial locations or not. + * */ showBookmarks?: boolean; /** * Customizes the ad message settings of the commercial. Ad message shows the duration of the commercial and pops up when the commercial starts playing. + * */ adMessage?: IgVideoPlayerCommercialsAdMessage; @@ -94337,96 +109812,115 @@ interface IgVideoPlayerCommercials { interface IgVideoPlayerLocale { /** * Gets/Sets live stream video title. + * */ liveStream?: boolean; /** * Gets/Sets live video title. + * */ live?: boolean; /** * Gets/Sets paused button title. + * */ paused?: boolean; /** * Gets/Sets playing button title. + * */ playing?: boolean; /** * Gets/Sets play button title. + * */ play?: boolean; /** * Gets/Sets volume button title. + * */ volume?: boolean; /** * Gets/Sets progress label long format. + * */ progressLabelLongFormat?: boolean; /** * Gets/Sets progress label short format. + * */ progressLabelShortFormat?: boolean; /** * Gets/Sets enter fullscreen button title. + * */ enterFullscreen?: boolean; /** * Gets/Sets exit fullscreen button title. + * */ exitFullscreen?: boolean; /** * Gets/Sets skip to button title. + * */ skipTo?: boolean; /** * Gets/Sets buffering label text. + * */ buffering?: boolean; /** * Gets/Sets ad message text. + * */ adMessage?: boolean; /** * Gets/Sets long ad message text. + * */ adMessageLong?: boolean; /** * Gets/Sets ad message text when no duration is specified. + * */ adMessageNoDuration?: boolean; /** * Gets/Sets new ad window title. + * */ adNewWindowTip?: boolean; /** * Gets/Sets related videos text. + * */ relatedVideos?: boolean; /** * Gets/Sets replay button text. + * */ replayButton?: boolean; /** * Gets/Sets replay button tooltip. + * */ replayTooltip?: boolean; @@ -94442,14 +109936,14 @@ interface EndedEvent { interface EndedEventUIParam { /** - * Used to get the url of the playing video. + * Get the video duration in seconds. */ - source?: any; + duration?: number; /** - * Used to get the video duration in seconds. + * Get the url of the playing video. */ - duration?: any; + source?: string; } interface PlayingEvent { @@ -94458,14 +109952,19 @@ interface PlayingEvent { interface PlayingEventUIParam { /** - * Used to get the url of the playing video. + * Get the current time in the video at which the event was fired. */ - source?: any; + currentTime?: number; /** - * Used to get the video duration in seconds. + * Get the video duration in seconds. */ - duration?: any; + duration?: number; + + /** + * Get the url of the playing video. + */ + source?: string; } interface PausedEvent { @@ -94474,14 +109973,19 @@ interface PausedEvent { interface PausedEventUIParam { /** - * Used to get the url of the playing video. + * Get the current time in the video at which the event was fired. */ - source?: any; + currentTime?: number; /** - * Used to get the video duration in seconds. + * Get the video duration in seconds. */ - duration?: any; + duration?: number; + + /** + * Get the url of the playing video. + */ + source?: string; } interface BufferingEvent { @@ -94490,14 +109994,14 @@ interface BufferingEvent { interface BufferingEventUIParam { /** - * Used to get the url of the playing video. + * Get buffered percentage. */ - source?: any; + buffered?: number; /** - * Used to get buffered percentage. + * Get the url of the playing video. */ - buffered?: any; + source?: string; } interface ProgressEvent { @@ -94506,19 +110010,19 @@ interface ProgressEvent { interface ProgressEventUIParam { /** - * Used to get the url of the playing video. + * Get the current time in the video at which the event was fired. */ - source?: any; + currentTime?: number; /** - * Used to get current position in the video at which the event was fired. + * Get the video duration in seconds. */ - currentTime?: any; + duration?: number; /** - * Used to get the video duration in seconds. + * Get the url of the playing video. */ - duration?: any; + source?: string; } interface WaitingEvent { @@ -94527,19 +110031,19 @@ interface WaitingEvent { interface WaitingEventUIParam { /** - * Used to get the url of the playing video. + * Get the current time in the video at which the event was fired. */ - source?: any; + currentTime?: number; /** - * Used to get current position in the video at which the event was fired. + * Get the video duration in seconds. */ - currentTime?: any; + duration?: number; /** - * Used to get the video duration in seconds. + * Get the url of the playing video. */ - duration?: any; + source?: string; } interface EnterFullScreenEvent { @@ -94548,9 +110052,9 @@ interface EnterFullScreenEvent { interface EnterFullScreenEventUIParam { /** - * Used to get the url of the playing video. + * Get the url of the playing video. */ - source?: any; + source?: string; } interface ExitFullScreenEvent { @@ -94559,9 +110063,9 @@ interface ExitFullScreenEvent { interface ExitFullScreenEventUIParam { /** - * Used to get the url of the playing video. + * Get the url of the playing video. */ - source?: any; + source?: string; } interface RelatedVideoClickEvent { @@ -94570,12 +110074,12 @@ interface RelatedVideoClickEvent { interface RelatedVideoClickEventUIParam { /** - * Used to get the relatedVideo object from the relatedVideos array. + * Get the relatedVideo object from the relatedVideos array. */ relatedVideo?: any; /** - * Used to get the relatedVideo html element in the DOM. + * Get the relatedVideo html element in the DOM. */ relatedVideoElement?: any; } @@ -94586,19 +110090,19 @@ interface BannerVisibleEvent { interface BannerVisibleEventUIParam { /** - * Used to get the banner index in the banners array. - */ - index?: any; - - /** - * Used to get the banner object from the banners array. + * Get the banner object from the banners array. */ banner?: any; /** - * Used to get the banner html element in the DOM. + * Get the banner html element in the DOM. */ bannerElement?: any; + + /** + * Get the banner index in the banners array. + */ + index?: number; } interface BannerHiddenEvent { @@ -94607,19 +110111,19 @@ interface BannerHiddenEvent { interface BannerHiddenEventUIParam { /** - * Used to get the banner index in the banners array. - */ - index?: any; - - /** - * Used to get the banner object from the banners array. + * Get the banner object from the banners array. */ banner?: any; /** - * Used to get the banner html element in the DOM. + * Get the banner html element in the DOM. */ bannerElement?: any; + + /** + * Get the banner index in the banners array. + */ + index?: number; } interface BannerClickEvent { @@ -94628,7 +110132,7 @@ interface BannerClickEvent { interface BannerClickEventUIParam { /** - * Used to get the banner html element in the DOM. + * Get the banner html element in the DOM. */ bannerElement?: any; } @@ -94636,116 +110140,147 @@ interface BannerClickEventUIParam { interface IgVideoPlayer { /** * Gets/Sets a list of video sources to choose from. Best coded/format is automatically detected by the control. Supported types are depending on the browser and could be one of the following mov, mp4, webm, ogg. + * */ sources?: any[]; /** * Gets/Sets the width of the control. By default null will stretch the control to fit data, if no other widths are defined. + * */ width?: string|number; /** * Gets/Sets the height of the control. By default null will stretch the control to fit data, if no other heights are defined. + * */ height?: string|number; /** * Gets/Sets a URL to an image to show, when no video data is available. + * */ posterUrl?: string; /** * Gets/Sets whether to preload load initial data for duration of video. If true it may start buffering the video, but this highly depends on the specific browser implementation. + * */ preload?: boolean; /** * Gets/Sets whether the video should start playing immediately after the control is loaded. + * */ autoplay?: boolean; /** * Gets/Sets whether player controls will auto hide when video is not hovered. This is applicable only when Infragistics playback controls are used. + * */ autohide?: boolean; /** * Gets/Sets volume slider auto hide delay. This is applicable only when Infragistics playback controls are used. + * */ volumeAutohideDelay?: number; /** * Gets/Sets the center big button hide delay. + * */ centerButtonHideDelay?: number; /** * Gets/Sets whether the video to start again after it has ended. + * */ loop?: boolean; /** * Gets/Sets whether if you want to use the built in browser controls. By default player uses Infragistics playback controls. Note that you may have different look and feel across different browsers if you use the built in browser controls. When this option is set to true, no [commercials](ui.igvideoplayer#options:commercials) will be displayed as they are not supported. + * */ browserControls?: boolean; /** * Gets/Sets whether the video player to be in full screen or not. This is not a pure full screen, because browsers do not allow that. It just sets 100% width and height to the control. + * */ fullscreen?: boolean; /** * Gets/Sets the video volume. It can be between 0.0 and 1.0. + * */ volume?: number; /** * Gets/Sets whether the video volume is muted. + * */ muted?: boolean; /** * Gets/Sets video title. + * */ title?: string; /** * Gets/Sets whether the control seek tool tip will be shown when hovering the video progress bar. + * */ showSeekTime?: boolean; /** * Gets/Sets the format of the video progress label. You should use ${currentTime} to represent current playback position and ${duration} to represent video duration. + * */ progressLabelFormat?: string; /** * Gets/Sets an array of bookmarks that will be displayed in the video player control. + * */ bookmarks?: IgVideoPlayerBookmark[]; /** * Gets/Sets an array of related videos that will be displayed when video playback has ended. + * */ relatedVideos?: IgVideoPlayerRelatedVideo[]; /** * Gets/Sets an array of banner objects that will show the banners when the video clip is played. + * */ banners?: IgVideoPlayerBanner[]; /** * Gets/Sets an array of commercials objects that will be displayed when the video is playing. Note that [broswerControls](ui.igvideoplayer#options:browserControls) doesn't support commercials. + * */ commercials?: IgVideoPlayerCommercials; locale?: IgVideoPlayerLocale; /** - * Occurs when video has ended. + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + + /** + * Occurs when the video has ended. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.duration to get the video duration in seconds. */ ended?: EndedEvent; @@ -94753,17 +110288,13 @@ interface IgVideoPlayer { * Occurs when video gets playing. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.duration to get the video duration in seconds. */ playing?: PlayingEvent; /** - * Occurs when video is paused. + * Occurs when the video is paused. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.duration to get the video duration in seconds. */ paused?: PausedEvent; @@ -94771,18 +110302,13 @@ interface IgVideoPlayer { * Occurs when a chunk of data is buffered. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.buffered to get buffered percentage. */ buffering?: BufferingEvent; /** - * Occurs when video has advanced the playback position. + * Occurs when the video has advanced the playback position. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.currentTime to get current position in the video at which the event was fired. - * Use ui.duration to get the video duration in seconds. */ progress?: ProgressEvent; @@ -94790,28 +110316,20 @@ interface IgVideoPlayer { * Occurs when igVideoPlayer is waiting for data from the server. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.currentTime to get current position in the video at which the event was fired. - * Use ui.duration to get the video duration in seconds. */ waiting?: WaitingEvent; /** - * Occurs when the bookmark is hit. + * Occurs when a bookmark is hit. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.bookmark to get the bookmark object from the bookmarks array. - * Use ui.bookmarkElement to get the html element in the DOM. */ bookmarkHit?: BookmarkHitEvent; /** - * Occurs when the bookmark is clicked. + * Occurs when a bookmark is clicked. * * Function takes arguments evt and ui. - * Use ui.bookmark to get the bookmark object from the bookmarks array. - * Use ui.bookmarkElement to get the html element in the DOM. */ bookmarkClick?: BookmarkClickEvent; @@ -94819,7 +110337,6 @@ interface IgVideoPlayer { * Occurs when igVideoPlayer enters full screen mode. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. */ enterFullScreen?: EnterFullScreenEvent; @@ -94827,16 +110344,13 @@ interface IgVideoPlayer { * Occurs when igVideoPlayer exits full screen mode. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. */ exitFullScreen?: ExitFullScreenEvent; /** - * Occurs when related video is clicked. + * Occurs when a related video is clicked. * * Function takes arguments evt and ui. - * Use ui.relatedVideo to get the relatedVideo object from the relatedVideos array. - * Use ui.relatedVideoElement to get the relatedVideo html element in the DOM. */ relatedVideoClick?: RelatedVideoClickEvent; @@ -94844,9 +110358,6 @@ interface IgVideoPlayer { * Defines the name of the player banner visible event. Fired when the banner has been displayed. * * Function takes arguments evt and ui. - * Use ui.index to get the banner index in the banners array. - * Use ui.banner to get the banner object from the banners array. - * Use ui.bannerElement to get the banner html element in the DOM. */ bannerVisible?: BannerVisibleEvent; @@ -94854,9 +110365,6 @@ interface IgVideoPlayer { * Occurs when the banner is hidden. * * Function takes arguments evt and ui. - * Use ui.index to get the banner index in the banners array. - * Use ui.banner to get the banner object from the banners array. - * Use ui.bannerElement to get the banner html element in the DOM. */ bannerHidden?: BannerHiddenEvent; @@ -94864,7 +110372,6 @@ interface IgVideoPlayer { * Occurs when the banner is clicked. * * Function takes arguments evt and ui. - * Use ui.bannerElement to get the banner html element in the DOM. */ bannerClick?: BannerClickEvent; @@ -94914,6 +110421,11 @@ interface IgVideoPlayerMethods { * Resets the commercials, to be shown again. */ resetCommercialsShow(): void; + + /** + * Changes the all locales into the widget element to the language specified in [options.language](ui.igvideoplayer#options:language) + * Note that this method is for rare scenarios, use [language](ui.igvideoplayer#options:language) or [locale](ui.igvideoplayer#options:locale) option setter + */ changeLocale(): void; /** @@ -94989,6 +110501,16 @@ interface IgVideoPlayerMethods { * Destroys the widget. */ destroy(): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igVideoPlayer"): IgVideoPlayerMethods; @@ -95016,21 +110538,26 @@ interface JQuery { igVideoPlayer(methodName: "duration"): number; igVideoPlayer(methodName: "seeking"): boolean; igVideoPlayer(methodName: "destroy"): void; + igVideoPlayer(methodName: "changeGlobalLanguage"): void; + igVideoPlayer(methodName: "changeGlobalRegional"): void; /** * Gets/Sets a list of video sources to choose from. Best coded/format is automatically detected by the control. Supported types are depending on the browser and could be one of the following mov, mp4, webm, ogg. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "sources"): any[]; /** * /Sets a list of video sources to choose from. Best coded/format is automatically detected by the control. Supported types are depending on the browser and could be one of the following mov, mp4, webm, ogg. * + * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "sources", optionValue: any[]): void; /** * Gets/Sets the width of the control. By default null will stretch the control to fit data, if no other widths are defined. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "width"): string|number; @@ -95038,6 +110565,7 @@ interface JQuery { /** * /Sets the width of the control. By default null will stretch the control to fit data, if no other widths are defined. * + * * @optionValue New value to be set. */ @@ -95045,6 +110573,7 @@ interface JQuery { /** * Gets/Sets the height of the control. By default null will stretch the control to fit data, if no other heights are defined. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "height"): string|number; @@ -95052,6 +110581,7 @@ interface JQuery { /** * /Sets the height of the control. By default null will stretch the control to fit data, if no other heights are defined. * + * * @optionValue New value to be set. */ @@ -95059,216 +110589,252 @@ interface JQuery { /** * Gets/Sets a URL to an image to show, when no video data is available. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "posterUrl"): string; /** * /Sets a URL to an image to show, when no video data is available. * + * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "posterUrl", optionValue: string): void; /** * Gets/Sets whether to preload load initial data for duration of video. If true it may start buffering the video, but this highly depends on the specific browser implementation. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "preload"): boolean; /** * /Sets whether to preload load initial data for duration of video. If true it may start buffering the video, but this highly depends on the specific browser implementation. * + * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "preload", optionValue: boolean): void; /** * Gets/Sets whether the video should start playing immediately after the control is loaded. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "autoplay"): boolean; /** * /Sets whether the video should start playing immediately after the control is loaded. * + * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "autoplay", optionValue: boolean): void; /** * Gets/Sets whether player controls will auto hide when video is not hovered. This is applicable only when Infragistics playback controls are used. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "autohide"): boolean; /** * /Sets whether player controls will auto hide when video is not hovered. This is applicable only when Infragistics playback controls are used. * + * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "autohide", optionValue: boolean): void; /** * Gets/Sets volume slider auto hide delay. This is applicable only when Infragistics playback controls are used. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "volumeAutohideDelay"): number; /** * /Sets volume slider auto hide delay. This is applicable only when Infragistics playback controls are used. * + * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "volumeAutohideDelay", optionValue: number): void; /** * Gets/Sets the center big button hide delay. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "centerButtonHideDelay"): number; /** * /Sets the center big button hide delay. * + * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "centerButtonHideDelay", optionValue: number): void; /** * Gets/Sets whether the video to start again after it has ended. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "loop"): boolean; /** * /Sets whether the video to start again after it has ended. * + * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "loop", optionValue: boolean): void; /** * Gets/Sets whether if you want to use the built in browser controls. By default player uses Infragistics playback controls. Note that you may have different look and feel across different browsers if you use the built in browser controls. When this option is set to true, no [commercials](ui.igvideoplayer#options:commercials) will be displayed as they are not supported. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "browserControls"): boolean; /** * /Sets whether if you want to use the built in browser controls. By default player uses Infragistics playback controls. Note that you may have different look and feel across different browsers if you use the built in browser controls. When this option is set to true, no [commercials](ui.igvideoplayer#options:commercials) will be displayed as they are not supported. * + * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "browserControls", optionValue: boolean): void; /** * Gets/Sets whether the video player to be in full screen or not. This is not a pure full screen, because browsers do not allow that. It just 100% width and height to the control. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "fullscreen"): boolean; /** * /Sets whether the video player to be in full screen or not. This is not a pure full screen, because browsers do not allow that. It just sets 100% width and height to the control. * + * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "fullscreen", optionValue: boolean): void; /** * Gets/Sets the video volume. It can be between 0.0 and 1.0. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "volume"): number; /** * /Sets the video volume. It can be between 0.0 and 1.0. * + * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "volume", optionValue: number): void; /** * Gets/Sets whether the video volume is muted. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "muted"): boolean; /** * /Sets whether the video volume is muted. * + * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "muted", optionValue: boolean): void; /** * Gets/Sets video title. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "title"): string; /** * /Sets video title. * + * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "title", optionValue: string): void; /** * Gets/Sets whether the control seek tool tip will be shown when hovering the video progress bar. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "showSeekTime"): boolean; /** * /Sets whether the control seek tool tip will be shown when hovering the video progress bar. * + * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "showSeekTime", optionValue: boolean): void; /** * Gets/Sets the format of the video progress label. You should use ${currentTime} to represent current playback position and ${duration} to represent video duration. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "progressLabelFormat"): string; /** * /Sets the format of the video progress label. You should use ${currentTime} to represent current playback position and ${duration} to represent video duration. * + * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "progressLabelFormat", optionValue: string): void; /** * Gets/Sets an array of bookmarks that will be displayed in the video player control. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "bookmarks"): IgVideoPlayerBookmark[]; /** * /Sets an array of bookmarks that will be displayed in the video player control. * + * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "bookmarks", optionValue: IgVideoPlayerBookmark[]): void; /** * Gets/Sets an array of related videos that will be displayed when video playback has ended. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "relatedVideos"): IgVideoPlayerRelatedVideo[]; /** * /Sets an array of related videos that will be displayed when video playback has ended. * + * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "relatedVideos", optionValue: IgVideoPlayerRelatedVideo[]): void; /** * Gets/Sets an array of banner objects that will show the banners when the video clip is played. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "banners"): IgVideoPlayerBanner[]; /** * /Sets an array of banner objects that will show the banners when the video clip is played. * + * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "banners", optionValue: IgVideoPlayerBanner[]): void; /** * Gets/Sets an array of commercials objects that will be displayed when the video is playing. Note that [broswerControls](ui.igvideoplayer#options:browserControls) doesn't support commercials. + * */ igVideoPlayer(optionLiteral: 'option', optionName: "commercials"): IgVideoPlayerCommercials; /** * /Sets an array of commercials objects that will be displayed when the video is playing. Note that [broswerControls](ui.igvideoplayer#options:browserControls) doesn't support commercials. * + * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "commercials", optionValue: IgVideoPlayerCommercials): void; @@ -95276,20 +110842,46 @@ interface JQuery { igVideoPlayer(optionLiteral: 'option', optionName: "locale", optionValue: IgVideoPlayerLocale): void; /** - * Occurs when video has ended. + * Set/Get the locale language setting for the widget. + * + */ + igVideoPlayer(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igVideoPlayer(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igVideoPlayer(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igVideoPlayer(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + + /** + * Occurs when the video has ended. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.duration to get the video duration in seconds. */ igVideoPlayer(optionLiteral: 'option', optionName: "ended"): EndedEvent; /** - * Occurs when video has ended. + * Occurs when the video has ended. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.duration to get the video duration in seconds. * * @optionValue New value to be set. */ @@ -95299,8 +110891,6 @@ interface JQuery { * Occurs when video gets playing. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.duration to get the video duration in seconds. */ igVideoPlayer(optionLiteral: 'option', optionName: "playing"): PlayingEvent; @@ -95308,28 +110898,22 @@ interface JQuery { * Occurs when video gets playing. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.duration to get the video duration in seconds. * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "playing", optionValue: PlayingEvent): void; /** - * Occurs when video is paused. + * Occurs when the video is paused. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.duration to get the video duration in seconds. */ igVideoPlayer(optionLiteral: 'option', optionName: "paused"): PausedEvent; /** - * Occurs when video is paused. + * Occurs when the video is paused. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.duration to get the video duration in seconds. * * @optionValue New value to be set. */ @@ -95339,8 +110923,6 @@ interface JQuery { * Occurs when a chunk of data is buffered. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.buffered to get buffered percentage. */ igVideoPlayer(optionLiteral: 'option', optionName: "buffering"): BufferingEvent; @@ -95348,30 +110930,22 @@ interface JQuery { * Occurs when a chunk of data is buffered. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.buffered to get buffered percentage. * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "buffering", optionValue: BufferingEvent): void; /** - * Occurs when video has advanced the playback position. + * Occurs when the video has advanced the playback position. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.currentTime to get current position in the video at which the event was fired. - * Use ui.duration to get the video duration in seconds. */ igVideoPlayer(optionLiteral: 'option', optionName: "progress"): ProgressEvent; /** - * Occurs when video has advanced the playback position. + * Occurs when the video has advanced the playback position. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.currentTime to get current position in the video at which the event was fired. - * Use ui.duration to get the video duration in seconds. * * @optionValue New value to be set. */ @@ -95381,9 +110955,6 @@ interface JQuery { * Occurs when igVideoPlayer is waiting for data from the server. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.currentTime to get current position in the video at which the event was fired. - * Use ui.duration to get the video duration in seconds. */ igVideoPlayer(optionLiteral: 'option', optionName: "waiting"): WaitingEvent; @@ -95391,51 +110962,38 @@ interface JQuery { * Occurs when igVideoPlayer is waiting for data from the server. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.currentTime to get current position in the video at which the event was fired. - * Use ui.duration to get the video duration in seconds. * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "waiting", optionValue: WaitingEvent): void; /** - * Occurs when the bookmark is hit. + * Occurs when a bookmark is hit. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.bookmark to get the bookmark object from the bookmarks array. - * Use ui.bookmarkElement to get the html element in the DOM. */ igVideoPlayer(optionLiteral: 'option', optionName: "bookmarkHit"): BookmarkHitEvent; /** - * Occurs when the bookmark is hit. + * Occurs when a bookmark is hit. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. - * Use ui.bookmark to get the bookmark object from the bookmarks array. - * Use ui.bookmarkElement to get the html element in the DOM. * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "bookmarkHit", optionValue: BookmarkHitEvent): void; /** - * Occurs when the bookmark is clicked. + * Occurs when a bookmark is clicked. * * Function takes arguments evt and ui. - * Use ui.bookmark to get the bookmark object from the bookmarks array. - * Use ui.bookmarkElement to get the html element in the DOM. */ igVideoPlayer(optionLiteral: 'option', optionName: "bookmarkClick"): BookmarkClickEvent; /** - * Occurs when the bookmark is clicked. + * Occurs when a bookmark is clicked. * * Function takes arguments evt and ui. - * Use ui.bookmark to get the bookmark object from the bookmarks array. - * Use ui.bookmarkElement to get the html element in the DOM. * * @optionValue New value to be set. */ @@ -95445,7 +111003,6 @@ interface JQuery { * Occurs when igVideoPlayer enters full screen mode. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. */ igVideoPlayer(optionLiteral: 'option', optionName: "enterFullScreen"): EnterFullScreenEvent; @@ -95453,7 +111010,6 @@ interface JQuery { * Occurs when igVideoPlayer enters full screen mode. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. * * @optionValue New value to be set. */ @@ -95463,7 +111019,6 @@ interface JQuery { * Occurs when igVideoPlayer exits full screen mode. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. */ igVideoPlayer(optionLiteral: 'option', optionName: "exitFullScreen"): ExitFullScreenEvent; @@ -95471,27 +111026,22 @@ interface JQuery { * Occurs when igVideoPlayer exits full screen mode. * * Function takes arguments evt and ui. - * Use ui.source to get the url of the playing video. * * @optionValue New value to be set. */ igVideoPlayer(optionLiteral: 'option', optionName: "exitFullScreen", optionValue: ExitFullScreenEvent): void; /** - * Occurs when related video is clicked. + * Occurs when a related video is clicked. * * Function takes arguments evt and ui. - * Use ui.relatedVideo to get the relatedVideo object from the relatedVideos array. - * Use ui.relatedVideoElement to get the relatedVideo html element in the DOM. */ igVideoPlayer(optionLiteral: 'option', optionName: "relatedVideoClick"): RelatedVideoClickEvent; /** - * Occurs when related video is clicked. + * Occurs when a related video is clicked. * * Function takes arguments evt and ui. - * Use ui.relatedVideo to get the relatedVideo object from the relatedVideos array. - * Use ui.relatedVideoElement to get the relatedVideo html element in the DOM. * * @optionValue New value to be set. */ @@ -95501,9 +111051,6 @@ interface JQuery { * Defines the name of the player banner visible event. Fired when the banner has been displayed. * * Function takes arguments evt and ui. - * Use ui.index to get the banner index in the banners array. - * Use ui.banner to get the banner object from the banners array. - * Use ui.bannerElement to get the banner html element in the DOM. */ igVideoPlayer(optionLiteral: 'option', optionName: "bannerVisible"): BannerVisibleEvent; @@ -95511,9 +111058,6 @@ interface JQuery { * Defines the name of the player banner visible event. Fired when the banner has been displayed. * * Function takes arguments evt and ui. - * Use ui.index to get the banner index in the banners array. - * Use ui.banner to get the banner object from the banners array. - * Use ui.bannerElement to get the banner html element in the DOM. * * @optionValue New value to be set. */ @@ -95523,9 +111067,6 @@ interface JQuery { * Occurs when the banner is hidden. * * Function takes arguments evt and ui. - * Use ui.index to get the banner index in the banners array. - * Use ui.banner to get the banner object from the banners array. - * Use ui.bannerElement to get the banner html element in the DOM. */ igVideoPlayer(optionLiteral: 'option', optionName: "bannerHidden"): BannerHiddenEvent; @@ -95533,9 +111074,6 @@ interface JQuery { * Occurs when the banner is hidden. * * Function takes arguments evt and ui. - * Use ui.index to get the banner index in the banners array. - * Use ui.banner to get the banner object from the banners array. - * Use ui.bannerElement to get the banner html element in the DOM. * * @optionValue New value to be set. */ @@ -95545,7 +111083,6 @@ interface JQuery { * Occurs when the banner is clicked. * * Function takes arguments evt and ui. - * Use ui.bannerElement to get the banner html element in the DOM. */ igVideoPlayer(optionLiteral: 'option', optionName: "bannerClick"): BannerClickEvent; @@ -95553,7 +111090,6 @@ interface JQuery { * Occurs when the banner is clicked. * * Function takes arguments evt and ui. - * Use ui.bannerElement to get the banner html element in the DOM. * * @optionValue New value to be set. */ @@ -95579,16 +111115,19 @@ interface JQuery { interface IgWidget { /** * Set/Get the locale setting for the widget. + * */ locale?: any; /** * Set/Get the locale language setting for the widget. + * */ language?: string; /** * Set/Get the regional setting for the widget. + * */ regional?: string|Object; @@ -95598,9 +111137,30 @@ interface IgWidget { [optionName: string]: any; } interface IgWidgetMethods { + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ changeGlobalRegional(): void; + + /** + * Destroy is part of the jQuery UI widget API and does the following: + * 1. Remove custom CSS classes that were added. + * 2. Unwrap any wrapping elements such as scrolling divs and other containers. + * 3. Unbind all events that were bound. + */ destroy(): void; } interface JQuery { @@ -95615,30 +111175,35 @@ interface JQuery { /** * Set/Get the locale setting for the widget. + * */ igWidget(optionLiteral: 'option', optionName: "locale"): any; /** * Set/Get the locale setting for the widget. * + * * @optionValue New value to be set. */ igWidget(optionLiteral: 'option', optionName: "locale", optionValue: any): void; /** * Set/Get the locale language setting for the widget. + * */ igWidget(optionLiteral: 'option', optionName: "language"): string; /** * Set/Get the locale language setting for the widget. * + * * @optionValue New value to be set. */ igWidget(optionLiteral: 'option', optionName: "language", optionValue: string): void; /** * Set/Get the regional setting for the widget. + * */ igWidget(optionLiteral: 'option', optionName: "regional"): string|Object; @@ -95646,6 +111211,7 @@ interface JQuery { /** * Set/Get the regional setting for the widget. * + * * @optionValue New value to be set. */ @@ -95659,11 +111225,13 @@ interface JQuery { interface IgZoombarDefaultZoomWindow { /** * The left component of the zoom window in percentages. + * */ left?: number; /** * The width of the zoom window in percentages. + * */ width?: string; @@ -95787,6 +111355,7 @@ interface IgZoombar { /** * Specifies the element on which the widget the Zoombar is attached to is initialized. * object A valid jQuery object, the first element of which is that element. + * */ target?: string|Object; @@ -95794,6 +111363,7 @@ interface IgZoombar { * Specifies how the target widget's clone is rendered inside the Zoombar. * object A valid set of properties to initialize the clone with. * + * * Valid values: * "auto" Options for initializing the clone will be inferred from the target widget. Certain properties will be altered to make the clone more suitable for using inside the Zoombar. * "none" No clone of the target widget will be initialized inside the Zoombar. @@ -95803,8 +111373,11 @@ interface IgZoombar { /** * Specifies the width of the Zoombar. * + * * Valid values: * "auto" The width of the Zoombar will be the same as the widget it is attached to. + * "number" The widget width in pixels (px). + * "string" The widget width can be set in pixels (px) and percentage (%). * "null" The Zoombar will stretch horizontally to fit its container if it has width set, otherwise assumes auto. */ width?: string|number; @@ -95812,6 +111385,7 @@ interface IgZoombar { /** * Specifies the height of the Zoombar. * + * * Valid values: * "null" The Zoombar will stretch vertically to fit its container if it has height set, otherwise assumes 70px. */ @@ -95820,6 +111394,7 @@ interface IgZoombar { /** * Specifies when the zoom effect is applied. * + * * Valid values: * "immediate" The zoom action is applied as the end-user interacts with the zoom window. * "deferred" The zoom action is applied after the interaction with the zoom window completes. @@ -95828,34 +111403,58 @@ interface IgZoombar { /** * Specifies the distance (in percents) the zoom window moves when the left or right scroll bar buttons are clicked. + * */ zoomWindowMoveDistance?: number; /** * Specifies the default zoom in percentages. + * */ defaultZoomWindow?: IgZoombarDefaultZoomWindow; /** * The minimal width the zoom window can have in percentages. + * */ zoomWindowMinWidth?: number; /** * Specifies the animation duration (in milliseconds) when hover style is applied or removed from elements. + * */ hoverStyleAnimationDuration?: number; /** * Specifies the pan duration (in milliseconds) when the window changes position. Set to 0 for snap. + * */ windowPanDuration?: number; /** * Initial tabIndex for the Zoombar container elements. + * */ tabIndex?: number; + /** + * Set/Get the locale setting for the widget. + * + */ + locale?: any; + + /** + * Set/Get the locale language setting for the widget. + * + */ + language?: string; + + /** + * Set/Get the regional setting for the widget. + * + */ + regional?: string|Object; + /** * Event fired before a zoom action is applied */ @@ -95945,6 +111544,24 @@ interface IgZoombarMethods { * @param width The width parameter of the new zoom window in percentages */ zoom(left?: number, width?: number): Object; + + /** + * Changes the all locales contained into a specified container to the language specified in [options.language](ui.igwidget#options:language) + * Note that this method is for rare scenarios, use [language](ui.igwidget#options:language) or [locale](ui.igwidget#options:locale) option setter + * + * @param $container Optional parameter - if not set it would use the element of the widget as $container + */ + changeLocale($container: Object): void; + + /** + * Changes the widget language to global language. Global language is the value in $.ig.util.language + */ + changeGlobalLanguage(): void; + + /** + * Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional + */ + changeGlobalRegional(): void; } interface JQuery { data(propertyName: "igZoombar"): IgZoombarMethods; @@ -96041,6 +111658,9 @@ class ZoombarProviderDefault { /** * Jshint ignore:line + * + * @param a + * @param b */ update(a: Object, b: Object): void; } @@ -96075,6 +111695,9 @@ interface JQuery { igZoombar(methodName: "container"): Element; igZoombar(methodName: "clone"): Element; igZoombar(methodName: "zoom", left?: number, width?: number): Object; + igZoombar(methodName: "changeLocale", $container: Object): void; + igZoombar(methodName: "changeGlobalLanguage"): void; + igZoombar(methodName: "changeGlobalRegional"): void; /** * Gets a provider class which interfaces the widget that is being zoomed. @@ -96093,6 +111716,7 @@ interface JQuery { /** * Gets the element on which the widget the Zoombar is attached to is initialized. * object A valid jQuery object, the first element of which is that element. + * */ igZoombar(optionLiteral: 'option', optionName: "target"): string|Object; @@ -96101,6 +111725,7 @@ interface JQuery { * Sets the element on which the widget the Zoombar is attached to is initialized. * object A valid jQuery object, the first element of which is that element. * + * * @optionValue New value to be set. */ @@ -96109,6 +111734,7 @@ interface JQuery { /** * Gets how the target widget's clone is rendered inside the Zoombar. * object A valid set of properties to initialize the clone with. + * */ igZoombar(optionLiteral: 'option', optionName: "clone"): string|Object; @@ -96117,6 +111743,7 @@ interface JQuery { * Sets how the target widget's clone is rendered inside the Zoombar. * object A valid set of properties to initialize the clone with. * + * * @optionValue New value to be set. */ @@ -96124,6 +111751,7 @@ interface JQuery { /** * Gets the width of the Zoombar. + * */ igZoombar(optionLiteral: 'option', optionName: "width"): string|number; @@ -96131,6 +111759,7 @@ interface JQuery { /** * Sets the width of the Zoombar. * + * * @optionValue New value to be set. */ @@ -96138,6 +111767,7 @@ interface JQuery { /** * Gets the height of the Zoombar. + * */ igZoombar(optionLiteral: 'option', optionName: "height"): number|string; @@ -96145,6 +111775,7 @@ interface JQuery { /** * Sets the height of the Zoombar. * + * * @optionValue New value to be set. */ @@ -96152,6 +111783,7 @@ interface JQuery { /** * Gets when the zoom effect is applied. + * */ igZoombar(optionLiteral: 'option', optionName: "zoomAction"): string; @@ -96159,6 +111791,7 @@ interface JQuery { /** * Sets when the zoom effect is applied. * + * * @optionValue New value to be set. */ @@ -96166,76 +111799,132 @@ interface JQuery { /** * Gets the distance (in percents) the zoom window moves when the left or right scroll bar buttons are clicked. + * */ igZoombar(optionLiteral: 'option', optionName: "zoomWindowMoveDistance"): number; /** * Sets the distance (in percents) the zoom window moves when the left or right scroll bar buttons are clicked. * + * * @optionValue New value to be set. */ igZoombar(optionLiteral: 'option', optionName: "zoomWindowMoveDistance", optionValue: number): void; /** * Gets the default zoom in percentages. + * */ igZoombar(optionLiteral: 'option', optionName: "defaultZoomWindow"): IgZoombarDefaultZoomWindow; /** * Sets the default zoom in percentages. * + * * @optionValue New value to be set. */ igZoombar(optionLiteral: 'option', optionName: "defaultZoomWindow", optionValue: IgZoombarDefaultZoomWindow): void; /** * The minimal width the zoom window can have in percentages. + * */ igZoombar(optionLiteral: 'option', optionName: "zoomWindowMinWidth"): number; /** * The minimal width the zoom window can have in percentages. * + * * @optionValue New value to be set. */ igZoombar(optionLiteral: 'option', optionName: "zoomWindowMinWidth", optionValue: number): void; /** * Gets the animation duration (in milliseconds) when hover style is applied or removed from elements. + * */ igZoombar(optionLiteral: 'option', optionName: "hoverStyleAnimationDuration"): number; /** * Sets the animation duration (in milliseconds) when hover style is applied or removed from elements. * + * * @optionValue New value to be set. */ igZoombar(optionLiteral: 'option', optionName: "hoverStyleAnimationDuration", optionValue: number): void; /** * Gets the pan duration (in milliseconds) when the window changes position. Set to 0 for snap. + * */ igZoombar(optionLiteral: 'option', optionName: "windowPanDuration"): number; /** * Sets the pan duration (in milliseconds) when the window changes position. Set to 0 for snap. * + * * @optionValue New value to be set. */ igZoombar(optionLiteral: 'option', optionName: "windowPanDuration", optionValue: number): void; /** * Initial tabIndex for the Zoombar container elements. + * */ igZoombar(optionLiteral: 'option', optionName: "tabIndex"): number; /** * Initial tabIndex for the Zoombar container elements. * + * * @optionValue New value to be set. */ igZoombar(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; + /** + * Set/Get the locale setting for the widget. + * + */ + igZoombar(optionLiteral: 'option', optionName: "locale"): any; + + /** + * Set/Get the locale setting for the widget. + * + * + * @optionValue New value to be set. + */ + igZoombar(optionLiteral: 'option', optionName: "locale", optionValue: any): void; + + /** + * Set/Get the locale language setting for the widget. + * + */ + igZoombar(optionLiteral: 'option', optionName: "language"): string; + + /** + * Set/Get the locale language setting for the widget. + * + * + * @optionValue New value to be set. + */ + igZoombar(optionLiteral: 'option', optionName: "language", optionValue: string): void; + + /** + * Set/Get the regional setting for the widget. + * + */ + + igZoombar(optionLiteral: 'option', optionName: "regional"): string|Object; + + /** + * Set/Get the regional setting for the widget. + * + * + * @optionValue New value to be set. + */ + + igZoombar(optionLiteral: 'option', optionName: "regional", optionValue: string|Object): void; + /** * Event fired before a zoom action is applied */ @@ -96363,6 +112052,233 @@ interface JQuery { igZoombar(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; igZoombar(methodName: string, ...methodParams: any[]): any; } +interface ResolvingAxisValueEvent { + (event: Event, ui: ResolvingAxisValueEventUIParam): void; +} + +interface ResolvingAxisValueEventUIParam {} + +interface IgZoomSlider { + /** + * The width of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + */ + width?: string|number; + + /** + * The height of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + */ + height?: string|number; + panTransitionDuration?: number; + maxZoomWidth?: number; + pixelScalingRatio?: number; + actualPixelScalingRatio?: number; + windowRect?: any; + minZoomWidth?: number; + startInset?: number; + endInset?: number; + trackStartInset?: number; + trackEndInset?: number; + barExtent?: number; + orientation?: string; + lowerThumbBrush?: any; + lowerThumbStrokeThickness?: number; + higherThumbStrokeThickness?: number; + higherThumbBrush?: any; + lowerThumbOutline?: any; + higherThumbOutline?: any; + lowerThumbRidgesBrush?: any; + higherThumbRidgesBrush?: any; + lowerThumbWidth?: number; + higherThumbWidth?: number; + lowerThumbHeight?: number; + higherThumbHeight?: number; + lowerShadeBrush?: any; + lowerShadeOutline?: any; + lowerShadeStrokeThickness?: number; + higherShadeBrush?: any; + higherShadeOutline?: any; + higherShadeStrokeThickness?: number; + barBrush?: any; + barOutline?: any; + barStrokeThickness?: number; + rangeThumbBrush?: any; + rangeThumbOutline?: any; + rangeThumbStrokeThickness?: number; + rangeThumbRidgesBrush?: any; + lowerCalloutBrush?: any; + lowerCalloutTextColor?: any; + lowerCalloutOutline?: any; + lowerCalloutStrokeThickness?: number; + higherCalloutBrush?: any; + higherCalloutTextColor?: any; + higherCalloutOutline?: any; + higherCalloutStrokeThickness?: number; + areThumbCalloutsEnabled?: boolean; + thumbCalloutTextStyle?: any; + propertyChanged?: PropertyChangedEvent; + resolvingAxisValue?: ResolvingAxisValueEvent; + windowRectChanged?: WindowRectChangedEvent; + + /** + * Option for igZoomSlider + */ + [optionName: string]: any; +} +interface IgZoomSliderMethods { + notifySizeChanged(): void; + + /** + * Flushes the gauge. + */ + flush(): void; + + /** + * Destroys widget. + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igZoomSlider"): IgZoomSliderMethods; +} + +interface JQuery { + igZoomSlider(methodName: "notifySizeChanged"): void; + igZoomSlider(methodName: "flush"): void; + igZoomSlider(methodName: "destroy"): void; + + /** + * The width of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + */ + + igZoomSlider(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * The width of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + + igZoomSlider(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * The height of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + */ + + igZoomSlider(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * The height of the gauge. It can be set as a number in pixels, string (px) or percentage (%). + * + * @optionValue New value to be set. + */ + + igZoomSlider(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + igZoomSlider(optionLiteral: 'option', optionName: "panTransitionDuration"): number; + igZoomSlider(optionLiteral: 'option', optionName: "panTransitionDuration", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "maxZoomWidth"): number; + igZoomSlider(optionLiteral: 'option', optionName: "maxZoomWidth", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "pixelScalingRatio"): number; + igZoomSlider(optionLiteral: 'option', optionName: "pixelScalingRatio", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "actualPixelScalingRatio"): number; + igZoomSlider(optionLiteral: 'option', optionName: "actualPixelScalingRatio", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "windowRect"): any; + igZoomSlider(optionLiteral: 'option', optionName: "windowRect", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "minZoomWidth"): number; + igZoomSlider(optionLiteral: 'option', optionName: "minZoomWidth", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "startInset"): number; + igZoomSlider(optionLiteral: 'option', optionName: "startInset", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "endInset"): number; + igZoomSlider(optionLiteral: 'option', optionName: "endInset", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "trackStartInset"): number; + igZoomSlider(optionLiteral: 'option', optionName: "trackStartInset", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "trackEndInset"): number; + igZoomSlider(optionLiteral: 'option', optionName: "trackEndInset", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "barExtent"): number; + igZoomSlider(optionLiteral: 'option', optionName: "barExtent", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "orientation"): string; + igZoomSlider(optionLiteral: 'option', optionName: "orientation", optionValue: string): void; + igZoomSlider(optionLiteral: 'option', optionName: "lowerThumbBrush"): any; + igZoomSlider(optionLiteral: 'option', optionName: "lowerThumbBrush", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "lowerThumbStrokeThickness"): number; + igZoomSlider(optionLiteral: 'option', optionName: "lowerThumbStrokeThickness", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "higherThumbStrokeThickness"): number; + igZoomSlider(optionLiteral: 'option', optionName: "higherThumbStrokeThickness", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "higherThumbBrush"): any; + igZoomSlider(optionLiteral: 'option', optionName: "higherThumbBrush", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "lowerThumbOutline"): any; + igZoomSlider(optionLiteral: 'option', optionName: "lowerThumbOutline", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "higherThumbOutline"): any; + igZoomSlider(optionLiteral: 'option', optionName: "higherThumbOutline", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "lowerThumbRidgesBrush"): any; + igZoomSlider(optionLiteral: 'option', optionName: "lowerThumbRidgesBrush", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "higherThumbRidgesBrush"): any; + igZoomSlider(optionLiteral: 'option', optionName: "higherThumbRidgesBrush", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "lowerThumbWidth"): number; + igZoomSlider(optionLiteral: 'option', optionName: "lowerThumbWidth", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "higherThumbWidth"): number; + igZoomSlider(optionLiteral: 'option', optionName: "higherThumbWidth", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "lowerThumbHeight"): number; + igZoomSlider(optionLiteral: 'option', optionName: "lowerThumbHeight", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "higherThumbHeight"): number; + igZoomSlider(optionLiteral: 'option', optionName: "higherThumbHeight", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "lowerShadeBrush"): any; + igZoomSlider(optionLiteral: 'option', optionName: "lowerShadeBrush", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "lowerShadeOutline"): any; + igZoomSlider(optionLiteral: 'option', optionName: "lowerShadeOutline", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "lowerShadeStrokeThickness"): number; + igZoomSlider(optionLiteral: 'option', optionName: "lowerShadeStrokeThickness", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "higherShadeBrush"): any; + igZoomSlider(optionLiteral: 'option', optionName: "higherShadeBrush", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "higherShadeOutline"): any; + igZoomSlider(optionLiteral: 'option', optionName: "higherShadeOutline", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "higherShadeStrokeThickness"): number; + igZoomSlider(optionLiteral: 'option', optionName: "higherShadeStrokeThickness", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "barBrush"): any; + igZoomSlider(optionLiteral: 'option', optionName: "barBrush", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "barOutline"): any; + igZoomSlider(optionLiteral: 'option', optionName: "barOutline", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "barStrokeThickness"): number; + igZoomSlider(optionLiteral: 'option', optionName: "barStrokeThickness", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "rangeThumbBrush"): any; + igZoomSlider(optionLiteral: 'option', optionName: "rangeThumbBrush", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "rangeThumbOutline"): any; + igZoomSlider(optionLiteral: 'option', optionName: "rangeThumbOutline", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "rangeThumbStrokeThickness"): number; + igZoomSlider(optionLiteral: 'option', optionName: "rangeThumbStrokeThickness", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "rangeThumbRidgesBrush"): any; + igZoomSlider(optionLiteral: 'option', optionName: "rangeThumbRidgesBrush", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "lowerCalloutBrush"): any; + igZoomSlider(optionLiteral: 'option', optionName: "lowerCalloutBrush", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "lowerCalloutTextColor"): any; + igZoomSlider(optionLiteral: 'option', optionName: "lowerCalloutTextColor", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "lowerCalloutOutline"): any; + igZoomSlider(optionLiteral: 'option', optionName: "lowerCalloutOutline", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "lowerCalloutStrokeThickness"): number; + igZoomSlider(optionLiteral: 'option', optionName: "lowerCalloutStrokeThickness", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "higherCalloutBrush"): any; + igZoomSlider(optionLiteral: 'option', optionName: "higherCalloutBrush", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "higherCalloutTextColor"): any; + igZoomSlider(optionLiteral: 'option', optionName: "higherCalloutTextColor", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "higherCalloutOutline"): any; + igZoomSlider(optionLiteral: 'option', optionName: "higherCalloutOutline", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "higherCalloutStrokeThickness"): number; + igZoomSlider(optionLiteral: 'option', optionName: "higherCalloutStrokeThickness", optionValue: number): void; + igZoomSlider(optionLiteral: 'option', optionName: "areThumbCalloutsEnabled"): boolean; + igZoomSlider(optionLiteral: 'option', optionName: "areThumbCalloutsEnabled", optionValue: boolean): void; + igZoomSlider(optionLiteral: 'option', optionName: "thumbCalloutTextStyle"): any; + igZoomSlider(optionLiteral: 'option', optionName: "thumbCalloutTextStyle", optionValue: any): void; + igZoomSlider(optionLiteral: 'option', optionName: "propertyChanged"): PropertyChangedEvent; + igZoomSlider(optionLiteral: 'option', optionName: "propertyChanged", optionValue: PropertyChangedEvent): void; + igZoomSlider(optionLiteral: 'option', optionName: "resolvingAxisValue"): ResolvingAxisValueEvent; + igZoomSlider(optionLiteral: 'option', optionName: "resolvingAxisValue", optionValue: ResolvingAxisValueEvent): void; + igZoomSlider(optionLiteral: 'option', optionName: "windowRectChanged"): WindowRectChangedEvent; + igZoomSlider(optionLiteral: 'option', optionName: "windowRectChanged", optionValue: WindowRectChangedEvent): void; + igZoomSlider(options: IgZoomSlider): JQuery; + igZoomSlider(optionLiteral: 'option', optionName: string): any; + igZoomSlider(optionLiteral: 'option', options: IgZoomSlider): JQuery; + igZoomSlider(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igZoomSlider(methodName: string, ...methodParams: any[]): any; +} interface IgLoader { scriptPath: string; diff --git a/types/incremental-dom/incremental-dom-tests.ts b/types/incremental-dom/incremental-dom-tests.ts index 2e30297e57..f593299575 100644 --- a/types/incremental-dom/incremental-dom-tests.ts +++ b/types/incremental-dom/incremental-dom-tests.ts @@ -1,6 +1,10 @@ -/// declare var expect: any; +// Stub mocha functions +const {describe, it, before, after, beforeEach, afterEach} = null as any as { + [s: string]: ((s: string, cb: (done: any) => void) => void) & ((cb: (done: any) => void) => void) & {only: any, skip: any}; +}; + import id = require('incremental-dom'); var patch = id.patch; var elementVoid = id.elementVoid; diff --git a/types/inquirer/index.d.ts b/types/inquirer/index.d.ts index 32c54fa99e..d9258f7a48 100644 --- a/types/inquirer/index.d.ts +++ b/types/inquirer/index.d.ts @@ -3,8 +3,13 @@ // Definitions by: Qubo // Parvez // Jouderian +// Qibang +// Jason Dreyzehner +// Synarque +// Justin Rockwood // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 /// import through = require('through'); @@ -12,7 +17,10 @@ import through = require('through'); declare namespace inquirer { type Prompts = { [name: string]: PromptModule }; type ChoiceType = string | objects.ChoiceOption | objects.Separator; - type Questions = Question | Question[] | Rx.Observable; + type Questions = + | Question + | ReadonlyArray> + | Rx.Observable>; interface Inquirer { restoreDefaultPrompts(): void; @@ -32,19 +40,19 @@ declare namespace inquirer { * @param cb Callback being passed the user answers * @return */ - prompt(questions: Questions, cb: (answers: Answers) => any): ui.Prompt; - prompt(questions: Questions): Promise; + prompt(questions: Questions, cb: (answers: T) => any): ui.Prompt; + prompt(questions: Questions): Promise; prompts: Prompts; Separator: objects.SeparatorStatic; ui: { BottomBar: ui.BottomBar; Prompt: ui.Prompt; - } + }; } interface PromptModule { - (questions: Questions): Promise; - (questions: Questions, cb: (answers: Answers) => any): ui.Prompt; + (questions: Questions): Promise; + (questions: Questions, cb: (answers: T) => any): ui.Prompt; /** * Register a prompt type * @param name Prompt type name @@ -57,7 +65,7 @@ declare namespace inquirer { restoreDefaultPrompts(): void; } - interface Question { + interface Question { /** * Type of the prompt. * Possible values: @@ -79,34 +87,43 @@ declare namespace inquirer { * The question to print. If defined as a function, * the first parameter will be the current inquirer session answers. */ - message?: string | ((answers: Answers) => string); + message?: string | ((answers: T) => string); /** * Default value(s) to use if nothing is entered, or a function that returns the default value(s). * If defined as a function, the first parameter will be the current inquirer session answers. */ - default?: any | ((answers: Answers) => any); + default?: any | ((answers: T) => any) | ((answers: T) => Promise); /** * Choices array or a function returning a choices array. If defined as a function, * the first parameter will be the current inquirer session answers. * Array values can be simple strings, or objects containing a name (to display) and a value properties * (to save in the answers hash). Values can also be a Separator. */ - choices?: ChoiceType[] | ((answers: Answers) => ChoiceType[]); + choices?: + | ReadonlyArray + | ((answers: T) => ReadonlyArray) + | ((answers: T) => Promise>); /** * Receive the user input and should return true if the value is valid, and an error message (String) * otherwise. If false is returned, a default error message is provided. */ - validate?(input: string, answers?: Answers): boolean | string; + validate?(input: string, answers?: T): boolean | string | Promise; /** * Receive the user input and return the filtered value to be used inside the program. * The value returned will be added to the Answers hash. */ - filter?(input: string): string; + filter?(input: string): string | Promise; + /** + * Receive the user input and return the transformed value to be displayed to the user. The + * transformation only impacts what is shown while editing. It does not impact the answers + * hash. + */ + transformer?(input: string): string; /** * Receive the current user answers hash and should return true or false depending on whether or * not this question should be asked. The value can also be a simple boolean. */ - when?: boolean | ((answers: Answers) => boolean); + when?: boolean | ((answers: T) => boolean) | ((answers: T) => Promise); paginated?: boolean; /** * Change the number of lines that will be rendered when using list, rawList, expand or checkbox. @@ -143,10 +160,10 @@ declare namespace inquirer { * Once all prompt are over */ onCompletion(): void; - processQuestion(question: Question): any; - fetchAnswer(question: Question): any; - setDefaultType(question: Question): any; - filterIfRunnable(question: Question): any; + processQuestion(question: Question): any; + fetchAnswer(question: Question): any; + setDefaultType(question: Question): any; + filterIfRunnable(question: Question): any; } /** @@ -232,12 +249,12 @@ declare namespace inquirer { interface ChoiceOption { name?: string; - value?: string; + value?: any; type?: string; extra?: any; key?: string; checked?: boolean; - disabled?: string | ((answers: Answers) => any); + disabled?: string | ((answers: T) => any); } /** @@ -247,9 +264,12 @@ declare namespace inquirer { * @param choices All `choice` to keep in the collection */ interface Choices { - new (choices: (string | Separator | ChoiceOption)[], answers?: Answers): Choices; - choices: Choice[]; - realChoices: Choice[]; + new ( + choices: ReadonlyArray, + answers?: T + ): Choices; + choices: ReadonlyArray; + realChoices: ReadonlyArray; length: number; realLength: number; /** diff --git a/types/inquirer/inquirer-tests.ts b/types/inquirer/inquirer-tests.ts index 4a43dcc98e..aa545adae0 100644 --- a/types/inquirer/inquirer-tests.ts +++ b/types/inquirer/inquirer-tests.ts @@ -1,9 +1,13 @@ -import inquirer = require('inquirer'); +import inquirer = require("inquirer"); - -inquirer.prompt([/* Pass your questions in here */], function( answers: inquirer.Answers ) { - // Use user feedback for... whatever!! -}); +inquirer.prompt( + [ + /* Pass your questions in here */ + ], + function(answers: inquirer.Answers) { + // Use user feedback for... whatever!! + } +); // // examples/bottom-bar.js @@ -13,29 +17,25 @@ inquirer.prompt([/* Pass your questions in here */], function( answers: inquirer var BottomBar = inquirer.ui.BottomBar; declare var cmdify: any; -var loader = [ - "/ Installing", - "| Installing", - "\\ Installing", - "- Installing" -]; +var loader = ["/ Installing", "| Installing", "\\ Installing", "- Installing"]; var i = 4; var ui = new BottomBar({ bottomBar: loader[i % 4] }); setInterval(function() { - ui.updateBottomBar( loader[i++ % 4] ); -}, 300 ); + ui.updateBottomBar(loader[i++ % 4]); +}, 300); var spawn = require("child_process").spawn; -var cmd = spawn(cmdify("npm"), [ "-g", "install", "inquirer" ], { stdio: "pipe" }); -cmd.stdout.pipe( ui.log ); -cmd.on( "close", function() { +var cmd = spawn(cmdify("npm"), ["-g", "install", "inquirer"], { + stdio: "pipe" +}); +cmd.stdout.pipe(ui.log); +cmd.on("close", function() { ui.updateBottomBar("Installation done!\n"); process.exit(); }); - // // examples/checkbox.js // @@ -47,49 +47,51 @@ cmd.on( "close", function() { "use strict"; //var inquirer = require("../lib/inquirer"); -inquirer.prompt([ - { - type: "checkbox", - message: "Select toppings", - name: "toppings", - choices: [ - new inquirer.Separator("The usual:"), - { - name: "Pepperoni" - }, - { - name: "Cheese", - checked: true - }, - { - name: "Mushroom" - }, - new inquirer.Separator("The extras:"), - { - name: "Pineapple", - }, - { - name: "Bacon" - }, - { - name: "Olives", - disabled: "out of stock" - }, - { - name: "Extra cheese" +inquirer.prompt<{ toppings: string }>( + [ + { + type: "checkbox", + message: "Select toppings", + name: "toppings", + choices: [ + new inquirer.Separator("The usual:"), + { + name: "Pepperoni" + }, + { + name: "Cheese", + checked: true + }, + { + name: "Mushroom" + }, + new inquirer.Separator("The extras:"), + { + name: "Pineapple" + }, + { + name: "Bacon" + }, + { + name: "Olives", + disabled: "out of stock" + }, + { + name: "Extra cheese" + } + ], + validate: function(answer) { + if (answer.length < 1) { + return "You must choose at least one topping."; + } + return true; } - ], - validate: function( answer ) { - if ( answer.length < 1 ) { - return "You must choose at least one topping."; - } - return true; } + ], + function(answers) { + console.log(JSON.stringify(answers, null, " ")); } -], function( answers: inquirer.Answers ) { - console.log( JSON.stringify(answers, null, " ") ); -}); - +); // // examples/expand.js @@ -102,39 +104,41 @@ inquirer.prompt([ "use strict"; //var inquirer = require("../lib/inquirer"); -inquirer.prompt([ - { - type: "expand", - message: "Conflict on `file.js`: ", - name: "overwrite", - choices: [ - { - key: "y", - name: "Overwrite", - value: "overwrite" - }, - { - key: "a", - name: "Overwrite this one and all next", - value: "overwrite_all" - }, - { - key: "d", - name: "Show diff", - value: "diff" - }, - new inquirer.Separator(), - { - key: "x", - name: "Abort", - value: "abort" - } - ] +inquirer.prompt( + [ + { + type: "expand", + message: "Conflict on `file.js`: ", + name: "overwrite", + choices: [ + { + key: "y", + name: "Overwrite", + value: "overwrite" + }, + { + key: "a", + name: "Overwrite this one and all next", + value: "overwrite_all" + }, + { + key: "d", + name: "Show diff", + value: "diff" + }, + new inquirer.Separator(), + { + key: "x", + name: "Abort", + value: "abort" + } + ] + } + ], + function(answers: inquirer.Answers) { + console.log(JSON.stringify(answers, null, " ")); } -], function( answers: inquirer.Answers ) { - console.log( JSON.stringify(answers, null, " ") ); -}); - +); // // examples/input.js @@ -152,21 +156,25 @@ var questions = [ type: "input", name: "first_name", message: "What's your first name", - prefix: "1 - ", + prefix: "1 - " }, { type: "input", name: "last_name", message: "What's your last name", - default: function () { return "Doe"; }, + default: function() { + return "Doe"; + }, suffix: "!!" }, { type: "input", name: "phone", message: "What's your phone number", - validate: function( value: string ): string|boolean { - var pass = value.match(/^([01]{1})?[\-\.\s]?\(?(\d{3})\)?[\-\.\s]?(\d{3})[\-\.\s]?(\d{4})\s?((?:#|ext\.?\s?|x\.?\s?){1}(?:\d+)?)?$/i); + validate: function(value: string): string | boolean { + var pass = value.match( + /^([01]{1})?[\-\.\s]?\(?(\d{3})\)?[\-\.\s]?(\d{3})[\-\.\s]?(\d{4})\s?((?:#|ext\.?\s?|x\.?\s?){1}(?:\d+)?)?$/i + ); if (pass) { return true; } else { @@ -176,15 +184,14 @@ var questions = [ } ]; -inquirer.prompt( questions, function( answers ) { - console.log( JSON.stringify(answers, null, " ") ); +inquirer.prompt(questions, function(answers) { + console.log(JSON.stringify(answers, null, " ")); }); // // examples/list.js // - /** * List prompt example */ @@ -192,29 +199,34 @@ inquirer.prompt( questions, function( answers ) { "use strict"; //var inquirer = require("../lib/inquirer"); -inquirer.prompt([ - { - type: "list", - name: "theme", - message: "What do you want to do?", - choices: [ - "Order a pizza", - "Make a reservation", - new inquirer.Separator(), - "Ask opening hours", - "Talk to the receptionist" - ] - }, - { - type: "list", - name: "size", - message: "What size do you need", - choices: [ "Jumbo", "Large", "Standard", "Medium", "Small", "Micro" ], - filter: function( val: string ) { return val.toLowerCase(); } +inquirer.prompt( + [ + { + type: "list", + name: "theme", + message: "What do you want to do?", + choices: [ + "Order a pizza", + "Make a reservation", + new inquirer.Separator(), + "Ask opening hours", + "Talk to the receptionist" + ] + }, + { + type: "list", + name: "size", + message: "What size do you need", + choices: ["Jumbo", "Large", "Standard", "Medium", "Small", "Micro"], + filter: function(val: string) { + return val.toLowerCase(); + } + } + ], + function(answers: inquirer.Answers) { + console.log(JSON.stringify(answers, null, " ")); } -], function( answers: inquirer.Answers ) { - console.log( JSON.stringify(answers, null, " ") ); -}); +); // // examples/long-list.js @@ -227,30 +239,35 @@ inquirer.prompt([ "use strict"; //var inquirer = require("../lib/inquirer"); -var choices = Array.apply(0, new Array(26)).map(function(x: number,y: number) { +var choices = Array.apply(0, new Array(26)).map(function(x: number, y: number) { return String.fromCharCode(y + 65); }); choices.push("Multiline option \n super cool feature"); -choices.push("Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium."); +choices.push( + "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium." +); -inquirer.prompt([ - { - type : "list", - name : "letter", - message : "What's your favorite letter?", - paginated : true, - choices : choices - }, - { - type : "checkbox", - name : "name", - message : "Select the letter contained in your name:", - paginated : true, - choices : choices +inquirer.prompt( + [ + { + type: "list", + name: "letter", + message: "What's your favorite letter?", + paginated: true, + choices: choices + }, + { + type: "checkbox", + name: "name", + message: "Select the letter contained in your name:", + paginated: true, + choices: choices + } + ], + function(answers: inquirer.Answers) { + console.log(JSON.stringify(answers, null, " ")); } -], function( answers: inquirer.Answers ) { - console.log( JSON.stringify(answers, null, " ") ); -}); +); // // examples/nested-call.js @@ -263,19 +280,22 @@ inquirer.prompt([ "use strict"; //var inquirer = require("../lib/inquirer"); -inquirer.prompt({ - type: "list", - name: "chocolate", - message: "What's your favorite chocolate?", - choices: [ "Mars", "Oh Henry", "Hershey" ] -}, function( answers: inquirer.Answers ) { - inquirer.prompt({ +inquirer.prompt( + { type: "list", - name: "beverage", - message: "And your favorite beverage?", - choices: [ "Pepsi", "Coke", "7up", "Mountain Dew", "Red Bull" ] - }); -}); + name: "chocolate", + message: "What's your favorite chocolate?", + choices: ["Mars", "Oh Henry", "Hershey"] + }, + function(answers: inquirer.Answers) { + inquirer.prompt({ + type: "list", + name: "beverage", + message: "And your favorite beverage?", + choices: ["Pepsi", "Coke", "7up", "Mountain Dew", "Red Bull"] + }); + } +); // // examples/password.js @@ -288,15 +308,18 @@ inquirer.prompt({ "use strict"; //var inquirer = require("../lib/inquirer"); -inquirer.prompt([ - { - type: "password", - message: "Enter your git password", - name: "password" +inquirer.prompt( + [ + { + type: "password", + message: "Enter your git password", + name: "password" + } + ], + function(answers: inquirer.Answers) { + console.log(JSON.stringify(answers, null, " ")); } -], function( answers: inquirer.Answers ) { - console.log( JSON.stringify(answers, null, " ") ); -}); +); // // examples/pizza.js @@ -323,8 +346,10 @@ var questions2 = [ type: "input", name: "phone", message: "What's your phone number", - validate: function( value: string ): string|boolean { - var pass = value.match(/^([01]{1})?[\-\.\s]?\(?(\d{3})\)?[\-\.\s]?(\d{3})[\-\.\s]?(\d{4})\s?((?:#|ext\.?\s?|x\.?\s?){1}(?:\d+)?)?$/i); + validate: function(value: string): string | boolean { + var pass = value.match( + /^([01]{1})?[\-\.\s]?\(?(\d{3})\)?[\-\.\s]?(\d{3})[\-\.\s]?(\d{4})\s?((?:#|ext\.?\s?|x\.?\s?){1}(?:\d+)?)?$/i + ); if (pass) { return true; } else { @@ -336,14 +361,16 @@ var questions2 = [ type: "list", name: "size", message: "What size do you need", - choices: [ "Large", "Medium", "Small" ], - filter: function( val: string ) { return val.toLowerCase(); } + choices: ["Large", "Medium", "Small"], + filter: function(val: string) { + return val.toLowerCase(); + } }, { type: "input", name: "quantity", message: "How many do you need", - validate: function( value: string ) { + validate: function(value: string) { var valid = !isNaN(parseFloat(value)); return valid || "Please enter a number"; }, @@ -375,7 +402,7 @@ var questions2 = [ type: "rawlist", name: "beverage", message: "You also get a free 2L beverage", - choices: [ "Pepsi", "7up", "Coke" ] + choices: ["Pepsi", "7up", "Coke"] }, { type: "input", @@ -387,16 +414,16 @@ var questions2 = [ type: "list", name: "prize", message: "For leaving a comments, you get a freebie", - choices: [ "cake", "fries" ], - when: function( answers: inquirer.Answers ) { - return answers['comments'] !== "Nope, all good!"; + choices: ["cake", "fries"], + when: function(answers: inquirer.Answers) { + return answers["comments"] !== "Nope, all good!"; } } ]; -inquirer.prompt( questions, function( answers ) { +inquirer.prompt(questions, function(answers) { console.log("\nOrder receipt:"); - console.log( JSON.stringify(answers, null, " ") ); + console.log(JSON.stringify(answers, null, " ")); }); // @@ -410,29 +437,34 @@ inquirer.prompt( questions, function( answers ) { "use strict"; //var inquirer = require("../lib/inquirer"); -inquirer.prompt([ - { - type: "rawlist", - name: "theme", - message: "What do you want to do?", - choices: [ - "Order a pizza", - "Make a reservation", - new inquirer.Separator(), - "Ask opening hours", - "Talk to the receptionist" - ] - }, - { - type: "rawlist", - name: "size", - message: "What size do you need", - choices: [ "Jumbo", "Large", "Standard", "Medium", "Small", "Micro" ], - filter: function( val: string ) { return val.toLowerCase(); } +inquirer.prompt( + [ + { + type: "rawlist", + name: "theme", + message: "What do you want to do?", + choices: [ + "Order a pizza", + "Make a reservation", + new inquirer.Separator(), + "Ask opening hours", + "Talk to the receptionist" + ] + }, + { + type: "rawlist", + name: "size", + message: "What size do you need", + choices: ["Jumbo", "Large", "Standard", "Medium", "Small", "Micro"], + filter: function(val: string) { + return val.toLowerCase(); + } + } + ], + function(answers: inquirer.Answers) { + console.log(JSON.stringify(answers, null, " ")); } -], function( answers: inquirer.Answers ) { - console.log( JSON.stringify(answers, null, " ") ); -}); +); // // examples/recursive.js @@ -445,7 +477,7 @@ inquirer.prompt([ "use strict"; //var inquirer = require("../lib/inquirer"); -var output2: (string|boolean)[] = []; +var output2: (string | boolean)[] = []; var questions3 = [ { @@ -456,18 +488,21 @@ var questions3 = [ { type: "confirm", name: "askAgain", - message: "Want to enter another TV show favorite (just hit enter for YES)?", + message: + "Want to enter another TV show favorite (just hit enter for YES)?", default: true } ]; function ask() { - inquirer.prompt( questions3, function( answers: inquirer.Answers ) { - output2.push( answers['tvShow'] ); - if ( answers['askAgain'] ) { + inquirer.prompt<{ tvShow: string; askAgain: boolean }>(questions3, function( + answers + ) { + output2.push(answers.tvShow); + if (answers.askAgain) { ask(); } else { - console.log( "Your favorite TV Shows:", output2.join(", ") ); + console.log("Your favorite TV Shows:", output2.join(", ")); } }); } @@ -478,14 +513,17 @@ ask(); // examples/when.js // - /** * When example */ "use strict"; //var inquirer = require("../lib/inquirer"); - +interface Answers4 { + bacon: boolean; + favorite: string; + pizza: boolean; +} var questions4 = [ { type: "confirm", @@ -496,32 +534,95 @@ var questions4 = [ type: "input", name: "favorite", message: "Bacon lover, what is your favorite type of bacon?", - when: function ( answers: inquirer.Answers ) { - return answers['bacon']; + when: function(answers: Answers4) { + return answers.bacon; } }, { type: "confirm", name: "pizza", message: "Ok... Do you like pizza?", - when: function (answers: inquirer.Answers) { - return !likesFood( "bacon" )(answers); + when: function(answers: Answers4) { + return !likesFood("bacon")(answers); } }, { type: "input", name: "favorite", message: "Whew! What is your favorite type of pizza?", - when: likesFood( "pizza" ) + when: likesFood("pizza") } ]; -function likesFood ( aFood: string ) { - return function ( answers: inquirer.Answers ) { - return answers[ aFood ]; - } +function likesFood(aFood: string) { + return function(answers: inquirer.Answers) { + return answers[aFood]; + }; } -inquirer.prompt(questions, function (answers) { - console.log( JSON.stringify(answers, null, " ") ); +inquirer.prompt(questions, function(answers) { + console.log(JSON.stringify(answers, null, " ")); }); + +// immutable usage +const immutableChoices: ReadonlyArray = [ + 'Order a pizza', + 'Make a reservation', + 'Ask opening hours', + 'Talk to the receptionist' +]; +inquirer.prompt( + [ + { + type: 'rawlist', + name: 'theme', + message: 'What do you want to do?', + choices: immutableChoices + } + ], + function(answers: inquirer.Answers) { + console.log(JSON.stringify(answers, null, ' ')); + } +); + +// +// Other tests not covered in the examples provided with inquirer +// + +// Tests promises from default, choices, validate, filter, and when + +interface AsyncAnswers { + choice: 'ONE' | 'TWO' | 'THREE'; + choseTwo: boolean; + confirmation: string; +} + +async function testAsyncPrompt(): Promise { + const answers: AsyncAnswers = await inquirer.prompt([ + { + type: 'list', + name: 'choice', + message: 'How many do you want?', + default: () => Promise.resolve('two'), + choices: () => Promise.resolve(['one', 'two', 'three']), + filter: (input: string) => Promise.resolve(input.toUpperCase()), + }, + { + type: 'confirm', + name: 'choseTwo', + message: 'Are you sure you want two?', + when: (choices: AsyncAnswers) => Promise.resolve(choices.choice === 'TWO'), + }, + { + type: 'input', + name: 'confirmation', + message: 'Type YES if you really, really want it', + validate: (input: string) => Promise.resolve(input.toUpperCase() === 'YES' ? true : 'Enter YES'), + transformer: (input: string) => input.toUpperCase(), + }, + ]); + + console.log(JSON.stringify(answers, null, ' ')); +} + +testAsyncPrompt(); diff --git a/types/ioredis/index.d.ts b/types/ioredis/index.d.ts index de71a9f083..bc3d656985 100644 --- a/types/ioredis/index.d.ts +++ b/types/ioredis/index.d.ts @@ -48,6 +48,7 @@ declare namespace IORedis { } interface Redis extends NodeJS.EventEmitter, Commander { + Promise: typeof Promise; status: string; connect(callback?: () => void): Promise; disconnect(): void; @@ -595,6 +596,7 @@ declare namespace IORedis { hget(key: string, field: string, callback?: (err: Error, res: string) => void): Pipeline; hmset(key: string, field: string, value: any, ...args: string[]): Pipeline; + hmset(key: string, data: any, callback?: (err: Error, res: 0 | 1) => void): Pipeline; hmget(key: string, ...fields: string[]): Pipeline; diff --git a/types/ioredis/ioredis-tests.ts b/types/ioredis/ioredis-tests.ts index d8106ecdea..e8e32062dc 100644 --- a/types/ioredis/ioredis-tests.ts +++ b/types/ioredis/ioredis-tests.ts @@ -105,7 +105,10 @@ redis.multi([ // results = [[null, 'OK'], [null, 'bar']] }); -const keys = [ 'foo', 'bar' ]; +redis.Promise.onPossiblyUnhandledRejection((error) => { +}); + +const keys = ['foo', 'bar']; redis.mget(...keys); new Redis.Cluster([ diff --git a/types/is-ci/index.d.ts b/types/is-ci/index.d.ts new file mode 100644 index 0000000000..6e9e3a7b5b --- /dev/null +++ b/types/is-ci/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for is-ci 1.1 +// Project: https://github.com/watson/is-ci +// Definitions by: Arne Schubert +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = is_ci; + +declare const is_ci: boolean; diff --git a/types/is-ci/is-ci-tests.ts b/types/is-ci/is-ci-tests.ts new file mode 100644 index 0000000000..a4f5a7c32c --- /dev/null +++ b/types/is-ci/is-ci-tests.ts @@ -0,0 +1,5 @@ +import isCi = require('is-ci'); + +let booleanValue: boolean; + +booleanValue = isCi; diff --git a/types/is-ci/tsconfig.json b/types/is-ci/tsconfig.json new file mode 100644 index 0000000000..5fed6d1779 --- /dev/null +++ b/types/is-ci/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "is-ci-tests.ts" + ] +} diff --git a/types/is-ci/tslint.json b/types/is-ci/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/is-ci/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/is-color/index.d.ts b/types/is-color/index.d.ts new file mode 100644 index 0000000000..f6c545246f --- /dev/null +++ b/types/is-color/index.d.ts @@ -0,0 +1,20 @@ +// Type definitions for is-color 1.0 +// Project: https://github.com/morishitter/is-color +// Definitions by: Vitor Luiz Cavalcanti +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function isColor(str: string): boolean; + +declare namespace isColor { + function isRgb(str: string): boolean; + function isRgba(str: string): boolean; + function isHsl(str: string): boolean; + function isHsla(str: string): boolean; + function isHex(str: string): boolean; + function isKeyword(str: string): boolean; + function isInherit(str: string): str is 'inherit'; + function isCurrentColor(str: string): str is ('currentColor' | 'currentcolor'); + function isTransparent(str: string): str is 'transparent'; +} + +export = isColor; diff --git a/types/is-color/is-color-tests.ts b/types/is-color/is-color-tests.ts new file mode 100644 index 0000000000..a17ffc7b08 --- /dev/null +++ b/types/is-color/is-color-tests.ts @@ -0,0 +1,23 @@ +import isColor = require('is-color'); + +isColor('#000'); +// => boolean + +isColor.isHex('#000'); +// => boolean +isColor.isHsl('#000'); +// => boolean +isColor.isHsla('#000'); +// => boolean +isColor.isRgb('rgb(0, 0, 0)'); +// => boolean +isColor.isRgba('rgba(0,0,0, 0)'); +// => boolean +isColor.isKeyword('red'); +// => boolean +isColor.isInherit('inherit'); +// => is 'inherit' +isColor.isTransparent('transparent'); +// => is 'transparent' +isColor.isCurrentColor('currentColor'); +// => is 'currentColor'|'currentcolor' diff --git a/types/is-color/tsconfig.json b/types/is-color/tsconfig.json new file mode 100644 index 0000000000..41488170d8 --- /dev/null +++ b/types/is-color/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "is-color-tests.ts" + ] +} diff --git a/types/is-color/tslint.json b/types/is-color/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/is-color/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/is-empty/index.d.ts b/types/is-empty/index.d.ts new file mode 100644 index 0000000000..ca712b74cb --- /dev/null +++ b/types/is-empty/index.d.ts @@ -0,0 +1,11 @@ +// Type definitions for is-empty 1.2 +// Project: https://github.com/ianstormtaylor/is-empty +// Definitions by: Stanislav Termosa +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Test if a value is empty + */ +declare function isEmpty(value: any): boolean; + +export = isEmpty; diff --git a/types/is-empty/is-empty-tests.ts b/types/is-empty/is-empty-tests.ts new file mode 100644 index 0000000000..3c49359089 --- /dev/null +++ b/types/is-empty/is-empty-tests.ts @@ -0,0 +1,10 @@ +import isEmpty = require('is-empty'); + +isEmpty({}); +isEmpty(null); +isEmpty(undefined); +isEmpty(9); +isEmpty(new Object()); +isEmpty(Array); +isEmpty(''); +isEmpty(() => {}); diff --git a/types/is-empty/tsconfig.json b/types/is-empty/tsconfig.json new file mode 100644 index 0000000000..c9e999956e --- /dev/null +++ b/types/is-empty/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "is-empty-tests.ts" + ] +} diff --git a/types/is-empty/tslint.json b/types/is-empty/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/is-empty/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/is/index.d.ts b/types/is/index.d.ts index b61bd6deee..3b70472d65 100644 --- a/types/is/index.d.ts +++ b/types/is/index.d.ts @@ -32,6 +32,11 @@ interface IsStatic { */ error(value: any): boolean; + /** + * Checks if the given value type is function. + */ + fn(value: any): boolean; + /** * Checks if the given value type is function. */ @@ -587,7 +592,7 @@ interface IsStaticApi { * Checks if the given value type is arguments. */ arguments(...value: any[]): boolean; - + /** * Checks if the given value type is arguments. */ @@ -633,6 +638,16 @@ interface IsStaticApi { */ error(value: any[]): boolean; + /** + * Checks if the given value type is function. + */ + fn(...value: any[]): boolean; + + /** + * Checks if the given value type is function. + */ + fn(value: any[]): boolean; + /** * Checks if the given value type is function. */ @@ -1234,12 +1249,12 @@ interface Is extends IsStatic { * Override RegExps if you think they suck. */ setRegexp(value: RegExp, regexp: 'url'): boolean; - + /** * Override RegExps if you think they suck. */ setRegexp(value: RegExp, regexp: 'email'): boolean; - + /** * Override RegExps if you think they suck. */ diff --git a/types/is/is-tests.ts b/types/is/is-tests.ts index 674d5ff761..0084de8990 100644 --- a/types/is/is-tests.ts +++ b/types/is/is-tests.ts @@ -36,6 +36,12 @@ is.all.error(new Error(), 'bar'); is.any.error(new Error(), 'bar'); is.all.error([new Error(), 'foo', 'bar']); +is.fn(toString); +is.not.fn({ foo: 'bar' }); +is.all.fn(toString, 'bar'); +is.any.fn(toString, 'bar'); +is.all.fn([toString, 'foo', 'bar']); + is.function(toString); is.not.function({ foo: 'bar' }); is.all.function(toString, 'bar'); diff --git a/types/iscroll/index.d.ts b/types/iscroll/index.d.ts index 13cd83cf99..1ba48227fe 100644 --- a/types/iscroll/index.d.ts +++ b/types/iscroll/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for iScroll 5.2 // Project: http://cubiq.org/iscroll-5-ready-for-beta-test -// Definitions by: Christiaan Rakowski +// Definitions by: Christiaan Rakowski , Denis Tokarev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped interface IScrollOptions { @@ -81,6 +81,7 @@ declare class IScroll { x: number; y: number; + scale: number; destroy(): void; refresh(): void; @@ -92,7 +93,7 @@ declare class IScroll { disable(): void; enable(): void; stop(): void; - zoom(x: number, y: number, scale: number, time?: number): void; + zoom(scale: number, x?: number, y?: number, time?: number): void; isReady(): boolean; // Events diff --git a/types/iscroll/iscroll-tests.ts b/types/iscroll/iscroll-tests.ts index 7bb8604937..4d7b71f93a 100644 --- a/types/iscroll/iscroll-tests.ts +++ b/types/iscroll/iscroll-tests.ts @@ -24,6 +24,11 @@ myScroll1.scrollTo(0, 100); myScroll1.scrollTo(0, 100, 200); myScroll1.scrollTo(0, 100, 200, true); +myScroll1.zoom(1); +myScroll1.zoom(-1); +myScroll1.zoom(1, 100, 200); +myScroll1.zoom(1, 200, 250, 100); + myScroll1.scrollToElement('selectedElement'); myScroll1.scrollToElement('selectedElement', 250); diff --git a/types/istanbul/index.d.ts b/types/istanbul/index.d.ts index ee23e27782..fe45802865 100644 --- a/types/istanbul/index.d.ts +++ b/types/istanbul/index.d.ts @@ -24,6 +24,7 @@ declare namespace istanbul { interface Collector { new (options?: any): Collector; add(coverage: any, testName?: string): void; + getFinalCoverage(): any; } interface Config { diff --git a/types/jackrabbit/index.d.ts b/types/jackrabbit/index.d.ts new file mode 100644 index 0000000000..ec0ff27fa9 --- /dev/null +++ b/types/jackrabbit/index.d.ts @@ -0,0 +1,66 @@ +// Type definitions for jackrabbit 4.3 +// Project: https://github.com/hunterloftis/jackrabbit +// Definitions by: Elvis Adomnica +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +import { Connection, Options, Message } from 'amqplib'; + +declare namespace jackrabbit { + function jackrabbit(url: string): JackRabbit; + + interface JackRabbit extends NodeJS.EventEmitter { + default(): Exchange; + direct(name?: string): Exchange; + fanout(name?: string): Exchange; + topic(name?: string): Exchange; + close(callback: (e: Error) => any): void; + getInternals: () => { + amqp: any; + connection: Connection; + }; + } + + enum exchangeType { + direct = 'direct', + fanout = 'fanout', + topic = 'topic', + } + + interface Exchange extends NodeJS.EventEmitter { + name: string; + type: exchangeType; + options: Options.AssertExchange; + queue(options: QueueOptions): Queue; + connect(con: Connection): Exchange; + publish(message: any, options?: PublishOptions): Exchange; + } + + type PublishOptions = Options.Publish & { + key: string; + reply?: AckCallback; + }; + + type QueueOptions = Options.AssertQueue & { + name?: string; + key?: string; + keys?: ReadonlyArray; + prefetch?: number; + }; + + type AckCallback = (data?: any) => void; + + interface Queue extends NodeJS.EventEmitter { + name: string; + options: QueueOptions; + connect(con: Connection): void; + consume: ( + callback: (data: any, ack: AckCallback, nack: () => void, msg: Message) => void, + options?: Options.Consume + ) => void; + cancel(done: any): void; + purge(done: any): void; + } +} + +export default jackrabbit.jackrabbit; diff --git a/types/jackrabbit/jackrabbit-tests.ts b/types/jackrabbit/jackrabbit-tests.ts new file mode 100644 index 0000000000..57bd961259 --- /dev/null +++ b/types/jackrabbit/jackrabbit-tests.ts @@ -0,0 +1,62 @@ +import jackrabbit from 'jackrabbit'; + +const RABBIT_URL = 'amqp://localhost'; + +function onMessage(data: any) {} +function ack() {} + +// $ExpectError +jackrabbit(); +// $ExpectError +jackrabbit(1); + +const rabbit = jackrabbit(RABBIT_URL); + +// test default exchange based on '1-hello-world' example +const defaultExchange = rabbit.default(); +const hello = defaultExchange.queue({ name: 'hello' }); + +defaultExchange.publish('Hello World!', { key: 'hello' }); + +hello.consume(onMessage, { noAck: true }); + +// test fanout exchange based on '3-pubsub' example +const fanoutExchange = rabbit.fanout(); + +fanoutExchange.publish('this is a log'); + +const fanoutQueue = fanoutExchange.queue({ exclusive: true }); +fanoutQueue.consume(onMessage, { noAck: true }); + +// test direct exchange based on '4-routing' example +const directExchange = rabbit.direct('direct_logs'); + +directExchange.publish({ text: 'this is a harmless log' }, { key: 'info' }); +directExchange.publish({ text: 'this one is more important' }, { key: 'warning' }); +directExchange.publish({ text: 'pay attention to me!' }, { key: 'error' }); + +const errorsQueue = directExchange.queue({ exclusive: true, key: 'error' }); +const logsQueue = directExchange.queue({ exclusive: true, keys: ['info', 'warning'] }); + +errorsQueue.consume((onMessage, ack) => {}); +logsQueue.consume((onMessage, ack) => {}); + +// test reply based on '6-rpc' example +const exchange = rabbit.default(); +const rpc = exchange.queue({ name: 'rpc_queue', prefetch: 1, durable: false }); + +exchange.publish( + { n: 40 }, + { + key: 'rpc_queue', + reply: onReply, + } +); + +function onReply(data: any) {} + +rpc.consume(onRequest); + +function onRequest(data: any, reply: (data: any) => void) { + reply({ field: 'value' }); +} diff --git a/types/jackrabbit/tsconfig.json b/types/jackrabbit/tsconfig.json new file mode 100644 index 0000000000..3d053557b2 --- /dev/null +++ b/types/jackrabbit/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "jackrabbit-tests.ts"] +} diff --git a/types/jackrabbit/tslint.json b/types/jackrabbit/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/jackrabbit/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/jest-environment-puppeteer/index.d.ts b/types/jest-environment-puppeteer/index.d.ts new file mode 100644 index 0000000000..e22bee2f7d --- /dev/null +++ b/types/jest-environment-puppeteer/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for jest-environment-puppeteer 2.2 +// Project: https://github.com/smooth-code/jest-puppeteer/tree/master/packages/jest-environment-puppeteer +// Definitions by: Josh Goldberg +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import { Browser, Page } from "puppeteer"; + +declare global { + const browser: Browser; + const page: Page; +} + +export { }; diff --git a/types/jest-environment-puppeteer/jest-environment-puppeteer-tests.ts b/types/jest-environment-puppeteer/jest-environment-puppeteer-tests.ts new file mode 100644 index 0000000000..3de8c3661a --- /dev/null +++ b/types/jest-environment-puppeteer/jest-environment-puppeteer-tests.ts @@ -0,0 +1,4 @@ +import * as puppeteer from "puppeteer"; + +const myBrowser: puppeteer.Browser = browser; +const myPage: puppeteer.Page = page; diff --git a/types/jest-environment-puppeteer/tsconfig.json b/types/jest-environment-puppeteer/tsconfig.json new file mode 100644 index 0000000000..ed53d60edd --- /dev/null +++ b/types/jest-environment-puppeteer/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jest-environment-puppeteer-tests.ts" + ] +} diff --git a/types/jest-environment-puppeteer/tslint.json b/types/jest-environment-puppeteer/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/jest-environment-puppeteer/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/jest-image-snapshot/index.d.ts b/types/jest-image-snapshot/index.d.ts new file mode 100644 index 0000000000..c15e435cc9 --- /dev/null +++ b/types/jest-image-snapshot/index.d.ts @@ -0,0 +1,75 @@ +// Type definitions for jest-image-snapshot 2.4 +// Project: https://github.com/americanexpress/jest-image-snapshot#readme +// Definitions by: Janeene Beeforth +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +/** + * Options to be passed to the 'pixelmatch' image diffing function. + */ +export interface PixelmatchOptions { + /** Matching threshold, ranges from 0 to 1. Smaller values make the comparison more sensitive. 0.1 by default. */ + readonly threshold?: number; + /** If true, disables detecting and ignoring anti-aliased pixels. false by default. */ + readonly includeAA?: boolean; +} + +export interface MatchImageSnapshotOptions { + /** + * Custom config passed to 'pixelmatch' + */ + customDiffConfig?: PixelmatchOptions; + /** + * Custom snapshots directory. + * Absolute path of a directory to keep the snapshot in. + */ + customSnapshotsDir?: string; + /** + * A custom name to give this snapshot. If not provided, one is computed automatically. + */ + customSnapshotIdentifier?: string; + /** + * Removes coloring from the console output, useful if storing the results to a file. + * Defaults to false. + */ + noColors?: boolean; + /** + * Sets the threshold that would trigger a test failure based on the failureThresholdType selected. This is different + * to the customDiffConfig.threshold above - the customDiffConfig.threshold is the per pixel failure threshold, whereas + * this is the failure threshold for the entire comparison. + * Defaults to 0. + */ + failureThreshold?: number; + /** + * Sets the type of threshold that would trigger a failure. + * Defaults to 'pixel'. + */ + failureThresholdType?: 'pixel' | 'percent'; +} + +/** + * Function to be passed to jest's expect.extend. + * Example: + * import { toMatchImageSnapshot } from 'jest-image-snapshot'; + * expect.extend({ toMatchImageSnapshot }); + */ +export function toMatchImageSnapshot(): { message(): string; pass: boolean; }; + +/** + * Configurable function that can be passed to jest's expect.extend. + * Example: + * import { configureToMatchImageSnapshot } from 'jest-image-snapshot'; + * const toMatchImageSnapshot = configureToMatchImageSnapshot({ noColors: true }); + * expect.extend({ toMatchImageSnapshot }); + */ +export function configureToMatchImageSnapshot(options: MatchImageSnapshotOptions): () => { message(): string; pass: boolean; }; + +declare global { + namespace jest { + interface Matchers { + toMatchImageSnapshot(): R; + } + } +} diff --git a/types/jest-image-snapshot/jest-image-snapshot-tests.ts b/types/jest-image-snapshot/jest-image-snapshot-tests.ts new file mode 100644 index 0000000000..a2ccb8c777 --- /dev/null +++ b/types/jest-image-snapshot/jest-image-snapshot-tests.ts @@ -0,0 +1,23 @@ +// Typescript Version: 2.3 +import { toMatchImageSnapshot, configureToMatchImageSnapshot } from 'jest-image-snapshot'; + +it('should be able to use toMatchImageSnapshot in a test', () => { + expect.extend({ toMatchImageSnapshot }); + + expect(400).toMatchImageSnapshot(); +}); + +it('should be able to use configureToMatchImageSnapshot in a test', () => { + const matchFn = configureToMatchImageSnapshot({ + noColors: true, + customDiffConfig: { + threshold: 5, + includeAA: false + }, + failureThreshold: 10, + failureThresholdType: 'percent' + }); + expect.extend({ toMatchImageSnapshot: matchFn }); + + expect('Me').toMatchImageSnapshot(); +}); diff --git a/types/jest-image-snapshot/tsconfig.json b/types/jest-image-snapshot/tsconfig.json new file mode 100644 index 0000000000..5bf932371d --- /dev/null +++ b/types/jest-image-snapshot/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jest-image-snapshot-tests.ts" + ] +} diff --git a/types/jest-image-snapshot/tslint.json b/types/jest-image-snapshot/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/jest-image-snapshot/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/jest-specific-snapshot/index.d.ts b/types/jest-specific-snapshot/index.d.ts new file mode 100644 index 0000000000..ef0e7f4225 --- /dev/null +++ b/types/jest-specific-snapshot/index.d.ts @@ -0,0 +1,27 @@ +// Type definitions for jest-specific-snapshot 0.5 +// Project: https://github.com/igor-dv/jest-specific-snapshot#readme +// Definitions by: Janeene Beeforth +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/// + +declare global { + namespace jest { + interface Matchers { + toMatchSpecificSnapshot(snapshotFilename: string): R; + } + } +} + +/** + * Specify the serializer that should be used by toMatchSpecificSnapshot. + * Note: toMatchSpecificSnapshot ignores the existing jest snapshot serializer settings. If you want to use a custom serializer, + * you need to set it via this addSerializer function. + */ +export function addSerializer(serializer: any): void; + +/** + * This is used to create a customized version of toMatchSpecificSnapshot. + */ +export function toMatchSpecificSnapshot(data: any, snapshotFile: string, testName: string): () => { message(): string; pass: boolean; }; diff --git a/types/jest-specific-snapshot/jest-specific-snapshot-tests.ts b/types/jest-specific-snapshot/jest-specific-snapshot-tests.ts new file mode 100644 index 0000000000..046a563c9e --- /dev/null +++ b/types/jest-specific-snapshot/jest-specific-snapshot-tests.ts @@ -0,0 +1,16 @@ +import { addSerializer, toMatchSpecificSnapshot } from 'jest-specific-snapshot'; +import toJson from 'enzyme-to-json'; + +expect(100).toMatchSpecificSnapshot('mySnapshotFile.snap'); + +addSerializer(toJson); + +function doSomeThing(received: any) { + return received; +} +expect.extend({ + toMatchDecoratedSpecificSnapshot(received, snapshotFile) { + const data = doSomeThing(received); + return toMatchSpecificSnapshot.call(this, data, snapshotFile); + } +}); diff --git a/types/jest-specific-snapshot/tsconfig.json b/types/jest-specific-snapshot/tsconfig.json new file mode 100644 index 0000000000..e4156ae2ff --- /dev/null +++ b/types/jest-specific-snapshot/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jest-specific-snapshot-tests.ts" + ] +} diff --git a/types/jest-specific-snapshot/tslint.json b/types/jest-specific-snapshot/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/jest-specific-snapshot/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/jest/index.d.ts b/types/jest/index.d.ts index e82da44d3c..4520247216 100644 --- a/types/jest/index.d.ts +++ b/types/jest/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Jest 22.1 +// Type definitions for Jest 22.2 // Project: http://facebook.github.io/jest/ // Definitions by: Asana // Ivo Stratev @@ -11,6 +11,8 @@ // Jamie Mason // Douglas Duteil // Ahn +// Josh Goldberg +// Bradley Ayers // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -201,6 +203,10 @@ declare namespace jest { type Lifecycle = (fn: ProvidesCallback, timeout?: number) => any; + interface FunctionLike { + readonly name: string; + } + /** * Creates a test closure */ @@ -222,7 +228,8 @@ declare namespace jest { } interface Describe { - (name: string, fn: EmptyFunction): void; + // tslint:disable-next-line ban-types + (name: number | string | Function | FunctionLike, fn: EmptyFunction): void; only: Describe; skip: Describe; } @@ -230,8 +237,8 @@ declare namespace jest { interface MatcherUtils { readonly isNot: boolean; utils: { - readonly EXPECTED_COLOR: string; - readonly RECEIVED_COLOR: string; + readonly EXPECTED_COLOR: (text: string) => string; + readonly RECEIVED_COLOR: (text: string) => string; ensureActualIsNumber(actual: any, matcherName?: string): void; ensureExpectedIsNumber(actual: any, matcherName?: string): void; ensureNoExpected(actual: any, matcherName?: string): void; @@ -527,16 +534,20 @@ declare namespace jest { } & T; interface MockInstance { + getMockName(): string; mock: MockContext; mockClear(): void; mockReset(): void; mockImplementation(fn: (...args: any[]) => any): Mock; mockImplementationOnce(fn: (...args: any[]) => any): Mock; + mockName(name: string): Mock; mockReturnThis(): Mock; mockReturnValue(value: any): Mock; mockReturnValueOnce(value: any): Mock; - mockName(name: string): Mock; - getMockName(): string; + mockResolvedValue(value: any): Mock; + mockResolvedValueOnce(value: any): Mock; + mockRejectedValue(value: any): Mock; + mockRejectedValueOnce(value: any): Mock; } interface MockContext { @@ -549,7 +560,7 @@ declare namespace jest { // 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; +declare function spyOn(object: T, method: keyof T): jasmine.Spy; /** * If you call the function pending anywhere in the spec body, * no matter the expectations, the spec will be marked pending. diff --git a/types/jest/jest-tests.ts b/types/jest/jest-tests.ts index 4c37f2bb65..a90a7a9e5a 100644 --- a/types/jest/jest-tests.ts +++ b/types/jest/jest-tests.ts @@ -10,6 +10,10 @@ declare const $: any; // Tests based on the Jest website jest.unmock('../sum'); +class TestClass { } + +describe(TestClass, () => { }); + describe('sum', () => { it('adds 1 + 2 to equal 3', () => { const sum: (a: number, b: number) => number = require('../sum'); @@ -309,7 +313,7 @@ describe('missing tests', () => { expect(spy).lastCalledWith('jest'); expect(spy).toBeCalledWith('jest'); expect(jest.isMockFunction(spy)).toBeTruthy(); - }); + }); it('tests all missing Mocks functionality', () => { type FruitsGetter = () => string[]; @@ -328,38 +332,72 @@ describe('missing tests', () => { expect(thisMock()).toBe(this); }); + it('async test with mockResolvedValue and mockResolvedValueOnce', async () => { + const asyncMock = jest + .fn() + .mockResolvedValue('default') + .mockResolvedValueOnce('first call') + .mockResolvedValueOnce('second call'); + + await asyncMock(); // first call + await asyncMock(); // second call + await asyncMock(); // default + await asyncMock(); // default + }); + + it('async test with mockRejectedValue', async () => { + const asyncMock = jest.fn().mockRejectedValue(new Error('Async error')); + + await asyncMock(); // throws "Async error" + }); + + it('async test with mockResolvedValueOnce and mockRejectedValueOnce', async () => { + const asyncMock = jest + .fn() + .mockResolvedValueOnce('first call') + .mockRejectedValueOnce(new Error('Async error')); + + await asyncMock(); // first call + await asyncMock(); // throws "Async error" + }); + it('tests mock name functionality', () => { const mock: jest.Mock = jest.fn(); mock.mockName('Carrot'); expect(mock.getMockName()).toBe('Carrot'); }); + it('tests mock name functionality', () => { + const mock = spyOn(console, 'warn'); + expect(mock).toHaveBeenCalled(); + }); + it('creates snapshoter', () => { jest.disableAutomock().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', () => { jest.useRealTimers(); setTimeout(() => expect(1).not.toEqual(0), 3000); jest.runOnlyPendingTimers().runTimersToTime(300); - }); + }); it('runs all timers', () => { jest.clearAllTimers(); jest.useFakeTimers(); setTimeout(() => expect(0).not.toEqual(1), 3000); jest.runAllTimers(); - }); + }); it('cleares cache', () => { const sum1 = require('../sum'); jest.resetModules(); const sum2 = require('../sum'); expect(sum1).not.toBe(sum2); - }); + }); }); describe('toMatchSnapshot', () => { diff --git a/types/johnny-five/index.d.ts b/types/johnny-five/index.d.ts index b8c108f63b..5f0f6a9f37 100644 --- a/types/johnny-five/index.d.ts +++ b/types/johnny-five/index.d.ts @@ -102,6 +102,7 @@ export interface BoardOption { repl?: boolean; debug?: boolean; timeout?: number; + io?: any; } export declare class Board { @@ -597,12 +598,12 @@ export declare class Pin { mode: number; static write(pin: number, value: number): void; - static read(pin: number, cb: (data: number) => void): void; + static read(pin: number, cb: (error: Error, data: number) => void): void; query(cb: (pin: PinState) => void): void; high(): void; low(): void; write(value: number): void; - read(cb: (value: number) => void): void; + read(cb: (error: Error, value: number) => void): void; on(event: string, cb: () => void): this; on(event: "high", cb: () => void): this; on(event: "low", cb: () => void): this; diff --git a/types/joi/index.d.ts b/types/joi/index.d.ts index 94ffd188cf..2b6d264b3e 100644 --- a/types/joi/index.d.ts +++ b/types/joi/index.d.ts @@ -10,6 +10,7 @@ // Youngrok Kim // Dan Kraus // Anjun Wang +// Rafael Kallis // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 @@ -164,6 +165,11 @@ export interface IPOptions { cidr?: string } +export interface StringRegexOptions { + name?: string; + invert?: boolean; +} + export interface JoiObject { isJoi: boolean; } @@ -376,7 +382,7 @@ export interface AnySchema extends JoiObject { * override, that error will be returned and the override will be ignored (unless the `abortEarly` * option has been set to `false`). */ - error?(err: Error | ValidationErrorFunction): this; + error(err: Error | ValidationErrorFunction): this; /** * Returns a plain object representing the schema's rules and properties @@ -551,9 +557,13 @@ export interface StringSchema extends AnySchema { /** * Defines a regular expression rule. * @param pattern - a regular expression object the string value must match against. - * @param name - optional name for patterns (useful with multiple patterns). Defaults to 'required'. + * @param options - optional, can be: + * Name for patterns (useful with multiple patterns). Defaults to 'required'. + * An optional configuration object with the following supported properties: + * name - optional pattern name. + * invert - optional boolean flag. Defaults to false behavior. If specified as true, the provided pattern will be disallowed instead of required. */ - regex(pattern: RegExp, name?: string): this; + regex(pattern: RegExp, options?: string | StringRegexOptions): this; /** * Replace characters matching the given pattern with the specified replacement string where: diff --git a/types/joi/joi-tests.ts b/types/joi/joi-tests.ts index 3ee7c45b66..1ab3316eb8 100644 --- a/types/joi/joi-tests.ts +++ b/types/joi/joi-tests.ts @@ -135,6 +135,13 @@ refOpts = { contextPrefix: str }; // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- +let stringRegexOpts: Joi.StringRegexOptions = null; + +stringRegexOpts = { name: str }; +stringRegexOpts = { invert: bool }; + +// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- + let validErr: Joi.ValidationError = null; let validErrItem: Joi.ValidationErrorItem; let validErrFunc: Joi.ValidationErrorFunction; @@ -764,6 +771,7 @@ strSchema = strSchema.length(ref); strSchema = strSchema.length(ref, str); strSchema = strSchema.regex(exp); strSchema = strSchema.regex(exp, str); +strSchema = strSchema.regex(exp, stringRegexOpts); strSchema = strSchema.replace(exp, str); strSchema = strSchema.replace(str, str); strSchema = strSchema.alphanum(); diff --git a/types/jquery-countto/index.d.ts b/types/jquery-countto/index.d.ts new file mode 100644 index 0000000000..babeb7741b --- /dev/null +++ b/types/jquery-countto/index.d.ts @@ -0,0 +1,57 @@ +// Type definitions for JQuery CountTo 1.2 +// Project: https://github.com/mhuggins/jquery-countTo +// Definitions by: Anderson Friaça +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +export type Options = Partial<{ + /** + * The number to start counting from + */ + from: number; + + /** + * The number to stop counting at + */ + to: number; + + /** + * The number of milliseconds it should take to finish counting + */ + speed: number; + + /** + * The number of milliseconds to wait between refreshing the counter + */ + refreshInterval: number; + + /** + * The number of decimal places to show when using the default formatter + */ + decimals: number; + + /** + * A handler that is used to format the current value before rendering to the DOM + */ + formatter: (value: number, options: Options) => string; + + /** + * A callback function that is triggered for every iteration that the counter updates + */ + onUpdate: (value: number) => void; + + /** + * A callback function that is triggered when counting finishes + */ + onComplete: (value: number) => void; +}>; + +export type Method = 'start' | 'stop' | 'toggle' | 'restart'; + +declare global { + interface JQuery { + countTo(methodOrOptions?: Method | Options): JQuery; + } +} diff --git a/types/jquery-countto/jquery-countto-tests.ts b/types/jquery-countto/jquery-countto-tests.ts new file mode 100644 index 0000000000..07ec15518b --- /dev/null +++ b/types/jquery-countto/jquery-countto-tests.ts @@ -0,0 +1,30 @@ +import { Options } from "jquery-countto"; + +// Basic usage +$('.timer').countTo(); + +// With options +const options: Options = { + from: 50, + to: 2500, + speed: 1000, + refreshInterval: 50, + formatter: (value: number, options: Options) => { + return value.toFixed(options.decimals); + }, + onUpdate: (value: number) => { + console.log(value); + }, + onComplete: (value: number) => { + console.log(value); + } + }; + +$('.timer').countTo(options); +$('.timer').countTo({from: 50}); + +// Controls +$('.timer').countTo('start'); +$('.timer').countTo('stop'); +$('.timer').countTo('restart'); +$('.timer').countTo('toggle'); diff --git a/types/jquery-countto/tsconfig.json b/types/jquery-countto/tsconfig.json new file mode 100644 index 0000000000..3d5cf520dd --- /dev/null +++ b/types/jquery-countto/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "jquery-countto-tests.ts" + ] +} \ No newline at end of file diff --git a/types/jquery-countto/tslint.json b/types/jquery-countto/tslint.json new file mode 100644 index 0000000000..d04fe2e1fa --- /dev/null +++ b/types/jquery-countto/tslint.json @@ -0,0 +1 @@ +{"extends": "dtslint/dt.json"} \ No newline at end of file diff --git a/types/jquery-drawer/index.d.ts b/types/jquery-drawer/index.d.ts new file mode 100644 index 0000000000..6c96e711aa --- /dev/null +++ b/types/jquery-drawer/index.d.ts @@ -0,0 +1,29 @@ +// Type definitions for jquery-drawer 3.2 +// Project: http://git.blivesta.com/drawer +// Definitions by: Pine Mizune +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// +/// + +interface JQueryDrawerClassOptions { + nav?: string; + toggle?: string; + overlay?: string; + open?: string; + close?: string; + dropdown?: string; +} + +interface JQueryDrawerOptions { + class?: JQueryDrawerClassOptions; + iscroll?: IScrollOptions; + showOverlay?: boolean; +} + +interface JQuery { + drawer(options?: JQueryDrawerOptions): JQuery; + drawer(method: 'open'|'close'|'toggle'|'destroy'): JQuery; + on(event: 'drawer.opened'|'drawer.closed', handler: () => void): JQuery; +} diff --git a/types/jquery-drawer/jquery-drawer-tests.ts b/types/jquery-drawer/jquery-drawer-tests.ts new file mode 100644 index 0000000000..b0249f8618 --- /dev/null +++ b/types/jquery-drawer/jquery-drawer-tests.ts @@ -0,0 +1,46 @@ +const elem = $('foo'); + +elem.drawer(); +elem.drawer({}); +elem.drawer({ + class: { + nav: 'drawer-nav', + toggle: 'drawer-toggle', + overlay: 'drawer-overlay', + open: 'drawer-open', + close: 'drawer-close', + dropdown: 'drawer-dropdown' + }, + iscroll: { + mouseWheel: true, + preventDefault: false, + }, + showOverlay: true, +}); +elem.drawer({ class: {} }); +elem.drawer({ + class: { + nav: 'drawer-nav', + toggle: 'drawer-toggle', + overlay: 'drawer-overlay', + open: 'drawer-open', + close: 'drawer-close', + dropdown: 'drawer-dropdown' + }, +}); +elem.drawer({ iscroll: {} }); +elem.drawer({ + iscroll: { + mouseWheel: true, + preventDefault: false, + }, +}); +elem.drawer({ showOverlay: true }); + +elem.on('drawer.opened', () => {}); +elem.on('drawer.closed', () => {}); + +elem.drawer('open'); +elem.drawer('close'); +elem.drawer('toggle'); +elem.drawer('destroy'); diff --git a/types/jquery-drawer/tsconfig.json b/types/jquery-drawer/tsconfig.json new file mode 100644 index 0000000000..a22a6dec91 --- /dev/null +++ b/types/jquery-drawer/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jquery-drawer-tests.ts" + ] +} diff --git a/types/jquery-drawer/tslint.json b/types/jquery-drawer/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/jquery-drawer/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/jquery-focusable/index.d.ts b/types/jquery-focusable/index.d.ts new file mode 100644 index 0000000000..b65fd23d38 --- /dev/null +++ b/types/jquery-focusable/index.d.ts @@ -0,0 +1,25 @@ +// Type definitions for JQuery Focusable 1.0 +// Project: https://github.com/makeup-jquery/jquery-focusable +// Definitions by: Anderson Friaça +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +export type Options = Partial<{ + /** + * Find elements with tabindex equal to -1 + */ + findNegativeTabindex: boolean; + + /** + * Find elements with tabindex greater than 0 + */ + findPositiveTabindex: true; +}>; + +declare global { + interface JQuery { + focusable(options?: Options): JQuery; + } +} diff --git a/types/jquery-focusable/jquery-focusable-tests.ts b/types/jquery-focusable/jquery-focusable-tests.ts new file mode 100644 index 0000000000..2935d5f38f --- /dev/null +++ b/types/jquery-focusable/jquery-focusable-tests.ts @@ -0,0 +1,12 @@ +import { Options } from "jquery-focusable"; + +// Basic usage +$('body').focusable(); + +// With options +const options: Options = { + findNegativeTabindex: true, + findPositiveTabindex: true + }; + +$('body').focusable(options); diff --git a/types/jquery-focusable/tsconfig.json b/types/jquery-focusable/tsconfig.json new file mode 100644 index 0000000000..d216e5326b --- /dev/null +++ b/types/jquery-focusable/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "jquery-focusable-tests.ts" + ] +} \ No newline at end of file diff --git a/types/jquery-focusable/tslint.json b/types/jquery-focusable/tslint.json new file mode 100644 index 0000000000..d04fe2e1fa --- /dev/null +++ b/types/jquery-focusable/tslint.json @@ -0,0 +1 @@ +{"extends": "dtslint/dt.json"} \ No newline at end of file diff --git a/types/jquery-lazyload/index.d.ts b/types/jquery-lazyload/index.d.ts index 5505c247f5..28563a774d 100644 --- a/types/jquery-lazyload/index.d.ts +++ b/types/jquery-lazyload/index.d.ts @@ -15,7 +15,7 @@ declare namespace JQueryLazyLoad { container?: JQuery; data_attribute?: string; skip_invisible?: boolean; - appear?: null; + appear?: ((elementsLeft: number, options: Options) => void) | null; load?: (elementsLeft?: number, options?: Options) => void; placeholder?: string; } diff --git a/types/jquery-lazyload/jquery-lazyload-tests.ts b/types/jquery-lazyload/jquery-lazyload-tests.ts index 086069d11d..105bbe094a 100644 --- a/types/jquery-lazyload/jquery-lazyload-tests.ts +++ b/types/jquery-lazyload/jquery-lazyload-tests.ts @@ -9,7 +9,10 @@ $(document).ready(() => { effect: 'fadeIn', container: $('#container'), failure_limit: 10, - skip_invisible: true + skip_invisible: true, + appear: (elementsLeft: number, settings: JQueryLazyLoad.Options) => { + console.log(elementsLeft); + } }; $('.lazyload').lazyload(options); diff --git a/types/jquery.browser/index.d.ts b/types/jquery.browser/index.d.ts new file mode 100644 index 0000000000..01141b67db --- /dev/null +++ b/types/jquery.browser/index.d.ts @@ -0,0 +1,47 @@ +// Type definitions for jQuery Browser Plugin 0.1 +// Project: https://github.com/gabceb/jquery-browser-plugin +// Definitions by: Anderson Friaça +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +export interface Matchs { + version?: string; + versionNumber?: number; + platform?: string; + mobile?: boolean; + desktop?: boolean; + webkit?: boolean; + name?: string; + android?: boolean; + bb?: boolean; + blackberry?: boolean; + ipad?: boolean; + iphone?: boolean; + ipod?: boolean; + kindle?: boolean; + playbook?: boolean; + silk?: boolean; + ['windows phone']?: boolean; + cros?: boolean; + mac?: boolean; + linux?: boolean; + win?: boolean; + chrome?: boolean; + opr?: boolean; + safari?: boolean; + rv?: boolean; + iemobile?: boolean; + msie?: boolean; + msedge?: boolean; + uaMatch: ((ua?: string) => Matchs); +} +declare global { + interface Window { + jQBrowser: Matchs; + } + interface JQueryStatic { + browser: Matchs; + } +} diff --git a/types/jquery.browser/jquery.browser-tests.ts b/types/jquery.browser/jquery.browser-tests.ts new file mode 100644 index 0000000000..aacc014524 --- /dev/null +++ b/types/jquery.browser/jquery.browser-tests.ts @@ -0,0 +1,7 @@ +// basic usage +$.browser; +$.browser.android; +$.browser.uaMatch(); +window.jQBrowser; +window.jQBrowser.android; +window.jQBrowser.uaMatch(); diff --git a/types/jquery.browser/tsconfig.json b/types/jquery.browser/tsconfig.json new file mode 100644 index 0000000000..89c26d12bb --- /dev/null +++ b/types/jquery.browser/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "jquery.browser-tests.ts" + ] +} \ No newline at end of file diff --git a/types/jquery.browser/tslint.json b/types/jquery.browser/tslint.json new file mode 100644 index 0000000000..d04fe2e1fa --- /dev/null +++ b/types/jquery.browser/tslint.json @@ -0,0 +1 @@ +{"extends": "dtslint/dt.json"} \ No newline at end of file diff --git a/types/jquery.fancytree/index.d.ts b/types/jquery.fancytree/index.d.ts index 9c793a2c19..c13cd7f26f 100644 --- a/types/jquery.fancytree/index.d.ts +++ b/types/jquery.fancytree/index.d.ts @@ -236,7 +236,7 @@ declare namespace Fancytree { /** Outer element of single nodes */ span: HTMLElement; /** Outer element of single nodes for table extension */ - tr: HTMLElement; + tr: HTMLTableRowElement; //#endregion //#region Methods diff --git a/types/jquery.pin/index.d.ts b/types/jquery.pin/index.d.ts new file mode 100644 index 0000000000..df132c6571 --- /dev/null +++ b/types/jquery.pin/index.d.ts @@ -0,0 +1,22 @@ +// Type definitions for JQuery Pin 1.0 +// Project: https://github.com/webpop/jquery.pin +// Definitions by: Anderson Friaça +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +export interface Options { + minWidth?: number; + activeClass?: string; + containerSelector?: string; + padding?: { + top?: number; + bottom?: number; + }; +} +declare global { + interface JQuery { + pin(options?: Options): JQuery; + } +} diff --git a/types/jquery.pin/jquery.pin-tests.ts b/types/jquery.pin/jquery.pin-tests.ts new file mode 100644 index 0000000000..b43c6e7881 --- /dev/null +++ b/types/jquery.pin/jquery.pin-tests.ts @@ -0,0 +1,17 @@ +import { Options } from "jquery.pin"; + +// basic usage +$(".pinned").pin(); + +// with options +const options: Options = { + activeClass: 'active', + minWidth: 940, + containerSelector: '.container', + padding: { + top: 10, + bottom: 10 + } +}; + +$(".pinned").pin(options); diff --git a/types/jquery.pin/tsconfig.json b/types/jquery.pin/tsconfig.json new file mode 100644 index 0000000000..4e880d5205 --- /dev/null +++ b/types/jquery.pin/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "jquery.pin-tests.ts" + ] +} \ No newline at end of file diff --git a/types/jquery.pin/tslint.json b/types/jquery.pin/tslint.json new file mode 100644 index 0000000000..d04fe2e1fa --- /dev/null +++ b/types/jquery.pin/tslint.json @@ -0,0 +1 @@ +{"extends": "dtslint/dt.json"} \ No newline at end of file diff --git a/types/jquery/index.d.ts b/types/jquery/index.d.ts index 90f6ffbd03..8422f3ec5c 100644 --- a/types/jquery/index.d.ts +++ b/types/jquery/index.d.ts @@ -152,7 +152,7 @@ interface JQueryStatic { * @since 1.4 */ (selector_object_callback?: JQuery.Selector | JQuery.htmlString | JQuery.TypeOrArray | JQuery | - JQuery.PlainObject | + JQuery.PlainObject | Window | ((this: Document, $: JQueryStatic) => void)): JQuery; /** * A multi-purpose callbacks list object that provides a powerful way to manage callback lists. diff --git a/types/jquery/test/jquery-slim-window-module-tests.ts b/types/jquery/test/jquery-slim-window-module-tests.ts index 76870e7a04..b47707cb23 100644 --- a/types/jquery/test/jquery-slim-window-module-tests.ts +++ b/types/jquery/test/jquery-slim-window-module-tests.ts @@ -1,4 +1,4 @@ -import * as jq from 'jquery/dist/jquery.slim'; +import jq = require('jquery/dist/jquery.slim'); const $window = jq(window); // $ExpectType JQuery diff --git a/types/jquery/test/jquery-window-module-tests.ts b/types/jquery/test/jquery-window-module-tests.ts index 71e20bc4a0..6bc5486fb9 100644 --- a/types/jquery/test/jquery-window-module-tests.ts +++ b/types/jquery/test/jquery-window-module-tests.ts @@ -1,4 +1,4 @@ -import * as jq from 'jquery'; +import jq = require('jquery'); const $window = jq(window); // $ExpectType JQuery diff --git a/types/js-money/index.d.ts b/types/js-money/index.d.ts new file mode 100644 index 0000000000..e778cf1fdb --- /dev/null +++ b/types/js-money/index.d.ts @@ -0,0 +1,166 @@ +// Type definitions for js-money 0.6 +// Project: https://github.com/davidkalosi/js-money +// Definitions by: Kanat Kubash +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Currency } from './lib/currency'; + +interface MoneyObjectOut { + amount: number; + currency: string; +} + +type Rounders = 'round' | 'floor' | 'ceil'; + +type RoundFunction = (num: number) => number; + +declare class Money { + constructor(amount: number, currency: string | Currency); + amount: number; + currency: string; + static fromInteger(amount: number, currency: string | Currency): Money; + static fromDecimal(amount: number, currency: string | Currency, rounder?: Rounders | RoundFunction): Money; + equals(other: Money): boolean; + add(other: Money): Money; + subtract(other: Money): Money; + multiply(multiplier: number, rounder?: RoundFunction): Money; + divide(divisor: number, rounder?: RoundFunction): Money; + allocate(ratios: number[]): Money[]; + compare(other: Money): number; + greaterThan(other: Money): boolean; + greaterThanOrEqual(other: Money): boolean; + lessThan(other: Money): boolean; + lessThanOrEqual(other: Money): boolean; + isZero(): boolean; + isPositive(): boolean; + isNegative(): boolean; + toDecimal(): number; + toString(): string; + toJSON(): MoneyObjectOut; + getAmount(): number; + getCurrency(): string; + //#region Currencies + static USD: Currency; + static CAD: Currency; + static EUR: Currency; + static BTC: Currency; + static AED: Currency; + static AFN: Currency; + static ALL: Currency; + static AMD: Currency; + static ARS: Currency; + static AUD: Currency; + static AZN: Currency; + static BAM: Currency; + static BDT: Currency; + static BGN: Currency; + static BHD: Currency; + static BIF: Currency; + static BND: Currency; + static BOB: Currency; + static BRL: Currency; + static BWP: Currency; + static BYR: Currency; + static BZD: Currency; + static CDF: Currency; + static CHF: Currency; + static CLP: Currency; + static CNY: Currency; + static COP: Currency; + static CRC: Currency; + static CVE: Currency; + static CZK: Currency; + static DJF: Currency; + static DKK: Currency; + static DOP: Currency; + static DZD: Currency; + static EEK: Currency; + static EGP: Currency; + static ERN: Currency; + static ETB: Currency; + static GBP: Currency; + static GEL: Currency; + static GHS: Currency; + static GNF: Currency; + static GTQ: Currency; + static HKD: Currency; + static HNL: Currency; + static HRK: Currency; + static HUF: Currency; + static IDR: Currency; + static ILS: Currency; + static INR: Currency; + static IQD: Currency; + static IRR: Currency; + static ISK: Currency; + static JMD: Currency; + static JOD: Currency; + static JPY: Currency; + static KES: Currency; + static KHR: Currency; + static KMF: Currency; + static KRW: Currency; + static KWD: Currency; + static KZT: Currency; + static LAK: Currency; + static LBP: Currency; + static LKR: Currency; + static LTL: Currency; + static LVL: Currency; + static LYD: Currency; + static MAD: Currency; + static MDL: Currency; + static MGA: Currency; + static MKD: Currency; + static MMK: Currency; + static MOP: Currency; + static MUR: Currency; + static MXN: Currency; + static MYR: Currency; + static MZN: Currency; + static NAD: Currency; + static NGN: Currency; + static NIO: Currency; + static NOK: Currency; + static NPR: Currency; + static NZD: Currency; + static OMR: Currency; + static PAB: Currency; + static PEN: Currency; + static PHP: Currency; + static PKR: Currency; + static PLN: Currency; + static PYG: Currency; + static QAR: Currency; + static RON: Currency; + static RSD: Currency; + static RUB: Currency; + static RWF: Currency; + static SAR: Currency; + static SDG: Currency; + static SEK: Currency; + static SGD: Currency; + static SOS: Currency; + static SYP: Currency; + static THB: Currency; + static TND: Currency; + static TOP: Currency; + static TRY: Currency; + static TTD: Currency; + static TWD: Currency; + static TZS: Currency; + static UAH: Currency; + static UGX: Currency; + static UYU: Currency; + static UZS: Currency; + static VEF: Currency; + static VND: Currency; + static XAF: Currency; + static XOF: Currency; + static YER: Currency; + static ZAR: Currency; + static ZMK: Currency; + //#endregion +} + +export = Money; diff --git a/types/js-money/js-money-tests.ts b/types/js-money/js-money-tests.ts new file mode 100644 index 0000000000..a75d41ac53 --- /dev/null +++ b/types/js-money/js-money-tests.ts @@ -0,0 +1,63 @@ +import Money = require('js-money'); +import * as CurrencyObjects from 'js-money/lib/currency'; + +const money = new Money(1500, 'USD'); +const other = new Money(100, Money.THB); + +// instance method checks +new Money(123, Money.TRY); // $ExpectType Money +new Money(1500, 'USD'); // $ExpectType Money +money.amount; // $ExpectType number +money.currency; // $ExpectType string +money.equals(other); // $ExpectType boolean +money.add(other); // $ExpectType Money +money.subtract(other); // $ExpectType Money +money.multiply(1); // $ExpectType Money +money.multiply(2, Math.round); // $ExpectType Money +money.divide(1); // $ExpectType Money +money.divide(1, Math.ceil); // $ExpectType Money +money.allocate([1, 2, 3]); // $ExpectType Money[] +money.compare(other); // $ExpectType number +money.greaterThan(other); // $ExpectType boolean +money.greaterThanOrEqual(other); // $ExpectType boolean +money.lessThan(other); // $ExpectType boolean +money.lessThanOrEqual(other); // $ExpectType boolean +money.isZero(); // $ExpectType boolean +money.isPositive(); // $ExpectType boolean +money.isNegative(); // $ExpectType boolean +money.toDecimal(); // $ExpectType number +money.toString(); // $ExpectType string +money.toJSON(); // $ExpectType MoneyObjectOut +money.toJSON().amount; // $ExpectType number +money.toJSON().currency; // $ExpectType string +money.getAmount(); // $ExpectType number +money.getCurrency(); // $ExpectType string + +// static method checks +Money.fromInteger(100, 'USD'); // $ExpectType Money +Money.fromDecimal(100, Money.KZT, 'ceil'); // $ExpectType Money +Money.fromDecimal(100, Money.KZT); // $ExpectType Money +Money.fromDecimal(100, Money.KZT, Math.ceil); // $ExpectType Money + +// static properties (currency) check +Money.KZT; // $ExpectType Currency +Money.RUB; // $ExpectType Currency +Money.BLABLA; // $ExpectError +// currency object check +Money.RUB.code; // $ExpectType string +Money.RUB.decimal_digits; // $ExpectType number +Money.RUB.name; // $ExpectType string +Money.RUB.name_plural; // $ExpectType string +Money.RUB.rounding; // $ExpectType number +Money.RUB.symbol; // $ExpectType string +Money.RUB.symbol_native; // $ExpectType string + +// Currency module check +CurrencyObjects.NIO.code; // $ExpectType string +CurrencyObjects.NIO.decimal_digits; // $ExpectType number +CurrencyObjects.NIO.name; // $ExpectType string +CurrencyObjects.NIO.name_plural; // $ExpectType string +CurrencyObjects.NIO.rounding; // $ExpectType number +CurrencyObjects.NIO.symbol; // $ExpectType string +CurrencyObjects.NIO.symbol_native; // $ExpectType string +CurrencyObjects['UAH'].code; // $ExpectType string diff --git a/types/js-money/lib/currency.d.ts b/types/js-money/lib/currency.d.ts new file mode 100644 index 0000000000..20be23cc7e --- /dev/null +++ b/types/js-money/lib/currency.d.ts @@ -0,0 +1,142 @@ +// Type definitions for js-money 0.6 +// Project: https://github.com/davidkalosi/js-money#readme +// Definitions by: Kanat Kubash +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace Currencies { + interface Currency { + symbol: string; + name: string; + symbol_native: string; + decimal_digits: number; + rounding: number; + code: string; + name_plural: string; + } + interface Currencies { + [key: string]: Currencies.Currency; + USD: Currencies.Currency; + CAD: Currencies.Currency; + EUR: Currencies.Currency; + BTC: Currencies.Currency; + AED: Currencies.Currency; + AFN: Currencies.Currency; + ALL: Currencies.Currency; + AMD: Currencies.Currency; + ARS: Currencies.Currency; + AUD: Currencies.Currency; + AZN: Currencies.Currency; + BAM: Currencies.Currency; + BDT: Currencies.Currency; + BGN: Currencies.Currency; + BHD: Currencies.Currency; + BIF: Currencies.Currency; + BND: Currencies.Currency; + BOB: Currencies.Currency; + BRL: Currencies.Currency; + BWP: Currencies.Currency; + BYR: Currencies.Currency; + BZD: Currencies.Currency; + CDF: Currencies.Currency; + CHF: Currencies.Currency; + CLP: Currencies.Currency; + CNY: Currencies.Currency; + COP: Currencies.Currency; + CRC: Currencies.Currency; + CVE: Currencies.Currency; + CZK: Currencies.Currency; + DJF: Currencies.Currency; + DKK: Currencies.Currency; + DOP: Currencies.Currency; + DZD: Currencies.Currency; + EEK: Currencies.Currency; + EGP: Currencies.Currency; + ERN: Currencies.Currency; + ETB: Currencies.Currency; + GBP: Currencies.Currency; + GEL: Currencies.Currency; + GHS: Currencies.Currency; + GNF: Currencies.Currency; + GTQ: Currencies.Currency; + HKD: Currencies.Currency; + HNL: Currencies.Currency; + HRK: Currencies.Currency; + HUF: Currencies.Currency; + IDR: Currencies.Currency; + ILS: Currencies.Currency; + INR: Currencies.Currency; + IQD: Currencies.Currency; + IRR: Currencies.Currency; + ISK: Currencies.Currency; + JMD: Currencies.Currency; + JOD: Currencies.Currency; + JPY: Currencies.Currency; + KES: Currencies.Currency; + KHR: Currencies.Currency; + KMF: Currencies.Currency; + KRW: Currencies.Currency; + KWD: Currencies.Currency; + KZT: Currencies.Currency; + LAK: Currencies.Currency; + LBP: Currencies.Currency; + LKR: Currencies.Currency; + LTL: Currencies.Currency; + LVL: Currencies.Currency; + LYD: Currencies.Currency; + MAD: Currencies.Currency; + MDL: Currencies.Currency; + MGA: Currencies.Currency; + MKD: Currencies.Currency; + MMK: Currencies.Currency; + MOP: Currencies.Currency; + MUR: Currencies.Currency; + MXN: Currencies.Currency; + MYR: Currencies.Currency; + MZN: Currencies.Currency; + NAD: Currencies.Currency; + NGN: Currencies.Currency; + NIO: Currencies.Currency; + NOK: Currencies.Currency; + NPR: Currencies.Currency; + NZD: Currencies.Currency; + OMR: Currencies.Currency; + PAB: Currencies.Currency; + PEN: Currencies.Currency; + PHP: Currencies.Currency; + PKR: Currencies.Currency; + PLN: Currencies.Currency; + PYG: Currencies.Currency; + QAR: Currencies.Currency; + RON: Currencies.Currency; + RSD: Currencies.Currency; + RUB: Currencies.Currency; + RWF: Currencies.Currency; + SAR: Currencies.Currency; + SDG: Currencies.Currency; + SEK: Currencies.Currency; + SGD: Currencies.Currency; + SOS: Currencies.Currency; + SYP: Currencies.Currency; + THB: Currencies.Currency; + TND: Currencies.Currency; + TOP: Currencies.Currency; + TRY: Currencies.Currency; + TTD: Currencies.Currency; + TWD: Currencies.Currency; + TZS: Currencies.Currency; + UAH: Currencies.Currency; + UGX: Currencies.Currency; + UYU: Currencies.Currency; + UZS: Currencies.Currency; + VEF: Currencies.Currency; + VND: Currencies.Currency; + XAF: Currencies.Currency; + XOF: Currencies.Currency; + YER: Currencies.Currency; + ZAR: Currencies.Currency; + ZMK: Currencies.Currency; + } +} + +declare var Currencies: Currencies.Currencies; +export = Currencies; \ No newline at end of file diff --git a/types/js-money/tsconfig.json b/types/js-money/tsconfig.json new file mode 100644 index 0000000000..9277913003 --- /dev/null +++ b/types/js-money/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "strictFunctionTypes": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "js-money-tests.ts" + ] +} \ No newline at end of file diff --git a/types/js-money/tslint.json b/types/js-money/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/js-money/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/js-string-escape/index.d.ts b/types/js-string-escape/index.d.ts new file mode 100644 index 0000000000..e9f888e6d0 --- /dev/null +++ b/types/js-string-escape/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for js-string-escape 1.0 +// Project: https://github.com/joliss/js-string-escape +// Definitions by: Jamie Davies +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function jsStringEscape(str: string): string; + +export = jsStringEscape; diff --git a/types/js-string-escape/js-string-escape-tests.ts b/types/js-string-escape/js-string-escape-tests.ts new file mode 100644 index 0000000000..88d691beeb --- /dev/null +++ b/types/js-string-escape/js-string-escape-tests.ts @@ -0,0 +1,3 @@ +import jsStringEscape = require('js-string-escape'); + +jsStringEscape('hello world'); diff --git a/types/js-string-escape/tsconfig.json b/types/js-string-escape/tsconfig.json new file mode 100644 index 0000000000..b119a31f6e --- /dev/null +++ b/types/js-string-escape/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "js-string-escape-tests.ts" + ] +} diff --git a/types/js-string-escape/tslint.json b/types/js-string-escape/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/js-string-escape/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/js-yaml/index.d.ts b/types/js-yaml/index.d.ts index 2fa264cbd9..da2d2a36c8 100644 --- a/types/js-yaml/index.d.ts +++ b/types/js-yaml/index.d.ts @@ -1,11 +1,15 @@ -// Type definitions for js-yaml 3.10 +// Type definitions for js-yaml 3.11 // Project: https://github.com/nodeca/js-yaml // Definitions by: Bart van der Schoor , Sebastian Clausen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -export function safeLoad(str: string, opts?: LoadOptions): any; -export function load(str: string, opts?: LoadOptions): any; +export as namespace jsyaml; + +export type DocumentLoadResult = object | undefined; + +export function safeLoad(str: string, opts?: LoadOptions): DocumentLoadResult; +export function load(str: string, opts?: LoadOptions): DocumentLoadResult; export class Type { constructor(tag: string, opts?: TypeConstructorOptions); @@ -26,8 +30,12 @@ export class Schema implements SchemaDefinition { static create(schemas: Schema[] | Schema, types: Type[] | Type): Schema; } -export function safeLoadAll(str: string, iterator?: (doc: any) => void, opts?: LoadOptions): any; -export function loadAll(str: string, iterator?: (doc: any) => void, opts?: LoadOptions): any; +export function safeLoadAll(str: string, iterator?: undefined, opts?: LoadOptions): DocumentLoadResult[]; +export function safeLoadAll(str: string, iterator: (doc: any) => void, opts?: LoadOptions): undefined; + +export function loadAll(str: string, iterator?: undefined, opts?: LoadOptions): DocumentLoadResult[]; + +export function loadAll(str: string, iterator: (doc: any) => void, opts?: LoadOptions): undefined; export function safeDump(obj: any, opts?: DumpOptions): string; export function dump(obj: any, opts?: DumpOptions): string; diff --git a/types/js-yaml/js-yaml-tests.ts b/types/js-yaml/js-yaml-tests.ts index 3d5ecc17bf..9a61da204f 100644 --- a/types/js-yaml/js-yaml-tests.ts +++ b/types/js-yaml/js-yaml-tests.ts @@ -109,40 +109,44 @@ type.styleAliases; // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -// $ExpectType any +// $ExpectType DocumentLoadResult yaml.safeLoad(str); -// $ExpectType any +// $ExpectType DocumentLoadResult yaml.safeLoad(str, loadOpts); -// $ExpectType any +// $ExpectType DocumentLoadResult yaml.load(str); -// $ExpectType any +// $ExpectType DocumentLoadResult yaml.load(str, loadOpts); // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -// $ExpectType any +// $ExpectType DocumentLoadResult[] yaml.safeLoadAll(str); -// $ExpectType any + +// $ExpectType undefined yaml.safeLoadAll(str, (doc) => { value = doc; }); -// $ExpectType any +// $ExpectType undefined yaml.safeLoadAll(str, (doc) => { value = doc; }, loadOpts); +// $ExpectType DocumentLoadResult[] value = yaml.safeLoadAll(str, undefined, loadOpts); -// $ExpectType any +// $ExpectType DocumentLoadResult[] value = yaml.loadAll(str); -// $ExpectType any + +// $ExpectType undefined yaml.loadAll(str, (doc) => { value = doc; }); -// $ExpectType any +// $ExpectType undefined yaml.loadAll(str, (doc) => { value = doc; }, loadOpts); +// $ExpectType DocumentLoadResult[] value = yaml.loadAll(str, undefined, loadOpts); // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- diff --git a/types/jsforce/api/analytics.d.ts b/types/jsforce/api/analytics.d.ts new file mode 100644 index 0000000000..02f04fac41 --- /dev/null +++ b/types/jsforce/api/analytics.d.ts @@ -0,0 +1,82 @@ +import { callback } from '../connection'; + +interface ReportInfo { +} + +export class Dashboard { + describe(callback?: callback): Promise; + + del(callback?: callback): Promise; + + destory(callback?: callback): Promise; + + delete(callback?: callback): Promise; + + components(componentIds: () => any | string[] | string, callback?: callback): Promise; + + status(callback?: callback): Promise; + + refresh(callback?: callback): Promise; + + clone(name: string | object, folderid: string, callback?: callback): Promise; +} + +export class ReportInstance { + constructor(report: Report, id: string); + + retrieve(callback: callback): Promise +} + +export class Report { + describe(callback?: callback): Promise; + + del(callback?: callback): Promise; + + destory(callback?: callback): Promise; + + delete(callback?: callback): Promise; + + clone(name: string, callback?: callback): Promise; + + explain(callback?: callback): Promise; + + run(options: () => any | object, callback?: callback): Promise; + + exec(options: () => any | object, callback?: callback): Promise; + + execute(options: () => any | object, callback?: callback): Promise; + + executeAsync(options: () => any | object, callback?: callback): Promise; + + instance(id: string): ReportInstance; + + instances(callback?: callback): Promise; +} + +export interface ReportInstanceAttrs { +} + +export interface ExplainInfo { +} + +export interface ReportMetadata { +} + +export interface ReportResult { +} + +export interface ReportInfo { +} + +export interface DashboardInfo { +} + +export class Analytics { + report(id: string): Promise; + + reports(callback?: callback): Promise; + + dashboard(id: string): Promise; + + dashboards(callback?: callback): Promise; +} diff --git a/types/jsforce/api/chatter.d.ts b/types/jsforce/api/chatter.d.ts new file mode 100644 index 0000000000..05fc4551e0 --- /dev/null +++ b/types/jsforce/api/chatter.d.ts @@ -0,0 +1,71 @@ +import { Connection, callback } from '../connection'; +import { Query } from '../query'; +import { Stream } from 'stream'; + +interface BatchRequestParams extends RequestParams { + method: string; + url: string; + richInput?: string; +} + +interface BatchRequestResult { + statusCode: string; + result: RequestResult; +} + +interface BatchRequestResults { + hasError: boolean; + results: BatchRequestResult[]; +} + +interface RequestParams { + method: string; + url: string; + body?: string; +} + +export class RequestResult { +} + +export class Request implements Promise { + constructor(chatter: Chatter, params: RequestParams); + + batchParams(): BatchRequestParams; + + promise(): Promise; + + stream(): Stream; + + catch(onrejected?: ((reason: any) => (PromiseLike | TResult)) | null | undefined): Promise; + + then(onfulfilled?: ((value: T) => (PromiseLike | TResult1)) | null | undefined, + onrejected?: ((reason: any) => (PromiseLike | TResult2)) | null | undefined): Promise; + + thenCall(callback?: (err: Error, records: T) => void): Query; + + readonly [Symbol.toStringTag]: 'Promise'; +} + +export class Resource extends Request { + constructor(chatter: Chatter, url: string, queryParams?: object); + + create(data: object | string, callback?: callback): Request; + + del(callback?: callback): Request; + + delete(callback?: callback): Request; + + retrieve(callback?: callback): Request; + + update(data: object, callback?: callback): Request; +} + +export class Chatter { + constructor(conn: Connection); + + batch(callback?: callback): Promise; + + request(params: RequestParams, callback?: callback>): Request; + + resource(url: string, queryParams?: object): Resource +} diff --git a/types/jsforce/api/metadata.d.ts b/types/jsforce/api/metadata.d.ts new file mode 100644 index 0000000000..c867ece15b --- /dev/null +++ b/types/jsforce/api/metadata.d.ts @@ -0,0 +1,178 @@ +import { callback, Connection } from '../connection'; +import { EventEmitter } from 'events'; +import { Stream } from 'stream'; + +interface DeployResult { + id: string; + checkOnly: boolean; + completedDate: string; + createdDate: string; + details?: object[]; + done: boolean; + errorMessage?: string; + errorStatusCode?: string; + ignoreWarnings?: boolean; + lastModifiedDate: string; + numberComponentErrors: number; + numberComponentsDeployed: number; + numberComponentsTotal: number; + numberTestErrors: number; + numberTestsCompleted: number; + numberTestsTotal: number; + rollbackOnError?: boolean; + startDate: string; + status: string; + success: boolean; +} + +interface MetadataObject { + childXmlNames: string[]; + directoryName: string; + inFolder: boolean; + metaFile: boolean; + suffix: string; + xmlName: string; +} + +interface DescribeMetadataResult { + metadataObjects: MetadataObject[]; + organizationNamespace: string; + partialSaveAllowed: boolean; + testRequired: boolean; +} + +interface FileProperties { + type: string; + createdById: string; + createdByName: string; + createdDate: string; + fileName: string; + fullName: string; + id: string; + lastModifiedById: string; + lastModifiedByName: string; + lastModifiedDate: string; + manageableState?: string; + namespacePrefix?: string; +} + +interface ListMetadataQuery { + type: string; + folder?: string; +} + +interface MetadataInfo { + fullName: string; +} + +interface RetrieveRequest { +} + +interface RetrieveResult { + fileProperties: FileProperties[]; + id: string; + messages: object[]; + zipFile: string +} + +interface SaveResult { + success: boolean; + fullName: string; +} + +interface UpdateMetadataInfo { + currentName: string; + metadata: MetadataInfo; +} + +interface UpsertResult { + success: boolean; + fullName: string; + created: boolean; +} + +interface AsyncResult { + done: boolean; + id: string; + state: string; + statusCode?: string; + message?: string; +} + +interface DeployOptions { + allowMissingFiles?: boolean; + autoUpdatePackage?: boolean; + checkOnly?: boolean; + ignoreWarnings?: boolean; + performRetrieve?: boolean; + purgeOnDelete?: boolean; + rollbackOnError?: boolean; + runAllTests?: boolean; + runTests?: string[]; + singlePackage?: boolean; +} + +export class AsyncResultLocator extends EventEmitter implements Promise { + check(callback?: callback): Promise + + complete(callback?: callback): Promise + + poll(interval: number, timeout: number): void; + + catch(onrejected?: ((reason: any) => (PromiseLike | TResult)) | null | undefined): Promise; + + then(onfulfilled?: ((value: T) => (PromiseLike | TResult1)) | null | undefined, + onrejected?: ((reason: any) => (PromiseLike | TResult2)) | null | undefined): Promise; + + readonly [Symbol.toStringTag]: "Promise"; +} + +export class DeployResultLocator extends AsyncResultLocator {} +export class RetrieveResultLocator extends AsyncResultLocator {} + +export class Metadata { + pollInterval: number; + pollTimeout: number; + + constructor(conn: Connection); + + checkDeployStatus(id: string, includeDetails?: boolean, callback?: callback): Promise + + checkRetrieveStatus(id: string, callback?: callback): Promise + + checkStatus(ids: string | string[], callback?: callback>): AsyncResultLocator> + + create(type: string, metadata: MetadataInfo | Array, callback?: callback>): Promise> + + createAsync(type: string, metadata: MetadataInfo | Array, callback?: callback>): Promise> + + createSync(type: string, metadata: MetadataInfo | Array, callback?: callback>): Promise>; + + delete(type: string, fullNames: string | string[], callback?: callback>): Promise>; + + deleteAsync(type: string, metadata: string | string[] | MetadataInfo | Array, callback?: callback>): AsyncResultLocator> + + deleteSync(type: string, fullNames: string | string[], callback?: callback>): Promise>; + + deploy(zipInput: Stream | Buffer | string, options: DeployOptions, callback?:callback): DeployResultLocator; + + describe(version?: string, callback?: callback): Promise; + + list(queries: ListMetadataQuery | Array, version?: string, callback?: callback>): Promise>; + + read(type: string, fullNames: string | string[], callback?: callback>): Promise>; + + readSync(type: string, fullNames: string | string[], callback?: callback>): Promise>; + + rename(type: string, oldFullName: string, newFullName: string, callback?: callback): Promise + + retrieve(request: RetrieveRequest, callback: callback): RetrieveResultLocator + + update(type: string, updateMetadata: MetadataInfo | Array, callback?: callback>): Promise> + + updateAsync(type: string, updateMetadata: MetadataInfo, callback?: callback>): AsyncResultLocator> + + updateSync(type: string, updateMetadata: MetadataInfo | Array, callback?: callback>): Promise> + + upsert(type: string, metadata: MetadataInfo | Array, callback?: callback>): Promise> +} diff --git a/types/jsforce/connection.d.ts b/types/jsforce/connection.d.ts index 4c3e1eb5fb..06cda5e29f 100644 --- a/types/jsforce/connection.d.ts +++ b/types/jsforce/connection.d.ts @@ -1,8 +1,14 @@ -import { SObjectCreateOptions } from './create-options'; -import { DescribeSObjectResult } from './describe-result'; +import { EventEmitter } from 'events'; +import { DescribeSObjectResult, DescribeGlobalResult } from './describe-result'; import { Query, QueryResult } from './query'; +import { Record } from './record'; import { RecordResult } from './record-result'; import { SObject } from './salesforce-object'; +import { Analytics } from './api/analytics'; +import { Chatter } from './api/chatter'; +import { Metadata } from './api/metadata'; + +export type callback = (err: Error, result: T) => void; // These are pulled out because according to http://jsforce.github.io/jsforce/doc/connection.js.html#line49 // the oauth options can either be in the `oauth2` proeprty OR spread across the main connection @@ -13,6 +19,12 @@ export interface OAuth2Options { redirectUri?: string; } +export interface RequestInfo { + method?: string; + url?: string; + headers?: object; +} + export interface ConnectionOptions extends OAuth2Options { accessToken?: string; callOptions?: Object; @@ -36,6 +48,14 @@ export interface UserInfo { url: string; } +export abstract class RestApi { + get(path: string, options: object, callback: () => object): Promise; + post(path: string, body: object, options: object, callback: () => object): Promise; + put(path: string, body: object, options: object, callback: () => object): Promise; + patch(path: string, body: object, options: object, callback: () => object): Promise; + del(path: string, options: object, callback: () => object): Promise; +} + export type ConnectionEvent = "refresh"; /** @@ -57,19 +77,58 @@ export type ConnectionEvent = "refresh"; * * to ensure that you have the correct data types for the various collection names. */ -export interface Connection { +export abstract class BaseConnection extends EventEmitter { + _baseUrl(): string; + request(info: RequestInfo | string, options?: Object, callback?: (err: Error, Object: object) => void): Promise; query(soql: string, callback?: (err: Error, result: QueryResult) => void): Query>; + queryMore(locator: string, options?: object, callback?: (err: Error, result: QueryResult) => void): Promise>; + create(type: string, records: Record|Array>, options?: Object, + callback?: (err: Error, result: RecordResult | RecordResult[]) => void): Promise<(RecordResult | RecordResult[])>; + insert(type: string, records: Record|Array>, options?: Object, + callback?: (err: Error, result: RecordResult | RecordResult[]) => void): Promise<(RecordResult | RecordResult[])>; + retrieve(type: string, ids: string|string[], options?: Object, + callback?: (err: Error, result: Record | Array>) => void): Promise<(Record | Array>)>; + update(type: string, records: Record|Array>, options?: Object, + callback?: (err: Error, result: RecordResult | Array>) => void): Promise<(RecordResult | RecordResult[])>; + upsert(type: string, records: Record|Array>, extIdField: string, options?: Object, + callback?: (err: Error, result: RecordResult | RecordResult[]) => void): Promise<(RecordResult | RecordResult[])>; + del(type: string, ids: string|string[], options?: Object, + callback?: (err: Error, result: RecordResult | RecordResult[]) => void): Promise<(RecordResult | RecordResult[])>; + delete(type: string, ids: string|string[], options?: Object, + callback?: (err: Error, result: RecordResult | RecordResult[]) => void): Promise<(RecordResult | RecordResult[])>; + destroy(type: string, ids: string|string[], options?: Object, + callback?: (err: Error, result: RecordResult | RecordResult[]) => void): Promise<(RecordResult | RecordResult[])>; + describe(type: string, callback?: (err: Error, result: DescribeSObjectResult) => void): Promise; + describeGlobal(callback?: (err: Error, result: DescribeGlobalResult) => void): Promise; sobject(resource: string): SObject; } -export class Connection implements Connection { +export class Connection extends BaseConnection { constructor(params: ConnectionOptions) + + tooling: Tooling; + analytics: Analytics; + chatter: Chatter; + metadata: Metadata; + + // Specific to Connection + instanceUrl: string; + version: string; accessToken: string; + initialize(options?: ConnectionOptions): void; + queryAll(soql: string, options?: object, callback?: (err: Error, result: QueryResult) => void): Query>; + authorize(code: string, callback?: (err: Error, res: UserInfo) => void): Promise; login(user: string, password: string, callback?: (err: Error, res: UserInfo) => void): Promise; loginByOAuth2(user: string, password: string, callback?: (err: Error, res: UserInfo) => void): Promise; loginBySoap(user: string, password: string, callback?: (err: Error, res: UserInfo) => void): Promise; logout(callback?: (err: Error, res: undefined) => void): Promise; logoutByOAuth2(callback?: (err: Error, res: undefined) => void): Promise; logoutBySoap(callback?: (err: Error, res: undefined) => void): Promise; - on(eventName: ConnectionEvent, callback: Function): void; +} + +export class Tooling extends BaseConnection { + _logger: any; + + // Specific to tooling + executeAnonymous(body: string, callback?: (err: Error, res: any) => void): Promise; } diff --git a/types/jsforce/describe-result.d.ts b/types/jsforce/describe-result.d.ts index 584a62d3bf..352c4223a6 100644 --- a/types/jsforce/describe-result.d.ts +++ b/types/jsforce/describe-result.d.ts @@ -1,4 +1,30 @@ export interface DescribeSObjectResult { label: string; - fields: string[]; + fields: object[]; +} + +export interface DescribeGlobalResult { + activateable: boolean; + createable: boolean; + custom: boolean; + customSetting: boolean; + deletable: boolean; + deprecatedAndHidden: boolean; + feedEnabled: boolean; + hasSubtypes: boolean; + isSubtype: boolean; + keyPrefix: string; + label: string; + labelPlural: string; + layoutable: boolean; + mergeable: boolean; + mruEnabled: boolean; + name: string; + queryable: boolean; + replicateable: boolean; + retrieveable: boolean; + searchable: boolean; + triggerable: boolean; + undeletable: boolean; + updateable: boolean; } diff --git a/types/jsforce/index.d.ts b/types/jsforce/index.d.ts index 73a848b79f..edb2830f52 100644 --- a/types/jsforce/index.d.ts +++ b/types/jsforce/index.d.ts @@ -2,6 +2,8 @@ // Project: https://github.com/jsforce/jsforce // Definitions by: Dolan Miu // Kamil Ejsymont +// Thomas Dvornik +// Tim Noonan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -13,6 +15,16 @@ import * as glob from 'glob'; export { Date } from './date-enum'; export { Record } from './record'; export { RecordResult } from './record-result'; -export { Connection } from './connection'; +export { Connection, ConnectionOptions, RequestInfo, Tooling, callback } from './connection'; export { SObject } from './salesforce-object'; export { SalesforceId } from './salesforce-id'; +export { OAuth2, OAuth2Options } from './oauth2'; +export { Query, QueryResult } from './query'; +export { Promise } from './promise'; +export { Report, Dashboard, Analytics, ReportInstance, DashboardInfo, ReportInfo, ExplainInfo, ReportInstanceAttrs, + ReportMetadata, ReportResult } from './api/analytics'; +export { Chatter, Request, RequestResult, BatchRequestResults, BatchRequestParams, + Resource, BatchRequestResult, RequestParams } from './api/chatter'; +export { Metadata, SaveResult, MetadataInfo, AsyncResult, RetrieveResultLocator, RetrieveRequest, FileProperties, + ListMetadataQuery, DescribeMetadataResult, DeployOptions, AsyncResultLocator, RetrieveResult, MetadataObject, + DeployResult, DeployResultLocator, UpdateMetadataInfo, UpsertResult } from './api/metadata'; diff --git a/types/jsforce/jsforce-tests.ts b/types/jsforce/jsforce-tests.ts index 2c1b5b1f9c..9205d59096 100644 --- a/types/jsforce/jsforce-tests.ts +++ b/types/jsforce/jsforce-tests.ts @@ -79,7 +79,7 @@ salesforceConnection.query('SELECT Id FROM Account') .on('end', (query: any) => { console.log(records); }) - .on('error', (error) => { + .on('error', (error: Error) => { console.log('Error returned from query:', error); }) .run({ autoFetch: true, maxFetch: 25 }); @@ -89,3 +89,191 @@ salesforceConnection.sobject('Coverage__c') salesforceConnection.sobject('Coverage__c') .select(['Id', 'Name']).del("test", () => { }); + +async function testAnalytics(conn: sf.Connection): Promise { + const analytics: sf.Analytics = conn.analytics; + + const dashboards: sf.DashboardInfo[] = await analytics.dashboards(); + const dashboard = dashboards[0] as any; + Object.keys(dashboards[0]) + .forEach((key: string) => console.log(`key: ${key} : ${dashboard[key]}`)); + console.log('dashboard keys from await'); + + analytics.dashboards((err, dashboards: sf.DashboardInfo[]) => { + const _dashboard: any = dashboards[0] as any; + Object.keys(_dashboard) + .forEach((key: string) => console.log(`key: ${key} : ${_dashboard[key]}`)); + console.log('dashboard keys from callback'); + }); + + const reports: sf.ReportInfo[] = await analytics.reports(); + const report: any = reports[0] as any; + Object.keys(reports[0]).forEach((key: string) => console.log(`key: ${key} : ${report[key]}`)); + + analytics.reports((err, reports: sf.ReportInfo[]) => { + const _report: any = reports[0] as any; + Object.keys(reports[0]) + .forEach((key: string) => console.log(`key: ${key} : ${_report[key]}`)); + console.log('report keys from callback'); + }); +} + +async function testMetadata(conn: sf.Connection): Promise { + const md: sf.Metadata = conn.metadata; + const m: sf.DescribeMetadataResult = await md.describe('34.0'); + const pages: sf.MetadataObject[] = + m.metadataObjects.filter((value: sf.MetadataObject) => value.directoryName === 'pages'); + console.log(`ApexPage?: ${pages[0].xmlName === 'ApexPage'}`); + + const types: sf.ListMetadataQuery[] = [{type: 'CustomObject', folder: null}]; + md.list(types, '39.0', (err, properties: sf.FileProperties[]) => { + if (err) { + console.error('err', err); + return; + } + const meta: sf.FileProperties = properties[0]; + console.log('metadata count: ' + properties.length); + console.log('createdById: ' + meta.createdById); + console.log('createdByName: ' + meta.createdByName); + console.log('createdDate: ' + meta.createdDate); + console.log('fileName: ' + meta.fileName); + console.log('fullName: ' + meta.fullName); + console.log('id: ' + meta.id); + console.log('lastModifiedById: ' + meta.lastModifiedById); + console.log('lastModifiedByName: ' + meta.lastModifiedByName); + console.log('lastModifiedDate: ' + meta.lastModifiedDate); + console.log('manageableState: ' + meta.manageableState); + console.log('namespacePrefix: ' + meta.namespacePrefix); + console.log('type: ' + meta.type); + }); + + const fullNames: string[] = [ 'Account', 'Contact' ]; + const info: sf.MetadataInfo | sf.MetadataInfo[] = await md.read('CustomObject', fullNames); + console.log((info as sf.MetadataInfo[])[0].fullName); + console.log((info as sf.MetadataInfo[])[1].fullName); + + const now: number = Date.now(); + const now2: number = now + 1; + const metadata = [{ + fullName: `TestObject${now}__c`, + label: `Test Object ${now}`, + pluralLabel: `Test Object ${now}`, + nameField: { + type: 'Text', + label: `Test Object Name ${now}` + }, + deploymentStatus: 'Deployed', + sharingModel: 'ReadWrite' + }, { + fullName: `TestObject${now2}__c`, + label: `Test Object ${now2}`, + pluralLabel: `Test Object ${now2}`, + nameField: { + type: 'AutoNumber', + label: 'Test Object #' + }, + deploymentStatus: 'InDevelopment', + sharingModel: 'Private' + }]; + + const result: sf.SaveResult | sf.SaveResult[] = await md.create('CustomObject', metadata); + console.log(`created ${(result as sf.SaveResult[])[0].fullName} - ${(result as sf.SaveResult[])[0].success}`); + console.log(`created ${(result as sf.SaveResult[])[1].fullName} - ${(result as sf.SaveResult[])[1].success}`); + + const fullNames2: string[] = [`TestObject${now}__c`, `TestObject${now2}__c`]; + const result2: sf.SaveResult | sf.SaveResult[] = + await (md.delete('CustomObject', fullNames2) as Promise); + console.log(`deleted ${result2[0].fullName} - ${result2[0].success}`); + console.log(`deleted ${result2[1].fullName} - ${result2[1].success}`); +} + +async function testChatter(conn: sf.Connection): Promise { + const chatter: sf.Chatter = conn.chatter; + chatter.resource('/feed-elements').create({ + body: { + messageSegments: [{ + type: 'Text', + text: 'This is new post' + }] + }, + feedElementType : 'FeedItem', + subjectId: 'me' + }, (err: Error, result: any) => { + if (err) { + throw err; + } + const feedMessageUrl = `/feed-elements/${result.id}/capabilities/comments/items`; + chatter.resource(feedMessageUrl).create({ + body: { + messageSegments: [{ + type: 'Text', + text: 'This is new comment on the post' + }] + } + }, (err: Error, result: any) => { + if (err) { + throw err; + } + console.log("Id: " + result.id); + console.log("URL: " + result.url); + console.log("Body: " + result.body.messageSegments[0].text); + }); + }); + + const resourceMe: sf.Resource = chatter.resource('/users/me'); + resourceMe.retrieve((err, res: any) => { + if (err) { + console.error(err); + return; + } + console.log("username: " + res.username); + console.log("email: " + res.email); + console.log("small photo url: " + res.photo.smallPhotoUrl); + }); + + chatter.resource('/users', { q: 'Suzuki' }).retrieve((err, result: any) => { + if (err) { + console.error(err); + return; + } + console.log("current page URL: " + result['currentPageUrl']); + console.log("next page URL: " + result['nextPageUrl']); + console.log("users count: " + result['users'].length); + for (const user of result['users']) { + console.log('User ID: ' + user.id); + console.log('User URL: ' + user.url); + console.log('Username: ' + user.username); + } + }); + + const feedResource: sf.Resource = chatter.resource('/feed-elements'); + + const feedCreateRequest: any = await (feedResource.create({ + body: { + messageSegments: [{ + type: 'Text', + text: 'This is new comment on the post' + }] + }, + feedElementType : 'FeedItem', + subjectId: 'me' + }) as Promise); + + console.log(`feedCreateRequest.id: ${feedCreateRequest.id}`); + const itemLikesUrl = `/feed-elements/${feedCreateRequest.id}/capabilities/chatter-likes/items`; + const itemsLikeResource: sf.Resource = chatter.resource(itemLikesUrl); + + const itemsLikeCreateResult: sf.RequestResult = await (itemsLikeResource.create('') as Promise); + console.log(`itemsLikeCreateResult['likedItem']: ${itemsLikeCreateResult as any ['likedItem']}`); +} + +(async () => { + const query2: sf.QueryResult = + await (salesforceConnection.query("SELECT Id, Name FROM User") as Promise>); + console.log("Query Promise: total in database: " + query2.totalSize); + console.log("Query Promise: total fetched : " + query2.records[0]); + + await testAnalytics(salesforceConnection); + await testChatter(salesforceConnection); + await testMetadata(salesforceConnection); +})(); diff --git a/types/jsforce/oauth2.d.ts b/types/jsforce/oauth2.d.ts new file mode 100644 index 0000000000..833a9d45fd --- /dev/null +++ b/types/jsforce/oauth2.d.ts @@ -0,0 +1,35 @@ +export interface OAuth2Options { + authzServiceUrl?: string; + tokenServiceUrl?: string; + clientId?: string; + clientSecret?: string; + httpProxy?: string; + loginUrl?: string; + proxyUrl?: string; + redirectUri?: string; + refreshToken?: string; + revokeServiceUrl?: string; + authCode?: string; + privateKeyFile?: string; + privateKey?: string; // Used for sfdx auth files for legacy support reasons +} + +export class OAuth2 { + constructor (options? : OAuth2Options); + + protected _postParams(options: any, callback: () => any): void + + loginUrl: string; + authzServiceUrl: string; + tokenServiceUrl: string; + revokeServiceUrl: string; + clientId: string; + clientSecret: string; + redirectUri: string; + + getAuthorizationUrl(params: any): string; + refreshToken(code: string, callback?: () => any): Promise; + requestToken(code: string, callback?: () => any): Promise; + authenticate(username: string, password: string, callback?: () => any): Promise; + revokeToken(accessToken: string, callback?: () => any): Promise; +} diff --git a/types/jsforce/promise.d.ts b/types/jsforce/promise.d.ts new file mode 100644 index 0000000000..f4f6e0660b --- /dev/null +++ b/types/jsforce/promise.d.ts @@ -0,0 +1,3 @@ +export class Promise { + thenCall: (cb: () => void) => void; +} diff --git a/types/jsforce/query.d.ts b/types/jsforce/query.d.ts index 242d89b358..b33af41ede 100644 --- a/types/jsforce/query.d.ts +++ b/types/jsforce/query.d.ts @@ -1,7 +1,5 @@ // http://jsforce.github.io/jsforce/doc/Query.html import { Readable } from 'stream'; - -import { SalesforceId } from './salesforce-id'; import { RecordResult } from './record-result'; export interface ExecuteOptions { @@ -19,37 +17,63 @@ export interface QueryResult { export class Query extends Readable implements Promise { end(): Query; + filter(filter: Object): Query; + include(include: string): Query; + hint(hint: Object): Query; + limit(value: number): Query; + maxFetch(value: number): Query; + offset(value: number): Query; + skip(value: number): Query; - sort(keyOrList: string | Object[] | Object, direction?: "ASC" | "DESC" | number): Query; + + sort(keyOrList: string | Object[] | Object, direction?: 'ASC' | 'DESC' | number): Query; + run(options?: ExecuteOptions, callback?: (err: Error, records: T[]) => void): Query; + execute(options?: ExecuteOptions, callback?: (err: Error, records: T[]) => void): Query; + exec(options?: ExecuteOptions, callback?: (err: Error, records: T[]) => void): Query; + del(type?: string, callback?: (err: Error, ret: RecordResult) => void): any; del(callback?: (err: Error, ret: RecordResult) => void): any; + delete(type?: string, callback?: (err: Error, ret: RecordResult) => void): any; delete(callback?: (err: Error, ret: RecordResult) => void): any; + destroy(type?: string, callback?: (err: Error, ret: RecordResult) => void): Promise; destroy(callback?: (err: Error, ret: RecordResult) => void): Promise; destroy(error?: Error): void; + explain(callback?: (err: Error, info: ExplainInfo) => void): Promise; + map(callback: (currentValue: Object) => void): Promise; + scanAll(value: boolean): Query; + select(fields: Object | string[] | string): Query; + thenCall(callback?: (err: Error, records: T) => void): Query; + toSOQL(callback: (err: Error, soql: string) => void): Promise; + update(mapping: any, type: string, callback: (err: Error, records: RecordResult[]) => void): Promise; + where(conditions: Object | string): Query; - // Implementing promise methods - then(onfulfilled?: any): Promise; - catch(onrejected?: any): Promise; - [Symbol.toStringTag]: "Promise"; + finally(): Promise; + + [Symbol.toStringTag]: 'Promise'; + + catch(onrejected?: ((reason: any) => (PromiseLike | TResult))): Promise; + + then(onfulfilled?: ((value: T) => (PromiseLike | TResult1)), + onrejected?: ((reason: any) => (PromiseLike | TResult2))): Promise; } -export class ExplainInfo { } +export class ExplainInfo {} diff --git a/types/json-schema/index.d.ts b/types/json-schema/index.d.ts index 7f02b671a0..4c483dd42d 100644 --- a/types/json-schema/index.d.ts +++ b/types/json-schema/index.d.ts @@ -1,6 +1,8 @@ // Type definitions for json-schema 4.0 and 6.0 // Project: https://www.npmjs.com/package/json-schema -// Definitions by: Boris Cherny , Cyrille Tuzi +// Definitions by: Boris Cherny +// Cyrille Tuzi +// Lucian Buzzo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -197,6 +199,8 @@ export interface JSONSchema4 { * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6 */ [k: string]: any + + format?: string } /* JSON Schema 6 */ @@ -470,4 +474,9 @@ export interface JSONSchema6 { * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4 */ examples?: JSONSchema6Type[] + + /** + * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8 + */ + format?: string } diff --git a/types/json-schema/json-schema-tests.ts b/types/json-schema/json-schema-tests.ts index 0fd15f5de9..fdfe4d0435 100644 --- a/types/json-schema/json-schema-tests.ts +++ b/types/json-schema/json-schema-tests.ts @@ -64,7 +64,8 @@ import { JSONSchema4, JSONSchema4Type, JSONSchema4TypeName, JSONSchema6, JSONSch oneOf: [{}], not: {}, extends: 'foo', - bar: 4 + bar: 4, + format: 'date-time' } } @@ -134,6 +135,7 @@ import { JSONSchema4, JSONSchema4Type, JSONSchema4TypeName, JSONSchema6, JSONSch const: 'foo', contains: {}, examples: [{}], - propertyNames: {} + propertyNames: {}, + format: 'date-time' } } diff --git a/types/json2csv/JSON2CSVBase.d.ts b/types/json2csv/JSON2CSVBase.d.ts new file mode 100644 index 0000000000..c5f328db1f --- /dev/null +++ b/types/json2csv/JSON2CSVBase.d.ts @@ -0,0 +1,109 @@ +export declare namespace json2csv { + export interface FieldValueCallback { + (row: T, field: string): string; + } + + export interface FieldInfo { + label: string; + default?: string; + value?: string | FieldValueCallback; + } + + export interface Options { + fields?: Array>; + ndjson?: boolean; + unwind?: string | Array; + unwindBlank?: boolean; + flatten?: boolean; + defaultValue?: string; + quote?: string; + doubleQuote?: string; + delimiter?: string; + eol?: string; + excelStrings?: boolean; + header?: boolean; + includeEmptyRows?: boolean; + withBOM?: boolean; + } +} + +declare abstract class JSON2CSVBase { + constructor(opts?: json2csv.Options); + + /** + * Check passing opts and set defaults. + * + * @param {json2csv.Options} opts Options object containing fields, + * delimiter, default value, quote mark, header, etc. + * @returns {json2csv.Options} preprocessed Options object + */ + protected preprocessOpts(opts?: json2csv.Options) : json2csv.Options; + + /** + * Create the title row with all the provided fields as column headings + * + * @returns {string} titles as a string + */ + protected getHeader(): string; + + /** + * Preprocess each object according to the give opts (unwind, flatten, etc.). + * + * @param {object} row JSON object to be converted in a CSV row + */ + protected preprocessRow(row: T): object; + + /** + * Create the content of a specific CSV row + * + * @param {object} row JSON object to be converted in a CSV row + * @returns {string} CSV string (row) + */ + protected processRow(row: T): string; + + /** + * Create the content of a specfic CSV row cell + * + * @param {object} row JSON object representing the CSV row that the cell belongs to + * @param {object} fieldInfo Details of the field to process to be a CSV cell + * @returns {string} CSV string (cell) + */ + protected processCell(row: T, fieldInfo: json2csv.FieldInfo) : string; + + /** + * Create the content of a specfic CSV row cell + * + * @param {object} row JSON object representing the CSV row that the cell belongs to + * @param {json2csv.FieldInfo} fieldInfo Details of the field to process to be a CSV cell + * @returns {any} Field value + */ + protected getValue(row: T, fieldInfo: json2csv.FieldInfo): any; + + /** + * Create the content of a specfic CSV row cell + * + * @param {any} value Value to be included in a CSV cell + * @param {Boolean} stringify Details of the field to process to be a CSV cell + * @returns {string} Value stringified and processed + */ + protected processValue(value: any, stringify: Boolean): string; + + /** + * Performs the flattening of a data row recursively + * + * @param {object} dataRow Original JSON object + * @returns {object} Flattened object + */ + protected flatten(dataRow: T): object; + + /** + * Performs the unwind recursively in specified sequence + * + * @param {object[]} dataRow Original JSON object + * @param {string[]} unwindPaths The paths as strings to be used to deconstruct the array + * @returns {Array} Array of objects containing all rows after unwind of chosen paths + */ + protected unwindData(dataRow: Array, unwindPaths: Array): Array; +} + +export default JSON2CSVBase; diff --git a/types/json2csv/JSON2CSVParser.d.ts b/types/json2csv/JSON2CSVParser.d.ts new file mode 100644 index 0000000000..1f134f874c --- /dev/null +++ b/types/json2csv/JSON2CSVParser.d.ts @@ -0,0 +1,30 @@ +import JSON2CSVBase from './JSON2CSVBase'; + +declare class JSON2CSVParser extends JSON2CSVBase { + /** + * Main function that converts json to csv. + * + * @param {object|object[]} data Array of JSON objects to be converted to CSV + * @returns {string} The CSV formated data as a string + */ + public parse(data: Readonly | ReadonlyArray): string; + + /** + * Preprocess the data according to the give opts (unwind, flatten, etc.) + and calculate the fields and field names if they are not provided. + * + * @param {object|object[]} data Array or object to be converted to CSV + * @returns {object[]} Preprocessed data ready to be processed + */ + protected preprocessData(data: T | Array): Array; + + /** + * Create the content row by row below the header + * + * @param {object[]} data Array of JSON objects to be converted to CSV + * @returns {string} CSV string (body) + */ + protected processData(data: Array): string; +} + +export default JSON2CSVParser; diff --git a/types/json2csv/JSON2CSVTransform.d.ts b/types/json2csv/JSON2CSVTransform.d.ts new file mode 100644 index 0000000000..1785e09214 --- /dev/null +++ b/types/json2csv/JSON2CSVTransform.d.ts @@ -0,0 +1,97 @@ +/// + +import { json2csv } from './JSON2CSVBase'; +import JSON2CSVBase from './JSON2CSVBase'; +import { Transform, TransformOptions } from 'stream'; + +declare class JSON2CSVTransform extends Transform { // implements JSON2CSVBase + constructor(opts?: json2csv.Options, transformOpts?: TransformOptions); + + /** + * Transforms an incoming json data to csv and pushes it downstream. + * + * @param {object} data JSON object to be converted in a CSV row + */ + protected pushLine(data: T): void; + + /******************************************************************************* + * Everything below is copy-pasted from JSON2CSVBase and should be keep in sync * + ********************************************************************************/ + + /** + * Check passing opts and set defaults. + * + * @param {json2csv.Options} opts Options object containing fields, + * delimiter, default value, quote mark, header, etc. + * @returns {json2csv.Options} preprocessed Options object + */ + protected preprocessOpts(opts?: json2csv.Options) : json2csv.Options; + + /** + * Create the title row with all the provided fields as column headings + * + * @returns {string} titles as a string + */ + protected getHeader(): string; + + /** + * Preprocess each object according to the give opts (unwind, flatten, etc.). + * + * @param {object} row JSON object to be converted in a CSV row + */ + protected preprocessRow(row: T): object; + + /** + * Create the content of a specific CSV row + * + * @param {object} row JSON object to be converted in a CSV row + * @returns {string} CSV string (row) + */ + protected processRow(row: T): string; + + /** + * Create the content of a specfic CSV row cell + * + * @param {object} row JSON object representing the CSV row that the cell belongs to + * @param {object} fieldInfo Details of the field to process to be a CSV cell + * @returns {string} CSV string (cell) + */ + protected processCell(row: T, fieldInfo: json2csv.FieldInfo) : string; + + /** + * Create the content of a specfic CSV row cell + * + * @param {object} row JSON object representing the CSV row that the cell belongs to + * @param {json2csv.FieldInfo} fieldInfo Details of the field to process to be a CSV cell + * @returns {any} Field value + */ + protected getValue(row: T, fieldInfo: json2csv.FieldInfo): any; + + /** + * Create the content of a specfic CSV row cell + * + * @param {any} value Value to be included in a CSV cell + * @param {Boolean} stringify Details of the field to process to be a CSV cell + * @returns {string} Value stringified and processed + */ + protected processValue(value: any, stringify: Boolean): string; + + /** + * Performs the flattening of a data row recursively + * + * @param {object} dataRow Original JSON object + * @returns {object} Flattened object + */ + protected flatten(dataRow: T): object; + + /** + * Performs the unwind recursively in specified sequence + * + * @param {object[]} dataRow Original JSON object + * @param {string[]} unwindPaths The paths as strings to be used to deconstruct the array + * @returns {Array} Array of objects containing all rows after unwind of chosen paths + */ + protected unwindData(dataRow: Array, unwindPaths: Array): Array; +} + +export default JSON2CSVTransform; diff --git a/types/json2csv/index.d.ts b/types/json2csv/index.d.ts new file mode 100644 index 0000000000..55a1829625 --- /dev/null +++ b/types/json2csv/index.d.ts @@ -0,0 +1,18 @@ +// Type definitions for json2csv 4.1 +// Project: https://github.com/zemirco/json2csv +// Definitions by: Juanjo Diaz +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +import { json2csv } from './JSON2CSVBase'; +import JSON2CSVParser from './JSON2CSVParser'; +import JSON2CSVTransform from './JSON2CSVTransform'; + +export { + json2csv, + JSON2CSVParser as Parser, + JSON2CSVTransform as Transform +}; + +// Convenience method to keep the API similar to version 3.X +export function parse(data: Readonly | ReadonlyArray, opts?: json2csv.Options): string; diff --git a/types/json2csv/json2csv-tests.ts b/types/json2csv/json2csv-tests.ts new file mode 100644 index 0000000000..67c46cd1c3 --- /dev/null +++ b/types/json2csv/json2csv-tests.ts @@ -0,0 +1,116 @@ +import { json2csv, parse, Parser, Transform } from 'json2csv'; +import { Transform as NodeTransform } from 'stream'; + +let s: string; +let obj: object; + +interface ExampleObj { + str?: string; + num?: number; + obj?: object; +} + +/************** + * Public API * + **************/ +parse({}); +parse([]); +parse({}, {}); + +interface Car { + car: string; + price: number; +} + +new Parser(); +const parser: Parser = new Parser({}); +s = parser.parse({ str: '', num: 1, obj: {} }); + +const opts: json2csv.Options = { + fields: [{ + label: 'Car Name', + value: 'car' + }, { + label: 'Price USD', + value: 'price' + }] +}; + +const json2csvParser = new Parser(opts); + +parser.parse([]); +const transform: Transform = new Transform({ quote: '' }); +const nodeTransform: NodeTransform = transform; + +/******************** + * Internal Methods * + ********************/ +class ParserExt extends Parser { + constructor() { + super(); + // Parser methods + obj = this.preprocessData({}); + obj = this.preprocessData({ str: '', num: 1, obj: {} }); + obj = this.preprocessData([]); + s = this.processData([]); + + // JSON2CSVBase methods + let opts: json2csv.Options; + opts = this.preprocessOpts(); + opts = this.preprocessOpts(opts); + s = this.getHeader(); + obj = this.preprocessRow({}); + obj = this.preprocessRow({ str: '', num: 1, obj: {} }); + s = this.processRow({}); + s = this.processRow({ str: '', num: 1, obj: {} }); + s = this.processCell({}, { label: 'test', default: 'test2', value: 'field' }); + s = this.processCell({ str: '', num: 1, obj: {} }, { label: 'test', default: 'test2', value: 'field' }); + s = this.processCell({}, { label: 'test', default: 'test2', value: (row: object, field: string) => 'string' }); + s = this.processCell({ str: '', num: 1, obj: {} }, { label: 'test', default: 'test2', value: (row: object, field: string) => 'string' }); + this.getValue({}, { label: 'test' }); + this.getValue({ str: '', num: 1, obj: {} }, { label: 'test' }); + s = this.processValue(undefined, true); + s = this.processValue(null, true); + s = this.processValue(1, true); + s = this.processValue('test', true); + s = this.processValue(new Date(), true); + s = this.processValue({}, true); + s = this.processValue([], true); + const flattenedData: object = this.flatten({}); + const unwindedData: object[] = this.unwindData([], []); + } +} + +class TransformExt extends Transform { + constructor() { + super(); + // Transform methods + this.pushLine({}); + this.pushLine({ str: '', num: 1, obj: {} }); + + // JSON2CSVBase methods + let opts: json2csv.Options; + opts = this.preprocessOpts(); + opts = this.preprocessOpts(opts); + s = this.getHeader(); + obj = this.preprocessRow({}); + obj = this.preprocessRow({ str: '', num: 1, obj: {} }); + s = this.processRow({}); + s = this.processRow({ str: '', num: 1, obj: {} }); + s = this.processCell({}, { label: 'test', default: 'test2', value: 'field' }); + s = this.processCell({ str: '', num: 1, obj: {} }, { label: 'test', default: 'test2', value: 'field' }); + s = this.processCell({}, { label: 'test', default: 'test2', value: (row: object, field: string) => 'string' }); + s = this.processCell({ str: '', num: 1, obj: {} }, { label: 'test', default: 'test2', value: (row: object, field: string) => 'string' }); + this.getValue({}, { label: 'test' }); + this.getValue({ str: '', num: 1, obj: {} }, { label: 'test' }); + s = this.processValue(undefined, true); + s = this.processValue(null, true); + s = this.processValue(1, true); + s = this.processValue('test', true); + s = this.processValue(new Date(), true); + s = this.processValue({}, true); + s = this.processValue([], true); + const flattenedData: object = this.flatten({}); + const unwindedData: object[] = this.unwindData([], []); + } +} diff --git a/types/json2csv/tsconfig.json b/types/json2csv/tsconfig.json new file mode 100644 index 0000000000..23d379918c --- /dev/null +++ b/types/json2csv/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "json2csv-tests.ts" + ] +} \ No newline at end of file diff --git a/types/json2csv/tslint.json b/types/json2csv/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/json2csv/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/jsoneditor-for-react/index.d.ts b/types/jsoneditor-for-react/index.d.ts new file mode 100644 index 0000000000..707f03c63e --- /dev/null +++ b/types/jsoneditor-for-react/index.d.ts @@ -0,0 +1,17 @@ +// Type definitions for jsoneditor-for-react 0.0 +// Project: https://github.com/mixj93/jsoneditor-for-react#readme +// Definitions by: JoshGoldberg +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import * as React from "react"; +import JSONEditor, { JSONEditorOptions } from "jsoneditor"; + +export interface ReactJsonEditorProps { + values: {}; +} + +export default class ReactJsoneditor extends React.Component { + private editor?: JSONEditor; + private options?: JSONEditorOptions; +} diff --git a/types/jsoneditor-for-react/jsoneditor-for-react-tests.tsx b/types/jsoneditor-for-react/jsoneditor-for-react-tests.tsx new file mode 100644 index 0000000000..fc8211e628 --- /dev/null +++ b/types/jsoneditor-for-react/jsoneditor-for-react-tests.tsx @@ -0,0 +1,4 @@ +import * as React from "react"; +import ReactJsonEditor from "jsoneditor-for-react"; + +const component = ; diff --git a/types/jsoneditor-for-react/tsconfig.json b/types/jsoneditor-for-react/tsconfig.json new file mode 100644 index 0000000000..7a855a2dc9 --- /dev/null +++ b/types/jsoneditor-for-react/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "jsx": "react", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jsoneditor-for-react-tests.tsx" + ] +} diff --git a/types/jsoneditor-for-react/tslint.json b/types/jsoneditor-for-react/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/jsoneditor-for-react/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/jsonwebtoken-promisified/index.d.ts b/types/jsonwebtoken-promisified/index.d.ts new file mode 100644 index 0000000000..80f28e6528 --- /dev/null +++ b/types/jsonwebtoken-promisified/index.d.ts @@ -0,0 +1,188 @@ +// Type definitions for jsonwebtoken-promisified 1.0 +// Project: https://github.com/joepie91/node-jsonwebtoken-promisified +// Definitions by: Maxime LUCE , +// Daniel Heim , +// Brice BERNARD +// Aneil Mallavarapu +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/// + +export class JsonWebTokenError extends Error { + inner: Error; + + constructor(message: string, error?: Error); +} + +export class TokenExpiredError extends JsonWebTokenError { + expiredAt: number; + + constructor(message: string, expiredAt: number); +} + +export class NotBeforeError extends JsonWebTokenError { + date: Date; + + constructor(message: string, date: Date); +} + +export interface SignOptions { + /** + * Signature algorithm. Could be one of these values : + * - HS256: HMAC using SHA-256 hash algorithm (default) + * - HS384: HMAC using SHA-384 hash algorithm + * - HS512: HMAC using SHA-512 hash algorithm + * - RS256: RSASSA using SHA-256 hash algorithm + * - RS384: RSASSA using SHA-384 hash algorithm + * - RS512: RSASSA using SHA-512 hash algorithm + * - ES256: ECDSA using P-256 curve and SHA-256 hash algorithm + * - ES384: ECDSA using P-384 curve and SHA-384 hash algorithm + * - ES512: ECDSA using P-521 curve and SHA-512 hash algorithm + * - none: No digital signature or MAC value included + */ + algorithm?: string; + keyid?: string; + /** {string} - expressed in seconds or a string describing a time span [zeit/ms](https://github.com/zeit/ms.js). Eg: 60, "2 days", "10h", "7d" */ + expiresIn?: string | number; + /** {string} - expressed in seconds or a string describing a time span [zeit/ms](https://github.com/zeit/ms.js). Eg: 60, "2 days", "10h", "7d" */ + notBefore?: string | number; + audience?: string | string[]; + subject?: string; + issuer?: string; + jwtid?: string; + noTimestamp?: boolean; + header?: object; + encoding?: string; +} + +export interface VerifyOptions { + algorithms?: string[]; + audience?: string | string[]; + clockTimestamp?: number; + clockTolerance?: number; + issuer?: string | string[]; + ignoreExpiration?: boolean; + ignoreNotBefore?: boolean; + jwtid?: string; + subject?: string; + /** + * @deprecated + * {string} - Max age of token + */ + maxAge?: string; +} + +export interface DecodeOptions { + complete?: boolean; + json?: boolean; +} + +export type VerifyCallback = ( + err: JsonWebTokenError | NotBeforeError | TokenExpiredError, + decoded: object | string +) => void; + +export type SignCallback = (err: Error, encoded: string) => void; + +export type Secret = string | Buffer | { key: string; passphrase: string }; + +/** + * Synchronously sign the given payload into a JSON Web Token string + * @param payload - Payload to sign, could be an literal, buffer or string + * @param secretOrPrivateKey - Either the secret for HMAC algorithms, or the PEM encoded private key for RSA and ECDSA. + * @param [options] - Options for the signature + * @returns The JSON Web Token string + */ +export function sign( + payload: string | Buffer | object, + secretOrPrivateKey: Secret, + options?: SignOptions, +): string; + +/** + * Sign the given payload into a JSON Web Token string + * @param payload - Payload to sign, could be an literal, buffer or string + * @param secretOrPrivateKey - Either the secret for HMAC algorithms, or the PEM encoded private key for RSA and ECDSA. + * @param options - Options for the signature + * @param callback - Callback to get the encoded token on + */ +export function sign( + payload: string | Buffer | object, + secretOrPrivateKey: Secret, + callback: SignCallback, +): void; +export function sign( + payload: string | Buffer | object, + secretOrPrivateKey: Secret, + options: SignOptions, + callback: SignCallback, +): void; + +/** + * Sign the given payload asynchronously into a JSON Web Token String + * @param payload - Payload to sign, could be an literal, buffer or string + * @param secretOrPrivateKey - Either the secret for HMAC algorithms, or the PEM encoded private key for RSA and ECDSA. + * @param [options] - Options for the signature + * @returns A promise providing JSON Web Token string + */ +export function signAsync( + payload: string | Buffer | object, + secretOrPrivateKey: Secret, + options?: SignOptions +): Promise; + +/** + * Synchronously verify given token using a secret or a public key to get a decoded token + * @param token - JWT string to verify + * @param secretOrPublicKey - Either the secret for HMAC algorithms, or the PEM encoded public key for RSA and ECDSA. + * @param [options] - Options for the verification + * @returns The decoded token. + */ +export function verify( + token: string, + secretOrPublicKey: string | Buffer, + options?: VerifyOptions, +): object | string; + +/** + * Asynchronously verify given token using a secret or a public key to get a decoded token + * @param token - JWT string to verify + * @param secretOrPublicKey - Either the secret for HMAC algorithms, or the PEM encoded public key for RSA and ECDSA. + * @param options - Options for the verification + * @param callback - Callback to get the decoded token on + */ +export function verify( + token: string, + secretOrPublicKey: string | Buffer, + callback?: VerifyCallback +): void; +export function verify( + token: string, + secretOrPublicKey: string | Buffer, + options: VerifyOptions, + callback?: VerifyCallback +): void; + +/** + * Asynchronously verify given token using a secret or a public key to get a decoded token + * @param token - the JWT string to verify + * @param secretOrPublicKey - Either the secret for HMAC algorithms, or the PEM encoded public key for RSA and ECDSA. + * @returns - Promise returning the decoded token + */ +export function verifyAsync( + token: string, + secretOrPublicKey: string | Buffer, + options?: VerifyOptions +): Promise; + +/** + * Returns the decoded payload without verifying if the signature is valid. + * @param token - JWT string to decode + * @param [options] - Options for decoding + * @returns The decoded Token + */ +export function decode( + token: string, + options?: DecodeOptions, +): null | { [key: string]: any } | string; diff --git a/types/jsonwebtoken-promisified/jsonwebtoken-promisified-tests.ts b/types/jsonwebtoken-promisified/jsonwebtoken-promisified-tests.ts new file mode 100644 index 0000000000..bfa282bdee --- /dev/null +++ b/types/jsonwebtoken-promisified/jsonwebtoken-promisified-tests.ts @@ -0,0 +1,148 @@ +/** + * Test suite created by Maxime LUCE + * + * Created by using code samples from https://github.com/auth0/node-jsonwebtoken. + */ + +import jwt = require("jsonwebtoken-promisified"); +import fs = require("fs"); + +let token: string; +let cert: Buffer; + +interface TestObject { + foo: string; +} + +const testObject = { foo: "bar" }; + +/** + * jwt.sign + * https://github.com/auth0/node-jsonwebtoken#usage + */ +// sign with default (HMAC SHA256) +token = jwt.sign(testObject, "shhhhh"); + +// sign with default (HMAC SHA256) and single audience +token = jwt.sign(testObject, "shhhhh", { audience: "theAudience" }); + +// sign with default (HMAC SHA256) and multiple audiences +token = jwt.sign(testObject, "shhhhh", { + audience: ["audience1", "audience2"], +}); + +// sign with default (HMAC SHA256) and a keyid +token = jwt.sign(testObject, "shhhhh", { keyid: "theKeyId" }); + +// sign with RSA SHA256 +cert = fs.readFileSync("private.key"); // get private key +token = jwt.sign(testObject, cert, { algorithm: "RS256" }); + +// sign with encrypted RSA SHA256 private key (only PEM encoding is supported) +const privKey: Buffer = fs.readFileSync("encrypted_private.key"); // get private key +const secret = { key: privKey.toString(), passphrase: "keypwd" }; +token = jwt.sign(testObject, secret, { algorithm: "RS256" }); // the algorithm option is mandatory in this case + +// sign asynchronously +jwt.sign(testObject, cert, { algorithm: "RS256" }, ( + err: Error, + token: string, +) => { + console.log(token); +}); + +jwt.signAsync(testObject, cert, { algorithm: "RS256" }).then( + (token: string) => console.log(token) +); +/** + * jwt.verify + * https://github.com/auth0/node-jsonwebtoken#jwtverifytoken-secretorpublickey-options-callback + */ +// verify a token symmetric +jwt.verify(token, "shhhhh", ( + err: jwt.JsonWebTokenError | jwt.NotBeforeError | jwt.TokenExpiredError, + decoded: object | string +) => { + const result = decoded as TestObject; + + console.log(result.foo); // bar +}); +jwt.verifyAsync(token, "shhhhh").then(decoded => { + const result = decoded as TestObject; + + console.log(result.foo); // bar +}); + +// use external time for verifying +jwt.verify(token, 'shhhhh', { clockTimestamp: 1 }, (err, decoded) => { + const result = decoded as TestObject; + + console.log(result.foo); // bar +}); +jwt.verifyAsync(token, 'shhhhh', { clockTimestamp: 1 }).then(decoded => { + const result = decoded as TestObject; + + console.log(result.foo); // bar +}); + +// invalid token +jwt.verify(token, "wrong-secret", (err, decoded) => { + // err + // decoded undefined +}); + +// verify a token asymmetric +cert = fs.readFileSync("public.pem"); // get public key +jwt.verify(token, cert, (err, decoded) => { + const result = decoded as TestObject; + + console.log(result.foo); // bar +}); + +jwt.verifyAsync(token, cert).then(decoded => { + const result = decoded as TestObject; + console.log(result.foo); // bar +}); + +// verify audience +cert = fs.readFileSync("public.pem"); // get public key +jwt.verify(token, cert, { audience: "urn:foo" }, (err, decoded) => { + // if audience mismatch, err == invalid audience +}); + +// verify issuer +cert = fs.readFileSync("public.pem"); // get public key +jwt.verify(token, cert, { audience: "urn:foo", issuer: "urn:issuer" }, ( + err, + decoded, +) => { + // if issuer mismatch, err == invalid issuer +}); + +// verify algorithm +cert = fs.readFileSync("public.pem"); // get public key +jwt.verify(token, cert, { algorithms: ["RS256"] }, (err, decoded) => { + // if algorithm mismatch, err == invalid algorithm +}); + +// verify without expiration check +cert = fs.readFileSync("public.pem"); // get public key +jwt.verify(token, cert, { ignoreExpiration: true }, (err, decoded) => { + // if ignoreExpration == false and token is expired, err == expired token +}); + +/** + * jwt.decode + * https://github.com/auth0/node-jsonwebtoken#jwtdecodetoken + */ +let decoded = jwt.decode(token); + +decoded = jwt.decode(token, { complete: false }); + +if (decoded !== null && typeof decoded === "object") { + console.log(decoded.foo); +} + +decoded = jwt.decode(token, { json: false }); + +decoded = jwt.decode(token, { complete: false, json: false }); diff --git a/types/rrule/tsconfig.json b/types/jsonwebtoken-promisified/tsconfig.json similarity index 85% rename from types/rrule/tsconfig.json rename to types/jsonwebtoken-promisified/tsconfig.json index 3e64a1d17a..0b6053d82b 100644 --- a/types/rrule/tsconfig.json +++ b/types/jsonwebtoken-promisified/tsconfig.json @@ -18,8 +18,6 @@ }, "files": [ "index.d.ts", - "test/rrule.ts", - "test/commonJs.ts", - "test/global.ts" + "jsonwebtoken-promisified-tests.ts" ] } \ No newline at end of file diff --git a/types/jsonwebtoken-promisified/tslint.json b/types/jsonwebtoken-promisified/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/jsonwebtoken-promisified/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/jsonwebtoken/index.d.ts b/types/jsonwebtoken/index.d.ts index 26e223df53..ddb2a3f6c3 100644 --- a/types/jsonwebtoken/index.d.ts +++ b/types/jsonwebtoken/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for jsonwebtoken 7.2.1 +// Type definitions for jsonwebtoken 7.2.2 // Project: https://github.com/auth0/node-jsonwebtoken // Definitions by: Maxime LUCE , // Daniel Heim , @@ -167,4 +167,4 @@ declare function verify( declare function decode( token: string, options?: DecodeOptions, -): null | object | string; +): null | { [key: string]: any } | string; diff --git a/types/jsonwebtoken/jsonwebtoken-tests.ts b/types/jsonwebtoken/jsonwebtoken-tests.ts index 0b04c23e63..f20fbba5cc 100644 --- a/types/jsonwebtoken/jsonwebtoken-tests.ts +++ b/types/jsonwebtoken/jsonwebtoken-tests.ts @@ -11,39 +11,44 @@ var token: string; var cert: Buffer; interface ITestObject { - 'foo': string + foo: string; } -const testObject = { foo: 'bar' } +const testObject = { foo: "bar" }; /** * jwt.sign * https://github.com/auth0/node-jsonwebtoken#usage */ // sign with default (HMAC SHA256) -token = jwt.sign(testObject, 'shhhhh'); +token = jwt.sign(testObject, "shhhhh"); // sign with default (HMAC SHA256) and single audience -token = jwt.sign(testObject, 'shhhhh', { audience: "theAudience"}); +token = jwt.sign(testObject, "shhhhh", { audience: "theAudience" }); // sign with default (HMAC SHA256) and multiple audiences -token = jwt.sign(testObject, 'shhhhh', { audience: ["audience1", "audience2"]}); +token = jwt.sign(testObject, "shhhhh", { + audience: ["audience1", "audience2"], +}); // sign with default (HMAC SHA256) and a keyid -token = jwt.sign(testObject, 'shhhhh', { keyid: "theKeyId"}); +token = jwt.sign(testObject, "shhhhh", { keyid: "theKeyId" }); // sign with RSA SHA256 -cert = fs.readFileSync('private.key'); // get private key -token = jwt.sign(testObject, cert, { algorithm: 'RS256'}); +cert = fs.readFileSync("private.key"); // get private key +token = jwt.sign(testObject, cert, { algorithm: "RS256" }); // sign with encrypted RSA SHA256 private key (only PEM encoding is supported) -const privKey: Buffer = fs.readFileSync('encrypted_private.key'); // get private key -const secret = {key: privKey.toString(), passphrase: 'keypwd'} -token = jwt.sign(testObject, secret, { algorithm: 'RS256' }); // the algorithm option is mandatory in this case +const privKey: Buffer = fs.readFileSync("encrypted_private.key"); // get private key +const secret = { key: privKey.toString(), passphrase: "keypwd" }; +token = jwt.sign(testObject, secret, { algorithm: "RS256" }); // the algorithm option is mandatory in this case // sign asynchronously -jwt.sign(testObject, cert, { algorithm: 'RS256' }, function(err: Error, token: string) { - console.log(token); +jwt.sign(testObject, cert, { algorithm: "RS256" }, function( + err: Error, + token: string, +) { + console.log(token); }); /** @@ -51,10 +56,10 @@ jwt.sign(testObject, cert, { algorithm: 'RS256' }, function(err: Error, token: s * https://github.com/auth0/node-jsonwebtoken#jwtverifytoken-secretorpublickey-options-callback */ // verify a token symmetric -jwt.verify(token, 'shhhhh', function(err, decoded) { - const result = decoded as ITestObject +jwt.verify(token, "shhhhh", function(err, decoded) { + const result = decoded as ITestObject; - console.log(result.foo) // bar + console.log(result.foo); // bar }); // use external time for verifying @@ -65,41 +70,44 @@ jwt.verify(token, 'shhhhh', { clockTimestamp: 1 }, function(err, decoded) { }); // invalid token -jwt.verify(token, 'wrong-secret', function(err, decoded) { - // err - // decoded undefined +jwt.verify(token, "wrong-secret", function(err, decoded) { + // err + // decoded undefined }); // verify a token asymmetric -cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, function (err, decoded) { - const result = decoded as ITestObject +cert = fs.readFileSync("public.pem"); // get public key +jwt.verify(token, cert, function(err, decoded) { + const result = decoded as ITestObject; - console.log(result.foo) // bar + console.log(result.foo); // bar }); // verify audience -cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, { audience: 'urn:foo' }, function(err, decoded) { - // if audience mismatch, err == invalid audience +cert = fs.readFileSync("public.pem"); // get public key +jwt.verify(token, cert, { audience: "urn:foo" }, function(err, decoded) { + // if audience mismatch, err == invalid audience }); // verify issuer -cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, { audience: 'urn:foo', issuer: 'urn:issuer' }, function(err, decoded) { - // if issuer mismatch, err == invalid issuer +cert = fs.readFileSync("public.pem"); // get public key +jwt.verify(token, cert, { audience: "urn:foo", issuer: "urn:issuer" }, function( + err, + decoded, +) { + // if issuer mismatch, err == invalid issuer }); // verify algorithm -cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, { algorithms: ['RS256'] }, function(err, decoded) { - // if algorithm mismatch, err == invalid algorithm +cert = fs.readFileSync("public.pem"); // get public key +jwt.verify(token, cert, { algorithms: ["RS256"] }, function(err, decoded) { + // if algorithm mismatch, err == invalid algorithm }); // verify without expiration check -cert = fs.readFileSync('public.pem'); // get public key +cert = fs.readFileSync("public.pem"); // get public key jwt.verify(token, cert, { ignoreExpiration: true }, function(err, decoded) { - // if ignoreExpration == false and token is expired, err == expired token + // if ignoreExpration == false and token is expired, err == expired token }); /** @@ -110,6 +118,10 @@ var decoded = jwt.decode(token); decoded = jwt.decode(token, { complete: false }); +if (decoded !== null && typeof decoded === "object") { + console.log(decoded.foo); +} + decoded = jwt.decode(token, { json: false }); decoded = jwt.decode(token, { complete: false, json: false }); diff --git a/types/jss/css.d.ts b/types/jss/css.d.ts new file mode 100644 index 0000000000..2d5e89139a --- /dev/null +++ b/types/jss/css.d.ts @@ -0,0 +1,136 @@ +// These CSS typings adapted from TypeStyle: https://github.com/typestyle/typestyle + +import { Observable } from 'indefinite-observable'; +import * as csstype from 'csstype'; + +type Length = string | number; + +export type ObservableProperties

= { + [K in keyof P]: P[K] | Observable +}; + +export type CSSProperties = + & ObservableProperties> + & ObservableProperties>; + +export interface JssProps { + '@global'?: CSSProperties; + extend?: string; + composes?: string | string[]; +} + +export interface JssExpand { + animation: + | { + delay: CSSProperties['animationDelay']; + direction: CSSProperties['animationDirection']; + duration: CSSProperties['animationDuration']; + iterationCount: CSSProperties['animationIterationCount']; + name: CSSProperties['animationName']; + playState: CSSProperties['animationPlayState']; + timingFunction: CSSProperties['animationTimingFunction']; + } + | CSSProperties['animation']; + background: + | { + attachment: CSSProperties['backgroundAttachment']; + color: CSSProperties['backgroundColor']; + image: CSSProperties['backgroundImage']; + position: + | CSSProperties['backgroundPosition'] + | [csstype.Properties['backgroundPosition'], csstype.Properties['backgroundPosition']]; // Can be written using array e.g. `[0 0]` + repeat: CSSProperties['backgroundRepeat']; + size: + | CSSProperties['backgroundSize'] + | [csstype.Properties['backgroundSize'], csstype.Properties['backgroundSize']]; // Can be written using array e.g. `['center' 'center']` + } + | CSSProperties['background']; + border: + | { + color: CSSProperties['borderColor']; + style: CSSProperties['borderStyle']; + width: CSSProperties['borderWidth']; + } + | CSSProperties['border']; + boxShadow: + | { + x: Length; + y: Length; + blur: Length; + spread: Length; + color: CSSProperties['color']; + inset?: 'inset'; // If you want to add inset you need to write 'inset: 'inset'' + } + | CSSProperties['boxShadow']; + flex: + | { + basis: CSSProperties['flexBasis']; + direction: CSSProperties['flexDirection']; + flow: CSSProperties['flexFlow']; + grow: CSSProperties['flexGrow']; + shrink: CSSProperties['flexShrink']; + wrap: CSSProperties['flexWrap']; + } + | CSSProperties['flex']; + font: + | { + family: CSSProperties['fontFamily']; + size: CSSProperties['fontSize']; + stretch: CSSProperties['fontStretch']; + style: CSSProperties['fontStyle']; + variant: CSSProperties['fontVariant']; + weight: CSSProperties['fontWeight']; + } + | CSSProperties['font']; + listStyle: + | { + image: CSSProperties['listStyleImage']; + position: CSSProperties['listStylePosition']; + type: CSSProperties['listStyleType']; + } + | CSSProperties['listStyle']; + margin: + | { + bottom: CSSProperties['marginBottom']; + left: CSSProperties['marginLeft']; + right: CSSProperties['marginRight']; + top: CSSProperties['marginTop']; + } + | CSSProperties['margin']; + padding: + | { + bottom: CSSProperties['paddingBottom']; + left: CSSProperties['paddingLeft']; + right: CSSProperties['paddingRight']; + top: CSSProperties['paddingTop']; + } + | CSSProperties['padding']; + outline: + | { + color: CSSProperties['outlineColor']; + style: CSSProperties['outlineStyle']; + width: CSSProperties['outlineWidth']; + } + | CSSProperties['outline']; + textShadow: + | { + x: Length; + y: Length; + blur: Length; + color: CSSProperties['color']; + } + | CSSProperties['textShadow']; + transition: + | { + delay: CSSProperties['transitionDelay']; + duration: CSSProperties['transitionDuration']; + property: CSSProperties['transitionProperty']; + timingFunction: CSSProperties['transitionTimingFunction']; + } + | CSSProperties['transition']; +} + +export type JssExpandArr = { [k in keyof JssExpand]?: JssExpand[k] | Array }; + +export type SimpleStyle = CSSProperties & JssProps & JssExpandArr; +export type Style = SimpleStyle | Observable>; diff --git a/types/jss/index.d.ts b/types/jss/index.d.ts index d0136216ed..0b40c82f8f 100644 --- a/types/jss/index.d.ts +++ b/types/jss/index.d.ts @@ -1,9 +1,19 @@ -// Type definitions for jss 9.3 +// Type definitions for jss 9.5 // Project: https://github.com/cssinjs/jss#readme // Definitions by: Brenton Simpson // Oleg Slobodskoi +// Thomas Crockett // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 + +import { Style } from './css'; + +export type Styles = Record; +export type Classes = Record; + +export interface ToCssOptions { + indent?: number; +} export interface Rule { className: string; @@ -13,13 +23,12 @@ export interface Rule { prop(key: string, value: any): this; toJSON(): string; } -export interface StyleSheet { + +export interface StyleSheet { // Gives auto-completion on the rules declared in `createStyleSheet` without // causing errors for rules added dynamically after creation. - classes: { - [K in keyof T]: string; - } & { [key: string]: string }; - options: any; + classes: Classes; + options: RuleOptions; linked: boolean; attached: boolean; /** @@ -35,21 +44,21 @@ export interface StyleSheet { * Will insert a rule also after the stylesheet has been rendered first time. */ addRule(style: Style, options?: Partial): Rule; - addRule(name: string, style: Style, options?: Partial): Rule; + addRule(name: RuleName, style: Style, options?: Partial): Rule; /** * Create and add rules. * Will render also after Style Sheet was rendered the first time. */ - addRules(styles: { [key: string]: Style }, options?: Partial): Rule[]; + addRules(styles: Partial>, options?: Partial): Rule[]; /** * Get a rule by name. */ - getRule(name: string): Rule; + getRule(name: RuleName): Rule; /** * Delete a rule by name. * Returns `true`: if rule has been deleted from the DOM. */ - deleteRule(name: string): boolean; + deleteRule(name: RuleName): boolean; /** * Get index of a rule. */ @@ -58,63 +67,70 @@ export interface StyleSheet { * Update the function values with a new data. */ update(data?: {}): this; - update(name: string, data: {}): this; + update(name: RuleName, data: {}): this; /** * Convert rules to a CSS string. */ - toString(options?: { indent?: number }): string; -} -export type GenerateClassName = (rule: Rule, sheet?: StyleSheet) => string; -export interface Style { - [key: string]: any; + toString(options?: ToCssOptions): string; } +export type GenerateClassName = (rule: Rule, sheet?: StyleSheet) => string; + export interface JSSPlugin { [key: string]: () => Partial<{ - onCreateRule(name: string, style: Style, options: RuleOptions): Rule, - onProcessRule(rule: Rule, sheet: StyleSheet): void, - onProcessStyle(style: Style, rule: Rule, sheet: StyleSheet): Style, - onProcessSheet(sheet: StyleSheet): void, - onChangeValue(value: any, prop: string, rule: Rule): any, - onUpdate(data: {}, rule: Rule, sheet: StyleSheet): void, + onCreateRule(name: string, style: Style, options: RuleOptions): Rule; + onProcessRule(rule: Rule, sheet: StyleSheet): void; + onProcessStyle(style: Style, rule: Rule, sheet: StyleSheet): Style; + onProcessSheet(sheet: StyleSheet): void; + onChangeValue(value: any, prop: string, rule: Rule): any; + onUpdate(data: {}, rule: Rule, sheet: StyleSheet): void; }>; } export interface JSSOptions { - createGenerateClassName(): GenerateClassName; + createGenerateClassName(): GenerateClassName; plugins: ReadonlyArray; virtual: boolean; insertionPoint: string | HTMLElement; } -export interface RuleFactoryOptions { +export interface RuleFactoryOptions { selector: string; - classes: { [key: string]: string }; - sheet: StyleSheet; + classes: Classes; + sheet: StyleSheet; index: number; jss: JSS; - generateClassName: GenerateClassName; + generateClassName: GenerateClassName; } export interface RuleOptions { index: number; className: string; } +export declare class SheetsRegistry { + constructor(); + registry: ReadonlyArray; + readonly index: number; + add(sheet: StyleSheet): void; + reset(): void; + remove(sheet: StyleSheet): void; + toString(options?: ToCssOptions): string; +} declare class JSS { constructor(options?: Partial); - createStyleSheet( - styles: T, + createStyleSheet( + styles: Partial>, options?: Partial<{ - media: string, - meta: string, - link: boolean, - element: HTMLStyleElement, - index: number, - generateClassName: GenerateClassName, - classNamePrefix: string, + media: string; + meta: string; + link: boolean; + element: HTMLStyleElement; + index: number; + generateClassName: GenerateClassName; + classNamePrefix: string; }>, - ): StyleSheet; - removeStyleSheet(sheet: StyleSheet): this; + ): StyleSheet; + removeStyleSheet(sheet: StyleSheet): this; setup(options?: Partial): this; - use(plugin: JSSPlugin): this; - createRule(style: Style, options?: Partial): Rule; - createRule(name: string, style: Style, options?: Partial): Rule; + use(...plugins: JSSPlugin[]): this; + createRule(style: Style, options?: RuleFactoryOptions): Rule; + createRule(name: Name, style: Style, options?: RuleFactoryOptions): Rule; } /** * Creates a new instance of JSS. diff --git a/types/jss/jss-tests.ts b/types/jss/jss-tests.ts index 0cf3f51350..5e9a876036 100644 --- a/types/jss/jss-tests.ts +++ b/types/jss/jss-tests.ts @@ -2,18 +2,32 @@ import { create as createJSS, - default as sharedInstance + SheetsRegistry, + default as sharedInstance, } from 'jss'; const jss = createJSS().setup({}); +jss.use({}, {}); // $ExpectType JSS -const styleSheet = jss.createStyleSheet( +const styleSheet = jss.createStyleSheet( { ruleWithMockObservable: { - subscribe() {} + subscribe: observer => { + const next = typeof observer === 'function' ? observer : observer.next; + next({ background: 'blue', display: 'flex' }); + next({ invalidKey: 'blueish' }); // $ExpectError + + // only kebab case allowed in observables + next({ 'align-items': 'center' }); + next({ alignItems: 'center' }); // $ExpectError + return { + unsubscribe() {} + }; + } }, container: { display: 'flex', + 'align-items': 'center', width: 100, opacity: .5, }, @@ -21,28 +35,30 @@ const styleSheet = jss.createStyleSheet( { link: true, } -).attach(); +); -styleSheet.classes.container; // $ExpectType string -styleSheet.classes.ruleWithMockObservable; // $ExpectType string +const attachedStyleSheet = styleSheet.attach(); -const rule = styleSheet.addRule('dynamicRule', { color: 'indigo' }); +attachedStyleSheet.classes.container; // $ExpectType string +attachedStyleSheet.classes.ruleWithMockObservable; // $ExpectType string + +const rule = attachedStyleSheet.addRule('dynamicRule', { color: 'indigo' }); rule.prop('border-radius', 5).prop('color'); // $ExpectType string -styleSheet.classes.dynamicRule; // $ExpectType string +attachedStyleSheet.classes.dynamicRule; // $ExpectType string -styleSheet.deleteRule('dynamicRule'); +attachedStyleSheet.deleteRule('dynamicRule'); // test that `addRule` supports the shorthand signature -const dynamicRule = styleSheet.addRule({ color: 'red' }); +const dynamicRule = attachedStyleSheet.addRule({ color: 'red' }); const div = document.createElement('div'); dynamicRule.applyTo(div); -const containerRule = styleSheet.getRule('container'); +const containerRule = attachedStyleSheet.getRule('container'); const containerJSON = containerRule.toJSON(); -const css = styleSheet.toString(); +const css = attachedStyleSheet.toString(); -styleSheet.addRules({ +attachedStyleSheet.addRules({ rule1: { fontFamily: 'Roboto', color: '#FFFFFF', @@ -53,10 +69,55 @@ styleSheet.addRules({ }, }); -styleSheet.detach(); +styleSheet.addRule('badProperty', { + thisIsNotAValidProperty: 'blah', // $ExpectError +}); -sharedInstance.createStyleSheet({ +styleSheet.addRule('badValue', { // $ExpectError + 'align-items': Symbol(), +}); + +const styleSheet2 = sharedInstance.createStyleSheet({ container: { background: '#000099', } }); + +styleSheet2.classes.container; // $ExpectType string +styleSheet2.classes.notAValidKey; // $ExpectError + +/* SheetsRegistry test */ +const sheetsRegistry = new SheetsRegistry(); +sheetsRegistry.add(styleSheet); + +const secondStyleSheet = jss.createStyleSheet( + { + ruleWithMockObservable: { + subscribe() { + return { + unsubscribe() {} + }; + } + }, + container2: { + display: 'flex', + width: 150, + opacity: .8, + }, + }, + { + link: true, + } +); + +sheetsRegistry.add(secondStyleSheet); +sheetsRegistry.registry.length; // $ExpectType number +sheetsRegistry.remove(secondStyleSheet); + +sheetsRegistry.index; // $ExpectType number +sheetsRegistry.index = 5; // $ExpectError +sheetsRegistry.toString(); // $ExpectType string +// With css options +sheetsRegistry.toString({indent: 5}); // $ExpectType string + +sheetsRegistry.reset(); diff --git a/types/jss/package.json b/types/jss/package.json new file mode 100644 index 0000000000..59a8354d7d --- /dev/null +++ b/types/jss/package.json @@ -0,0 +1,7 @@ +{ + "private": true, + "dependencies": { + "csstype": "^2.0.0", + "indefinite-observable": "^1.0.1" + } +} diff --git a/types/jstree/index.d.ts b/types/jstree/index.d.ts index 6bbbb43d2a..d1ac386a49 100644 --- a/types/jstree/index.d.ts +++ b/types/jstree/index.d.ts @@ -1968,37 +1968,37 @@ interface JSTreeGetJsonOptions { /** * do not return state information */ - no_state: boolean; + no_state?: boolean; /** * do not return ID */ - no_id: boolean; + no_id?: boolean; /** * do not include children */ - no_children: boolean; + no_children?: boolean; /** * do not include node data */ - no_data: boolean; + no_data?: boolean; /** * do not include LI attributes */ - no_li_attr: boolean; + no_li_attr?: boolean; /** * do not include A attributes */ - no_a_attr: boolean; + no_a_attr?: boolean; /** * return flat JSON instead of nested */ - flat: boolean; + flat?: boolean; } interface JSTreeBindOptions { diff --git a/types/jwplayer/index.d.ts b/types/jwplayer/index.d.ts index cb40e26da7..58c656956c 100644 --- a/types/jwplayer/index.d.ts +++ b/types/jwplayer/index.d.ts @@ -1,5 +1,5 @@ // Type definitions for JW Player V8.0 -// Project: http://developer.longtailvideo.com/trac/ +// Project: https://github.com/jwplayer/jwplayer/ // Definitions by: Martin Duparc // Tomer Kruvi // Philipp Gürtler @@ -255,8 +255,8 @@ interface JWPlayer { getSafeRegion(): Region; getState(): string; getVolume(): number; - getContainer(): HTMLElement; - getEnvironment(): Environment; + getContainer(): HTMLElement; + getEnvironment(): Environment; getWidth(): number; load(playlist: any[]): void; load(playlist: string): void; diff --git a/types/jwt-express/index.d.ts b/types/jwt-express/index.d.ts new file mode 100644 index 0000000000..cbae9f5b8a --- /dev/null +++ b/types/jwt-express/index.d.ts @@ -0,0 +1,233 @@ +// Type definitions for jwt-express 1.1 +// Project: https://github.com/AustP/jwt-express#readme +// Definitions by: Nick Paddock +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/// + +import express = require("express"); +import jsonwebtoken = require("jsonwebtoken"); + +export interface JWT { + /** + * Indicates if the JWT is expired. valid will always be false if this is true. + */ + expired: boolean; + + /** + * The jwt-express options. + */ + options: JWTExpressOptions; + + /** + * The payload of the JWT (must be an object). jwt-express will add a stales key-value pair to the payload for stale. + */ + payload: any; + + /** + * The secret used to sign /verify the JWT. + */ + secret: string; + + /** + * Indicates if the JWT is stale. The default timeout before a JWT is considered stale is 15 minutes. + */ + stale: boolean; + + /** + * The signed token of the JWT. + */ + token: string; + + /** + * Indicates if this JWT is valid. This means that the payload hasn't been tampered with and that the JWT hasn't expired yet. + */ + valid: boolean; + + /** + * Resigns this JWT Objects's payload. + * + * @return this + */ + resign(): JWT; + + /** + * Calls the revoke function defined in the jwt.init() options with this JWT Object as the first parameter. + * + * @return this + */ + revoke(): JWT; + + /** + * Generates a signed token from the payload. + * + * @param payload The payload of the JWT (must be an object). + * @return this + */ + sign(payload: any): JWT; + + /** + * Stores this JWT in the cookie (if configured to use cookies). + * + * @param res The response in which to store the JWT. + * @return this + */ + store(res: express.Response): JWT; + + /** + * This function is called when the jwt is passed through JSON.stringify. + * We don't want the secret or options to be stringified. + * + * @return The JSON form of the object. + */ + toJSON(): any; + + /** + * Verify the token and load the info into this JWT. + * + * @param token The signed token to verify. + * @return this + */ + verify(token: string): JWT; +} + +export interface JWTExpressOptions { + /** + * The name of the cookie (default: 'jwt-express') + */ + cookie?: string; + + /** + * Options to use when storing the cookie (default: {httpOnly: true}) + */ + cookieOptions?: express.CookieOptions; + + /** + * If true, will use cookies, otherwise will use the Authorization header (default: true) + */ + cookies?: boolean; + + /** + * Indicates if the JWT should be refreshed and stored every request (default: true) + */ + refresh?: boolean; + + /** + * The property of req to populate (default: 'jwt') + */ + reqProperty?: string; + + /** + * jwt.revoke() will call this function (default: function(jwt) {}) + */ + revoke?: (jwt: JWT) => void; + + /** + * Options to use when signing the JWT (default: {}) + */ + signOptions?: jsonwebtoken.SignOptions; + + /** + * Milliseconds when the jwt will go stale (default: 900000 (15 minutes)) + */ + stales?: number; + + /** + * Additional verification. Must return a boolean (default: function(jwt) {return true}) + */ + verify?: (jwt: JWT) => boolean; + + /** + * Options to use when verifying the JWT (default: {}) + */ + verifyOptions?: jsonwebtoken.VerifyOptions; +} + +export interface JWTExpressError extends Error { + name: string; + message: string; +} + +export let options: JWTExpressOptions; + +/** + * Returns a middleware function that ensures a JWT is valid and fresh. Useful to protect + * sensitive actions from CSRF. This method will trigger error handling if the JWT is not active. + * + * @return Express middleware + */ +export function active(): express.RequestHandler; + +/** + * If using cookies, this method will clear the current JWT out of the cookie. + * + * @return Express middleware + */ +export function clear(): express.RequestHandler; + +/** + * Returns a newly created / signed JWT Object from the payload. + * + * @param secret + * If secret is a string, that string will be used to verify / sign with. + * If secret is a function, that function will be called with the payload as its first parameter, + * and must return a string which will be used to verify / sign with. + * @param payload The payload of the JWT. + * @return JWT + */ +export function create(secret: string | ((payload: any) => string), payload: any): JWT; + +/** + * The jwt.init() function returns a middleware function for Express so it must be called inside app.use(). + * It will automatically read in the JWT from either the cookie or the Authorization header (configured by you) + * and add a JWT object to the Request object (req). It will also add the jwt() method to the Response object (res) + * to create / store JWTs. jwt.init() must be called before any other jwt method. + * + * @param secret + * If secret is a string, that string will be used to verify / sign with. + * If secret is a function, that function will be called with the Express HTTP Request as its first parameter, + * and must return a string which will be used to verify / sign with. + * @param options The options of jwt-express. + * @return Express middleware + */ +export function init(secret: string | ((req: express.Request) => string), options?: JWTExpressOptions): express.RequestHandler; + +/** + * Returns a middleware function that requires the payload to contain / match certain data. + * This method will trigger error handling if the JWT fails the requirement. + * + * @param key + * This is they key used to look up the value in the payload. + * If only this value is passed to jwt.require(), then the middleware function will check that the value is truthy. + * @param operator The operator to compare the information + * @param value The value to compare the payload data against + * @return Express middleware + */ +export function require(key: string, operator?: string, value?: any): express.RequestHandler; + +/** + * Returns a middleware function that ensures a JWT is valid. This method will trigger error handling if the JWT is not valid. + * + * @return Express middleware + */ +export function valid(): express.RequestHandler; + +declare global { + namespace Express { + interface Request { + jwt: JWT; + } + + interface Response { + /** + * Returns a newly created / signed JWT Object from the payload. If you are using cookies, + * it will automatically store the JWT in the cookie as well. + * + * @param payload The payload of the JWT + * @return The newly created JWT + */ + jwt(payload: any): JWT; + } + } +} diff --git a/types/jwt-express/jwt-express-tests.ts b/types/jwt-express/jwt-express-tests.ts new file mode 100644 index 0000000000..fedf8137b3 --- /dev/null +++ b/types/jwt-express/jwt-express-tests.ts @@ -0,0 +1,65 @@ +import exp = require("express"); +import jwt = require("jwt-express"); + +const app = exp(); + +app.use(jwt.active()); +app.use(jwt.clear()); +let jwtObj = jwt.create("Secret", { }); +jwtObj = jwt.create((p) => "Secret", { }); +app.use(jwt.init("Secret")); +app.use(jwt.init(req => "Secret")); +app.use(jwt.init("Secret", { + cookie: "jwt-express", + cookieOptions: { + httpOnly: true + }, + cookies: true, + refresh: true, + reqProperty: "jwt", + revoke: (revokeJWT: jwt.JWT) => { jwtObj = revokeJWT; }, + signOptions: { + expiresIn: "1h" + }, + stales: 1000, + verify: (verifyJWT: jwt.JWT) => { jwtObj = verifyJWT; return true; }, + verifyOptions: { + ignoreExpiration: true + } +})); +app.use(jwt.require("key")); +app.use(jwt.require("key", "==", "value")); +app.use(jwt.valid()); + +let resObj: exp.Response = {}; +app.use((err: jwt.JWTExpressError, req: exp.Request, res: exp.Response, next: exp.NextFunction) => { + err.message.startsWith(""); + err.name.startsWith(""); + resObj = res; + jwtObj = req.jwt; + req.jwt.payload; + req.hostname.startsWith(""); + jwtObj = res.jwt({ }); +}); + +jwtObj.expired.valueOf(); +app.use(jwt.init(req => "Secret", jwtObj.options)); +jwtObj.payload; +jwtObj.secret.startsWith(""); +jwtObj.stale.valueOf(); +jwtObj.token.startsWith(""); +jwtObj.valid.valueOf(); + +jwtObj = jwtObj.resign(); +jwtObj = jwtObj.revoke(); +jwtObj = jwtObj.sign(jwtObj.payload); +jwtObj = jwtObj.store(resObj); +jwtObj = jwtObj.verify(jwtObj.token); +jwtObj.toJSON(); + +app.get("", (req: exp.Request, res: exp.Response, next: exp.NextFunction) => { + jwtObj = req.jwt; + req.jwt.payload; + req.hostname.startsWith(""); + jwtObj = res.jwt({ }); +}); diff --git a/types/jwt-express/tsconfig.json b/types/jwt-express/tsconfig.json new file mode 100644 index 0000000000..293e5e4548 --- /dev/null +++ b/types/jwt-express/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jwt-express-tests.ts" + ] +} diff --git a/types/jwt-express/tslint.json b/types/jwt-express/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/jwt-express/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/karma-viewport/index.d.ts b/types/karma-viewport/index.d.ts new file mode 100644 index 0000000000..10196485ca --- /dev/null +++ b/types/karma-viewport/index.d.ts @@ -0,0 +1,124 @@ +// Type definitions for karma-viewport 0.4 +// Project: https://github.com/squidfunk/karma-viewport +// Definitions by: Karak +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Type definition file for 'karma-viewport' +// https://www.npmjs.com/package/karma-viewport + +declare namespace KarmaViewport { + interface Breakpoint { + name: string; + size: { + width: number, + height: number, + }; + } + + interface Config { + /** Context selector */ + context: string; + /** Breakpoints */ + breakpoints: Breakpoint[]; + } + + class Viewport { + /** + * Create viewport resizer + * + * @param config - Configuration + * @param context - Initialization context + */ + constructor(config: Config, context: Window); + + /** + * Load and embed document into viewport + * + * @param url - URL of document to load + * @param cb - Callback to execute after document was loaded + */ + load(url: string, cb: () => void): void; + + /** + * Set viewport to number or array + */ + set(width: number, height?: number): void; + + /** + * Set viewport to breakpoint identifier + */ + set(name: string): void; + + /** + * Reset viewport + */ + reset(): void; + + /** + * Execute a callback for all breakpoints between the first and last given + * + * @example + * viewport.between("mobile", "tablet", name => { + * ... + * }) + * + * @param first - First breakpoint name + * @param last - Last breakpoint name + * @param cb - Callback to execute after resizing + */ + between(first: string, last: string, cb: (name: string) => void): void; + + /** + * Execute a callback for all breakpoints + * + * @example + * viewport.each(name => { + * ... + * }) + * + * @param cb - Callback to execute after resizing + */ + each(cb: (name: string) => void): void; + + /** + * Execute a callback starting at the given breakpoint + * + * @example + * viewport.from("tablet", name => { + * ... + * }) + * + * @param first - First breakpoint name + * @param cb - Callback to execute after resizing + */ + from(first: string, cb: (name: string) => void): void; + + /** + * Execute a callback ending at the given breakpoint + * + * @example + * viewport.to("tablet", name => { + * ... + * }) + * + * @param last - Last breakpoint name + * @param cb - Callback to execute after resizing + */ + to(last: string, cb: (name: string) => void): void; + + /** + * Retrieve configuration + * + * @return Configuration + */ + readonly config: Config; // get config() + + /** + * Retrieve context element + * + * @return context element + */ + readonly element: HTMLIFrameElement; // get element() + } +} + +declare const viewport: KarmaViewport.Viewport; diff --git a/types/karma-viewport/karma-viewport-tests.ts b/types/karma-viewport/karma-viewport-tests.ts new file mode 100644 index 0000000000..f220f35d98 --- /dev/null +++ b/types/karma-viewport/karma-viewport-tests.ts @@ -0,0 +1,46 @@ +// Set to 320px x 100% +viewport.set(320); + +// Set to 320px x 480px +viewport.set(320, 480); + +// Set to 320px x 480px by breakpoints +viewport.set("mobile"); + +// Reset to 100% x 100% +viewport.reset(); + +// Load entire webpages for testing: +viewport.load("/path/to/fixture.html", () => console.log('done')); + +// Run tests for mobile, tablet and screen +viewport.each(name => { + // ... +}); + +// Run tests for tablet and screen +viewport.from("tablet", name => { + // ... +}); + +// Run tests for mobile and tablet +viewport.to("tablet", name => { + // ... +}); + +// Run tests for tablet and screen +viewport.between("tablet", "screen", name => { + // ... +}); + +// get config +viewport.config.breakpoints.forEach(breakpoint => { + const name: string = breakpoint.name; + const width: number = breakpoint.size.width; + const height: number = breakpoint.size.height; +}); + +const contextSelector: string = viewport.config.context; + +// get element +const iframe: HTMLIFrameElement = viewport.element; diff --git a/types/karma-viewport/tsconfig.json b/types/karma-viewport/tsconfig.json new file mode 100644 index 0000000000..def40ab217 --- /dev/null +++ b/types/karma-viewport/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "karma-viewport-tests.ts" + ] +} diff --git a/types/karma-viewport/tslint.json b/types/karma-viewport/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/karma-viewport/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/kcors/index.d.ts b/types/kcors/index.d.ts index 04c45d365a..c4c33bbb4f 100644 --- a/types/kcors/index.d.ts +++ b/types/kcors/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/koajs/cors // Definitions by: Xavier Stouder , Izayoi Ko // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.4 import * as Koa from "koa"; @@ -11,7 +11,7 @@ export = cors; declare namespace cors { interface Options { - origin?: ((req: Koa.Request) => string) | string; + origin?: ((ctx: Koa.Context) => string) | string; allowMethods?: string[] | string; exposeHeaders?: string[] | string; allowHeaders?: string[] | string; diff --git a/types/kendo-ui/index.d.ts b/types/kendo-ui/index.d.ts index 6ea7fea725..b854d92b29 100644 --- a/types/kendo-ui/index.d.ts +++ b/types/kendo-ui/index.d.ts @@ -18894,6 +18894,7 @@ declare namespace kendo.ooxml { cells?: WorkbookSheetRowCell[]; index?: number; height?: number; + type?: "header" | "footer" | "groupHeader" | "groupFooter" | "data"; } interface WorkbookSheet { diff --git a/types/keyv/index.d.ts b/types/keyv/index.d.ts new file mode 100644 index 0000000000..9d0e2c6404 --- /dev/null +++ b/types/keyv/index.d.ts @@ -0,0 +1,56 @@ +// Type definitions for keyv 3.0 +// Project: https://github.com/lukechilds/keyv +// Definitions by: AryloYeung +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +/// + +interface KeyvOptions { + /** Namespace for the current instance. */ + namespace?: string; + /** A custom serialization function. */ + serialize?: (data: any) => string; + /** A custom deserialization function. */ + deserialize?: (data: string) => any; + /** The connection string URI. */ + uri?: string; + /** The storage adapter instance to be used by Keyv. */ + store?: any; + /** Default TTL. Can be overridden by specififying a TTL on `.set()`. */ + ttl?: number; + /** Specify an adapter to use. e.g `'redis'` or `'mongodb'`. */ + adapter?: string; +} + +declare class Keyv extends NodeJS.EventEmitter { + /** + * @param opts The options object is also passed through to the storage adapter. Check your storage adapter docs for any extra options. + */ + constructor(opts?: KeyvOptions); + /** + * @param uri The connection string URI. + * + * Merged into the options object as options.uri. + * @param opts The options object is also passed through to the storage adapter. Check your storage adapter docs for any extra options. + */ + constructor(uri?: string, opts?: KeyvOptions); + /** Returns the value. */ + get(key: string): Promise; + /** + * Set a value. + * + * By default keys are persistent. You can set an expiry TTL in milliseconds. + */ + set(key: string, value: any, ttl?: number): Promise; + /** + * Deletes an entry. + * + * Returns `true` if the key existed, `false` if not. + */ + delete(key: string): Promise; + /** Delete all entries in the current namespace. */ + clear(): Promise; +} + +export = Keyv; diff --git a/types/keyv/keyv-tests.ts b/types/keyv/keyv-tests.ts new file mode 100644 index 0000000000..7ee4cac90e --- /dev/null +++ b/types/keyv/keyv-tests.ts @@ -0,0 +1,25 @@ +import Keyv = require("keyv"); + +new Keyv({ + uri: 'redis://user:pass@localhost:6379', + namespace: "redis" +}); + +new Keyv('mongodb://user:pass@localhost:27017/dbname'); +new Keyv('redis://user:pass@localhost:6379'); +new Keyv('sqlite://path/to/database.sqlite'); +new Keyv('postgresql://user:pass@localhost:5432/dbname'); +new Keyv('mysql://user:pass@localhost:3306/dbname'); +new Keyv(); + +(async () => { + const keyv = new Keyv(); + + keyv.on('error', err => console.log('Connection Error', err)); + + await keyv.set('foo', 'expires in 1 second', 1000); // true + await keyv.set('foo', 'never expires'); // true + await keyv.get('foo'); // 'never expires' + await keyv.delete('foo'); // true + await keyv.clear(); // undefined +})(); diff --git a/types/keyv/tsconfig.json b/types/keyv/tsconfig.json new file mode 100644 index 0000000000..47eab45180 --- /dev/null +++ b/types/keyv/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "keyv-tests.ts" + ] +} diff --git a/types/keyv/tslint.json b/types/keyv/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/keyv/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/knex/index.d.ts b/types/knex/index.d.ts index eecfde8774..90a700b7dc 100644 --- a/types/knex/index.d.ts +++ b/types/knex/index.d.ts @@ -18,6 +18,7 @@ import Bluebird = require("bluebird"); type Callback = Function; type Client = Function; type Value = string | number | boolean | Date | Array | Array | Array | Array | Buffer | Knex.Raw; +type ValueMap = { [key: string]: Value | Knex.QueryBuilder }; type ColumnName = string | Knex.Raw | Knex.QueryBuilder | {[key: string]: string }; type TableName = string | Knex.Raw | Knex.QueryBuilder; @@ -125,6 +126,7 @@ declare namespace Knex { havingRaw: RawQueryBuilder; orHaving: Having; orHavingRaw: RawQueryBuilder; + havingIn: HavingIn; // Clear clearSelect(): QueryBuilder; @@ -153,6 +155,7 @@ declare namespace Knex { pluck(column: string): QueryBuilder; insert(data: any, returning?: string | string[]): QueryBuilder; + modify(callback: QueryCallback, ...args: any[]): QueryBuilder; update(data: any, returning?: string | string[]): QueryBuilder; update(columnName: string, value: Value, returning?: string | string[]): QueryBuilder; returning(column: string | string[]): QueryBuilder; @@ -323,6 +326,10 @@ declare namespace Knex { (tableName: string, column1: string, operator: string, column2: string): QueryBuilder; } + interface HavingIn { + (columnName: string, values: Value[]): QueryBuilder; + } + // commons interface ColumnNameQueryBuilder { @@ -331,8 +338,8 @@ declare namespace Knex { } interface RawQueryBuilder { - (sql: string, ...bindings: Value[]): QueryBuilder; - (sql: string, bindings: Value[]): QueryBuilder; + (sql: string, ...bindings: (Value | QueryBuilder)[]): QueryBuilder; + (sql: string, bindings: (Value | QueryBuilder)[] | ValueMap): QueryBuilder; (raw: Raw): QueryBuilder; } @@ -344,9 +351,8 @@ declare namespace Knex { interface RawBuilder { (value: Value): Raw; - (sql: string, ...bindings: Value[]): Raw; - (sql: string, bindings: Value[]): Raw; - (sql: string, bindings: Object): Raw; + (sql: string, ...bindings: (Value | QueryBuilder)[]): Raw; + (sql: string, bindings: (Value | QueryBuilder)[] | ValueMap): Raw; } // @@ -403,6 +409,7 @@ declare namespace Knex { interface SchemaBuilder extends Bluebird { createTable(tableName: string, callback: (tableBuilder: CreateTableBuilder) => any): SchemaBuilder; createTableIfNotExists(tableName: string, callback: (tableBuilder: CreateTableBuilder) => any): SchemaBuilder; + alterTable(tableName: string, callback: (tableBuilder: CreateTableBuilder) => any): SchemaBuilder; renameTable(oldTableName: string, newTableName: string): Bluebird; dropTable(tableName: string): SchemaBuilder; hasTable(tableName: string): Bluebird; diff --git a/types/knex/knex-tests.ts b/types/knex/knex-tests.ts index 3e8e798212..eaf186a186 100644 --- a/types/knex/knex-tests.ts +++ b/types/knex/knex-tests.ts @@ -246,6 +246,8 @@ knex('users').whereBetween('votes', [1, 100]); knex('users').whereNotBetween('votes', [1, 100]); knex('users').whereRaw('id = ?', [1]); +knex('users').whereRaw('id = :id', { id: 1 }); +knex('users').whereRaw('id = :id', { id: knex('users').select('id').limit(1) }); // Join methods knex('users') @@ -408,7 +410,15 @@ knex.select('*').from('users').join('accounts', (join: Knex.JoinClause) => { knex.select('*').from('users').join('accounts', 'accounts.type', knex.raw('?', ['admin'])); +knex.raw('? ON CONFLICT DO NOTHING', [knex('account').insert([{}])]); +knex.raw('select * from users where id = ? OR id = ?', + 1, + knex('users').select('id').limit(1), +); knex.raw('select * from users where id = :user_id', { user_id: 1 }); +knex.raw('select * from users where id = :user_id_query', { + user_id_query: knex('ids').select('id').limit(1) +}); knex.from('users').innerJoin('accounts', 'users.id', 'accounts.user_id'); @@ -763,6 +773,10 @@ knex.schema.createTable('users', function (table) { table.timestamps(true, true); }); +knex.schema.alterTable('users', function (table) { + table.string('role').nullable(); +}); + knex.schema.renameTable('users', 'old_users'); knex.schema.dropTable('users'); @@ -807,7 +821,7 @@ knex('users') .orWhere(knex.raw('status <> ?', [1])) .groupBy('status'); - knex.raw('select * from users where id = ?', [1]).then(function(resp) { +knex.raw('select * from users where id = ?', [1]).then(function(resp) { // ... }); @@ -958,9 +972,9 @@ knex.select('*') // ... }); - knex.select('*').from('users').where(knex.raw('id = ?', [1])).toString(); +knex.select('*').from('users').where(knex.raw('id = ?', [1])).toString(); - knex.select('*').from('users').where(knex.raw('id = ?', [1])).toSQL(); +knex.select('*').from('users').where(knex.raw('id = ?', [1])).toSQL(); // // Callback functions @@ -1026,6 +1040,9 @@ knex('users') }).unionAll(function(builder) { let self: Knex.QueryBuilder = this; self = builder; + }).modify(function(builder) { + let self: Knex.QueryBuilder = this; + self = builder; }); // diff --git a/types/knex/tslint.json b/types/knex/tslint.json index cf7f07f094..d84fe24e60 100644 --- a/types/knex/tslint.json +++ b/types/knex/tslint.json @@ -50,6 +50,7 @@ "no-unnecessary-type-assertion": false, "no-useless-files": false, "no-var-keyword": false, + "no-var": false, "no-var-requires": false, "no-void-expression": false, "no-trailing-whitespace": false, diff --git a/types/knockout/index.d.ts b/types/knockout/index.d.ts index 0964d24284..d4031b2337 100644 --- a/types/knockout/index.d.ts +++ b/types/knockout/index.d.ts @@ -444,10 +444,10 @@ interface KnockoutStatic { toJS(viewModel: any): any; isObservable(instance: any): instance is KnockoutObservable; - isObservable(instance: KnockoutObservable): instance is KnockoutObservable; + isObservable(instance: KnockoutObservable | T): instance is KnockoutObservable; isWriteableObservable(instance: any): instance is KnockoutObservable; - isWriteableObservable(instance: KnockoutObservable): instance is KnockoutObservable; + isWriteableObservable(instance: KnockoutObservable | T): instance is KnockoutObservable; isComputed(instance: any): instance is KnockoutComputed; isComputed(instance: KnockoutObservable | T): instance is KnockoutComputed; diff --git a/types/koa-session/index.d.ts b/types/koa-session/index.d.ts index 8650a07d91..75721a5b2d 100644 --- a/types/koa-session/index.d.ts +++ b/types/koa-session/index.d.ts @@ -156,6 +156,11 @@ declare namespace session { */ rolling?: boolean; + /** + * Renew session when session is nearly expired, so we can always keep user logged in. (default is false) + */ + renew?: boolean; + /** * You can store the session content in external stores(redis, mongodb or other DBs) */ @@ -166,7 +171,7 @@ declare namespace session { * ContextStore must be a class which claims three instance methods demonstrated above. * new ContextStore(ctx) will be executed on every request. */ - ContextStore?: { new(): stores }; + ContextStore?: { new(ctx: Koa.Context): stores }; /** * If you want to add prefix for all external session id, you can use options.prefix, it will not work if options.genid present. diff --git a/types/koa-webpack/index.d.ts b/types/koa-webpack/index.d.ts index b425956f03..4f86fcd11f 100644 --- a/types/koa-webpack/index.d.ts +++ b/types/koa-webpack/index.d.ts @@ -19,7 +19,7 @@ declare namespace koaWebpack { compiler?: webpack.Compiler; config?: webpack.Configuration; dev?: webpackDevMiddleware.Options; - hot?: webpackHotMiddleware.Options; + hot?: webpackHotMiddleware.Options | boolean; } interface CombinedWebpackMiddleware { diff --git a/types/koa/index.d.ts b/types/koa/index.d.ts index 2a5c49f110..07ddadc0c8 100644 --- a/types/koa/index.d.ts +++ b/types/koa/index.d.ts @@ -21,6 +21,7 @@ import * as accepts from "accepts"; import * as Cookies from "cookies"; import { EventEmitter } from "events"; import { IncomingMessage, ServerResponse, Server } from "http"; +import { Http2ServerRequest, Http2ServerResponse } from 'http2'; import httpAssert = require("http-assert"); import * as Keygrip from "keygrip"; import * as compose from "koa-compose"; @@ -500,9 +501,9 @@ declare class Application extends EventEmitter { /** * Return a request handler callback - * for node's native http server. + * for node's native http/http2 server. */ - callback(): (req: IncomingMessage, res: ServerResponse) => void; + callback(): (req: IncomingMessage | Http2ServerRequest, res: ServerResponse | Http2ServerResponse) => void; /** * Initialize a new context. diff --git a/types/kurento-utils/index.d.ts b/types/kurento-utils/index.d.ts index 8074661881..a8a30005b6 100644 --- a/types/kurento-utils/index.d.ts +++ b/types/kurento-utils/index.d.ts @@ -1,10 +1,13 @@ -// Type definitions for kurento-utils 6.6 +// Type definitions for kurento-utils 6.7 // Project: https://github.com/Kurento/kurento-utils-js // Definitions by: Miloslav Nenadál +// Benjamin Riggs // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -export class WebRtcPeer { +import { EventEmitter } from 'events'; + +export class WebRtcPeer extends EventEmitter { /** * Using this property the user can get the peerConnection and use it directly. */ @@ -60,7 +63,7 @@ export class WebRtcPeer { */ addIceCandidate: ( iceCandidate: RTCIceCandidate, - callback?: () => void + callback?: (error: string | undefined) => void ) => void; /** * Using this method the user can get peerconnection’s local session descriptor. @@ -73,8 +76,9 @@ export class WebRtcPeer { /** * Creates an offer that is a request to find a remote peer with a specific configuration. */ - generateOffer: (error: string | undefined, sdp: string) => void; - + generateOffer: ( + callback: (error: string | undefined, sdp: string) => void + ) => void; /** * Create a WebRtcPeer as receive only. */ diff --git a/types/kurento-utils/kurento-utils-tests.ts b/types/kurento-utils/kurento-utils-tests.ts index 5866a2e157..380b1b1019 100644 --- a/types/kurento-utils/kurento-utils-tests.ts +++ b/types/kurento-utils/kurento-utils-tests.ts @@ -4,6 +4,10 @@ import * as kurentoUtils from 'kurento-utils'; const peer = kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv({}, error => {}); peer.showLocalVideo(); peer.getLocalStream().getAudioTracks(); + peer.generateOffer((error, sdp) => {}); + peer.on('icecandidate', (candidate: any) => { + peer.addIceCandidate(candidate, error => {}); + }); peer.getRemoteStream().getAudioTracks(); peer.processAnswer('answer', error => {}); peer.processOffer('offer', (error, {}) => {}); diff --git a/types/leaflet-draw/index.d.ts b/types/leaflet-draw/index.d.ts index 7fd33f2152..62025a7c46 100644 --- a/types/leaflet-draw/index.d.ts +++ b/types/leaflet-draw/index.d.ts @@ -279,7 +279,7 @@ declare module 'leaflet' { * * Default value: L.Icon.Default() */ - icon?: Icon; + icon?: Icon | DivIcon; /** * This should be a high number to ensure that you can draw over all other layers on the map. diff --git a/types/leaflet-draw/leaflet-draw-tests.ts b/types/leaflet-draw/leaflet-draw-tests.ts index 54015fa404..7a51fe401f 100644 --- a/types/leaflet-draw/leaflet-draw-tests.ts +++ b/types/leaflet-draw/leaflet-draw-tests.ts @@ -121,3 +121,18 @@ function testExampleControlOptions() { } }); } + +function testMarkerOptionsIcon() { + const markerIcon = new L.Draw.Marker(map, { + icon: new L.Icon({ + iconUrl: 'my-icon.png', + iconSize: new L.Point(32, 32), + }), + }); + const markerDivIcon = new L.Draw.Marker(map, { + icon: new L.DivIcon({ + className: "marker-icon", + iconSize: new L.Point(32, 32), + }), + }); +} diff --git a/types/leaflet/index.d.ts b/types/leaflet/index.d.ts index eabb98c710..89f9625114 100644 --- a/types/leaflet/index.d.ts +++ b/types/leaflet/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/Leaflet/Leaflet // Definitions by: Alejandro Sánchez // Arne Schubert +// Michael Auer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -182,6 +183,10 @@ export class Point { y: number; } +export interface Coords extends Point { + z: number; +} + export type PointExpression = Point | PointTuple; export function point(x: number, y: number, round?: boolean): Point; @@ -420,6 +425,8 @@ export class Layer extends Evented { getEvents?(): {[name: string]: (event: LeafletEvent) => void}; getAttribution?(): string | null; beforeAdd?(map: Map): this; + + protected _map: Map; } export interface GridLayerOptions { @@ -439,6 +446,19 @@ export interface GridLayerOptions { keepBuffer?: number; } +export type DoneCallback = (error?: Error, tile?: HTMLElement) => void; + +export interface InternalTiles { + [key: string]: { + active?: boolean, + coords: Coords, + current: boolean, + el: HTMLElement, + loaded?: Date, + retain?: boolean, + }; +} + export class GridLayer extends Layer { constructor(options?: GridLayerOptions); bringToFront(): this; @@ -449,6 +469,12 @@ export class GridLayer extends Layer { isLoading(): boolean; redraw(): this; getTileSize(): Point; + + protected createTile(coords: Coords, done: DoneCallback): HTMLElement; + protected _tileCoordsToKey(coords: Coords): string; + + protected _tiles: InternalTiles; + protected _tileZoom?: number; } export function gridLayer(options?: GridLayerOptions): GridLayer; @@ -472,6 +498,9 @@ export class TileLayer extends GridLayer { constructor(urlTemplate: string, options?: TileLayerOptions); setUrl(url: string, noRedraw?: boolean): this; + protected _abortLoading(): void; + protected _getZoomForUrl(): number; + options: TileLayerOptions; } @@ -583,7 +612,7 @@ export interface PolylineOptions extends PathOptions { export class Polyline extends Path { constructor(latlngs: LatLngExpression[], options?: PolylineOptions); toGeoJSON(): geojson.Feature; - getLatLngs(): LatLng[]; + getLatLngs(): LatLng[] | LatLng[][] | LatLng[][][]; setLatLngs(latlngs: LatLngExpression[]): this; isEmpty(): boolean; getCenter(): LatLng; diff --git a/types/leaflet/leaflet-tests.ts b/types/leaflet/leaflet-tests.ts index c4f73e5b84..a22ab91248 100644 --- a/types/leaflet/leaflet-tests.ts +++ b/types/leaflet/leaflet-tests.ts @@ -510,3 +510,50 @@ lg = new L.LayerGroup([new L.Layer(), new L.Layer()], { pane: 'overlayPane', attribution: 'test' }); + +// adapted from GridLayer documentation +const CanvasLayer = L.GridLayer.extend({ + createTile(coords: L.Coords, done: L.DoneCallback) { + const tile = (L.DomUtil.create('canvas', 'leaflet-tile') as HTMLCanvasElement); + const size = this.getTileSize(); + tile.width = size.x; + tile.height = size.y; + return tile; + } +}); + +// adapted from GridLayer documentation +const AsyncCanvasLayer = L.GridLayer.extend({ + createTile(coords: L.Coords, done: L.DoneCallback) { + const tile = (L.DomUtil.create('canvas', 'leaflet-tile') as HTMLCanvasElement); + const size = this.getTileSize(); + tile.width = size.x; + tile.height = size.y; + setTimeout(() => done(undefined, tile), 1000); + return tile; + } +}); + +export class ExtendedTileLayer extends L.TileLayer { + options: L.TileLayerOptions; + createTile(coords: L.Coords, done: L.DoneCallback) { + const newCoords: L.Coords = (new L.Point(coords.x, coords.y) as L.Coords); + newCoords.z = coords.z; + return super.createTile(newCoords, done); + } + _abortLoading() { + // adapted from TileLayer's implementation + for (const i in this._tiles) { + if (this._tiles[i].coords.z !== this._tileZoom) { + const tile = this._tiles[i].el; + tile.onload = L.Util.falseFn; + tile.onerror = L.Util.falseFn; + if (tile instanceof HTMLImageElement && !tile.complete) { + tile.src = L.Util.emptyImageUrl; + L.DomUtil.remove(tile); + this._tiles[i] = undefined; + } + } + } + } +} diff --git a/types/libpq/libpq-tests.ts b/types/libpq/libpq-tests.ts index f1ae6cc1e3..7d19e910cd 100644 --- a/types/libpq/libpq-tests.ts +++ b/types/libpq/libpq-tests.ts @@ -1,10 +1,13 @@ -/// - import { Buffer } from 'buffer'; import assert = require('assert'); import * as async from 'async'; import PQ = require('libpq'); +// Stub mocha functions +const {describe, it, before, after, beforeEach, afterEach} = null as any as { + [s: string]: ((s: string, cb: (done: any) => void) => void) & ((cb: (done: any) => void) => void) & {only: any, skip: any}; +}; + declare const _: { times(n: number, f: () => T): T[] }; declare const ok: Function; diff --git a/types/linkify-it/index.d.ts b/types/linkify-it/index.d.ts index f361d88bba..e3696e09c4 100644 --- a/types/linkify-it/index.d.ts +++ b/types/linkify-it/index.d.ts @@ -4,47 +4,55 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare const LinkifyIt: { - (schemas?: LinkifyIt.SchemaRules, options?: LinkifyIt.Options): LinkifyIt.LinkifyIt; - new (schemas?: LinkifyIt.SchemaRules, options?: LinkifyIt.Options): LinkifyIt.LinkifyIt; + ( + schemas?: LinkifyIt.SchemaRules | LinkifyIt.Options, + options?: LinkifyIt.Options + ): LinkifyIt.LinkifyIt; + new ( + schemas?: LinkifyIt.SchemaRules | LinkifyIt.Options, + options?: LinkifyIt.Options + ): LinkifyIt.LinkifyIt; }; declare namespace LinkifyIt { - interface FullRule { - validate(text: string, pos: number, self: LinkifyIt): number; - normalize?(match: string): string; - } + type Validate = (text: string, pos: number, self: LinkifyIt) => number; - type Rule = string | RegExp | FullRule; + interface FullRule { + validate: string | RegExp | Validate; + normalize?(match: string): string; + } - interface SchemaRules { - [schema: string]: Rule; - } + type Rule = string | FullRule; - interface Options { - fuzzyLink?: boolean; - fuzzyIP?: boolean; - fuzzyEmail?: boolean; - } + interface SchemaRules { + [schema: string]: Rule; + } - interface Match { - index: number; - lastIndex: number; - raw: string; - schema: string; - text: string; - url: string; - } + interface Options { + fuzzyLink?: boolean; + fuzzyIP?: boolean; + fuzzyEmail?: boolean; + } - interface LinkifyIt { - add(schema: string, rule: Rule): LinkifyIt; - match(text: string): Match[]; - normalize(raw: string): string; - pretest(text: string): boolean; - set(options: Options): LinkifyIt; - test(text: string): boolean; - testSchemaAt(text: string, schemaName: string, pos: number): number; - tlds(list: string | string[], keepOld?: boolean): LinkifyIt; - } + interface Match { + index: number; + lastIndex: number; + raw: string; + schema: string; + text: string; + url: string; + } + + interface LinkifyIt { + add(schema: string, rule: Rule): LinkifyIt; + match(text: string): Match[]; + normalize(raw: string): string; + pretest(text: string): boolean; + set(options: Options): LinkifyIt; + test(text: string): boolean; + testSchemaAt(text: string, schemaName: string, pos: number): number; + tlds(list: string | string[], keepOld?: boolean): LinkifyIt; + } } export = LinkifyIt; diff --git a/types/linkify-it/linkify-it-tests.ts b/types/linkify-it/linkify-it-tests.ts index c4366321cf..1768bd5efb 100644 --- a/types/linkify-it/linkify-it-tests.ts +++ b/types/linkify-it/linkify-it-tests.ts @@ -1,24 +1,48 @@ -import LinkifyIt = require('linkify-it'); +import LinkifyIt = require("linkify-it"); + +// constructor formats +const linkifier = new LinkifyIt(); +const withOptions = new LinkifyIt({ fuzzyLink: false }); +const withSchema = new LinkifyIt( + { + "myCustom:": { + validate: /23/ + }, + "other:": { + validate: (text, pos, self) => 42 + }, + "git:": "http:" + }, + { + fuzzyIP: false, + fuzzyLink: false + } +); // fluent interface -const linkifier = new LinkifyIt(); - linkifier - .add('git:', 'http:') + .add("git:", "http:") .set({ fuzzyIP: true }) - .tlds('onion', true) + .tlds("onion", true) .test("https://github.com/DefinitelyTyped/DefinitelyTyped/"); // match -const matches = linkifier.match("https://github.com/DefinitelyTyped/DefinitelyTyped/"); -matches.forEach(({index, lastIndex, raw, schema, text, url}) => {}); +const matches = linkifier.match( + "https://github.com/DefinitelyTyped/DefinitelyTyped/" +); +matches.forEach(({ index, lastIndex, raw, schema, text, url }) => {}); // complex rule -linkifier.add('@', { +linkifier.add("@", { validate: (text, pos, self) => { return 42; }, - normalize: (match) => { - return 'forty-two'; + normalize: match => { + return "forty-two"; } }); + +// regexp rule +linkifier.add("custom:", { + validate: /^\/\/\d+/ +}); diff --git a/types/listr/index.d.ts b/types/listr/index.d.ts new file mode 100644 index 0000000000..303c1d4a07 --- /dev/null +++ b/types/listr/index.d.ts @@ -0,0 +1,48 @@ +// Type definitions for listr 0.13 +// Project: https://github.com/samverschueren/listr#readme +// Definitions by: Dusan Radovanovic +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as stream from "stream"; + +declare namespace Listr { + interface ListrRenderer { + nonTTY: boolean; + render(): void; + end(): void; + } + + interface ListrOptions { + concurrent?: boolean | number; + exitOnError?: boolean; + renderer?: "silent" | "default" | "verbose" | ListrRenderer; + nonTTYRenderer?: "silent" | "default" | "verbose" | ListrRenderer; + } + + interface ListrTask { + title: string; + output?: string; + task: (ctx: any, task: ListrTaskWrapper) => void | string | Promise | stream.Readable | Listr; + skip?: (ctx: any, task: ListrTaskWrapper) => boolean | Promise | string | void; + enabled?: (ctx: any, task: ListrTaskWrapper) => boolean | Promise; + } + + interface ListrTaskWrapper { + title: string; + output: any; + report(error: Error): void; + skip(message: string): void; + run(ctx?: any): Promise; + } +} + +declare class Listr { + constructor(tasks?: ReadonlyArray, options?: Listr.ListrOptions); + constructor(options?: Listr.ListrOptions); + add(tasks: Listr.ListrTask | ReadonlyArray): void; + run(ctx?: any): Promise; +} + +export = Listr; diff --git a/types/listr/listr-tests.ts b/types/listr/listr-tests.ts new file mode 100644 index 0000000000..e9ac72b5dc --- /dev/null +++ b/types/listr/listr-tests.ts @@ -0,0 +1,167 @@ +import Listr = require("listr"); +import * as fs from "fs"; + +const tasks = new Listr([ + { + title: 'Git', + task: () => { + return new Listr([ + { + title: 'Checking git status', + task: () => new Promise(resolve => resolve()) + .then(result => { + if (result !== '') { + throw new Error('Unclean working tree. Commit or stash changes first.'); + } + }) + }, + { + title: 'Checking remote history', + task: () => new Promise(resolve => resolve()) + .then(result => { + if (result !== '0') { + throw new Error('Remote history differ. Please pull changes.'); + } + }) + } + ], + { concurrent: true }); + } + }, + { + title: 'Install package dependencies with Yarn', + task: (ctx, task) => new Promise(resolve => resolve()) + .catch(() => { + ctx.yarn = false; + + task.skip('Yarn not available, install it via `npm install -g yarn`'); + }) + }, + { + title: 'Install package dependencies with npm', + enabled: ctx => ctx.yarn === false, + task: () => new Promise(resolve => resolve()) + }, + { + title: 'Run tests', + task: () => new Promise(resolve => resolve()) + }, + { + title: 'Publish package', + task: () => new Promise(resolve => resolve()) + } +]); + +tasks.run().catch(err => { +}); + +const tasks21 = new Listr([ + { + title: 'Success', + task: () => 'Foo' + }, + { + title: 'Failure', + task: () => { + throw new Error('Bar'); + } + } +]); + +const taskA: Listr.ListrTask = { + title: 'Success', + task: () => 'Foo' +}; + +const taskB: Listr.ListrTask = { + title: 'Failure', + task: () => { + throw new Error('Bar'); + } +}; + +const tasks22 = new Listr([taskA, taskB]); + +const tasks3 = new Listr([ + { + title: 'Success', + task: () => Promise.resolve('Foo') + }, + { + title: 'Failure', + task: () => Promise.reject(new Error('Bar')) + } +]); + +const tasks4 = new Listr([ + { + title: 'File', + task: () => fs.createReadStream('data.txt', 'utf8') + } +]); + +const tasks5 = new Listr([ + { + title: 'Task 1', + task: () => Promise.resolve('Foo') + }, + { + title: 'Can be skipped', + skip: () => { + if (Math.random() > 0.5) { + return 'Reason for skipping'; + } + }, + task: () => 'Bar' + }, + { + title: 'Task 3', + task: () => Promise.resolve('Bar') + } +]); + +const tasks6 = new Listr([ + { + title: 'Install package dependencies with Yarn', + task: (ctx, task) => new Promise(resolve => resolve()) + .catch(() => { + ctx.yarn = false; + + task.skip('Yarn not available, install it via `npm install -g yarn`'); + }) + }, + { + title: 'Install package dependencies with npm', + enabled: ctx => ctx.yarn === false, + task: () => new Promise(resolve => resolve()) + } +]); + +const tasks7 = new Listr([ + { + title: 'Task 1', + skip: ctx => ctx.foo === 'bar', + task: () => Promise.resolve('Foo') + }, + { + title: 'Can be skipped', + skip: () => { + if (Math.random() > 0.5) { + return 'Reason for skipping'; + } + }, + task: ctx => { + ctx.unicorn = 'rainbow'; + } + }, + { + title: 'Task 3', + task: ctx => Promise.resolve(`${ctx.foo} ${ctx.bar}`) + } +]); + +tasks.run({ + foo: 'bar' +}).then(ctx => { + console.log(ctx); +}); diff --git a/types/listr/tsconfig.json b/types/listr/tsconfig.json new file mode 100644 index 0000000000..cae79d1480 --- /dev/null +++ b/types/listr/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "listr-tests.ts" + ] +} diff --git a/types/listr/tslint.json b/types/listr/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/listr/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/loader-utils/index.d.ts b/types/loader-utils/index.d.ts index 37ce2e461f..18aa16d7e4 100644 --- a/types/loader-utils/index.d.ts +++ b/types/loader-utils/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Gyusun Yeom // Totooria Hyperion // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 /// diff --git a/types/lodash-webpack-plugin/index.d.ts b/types/lodash-webpack-plugin/index.d.ts index e7e2dfd4db..505c54b5c4 100644 --- a/types/lodash-webpack-plugin/index.d.ts +++ b/types/lodash-webpack-plugin/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/lodash/lodash-webpack-plugin#readme // Definitions by: Benjamin Lim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.3 import { Plugin } from 'webpack'; diff --git a/types/lodash/common/array.d.ts b/types/lodash/common/array.d.ts index f70fbbf135..34b9548221 100644 --- a/types/lodash/common/array.d.ts +++ b/types/lodash/common/array.d.ts @@ -916,27 +916,15 @@ declare module "../index" { interface LoDashStatic { /** - * Flattens a nested array. If isDeep is true the array is recursively flattened, otherwise it’s only - * flattened a single level. + * Flattens `array` a single level deep. * * @param array The array to flatten. - * @param isDeep Specify a deep flatten. * @return Returns the new flattened array. */ - flatten(array: ListOfRecursiveArraysOrValues | null | undefined, isDeep: boolean): T[]; - - /** - * @see _.flatten - */ flatten(array: List> | null | undefined): T[]; } interface LoDashImplicitWrapper { - /** - * @see _.flatten - */ - flatten(this: LoDashImplicitWrapper | null | undefined>, isDeep: boolean): LoDashImplicitWrapper; - /** * @see _.flatten */ @@ -944,11 +932,6 @@ declare module "../index" { } interface LoDashExplicitWrapper { - /** - * @see _.flatten - */ - flatten(this: LoDashExplicitWrapper | null | undefined>, isDeep: boolean): LoDashExplicitWrapper; - /** * @see _.flatten */ @@ -1102,8 +1085,7 @@ declare module "../index" { * Gets the index at which the first occurrence of `value` is found in `array` * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) * for equality comparisons. If `fromIndex` is negative, it's used as the offset - * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` - * performs a faster binary search. + * from the end of `array`. * * @category Array * @param array The array to search. @@ -1122,7 +1104,7 @@ declare module "../index" { indexOf( array: List | null | undefined, value: T, - fromIndex?: boolean|number + fromIndex?: number ): number; } @@ -1133,7 +1115,7 @@ declare module "../index" { indexOf( this: LoDashImplicitWrapper | null | undefined>, value: T, - fromIndex?: boolean|number + fromIndex?: number ): number; } @@ -1144,7 +1126,7 @@ declare module "../index" { indexOf( this: LoDashExplicitWrapper | null | undefined>, value: T, - fromIndex?: boolean|number + fromIndex?: number ): LoDashExplicitWrapper; } @@ -1423,7 +1405,7 @@ declare module "../index" { this: LoDashImplicitWrapper | null | undefined>, values1: List, values2: List, - ...values: Array | Comparator2>, + ...values: Array | Comparator2> ): LoDashImplicitWrapper; /** @@ -1462,7 +1444,7 @@ declare module "../index" { this: LoDashExplicitWrapper | null | undefined>, values1: List, values2: List, - ...values: Array | Comparator2>, + ...values: Array | Comparator2> ): LoDashExplicitWrapper; /** @@ -3463,7 +3445,7 @@ declare module "../index" { /** * @see _.zip */ - zip(...arrays: Array | null | undefined>): (T | undefined)[][]; + zip(...arrays: Array | null | undefined>): Array>; } interface LoDashImplicitWrapper { @@ -3842,4 +3824,4 @@ declare module "../index" { ...iteratee: Array<((...group: T[]) => TResult) | List | null | undefined> ): LoDashExplicitWrapper; } -} \ No newline at end of file +} diff --git a/types/lodash/common/collection.d.ts b/types/lodash/common/collection.d.ts index 31e5b1c212..3c7e65d38f 100644 --- a/types/lodash/common/collection.d.ts +++ b/types/lodash/common/collection.d.ts @@ -36,14 +36,6 @@ declare module "../index" { iteratee?: ListIteratee ): Dictionary; - /** - * @see _.countBy - */ - countBy( - collection: NumericDictionary | null | undefined, - iteratee?: NumericDictionaryIteratee - ): Dictionary; - /** * @see _.countBy */ @@ -77,14 +69,6 @@ declare module "../index" { this: LoDashImplicitWrapper, iteratee?: ObjectIteratee ): LoDashImplicitWrapper>; - - /** - * @see _.countBy - */ - countBy( - this: LoDashImplicitWrapper | null | undefined>, - iteratee?: NumericDictionaryIteratee - ): LoDashImplicitWrapper>; } interface LoDashExplicitWrapper { @@ -111,14 +95,6 @@ declare module "../index" { this: LoDashExplicitWrapper, iteratee?: ObjectIteratee ): LoDashExplicitWrapper>; - - /** - * @see _.countBy - */ - countBy( - this: LoDashExplicitWrapper | null | undefined>, - iteratee?: NumericDictionaryIteratee - ): LoDashExplicitWrapper>; } // each @@ -217,14 +193,6 @@ declare module "../index" { predicate?: ListIterateeCustom ): boolean; - /** - * @see _.every - */ - every( - collection: NumericDictionary | null | undefined, - predicate?: NumericDictionaryIterateeCustom - ): boolean; - /** * @see _.every */ @@ -250,14 +218,6 @@ declare module "../index" { this: LoDashImplicitWrapper, predicate?: ObjectIterateeCustom ): boolean; - - /** - * @see _.every - */ - every( - this: LoDashImplicitWrapper | null | undefined>, - predicate?: NumericDictionaryIterateeCustom - ): boolean; } interface LoDashExplicitWrapper { @@ -276,14 +236,6 @@ declare module "../index" { this: LoDashExplicitWrapper, predicate?: ObjectIterateeCustom ): LoDashExplicitWrapper; - - /** - * @see _.every - */ - every( - this: LoDashExplicitWrapper | null | undefined>, - predicate?: NumericDictionaryIterateeCustom - ): LoDashExplicitWrapper; } // filter @@ -564,13 +516,13 @@ declare module "../index" { interface LoDashStatic { /** - * This method is like _.find except that it iterates over elements of a collection from - * right to left. - * @param collection Searches for a value in this list. - * @param predicate The function called per iteration. - * @param fromIndex The index to search from. - * @return The found element, else undefined. - **/ + * This method is like _.find except that it iterates over elements of a collection from + * right to left. + * @param collection Searches for a value in this list. + * @param predicate The function called per iteration. + * @param fromIndex The index to search from. + * @return The found element, else undefined. + */ findLast( collection: List | null | undefined, predicate: ListIteratorTypeGuard, @@ -712,14 +664,6 @@ declare module "../index" { iteratee: ListIterator> ): TResult[]; - /** - * @see _.flatMap - */ - flatMap( - collection: NumericDictionary | null | undefined, - iteratee: NumericDictionaryIterator> - ): TResult[]; - /** * @see _.flatMap */ @@ -772,14 +716,6 @@ declare module "../index" { iteratee: ObjectIterator> ): LoDashImplicitWrapper; - /** - * @see _.flatMap - */ - flatMap( - this: LoDashImplicitWrapper | null | undefined>, - iteratee: NumericDictionaryIterator> - ): LoDashImplicitWrapper; - /** * @see _.flatMap */ @@ -814,14 +750,6 @@ declare module "../index" { iteratee: ListIterator> ): LoDashExplicitWrapper; - /** - * @see _.flatMap - */ - flatMap( - this: LoDashExplicitWrapper | null | undefined>, - iteratee: NumericDictionaryIterator> - ): LoDashExplicitWrapper; - /** * @see _.flatMap */ @@ -878,14 +806,6 @@ declare module "../index" { iteratee: ListIterator | TResult> ): TResult[]; - /** - * @see _.flatMapDeep - */ - flatMapDeep( - collection: NumericDictionary | null | undefined, - iteratee: NumericDictionaryIterator | TResult> - ): TResult[]; - /** * @see _.flatMapDeep */ @@ -927,14 +847,6 @@ declare module "../index" { iteratee: ListIterator | TResult> ): LoDashImplicitWrapper; - /** - * @see _.flatMapDeep - */ - flatMapDeep( - this: LoDashImplicitWrapper | null | undefined>, - iteratee: NumericDictionaryIterator | TResult> - ): LoDashImplicitWrapper; - /** * @see _.flatMapDeep */ @@ -976,14 +888,6 @@ declare module "../index" { iteratee: ListIterator | TResult> ): LoDashExplicitWrapper; - /** - * @see _.flatMapDeep - */ - flatMapDeep( - this: LoDashExplicitWrapper | null | undefined>, - iteratee: NumericDictionaryIterator | TResult> - ): LoDashExplicitWrapper; - /** * @see _.flatMapDeep */ @@ -1044,15 +948,6 @@ declare module "../index" { depth?: number ): TResult[]; - /** - * @see _.flatMapDepth - */ - flatMapDepth( - collection: NumericDictionary | null | undefined, - iteratee: NumericDictionaryIterator | TResult>, - depth?: number - ): TResult[]; - /** * @see _.flatMapDepth */ @@ -1098,15 +993,6 @@ declare module "../index" { depth?: number ): LoDashImplicitWrapper; - /** - * @see _.flatMapDepth - */ - flatMapDepth( - this: LoDashImplicitWrapper | null | undefined>, - iteratee: NumericDictionaryIterator | TResult>, - depth?: number - ): LoDashImplicitWrapper; - /** * @see _.flatMapDepth */ @@ -1152,15 +1038,6 @@ declare module "../index" { depth?: number ): LoDashExplicitWrapper; - /** - * @see _.flatMapDepth - */ - flatMapDepth( - this: LoDashExplicitWrapper | null | undefined>, - iteratee: NumericDictionaryIterator | TResult>, - depth?: number - ): LoDashExplicitWrapper; - /** * @see _.flatMapDepth */ @@ -1446,14 +1323,6 @@ declare module "../index" { iteratee?: ListIteratee ): Dictionary; - /** - * @see _.groupBy - */ - groupBy( - collection: NumericDictionary | null | undefined, - iteratee?: NumericDictionaryIteratee - ): Dictionary; - /** * @see _.groupBy */ @@ -1487,14 +1356,6 @@ declare module "../index" { this: LoDashImplicitWrapper, iteratee?: ObjectIteratee ): LoDashImplicitWrapper>>; - - /** - * @see _.groupBy - */ - groupBy( - this: LoDashImplicitWrapper | null | undefined>, - iteratee?: NumericDictionaryIteratee - ): LoDashImplicitWrapper>; } interface LoDashExplicitWrapper { @@ -1514,14 +1375,6 @@ declare module "../index" { iteratee?: ListIteratee ): LoDashExplicitWrapper>; - /** - * @see _.groupBy - */ - groupBy( - this: LoDashExplicitWrapper | null | undefined>, - iteratee?: NumericDictionaryIteratee - ): LoDashExplicitWrapper>; - /** * @see _.groupBy */ @@ -1544,7 +1397,7 @@ declare module "../index" { * @return True if the target element is found, else false. */ includes( - collection: List|Dictionary | null | undefined, + collection: List | Dictionary | NumericDictionary | null | undefined, target: T, fromIndex?: number ): boolean; @@ -1555,7 +1408,7 @@ declare module "../index" { * @see _.includes */ includes( - this: LoDashImplicitWrapper | Dictionary | null | undefined>, + this: LoDashImplicitWrapper | Dictionary | NumericDictionary | null | undefined>, target: T, fromIndex?: number ): boolean; @@ -1566,7 +1419,7 @@ declare module "../index" { * @see _.includes */ includes( - this: LoDashExplicitWrapper | Dictionary | null | undefined>, + this: LoDashExplicitWrapper | Dictionary | NumericDictionary | null | undefined>, target: T, fromIndex?: number ): LoDashExplicitWrapper; @@ -1673,14 +1526,6 @@ declare module "../index" { collection: T | null | undefined, iteratee?: ObjectIterateeCustom ): Dictionary; - - /** - * @see _.keyBy - */ - keyBy( - collection: NumericDictionary | null | undefined, - iteratee?: NumericDictionaryIterateeCustom - ): Dictionary; } interface LoDashImplicitWrapper { @@ -1707,14 +1552,6 @@ declare module "../index" { this: LoDashImplicitWrapper, iteratee?: ObjectIterateeCustom ): LoDashImplicitWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - this: LoDashImplicitWrapper | null | undefined>, - iteratee?: NumericDictionaryIterateeCustom - ): LoDashImplicitWrapper>; } interface LoDashExplicitWrapper { @@ -1741,14 +1578,6 @@ declare module "../index" { this: LoDashExplicitWrapper, iteratee?: ObjectIterateeCustom ): LoDashExplicitWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - this: LoDashExplicitWrapper | null | undefined>, - iteratee?: NumericDictionaryIterateeCustom - ): LoDashExplicitWrapper>; } // map @@ -1780,6 +1609,14 @@ declare module "../index" { * @param thisArg The this binding of iteratee. * @return Returns the new mapped array. */ + map( + collection: T[] | null | undefined, + iteratee: ArrayIterator + ): TResult[]; + + /** + * @see _.map + */ map( collection: List | null | undefined, iteratee: ListIterator @@ -1788,46 +1625,48 @@ declare module "../index" { /** * @see _.map */ - map(collection: List | Dictionary | null | undefined): T[]; + map(collection: List | Dictionary | NumericDictionary | null | undefined): T[]; /** * @see _.map */ - map( - collection: Dictionary | null | undefined, - iteratee: DictionaryIterator + map( + collection: T | null | undefined, + iteratee: ObjectIterator ): TResult[]; /** @see _.map */ map( - collection: List | Dictionary | null | undefined, + collection: List | Dictionary | NumericDictionary | null | undefined, iteratee: K ): Array; - /** @see _.map */ - map( - collection: NumericDictionary | null | undefined, - iteratee?: NumericDictionaryIterator - ): TResult[]; - - /** - * @see _.map - */ - map( - collection: List|Dictionary|NumericDictionary | null | undefined, - iteratee?: string - ): TResult[]; - /** * @see _.map */ map( - collection: List|Dictionary|NumericDictionary | null | undefined, + collection: List | Dictionary | NumericDictionary | null | undefined, + iteratee?: string + ): any[]; + + /** + * @see _.map + */ + map( + collection: List | Dictionary | NumericDictionary | null | undefined, iteratee?: object ): boolean[]; } interface LoDashImplicitWrapper { + /** + * @see _.map + */ + map( + this: LoDashImplicitWrapper, + iteratee: ArrayIterator + ): LoDashImplicitWrapper; + /** * @see _.map */ @@ -1839,35 +1678,29 @@ declare module "../index" { /** * @see _.map */ - map(this: LoDashImplicitWrapper | Dictionary | null | undefined>): LoDashImplicitWrapper; + map(this: LoDashImplicitWrapper | Dictionary | NumericDictionary | null | undefined>): LoDashImplicitWrapper; /** * @see _.map */ - map( - this: LoDashImplicitWrapper | null | undefined>, - iteratee: DictionaryIterator + map( + this: LoDashImplicitWrapper, + iteratee: ObjectIterator ): LoDashImplicitWrapper; /** @see _.map */ map( - this: LoDashImplicitWrapper | Dictionary | null | undefined>, + this: LoDashImplicitWrapper | Dictionary | NumericDictionary | null | undefined>, iteratee: K ): LoDashImplicitWrapper>; - /** @see _.map */ - map( - this: LoDashImplicitWrapper | null | undefined>, - iteratee?: NumericDictionaryIterator - ): LoDashImplicitWrapper; - /** * @see _.map */ - map( + map( this: LoDashImplicitWrapper | Dictionary | NumericDictionary | null | undefined>, iteratee?: string - ): LoDashImplicitWrapper; + ): LoDashImplicitWrapper; /** * @see _.map @@ -1879,6 +1712,14 @@ declare module "../index" { } interface LoDashExplicitWrapper { + /** + * @see _.map + */ + map( + this: LoDashExplicitWrapper, + iteratee: ArrayIterator + ): LoDashExplicitWrapper; + /** * @see _.map */ @@ -1890,37 +1731,29 @@ declare module "../index" { /** * @see _.map */ - map(this: LoDashExplicitWrapper | Dictionary | null | undefined>): LoDashExplicitWrapper; + map(this: LoDashExplicitWrapper | Dictionary | NumericDictionary | null | undefined>): LoDashExplicitWrapper; /** * @see _.map */ - map( - this: LoDashExplicitWrapper | null | undefined>, - iteratee: DictionaryIterator + map( + this: LoDashExplicitWrapper, + iteratee: ObjectIterator ): LoDashExplicitWrapper; /** @see _.map */ map( - this: LoDashExplicitWrapper | Dictionary | null | undefined>, + this: LoDashExplicitWrapper | Dictionary | NumericDictionary | null | undefined>, iteratee: K ): LoDashExplicitWrapper>; /** * @see _.map */ - map( - this: LoDashExplicitWrapper | null | undefined>, - iteratee?: NumericDictionaryIterator - ): LoDashExplicitWrapper; - - /** - * @see _.map - */ - map( + map( this: LoDashExplicitWrapper | Dictionary | NumericDictionary | null | undefined>, iteratee?: string - ): LoDashExplicitWrapper; + ): LoDashExplicitWrapper; /** * @see _.map @@ -1991,24 +1824,6 @@ declare module "../index" { iteratees?: Many>, orders?: Many ): Array; - - /** - * @see _.orderBy - */ - orderBy( - collection: NumericDictionary | null | undefined, - iteratees?: Many>, - orders?: Many - ): T[]; - - /** - * @see _.orderBy - */ - orderBy( - collection: NumericDictionary | null | undefined, - iteratees?: Many>, - orders?: Many - ): T[]; } interface LoDashImplicitWrapper { @@ -2047,24 +1862,6 @@ declare module "../index" { iteratees?: Many>, orders?: Many ): LoDashImplicitWrapper>; - - /** - * @see _.orderBy - */ - orderBy( - this: LoDashImplicitWrapper | null | undefined>, - iteratees?: Many>, - orders?: Many - ): LoDashImplicitWrapper; - - /** - * @see _.orderBy - */ - orderBy( - this: LoDashImplicitWrapper | null | undefined>, - iteratees?: Many>, - orders?: Many - ): LoDashImplicitWrapper; } interface LoDashExplicitWrapper { @@ -2103,24 +1900,6 @@ declare module "../index" { iteratees?: Many>, orders?: Many ): LoDashExplicitWrapper>; - - /** - * @see _.orderBy - */ - orderBy( - this: LoDashExplicitWrapper | null | undefined>, - iteratees?: Many>, - orders?: Many - ): LoDashExplicitWrapper; - - /** - * @see _.orderBy - */ - orderBy( - this: LoDashExplicitWrapper | null | undefined>, - iteratees?: Many>, - orders?: Many - ): LoDashExplicitWrapper; } // partition @@ -2233,15 +2012,6 @@ declare module "../index" { accumulator: TResult ): TResult; - /** - * @see _.reduce - **/ - reduce( - collection: NumericDictionary | null | undefined, - callback: MemoListIterator>, - accumulator: TResult - ): TResult; - /** * @see _.reduce **/ @@ -2265,14 +2035,6 @@ declare module "../index" { collection: T | null | undefined, callback: MemoObjectIterator ): TResult | undefined; - - /** - * @see _.reduce - **/ - reduce( - collection: NumericDictionary | null | undefined, - callback: MemoListIterator> - ): TResult | undefined; } interface LoDashImplicitWrapper { @@ -2303,15 +2065,6 @@ declare module "../index" { accumulator: TResult ): TResult; - /** - * @see _.reduce - **/ - reduce( - this: LoDashImplicitWrapper | null | undefined>, - callback: MemoListIterator>, - accumulator: TResult - ): TResult; - /** * @see _.reduce **/ @@ -2335,14 +2088,6 @@ declare module "../index" { this: LoDashImplicitWrapper, callback: MemoObjectIterator ): TResult | undefined; - - /** - * @see _.reduce - **/ - reduce( - this: LoDashImplicitWrapper | null | undefined>, - callback: MemoListIterator> - ): TResult | undefined; } interface LoDashExplicitWrapper { @@ -2373,15 +2118,6 @@ declare module "../index" { accumulator: TResult ): LoDashExplicitWrapper; - /** - * @see _.reduce - **/ - reduce( - this: LoDashExplicitWrapper | null | undefined>, - callback: MemoListIterator>, - accumulator: TResult - ): LoDashExplicitWrapper; - /** * @see _.reduce **/ @@ -2405,14 +2141,6 @@ declare module "../index" { this: LoDashExplicitWrapper, callback: MemoObjectIterator ): LoDashExplicitWrapper; - - /** - * @see _.reduce - **/ - reduce( - this: LoDashExplicitWrapper | null | undefined>, - callback: MemoListIterator> - ): LoDashExplicitWrapper; } // reduceRight @@ -2450,15 +2178,6 @@ declare module "../index" { accumulator: TResult ): TResult; - /** - * @see _.reduceRight - **/ - reduceRight( - collection: NumericDictionary | null | undefined, - callback: MemoListIterator>, - accumulator: TResult - ): TResult; - /** * @see _.reduceRight **/ @@ -2482,14 +2201,6 @@ declare module "../index" { collection: T | null | undefined, callback: MemoObjectIterator ): TResult | undefined; - - /** - * @see _.reduceRight - **/ - reduceRight( - collection: NumericDictionary | null | undefined, - callback: MemoListIterator> - ): TResult | undefined; } interface LoDashImplicitWrapper { @@ -2520,15 +2231,6 @@ declare module "../index" { accumulator: TResult ): TResult; - /** - * @see _.reduceRight - **/ - reduceRight( - this: LoDashImplicitWrapper | null | undefined>, - callback: MemoListIterator>, - accumulator: TResult - ): TResult; - /** * @see _.reduceRight **/ @@ -2552,14 +2254,6 @@ declare module "../index" { this: LoDashImplicitWrapper, callback: MemoObjectIterator ): TResult | undefined; - - /** - * @see _.reduceRight - **/ - reduceRight( - this: LoDashImplicitWrapper | null | undefined>, - callback: MemoListIterator> - ): TResult | undefined; } interface LoDashExplicitWrapper { @@ -2590,15 +2284,6 @@ declare module "../index" { accumulator: TResult ): LoDashExplicitWrapper; - /** - * @see _.reduceRight - **/ - reduceRight( - this: LoDashExplicitWrapper | null | undefined>, - callback: MemoListIterator>, - accumulator: TResult - ): LoDashExplicitWrapper; - /** * @see _.reduceRight **/ @@ -2622,14 +2307,6 @@ declare module "../index" { this: LoDashExplicitWrapper, callback: MemoObjectIterator ): LoDashExplicitWrapper; - - /** - * @see _.reduceRight - **/ - reduceRight( - this: LoDashExplicitWrapper | null | undefined>, - callback: MemoListIterator> - ): LoDashExplicitWrapper; } // reject @@ -2731,13 +2408,6 @@ declare module "../index" { collection: List | Dictionary | NumericDictionary | null | undefined ): T | undefined; - /** - * @see _.sample - */ - sample( - collection: T - ): T[keyof T]; - /** * @see _.sample */ @@ -2754,13 +2424,6 @@ declare module "../index" { this: LoDashImplicitWrapper | Dictionary | NumericDictionary | null | undefined> ): T | undefined; - /** - * @see _.sample - */ - sample( - this: LoDashImplicitWrapper, - ): T[keyof T]; - /** * @see _.sample */ @@ -2777,13 +2440,6 @@ declare module "../index" { this: LoDashExplicitWrapper | Dictionary | NumericDictionary | null | undefined> ): LoDashExplicitWrapper; - /** - * @see _.sample - */ - sample( - this: LoDashExplicitWrapper, - ): LoDashExplicitWrapper; - /** * @see _.sample */ @@ -2803,7 +2459,7 @@ declare module "../index" { * @return Returns the random elements. */ sampleSize( - collection: List|Dictionary|NumericDictionary | null | undefined, + collection: List | Dictionary | NumericDictionary | null | undefined, n?: number ): T[]; @@ -2821,7 +2477,7 @@ declare module "../index" { * @see _.sampleSize */ sampleSize( - this: LoDashImplicitWrapper|Dictionary|NumericDictionary | null | undefined>, + this: LoDashImplicitWrapper | Dictionary | NumericDictionary | null | undefined>, n?: number ): LoDashImplicitWrapper; @@ -2839,7 +2495,7 @@ declare module "../index" { * @see _.sampleSize */ sampleSize( - this: LoDashExplicitWrapper|Dictionary|NumericDictionary | null | undefined>, + this: LoDashExplicitWrapper | Dictionary | NumericDictionary | null | undefined>, n?: number ): LoDashExplicitWrapper; @@ -2943,14 +2599,6 @@ declare module "../index" { collection: T | null | undefined, predicate?: ObjectIterateeCustom ): boolean; - - /** - * @see _.some - */ - some( - collection: NumericDictionary | null | undefined, - predicate?: NumericDictionaryIterateeCustom - ): boolean; } interface LoDashImplicitWrapper { @@ -2969,14 +2617,6 @@ declare module "../index" { this: LoDashImplicitWrapper, predicate?: ObjectIterateeCustom ): boolean; - - /** - * @see _.some - */ - some( - this: LoDashImplicitWrapper | null | undefined>, - predicate?: NumericDictionaryIterateeCustom - ): boolean; } interface LoDashExplicitWrapper { @@ -2995,14 +2635,6 @@ declare module "../index" { this: LoDashExplicitWrapper, predicate?: ObjectIterateeCustom ): LoDashExplicitWrapper; - - /** - * @see _.some - */ - some( - this: LoDashExplicitWrapper | null | undefined>, - predicate?: NumericDictionaryIterateeCustom - ): LoDashExplicitWrapper; } // sortBy @@ -3088,4 +2720,4 @@ declare module "../index" { ...iteratees: Array>> ): LoDashExplicitWrapper>; } -} \ No newline at end of file +} diff --git a/types/lodash/common/common.d.ts b/types/lodash/common/common.d.ts index ac3e137b12..17d5e04b36 100644 --- a/types/lodash/common/common.d.ts +++ b/types/lodash/common/common.d.ts @@ -1,4 +1,5 @@ import _ = require("../index"); +// tslint:disable-next-line:strict-export-declare-modifiers type GlobalPartial = Partial; declare module "../index" { type PartialObject = GlobalPartial; @@ -86,7 +87,6 @@ declare module "../index" { templateSettings: TemplateSettings; } - /** * By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby * (ERB). Change the following template settings to use alternative delimiters. @@ -188,30 +188,28 @@ declare module "../index" { // Note: key should be string, not keyof T, because the actual object may contain extra properties that were not specified in the type. type ObjectIterator = (value: TObject[keyof TObject], key: string, collection: TObject) => TResult; type ObjectIteratee = ObjectIterator | string | [string, any] | PartialDeep; - type ObjectIterateeCustom = ObjectIterator | string | object | [string, any] | PartialDeep; + type ObjectIterateeCustom = ObjectIterator | string | [string, any] | PartialDeep; type ObjectIteratorTypeGuard = (value: TObject[keyof TObject], key: string, collection: TObject) => value is S; - type DictionaryIterator = ObjectIterator, TResult>; - type DictionaryIteratee = ObjectIteratee>; - type DictionaryIteratorTypeGuard = ObjectIteratorTypeGuard, S>; - - type NumericDictionaryIterator = (value: T, key: number, collection: NumericDictionary) => TResult; - type NumericDictionaryIteratee = NumericDictionaryIterator | string | [string, any] | PartialDeep; - type NumericDictionaryIterateeCustom = NumericDictionaryIterator | string | [string, any] | PartialDeep; - type StringIterator = (char: string, index: number, string: string) => TResult; + /** @deprecated Use MemoVoidArrayIterator or MemoVoidDictionaryIterator instead. */ type MemoVoidIterator = (prev: TResult, curr: T, indexOrKey: any, list: T[]) => void; - /** @deprecated Use MemoListIterator or MemoObjectIterator instead. */ + /** @deprecated Use MemoListIterator or MemoObjectIterator instead. */ type MemoIterator = (prev: TResult, curr: T, indexOrKey: any, list: T[]) => TResult; type MemoListIterator = (prev: TResult, curr: T, index: number, list: TList) => TResult; type MemoObjectIterator = (prev: TResult, curr: T, key: string, list: TList) => TResult; + type MemoIteratorCapped = (prev: TResult, curr: T) => TResult; + type MemoIteratorCappedRight = (curr: T, prev: TResult) => TResult; type MemoVoidArrayIterator = (acc: TResult, curr: T, index: number, arr: T[]) => void; type MemoVoidDictionaryIterator = (acc: TResult, curr: T, key: string, dict: Dictionary) => void; + type MemoVoidIteratorCapped = (acc: TResult, curr: T) => void; type ValueIteratee = ((value: T) => NotVoid) | string | [string, any] | PartialDeep; + type ValueIterateeCustom = ((value: T) => TResult) | string | [string, any] | PartialDeep; + type ValueIteratorTypeGuard = (value: T) => value is S; type ValueKeyIteratee = ((value: T, key: string) => NotVoid) | string | [string, any] | PartialDeep; type Comparator = (a: T, b: T) => boolean; type Comparator2 = (a: T1, b: T2) => boolean; @@ -230,6 +228,11 @@ declare module "../index" { [index: number]: T; } + // Crazy typedef needed get _.omit to work properly with Dictionary and NumericDictionary + type AnyKindOfDictionary = + | Dictionary<{} | null | undefined> + | NumericDictionary<{} | null | undefined>; + interface Cancelable { cancel(): void; flush(): void; @@ -252,4 +255,12 @@ declare module "../index" { type LoDashExplicitNillableObjectWrapper = LoDashExplicitWrapper; type LoDashExplicitNumberArrayWrapper = LoDashExplicitWrapper; type LoDashExplicitStringWrapper = LoDashExplicitWrapper; + + type DictionaryIterator = ObjectIterator, TResult>; + type DictionaryIteratee = ObjectIteratee>; + type DictionaryIteratorTypeGuard = ObjectIteratorTypeGuard, S>; + // NOTE: keys of objects at run time are always strings, even when a NumericDictionary is being iterated. + type NumericDictionaryIterator = (value: T, key: string, collection: NumericDictionary) => TResult; + type NumericDictionaryIteratee = NumericDictionaryIterator | string | [string, any] | PartialDeep; + type NumericDictionaryIterateeCustom = NumericDictionaryIterator | string | [string, any] | PartialDeep; } diff --git a/types/lodash/common/date.d.ts b/types/lodash/common/date.d.ts index e460de4e1a..79131e4560 100644 --- a/types/lodash/common/date.d.ts +++ b/types/lodash/common/date.d.ts @@ -24,4 +24,4 @@ declare module "../index" { */ now(): LoDashExplicitWrapper; } -} \ No newline at end of file +} diff --git a/types/lodash/common/function.d.ts b/types/lodash/common/function.d.ts index b51fa6c625..71ec3bb884 100644 --- a/types/lodash/common/function.d.ts +++ b/types/lodash/common/function.d.ts @@ -95,7 +95,7 @@ declare module "../index" { // bind interface FunctionBind { - placeholder: any; + placeholder: __; ( func: (...args: any[]) => any, @@ -145,7 +145,7 @@ declare module "../index" { // bindKey interface FunctionBindKey { - placeholder: any; + placeholder: __; ( object: object, @@ -195,7 +195,7 @@ declare module "../index" { // curry - interface LoDashStatic { + interface Curry { /** * Creates a function that accepts one or more arguments of func that when called either invokes func returning * its result, if all func arguments have been provided, or returns a function that accepts one or more of the @@ -204,7 +204,7 @@ declare module "../index" { * @param arity The arity of func. * @return Returns the new curried function. */ - curry(func: (t1: T1) => R, arity?: number): + (func: (t1: T1) => R, arity?: number): CurriedFunction1; /** * Creates a function that accepts one or more arguments of func that when called either invokes func returning @@ -214,7 +214,7 @@ declare module "../index" { * @param arity The arity of func. * @return Returns the new curried function. */ - curry(func: (t1: T1, t2: T2) => R, arity?: number): + (func: (t1: T1, t2: T2) => R, arity?: number): CurriedFunction2; /** * Creates a function that accepts one or more arguments of func that when called either invokes func returning @@ -224,7 +224,7 @@ declare module "../index" { * @param arity The arity of func. * @return Returns the new curried function. */ - curry(func: (t1: T1, t2: T2, t3: T3) => R, arity?: number): + (func: (t1: T1, t2: T2, t3: T3) => R, arity?: number): CurriedFunction3; /** * Creates a function that accepts one or more arguments of func that when called either invokes func returning @@ -234,7 +234,7 @@ declare module "../index" { * @param arity The arity of func. * @return Returns the new curried function. */ - curry(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R, arity?: number): + (func: (t1: T1, t2: T2, t3: T3, t4: T4) => R, arity?: number): CurriedFunction4; /** * Creates a function that accepts one or more arguments of func that when called either invokes func returning @@ -244,7 +244,7 @@ declare module "../index" { * @param arity The arity of func. * @return Returns the new curried function. */ - curry(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R, arity?: number): + (func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R, arity?: number): CurriedFunction5; /** * Creates a function that accepts one or more arguments of func that when called either invokes func returning @@ -254,7 +254,13 @@ declare module "../index" { * @param arity The arity of func. * @return Returns the new curried function. */ - curry(func: (...args: any[]) => any, arity?: number): (...args: any[]) => any; + (func: (...args: any[]) => any, arity?: number): (...args: any[]) => any; + + placeholder: __; + } + + interface LoDashStatic { + curry: Curry; } interface CurriedFunction1 { @@ -265,60 +271,149 @@ declare module "../index" { interface CurriedFunction2 { (): CurriedFunction2; (t1: T1): CurriedFunction1; + (t1: __, t2: T2): CurriedFunction1; (t1: T1, t2: T2): R; } interface CurriedFunction3 { (): CurriedFunction3; (t1: T1): CurriedFunction2; + (t1: __, t2: T2): CurriedFunction2; (t1: T1, t2: T2): CurriedFunction1; + (t1: __, t2: __, t3: T3): CurriedFunction2; + (t1: T1, t2: __, t3: T3): CurriedFunction1; + (t1: __, t2: T2, t3: T3): CurriedFunction1; (t1: T1, t2: T2, t3: T3): R; } interface CurriedFunction4 { (): CurriedFunction4; (t1: T1): CurriedFunction3; + (t1: __, t2: T2): CurriedFunction3; (t1: T1, t2: T2): CurriedFunction2; + (t1: __, t2: __, t3: T3): CurriedFunction3; + (t1: __, t2: __, t3: T3): CurriedFunction2; + (t1: __, t2: T2, t3: T3): CurriedFunction2; (t1: T1, t2: T2, t3: T3): CurriedFunction1; + (t1: __, t2: __, t3: __, t4: T4): CurriedFunction3; + (t1: T1, t2: __, t3: __, t4: T4): CurriedFunction2; + (t1: __, t2: T2, t3: __, t4: T4): CurriedFunction2; + (t1: __, t2: __, t3: T3, t4: T4): CurriedFunction2; + (t1: T1, t2: T2, t3: __, t4: T4): CurriedFunction1; + (t1: T1, t2: __, t3: T3, t4: T4): CurriedFunction1; + (t1: __, t2: T2, t3: T3, t4: T4): CurriedFunction1; (t1: T1, t2: T2, t3: T3, t4: T4): R; } interface CurriedFunction5 { (): CurriedFunction5; (t1: T1): CurriedFunction4; + (t1: __, t2: T2): CurriedFunction4; (t1: T1, t2: T2): CurriedFunction3; + (t1: __, t2: __, t3: T3): CurriedFunction4; + (t1: T1, t2: __, t3: T3): CurriedFunction3; + (t1: __, t2: T2, t3: T3): CurriedFunction3; (t1: T1, t2: T2, t3: T3): CurriedFunction2; + (t1: __, t2: __, t3: __, t4: T4): CurriedFunction4; + (t1: T1, t2: __, t3: __, t4: T4): CurriedFunction3; + (t1: __, t2: T2, t3: __, t4: T4): CurriedFunction3; + (t1: __, t2: __, t3: T3, t4: T4): CurriedFunction3; + (t1: T1, t2: T2, t3: __, t4: T4): CurriedFunction2; + (t1: T1, t2: __, t3: T3, t4: T4): CurriedFunction2; + (t1: __, t2: T2, t3: T3, t4: T4): CurriedFunction2; (t1: T1, t2: T2, t3: T3, t4: T4): CurriedFunction1; + (t1: __, t2: __, t3: __, t4: __, t5: T5): CurriedFunction4; + (t1: T1, t2: __, t3: __, t4: __, t5: T5): CurriedFunction3; + (t1: __, t2: T2, t3: __, t4: __, t5: T5): CurriedFunction3; + (t1: __, t2: __, t3: T3, t4: __, t5: T5): CurriedFunction3; + (t1: __, t2: __, t3: __, t4: T4, t5: T5): CurriedFunction3; + (t1: T1, t2: T2, t3: __, t4: __, t5: T5): CurriedFunction2; + (t1: T1, t2: __, t3: T3, t4: __, t5: T5): CurriedFunction2; + (t1: T1, t2: __, t3: __, t4: T4, t5: T5): CurriedFunction2; + (t1: __, t2: T2, t3: T3, t4: __, t5: T5): CurriedFunction2; + (t1: __, t2: T2, t3: __, t4: T4, t5: T5): CurriedFunction2; + (t1: __, t2: __, t3: T3, t4: T4, t5: T5): CurriedFunction2; + (t1: T1, t2: T2, t3: T3, t4: __, t5: T5): CurriedFunction1; + (t1: T1, t2: T2, t3: __, t4: T4, t5: T5): CurriedFunction1; + (t1: T1, t2: __, t3: T3, t4: T4, t5: T5): CurriedFunction1; + (t1: __, t2: T2, t3: T3, t4: T4, t5: T5): CurriedFunction1; (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): R; } + interface RightCurriedFunction1 { (): RightCurriedFunction1; (t1: T1): R; } + interface RightCurriedFunction2 { (): RightCurriedFunction2; (t2: T2): RightCurriedFunction1; + (t1: T1, t2: __): RightCurriedFunction1; (t1: T1, t2: T2): R; } + interface RightCurriedFunction3 { (): RightCurriedFunction3; (t3: T3): RightCurriedFunction2; + (t2: T2, t3: __): RightCurriedFunction2; (t2: T2, t3: T3): RightCurriedFunction1; + (t1: T1, t2: __, t3: __): RightCurriedFunction2; + (t1: T1, t2: T2, t3: __): RightCurriedFunction1; + (t1: T1, t2: __, t3: T3): RightCurriedFunction1; (t1: T1, t2: T2, t3: T3): R; } + interface RightCurriedFunction4 { (): RightCurriedFunction4; (t4: T4): RightCurriedFunction3; + (t3: T3, t4: __): RightCurriedFunction3; (t3: T3, t4: T4): RightCurriedFunction2; + (t2: T2, t3: __, t4: __): RightCurriedFunction3; + (t2: T2, t3: T3, t4: __): RightCurriedFunction2; + (t2: T2, t3: __, t4: T4): RightCurriedFunction2; (t2: T2, t3: T3, t4: T4): RightCurriedFunction1; + (t1: T1, t2: __, t3: __, t4: __): RightCurriedFunction3; + (t1: T1, t2: T2, t3: __, t4: __): RightCurriedFunction2; + (t1: T1, t2: __, t3: T3, t4: __): RightCurriedFunction2; + (t1: T1, t2: __, t3: __, t4: T4): RightCurriedFunction2; + (t1: T1, t2: T2, t3: T3, t4: __): RightCurriedFunction1; + (t1: T1, t2: T2, t3: __, t4: T4): RightCurriedFunction1; + (t1: T1, t2: __, t3: T3, t4: T4): RightCurriedFunction1; (t1: T1, t2: T2, t3: T3, t4: T4): R; } + interface RightCurriedFunction5 { (): RightCurriedFunction5; (t5: T5): RightCurriedFunction4; + (t4: T4, t5: __): RightCurriedFunction4; (t4: T4, t5: T5): RightCurriedFunction3; + (t3: T3, t4: __, t5: __): RightCurriedFunction4; + (t3: T3, t4: T4, t5: __): RightCurriedFunction3; + (t3: T3, t4: __, t5: T5): RightCurriedFunction3; (t3: T3, t4: T4, t5: T5): RightCurriedFunction2; + (t2: T2, t3: __, t4: __, t5: __): RightCurriedFunction4; + (t2: T2, t3: T3, t4: __, t5: __): RightCurriedFunction3; + (t2: T2, t3: __, t4: T4, t5: __): RightCurriedFunction3; + (t2: T2, t3: __, t4: __, t5: T5): RightCurriedFunction3; + (t2: T2, t3: T3, t4: T4, t5: __): RightCurriedFunction2; + (t2: T2, t3: T3, t4: __, t5: T5): RightCurriedFunction2; + (t2: T2, t3: __, t4: T4, t5: T5): RightCurriedFunction2; (t2: T2, t3: T3, t4: T4, t5: T5): RightCurriedFunction1; + (t1: T1, t2: __, t3: __, t4: __, t5: __): RightCurriedFunction4; + (t1: T1, t2: T2, t3: __, t4: __, t5: __): RightCurriedFunction3; + (t1: T1, t2: __, t3: T3, t4: __, t5: __): RightCurriedFunction3; + (t1: T1, t2: __, t3: __, t4: T4, t5: __): RightCurriedFunction3; + (t1: T1, t2: __, t3: __, t4: __, t5: T5): RightCurriedFunction3; + (t1: T1, t2: T2, t3: T3, t4: __, t5: __): RightCurriedFunction2; + (t1: T1, t2: T2, t3: __, t4: T4, t5: __): RightCurriedFunction2; + (t1: T1, t2: T2, t3: __, t4: __, t5: T5): RightCurriedFunction2; + (t1: T1, t2: __, t3: T3, t4: T4, t5: __): RightCurriedFunction2; + (t1: T1, t2: __, t3: T3, t4: __, t5: T5): RightCurriedFunction2; + (t1: T1, t2: __, t3: __, t4: T4, t5: T5): RightCurriedFunction2; + (t1: T1, t2: T2, t3: T3, t4: T4, t5: __): RightCurriedFunction1; + (t1: T1, t2: T2, t3: T3, t4: __, t5: T5): RightCurriedFunction1; + (t1: T1, t2: T2, t3: __, t4: T4, t5: T5): RightCurriedFunction1; + (t1: T1, t2: __, t3: T3, t4: T4, t5: T5): RightCurriedFunction1; (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): R; } @@ -398,7 +493,7 @@ declare module "../index" { // curryRight - interface LoDashStatic { + interface CurryRight { /** * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight * instead of _.partial. @@ -406,7 +501,7 @@ declare module "../index" { * @param arity The arity of func. * @return Returns the new curried function. */ - curryRight(func: (t1: T1) => R, arity?: number): + (func: (t1: T1) => R, arity?: number): RightCurriedFunction1; /** * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight @@ -415,7 +510,7 @@ declare module "../index" { * @param arity The arity of func. * @return Returns the new curried function. */ - curryRight(func: (t1: T1, t2: T2) => R, arity?: number): + (func: (t1: T1, t2: T2) => R, arity?: number): RightCurriedFunction2; /** * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight @@ -424,7 +519,7 @@ declare module "../index" { * @param arity The arity of func. * @return Returns the new curried function. */ - curryRight(func: (t1: T1, t2: T2, t3: T3) => R, arity?: number): + (func: (t1: T1, t2: T2, t3: T3) => R, arity?: number): RightCurriedFunction3; /** * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight @@ -433,7 +528,7 @@ declare module "../index" { * @param arity The arity of func. * @return Returns the new curried function. */ - curryRight(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R, arity?: number): + (func: (t1: T1, t2: T2, t3: T3, t4: T4) => R, arity?: number): RightCurriedFunction4; /** * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight @@ -442,7 +537,7 @@ declare module "../index" { * @param arity The arity of func. * @return Returns the new curried function. */ - curryRight(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R, arity?: number): + (func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R, arity?: number): RightCurriedFunction5; /** * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight @@ -451,7 +546,13 @@ declare module "../index" { * @param arity The arity of func. * @return Returns the new curried function. */ - curryRight(func: (...args: any[]) => any, arity?: number): (...args: any[]) => any; + (func: (...args: any[]) => any, arity?: number): (...args: any[]) => any; + + placeholder: __; + } + + interface LoDashStatic { + curryRight: CurryRight; } interface LoDashImplicitWrapper { @@ -667,30 +768,30 @@ declare module "../index" { // flip interface LoDashStatic { - /** - * Creates a function that invokes `func` with arguments reversed. - * - * @category Function - * @param func The function to flip arguments for. - * @returns Returns the new function. - * @example - * - * var flipped = _.flip(function() { - * return _.toArray(arguments); - * }); - * - * flipped('a', 'b', 'c', 'd'); - * // => ['d', 'c', 'b', 'a'] - */ - flip any>(func: T): T; - } + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @category Function + * @param func The function to flip arguments for. + * @returns Returns the new function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + flip any>(func: T): T; + } - interface LoDashWrapper { - /** - * @see _.flip - */ - flip(): this; - } + interface LoDashWrapper { + /** + * @see _.flip + */ + flip(): this; + } // memoize @@ -771,34 +872,34 @@ declare module "../index" { // overArgs - interface LoDashStatic { - /** - * Creates a function that runs each argument through a corresponding transform function. - * - * @param func The function to wrap. - * @param transforms The functions to transform arguments, specified as individual functions or arrays - * of functions. - * @return Returns the new function. - */ - overArgs( - func: (...args: any[]) => any, - ...transforms: Array any>> - ): (...args: any[]) => any; - } + interface LoDashStatic { + /** + * Creates a function that runs each argument through a corresponding transform function. + * + * @param func The function to wrap. + * @param transforms The functions to transform arguments, specified as individual functions or arrays + * of functions. + * @return Returns the new function. + */ + overArgs( + func: (...args: any[]) => any, + ...transforms: Array any>> + ): (...args: any[]) => any; + } - interface LoDashImplicitWrapper { - /** - * @see _.overArgs - */ - overArgs(...transforms: Array any>>): LoDashImplicitWrapper<(...args: any[]) => any>; - } + interface LoDashImplicitWrapper { + /** + * @see _.overArgs + */ + overArgs(...transforms: Array any>>): LoDashImplicitWrapper<(...args: any[]) => any>; + } - interface LoDashExplicitWrapper { - /** - * @see _.overArgs - */ - overArgs(...transforms: Array any>>): LoDashExplicitWrapper<(...args: any[]) => any>; - } + interface LoDashExplicitWrapper { + /** + * @see _.overArgs + */ + overArgs(...transforms: Array any>>): LoDashExplicitWrapper<(...args: any[]) => any>; + } // partial @@ -828,7 +929,8 @@ declare module "../index" { partial: ExplicitPartial; } - type PH = LoDashStatic; + /** The placeholder, to be used in curried functions */ + type __ = LoDashStatic; type Function0 = () => R; type Function1 = (t1: T1) => R; @@ -845,36 +947,38 @@ declare module "../index" { // arity 2 (func: Function2): Function2; (func: Function2, arg1: T1): Function1< T2, R>; - (func: Function2, plc1: PH, arg2: T2): Function1; + (func: Function2, plc1: __, arg2: T2): Function1; (func: Function2, arg1: T1, arg2: T2): Function0< R>; // arity 3 (func: Function3): Function3; (func: Function3, arg1: T1): Function2< T2, T3, R>; - (func: Function3, plc1: PH, arg2: T2): Function2; + (func: Function3, plc1: __, arg2: T2): Function2; (func: Function3, arg1: T1, arg2: T2): Function1< T3, R>; - (func: Function3, plc1: PH, plc2: PH, arg3: T3): Function2; - (func: Function3, arg1: T1, plc2: PH, arg3: T3): Function1< T2, R>; - (func: Function3, plc1: PH, arg2: T2, arg3: T3): Function1; + (func: Function3, plc1: __, plc2: __, arg3: T3): Function2; + (func: Function3, arg1: T1, plc2: __, arg3: T3): Function1< T2, R>; + (func: Function3, plc1: __, arg2: T2, arg3: T3): Function1; (func: Function3, arg1: T1, arg2: T2, arg3: T3): Function0< R>; // arity 4 (func: Function4): Function4; (func: Function4, arg1: T1): Function3< T2, T3, T4, R>; - (func: Function4, plc1: PH, arg2: T2): Function3; + (func: Function4, plc1: __, arg2: T2): Function3; (func: Function4, arg1: T1, arg2: T2): Function2< T3, T4, R>; - (func: Function4, plc1: PH, plc2: PH, arg3: T3): Function3; - (func: Function4, arg1: T1, plc2: PH, arg3: T3): Function2< T2, T4, R>; - (func: Function4, plc1: PH, arg2: T2, arg3: T3): Function2; + (func: Function4, plc1: __, plc2: __, arg3: T3): Function3; + (func: Function4, arg1: T1, plc2: __, arg3: T3): Function2< T2, T4, R>; + (func: Function4, plc1: __, arg2: T2, arg3: T3): Function2; (func: Function4, arg1: T1, arg2: T2, arg3: T3): Function1< T4, R>; - (func: Function4, plc1: PH, plc2: PH, plc3: PH, arg4: T4): Function3; - (func: Function4, arg1: T1, plc2: PH, plc3: PH, arg4: T4): Function2< T2, T3, R>; - (func: Function4, plc1: PH, arg2: T2, plc3: PH, arg4: T4): Function2; - (func: Function4, arg1: T1, arg2: T2, plc3: PH, arg4: T4): Function1< T3, R>; - (func: Function4, plc1: PH, plc2: PH, arg3: T3, arg4: T4): Function2; - (func: Function4, arg1: T1, plc2: PH, arg3: T3, arg4: T4): Function1< T2, R>; - (func: Function4, plc1: PH, arg2: T2, arg3: T3, arg4: T4): Function1; + (func: Function4, plc1: __, plc2: __, plc3: __, arg4: T4): Function3; + (func: Function4, arg1: T1, plc2: __, plc3: __, arg4: T4): Function2< T2, T3, R>; + (func: Function4, plc1: __, arg2: T2, plc3: __, arg4: T4): Function2; + (func: Function4, arg1: T1, arg2: T2, plc3: __, arg4: T4): Function1< T3, R>; + (func: Function4, plc1: __, plc2: __, arg3: T3, arg4: T4): Function2; + (func: Function4, arg1: T1, plc2: __, arg3: T3, arg4: T4): Function1< T2, R>; + (func: Function4, plc1: __, arg2: T2, arg3: T3, arg4: T4): Function1; (func: Function4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0< R>; // catch-all (func: (...args: any[]) => any, ...args: any[]): (...args: any[]) => any; + + placeholder: __; } interface ImplicitPartial { @@ -886,33 +990,33 @@ declare module "../index" { // arity 2 (this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; (this: LoDashImplicitWrapper>, arg1: T1): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, plc1: PH, arg2: T2): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: __, arg2: T2): LoDashImplicitWrapper>; (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2): LoDashImplicitWrapper>; // arity 3 (this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; (this: LoDashImplicitWrapper>, arg1: T1): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, plc1: PH, arg2: T2): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: __, arg2: T2): LoDashImplicitWrapper>; (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, plc1: PH, plc2: PH, arg3: T3): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, arg3: T3): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, plc1: PH, arg2: T2, arg3: T3): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: __, plc2: __, arg3: T3): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: __, arg3: T3): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: __, arg2: T2, arg3: T3): LoDashImplicitWrapper>; (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, arg3: T3): LoDashImplicitWrapper>; // arity 4 (this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; (this: LoDashImplicitWrapper>, arg1: T1): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, plc1: PH, arg2: T2): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: __, arg2: T2): LoDashImplicitWrapper>; (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, plc1: PH, plc2: PH, arg3: T3): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, arg3: T3): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, plc1: PH, arg2: T2, arg3: T3): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: __, plc2: __, arg3: T3): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: __, arg3: T3): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: __, arg2: T2, arg3: T3): LoDashImplicitWrapper>; (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, arg3: T3): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, plc1: PH, plc2: PH, plc3: PH, arg4: T4): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, plc3: PH, arg4: T4): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, plc1: PH, arg2: T2, plc3: PH, arg4: T4): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, plc3: PH, arg4: T4): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, plc1: PH, plc2: PH, arg3: T3, arg4: T4): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, arg3: T3, arg4: T4): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, plc1: PH, arg2: T2, arg3: T3, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: __, plc2: __, plc3: __, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: __, plc3: __, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: __, arg2: T2, plc3: __, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, plc3: __, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: __, plc2: __, arg3: T3, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: __, arg3: T3, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, plc1: __, arg2: T2, arg3: T3, arg4: T4): LoDashImplicitWrapper>; (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, arg3: T3, arg4: T4): LoDashImplicitWrapper>; // catch-all (...args: any[]): LoDashImplicitWrapper<(...args: any[]) => any>; @@ -927,33 +1031,33 @@ declare module "../index" { // arity 2 (this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; (this: LoDashExplicitWrapper>, arg1: T1): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, plc1: PH, arg2: T2): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: __, arg2: T2): LoDashExplicitWrapper>; (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2): LoDashExplicitWrapper>; // arity 3 (this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; (this: LoDashExplicitWrapper>, arg1: T1): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, plc1: PH, arg2: T2): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: __, arg2: T2): LoDashExplicitWrapper>; (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, plc1: PH, plc2: PH, arg3: T3): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, arg3: T3): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, plc1: PH, arg2: T2, arg3: T3): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: __, plc2: __, arg3: T3): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: __, arg3: T3): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: __, arg2: T2, arg3: T3): LoDashExplicitWrapper>; (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, arg3: T3): LoDashExplicitWrapper>; // arity 4 (this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; (this: LoDashExplicitWrapper>, arg1: T1): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, plc1: PH, arg2: T2): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: __, arg2: T2): LoDashExplicitWrapper>; (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, plc1: PH, plc2: PH, arg3: T3): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, arg3: T3): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, plc1: PH, arg2: T2, arg3: T3): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: __, plc2: __, arg3: T3): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: __, arg3: T3): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: __, arg2: T2, arg3: T3): LoDashExplicitWrapper>; (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, arg3: T3): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, plc1: PH, plc2: PH, plc3: PH, arg4: T4): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, plc3: PH, arg4: T4): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, plc1: PH, arg2: T2, plc3: PH, arg4: T4): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, plc3: PH, arg4: T4): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, plc1: PH, plc2: PH, arg3: T3, arg4: T4): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, arg3: T3, arg4: T4): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, plc1: PH, arg2: T2, arg3: T3, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: __, plc2: __, plc3: __, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: __, plc3: __, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: __, arg2: T2, plc3: __, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, plc3: __, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: __, plc2: __, arg3: T3, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: __, arg3: T3, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, plc1: __, arg2: T2, arg3: T3, arg4: T4): LoDashExplicitWrapper>; (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, arg3: T3, arg4: T4): LoDashExplicitWrapper>; // catch-all (...args: any[]): LoDashExplicitWrapper<(...args: any[]) => any>; @@ -994,37 +1098,39 @@ declare module "../index" { (func: Function1, arg1: T1): Function0; // arity 2 (func: Function2): Function2; - (func: Function2, arg1: T1, plc2: PH): Function1< T2, R>; + (func: Function2, arg1: T1, plc2: __): Function1< T2, R>; (func: Function2, arg2: T2): Function1; (func: Function2, arg1: T1, arg2: T2): Function0< R>; // arity 3 (func: Function3): Function3; - (func: Function3, arg1: T1, plc2: PH, plc3: PH): Function2< T2, T3, R>; - (func: Function3, arg2: T2, plc3: PH): Function2; - (func: Function3, arg1: T1, arg2: T2, plc3: PH): Function1< T3, R>; + (func: Function3, arg1: T1, plc2: __, plc3: __): Function2< T2, T3, R>; + (func: Function3, arg2: T2, plc3: __): Function2; + (func: Function3, arg1: T1, arg2: T2, plc3: __): Function1< T3, R>; (func: Function3, arg3: T3): Function2; - (func: Function3, arg1: T1, plc2: PH, arg3: T3): Function1< T2, R>; + (func: Function3, arg1: T1, plc2: __, arg3: T3): Function1< T2, R>; (func: Function3, arg2: T2, arg3: T3): Function1; (func: Function3, arg1: T1, arg2: T2, arg3: T3): Function0< R>; // arity 4 (func: Function4): Function4; - (func: Function4, arg1: T1, plc2: PH, plc3: PH, plc4: PH): Function3< T2, T3, T4, R>; - (func: Function4, arg2: T2, plc3: PH, plc4: PH): Function3; - (func: Function4, arg1: T1, arg2: T2, plc3: PH, plc4: PH): Function2< T3, T4, R>; - (func: Function4, arg3: T3, plc4: PH): Function3; - (func: Function4, arg1: T1, plc2: PH, arg3: T3, plc4: PH): Function2< T2, T4, R>; - (func: Function4, arg2: T2, arg3: T3, plc4: PH): Function2; - (func: Function4, arg1: T1, arg2: T2, arg3: T3, plc4: PH): Function1< T4, R>; + (func: Function4, arg1: T1, plc2: __, plc3: __, plc4: __): Function3< T2, T3, T4, R>; + (func: Function4, arg2: T2, plc3: __, plc4: __): Function3; + (func: Function4, arg1: T1, arg2: T2, plc3: __, plc4: __): Function2< T3, T4, R>; + (func: Function4, arg3: T3, plc4: __): Function3; + (func: Function4, arg1: T1, plc2: __, arg3: T3, plc4: __): Function2< T2, T4, R>; + (func: Function4, arg2: T2, arg3: T3, plc4: __): Function2; + (func: Function4, arg1: T1, arg2: T2, arg3: T3, plc4: __): Function1< T4, R>; (func: Function4, arg4: T4): Function3; - (func: Function4, arg1: T1, plc2: PH, plc3: PH, arg4: T4): Function2< T2, T3, R>; - (func: Function4, arg2: T2, plc3: PH, arg4: T4): Function2; - (func: Function4, arg1: T1, arg2: T2, plc3: PH, arg4: T4): Function1< T3, R>; + (func: Function4, arg1: T1, plc2: __, plc3: __, arg4: T4): Function2< T2, T3, R>; + (func: Function4, arg2: T2, plc3: __, arg4: T4): Function2; + (func: Function4, arg1: T1, arg2: T2, plc3: __, arg4: T4): Function1< T3, R>; (func: Function4, arg3: T3, arg4: T4): Function2; - (func: Function4, arg1: T1, plc2: PH, arg3: T3, arg4: T4): Function1< T2, R>; + (func: Function4, arg1: T1, plc2: __, arg3: T3, arg4: T4): Function1< T2, R>; (func: Function4, arg2: T2, arg3: T3, arg4: T4): Function1; (func: Function4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0< R>; // catch-all (func: (...args: any[]) => any, ...args: any[]): (...args: any[]) => any; + + placeholder: __; } interface ImplicitPartialRight { @@ -1035,33 +1141,33 @@ declare module "../index" { (this: LoDashImplicitWrapper>, arg1: T1): LoDashImplicitWrapper>; // arity 2 (this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: __): LoDashImplicitWrapper>; (this: LoDashImplicitWrapper>, arg2: T2): LoDashImplicitWrapper>; (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2): LoDashImplicitWrapper>; // arity 3 (this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, plc3: PH): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg2: T2, plc3: PH): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, plc3: PH): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: __, plc3: __): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg2: T2, plc3: __): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, plc3: __): LoDashImplicitWrapper>; (this: LoDashImplicitWrapper>, arg3: T3): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, arg3: T3): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: __, arg3: T3): LoDashImplicitWrapper>; (this: LoDashImplicitWrapper>, arg2: T2, arg3: T3): LoDashImplicitWrapper>; (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, arg3: T3): LoDashImplicitWrapper>; // arity 4 (this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, plc3: PH, plc4: PH): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg2: T2, plc3: PH, plc4: PH): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, plc3: PH, plc4: PH): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg3: T3, plc4: PH): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, arg3: T3, plc4: PH): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg2: T2, arg3: T3, plc4: PH): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, arg3: T3, plc4: PH): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: __, plc3: __, plc4: __): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg2: T2, plc3: __, plc4: __): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, plc3: __, plc4: __): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg3: T3, plc4: __): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: __, arg3: T3, plc4: __): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg2: T2, arg3: T3, plc4: __): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, arg3: T3, plc4: __): LoDashImplicitWrapper>; (this: LoDashImplicitWrapper>, arg4: T4): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, plc3: PH, arg4: T4): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg2: T2, plc3: PH, arg4: T4): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, plc3: PH, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: __, plc3: __, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg2: T2, plc3: __, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, plc3: __, arg4: T4): LoDashImplicitWrapper>; (this: LoDashImplicitWrapper>, arg3: T3, arg4: T4): LoDashImplicitWrapper>; - (this: LoDashImplicitWrapper>, arg1: T1, plc2: PH, arg3: T3, arg4: T4): LoDashImplicitWrapper>; + (this: LoDashImplicitWrapper>, arg1: T1, plc2: __, arg3: T3, arg4: T4): LoDashImplicitWrapper>; (this: LoDashImplicitWrapper>, arg2: T2, arg3: T3, arg4: T4): LoDashImplicitWrapper>; (this: LoDashImplicitWrapper>, arg1: T1, arg2: T2, arg3: T3, arg4: T4): LoDashImplicitWrapper>; // catch-all @@ -1076,33 +1182,33 @@ declare module "../index" { (this: LoDashExplicitWrapper>, arg1: T1): LoDashExplicitWrapper>; // arity 2 (this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: __): LoDashExplicitWrapper>; (this: LoDashExplicitWrapper>, arg2: T2): LoDashExplicitWrapper>; (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2): LoDashExplicitWrapper>; // arity 3 (this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, plc3: PH): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg2: T2, plc3: PH): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, plc3: PH): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: __, plc3: __): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg2: T2, plc3: __): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, plc3: __): LoDashExplicitWrapper>; (this: LoDashExplicitWrapper>, arg3: T3): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, arg3: T3): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: __, arg3: T3): LoDashExplicitWrapper>; (this: LoDashExplicitWrapper>, arg2: T2, arg3: T3): LoDashExplicitWrapper>; (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, arg3: T3): LoDashExplicitWrapper>; // arity 4 (this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, plc3: PH, plc4: PH): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg2: T2, plc3: PH, plc4: PH): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, plc3: PH, plc4: PH): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg3: T3, plc4: PH): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, arg3: T3, plc4: PH): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg2: T2, arg3: T3, plc4: PH): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, arg3: T3, plc4: PH): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: __, plc3: __, plc4: __): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg2: T2, plc3: __, plc4: __): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, plc3: __, plc4: __): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg3: T3, plc4: __): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: __, arg3: T3, plc4: __): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg2: T2, arg3: T3, plc4: __): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, arg3: T3, plc4: __): LoDashExplicitWrapper>; (this: LoDashExplicitWrapper>, arg4: T4): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, plc3: PH, arg4: T4): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg2: T2, plc3: PH, arg4: T4): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, plc3: PH, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: __, plc3: __, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg2: T2, plc3: __, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, plc3: __, arg4: T4): LoDashExplicitWrapper>; (this: LoDashExplicitWrapper>, arg3: T3, arg4: T4): LoDashExplicitWrapper>; - (this: LoDashExplicitWrapper>, arg1: T1, plc2: PH, arg3: T3, arg4: T4): LoDashExplicitWrapper>; + (this: LoDashExplicitWrapper>, arg1: T1, plc2: __, arg3: T3, arg4: T4): LoDashExplicitWrapper>; (this: LoDashExplicitWrapper>, arg2: T2, arg3: T3, arg4: T4): LoDashExplicitWrapper>; (this: LoDashExplicitWrapper>, arg1: T1, arg2: T2, arg3: T3, arg4: T4): LoDashExplicitWrapper>; // catch-all @@ -1364,4 +1470,4 @@ declare module "../index" { wrapper: (value: TValue, ...args: any[]) => TResult ): LoDashExplicitWrapper<(...args: any[]) => TResult>; } -} \ No newline at end of file +} diff --git a/types/lodash/common/lang.d.ts b/types/lodash/common/lang.d.ts index 43393ab4b6..9afe554b28 100644 --- a/types/lodash/common/lang.d.ts +++ b/types/lodash/common/lang.d.ts @@ -210,7 +210,6 @@ declare module "../index" { // conformsTo - interface LoDashStatic { /** * Checks if object conforms to source by invoking the predicate properties of source with the @@ -233,11 +232,11 @@ declare module "../index" { /** * @see _.conformsTo */ - conformsTo(this: LoDashImplicitWrapper, source: ConformsPredicateObject): LoDashExplicitWrapper; + conformsTo(this: LoDashExplicitWrapper, source: ConformsPredicateObject): LoDashExplicitWrapper; // Note: we can't use TValue here, because it generates a typescript error when strictFunctionTypes is enabled. } - type CondPair = [(val: T) => boolean, (val: T) => R] + type CondPair = [(val: T) => boolean, (val: T) => R]; // eq @@ -1934,4 +1933,4 @@ declare module "../index" { */ toString(value: any): string; } -} \ No newline at end of file +} diff --git a/types/lodash/common/math.d.ts b/types/lodash/common/math.d.ts index a0af6114b5..b38a7df970 100644 --- a/types/lodash/common/math.d.ts +++ b/types/lodash/common/math.d.ts @@ -529,8 +529,4 @@ declare module "../index" { iteratee?: ((value: T) => number) | string ): LoDashExplicitWrapper; } - - /********** - * Number * - **********/ -} \ No newline at end of file +} diff --git a/types/lodash/common/number.d.ts b/types/lodash/common/number.d.ts index 3e6a945855..7da1cab03a 100644 --- a/types/lodash/common/number.d.ts +++ b/types/lodash/common/number.d.ts @@ -175,8 +175,4 @@ declare module "../index" { floating?: boolean ): LoDashExplicitWrapper; } - - /********** - * Object * - **********/ -} \ No newline at end of file +} diff --git a/types/lodash/common/object.d.ts b/types/lodash/common/object.d.ts index 6100e25c43..4845e7f31b 100644 --- a/types/lodash/common/object.d.ts +++ b/types/lodash/common/object.d.ts @@ -718,7 +718,7 @@ declare module "../index" { * @return Returns the new array of picked elements. */ at( - object: List | Dictionary | null | undefined, + object: List | Dictionary | NumericDictionary | null | undefined, ...props: PropertyPath[] ): T[]; @@ -736,7 +736,7 @@ declare module "../index" { * @see _.at */ at( - this: LoDashImplicitWrapper | Dictionary | null | undefined>, + this: LoDashImplicitWrapper | Dictionary | NumericDictionary | null | undefined>, ...props: PropertyPath[] ): LoDashImplicitWrapper; @@ -754,7 +754,7 @@ declare module "../index" { * @see _.at */ at( - this: LoDashExplicitWrapper | Dictionary | null | undefined>, + this: LoDashExplicitWrapper | Dictionary | NumericDictionary | null | undefined>, ...props: PropertyPath[] ): LoDashExplicitWrapper; @@ -987,7 +987,7 @@ declare module "../index" { /** * @see _.toPairs */ - entries(object?: Dictionary): Array<[string, T]>; + entries(object?: Dictionary | NumericDictionary): Array<[string, T]>; /** * @see _.toPairs @@ -999,7 +999,7 @@ declare module "../index" { /** * @see _.toPairs */ - entries(this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; + entries(this: LoDashImplicitWrapper | NumericDictionary>): LoDashImplicitWrapper>; /** * @see _.toPairs @@ -1011,7 +1011,7 @@ declare module "../index" { /** * @see _.toPairs */ - entries(this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; + entries(this: LoDashExplicitWrapper | NumericDictionary>): LoDashExplicitWrapper>; /** * @see _.toPairs @@ -1025,7 +1025,7 @@ declare module "../index" { /** * @see _.entriesIn */ - entriesIn(object?: Dictionary): Array<[string, T]>; + entriesIn(object?: Dictionary | NumericDictionary): Array<[string, T]>; /** * @see _.entriesIn @@ -1037,7 +1037,7 @@ declare module "../index" { /** * @see _.entriesIn */ - entriesIn(this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; + entriesIn(this: LoDashImplicitWrapper | NumericDictionary>): LoDashImplicitWrapper>; /** * @see _.entriesIn @@ -1049,7 +1049,7 @@ declare module "../index" { /** * @see _.entriesIn */ - entriesIn(this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; + entriesIn(this: LoDashExplicitWrapper | NumericDictionary>): LoDashExplicitWrapper>; /** * @see _.entriesIn @@ -2210,18 +2210,10 @@ declare module "../index" { /** * @see _.mapKeys */ - mapKeys( - object: Dictionary | null | undefined, - iteratee?: DictionaryIteratee - ): Dictionary; - - /** - * @see _.mapKeys - */ - mapKeys( - object: object | null | undefined, - iteratee?: ObjectIteratee - ): Dictionary; + mapKeys( + object: T | null | undefined, + iteratee?: ObjectIteratee + ): Dictionary; } interface LoDashImplicitWrapper { @@ -2236,18 +2228,10 @@ declare module "../index" { /** * @see _.mapKeys */ - mapKeys( - this: LoDashImplicitWrapper | null | undefined>, - iteratee?: DictionaryIteratee - ): LoDashImplicitWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - this: LoDashImplicitWrapper, - iteratee?: ObjectIteratee - ): LoDashImplicitWrapper>; + mapKeys( + this: LoDashImplicitWrapper, + iteratee?: ObjectIteratee + ): LoDashImplicitWrapper>; } interface LoDashExplicitWrapper { @@ -2262,18 +2246,10 @@ declare module "../index" { /** * @see _.mapKeys */ - mapKeys( - this: LoDashExplicitWrapper | null | undefined>, - iteratee?: DictionaryIteratee - ): LoDashExplicitWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - this: LoDashExplicitWrapper, - iteratee?: ObjectIteratee - ): LoDashExplicitWrapper>; + mapKeys( + this: LoDashExplicitWrapper, + iteratee?: ObjectIteratee + ): LoDashExplicitWrapper>; } // mapValues @@ -2298,8 +2274,27 @@ declare module "../index" { * @param [thisArg] The `this` binding of `iteratee`. * @return Returns the new mapped object. */ + mapValues(obj: string | null | undefined, callback: StringIterator): NumericDictionary; + + /** + * @see _.mapValues + * TODO: This would be better if we had a separate overload for obj: NumericDictionary that returned a NumericDictionary, + * but TypeScript cannot select overload signatures based on number vs string index key type. + */ + mapValues(obj: Dictionary | NumericDictionary | null | undefined, callback: DictionaryIterator): Dictionary; + + /** + * @see _.mapValues + */ mapValues(obj: T | null | undefined, callback: ObjectIterator): { [P in keyof T]: TResult }; + /** + * @see _.mapValues + * TODO: This would be better if we had a separate overload for obj: NumericDictionary that returned a NumericDictionary, + * but TypeScript cannot select overload signatures based on number vs string index key type. + */ + mapValues(obj: Dictionary | NumericDictionary | null | undefined, iteratee: object): Dictionary; + /** * @see _.mapValues */ @@ -2307,23 +2302,34 @@ declare module "../index" { /** * @see _.mapValues + * TODO: This would be better if we had a separate overload for obj: NumericDictionary that returned a NumericDictionary, + * but TypeScript cannot select overload signatures based on number vs string index key type. */ - mapValues(obj: Dictionary | null | undefined, iteratee: TKey): Dictionary; + mapValues(obj: Dictionary | NumericDictionary | null | undefined, iteratee: TKey): Dictionary; + + /** + * @see _.mapValues + * TODO: This would be better if we had a separate overload for obj: NumericDictionary that returned a NumericDictionary, + * but TypeScript cannot select overload signatures based on number vs string index key type. + */ + mapValues(obj: Dictionary | NumericDictionary | null | undefined, iteratee: string): Dictionary; /** * @see _.mapValues */ - mapValues(obj: T | null | undefined, iteratee: string): { [P in keyof T]: any }; + mapValues(obj: T | null | undefined, iteratee: string): { [P in keyof T]: any }; /** * @see _.mapValues */ - mapValues(obj: string | null | undefined, callback: StringIterator): NumericDictionary; + mapValues(obj: string | null | undefined): NumericDictionary; /** * @see _.mapValues + * TODO: This would be better if we had a separate overload for obj: NumericDictionary that returned a NumericDictionary, + * but TypeScript cannot select overload signatures based on number vs string index key type. */ - mapValues(obj: Dictionary | null | undefined): Dictionary; + mapValues(obj: Dictionary | NumericDictionary | null | undefined): Dictionary; /** * @see _.mapValues @@ -2333,15 +2339,28 @@ declare module "../index" { /** * @see _.mapValues */ - mapValues(obj: T | null | undefined): T | {}; - - /** - * @see _.mapValues - */ - mapValues(obj: string | null | undefined): NumericDictionary; + mapValues(obj: T | null | undefined): PartialObject; } interface LoDashImplicitWrapper { + /** + * @see _.mapValues + */ + mapValues( + this: LoDashImplicitWrapper, + callback: StringIterator + ): LoDashImplicitWrapper>; + + /** + * @see _.mapValues + * TODO: This would be better if we had a separate overload for obj: NumericDictionary that returned a NumericDictionary, + * but TypeScript cannot select overload signatures based on number vs string index key type. + */ + mapValues( + this: LoDashImplicitWrapper | NumericDictionary | null | undefined>, + callback: DictionaryIterator + ): LoDashImplicitWrapper>; + /** * @see _.mapValues */ @@ -2350,6 +2369,16 @@ declare module "../index" { callback: ObjectIterator ): LoDashImplicitWrapper<{ [P in keyof T]: TResult }>; + /** + * @see _.mapValues + * TODO: This would be better if we had a separate overload for obj: NumericDictionary that returned a NumericDictionary, + * but TypeScript cannot select overload signatures based on number vs string index key type. + */ + mapValues( + this: LoDashImplicitWrapper | NumericDictionary | null | undefined>, + iteratee: object + ): LoDashImplicitWrapper>; + /** * @see _.mapValues */ @@ -2360,16 +2389,28 @@ declare module "../index" { /** * @see _.mapValues + * TODO: This would be better if we had a separate overload for obj: NumericDictionary that returned a NumericDictionary, + * but TypeScript cannot select overload signatures based on number vs string index key type. */ mapValues( - this: LoDashImplicitWrapper | null | undefined>, + this: LoDashImplicitWrapper | NumericDictionary | null | undefined>, iteratee: TKey ): LoDashImplicitWrapper>; /** * @see _.mapValues + * TODO: This would be better if we had a separate overload for obj: NumericDictionary that returned a NumericDictionary, + * but TypeScript cannot select overload signatures based on number vs string index key type. */ - mapValues( + mapValues( + this: LoDashImplicitWrapper | NumericDictionary | null | undefined>, + iteratee: string + ): LoDashImplicitWrapper>; + + /** + * @see _.mapValues + */ + mapValues( this: LoDashImplicitWrapper, iteratee: string ): LoDashImplicitWrapper<{ [P in keyof T]: any }>; @@ -2377,15 +2418,14 @@ declare module "../index" { /** * @see _.mapValues */ - mapValues( - this: LoDashImplicitWrapper, - callback: StringIterator - ): LoDashImplicitWrapper>; + mapValues(this: LoDashImplicitWrapper): LoDashImplicitWrapper>; /** * @see _.mapValues + * TODO: This would be better if we had a separate overload for obj: NumericDictionary that returned a NumericDictionary, + * but TypeScript cannot select overload signatures based on number vs string index key type. */ - mapValues(this: LoDashImplicitWrapper | null | undefined>): LoDashImplicitWrapper>; + mapValues(this: LoDashImplicitWrapper | NumericDictionary | null | undefined>): LoDashImplicitWrapper>; /** * @see _.mapValues @@ -2395,15 +2435,28 @@ declare module "../index" { /** * @see _.mapValues */ - mapValues(this: LoDashImplicitWrapper): LoDashImplicitWrapper; - - /** - * @see _.mapValues - */ - mapValues(this: LoDashImplicitWrapper): LoDashImplicitWrapper>; + mapValues(this: LoDashImplicitWrapper): LoDashImplicitWrapper>; } interface LoDashExplicitWrapper { + /** + * @see _.mapValues + */ + mapValues( + this: LoDashExplicitWrapper, + callback: StringIterator + ): LoDashExplicitWrapper>; + + /** + * @see _.mapValues + * TODO: This would be better if we had a separate overload for obj: NumericDictionary that returned a NumericDictionary, + * but TypeScript cannot select overload signatures based on number vs string index key type. + */ + mapValues( + this: LoDashExplicitWrapper | NumericDictionary | null | undefined>, + callback: DictionaryIterator + ): LoDashExplicitWrapper>; + /** * @see _.mapValues */ @@ -2412,6 +2465,16 @@ declare module "../index" { callback: ObjectIterator ): LoDashExplicitWrapper<{ [P in keyof T]: TResult }>; + /** + * @see _.mapValues + * TODO: This would be better if we had a separate overload for obj: NumericDictionary that returned a NumericDictionary, + * but TypeScript cannot select overload signatures based on number vs string index key type. + */ + mapValues( + this: LoDashExplicitWrapper | NumericDictionary | null | undefined>, + iteratee: object + ): LoDashExplicitWrapper>; + /** * @see _.mapValues */ @@ -2422,16 +2485,28 @@ declare module "../index" { /** * @see _.mapValues + * TODO: This would be better if we had a separate overload for obj: NumericDictionary that returned a NumericDictionary, + * but TypeScript cannot select overload signatures based on number vs string index key type. */ mapValues( - this: LoDashExplicitWrapper | null | undefined>, + this: LoDashExplicitWrapper | NumericDictionary | null | undefined>, iteratee: TKey ): LoDashExplicitWrapper>; /** * @see _.mapValues + * TODO: This would be better if we had a separate overload for obj: NumericDictionary that returned a NumericDictionary, + * but TypeScript cannot select overload signatures based on number vs string index key type. */ - mapValues( + mapValues( + this: LoDashExplicitWrapper | NumericDictionary | null | undefined>, + iteratee: string + ): LoDashExplicitWrapper>; + + /** + * @see _.mapValues + */ + mapValues( this: LoDashExplicitWrapper, iteratee: string ): LoDashExplicitWrapper<{ [P in keyof T]: any }>; @@ -2439,15 +2514,14 @@ declare module "../index" { /** * @see _.mapValues */ - mapValues( - this: LoDashExplicitWrapper, - callback: StringIterator - ): LoDashExplicitWrapper>; + mapValues(this: LoDashExplicitWrapper): LoDashExplicitWrapper>; /** * @see _.mapValues + * TODO: This would be better if we had a separate overload for obj: NumericDictionary that returned a NumericDictionary, + * but TypeScript cannot select overload signatures based on number vs string index key type. */ - mapValues(this: LoDashExplicitWrapper | null | undefined>): LoDashExplicitWrapper>; + mapValues(this: LoDashExplicitWrapper | NumericDictionary | null | undefined>): LoDashExplicitWrapper>; /** * @see _.mapValues @@ -2457,12 +2531,7 @@ declare module "../index" { /** * @see _.mapValues */ - mapValues(this: LoDashExplicitWrapper): LoDashExplicitWrapper; - - /** - * @see _.mapValues - */ - mapValues(this: LoDashExplicitWrapper): LoDashExplicitWrapper>; + mapValues(this: LoDashExplicitWrapper): LoDashExplicitWrapper>; } // merge @@ -2611,6 +2680,10 @@ declare module "../index" { * @see _.merge */ merge( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 ): LoDashExplicitWrapper; /** @@ -2623,7 +2696,7 @@ declare module "../index" { // mergeWith - type MergeWithCustomizer = { bivariantHack(value: any, srcValue: any, key: string, object: any, source: any): any; }["bivariantHack"] + type MergeWithCustomizer = { bivariantHack(value: any, srcValue: any, key: string, object: any, source: any): any; }["bivariantHack"]; interface LoDashStatic { /** @@ -2754,6 +2827,53 @@ declare module "../index" { ): LoDashImplicitWrapper; } + interface LoDashExplicitWrapper { + /** + * @see _.mergeWith + */ + mergeWith( + source: TSource, + customizer: MergeWithCustomizer + ): LoDashExplicitWrapper; + + /** + * @see _.mergeWith + */ + mergeWith( + source1: TSource1, + source2: TSource2, + customizer: MergeWithCustomizer + ): LoDashExplicitWrapper; + + /** + * @see _.mergeWith + */ + mergeWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: MergeWithCustomizer + ): LoDashExplicitWrapper; + + /** + * @see _.mergeWith + */ + mergeWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: MergeWithCustomizer + ): LoDashExplicitWrapper; + + /** + * @see _.mergeWith + */ + mergeWith( + ...otherArgs: any[] + ): LoDashExplicitWrapper; + } + // omit interface LoDashStatic { @@ -2773,10 +2893,10 @@ declare module "../index" { * _.omit(object, ['a', 'c']); * // => { 'b': '2' } */ - omit( - object: Dictionary, + omit( + object: T | null | undefined, ...paths: PropertyPath[] - ): Dictionary; + ): T; /** * @see _.omit @@ -2791,10 +2911,10 @@ declare module "../index" { /** * @see _.omit */ - omit( - this: LoDashImplicitWrapper>, + omit( + this: LoDashImplicitWrapper, ...paths: PropertyPath[] - ): LoDashImplicitWrapper>; + ): LoDashImplicitWrapper; /** * @see _.omit @@ -2809,10 +2929,10 @@ declare module "../index" { /** * @see _.omit */ - omit( - this: LoDashExplicitWrapper>, + omit( + this: LoDashExplicitWrapper, ...paths: PropertyPath[] - ): LoDashExplicitWrapper>; + ): LoDashExplicitWrapper; /** * @see _.omit @@ -3097,7 +3217,7 @@ declare module "../index" { * @param object The object to modify. * @param path The path of the property to set. * @param value The value to set. - * @parem customizer The function to customize assigned values. + * @param customizer The function to customize assigned values. * @return Returns object. */ setWith( @@ -3164,7 +3284,7 @@ declare module "../index" { * @param object The object to query. * @return Returns the new array of key-value pairs. */ - toPairs(object?: Dictionary): Array<[string, T]>; + toPairs(object?: Dictionary | NumericDictionary): Array<[string, T]>; /** * @see _.toPairs @@ -3176,7 +3296,7 @@ declare module "../index" { /** * @see _.toPairs */ - toPairs(this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; + toPairs(this: LoDashImplicitWrapper | NumericDictionary>): LoDashImplicitWrapper>; /** * @see _.toPairs @@ -3188,7 +3308,7 @@ declare module "../index" { /** * @see _.toPairs */ - toPairs(this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; + toPairs(this: LoDashExplicitWrapper | NumericDictionary>): LoDashExplicitWrapper>; /** * @see _.toPairs @@ -3205,7 +3325,7 @@ declare module "../index" { * @param object The object to query. * @return Returns the new array of key-value pairs. */ - toPairsIn(object?: Dictionary): Array<[string, T]>; + toPairsIn(object?: Dictionary | NumericDictionary): Array<[string, T]>; /** * @see _.toPairsIn @@ -3217,7 +3337,7 @@ declare module "../index" { /** * @see _.toPairsIn */ - toPairsIn(this: LoDashImplicitWrapper>): LoDashImplicitWrapper>; + toPairsIn(this: LoDashImplicitWrapper | NumericDictionary>): LoDashImplicitWrapper>; /** * @see _.toPairsIn @@ -3229,7 +3349,7 @@ declare module "../index" { /** * @see _.toPairsIn */ - toPairsIn(this: LoDashExplicitWrapper>): LoDashExplicitWrapper>; + toPairsIn(this: LoDashExplicitWrapper | NumericDictionary>): LoDashExplicitWrapper>; /** * @see _.toPairsIn @@ -3563,7 +3683,7 @@ declare module "../index" { * @param object The object to query. * @return Returns an array of property values. */ - values(object: Dictionary|NumericDictionary|List | null | undefined): T[]; + values(object: Dictionary | NumericDictionary | List | null | undefined): T[]; /** * @see _.values @@ -3650,4 +3770,4 @@ declare module "../index" { */ valuesIn(this: LoDashExplicitWrapper): LoDashExplicitWrapper>; } -} \ No newline at end of file +} diff --git a/types/lodash/common/seq.d.ts b/types/lodash/common/seq.d.ts index f3139056cd..22a7a14746 100644 --- a/types/lodash/common/seq.d.ts +++ b/types/lodash/common/seq.d.ts @@ -195,4 +195,4 @@ declare module "../index" { */ thru(interceptor: (value: TValue) => TResult): LoDashExplicitWrapper; } -} \ No newline at end of file +} diff --git a/types/lodash/common/string.d.ts b/types/lodash/common/string.d.ts index 436a2bb9f1..d940406d0d 100644 --- a/types/lodash/common/string.d.ts +++ b/types/lodash/common/string.d.ts @@ -1056,4 +1056,4 @@ declare module "../index" { */ words(pattern?: string|RegExp): LoDashExplicitWrapper; } -} \ No newline at end of file +} diff --git a/types/lodash/common/util.d.ts b/types/lodash/common/util.d.ts index e365750018..8aad451ca1 100644 --- a/types/lodash/common/util.d.ts +++ b/types/lodash/common/util.d.ts @@ -584,9 +584,17 @@ declare module "../index" { * // => [{ 'user': 'fred', 'age': 40 }] */ iteratee any>( - func: TFunction | string | object + func: TFunction ): TFunction; + /** + * @see _.iteratee + */ + // tslint:disable-next-line:unified-signatures Tests fail in TS2.3 if the overloads are joined + iteratee( + func: string | object + ): (...args: any[]) => any; + /** * @see _.iteratee */ @@ -1199,14 +1207,14 @@ declare module "../index" { * @param context The context object. * @return Returns a new lodash function. */ - runInContext(context?: object): typeof _; + runInContext(context?: object): LoDashStatic; } interface LoDashImplicitWrapper { /** * @see _.runInContext */ - runInContext(): typeof _; + runInContext(): LoDashStatic; } // stubArray @@ -1452,4 +1460,4 @@ declare module "../index" { */ uniqueId(): LoDashExplicitWrapper; } -} \ No newline at end of file +} diff --git a/types/lodash/fp.d.ts b/types/lodash/fp.d.ts new file mode 100644 index 0000000000..725ee237aa --- /dev/null +++ b/types/lodash/fp.d.ts @@ -0,0 +1,4513 @@ +// AUTO-GENERATED: do not modify this file directly. +// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do: +// npm run fp + +import lodash = require("./index"); + +export = _; + +declare const _: _.LoDashFp; +declare namespace _ { + interface LodashAdd { + (augend: number): LodashAdd1x1; + (augend: lodash.__, addend: number): LodashAdd1x2; + (augend: number, addend: number): number; + } + type LodashAdd1x1 = (addend: number) => number; + type LodashAdd1x2 = (augend: number) => number; + interface LodashAfter { + any>(func: TFunc): LodashAfter1x1; + (func: lodash.__, n: number): LodashAfter1x2; + any>(func: TFunc, n: number): TFunc; + } + type LodashAfter1x1 = (n: number) => TFunc; + type LodashAfter1x2 = any>(func: TFunc) => TFunc; + interface LodashEvery { + (predicate: lodash.ValueIterateeCustom): LodashEvery1x1; + (predicate: lodash.__, collection: lodash.List | null | undefined): LodashEvery1x2; + (predicate: lodash.ValueIterateeCustom, collection: lodash.List | null | undefined): boolean; + (predicate: lodash.__, collection: T | null | undefined): LodashEvery2x2; + (predicate: lodash.ValueIterateeCustom, collection: T | null | undefined): boolean; + } + type LodashEvery1x1 = (collection: lodash.List | object | null | undefined) => boolean; + type LodashEvery1x2 = (predicate: lodash.ValueIterateeCustom) => boolean; + type LodashEvery2x2 = (predicate: lodash.ValueIterateeCustom) => boolean; + type LodashOverEvery = (predicates: lodash.Many<(...args: T[]) => boolean>) => (...args: T[]) => boolean; + type LodashConstant = (value: T) => () => T; + interface LodashSome { + (predicate: lodash.ValueIterateeCustom): LodashSome1x1; + (predicate: lodash.__, collection: lodash.List | null | undefined): LodashSome1x2; + (predicate: lodash.ValueIterateeCustom, collection: lodash.List | null | undefined): boolean; + (predicate: lodash.__, collection: T | null | undefined): LodashSome2x2; + (predicate: lodash.ValueIterateeCustom, collection: T | null | undefined): boolean; + } + type LodashSome1x1 = (collection: lodash.List | object | null | undefined) => boolean; + type LodashSome1x2 = (predicate: lodash.ValueIterateeCustom) => boolean; + type LodashSome2x2 = (predicate: lodash.ValueIterateeCustom) => boolean; + type LodashOverSome = (predicates: lodash.Many<(...args: T[]) => boolean>) => (...args: T[]) => boolean; + type LodashApply = (func: (...args: any[]) => TResult) => (...args: any[]) => TResult; + interface LodashAry { + (n: number): LodashAry1x1; + (n: lodash.__, func: (...args: any[]) => any): LodashAry1x2; + (n: number, func: (...args: any[]) => any): (...args: any[]) => any; + } + type LodashAry1x1 = (func: (...args: any[]) => any) => (...args: any[]) => any; + type LodashAry1x2 = (n: number) => (...args: any[]) => any; + interface LodashAssign { + (object: TObject): LodashAssign1x1; + (object: lodash.__, source: TSource): LodashAssign1x2; + (object: TObject, source: TSource): TObject & TSource; + } + type LodashAssign1x1 = (source: TSource) => TObject & TSource; + type LodashAssign1x2 = (object: TObject) => TObject & TSource; + type LodashAssignAll = (object: ReadonlyArray) => any; + interface LodashAssignAllWith { + (customizer: lodash.AssignCustomizer): LodashAssignAllWith1x1; + (customizer: lodash.__, args: ReadonlyArray): LodashAssignAllWith1x2; + (customizer: lodash.AssignCustomizer, args: ReadonlyArray): any; + } + type LodashAssignAllWith1x1 = (args: ReadonlyArray) => any; + type LodashAssignAllWith1x2 = (customizer: lodash.AssignCustomizer) => any; + interface LodashAssignIn { + (object: TObject): LodashAssignIn1x1; + (object: lodash.__, source: TSource): LodashAssignIn1x2; + (object: TObject, source: TSource): TObject & TSource; + } + type LodashAssignIn1x1 = (source: TSource) => TObject & TSource; + type LodashAssignIn1x2 = (object: TObject) => TObject & TSource; + type LodashAssignInAll = (object: ReadonlyArray) => TResult; + interface LodashAssignInAllWith { + (customizer: lodash.AssignCustomizer): LodashAssignInAllWith1x1; + (customizer: lodash.__, args: ReadonlyArray): LodashAssignInAllWith1x2; + (customizer: lodash.AssignCustomizer, args: ReadonlyArray): any; + } + type LodashAssignInAllWith1x1 = (args: ReadonlyArray) => any; + type LodashAssignInAllWith1x2 = (customizer: lodash.AssignCustomizer) => any; + interface LodashAssignInWith { + (customizer: lodash.AssignCustomizer): LodashAssignInWith1x1; + (customizer: lodash.__, object: TObject): LodashAssignInWith1x2; + (customizer: lodash.AssignCustomizer, object: TObject): LodashAssignInWith1x3; + (customizer: lodash.__, object: lodash.__, source: TSource): LodashAssignInWith1x4; + (customizer: lodash.AssignCustomizer, object: lodash.__, source: TSource): LodashAssignInWith1x5; + (customizer: lodash.__, object: TObject, source: TSource): LodashAssignInWith1x6; + (customizer: lodash.AssignCustomizer, object: TObject, source: TSource): TObject & TSource; + } + interface LodashAssignInWith1x1 { + (object: TObject): LodashAssignInWith1x3; + (object: lodash.__, source: TSource): LodashAssignInWith1x5; + (object: TObject, source: TSource): TObject & TSource; + } + interface LodashAssignInWith1x2 { + (customizer: lodash.AssignCustomizer): LodashAssignInWith1x3; + (customizer: lodash.__, source: TSource): LodashAssignInWith1x6; + (customizer: lodash.AssignCustomizer, source: TSource): TObject & TSource; + } + type LodashAssignInWith1x3 = (source: TSource) => TObject & TSource; + interface LodashAssignInWith1x4 { + (customizer: lodash.AssignCustomizer): LodashAssignInWith1x5; + (customizer: lodash.__, object: TObject): LodashAssignInWith1x6; + (customizer: lodash.AssignCustomizer, object: TObject): TObject & TSource; + } + type LodashAssignInWith1x5 = (object: TObject) => TObject & TSource; + type LodashAssignInWith1x6 = (customizer: lodash.AssignCustomizer) => TObject & TSource; + interface LodashAssignWith { + (customizer: lodash.AssignCustomizer): LodashAssignWith1x1; + (customizer: lodash.__, object: TObject): LodashAssignWith1x2; + (customizer: lodash.AssignCustomizer, object: TObject): LodashAssignWith1x3; + (customizer: lodash.__, object: lodash.__, source: TSource): LodashAssignWith1x4; + (customizer: lodash.AssignCustomizer, object: lodash.__, source: TSource): LodashAssignWith1x5; + (customizer: lodash.__, object: TObject, source: TSource): LodashAssignWith1x6; + (customizer: lodash.AssignCustomizer, object: TObject, source: TSource): TObject & TSource; + } + interface LodashAssignWith1x1 { + (object: TObject): LodashAssignWith1x3; + (object: lodash.__, source: TSource): LodashAssignWith1x5; + (object: TObject, source: TSource): TObject & TSource; + } + interface LodashAssignWith1x2 { + (customizer: lodash.AssignCustomizer): LodashAssignWith1x3; + (customizer: lodash.__, source: TSource): LodashAssignWith1x6; + (customizer: lodash.AssignCustomizer, source: TSource): TObject & TSource; + } + type LodashAssignWith1x3 = (source: TSource) => TObject & TSource; + interface LodashAssignWith1x4 { + (customizer: lodash.AssignCustomizer): LodashAssignWith1x5; + (customizer: lodash.__, object: TObject): LodashAssignWith1x6; + (customizer: lodash.AssignCustomizer, object: TObject): TObject & TSource; + } + type LodashAssignWith1x5 = (object: TObject) => TObject & TSource; + type LodashAssignWith1x6 = (customizer: lodash.AssignCustomizer) => TObject & TSource; + interface LodashSet { + (path: lodash.PropertyPath): LodashSet1x1; + (path: lodash.__, value: any): LodashSet1x2; + (path: lodash.PropertyPath, value: any): LodashSet1x3; + (path: lodash.__, value: lodash.__, object: T): LodashSet1x4; + (path: lodash.PropertyPath, value: lodash.__, object: T): LodashSet1x5; + (path: lodash.__, value: any, object: T): LodashSet1x6; + (path: lodash.PropertyPath, value: any, object: T): T; + (path: lodash.__, value: lodash.__, object: object): LodashSet2x4; + (path: lodash.PropertyPath, value: lodash.__, object: object): LodashSet2x5; + (path: lodash.__, value: any, object: object): LodashSet2x6; + (path: lodash.PropertyPath, value: any, object: object): TResult; + } + interface LodashSet1x1 { + (value: any): LodashSet1x3; + (value: lodash.__, object: T): LodashSet1x5; + (value: any, object: T): T; + (value: lodash.__, object: object): LodashSet2x5; + (value: any, object: object): TResult; + } + interface LodashSet1x2 { + (path: lodash.PropertyPath): LodashSet1x3; + (path: lodash.__, object: T): LodashSet1x6; + (path: lodash.PropertyPath, object: T): T; + (path: lodash.__, object: object): LodashSet2x6; + (path: lodash.PropertyPath, object: object): TResult; + } + interface LodashSet1x3 { + (object: T): T; + (object: object): TResult; + } + interface LodashSet1x4 { + (path: lodash.PropertyPath): LodashSet1x5; + (path: lodash.__, value: any): LodashSet1x6; + (path: lodash.PropertyPath, value: any): T; + } + type LodashSet1x5 = (value: any) => T; + type LodashSet1x6 = (path: lodash.PropertyPath) => T; + interface LodashSet2x4 { + (path: lodash.PropertyPath): LodashSet2x5; + (path: lodash.__, value: any): LodashSet2x6; + (path: lodash.PropertyPath, value: any): TResult; + } + type LodashSet2x5 = (value: any) => TResult; + type LodashSet2x6 = (path: lodash.PropertyPath) => TResult; + interface LodashAt { + (props: lodash.PropertyPath): LodashAt1x1; + (props: lodash.__, object: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): LodashAt1x2; + (props: lodash.PropertyPath, object: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): T[]; + (props: lodash.Many): LodashAt2x1; + (props: lodash.__, object: T | null | undefined): LodashAt2x2; + (props: lodash.Many, object: T | null | undefined): Array; + } + type LodashAt1x1 = (object: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined) => T[]; + type LodashAt1x2 = (props: lodash.PropertyPath) => T[]; + type LodashAt2x1 = (object: T | null | undefined) => Array; + type LodashAt2x2 = (props: lodash.Many) => Array; + type LodashAttempt = (func: (...args: any[]) => TResult) => TResult|Error; + interface LodashBefore { + any>(func: TFunc): LodashBefore1x1; + (func: lodash.__, n: number): LodashBefore1x2; + any>(func: TFunc, n: number): TFunc; + } + type LodashBefore1x1 = (n: number) => TFunc; + type LodashBefore1x2 = any>(func: TFunc) => TFunc; + interface LodashBind { + (func: (...args: any[]) => any): LodashBind1x1; + (func: lodash.__, thisArg: any): LodashBind1x2; + (func: (...args: any[]) => any, thisArg: any): (...args: any[]) => any; + placeholder: lodash.__; + } + type LodashBind1x1 = (thisArg: any) => (...args: any[]) => any; + type LodashBind1x2 = (func: (...args: any[]) => any) => (...args: any[]) => any; + interface LodashBindAll { + (methodNames: lodash.Many): LodashBindAll1x1; + (methodNames: lodash.__, object: T): LodashBindAll1x2; + (methodNames: lodash.Many, object: T): T; + } + type LodashBindAll1x1 = (object: T) => T; + type LodashBindAll1x2 = (methodNames: lodash.Many) => T; + interface LodashBindKey { + (object: object): LodashBindKey1x1; + (object: lodash.__, key: string): LodashBindKey1x2; + (object: object, key: string): (...args: any[]) => any; + placeholder: lodash.__; + } + type LodashBindKey1x1 = (key: string) => (...args: any[]) => any; + type LodashBindKey1x2 = (object: object) => (...args: any[]) => any; + type LodashCamelCase = (string: string) => string; + type LodashCapitalize = (string: string) => string; + type LodashCastArray = (value: lodash.Many) => T[]; + type LodashCeil = (n: number) => number; + interface LodashChunk { + (size: number): LodashChunk1x1; + (size: lodash.__, array: lodash.List | null | undefined): LodashChunk1x2; + (size: number, array: lodash.List | null | undefined): T[][]; + } + type LodashChunk1x1 = (array: lodash.List | null | undefined) => T[][]; + type LodashChunk1x2 = (size: number) => T[][]; + interface LodashClamp { + (lower: number): LodashClamp1x1; + (lower: lodash.__, upper: number): LodashClamp1x2; + (lower: number, upper: number): LodashClamp1x3; + (lower: lodash.__, upper: lodash.__, number: number): LodashClamp1x4; + (lower: number, upper: lodash.__, number: number): LodashClamp1x5; + (lower: lodash.__, upper: number, number: number): LodashClamp1x6; + (lower: number, upper: number, number: number): number; + } + interface LodashClamp1x1 { + (upper: number): LodashClamp1x3; + (upper: lodash.__, number: number): LodashClamp1x5; + (upper: number, number: number): number; + } + interface LodashClamp1x2 { + (lower: number): LodashClamp1x3; + (lower: lodash.__, number: number): LodashClamp1x6; + (lower: number, number: number): number; + } + type LodashClamp1x3 = (number: number) => number; + interface LodashClamp1x4 { + (lower: number): LodashClamp1x5; + (lower: lodash.__, upper: number): LodashClamp1x6; + (lower: number, upper: number): number; + } + type LodashClamp1x5 = (upper: number) => number; + type LodashClamp1x6 = (lower: number) => number; + type LodashClone = (value: T) => T; + type LodashCloneDeep = (value: T) => T; + interface LodashCloneDeepWith { + (customizer: lodash.CloneDeepWithCustomizer): LodashCloneDeepWith1x1; + (customizer: lodash.__, value: T): LodashCloneDeepWith1x2; + (customizer: lodash.CloneDeepWithCustomizer, value: T): any; + } + type LodashCloneDeepWith1x1 = (value: T) => any; + type LodashCloneDeepWith1x2 = (customizer: lodash.CloneDeepWithCustomizer) => any; + interface LodashCloneWith { + (customizer: lodash.CloneWithCustomizer): LodashCloneWith1x1; + (customizer: lodash.__, value: T): LodashCloneWith1x2; + (customizer: lodash.CloneWithCustomizer, value: T): TResult; + (customizer: lodash.CloneWithCustomizer): LodashCloneWith2x1; + (customizer: lodash.CloneWithCustomizer, value: T): TResult | T; + } + type LodashCloneWith1x1 = (value: T) => TResult; + interface LodashCloneWith1x2 { + (customizer: lodash.CloneWithCustomizer): TResult; + (customizer: lodash.CloneWithCustomizer): TResult | T; + } + type LodashCloneWith2x1 = (value: T) => TResult | T; + type LodashCompact = (array: lodash.List | null | undefined) => T[]; + type LodashNegate = any>(predicate: T) => T; + interface LodashFlowRight { + (f2: (a: R1) => R2, f1: () => R1): () => R2; + (f3: (a: R2) => R3, f2: (a: R1) => R2, f1: () => R1): () => R3; + (f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: () => R1): () => R4; + (f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: () => R1): () => R5; + (f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: () => R1): () => R6; + (f7: (a: R6) => R7, f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: () => R1): () => R7; + (f2: (a: R1) => R2, f1: (a1: A1) => R1): (a1: A1) => R2; + (f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1) => R1): (a1: A1) => R3; + (f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1) => R1): (a1: A1) => R4; + (f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1) => R1): (a1: A1) => R5; + (f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1) => R1): (a1: A1) => R6; + (f7: (a: R6) => R7, f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1) => R1): (a1: A1) => R7; + (f2: (a: R1) => R2, f1: (a1: A1, a2: A2) => R1): (a1: A1, a2: A2) => R2; + (f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2) => R1): (a1: A1, a2: A2) => R3; + (f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2) => R1): (a1: A1, a2: A2) => R4; + (f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2) => R1): (a1: A1, a2: A2) => R5; + (f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2) => R1): (a1: A1, a2: A2) => R6; + (f7: (a: R6) => R7, f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2) => R1): (a1: A1, a2: A2) => R7; + (f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3) => R1): (a1: A1, a2: A2, a3: A3) => R2; + (f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3) => R1): (a1: A1, a2: A2, a3: A3) => R3; + (f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3) => R1): (a1: A1, a2: A2, a3: A3) => R4; + (f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3) => R1): (a1: A1, a2: A2, a3: A3) => R5; + (f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3) => R1): (a1: A1, a2: A2, a3: A3) => R6; + (f7: (a: R6) => R7, f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3) => R1): (a1: A1, a2: A2, a3: A3) => R7; + (f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1): (a1: A1, a2: A2, a3: A3, a4: A4) => R2; + (f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1): (a1: A1, a2: A2, a3: A3, a4: A4) => R3; + (f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1): (a1: A1, a2: A2, a3: A3, a4: A4) => R4; + (f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1): (a1: A1, a2: A2, a3: A3, a4: A4) => R5; + (f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1): (a1: A1, a2: A2, a3: A3, a4: A4) => R6; + (f7: (a: R6) => R7, f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1): (a1: A1, a2: A2, a3: A3, a4: A4) => R7; + (f2: (a: R1) => R2, f1: (...args: any[]) => R1): (...args: any[]) => R2; + (f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: any[]) => R1): (...args: any[]) => R3; + (f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: any[]) => R1): (...args: any[]) => R4; + (f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: any[]) => R1): (...args: any[]) => R5; + (f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: any[]) => R1): (...args: any[]) => R6; + (f7: (a: R6) => R7, f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: any[]) => R1): (...args: any[]) => R7; + (f7: (a: any) => any, f6: (a: any) => any, f5: (a: any) => any, f4: (a: any) => any, f3: (a: any) => any, f2: (a: any) => any, f1: () => any, ...funcs: Array any>>): (...args: any[]) => any; + (funcs: Array any>>): (...args: any[]) => any; + } + interface LodashConcat { + (array: lodash.Many): LodashConcat1x1; + (array: lodash.__, values: lodash.Many): LodashConcat1x2; + (array: lodash.Many, values: lodash.Many): T[]; + } + type LodashConcat1x1 = (values: lodash.Many) => T[]; + type LodashConcat1x2 = (array: lodash.Many) => T[]; + type LodashCond = (pairs: Array>) => (Target: T) => R; + interface LodashConformsTo { + (source: lodash.ConformsPredicateObject): LodashConformsTo1x1; + (source: lodash.__, object: T): LodashConformsTo1x2; + (source: lodash.ConformsPredicateObject, object: T): boolean; + } + type LodashConformsTo1x1 = (object: T) => boolean; + type LodashConformsTo1x2 = (source: lodash.ConformsPredicateObject) => boolean; + interface LodashContains { + (target: T): LodashContains1x1; + (target: lodash.__, collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): LodashContains1x2; + (target: T, collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): boolean; + } + type LodashContains1x1 = (collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined) => boolean; + type LodashContains1x2 = (target: T) => boolean; + interface LodashCountBy { + (iteratee: (value: string) => T): LodashCountBy1x1; + (iteratee: lodash.__, collection: string | null | undefined): LodashCountBy1x2; + (iteratee: (value: string) => T, collection: string | null | undefined): lodash.Dictionary; + (iteratee: lodash.ValueIteratee): LodashCountBy2x1; + (iteratee: lodash.__, collection: lodash.List | null | undefined): LodashCountBy2x2; + (iteratee: lodash.ValueIteratee, collection: lodash.List | null | undefined): lodash.Dictionary; + (iteratee: lodash.__, collection: T | null | undefined): LodashCountBy3x2; + (iteratee: lodash.ValueIteratee, collection: T | null | undefined): lodash.Dictionary; + } + type LodashCountBy1x1 = (collection: string | null | undefined) => lodash.Dictionary; + type LodashCountBy1x2 = (iteratee: (value: string) => T) => lodash.Dictionary; + type LodashCountBy2x1 = (collection: lodash.List | object | null | undefined) => lodash.Dictionary; + type LodashCountBy2x2 = (iteratee: lodash.ValueIteratee) => lodash.Dictionary; + type LodashCountBy3x2 = (iteratee: lodash.ValueIteratee) => lodash.Dictionary; + type LodashCreate = (prototype: T) => T & U; + interface LodashCurry { + (func: (t1: T1) => R): lodash.CurriedFunction1; + (func: (t1: T1, t2: T2) => R): lodash.CurriedFunction2; + (func: (t1: T1, t2: T2, t3: T3) => R): lodash.CurriedFunction3; + (func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): lodash.CurriedFunction4; + (func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): lodash.CurriedFunction5; + (func: (...args: any[]) => any): (...args: any[]) => any; + placeholder: lodash.__; + } + interface LodashCurryN { + (arity: number): LodashCurryN1x1; + (arity: lodash.__, func: (t1: T1) => R): LodashCurryN1x2; + (arity: number, func: (t1: T1) => R): lodash.CurriedFunction1; + (arity: lodash.__, func: (t1: T1, t2: T2) => R): LodashCurryN2x2; + (arity: number, func: (t1: T1, t2: T2) => R): lodash.CurriedFunction2; + (arity: lodash.__, func: (t1: T1, t2: T2, t3: T3) => R): LodashCurryN3x2; + (arity: number, func: (t1: T1, t2: T2, t3: T3) => R): lodash.CurriedFunction3; + (arity: lodash.__, func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): LodashCurryN4x2; + (arity: number, func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): lodash.CurriedFunction4; + (arity: lodash.__, func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): LodashCurryN5x2; + (arity: number, func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): lodash.CurriedFunction5; + (arity: lodash.__, func: (...args: any[]) => any): LodashCurryN6x2; + (arity: number, func: (...args: any[]) => any): (...args: any[]) => any; + placeholder: lodash.__; + } + interface LodashCurryN1x1 { + (func: (t1: T1) => R): lodash.CurriedFunction1; + (func: (t1: T1, t2: T2) => R): lodash.CurriedFunction2; + (func: (t1: T1, t2: T2, t3: T3) => R): lodash.CurriedFunction3; + (func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): lodash.CurriedFunction4; + (func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): lodash.CurriedFunction5; + (func: (...args: any[]) => any): (...args: any[]) => any; + } + type LodashCurryN1x2 = (arity: number) => lodash.CurriedFunction1; + type LodashCurryN2x2 = (arity: number) => lodash.CurriedFunction2; + type LodashCurryN3x2 = (arity: number) => lodash.CurriedFunction3; + type LodashCurryN4x2 = (arity: number) => lodash.CurriedFunction4; + type LodashCurryN5x2 = (arity: number) => lodash.CurriedFunction5; + type LodashCurryN6x2 = (arity: number) => (...args: any[]) => any; + interface LodashCurryRight { + (func: (t1: T1) => R): lodash.RightCurriedFunction1; + (func: (t1: T1, t2: T2) => R): lodash.RightCurriedFunction2; + (func: (t1: T1, t2: T2, t3: T3) => R): lodash.RightCurriedFunction3; + (func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): lodash.RightCurriedFunction4; + (func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): lodash.RightCurriedFunction5; + (func: (...args: any[]) => any): (...args: any[]) => any; + placeholder: lodash.__; + } + interface LodashCurryRightN { + (arity: number): LodashCurryRightN1x1; + (arity: lodash.__, func: (t1: T1) => R): LodashCurryRightN1x2; + (arity: number, func: (t1: T1) => R): lodash.RightCurriedFunction1; + (arity: lodash.__, func: (t1: T1, t2: T2) => R): LodashCurryRightN2x2; + (arity: number, func: (t1: T1, t2: T2) => R): lodash.RightCurriedFunction2; + (arity: lodash.__, func: (t1: T1, t2: T2, t3: T3) => R): LodashCurryRightN3x2; + (arity: number, func: (t1: T1, t2: T2, t3: T3) => R): lodash.RightCurriedFunction3; + (arity: lodash.__, func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): LodashCurryRightN4x2; + (arity: number, func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): lodash.RightCurriedFunction4; + (arity: lodash.__, func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): LodashCurryRightN5x2; + (arity: number, func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): lodash.RightCurriedFunction5; + (arity: lodash.__, func: (...args: any[]) => any): LodashCurryRightN6x2; + (arity: number, func: (...args: any[]) => any): (...args: any[]) => any; + placeholder: lodash.__; + } + interface LodashCurryRightN1x1 { + (func: (t1: T1) => R): lodash.RightCurriedFunction1; + (func: (t1: T1, t2: T2) => R): lodash.RightCurriedFunction2; + (func: (t1: T1, t2: T2, t3: T3) => R): lodash.RightCurriedFunction3; + (func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): lodash.RightCurriedFunction4; + (func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): lodash.RightCurriedFunction5; + (func: (...args: any[]) => any): (...args: any[]) => any; + } + type LodashCurryRightN1x2 = (arity: number) => lodash.RightCurriedFunction1; + type LodashCurryRightN2x2 = (arity: number) => lodash.RightCurriedFunction2; + type LodashCurryRightN3x2 = (arity: number) => lodash.RightCurriedFunction3; + type LodashCurryRightN4x2 = (arity: number) => lodash.RightCurriedFunction4; + type LodashCurryRightN5x2 = (arity: number) => lodash.RightCurriedFunction5; + type LodashCurryRightN6x2 = (arity: number) => (...args: any[]) => any; + interface LodashDebounce { + (wait: number): LodashDebounce1x1; + any>(wait: lodash.__, func: T): LodashDebounce1x2; + any>(wait: number, func: T): T & lodash.Cancelable; + } + type LodashDebounce1x1 = any>(func: T) => T & lodash.Cancelable; + type LodashDebounce1x2 = (wait: number) => T & lodash.Cancelable; + type LodashDeburr = (string: string) => string; + interface LodashDefaults { + (source: TSource): LodashDefaults1x1; + (source: lodash.__, object: TObject): LodashDefaults1x2; + (source: TSource, object: TObject): TSource & TObject; + } + type LodashDefaults1x1 = (object: TObject) => TSource & TObject; + type LodashDefaults1x2 = (source: TSource) => TSource & TObject; + type LodashDefaultsAll = (object: ReadonlyArray) => any; + interface LodashDefaultsDeep { + (sources: any): LodashDefaultsDeep1x1; + (sources: lodash.__, object: any): LodashDefaultsDeep1x2; + (sources: any, object: any): any; + } + type LodashDefaultsDeep1x1 = (object: any) => any; + type LodashDefaultsDeep1x2 = (sources: any) => any; + type LodashDefaultsDeepAll = (object: ReadonlyArray) => any; + interface LodashDefaultTo { + (defaultValue: T): LodashDefaultTo1x1; + (defaultValue: lodash.__, value: T | null | undefined): LodashDefaultTo1x2; + (defaultValue: T, value: T | null | undefined): T; + (defaultValue: TDefault): LodashDefaultTo2x1; + (defaultValue: TDefault, value: T | null | undefined): T | TDefault; + } + type LodashDefaultTo1x1 = (value: T | null | undefined) => T; + interface LodashDefaultTo1x2 { + (defaultValue: T): T; + (defaultValue: TDefault): T | TDefault; + } + type LodashDefaultTo2x1 = (value: T | null | undefined) => T | TDefault; + type LodashDefer = (func: (...args: any[]) => any, ...args: any[]) => number; + interface LodashDelay { + (wait: number): LodashDelay1x1; + (wait: lodash.__, func: (...args: any[]) => any): LodashDelay1x2; + (wait: number, func: (...args: any[]) => any): number; + } + type LodashDelay1x1 = (func: (...args: any[]) => any) => number; + type LodashDelay1x2 = (wait: number) => number; + interface LodashDifference { + (array: lodash.List | null | undefined): LodashDifference1x1; + (array: lodash.__, values: lodash.List): LodashDifference1x2; + (array: lodash.List | null | undefined, values: lodash.List): T[]; + } + type LodashDifference1x1 = (values: lodash.List) => T[]; + type LodashDifference1x2 = (array: lodash.List | null | undefined) => T[]; + interface LodashDifferenceBy { + (iteratee: lodash.ValueIteratee): LodashDifferenceBy1x1; + (iteratee: lodash.__, array: lodash.List | null | undefined): LodashDifferenceBy1x2; + (iteratee: lodash.ValueIteratee, array: lodash.List | null | undefined): LodashDifferenceBy1x3; + (iteratee: lodash.__, array: lodash.__, values: lodash.List): LodashDifferenceBy1x4; + (iteratee: lodash.ValueIteratee, array: lodash.__, values: lodash.List): LodashDifferenceBy1x5; + (iteratee: lodash.__, array: lodash.List | null | undefined, values: lodash.List): LodashDifferenceBy1x6; + (iteratee: lodash.ValueIteratee, array: lodash.List | null | undefined, values: lodash.List): T1[]; + } + interface LodashDifferenceBy1x1 { + (array: lodash.List | null | undefined): LodashDifferenceBy1x3; + (array: lodash.__, values: lodash.List): LodashDifferenceBy1x5; + (array: lodash.List | null | undefined, values: lodash.List): T1[]; + } + interface LodashDifferenceBy1x2 { + (iteratee: lodash.ValueIteratee): LodashDifferenceBy1x3; + (iteratee: lodash.__, values: lodash.List): LodashDifferenceBy1x6; + (iteratee: lodash.ValueIteratee, values: lodash.List): T1[]; + } + type LodashDifferenceBy1x3 = (values: lodash.List) => T1[]; + interface LodashDifferenceBy1x4 { + (iteratee: lodash.ValueIteratee): LodashDifferenceBy1x5; + (iteratee: lodash.__, array: lodash.List | null | undefined): LodashDifferenceBy1x6; + (iteratee: lodash.ValueIteratee, array: lodash.List | null | undefined): T1[]; + } + type LodashDifferenceBy1x5 = (array: lodash.List | null | undefined) => T1[]; + type LodashDifferenceBy1x6 = (iteratee: lodash.ValueIteratee) => T1[]; + interface LodashDifferenceWith { + (comparator: lodash.Comparator2): LodashDifferenceWith1x1; + (comparator: lodash.__, array: lodash.List | null | undefined): LodashDifferenceWith1x2; + (comparator: lodash.Comparator2, array: lodash.List | null | undefined): LodashDifferenceWith1x3; + (comparator: lodash.__, array: lodash.__, values: lodash.List): LodashDifferenceWith1x4; + (comparator: lodash.Comparator2, array: lodash.__, values: lodash.List): LodashDifferenceWith1x5; + (comparator: lodash.__, array: lodash.List | null | undefined, values: lodash.List): LodashDifferenceWith1x6; + (comparator: lodash.Comparator2, array: lodash.List | null | undefined, values: lodash.List): T1[]; + } + interface LodashDifferenceWith1x1 { + (array: lodash.List | null | undefined): LodashDifferenceWith1x3; + (array: lodash.__, values: lodash.List): LodashDifferenceWith1x5; + (array: lodash.List | null | undefined, values: lodash.List): T1[]; + } + interface LodashDifferenceWith1x2 { + (comparator: lodash.Comparator2): LodashDifferenceWith1x3; + (comparator: lodash.__, values: lodash.List): LodashDifferenceWith1x6; + (comparator: lodash.Comparator2, values: lodash.List): T1[]; + } + type LodashDifferenceWith1x3 = (values: lodash.List) => T1[]; + interface LodashDifferenceWith1x4 { + (comparator: lodash.Comparator2): LodashDifferenceWith1x5; + (comparator: lodash.__, array: lodash.List | null | undefined): LodashDifferenceWith1x6; + (comparator: lodash.Comparator2, array: lodash.List | null | undefined): T1[]; + } + type LodashDifferenceWith1x5 = (array: lodash.List | null | undefined) => T1[]; + type LodashDifferenceWith1x6 = (comparator: lodash.Comparator2) => T1[]; + interface LodashUnset { + (path: lodash.PropertyPath): LodashUnset1x1; + (path: lodash.__, object: any): LodashUnset1x2; + (path: lodash.PropertyPath, object: any): boolean; + } + type LodashUnset1x1 = (object: any) => boolean; + type LodashUnset1x2 = (path: lodash.PropertyPath) => boolean; + interface LodashDivide { + (dividend: number): LodashDivide1x1; + (dividend: lodash.__, divisor: number): LodashDivide1x2; + (dividend: number, divisor: number): number; + } + type LodashDivide1x1 = (divisor: number) => number; + type LodashDivide1x2 = (dividend: number) => number; + interface LodashDrop { + (n: number): LodashDrop1x1; + (n: lodash.__, array: lodash.List | null | undefined): LodashDrop1x2; + (n: number, array: lodash.List | null | undefined): T[]; + } + type LodashDrop1x1 = (array: lodash.List | null | undefined) => T[]; + type LodashDrop1x2 = (n: number) => T[]; + interface LodashDropRight { + (n: number): LodashDropRight1x1; + (n: lodash.__, array: lodash.List | null | undefined): LodashDropRight1x2; + (n: number, array: lodash.List | null | undefined): T[]; + } + type LodashDropRight1x1 = (array: lodash.List | null | undefined) => T[]; + type LodashDropRight1x2 = (n: number) => T[]; + interface LodashDropRightWhile { + (predicate: lodash.ValueIteratee): LodashDropRightWhile1x1; + (predicate: lodash.__, array: lodash.List | null | undefined): LodashDropRightWhile1x2; + (predicate: lodash.ValueIteratee, array: lodash.List | null | undefined): T[]; + } + type LodashDropRightWhile1x1 = (array: lodash.List | null | undefined) => T[]; + type LodashDropRightWhile1x2 = (predicate: lodash.ValueIteratee) => T[]; + interface LodashDropWhile { + (predicate: lodash.ValueIteratee): LodashDropWhile1x1; + (predicate: lodash.__, array: lodash.List | null | undefined): LodashDropWhile1x2; + (predicate: lodash.ValueIteratee, array: lodash.List | null | undefined): T[]; + } + type LodashDropWhile1x1 = (array: lodash.List | null | undefined) => T[]; + type LodashDropWhile1x2 = (predicate: lodash.ValueIteratee) => T[]; + interface LodashForEach { + (iteratee: (value: T) => any): LodashForEach1x1; + (iteratee: lodash.__, collection: ReadonlyArray): LodashForEach1x2; + (iteratee: (value: T) => any, collection: ReadonlyArray): T[]; + (iteratee: (value: string) => any): LodashForEach2x1; + (iteratee: lodash.__, collection: string): LodashForEach2x2; + (iteratee: (value: string) => any, collection: string): string; + (iteratee: lodash.__, collection: lodash.List): LodashForEach3x2; + (iteratee: (value: T) => any, collection: lodash.List): lodash.List; + (iteratee: lodash.__, collection: T): LodashForEach4x2; + (iteratee: (value: T[keyof T]) => any, collection: T): T; + (iteratee: lodash.__, collection: TArray & (T[] | null | undefined)): LodashForEach5x2; + (iteratee: (value: T) => any, collection: TArray & (T[] | null | undefined)): TArray; + (iteratee: lodash.__, collection: TString): LodashForEach6x2; + (iteratee: (value: string) => any, collection: TString): TString; + | null | undefined>(iteratee: lodash.__, collection: TList & (lodash.List | null | undefined)): LodashForEach7x2; + | null | undefined>(iteratee: (value: T) => any, collection: TList & (lodash.List | null | undefined)): TList; + (iteratee: lodash.__, collection: T | null | undefined): LodashForEach8x2; + (iteratee: (value: T[keyof T]) => any, collection: T | null | undefined): T | null | undefined; + } + interface LodashForEach1x1 { + (collection: ReadonlyArray): T[]; + (collection: lodash.List): lodash.List; + (collection: T1): T1; + (collection: TArray & (T[] | null | undefined)): TArray; + | null | undefined>(collection: TList & (lodash.List | null | undefined)): TList; + (collection: T1 | null | undefined): T1 | null | undefined; + } + type LodashForEach1x2 = (iteratee: (value: T) => any) => T[]; + interface LodashForEach2x1 { + (collection: string): string; + (collection: TString): TString; + } + type LodashForEach2x2 = (iteratee: (value: string) => any) => string; + type LodashForEach3x2 = (iteratee: (value: T) => any) => lodash.List; + type LodashForEach4x2 = (iteratee: (value: T[keyof T]) => any) => T; + type LodashForEach5x2 = (iteratee: (value: T) => any) => TArray; + type LodashForEach6x2 = (iteratee: (value: string) => any) => TString; + type LodashForEach7x2 = (iteratee: (value: T) => any) => TList; + type LodashForEach8x2 = (iteratee: (value: T[keyof T]) => any) => T | null | undefined; + interface LodashForEachRight { + (iteratee: (value: T) => any): LodashForEachRight1x1; + (iteratee: lodash.__, collection: ReadonlyArray): LodashForEachRight1x2; + (iteratee: (value: T) => any, collection: ReadonlyArray): T[]; + (iteratee: (value: string) => any): LodashForEachRight2x1; + (iteratee: lodash.__, collection: string): LodashForEachRight2x2; + (iteratee: (value: string) => any, collection: string): string; + (iteratee: lodash.__, collection: lodash.List): LodashForEachRight3x2; + (iteratee: (value: T) => any, collection: lodash.List): lodash.List; + (iteratee: lodash.__, collection: T): LodashForEachRight4x2; + (iteratee: (value: T[keyof T]) => any, collection: T): T; + (iteratee: lodash.__, collection: TArray & (T[] | null | undefined)): LodashForEachRight5x2; + (iteratee: (value: T) => any, collection: TArray & (T[] | null | undefined)): TArray; + (iteratee: lodash.__, collection: TString): LodashForEachRight6x2; + (iteratee: (value: string) => any, collection: TString): TString; + | null | undefined>(iteratee: lodash.__, collection: TList & (lodash.List | null | undefined)): LodashForEachRight7x2; + | null | undefined>(iteratee: (value: T) => any, collection: TList & (lodash.List | null | undefined)): TList; + (iteratee: lodash.__, collection: T | null | undefined): LodashForEachRight8x2; + (iteratee: (value: T[keyof T]) => any, collection: T | null | undefined): T | null | undefined; + } + interface LodashForEachRight1x1 { + (collection: ReadonlyArray): T[]; + (collection: lodash.List): lodash.List; + (collection: T1): T1; + (collection: TArray & (T[] | null | undefined)): TArray; + | null | undefined>(collection: TList & (lodash.List | null | undefined)): TList; + (collection: T1 | null | undefined): T1 | null | undefined; + } + type LodashForEachRight1x2 = (iteratee: (value: T) => any) => T[]; + interface LodashForEachRight2x1 { + (collection: string): string; + (collection: TString): TString; + } + type LodashForEachRight2x2 = (iteratee: (value: string) => any) => string; + type LodashForEachRight3x2 = (iteratee: (value: T) => any) => lodash.List; + type LodashForEachRight4x2 = (iteratee: (value: T[keyof T]) => any) => T; + type LodashForEachRight5x2 = (iteratee: (value: T) => any) => TArray; + type LodashForEachRight6x2 = (iteratee: (value: string) => any) => TString; + type LodashForEachRight7x2 = (iteratee: (value: T) => any) => TList; + type LodashForEachRight8x2 = (iteratee: (value: T[keyof T]) => any) => T | null | undefined; + interface LodashEndsWith { + (target: string): LodashEndsWith1x1; + (target: lodash.__, string: string): LodashEndsWith1x2; + (target: string, string: string): boolean; + } + type LodashEndsWith1x1 = (string: string) => boolean; + type LodashEndsWith1x2 = (target: string) => boolean; + interface LodashToPairs { + (object: lodash.Dictionary | lodash.NumericDictionary): Array<[string, T]>; + (object: object): Array<[string, any]>; + } + interface LodashToPairsIn { + (object: lodash.Dictionary | lodash.NumericDictionary): Array<[string, T]>; + (object: object): Array<[string, any]>; + } + interface LodashEq { + (value: any): LodashEq1x1; + (value: lodash.__, other: any): LodashEq1x2; + (value: any, other: any): boolean; + } + type LodashEq1x1 = (other: any) => boolean; + type LodashEq1x2 = (value: any) => boolean; + interface LodashIsEqual { + (value: any): LodashIsEqual1x1; + (value: lodash.__, other: any): LodashIsEqual1x2; + (value: any, other: any): boolean; + } + type LodashIsEqual1x1 = (other: any) => boolean; + type LodashIsEqual1x2 = (value: any) => boolean; + type LodashEscape = (string: string) => string; + type LodashEscapeRegExp = (string: string) => string; + interface LodashExtend { + (object: TObject): LodashExtend1x1; + (object: lodash.__, source: TSource): LodashExtend1x2; + (object: TObject, source: TSource): TObject & TSource; + } + type LodashExtend1x1 = (source: TSource) => TObject & TSource; + type LodashExtend1x2 = (object: TObject) => TObject & TSource; + type LodashExtendAll = (object: ReadonlyArray) => TResult; + interface LodashExtendAllWith { + (customizer: lodash.AssignCustomizer): LodashExtendAllWith1x1; + (customizer: lodash.__, args: ReadonlyArray): LodashExtendAllWith1x2; + (customizer: lodash.AssignCustomizer, args: ReadonlyArray): any; + } + type LodashExtendAllWith1x1 = (args: ReadonlyArray) => any; + type LodashExtendAllWith1x2 = (customizer: lodash.AssignCustomizer) => any; + interface LodashExtendWith { + (customizer: lodash.AssignCustomizer): LodashExtendWith1x1; + (customizer: lodash.__, object: TObject): LodashExtendWith1x2; + (customizer: lodash.AssignCustomizer, object: TObject): LodashExtendWith1x3; + (customizer: lodash.__, object: lodash.__, source: TSource): LodashExtendWith1x4; + (customizer: lodash.AssignCustomizer, object: lodash.__, source: TSource): LodashExtendWith1x5; + (customizer: lodash.__, object: TObject, source: TSource): LodashExtendWith1x6; + (customizer: lodash.AssignCustomizer, object: TObject, source: TSource): TObject & TSource; + } + interface LodashExtendWith1x1 { + (object: TObject): LodashExtendWith1x3; + (object: lodash.__, source: TSource): LodashExtendWith1x5; + (object: TObject, source: TSource): TObject & TSource; + } + interface LodashExtendWith1x2 { + (customizer: lodash.AssignCustomizer): LodashExtendWith1x3; + (customizer: lodash.__, source: TSource): LodashExtendWith1x6; + (customizer: lodash.AssignCustomizer, source: TSource): TObject & TSource; + } + type LodashExtendWith1x3 = (source: TSource) => TObject & TSource; + interface LodashExtendWith1x4 { + (customizer: lodash.AssignCustomizer): LodashExtendWith1x5; + (customizer: lodash.__, object: TObject): LodashExtendWith1x6; + (customizer: lodash.AssignCustomizer, object: TObject): TObject & TSource; + } + type LodashExtendWith1x5 = (object: TObject) => TObject & TSource; + type LodashExtendWith1x6 = (customizer: lodash.AssignCustomizer) => TObject & TSource; + type LodashStubFalse = () => boolean; + interface LodashFill { + (start: number): LodashFill1x1; + (start: lodash.__, end: number): LodashFill1x2; + (start: number, end: number): LodashFill1x3; + (start: lodash.__, end: lodash.__, value: T): LodashFill1x4; + (start: number, end: lodash.__, value: T): LodashFill1x5; + (start: lodash.__, end: number, value: T): LodashFill1x6; + (start: number, end: number, value: T): LodashFill1x7; + (start: lodash.__, end: lodash.__, value: lodash.__, array: U[] | null | undefined): LodashFill1x8; + (start: number, end: lodash.__, value: lodash.__, array: U[] | null | undefined): LodashFill1x9; + (start: lodash.__, end: number, value: lodash.__, array: U[] | null | undefined): LodashFill1x10; + (start: number, end: number, value: lodash.__, array: U[] | null | undefined): LodashFill1x11; + (start: lodash.__, end: lodash.__, value: T, array: U[] | null | undefined): LodashFill1x12; + (start: number, end: lodash.__, value: T, array: U[] | null | undefined): LodashFill1x13; + (start: lodash.__, end: number, value: T, array: U[] | null | undefined): LodashFill1x14; + (start: number, end: number, value: T, array: U[] | null | undefined): Array; + (start: lodash.__, end: lodash.__, value: lodash.__, array: lodash.List | null | undefined): LodashFill2x8; + (start: number, end: lodash.__, value: lodash.__, array: lodash.List | null | undefined): LodashFill2x9; + (start: lodash.__, end: number, value: lodash.__, array: lodash.List | null | undefined): LodashFill2x10; + (start: number, end: number, value: lodash.__, array: lodash.List | null | undefined): LodashFill2x11; + (start: lodash.__, end: lodash.__, value: T, array: lodash.List | null | undefined): LodashFill2x12; + (start: number, end: lodash.__, value: T, array: lodash.List | null | undefined): LodashFill2x13; + (start: lodash.__, end: number, value: T, array: lodash.List | null | undefined): LodashFill2x14; + (start: number, end: number, value: T, array: lodash.List | null | undefined): lodash.List; + } + interface LodashFill1x1 { + (end: number): LodashFill1x3; + (end: lodash.__, value: T): LodashFill1x5; + (end: number, value: T): LodashFill1x7; + (end: lodash.__, value: lodash.__, array: U[] | null | undefined): LodashFill1x9; + (end: number, value: lodash.__, array: U[] | null | undefined): LodashFill1x11; + (end: lodash.__, value: T, array: U[] | null | undefined): LodashFill1x13; + (end: number, value: T, array: U[] | null | undefined): Array; + (end: lodash.__, value: lodash.__, array: lodash.List | null | undefined): LodashFill2x9; + (end: number, value: lodash.__, array: lodash.List | null | undefined): LodashFill2x11; + (end: lodash.__, value: T, array: lodash.List | null | undefined): LodashFill2x13; + (end: number, value: T, array: lodash.List | null | undefined): lodash.List; + } + interface LodashFill1x2 { + (start: number): LodashFill1x3; + (start: lodash.__, value: T): LodashFill1x6; + (start: number, value: T): LodashFill1x7; + (start: lodash.__, value: lodash.__, array: U[] | null | undefined): LodashFill1x10; + (start: number, value: lodash.__, array: U[] | null | undefined): LodashFill1x11; + (start: lodash.__, value: T, array: U[] | null | undefined): LodashFill1x14; + (start: number, value: T, array: U[] | null | undefined): Array; + (start: lodash.__, value: lodash.__, array: lodash.List | null | undefined): LodashFill2x10; + (start: number, value: lodash.__, array: lodash.List | null | undefined): LodashFill2x11; + (start: lodash.__, value: T, array: lodash.List | null | undefined): LodashFill2x14; + (start: number, value: T, array: lodash.List | null | undefined): lodash.List; + } + interface LodashFill1x3 { + (value: T): LodashFill1x7; + (value: lodash.__, array: U[] | null | undefined): LodashFill1x11; + (value: T, array: U[] | null | undefined): Array; + (value: lodash.__, array: lodash.List | null | undefined): LodashFill2x11; + (value: T, array: lodash.List | null | undefined): lodash.List; + } + interface LodashFill1x4 { + (start: number): LodashFill1x5; + (start: lodash.__, end: number): LodashFill1x6; + (start: number, end: number): LodashFill1x7; + (start: lodash.__, end: lodash.__, array: U[] | null | undefined): LodashFill1x12; + (start: number, end: lodash.__, array: U[] | null | undefined): LodashFill1x13; + (start: lodash.__, end: number, array: U[] | null | undefined): LodashFill1x14; + (start: number, end: number, array: U[] | null | undefined): Array; + (start: lodash.__, end: lodash.__, array: lodash.List | null | undefined): LodashFill2x12; + (start: number, end: lodash.__, array: lodash.List | null | undefined): LodashFill2x13; + (start: lodash.__, end: number, array: lodash.List | null | undefined): LodashFill2x14; + (start: number, end: number, array: lodash.List | null | undefined): lodash.List; + } + interface LodashFill1x5 { + (end: number): LodashFill1x7; + (end: lodash.__, array: U[] | null | undefined): LodashFill1x13; + (end: number, array: U[] | null | undefined): Array; + (end: lodash.__, array: lodash.List | null | undefined): LodashFill2x13; + (end: number, array: lodash.List | null | undefined): lodash.List; + } + interface LodashFill1x6 { + (start: number): LodashFill1x7; + (start: lodash.__, array: U[] | null | undefined): LodashFill1x14; + (start: number, array: U[] | null | undefined): Array; + (start: lodash.__, array: lodash.List | null | undefined): LodashFill2x14; + (start: number, array: lodash.List | null | undefined): lodash.List; + } + interface LodashFill1x7 { + (array: U[] | null | undefined): Array; + (array: lodash.List | null | undefined): lodash.List; + } + interface LodashFill1x8 { + (start: number): LodashFill1x9; + (start: lodash.__, end: number): LodashFill1x10; + (start: number, end: number): LodashFill1x11; + (start: lodash.__, end: lodash.__, value: T): LodashFill1x12; + (start: number, end: lodash.__, value: T): LodashFill1x13; + (start: lodash.__, end: number, value: T): LodashFill1x14; + (start: number, end: number, value: T): Array; + } + interface LodashFill1x9 { + (end: number): LodashFill1x11; + (end: lodash.__, value: T): LodashFill1x13; + (end: number, value: T): Array; + } + interface LodashFill1x10 { + (start: number): LodashFill1x11; + (start: lodash.__, value: T): LodashFill1x14; + (start: number, value: T): Array; + } + type LodashFill1x11 = (value: T) => Array; + interface LodashFill1x12 { + (start: number): LodashFill1x13; + (start: lodash.__, end: number): LodashFill1x14; + (start: number, end: number): Array; + } + type LodashFill1x13 = (end: number) => Array; + type LodashFill1x14 = (start: number) => Array; + interface LodashFill2x8 { + (start: number): LodashFill2x9; + (start: lodash.__, end: number): LodashFill2x10; + (start: number, end: number): LodashFill2x11; + (start: lodash.__, end: lodash.__, value: T): LodashFill2x12; + (start: number, end: lodash.__, value: T): LodashFill2x13; + (start: lodash.__, end: number, value: T): LodashFill2x14; + (start: number, end: number, value: T): lodash.List; + } + interface LodashFill2x9 { + (end: number): LodashFill2x11; + (end: lodash.__, value: T): LodashFill2x13; + (end: number, value: T): lodash.List; + } + interface LodashFill2x10 { + (start: number): LodashFill2x11; + (start: lodash.__, value: T): LodashFill2x14; + (start: number, value: T): lodash.List; + } + type LodashFill2x11 = (value: T) => lodash.List; + interface LodashFill2x12 { + (start: number): LodashFill2x13; + (start: lodash.__, end: number): LodashFill2x14; + (start: number, end: number): lodash.List; + } + type LodashFill2x13 = (end: number) => lodash.List; + type LodashFill2x14 = (start: number) => lodash.List; + interface LodashFilter { + (predicate: (value: string) => boolean): LodashFilter1x1; + (predicate: lodash.__, collection: string | null | undefined): LodashFilter1x2; + (predicate: (value: string) => boolean, collection: string | null | undefined): string[]; + (predicate: lodash.ValueIteratorTypeGuard): LodashFilter2x1; + (predicate: lodash.__, collection: lodash.List | null | undefined): LodashFilter2x2; + (predicate: lodash.ValueIteratorTypeGuard, collection: lodash.List | null | undefined): S[]; + (predicate: lodash.ValueIterateeCustom): LodashFilter3x1; + (predicate: lodash.ValueIterateeCustom, collection: lodash.List | null | undefined): T[]; + (predicate: lodash.ValueIteratorTypeGuard): LodashFilter4x1; + (predicate: lodash.__, collection: T | null | undefined): LodashFilter4x2; + (predicate: lodash.ValueIteratorTypeGuard, collection: T | null | undefined): S[]; + (predicate: lodash.ValueIterateeCustom, collection: T | null | undefined): Array; + } + type LodashFilter1x1 = (collection: string | null | undefined) => string[]; + type LodashFilter1x2 = (predicate: (value: string) => boolean) => string[]; + type LodashFilter2x1 = (collection: lodash.List | null | undefined) => S[]; + interface LodashFilter2x2 { + (predicate: lodash.ValueIteratorTypeGuard): S[]; + (predicate: lodash.ValueIterateeCustom): T[]; + } + type LodashFilter3x1 = (collection: lodash.List | object | null | undefined) => T[]; + type LodashFilter4x1 = (collection: T | null | undefined) => S[]; + interface LodashFilter4x2 { + (predicate: lodash.ValueIteratorTypeGuard): S[]; + (predicate: lodash.ValueIterateeCustom): Array; + } + interface LodashFind { + (predicate: lodash.ValueIteratorTypeGuard): LodashFind1x1; + (predicate: lodash.__, collection: lodash.List | null | undefined): LodashFind1x2; + (predicate: lodash.ValueIteratorTypeGuard, collection: lodash.List | null | undefined): S|undefined; + (predicate: lodash.ValueIterateeCustom): LodashFind2x1; + (predicate: lodash.ValueIterateeCustom, collection: lodash.List | null | undefined): T|undefined; + (predicate: lodash.ValueIteratorTypeGuard): LodashFind3x1; + (predicate: lodash.__, collection: T | null | undefined): LodashFind3x2; + (predicate: lodash.ValueIteratorTypeGuard, collection: T | null | undefined): S|undefined; + (predicate: lodash.ValueIterateeCustom, collection: T | null | undefined): T[keyof T]|undefined; + } + type LodashFind1x1 = (collection: lodash.List | null | undefined) => S|undefined; + interface LodashFind1x2 { + (predicate: lodash.ValueIteratorTypeGuard): S|undefined; + (predicate: lodash.ValueIterateeCustom): T|undefined; + } + type LodashFind2x1 = (collection: lodash.List | object | null | undefined) => T|undefined; + type LodashFind3x1 = (collection: T | null | undefined) => S|undefined; + interface LodashFind3x2 { + (predicate: lodash.ValueIteratorTypeGuard): S|undefined; + (predicate: lodash.ValueIterateeCustom): T[keyof T]|undefined; + } + interface LodashFindFrom { + (predicate: lodash.ValueIteratorTypeGuard): LodashFindFrom1x1; + (predicate: lodash.__, fromIndex: number): LodashFindFrom1x2; + (predicate: lodash.ValueIteratorTypeGuard, fromIndex: number): LodashFindFrom1x3; + (predicate: lodash.__, fromIndex: lodash.__, collection: lodash.List | null | undefined): LodashFindFrom1x4; + (predicate: lodash.ValueIteratorTypeGuard, fromIndex: lodash.__, collection: lodash.List | null | undefined): LodashFindFrom1x5; + (predicate: lodash.__, fromIndex: number, collection: lodash.List | null | undefined): LodashFindFrom1x6; + (predicate: lodash.ValueIteratorTypeGuard, fromIndex: number, collection: lodash.List | null | undefined): S|undefined; + (predicate: lodash.ValueIterateeCustom): LodashFindFrom2x1; + (predicate: lodash.ValueIterateeCustom, fromIndex: number): LodashFindFrom2x3; + (predicate: lodash.ValueIterateeCustom, fromIndex: lodash.__, collection: lodash.List | null | undefined): LodashFindFrom2x5; + (predicate: lodash.ValueIterateeCustom, fromIndex: number, collection: lodash.List | null | undefined): T|undefined; + (predicate: lodash.ValueIteratorTypeGuard): LodashFindFrom3x1; + (predicate: lodash.ValueIteratorTypeGuard, fromIndex: number): LodashFindFrom3x3; + (predicate: lodash.__, fromIndex: lodash.__, collection: T | null | undefined): LodashFindFrom3x4; + (predicate: lodash.ValueIteratorTypeGuard, fromIndex: lodash.__, collection: T | null | undefined): LodashFindFrom3x5; + (predicate: lodash.__, fromIndex: number, collection: T | null | undefined): LodashFindFrom3x6; + (predicate: lodash.ValueIteratorTypeGuard, fromIndex: number, collection: T | null | undefined): S|undefined; + (predicate: lodash.ValueIterateeCustom, fromIndex: lodash.__, collection: T | null | undefined): LodashFindFrom4x5; + (predicate: lodash.ValueIterateeCustom, fromIndex: number, collection: T | null | undefined): T[keyof T]|undefined; + } + interface LodashFindFrom1x1 { + (fromIndex: number): LodashFindFrom1x3; + (fromIndex: lodash.__, collection: lodash.List | null | undefined): LodashFindFrom1x5; + (fromIndex: number, collection: lodash.List | null | undefined): S|undefined; + } + interface LodashFindFrom1x2 { + (predicate: lodash.ValueIteratorTypeGuard): LodashFindFrom1x3; + (predicate: lodash.__, collection: lodash.List | null | undefined): LodashFindFrom1x6; + (predicate: lodash.ValueIteratorTypeGuard, collection: lodash.List | null | undefined): S|undefined; + (predicate: lodash.ValueIterateeCustom): LodashFindFrom2x3; + (predicate: lodash.ValueIterateeCustom, collection: lodash.List | null | undefined): T|undefined; + (predicate: lodash.ValueIteratorTypeGuard): LodashFindFrom3x3; + (predicate: lodash.__, collection: T | null | undefined): LodashFindFrom3x6; + (predicate: lodash.ValueIteratorTypeGuard, collection: T | null | undefined): S|undefined; + (predicate: lodash.ValueIterateeCustom, collection: T | null | undefined): T[keyof T]|undefined; + } + type LodashFindFrom1x3 = (collection: lodash.List | null | undefined) => S|undefined; + interface LodashFindFrom1x4 { + (predicate: lodash.ValueIteratorTypeGuard): LodashFindFrom1x5; + (predicate: lodash.__, fromIndex: number): LodashFindFrom1x6; + (predicate: lodash.ValueIteratorTypeGuard, fromIndex: number): S|undefined; + (predicate: lodash.ValueIterateeCustom): LodashFindFrom2x5; + (predicate: lodash.ValueIterateeCustom, fromIndex: number): T|undefined; + } + type LodashFindFrom1x5 = (fromIndex: number) => S|undefined; + interface LodashFindFrom1x6 { + (predicate: lodash.ValueIteratorTypeGuard): S|undefined; + (predicate: lodash.ValueIterateeCustom): T|undefined; + } + interface LodashFindFrom2x1 { + (fromIndex: number): LodashFindFrom2x3; + (fromIndex: lodash.__, collection: lodash.List | null | undefined): LodashFindFrom2x5; + (fromIndex: number, collection: lodash.List | object | null | undefined): T|undefined; + (fromIndex: lodash.__, collection: T1 | null | undefined): LodashFindFrom4x5; + } + interface LodashFindFrom2x3 { + (collection: lodash.List | null | undefined): T|undefined; + (collection: object | null | undefined): object|undefined; + } + type LodashFindFrom2x5 = (fromIndex: number) => T|undefined; + interface LodashFindFrom3x1 { + (fromIndex: number): LodashFindFrom3x3; + (fromIndex: lodash.__, collection: T | null | undefined): LodashFindFrom3x5; + (fromIndex: number, collection: T | null | undefined): S|undefined; + } + type LodashFindFrom3x3 = (collection: T | null | undefined) => S|undefined; + interface LodashFindFrom3x4 { + (predicate: lodash.ValueIteratorTypeGuard): LodashFindFrom3x5; + (predicate: lodash.__, fromIndex: number): LodashFindFrom3x6; + (predicate: lodash.ValueIteratorTypeGuard, fromIndex: number): S|undefined; + (predicate: lodash.ValueIterateeCustom): LodashFindFrom4x5; + (predicate: lodash.ValueIterateeCustom, fromIndex: number): T[keyof T]|undefined; + } + type LodashFindFrom3x5 = (fromIndex: number) => S|undefined; + interface LodashFindFrom3x6 { + (predicate: lodash.ValueIteratorTypeGuard): S|undefined; + (predicate: lodash.ValueIterateeCustom): T[keyof T]|undefined; + } + type LodashFindFrom4x5 = (fromIndex: number) => T[keyof T]|undefined; + interface LodashFindIndex { + (predicate: lodash.ValueIterateeCustom): LodashFindIndex1x1; + (predicate: lodash.__, array: lodash.List | null | undefined): LodashFindIndex1x2; + (predicate: lodash.ValueIterateeCustom, array: lodash.List | null | undefined): number; + } + type LodashFindIndex1x1 = (array: lodash.List | null | undefined) => number; + type LodashFindIndex1x2 = (predicate: lodash.ValueIterateeCustom) => number; + interface LodashFindIndexFrom { + (predicate: lodash.ValueIterateeCustom): LodashFindIndexFrom1x1; + (predicate: lodash.__, fromIndex: number): LodashFindIndexFrom1x2; + (predicate: lodash.ValueIterateeCustom, fromIndex: number): LodashFindIndexFrom1x3; + (predicate: lodash.__, fromIndex: lodash.__, array: lodash.List | null | undefined): LodashFindIndexFrom1x4; + (predicate: lodash.ValueIterateeCustom, fromIndex: lodash.__, array: lodash.List | null | undefined): LodashFindIndexFrom1x5; + (predicate: lodash.__, fromIndex: number, array: lodash.List | null | undefined): LodashFindIndexFrom1x6; + (predicate: lodash.ValueIterateeCustom, fromIndex: number, array: lodash.List | null | undefined): number; + } + interface LodashFindIndexFrom1x1 { + (fromIndex: number): LodashFindIndexFrom1x3; + (fromIndex: lodash.__, array: lodash.List | null | undefined): LodashFindIndexFrom1x5; + (fromIndex: number, array: lodash.List | null | undefined): number; + } + interface LodashFindIndexFrom1x2 { + (predicate: lodash.ValueIterateeCustom): LodashFindIndexFrom1x3; + (predicate: lodash.__, array: lodash.List | null | undefined): LodashFindIndexFrom1x6; + (predicate: lodash.ValueIterateeCustom, array: lodash.List | null | undefined): number; + } + type LodashFindIndexFrom1x3 = (array: lodash.List | null | undefined) => number; + interface LodashFindIndexFrom1x4 { + (predicate: lodash.ValueIterateeCustom): LodashFindIndexFrom1x5; + (predicate: lodash.__, fromIndex: number): LodashFindIndexFrom1x6; + (predicate: lodash.ValueIterateeCustom, fromIndex: number): number; + } + type LodashFindIndexFrom1x5 = (fromIndex: number) => number; + type LodashFindIndexFrom1x6 = (predicate: lodash.ValueIterateeCustom) => number; + interface LodashFindKey { + (predicate: lodash.ValueIteratee): LodashFindKey1x1; + (predicate: lodash.__, object: T | null | undefined): LodashFindKey1x2; + (predicate: lodash.ValueIteratee, object: T | null | undefined): string | undefined; + } + type LodashFindKey1x1 = (object: object | null | undefined) => string | undefined; + type LodashFindKey1x2 = (predicate: lodash.ValueIteratee) => string | undefined; + interface LodashFindLast { + (predicate: lodash.ValueIteratorTypeGuard): LodashFindLast1x1; + (predicate: lodash.__, collection: lodash.List | null | undefined): LodashFindLast1x2; + (predicate: lodash.ValueIteratorTypeGuard, collection: lodash.List | null | undefined): S|undefined; + (predicate: lodash.ValueIterateeCustom): LodashFindLast2x1; + (predicate: lodash.ValueIterateeCustom, collection: lodash.List | null | undefined): T|undefined; + (predicate: lodash.ValueIteratorTypeGuard): LodashFindLast3x1; + (predicate: lodash.__, collection: T | null | undefined): LodashFindLast3x2; + (predicate: lodash.ValueIteratorTypeGuard, collection: T | null | undefined): S|undefined; + (predicate: lodash.ValueIterateeCustom, collection: T | null | undefined): T[keyof T]|undefined; + } + type LodashFindLast1x1 = (collection: lodash.List | null | undefined) => S|undefined; + interface LodashFindLast1x2 { + (predicate: lodash.ValueIteratorTypeGuard): S|undefined; + (predicate: lodash.ValueIterateeCustom): T|undefined; + } + type LodashFindLast2x1 = (collection: lodash.List | object | null | undefined) => T|undefined; + type LodashFindLast3x1 = (collection: T | null | undefined) => S|undefined; + interface LodashFindLast3x2 { + (predicate: lodash.ValueIteratorTypeGuard): S|undefined; + (predicate: lodash.ValueIterateeCustom): T[keyof T]|undefined; + } + interface LodashFindLastFrom { + (predicate: lodash.ValueIteratorTypeGuard): LodashFindLastFrom1x1; + (predicate: lodash.__, fromIndex: number): LodashFindLastFrom1x2; + (predicate: lodash.ValueIteratorTypeGuard, fromIndex: number): LodashFindLastFrom1x3; + (predicate: lodash.__, fromIndex: lodash.__, collection: lodash.List | null | undefined): LodashFindLastFrom1x4; + (predicate: lodash.ValueIteratorTypeGuard, fromIndex: lodash.__, collection: lodash.List | null | undefined): LodashFindLastFrom1x5; + (predicate: lodash.__, fromIndex: number, collection: lodash.List | null | undefined): LodashFindLastFrom1x6; + (predicate: lodash.ValueIteratorTypeGuard, fromIndex: number, collection: lodash.List | null | undefined): S|undefined; + (predicate: lodash.ValueIterateeCustom): LodashFindLastFrom2x1; + (predicate: lodash.ValueIterateeCustom, fromIndex: number): LodashFindLastFrom2x3; + (predicate: lodash.ValueIterateeCustom, fromIndex: lodash.__, collection: lodash.List | null | undefined): LodashFindLastFrom2x5; + (predicate: lodash.ValueIterateeCustom, fromIndex: number, collection: lodash.List | null | undefined): T|undefined; + (predicate: lodash.ValueIteratorTypeGuard): LodashFindLastFrom3x1; + (predicate: lodash.ValueIteratorTypeGuard, fromIndex: number): LodashFindLastFrom3x3; + (predicate: lodash.__, fromIndex: lodash.__, collection: T | null | undefined): LodashFindLastFrom3x4; + (predicate: lodash.ValueIteratorTypeGuard, fromIndex: lodash.__, collection: T | null | undefined): LodashFindLastFrom3x5; + (predicate: lodash.__, fromIndex: number, collection: T | null | undefined): LodashFindLastFrom3x6; + (predicate: lodash.ValueIteratorTypeGuard, fromIndex: number, collection: T | null | undefined): S|undefined; + (predicate: lodash.ValueIterateeCustom, fromIndex: lodash.__, collection: T | null | undefined): LodashFindLastFrom4x5; + (predicate: lodash.ValueIterateeCustom, fromIndex: number, collection: T | null | undefined): T[keyof T]|undefined; + } + interface LodashFindLastFrom1x1 { + (fromIndex: number): LodashFindLastFrom1x3; + (fromIndex: lodash.__, collection: lodash.List | null | undefined): LodashFindLastFrom1x5; + (fromIndex: number, collection: lodash.List | null | undefined): S|undefined; + } + interface LodashFindLastFrom1x2 { + (predicate: lodash.ValueIteratorTypeGuard): LodashFindLastFrom1x3; + (predicate: lodash.__, collection: lodash.List | null | undefined): LodashFindLastFrom1x6; + (predicate: lodash.ValueIteratorTypeGuard, collection: lodash.List | null | undefined): S|undefined; + (predicate: lodash.ValueIterateeCustom): LodashFindLastFrom2x3; + (predicate: lodash.ValueIterateeCustom, collection: lodash.List | null | undefined): T|undefined; + (predicate: lodash.ValueIteratorTypeGuard): LodashFindLastFrom3x3; + (predicate: lodash.__, collection: T | null | undefined): LodashFindLastFrom3x6; + (predicate: lodash.ValueIteratorTypeGuard, collection: T | null | undefined): S|undefined; + (predicate: lodash.ValueIterateeCustom, collection: T | null | undefined): T[keyof T]|undefined; + } + type LodashFindLastFrom1x3 = (collection: lodash.List | null | undefined) => S|undefined; + interface LodashFindLastFrom1x4 { + (predicate: lodash.ValueIteratorTypeGuard): LodashFindLastFrom1x5; + (predicate: lodash.__, fromIndex: number): LodashFindLastFrom1x6; + (predicate: lodash.ValueIteratorTypeGuard, fromIndex: number): S|undefined; + (predicate: lodash.ValueIterateeCustom): LodashFindLastFrom2x5; + (predicate: lodash.ValueIterateeCustom, fromIndex: number): T|undefined; + } + type LodashFindLastFrom1x5 = (fromIndex: number) => S|undefined; + interface LodashFindLastFrom1x6 { + (predicate: lodash.ValueIteratorTypeGuard): S|undefined; + (predicate: lodash.ValueIterateeCustom): T|undefined; + } + interface LodashFindLastFrom2x1 { + (fromIndex: number): LodashFindLastFrom2x3; + (fromIndex: lodash.__, collection: lodash.List | null | undefined): LodashFindLastFrom2x5; + (fromIndex: number, collection: lodash.List | object | null | undefined): T|undefined; + (fromIndex: lodash.__, collection: T1 | null | undefined): LodashFindLastFrom4x5; + } + interface LodashFindLastFrom2x3 { + (collection: lodash.List | null | undefined): T|undefined; + (collection: object | null | undefined): object|undefined; + } + type LodashFindLastFrom2x5 = (fromIndex: number) => T|undefined; + interface LodashFindLastFrom3x1 { + (fromIndex: number): LodashFindLastFrom3x3; + (fromIndex: lodash.__, collection: T | null | undefined): LodashFindLastFrom3x5; + (fromIndex: number, collection: T | null | undefined): S|undefined; + } + type LodashFindLastFrom3x3 = (collection: T | null | undefined) => S|undefined; + interface LodashFindLastFrom3x4 { + (predicate: lodash.ValueIteratorTypeGuard): LodashFindLastFrom3x5; + (predicate: lodash.__, fromIndex: number): LodashFindLastFrom3x6; + (predicate: lodash.ValueIteratorTypeGuard, fromIndex: number): S|undefined; + (predicate: lodash.ValueIterateeCustom): LodashFindLastFrom4x5; + (predicate: lodash.ValueIterateeCustom, fromIndex: number): T[keyof T]|undefined; + } + type LodashFindLastFrom3x5 = (fromIndex: number) => S|undefined; + interface LodashFindLastFrom3x6 { + (predicate: lodash.ValueIteratorTypeGuard): S|undefined; + (predicate: lodash.ValueIterateeCustom): T[keyof T]|undefined; + } + type LodashFindLastFrom4x5 = (fromIndex: number) => T[keyof T]|undefined; + interface LodashFindLastIndex { + (predicate: lodash.ValueIterateeCustom): LodashFindLastIndex1x1; + (predicate: lodash.__, array: lodash.List | null | undefined): LodashFindLastIndex1x2; + (predicate: lodash.ValueIterateeCustom, array: lodash.List | null | undefined): number; + } + type LodashFindLastIndex1x1 = (array: lodash.List | null | undefined) => number; + type LodashFindLastIndex1x2 = (predicate: lodash.ValueIterateeCustom) => number; + interface LodashFindLastIndexFrom { + (predicate: lodash.ValueIterateeCustom): LodashFindLastIndexFrom1x1; + (predicate: lodash.__, fromIndex: number): LodashFindLastIndexFrom1x2; + (predicate: lodash.ValueIterateeCustom, fromIndex: number): LodashFindLastIndexFrom1x3; + (predicate: lodash.__, fromIndex: lodash.__, array: lodash.List | null | undefined): LodashFindLastIndexFrom1x4; + (predicate: lodash.ValueIterateeCustom, fromIndex: lodash.__, array: lodash.List | null | undefined): LodashFindLastIndexFrom1x5; + (predicate: lodash.__, fromIndex: number, array: lodash.List | null | undefined): LodashFindLastIndexFrom1x6; + (predicate: lodash.ValueIterateeCustom, fromIndex: number, array: lodash.List | null | undefined): number; + } + interface LodashFindLastIndexFrom1x1 { + (fromIndex: number): LodashFindLastIndexFrom1x3; + (fromIndex: lodash.__, array: lodash.List | null | undefined): LodashFindLastIndexFrom1x5; + (fromIndex: number, array: lodash.List | null | undefined): number; + } + interface LodashFindLastIndexFrom1x2 { + (predicate: lodash.ValueIterateeCustom): LodashFindLastIndexFrom1x3; + (predicate: lodash.__, array: lodash.List | null | undefined): LodashFindLastIndexFrom1x6; + (predicate: lodash.ValueIterateeCustom, array: lodash.List | null | undefined): number; + } + type LodashFindLastIndexFrom1x3 = (array: lodash.List | null | undefined) => number; + interface LodashFindLastIndexFrom1x4 { + (predicate: lodash.ValueIterateeCustom): LodashFindLastIndexFrom1x5; + (predicate: lodash.__, fromIndex: number): LodashFindLastIndexFrom1x6; + (predicate: lodash.ValueIterateeCustom, fromIndex: number): number; + } + type LodashFindLastIndexFrom1x5 = (fromIndex: number) => number; + type LodashFindLastIndexFrom1x6 = (predicate: lodash.ValueIterateeCustom) => number; + interface LodashFindLastKey { + (predicate: lodash.ValueIteratee): LodashFindLastKey1x1; + (predicate: lodash.__, object: T | null | undefined): LodashFindLastKey1x2; + (predicate: lodash.ValueIteratee, object: T | null | undefined): string | undefined; + } + type LodashFindLastKey1x1 = (object: object | null | undefined) => string | undefined; + type LodashFindLastKey1x2 = (predicate: lodash.ValueIteratee) => string | undefined; + type LodashHead = (array: lodash.List | null | undefined) => T | undefined; + interface LodashFlatMap { + (iteratee: (value: T) => lodash.Many): LodashFlatMap1x1; + (iteratee: lodash.__, collection: lodash.List | null | undefined): LodashFlatMap1x2; + (iteratee: (value: T) => lodash.Many, collection: lodash.List | null | undefined): TResult[]; + (iteratee: (value: T[keyof T]) => lodash.Many): LodashFlatMap2x1; + (iteratee: lodash.__, collection: T | null | undefined): LodashFlatMap2x2; + (iteratee: (value: T[keyof T]) => lodash.Many, collection: T | null | undefined): TResult[]; + (iteratee: string): LodashFlatMap3x1; + (iteratee: lodash.__, collection: object | null | undefined): LodashFlatMap3x2; + (iteratee: string, collection: object | null | undefined): any[]; + (iteratee: object): LodashFlatMap4x1; + (iteratee: object, collection: object | null | undefined): boolean[]; + } + type LodashFlatMap1x1 = (collection: lodash.List | null | undefined) => TResult[]; + type LodashFlatMap1x2 = (iteratee: (value: T) => lodash.Many) => TResult[]; + type LodashFlatMap2x1 = (collection: T | null | undefined) => TResult[]; + type LodashFlatMap2x2 = (iteratee: (value: T[keyof T]) => lodash.Many) => TResult[]; + type LodashFlatMap3x1 = (collection: object | null | undefined) => any[]; + interface LodashFlatMap3x2 { + (iteratee: string): any[]; + (iteratee: object): boolean[]; + } + type LodashFlatMap4x1 = (collection: object | null | undefined) => boolean[]; + interface LodashFlatMapDeep { + (iteratee: (value: T) => lodash.ListOfRecursiveArraysOrValues | TResult): LodashFlatMapDeep1x1; + (iteratee: lodash.__, collection: lodash.List | null | undefined): LodashFlatMapDeep1x2; + (iteratee: (value: T) => lodash.ListOfRecursiveArraysOrValues | TResult, collection: lodash.List | null | undefined): TResult[]; + (iteratee: (value: T[keyof T]) => lodash.ListOfRecursiveArraysOrValues | TResult): LodashFlatMapDeep2x1; + (iteratee: lodash.__, collection: T | null | undefined): LodashFlatMapDeep2x2; + (iteratee: (value: T[keyof T]) => lodash.ListOfRecursiveArraysOrValues | TResult, collection: T | null | undefined): TResult[]; + (iteratee: string): LodashFlatMapDeep3x1; + (iteratee: lodash.__, collection: object | null | undefined): LodashFlatMapDeep3x2; + (iteratee: string, collection: object | null | undefined): any[]; + (iteratee: object): LodashFlatMapDeep4x1; + (iteratee: object, collection: object | null | undefined): boolean[]; + } + type LodashFlatMapDeep1x1 = (collection: lodash.List | null | undefined) => TResult[]; + type LodashFlatMapDeep1x2 = (iteratee: (value: T) => lodash.ListOfRecursiveArraysOrValues | TResult) => TResult[]; + type LodashFlatMapDeep2x1 = (collection: T | null | undefined) => TResult[]; + type LodashFlatMapDeep2x2 = (iteratee: (value: T[keyof T]) => lodash.ListOfRecursiveArraysOrValues | TResult) => TResult[]; + type LodashFlatMapDeep3x1 = (collection: object | null | undefined) => any[]; + interface LodashFlatMapDeep3x2 { + (iteratee: string): any[]; + (iteratee: object): boolean[]; + } + type LodashFlatMapDeep4x1 = (collection: object | null | undefined) => boolean[]; + interface LodashFlatMapDepth { + (iteratee: (value: T) => lodash.ListOfRecursiveArraysOrValues | TResult): LodashFlatMapDepth1x1; + (iteratee: lodash.__, depth: number): LodashFlatMapDepth1x2; + (iteratee: (value: T) => lodash.ListOfRecursiveArraysOrValues | TResult, depth: number): LodashFlatMapDepth1x3; + (iteratee: lodash.__, depth: lodash.__, collection: lodash.List | null | undefined): LodashFlatMapDepth1x4; + (iteratee: (value: T) => lodash.ListOfRecursiveArraysOrValues | TResult, depth: lodash.__, collection: lodash.List | null | undefined): LodashFlatMapDepth1x5; + (iteratee: lodash.__, depth: number, collection: lodash.List | null | undefined): LodashFlatMapDepth1x6; + (iteratee: (value: T) => lodash.ListOfRecursiveArraysOrValues | TResult, depth: number, collection: lodash.List | null | undefined): TResult[]; + (iteratee: (value: T[keyof T]) => lodash.ListOfRecursiveArraysOrValues | TResult): LodashFlatMapDepth2x1; + (iteratee: (value: T[keyof T]) => lodash.ListOfRecursiveArraysOrValues | TResult, depth: number): LodashFlatMapDepth2x3; + (iteratee: lodash.__, depth: lodash.__, collection: T | null | undefined): LodashFlatMapDepth2x4; + (iteratee: (value: T[keyof T]) => lodash.ListOfRecursiveArraysOrValues | TResult, depth: lodash.__, collection: T | null | undefined): LodashFlatMapDepth2x5; + (iteratee: lodash.__, depth: number, collection: T | null | undefined): LodashFlatMapDepth2x6; + (iteratee: (value: T[keyof T]) => lodash.ListOfRecursiveArraysOrValues | TResult, depth: number, collection: T | null | undefined): TResult[]; + (iteratee: string): LodashFlatMapDepth3x1; + (iteratee: string, depth: number): LodashFlatMapDepth3x3; + (iteratee: lodash.__, depth: lodash.__, collection: object | null | undefined): LodashFlatMapDepth3x4; + (iteratee: string, depth: lodash.__, collection: object | null | undefined): LodashFlatMapDepth3x5; + (iteratee: lodash.__, depth: number, collection: object | null | undefined): LodashFlatMapDepth3x6; + (iteratee: string, depth: number, collection: object | null | undefined): any[]; + (iteratee: object): LodashFlatMapDepth4x1; + (iteratee: object, depth: number): LodashFlatMapDepth4x3; + (iteratee: object, depth: lodash.__, collection: object | null | undefined): LodashFlatMapDepth4x5; + (iteratee: object, depth: number, collection: object | null | undefined): boolean[]; + } + interface LodashFlatMapDepth1x1 { + (depth: number): LodashFlatMapDepth1x3; + (depth: lodash.__, collection: lodash.List | null | undefined): LodashFlatMapDepth1x5; + (depth: number, collection: lodash.List | null | undefined): TResult[]; + } + interface LodashFlatMapDepth1x2 { + (iteratee: (value: T) => lodash.ListOfRecursiveArraysOrValues | TResult): LodashFlatMapDepth1x3; + (iteratee: lodash.__, collection: lodash.List | null | undefined): LodashFlatMapDepth1x6; + (iteratee: (value: T) => lodash.ListOfRecursiveArraysOrValues | TResult, collection: lodash.List | null | undefined): TResult[]; + (iteratee: (value: T[keyof T]) => lodash.ListOfRecursiveArraysOrValues | TResult): LodashFlatMapDepth2x3; + (iteratee: lodash.__, collection: T | null | undefined): LodashFlatMapDepth2x6; + (iteratee: (value: T[keyof T]) => lodash.ListOfRecursiveArraysOrValues | TResult, collection: T | null | undefined): TResult[]; + (iteratee: string): LodashFlatMapDepth3x3; + (iteratee: lodash.__, collection: object | null | undefined): LodashFlatMapDepth3x6; + (iteratee: string, collection: object | null | undefined): any[]; + (iteratee: object): LodashFlatMapDepth4x3; + (iteratee: object, collection: object | null | undefined): boolean[]; + } + type LodashFlatMapDepth1x3 = (collection: lodash.List | null | undefined) => TResult[]; + interface LodashFlatMapDepth1x4 { + (iteratee: (value: T) => lodash.ListOfRecursiveArraysOrValues | TResult): LodashFlatMapDepth1x5; + (iteratee: lodash.__, depth: number): LodashFlatMapDepth1x6; + (iteratee: (value: T) => lodash.ListOfRecursiveArraysOrValues | TResult, depth: number): TResult[]; + } + type LodashFlatMapDepth1x5 = (depth: number) => TResult[]; + type LodashFlatMapDepth1x6 = (iteratee: (value: T) => lodash.ListOfRecursiveArraysOrValues | TResult) => TResult[]; + interface LodashFlatMapDepth2x1 { + (depth: number): LodashFlatMapDepth2x3; + (depth: lodash.__, collection: T | null | undefined): LodashFlatMapDepth2x5; + (depth: number, collection: T | null | undefined): TResult[]; + } + type LodashFlatMapDepth2x3 = (collection: T | null | undefined) => TResult[]; + interface LodashFlatMapDepth2x4 { + (iteratee: (value: T[keyof T]) => lodash.ListOfRecursiveArraysOrValues | TResult): LodashFlatMapDepth2x5; + (iteratee: lodash.__, depth: number): LodashFlatMapDepth2x6; + (iteratee: (value: T[keyof T]) => lodash.ListOfRecursiveArraysOrValues | TResult, depth: number): TResult[]; + } + type LodashFlatMapDepth2x5 = (depth: number) => TResult[]; + type LodashFlatMapDepth2x6 = (iteratee: (value: T[keyof T]) => lodash.ListOfRecursiveArraysOrValues | TResult) => TResult[]; + interface LodashFlatMapDepth3x1 { + (depth: number): LodashFlatMapDepth3x3; + (depth: lodash.__, collection: object | null | undefined): LodashFlatMapDepth3x5; + (depth: number, collection: object | null | undefined): any[]; + } + type LodashFlatMapDepth3x3 = (collection: object | null | undefined) => any[]; + interface LodashFlatMapDepth3x4 { + (iteratee: string): LodashFlatMapDepth3x5; + (iteratee: lodash.__, depth: number): LodashFlatMapDepth3x6; + (iteratee: string, depth: number): any[]; + (iteratee: object): LodashFlatMapDepth4x5; + (iteratee: object, depth: number): boolean[]; + } + type LodashFlatMapDepth3x5 = (depth: number) => any[]; + interface LodashFlatMapDepth3x6 { + (iteratee: string): any[]; + (iteratee: object): boolean[]; + } + interface LodashFlatMapDepth4x1 { + (depth: number): LodashFlatMapDepth4x3; + (depth: lodash.__, collection: object | null | undefined): LodashFlatMapDepth4x5; + (depth: number, collection: object | null | undefined): boolean[]; + } + type LodashFlatMapDepth4x3 = (collection: object | null | undefined) => boolean[]; + type LodashFlatMapDepth4x5 = (depth: number) => boolean[]; + type LodashFlatten = (array: lodash.List> | null | undefined) => T[]; + type LodashFlattenDeep = (array: lodash.ListOfRecursiveArraysOrValues | null | undefined) => T[]; + interface LodashFlattenDepth { + (depth: number): LodashFlattenDepth1x1; + (depth: lodash.__, array: lodash.ListOfRecursiveArraysOrValues | null | undefined): LodashFlattenDepth1x2; + (depth: number, array: lodash.ListOfRecursiveArraysOrValues | null | undefined): T[]; + } + type LodashFlattenDepth1x1 = (array: lodash.ListOfRecursiveArraysOrValues | null | undefined) => T[]; + type LodashFlattenDepth1x2 = (depth: number) => T[]; + type LodashFlip = any>(func: T) => T; + type LodashFloor = (n: number) => number; + interface LodashFlow { + (f1: () => R1, f2: (a: R1) => R2): () => R2; + (f1: () => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): () => R3; + (f1: () => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): () => R4; + (f1: () => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): () => R5; + (f1: () => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): () => R6; + (f1: () => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): () => R7; + (f1: () => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7, ...funcs: Array any>>): () => any; + (f1: (a1: A1) => R1, f2: (a: R1) => R2): (a1: A1) => R2; + (f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1) => R3; + (f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1) => R4; + (f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1) => R5; + (f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1) => R6; + (f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1) => R7; + (f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7, ...funcs: Array any>>): (a1: A1) => any; + (f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2): (a1: A1, a2: A2) => R2; + (f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1, a2: A2) => R3; + (f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1, a2: A2) => R4; + (f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1, a2: A2) => R5; + (f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1, a2: A2) => R6; + (f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1, a2: A2) => R7; + (f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7, ...funcs: Array any>>): (a1: A1, a2: A2) => any; + (f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2): (a1: A1, a2: A2, a3: A3) => R2; + (f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1, a2: A2, a3: A3) => R3; + (f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1, a2: A2, a3: A3) => R4; + (f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1, a2: A2, a3: A3) => R5; + (f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1, a2: A2, a3: A3) => R6; + (f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1, a2: A2, a3: A3) => R7; + (f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7, ...funcs: Array any>>): (a1: A1, a2: A2, a3: A3) => any; + (f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2): (a1: A1, a2: A2, a3: A3, a4: A4) => R2; + (f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1, a2: A2, a3: A3, a4: A4) => R3; + (f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1, a2: A2, a3: A3, a4: A4) => R4; + (f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1, a2: A2, a3: A3, a4: A4) => R5; + (f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1, a2: A2, a3: A3, a4: A4) => R6; + (f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1, a2: A2, a3: A3, a4: A4) => R7; + (f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7, ...funcs: Array any>>): (a1: A1, a2: A2, a3: A3, a4: A4) => any; + (f1: (a1: A1, a2: A2, a3: A3, a4: A4, ...args: any[]) => R1, f2: (a: R1) => R2): (a1: A1, a2: A2, a3: A3, a4: A4, ...args: any[]) => R2; + (f1: (a1: A1, a2: A2, a3: A3, a4: A4, ...args: any[]) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1, a2: A2, a3: A3, a4: A4, ...args: any[]) => R3; + (f1: (a1: A1, a2: A2, a3: A3, a4: A4, ...args: any[]) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1, a2: A2, a3: A3, a4: A4, ...args: any[]) => R4; + (f1: (a1: A1, a2: A2, a3: A3, a4: A4, ...args: any[]) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1, a2: A2, a3: A3, a4: A4, ...args: any[]) => R5; + (f1: (a1: A1, a2: A2, a3: A3, a4: A4, ...args: any[]) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1, a2: A2, a3: A3, a4: A4, ...args: any[]) => R6; + (f1: (a1: A1, a2: A2, a3: A3, a4: A4, ...args: any[]) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1, a2: A2, a3: A3, a4: A4, ...args: any[]) => R7; + (f1: (a1: A1, a2: A2, a3: A3, a4: A4, ...args: any[]) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7, ...funcs: Array any>>): (a1: A1, a2: A2, a3: A3, a4: A4, ...args: any[]) => any; + (funcs: Array any>>): (...args: any[]) => any; + } + interface LodashForIn { + (iteratee: (value: T) => any): LodashForIn1x1; + (iteratee: lodash.__, object: T): LodashForIn1x2; + (iteratee: (value: T[keyof T]) => any, object: T): T; + (iteratee: lodash.__, object: T | null | undefined): LodashForIn2x2; + (iteratee: (value: T[keyof T]) => any, object: T | null | undefined): T | null | undefined; + } + interface LodashForIn1x1 { + (object: T1): T1; + (object: T1 | null | undefined): T1 | null | undefined; + } + type LodashForIn1x2 = (iteratee: (value: T[keyof T]) => any) => T; + type LodashForIn2x2 = (iteratee: (value: T[keyof T]) => any) => T | null | undefined; + interface LodashForInRight { + (iteratee: (value: T) => any): LodashForInRight1x1; + (iteratee: lodash.__, object: T): LodashForInRight1x2; + (iteratee: (value: T[keyof T]) => any, object: T): T; + (iteratee: lodash.__, object: T | null | undefined): LodashForInRight2x2; + (iteratee: (value: T[keyof T]) => any, object: T | null | undefined): T | null | undefined; + } + interface LodashForInRight1x1 { + (object: T1): T1; + (object: T1 | null | undefined): T1 | null | undefined; + } + type LodashForInRight1x2 = (iteratee: (value: T[keyof T]) => any) => T; + type LodashForInRight2x2 = (iteratee: (value: T[keyof T]) => any) => T | null | undefined; + interface LodashForOwn { + (iteratee: (value: T) => any): LodashForOwn1x1; + (iteratee: lodash.__, object: T): LodashForOwn1x2; + (iteratee: (value: T[keyof T]) => any, object: T): T; + (iteratee: lodash.__, object: T | null | undefined): LodashForOwn2x2; + (iteratee: (value: T[keyof T]) => any, object: T | null | undefined): T | null | undefined; + } + interface LodashForOwn1x1 { + (object: T1): T1; + (object: T1 | null | undefined): T1 | null | undefined; + } + type LodashForOwn1x2 = (iteratee: (value: T[keyof T]) => any) => T; + type LodashForOwn2x2 = (iteratee: (value: T[keyof T]) => any) => T | null | undefined; + interface LodashForOwnRight { + (iteratee: (value: T) => any): LodashForOwnRight1x1; + (iteratee: lodash.__, object: T): LodashForOwnRight1x2; + (iteratee: (value: T[keyof T]) => any, object: T): T; + (iteratee: lodash.__, object: T | null | undefined): LodashForOwnRight2x2; + (iteratee: (value: T[keyof T]) => any, object: T | null | undefined): T | null | undefined; + } + interface LodashForOwnRight1x1 { + (object: T1): T1; + (object: T1 | null | undefined): T1 | null | undefined; + } + type LodashForOwnRight1x2 = (iteratee: (value: T[keyof T]) => any) => T; + type LodashForOwnRight2x2 = (iteratee: (value: T[keyof T]) => any) => T | null | undefined; + interface LodashFromPairs { + (pairs: lodash.List<[lodash.PropertyName, T]> | null | undefined): lodash.Dictionary; + (pairs: lodash.List | null | undefined): lodash.Dictionary; + } + type LodashFunctions = (object: any) => string[]; + type LodashFunctionsIn = (object: any) => string[]; + interface LodashGet { + (path: TKey | [TKey]): LodashGet1x1; + (path: lodash.__, object: TObject): LodashGet1x2; + (path: TKey | [TKey], object: TObject): TObject[TKey]; + (path: lodash.__, object: TObject | null | undefined): LodashGet2x2; + (path: TKey | [TKey], object: TObject | null | undefined): TObject[TKey] | undefined; + (path: number): LodashGet3x1; + (path: lodash.__, object: lodash.NumericDictionary): LodashGet3x2; + (path: number, object: lodash.NumericDictionary): T; + (path: lodash.__, object: lodash.NumericDictionary | null | undefined): LodashGet4x2; + (path: number, object: lodash.NumericDictionary | null | undefined): T | undefined; + (path: lodash.PropertyPath): LodashGet5x1; + (path: lodash.__, object: null | undefined): LodashGet5x2; + (path: lodash.PropertyPath, object: null | undefined): undefined; + (path: lodash.__, object: any): LodashGet6x2; + (path: lodash.PropertyPath, object: any): any; + } + interface LodashGet1x1 { + (object: TObject): TObject[TKey]; + (object: TObject | null | undefined): TObject[TKey] | undefined; + } + type LodashGet1x2 = (path: TKey | [TKey]) => TObject[TKey]; + type LodashGet2x2 = (path: TKey | [TKey]) => TObject[TKey] | undefined; + interface LodashGet3x1 { + (object: lodash.NumericDictionary): T; + (object: lodash.NumericDictionary | null | undefined): T | undefined; + } + type LodashGet3x2 = (path: number) => T; + type LodashGet4x2 = (path: number) => T | undefined; + interface LodashGet5x1 { + (object: null | undefined): undefined; + (object: any): any; + } + type LodashGet5x2 = (path: lodash.PropertyPath) => undefined; + type LodashGet6x2 = (path: lodash.PropertyPath) => any; + interface LodashGetOr { + (defaultValue: TDefault): LodashGetOr1x1; + (defaultValue: lodash.__, path: TKey | [TKey]): LodashGetOr1x2; + (defaultValue: TDefault, path: TKey | [TKey]): LodashGetOr1x3; + (defaultValue: lodash.__, path: lodash.__, object: TObject | null | undefined): LodashGetOr1x4; + (defaultValue: TDefault, path: lodash.__, object: TObject | null | undefined): LodashGetOr1x5; + (defaultValue: lodash.__, path: TKey | [TKey], object: TObject | null | undefined): LodashGetOr1x6; + (defaultValue: TDefault, path: TKey | [TKey], object: TObject | null | undefined): TObject[TKey] | TDefault; + (defaultValue: lodash.__, path: number): LodashGetOr2x2; + (defaultValue: TDefault, path: number): LodashGetOr2x3; + (defaultValue: lodash.__, path: lodash.__, object: lodash.NumericDictionary | null | undefined): LodashGetOr2x4; + (defaultValue: TDefault, path: lodash.__, object: lodash.NumericDictionary | null | undefined): LodashGetOr2x5; + (defaultValue: lodash.__, path: number, object: lodash.NumericDictionary | null | undefined): LodashGetOr2x6; + (defaultValue: TDefault, path: number, object: lodash.NumericDictionary | null | undefined): T | TDefault; + (defaultValue: lodash.__, path: lodash.PropertyPath): LodashGetOr3x2; + (defaultValue: TDefault, path: lodash.PropertyPath): LodashGetOr3x3; + (defaultValue: lodash.__, path: lodash.__, object: null | undefined): LodashGetOr3x4; + (defaultValue: TDefault, path: lodash.__, object: null | undefined): LodashGetOr3x5; + (defaultValue: lodash.__, path: lodash.PropertyPath, object: null | undefined): LodashGetOr3x6; + (defaultValue: TDefault, path: lodash.PropertyPath, object: null | undefined): TDefault; + (defaultValue: any): LodashGetOr4x1; + (defaultValue: any, path: lodash.PropertyPath): LodashGetOr4x3; + (defaultValue: lodash.__, path: lodash.__, object: any): LodashGetOr4x4; + (defaultValue: any, path: lodash.__, object: any): LodashGetOr4x5; + (defaultValue: lodash.__, path: lodash.PropertyPath, object: any): LodashGetOr4x6; + (defaultValue: any, path: lodash.PropertyPath, object: any): any; + } + interface LodashGetOr1x1 { + (path: TKey | [TKey]): LodashGetOr1x3; + (path: lodash.__, object: TObject | null | undefined): LodashGetOr1x5; + (path: TKey | [TKey], object: TObject | null | undefined): TObject[TKey] | TDefault; + (path: number): LodashGetOr2x3; + (path: lodash.__, object: lodash.NumericDictionary | null | undefined): LodashGetOr2x5; + (path: number, object: lodash.NumericDictionary | null | undefined): T | TDefault; + (path: lodash.PropertyPath): LodashGetOr3x3; + (path: lodash.__, object: null | undefined): LodashGetOr3x5; + (path: lodash.PropertyPath, object: null | undefined): TDefault; + } + interface LodashGetOr1x2 { + (defaultValue: TDefault): LodashGetOr1x3; + (defaultValue: lodash.__, object: TObject | null | undefined): LodashGetOr1x6; + (defaultValue: TDefault, object: TObject | null | undefined): TObject[TKey] | TDefault; + } + type LodashGetOr1x3 = (object: TObject | null | undefined) => TObject[TKey] | TDefault; + interface LodashGetOr1x4 { + (defaultValue: TDefault): LodashGetOr1x5; + (defaultValue: lodash.__, path: TKey | [TKey]): LodashGetOr1x6; + (defaultValue: TDefault, path: TKey | [TKey]): TObject[TKey] | TDefault; + } + type LodashGetOr1x5 = (path: TKey | [TKey]) => TObject[TKey] | TDefault; + type LodashGetOr1x6 = (defaultValue: TDefault) => TObject[TKey] | TDefault; + interface LodashGetOr2x2 { + (defaultValue: TDefault): LodashGetOr2x3; + (defaultValue: lodash.__, object: lodash.NumericDictionary | null | undefined): LodashGetOr2x6; + (defaultValue: TDefault, object: lodash.NumericDictionary | null | undefined): T | TDefault; + } + type LodashGetOr2x3 = (object: lodash.NumericDictionary | null | undefined) => T | TDefault; + interface LodashGetOr2x4 { + (defaultValue: TDefault): LodashGetOr2x5; + (defaultValue: lodash.__, path: number): LodashGetOr2x6; + (defaultValue: TDefault, path: number): T | TDefault; + } + type LodashGetOr2x5 = (path: number) => T | TDefault; + type LodashGetOr2x6 = (defaultValue: TDefault) => T | TDefault; + interface LodashGetOr3x2 { + (defaultValue: TDefault): LodashGetOr3x3; + (defaultValue: lodash.__, object: null | undefined): LodashGetOr3x6; + (defaultValue: TDefault, object: null | undefined): TDefault; + (defaultValue: any): LodashGetOr4x3; + (defaultValue: lodash.__, object: any): LodashGetOr4x6; + (defaultValue: any, object: any): any; + } + type LodashGetOr3x3 = (object: null | undefined) => TDefault; + interface LodashGetOr3x4 { + (defaultValue: TDefault): LodashGetOr3x5; + (defaultValue: lodash.__, path: lodash.PropertyPath): LodashGetOr3x6; + (defaultValue: TDefault, path: lodash.PropertyPath): TDefault; + } + type LodashGetOr3x5 = (path: lodash.PropertyPath) => TDefault; + type LodashGetOr3x6 = (defaultValue: TDefault) => TDefault; + interface LodashGetOr4x1 { + (path: lodash.PropertyPath): LodashGetOr4x3; + (path: lodash.__, object: any): LodashGetOr4x5; + (path: lodash.PropertyPath, object: any): any; + } + type LodashGetOr4x3 = (object: any) => any; + interface LodashGetOr4x4 { + (defaultValue: any): LodashGetOr4x5; + (defaultValue: lodash.__, path: lodash.PropertyPath): LodashGetOr4x6; + (defaultValue: any, path: lodash.PropertyPath): any; + } + type LodashGetOr4x5 = (path: lodash.PropertyPath) => any; + type LodashGetOr4x6 = (defaultValue: any) => any; + interface LodashGroupBy { + (iteratee: (value: string) => lodash.NotVoid): LodashGroupBy1x1; + (iteratee: lodash.__, collection: string | null | undefined): LodashGroupBy1x2; + (iteratee: (value: string) => lodash.NotVoid, collection: string | null | undefined): lodash.Dictionary; + (iteratee: lodash.ValueIteratee): LodashGroupBy2x1; + (iteratee: lodash.__, collection: lodash.List | null | undefined): LodashGroupBy2x2; + (iteratee: lodash.ValueIteratee, collection: lodash.List | null | undefined): lodash.Dictionary; + (iteratee: lodash.__, collection: T | null | undefined): LodashGroupBy3x2; + (iteratee: lodash.ValueIteratee, collection: T | null | undefined): lodash.Dictionary>; + } + type LodashGroupBy1x1 = (collection: string | null | undefined) => lodash.Dictionary; + type LodashGroupBy1x2 = (iteratee: (value: string) => lodash.NotVoid) => lodash.Dictionary; + type LodashGroupBy2x1 = (collection: lodash.List | object | null | undefined) => lodash.Dictionary; + type LodashGroupBy2x2 = (iteratee: lodash.ValueIteratee) => lodash.Dictionary; + type LodashGroupBy3x2 = (iteratee: lodash.ValueIteratee) => lodash.Dictionary>; + interface LodashGt { + (value: any): LodashGt1x1; + (value: lodash.__, other: any): LodashGt1x2; + (value: any, other: any): boolean; + } + type LodashGt1x1 = (other: any) => boolean; + type LodashGt1x2 = (value: any) => boolean; + interface LodashGte { + (value: any): LodashGte1x1; + (value: lodash.__, other: any): LodashGte1x2; + (value: any, other: any): boolean; + } + type LodashGte1x1 = (other: any) => boolean; + type LodashGte1x2 = (value: any) => boolean; + interface LodashHas { + (path: lodash.PropertyPath): LodashHas1x1; + (path: lodash.__, object: T): LodashHas1x2; + (path: lodash.PropertyPath, object: T): boolean; + } + type LodashHas1x1 = (object: T) => boolean; + type LodashHas1x2 = (path: lodash.PropertyPath) => boolean; + interface LodashHasIn { + (path: lodash.PropertyPath): LodashHasIn1x1; + (path: lodash.__, object: T): LodashHasIn1x2; + (path: lodash.PropertyPath, object: T): boolean; + } + type LodashHasIn1x1 = (object: T) => boolean; + type LodashHasIn1x2 = (path: lodash.PropertyPath) => boolean; + interface LodashIdentity { + (value: T): T; + (): undefined; + } + interface LodashIncludes { + (target: T): LodashIncludes1x1; + (target: lodash.__, collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): LodashIncludes1x2; + (target: T, collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): boolean; + } + type LodashIncludes1x1 = (collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined) => boolean; + type LodashIncludes1x2 = (target: T) => boolean; + interface LodashIncludesFrom { + (target: T): LodashIncludesFrom1x1; + (target: lodash.__, fromIndex: number): LodashIncludesFrom1x2; + (target: T, fromIndex: number): LodashIncludesFrom1x3; + (target: lodash.__, fromIndex: lodash.__, collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): LodashIncludesFrom1x4; + (target: T, fromIndex: lodash.__, collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): LodashIncludesFrom1x5; + (target: lodash.__, fromIndex: number, collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): LodashIncludesFrom1x6; + (target: T, fromIndex: number, collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): boolean; + } + interface LodashIncludesFrom1x1 { + (fromIndex: number): LodashIncludesFrom1x3; + (fromIndex: lodash.__, collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): LodashIncludesFrom1x5; + (fromIndex: number, collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): boolean; + } + interface LodashIncludesFrom1x2 { + (target: T): LodashIncludesFrom1x3; + (target: lodash.__, collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): LodashIncludesFrom1x6; + (target: T, collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): boolean; + } + type LodashIncludesFrom1x3 = (collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined) => boolean; + interface LodashIncludesFrom1x4 { + (target: T): LodashIncludesFrom1x5; + (target: lodash.__, fromIndex: number): LodashIncludesFrom1x6; + (target: T, fromIndex: number): boolean; + } + type LodashIncludesFrom1x5 = (fromIndex: number) => boolean; + type LodashIncludesFrom1x6 = (target: T) => boolean; + interface LodashKeyBy { + (iteratee: (value: string) => lodash.PropertyName): LodashKeyBy1x1; + (iteratee: lodash.__, collection: string | null | undefined): LodashKeyBy1x2; + (iteratee: (value: string) => lodash.PropertyName, collection: string | null | undefined): lodash.Dictionary; + (iteratee: lodash.ValueIterateeCustom): LodashKeyBy2x1; + (iteratee: lodash.__, collection: lodash.List | null | undefined): LodashKeyBy2x2; + (iteratee: lodash.ValueIterateeCustom, collection: lodash.List | null | undefined): lodash.Dictionary; + (iteratee: lodash.__, collection: T | null | undefined): LodashKeyBy3x2; + (iteratee: lodash.ValueIterateeCustom, collection: T | null | undefined): lodash.Dictionary; + } + type LodashKeyBy1x1 = (collection: string | null | undefined) => lodash.Dictionary; + type LodashKeyBy1x2 = (iteratee: (value: string) => lodash.PropertyName) => lodash.Dictionary; + type LodashKeyBy2x1 = (collection: lodash.List | object | null | undefined) => lodash.Dictionary; + type LodashKeyBy2x2 = (iteratee: lodash.ValueIterateeCustom) => lodash.Dictionary; + type LodashKeyBy3x2 = (iteratee: lodash.ValueIterateeCustom) => lodash.Dictionary; + interface LodashIndexOf { + (value: T): LodashIndexOf1x1; + (value: lodash.__, array: lodash.List | null | undefined): LodashIndexOf1x2; + (value: T, array: lodash.List | null | undefined): number; + } + type LodashIndexOf1x1 = (array: lodash.List | null | undefined) => number; + type LodashIndexOf1x2 = (value: T) => number; + interface LodashIndexOfFrom { + (value: T): LodashIndexOfFrom1x1; + (value: lodash.__, fromIndex: number): LodashIndexOfFrom1x2; + (value: T, fromIndex: number): LodashIndexOfFrom1x3; + (value: lodash.__, fromIndex: lodash.__, array: lodash.List | null | undefined): LodashIndexOfFrom1x4; + (value: T, fromIndex: lodash.__, array: lodash.List | null | undefined): LodashIndexOfFrom1x5; + (value: lodash.__, fromIndex: number, array: lodash.List | null | undefined): LodashIndexOfFrom1x6; + (value: T, fromIndex: number, array: lodash.List | null | undefined): number; + } + interface LodashIndexOfFrom1x1 { + (fromIndex: number): LodashIndexOfFrom1x3; + (fromIndex: lodash.__, array: lodash.List | null | undefined): LodashIndexOfFrom1x5; + (fromIndex: number, array: lodash.List | null | undefined): number; + } + interface LodashIndexOfFrom1x2 { + (value: T): LodashIndexOfFrom1x3; + (value: lodash.__, array: lodash.List | null | undefined): LodashIndexOfFrom1x6; + (value: T, array: lodash.List | null | undefined): number; + } + type LodashIndexOfFrom1x3 = (array: lodash.List | null | undefined) => number; + interface LodashIndexOfFrom1x4 { + (value: T): LodashIndexOfFrom1x5; + (value: lodash.__, fromIndex: number): LodashIndexOfFrom1x6; + (value: T, fromIndex: number): number; + } + type LodashIndexOfFrom1x5 = (fromIndex: number) => number; + type LodashIndexOfFrom1x6 = (value: T) => number; + type LodashInitial = (array: lodash.List | null | undefined) => T[]; + interface LodashInRange { + (start: number): LodashInRange1x1; + (start: lodash.__, end: number): LodashInRange1x2; + (start: number, end: number): LodashInRange1x3; + (start: lodash.__, end: lodash.__, n: number): LodashInRange1x4; + (start: number, end: lodash.__, n: number): LodashInRange1x5; + (start: lodash.__, end: number, n: number): LodashInRange1x6; + (start: number, end: number, n: number): boolean; + } + interface LodashInRange1x1 { + (end: number): LodashInRange1x3; + (end: lodash.__, n: number): LodashInRange1x5; + (end: number, n: number): boolean; + } + interface LodashInRange1x2 { + (start: number): LodashInRange1x3; + (start: lodash.__, n: number): LodashInRange1x6; + (start: number, n: number): boolean; + } + type LodashInRange1x3 = (n: number) => boolean; + interface LodashInRange1x4 { + (start: number): LodashInRange1x5; + (start: lodash.__, end: number): LodashInRange1x6; + (start: number, end: number): boolean; + } + type LodashInRange1x5 = (end: number) => boolean; + type LodashInRange1x6 = (start: number) => boolean; + interface LodashIntersection { + (arrays2: lodash.List): LodashIntersection1x1; + (arrays2: lodash.__, arrays: lodash.List): LodashIntersection1x2; + (arrays2: lodash.List, arrays: lodash.List): T[]; + } + type LodashIntersection1x1 = (arrays: lodash.List) => T[]; + type LodashIntersection1x2 = (arrays2: lodash.List) => T[]; + interface LodashIntersectionBy { + (iteratee: lodash.ValueIteratee): LodashIntersectionBy1x1; + (iteratee: lodash.__, array: lodash.List | null): LodashIntersectionBy1x2; + (iteratee: lodash.ValueIteratee, array: lodash.List | null): LodashIntersectionBy1x3; + (iteratee: lodash.__, array: lodash.__, values: lodash.List): LodashIntersectionBy1x4; + (iteratee: lodash.ValueIteratee, array: lodash.__, values: lodash.List): LodashIntersectionBy1x5; + (iteratee: lodash.__, array: lodash.List | null, values: lodash.List): LodashIntersectionBy1x6; + (iteratee: lodash.ValueIteratee, array: lodash.List | null, values: lodash.List): T1[]; + } + interface LodashIntersectionBy1x1 { + (array: lodash.List | null): LodashIntersectionBy1x3; + (array: lodash.__, values: lodash.List): LodashIntersectionBy1x5; + (array: lodash.List | null, values: lodash.List): T1[]; + } + interface LodashIntersectionBy1x2 { + (iteratee: lodash.ValueIteratee): LodashIntersectionBy1x3; + (iteratee: lodash.__, values: lodash.List): LodashIntersectionBy1x6; + (iteratee: lodash.ValueIteratee, values: lodash.List): T1[]; + } + type LodashIntersectionBy1x3 = (values: lodash.List) => T1[]; + interface LodashIntersectionBy1x4 { + (iteratee: lodash.ValueIteratee): LodashIntersectionBy1x5; + (iteratee: lodash.__, array: lodash.List | null): LodashIntersectionBy1x6; + (iteratee: lodash.ValueIteratee, array: lodash.List | null): T1[]; + } + type LodashIntersectionBy1x5 = (array: lodash.List | null) => T1[]; + type LodashIntersectionBy1x6 = (iteratee: lodash.ValueIteratee) => T1[]; + interface LodashIntersectionWith { + (comparator: lodash.Comparator2): LodashIntersectionWith1x1; + (comparator: lodash.__, array: lodash.List | null | undefined): LodashIntersectionWith1x2; + (comparator: lodash.Comparator2, array: lodash.List | null | undefined): LodashIntersectionWith1x3; + (comparator: lodash.__, array: lodash.__, values: lodash.List): LodashIntersectionWith1x4; + (comparator: lodash.Comparator2, array: lodash.__, values: lodash.List): LodashIntersectionWith1x5; + (comparator: lodash.__, array: lodash.List | null | undefined, values: lodash.List): LodashIntersectionWith1x6; + (comparator: lodash.Comparator2, array: lodash.List | null | undefined, values: lodash.List): T1[]; + } + interface LodashIntersectionWith1x1 { + (array: lodash.List | null | undefined): LodashIntersectionWith1x3; + (array: lodash.__, values: lodash.List): LodashIntersectionWith1x5; + (array: lodash.List | null | undefined, values: lodash.List): T1[]; + } + interface LodashIntersectionWith1x2 { + (comparator: lodash.Comparator2): LodashIntersectionWith1x3; + (comparator: lodash.__, values: lodash.List): LodashIntersectionWith1x6; + (comparator: lodash.Comparator2, values: lodash.List): T1[]; + } + type LodashIntersectionWith1x3 = (values: lodash.List) => T1[]; + interface LodashIntersectionWith1x4 { + (comparator: lodash.Comparator2): LodashIntersectionWith1x5; + (comparator: lodash.__, array: lodash.List | null | undefined): LodashIntersectionWith1x6; + (comparator: lodash.Comparator2, array: lodash.List | null | undefined): T1[]; + } + type LodashIntersectionWith1x5 = (array: lodash.List | null | undefined) => T1[]; + type LodashIntersectionWith1x6 = (comparator: lodash.Comparator2) => T1[]; + type LodashInvert = (object: object) => lodash.Dictionary; + interface LodashInvertBy { + (interatee: lodash.ValueIteratee): LodashInvertBy1x1; + (interatee: lodash.__, object: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): LodashInvertBy1x2; + (interatee: lodash.ValueIteratee, object: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): lodash.Dictionary; + (interatee: lodash.__, object: T | null | undefined): LodashInvertBy2x2; + (interatee: lodash.ValueIteratee, object: T | null | undefined): lodash.Dictionary; + } + type LodashInvertBy1x1 = (object: lodash.List | lodash.Dictionary | lodash.NumericDictionary | object | null | undefined) => lodash.Dictionary; + type LodashInvertBy1x2 = (interatee: lodash.ValueIteratee) => lodash.Dictionary; + type LodashInvertBy2x2 = (interatee: lodash.ValueIteratee) => lodash.Dictionary; + interface LodashInvoke { + (path: lodash.PropertyPath): LodashInvoke1x1; + (path: lodash.__, object: any): LodashInvoke1x2; + (path: lodash.PropertyPath, object: any): any; + } + type LodashInvoke1x1 = (object: any) => any; + type LodashInvoke1x2 = (path: lodash.PropertyPath) => any; + interface LodashInvokeArgs { + (path: lodash.PropertyPath): LodashInvokeArgs1x1; + (path: lodash.__, args: ReadonlyArray): LodashInvokeArgs1x2; + (path: lodash.PropertyPath, args: ReadonlyArray): LodashInvokeArgs1x3; + (path: lodash.__, args: lodash.__, object: any): LodashInvokeArgs1x4; + (path: lodash.PropertyPath, args: lodash.__, object: any): LodashInvokeArgs1x5; + (path: lodash.__, args: ReadonlyArray, object: any): LodashInvokeArgs1x6; + (path: lodash.PropertyPath, args: ReadonlyArray, object: any): any; + } + interface LodashInvokeArgs1x1 { + (args: ReadonlyArray): LodashInvokeArgs1x3; + (args: lodash.__, object: any): LodashInvokeArgs1x5; + (args: ReadonlyArray, object: any): any; + } + interface LodashInvokeArgs1x2 { + (path: lodash.PropertyPath): LodashInvokeArgs1x3; + (path: lodash.__, object: any): LodashInvokeArgs1x6; + (path: lodash.PropertyPath, object: any): any; + } + type LodashInvokeArgs1x3 = (object: any) => any; + interface LodashInvokeArgs1x4 { + (path: lodash.PropertyPath): LodashInvokeArgs1x5; + (path: lodash.__, args: ReadonlyArray): LodashInvokeArgs1x6; + (path: lodash.PropertyPath, args: ReadonlyArray): any; + } + type LodashInvokeArgs1x5 = (args: ReadonlyArray) => any; + type LodashInvokeArgs1x6 = (path: lodash.PropertyPath) => any; + interface LodashInvokeArgsMap { + (methodName: string): LodashInvokeArgsMap1x1; + (methodNameOrMethod: lodash.__, args: ReadonlyArray): LodashInvokeArgsMap1x2; + (methodName: string, args: ReadonlyArray): LodashInvokeArgsMap1x3; + (methodNameOrMethod: lodash.__, args: lodash.__, collection: object | null | undefined): LodashInvokeArgsMap1x4; + (methodName: string, args: lodash.__, collection: object | null | undefined): LodashInvokeArgsMap1x5; + (methodNameOrMethod: lodash.__, args: ReadonlyArray, collection: object | null | undefined): LodashInvokeArgsMap1x6; + (methodName: string, args: ReadonlyArray, collection: object | null | undefined): any[]; + (method: (...args: any[]) => TResult): LodashInvokeArgsMap2x1; + (method: (...args: any[]) => TResult, args: ReadonlyArray): LodashInvokeArgsMap2x3; + (method: (...args: any[]) => TResult, args: lodash.__, collection: object | null | undefined): LodashInvokeArgsMap2x5; + (method: (...args: any[]) => TResult, args: ReadonlyArray, collection: object | null | undefined): TResult[]; + } + interface LodashInvokeArgsMap1x1 { + (args: ReadonlyArray): LodashInvokeArgsMap1x3; + (args: lodash.__, collection: object | null | undefined): LodashInvokeArgsMap1x5; + (args: ReadonlyArray, collection: object | null | undefined): any[]; + } + interface LodashInvokeArgsMap1x2 { + (methodName: string): LodashInvokeArgsMap1x3; + (methodNameOrMethod: lodash.__, collection: object | null | undefined): LodashInvokeArgsMap1x6; + (methodName: string, collection: object | null | undefined): any[]; + (method: (...args: any[]) => TResult): LodashInvokeArgsMap2x3; + (method: (...args: any[]) => TResult, collection: object | null | undefined): TResult[]; + } + type LodashInvokeArgsMap1x3 = (collection: object | null | undefined) => any[]; + interface LodashInvokeArgsMap1x4 { + (methodName: string): LodashInvokeArgsMap1x5; + (methodNameOrMethod: lodash.__, args: ReadonlyArray): LodashInvokeArgsMap1x6; + (methodName: string, args: ReadonlyArray): any[]; + (method: (...args: any[]) => TResult): LodashInvokeArgsMap2x5; + (method: (...args: any[]) => TResult, args: ReadonlyArray): TResult[]; + } + type LodashInvokeArgsMap1x5 = (args: ReadonlyArray) => any[]; + interface LodashInvokeArgsMap1x6 { + (methodName: string): any[]; + (method: (...args: any[]) => TResult): TResult[]; + } + interface LodashInvokeArgsMap2x1 { + (args: ReadonlyArray): LodashInvokeArgsMap2x3; + (args: lodash.__, collection: object | null | undefined): LodashInvokeArgsMap2x5; + (args: ReadonlyArray, collection: object | null | undefined): TResult[]; + } + type LodashInvokeArgsMap2x3 = (collection: object | null | undefined) => TResult[]; + type LodashInvokeArgsMap2x5 = (args: ReadonlyArray) => TResult[]; + interface LodashInvokeMap { + (methodName: string): LodashInvokeMap1x1; + (methodNameOrMethod: lodash.__, collection: object | null | undefined): LodashInvokeMap1x2; + (methodName: string, collection: object | null | undefined): any[]; + (method: (...args: any[]) => TResult): LodashInvokeMap2x1; + (method: (...args: any[]) => TResult, collection: object | null | undefined): TResult[]; + } + type LodashInvokeMap1x1 = (collection: object | null | undefined) => any[]; + interface LodashInvokeMap1x2 { + (methodName: string): any[]; + (method: (...args: any[]) => TResult): TResult[]; + } + type LodashInvokeMap2x1 = (collection: object | null | undefined) => TResult[]; + type LodashIsArguments = (value: any) => value is IArguments; + type LodashIsArray = (value: any) => value is any[]; + type LodashIsArrayBuffer = (value: any) => value is ArrayBuffer; + interface LodashIsArrayLike { + (value: T & string & number): boolean; + (value: ((...args: any[]) => any) | null | undefined): value is never; + (value: any): value is { length: number }; + } + interface LodashIsArrayLikeObject { + (value: T & string & number): boolean; + // tslint:disable-next-line:ban-types (type guard doesn't seem to work correctly without the Function type) + (value: ((...args: any[]) => any) | Function | string | boolean | number | null | undefined): value is never; + // tslint:disable-next-line:ban-types (type guard doesn't seem to work correctly without the Function type) + (value: T | ((...args: any[]) => any) | Function | string | boolean | number | null | undefined): value is T & { length: number }; + } + type LodashIsBoolean = (value: any) => value is boolean; + type LodashIsBuffer = (value: any) => boolean; + type LodashIsDate = (value: any) => value is Date; + type LodashIsElement = (value: any) => boolean; + type LodashIsEmpty = (value: any) => boolean; + interface LodashIsEqualWith { + (customizer: lodash.IsEqualCustomizer): LodashIsEqualWith1x1; + (customizer: lodash.__, value: any): LodashIsEqualWith1x2; + (customizer: lodash.IsEqualCustomizer, value: any): LodashIsEqualWith1x3; + (customizer: lodash.__, value: lodash.__, other: any): LodashIsEqualWith1x4; + (customizer: lodash.IsEqualCustomizer, value: lodash.__, other: any): LodashIsEqualWith1x5; + (customizer: lodash.__, value: any, other: any): LodashIsEqualWith1x6; + (customizer: lodash.IsEqualCustomizer, value: any, other: any): boolean; + } + interface LodashIsEqualWith1x1 { + (value: any): LodashIsEqualWith1x3; + (value: lodash.__, other: any): LodashIsEqualWith1x5; + (value: any, other: any): boolean; + } + interface LodashIsEqualWith1x2 { + (customizer: lodash.IsEqualCustomizer): LodashIsEqualWith1x3; + (customizer: lodash.__, other: any): LodashIsEqualWith1x6; + (customizer: lodash.IsEqualCustomizer, other: any): boolean; + } + type LodashIsEqualWith1x3 = (other: any) => boolean; + interface LodashIsEqualWith1x4 { + (customizer: lodash.IsEqualCustomizer): LodashIsEqualWith1x5; + (customizer: lodash.__, value: any): LodashIsEqualWith1x6; + (customizer: lodash.IsEqualCustomizer, value: any): boolean; + } + type LodashIsEqualWith1x5 = (value: any) => boolean; + type LodashIsEqualWith1x6 = (customizer: lodash.IsEqualCustomizer) => boolean; + type LodashIsError = (value: any) => value is Error; + type LodashIsFinite = (value: any) => boolean; + type LodashIsFunction = (value: any) => value is (...args: any[]) => any; + type LodashIsInteger = (value: any) => boolean; + type LodashIsLength = (value: any) => boolean; + type LodashIsMap = (value: any) => value is Map; + interface LodashIsMatch { + (source: object): LodashIsMatch1x1; + (source: lodash.__, object: object): LodashIsMatch1x2; + (source: object, object: object): boolean; + } + type LodashIsMatch1x1 = (object: object) => boolean; + type LodashIsMatch1x2 = (source: object) => boolean; + interface LodashIsMatchWith { + (customizer: lodash.isMatchWithCustomizer): LodashIsMatchWith1x1; + (customizer: lodash.__, source: object): LodashIsMatchWith1x2; + (customizer: lodash.isMatchWithCustomizer, source: object): LodashIsMatchWith1x3; + (customizer: lodash.__, source: lodash.__, object: object): LodashIsMatchWith1x4; + (customizer: lodash.isMatchWithCustomizer, source: lodash.__, object: object): LodashIsMatchWith1x5; + (customizer: lodash.__, source: object, object: object): LodashIsMatchWith1x6; + (customizer: lodash.isMatchWithCustomizer, source: object, object: object): boolean; + } + interface LodashIsMatchWith1x1 { + (source: object): LodashIsMatchWith1x3; + (source: lodash.__, object: object): LodashIsMatchWith1x5; + (source: object, object: object): boolean; + } + interface LodashIsMatchWith1x2 { + (customizer: lodash.isMatchWithCustomizer): LodashIsMatchWith1x3; + (customizer: lodash.__, object: object): LodashIsMatchWith1x6; + (customizer: lodash.isMatchWithCustomizer, object: object): boolean; + } + type LodashIsMatchWith1x3 = (object: object) => boolean; + interface LodashIsMatchWith1x4 { + (customizer: lodash.isMatchWithCustomizer): LodashIsMatchWith1x5; + (customizer: lodash.__, source: object): LodashIsMatchWith1x6; + (customizer: lodash.isMatchWithCustomizer, source: object): boolean; + } + type LodashIsMatchWith1x5 = (source: object) => boolean; + type LodashIsMatchWith1x6 = (customizer: lodash.isMatchWithCustomizer) => boolean; + type LodashIsNaN = (value: any) => boolean; + type LodashIsNative = (value: any) => value is (...args: any[]) => any; + type LodashIsNil = (value: any) => value is null | undefined; + type LodashIsNull = (value: any) => value is null; + type LodashIsNumber = (value: any) => value is number; + type LodashIsObject = (value: any) => boolean; + type LodashIsObjectLike = (value: any) => boolean; + type LodashIsPlainObject = (value: any) => boolean; + type LodashIsRegExp = (value: any) => value is RegExp; + type LodashIsSafeInteger = (value: any) => boolean; + type LodashIsSet = (value: any) => value is Set; + type LodashIsString = (value: any) => value is string; + type LodashIsSymbol = (value: any) => boolean; + type LodashIsTypedArray = (value: any) => boolean; + type LodashIsUndefined = (value: any) => value is undefined; + type LodashIsWeakMap = (value: any) => value is WeakMap; + type LodashIsWeakSet = (value: any) => value is WeakSet; + interface LodashIteratee { + any>(func: TFunction): TFunction; + (func: string | object): (...args: any[]) => any; + } + interface LodashJoin { + (separator: string): LodashJoin1x1; + (separator: lodash.__, array: lodash.List | null | undefined): LodashJoin1x2; + (separator: string, array: lodash.List | null | undefined): string; + } + type LodashJoin1x1 = (array: lodash.List | null | undefined) => string; + type LodashJoin1x2 = (separator: string) => string; + type LodashOver = (iteratees: lodash.Many<(...args: any[]) => TResult>) => (...args: any[]) => TResult[]; + type LodashKebabCase = (string: string) => string; + type LodashKeys = (object: any) => string[]; + type LodashKeysIn = (object: any) => string[]; + type LodashLast = (array: lodash.List | null | undefined) => T | undefined; + interface LodashLastIndexOf { + (value: T): LodashLastIndexOf1x1; + (value: lodash.__, array: lodash.List | null | undefined): LodashLastIndexOf1x2; + (value: T, array: lodash.List | null | undefined): number; + } + type LodashLastIndexOf1x1 = (array: lodash.List | null | undefined) => number; + type LodashLastIndexOf1x2 = (value: T) => number; + interface LodashLastIndexOfFrom { + (value: T): LodashLastIndexOfFrom1x1; + (value: lodash.__, fromIndex: true|number): LodashLastIndexOfFrom1x2; + (value: T, fromIndex: true|number): LodashLastIndexOfFrom1x3; + (value: lodash.__, fromIndex: lodash.__, array: lodash.List | null | undefined): LodashLastIndexOfFrom1x4; + (value: T, fromIndex: lodash.__, array: lodash.List | null | undefined): LodashLastIndexOfFrom1x5; + (value: lodash.__, fromIndex: true|number, array: lodash.List | null | undefined): LodashLastIndexOfFrom1x6; + (value: T, fromIndex: true|number, array: lodash.List | null | undefined): number; + } + interface LodashLastIndexOfFrom1x1 { + (fromIndex: true|number): LodashLastIndexOfFrom1x3; + (fromIndex: lodash.__, array: lodash.List | null | undefined): LodashLastIndexOfFrom1x5; + (fromIndex: true|number, array: lodash.List | null | undefined): number; + } + interface LodashLastIndexOfFrom1x2 { + (value: T): LodashLastIndexOfFrom1x3; + (value: lodash.__, array: lodash.List | null | undefined): LodashLastIndexOfFrom1x6; + (value: T, array: lodash.List | null | undefined): number; + } + type LodashLastIndexOfFrom1x3 = (array: lodash.List | null | undefined) => number; + interface LodashLastIndexOfFrom1x4 { + (value: T): LodashLastIndexOfFrom1x5; + (value: lodash.__, fromIndex: true|number): LodashLastIndexOfFrom1x6; + (value: T, fromIndex: true|number): number; + } + type LodashLastIndexOfFrom1x5 = (fromIndex: true|number) => number; + type LodashLastIndexOfFrom1x6 = (value: T) => number; + type LodashLowerCase = (string: string) => string; + type LodashLowerFirst = (string: string) => string; + interface LodashLt { + (value: any): LodashLt1x1; + (value: lodash.__, other: any): LodashLt1x2; + (value: any, other: any): boolean; + } + type LodashLt1x1 = (other: any) => boolean; + type LodashLt1x2 = (value: any) => boolean; + interface LodashLte { + (value: any): LodashLte1x1; + (value: lodash.__, other: any): LodashLte1x2; + (value: any, other: any): boolean; + } + type LodashLte1x1 = (other: any) => boolean; + type LodashLte1x2 = (value: any) => boolean; + interface LodashMap { + (iteratee: (value: T) => TResult): LodashMap1x1; + (iteratee: lodash.__, collection: T[] | null | undefined): LodashMap1x2; + (iteratee: (value: T) => TResult, collection: T[] | lodash.List | null | undefined): TResult[]; + (iteratee: lodash.__, collection: lodash.List | null | undefined): LodashMap2x2; + (iteratee: (value: T[keyof T]) => TResult): LodashMap3x1; + (iteratee: lodash.__, collection: T | null | undefined): LodashMap3x2; + (iteratee: (value: T[keyof T]) => TResult, collection: T | null | undefined): TResult[]; + (iteratee: K): LodashMap4x1; + (iteratee: lodash.__, collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): LodashMap4x2; + (iteratee: K, collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): Array; + (iteratee: string): LodashMap5x1; + (iteratee: string, collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): any[]; + (iteratee: object): LodashMap6x1; + (iteratee: object, collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): boolean[]; + } + type LodashMap1x1 = (collection: T[] | lodash.List | null | undefined) => TResult[]; + type LodashMap1x2 = (iteratee: (value: T) => TResult) => TResult[]; + type LodashMap2x2 = (iteratee: (value: T) => TResult) => TResult[]; + type LodashMap3x1 = (collection: T | null | undefined) => TResult[]; + type LodashMap3x2 = (iteratee: (value: T[keyof T]) => TResult) => TResult[]; + type LodashMap4x1 = (collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined) => Array; + interface LodashMap4x2 { + (iteratee: K): Array; + (iteratee: string): any[]; + (iteratee: object): boolean[]; + } + type LodashMap5x1 = (collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined) => any[]; + type LodashMap6x1 = (collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined) => boolean[]; + interface LodashMapKeys { + (iteratee: lodash.ValueIteratee): LodashMapKeys1x1; + (iteratee: lodash.__, object: lodash.List | null | undefined): LodashMapKeys1x2; + (iteratee: lodash.ValueIteratee, object: lodash.List | null | undefined): lodash.Dictionary; + (iteratee: lodash.ValueIteratee): LodashMapKeys2x1; + (iteratee: lodash.__, object: T | null | undefined): LodashMapKeys2x2; + (iteratee: lodash.ValueIteratee, object: T | null | undefined): lodash.Dictionary; + } + type LodashMapKeys1x1 = (object: lodash.List | null | undefined) => lodash.Dictionary; + type LodashMapKeys1x2 = (iteratee: lodash.ValueIteratee) => lodash.Dictionary; + type LodashMapKeys2x1 = (object: T | null | undefined) => lodash.Dictionary; + type LodashMapKeys2x2 = (iteratee: lodash.ValueIteratee) => lodash.Dictionary; + interface LodashMapValues { + (callback: (value: string) => TResult): LodashMapValues1x1; + (callback: lodash.__, obj: string | null | undefined): LodashMapValues1x2; + (callback: (value: string) => TResult, obj: string | null | undefined): lodash.NumericDictionary; + (callback: (value: T) => TResult): LodashMapValues2x1; + (callbackOrIterateeOrIterateeOrIteratee: lodash.__, obj: lodash.Dictionary | lodash.NumericDictionary | null | undefined): LodashMapValues2x2; + (callback: (value: T) => TResult, obj: lodash.Dictionary | lodash.NumericDictionary | null | undefined): lodash.Dictionary; + (callback: (value: T[keyof T]) => TResult): LodashMapValues3x1; + (callbackOrIterateeOrIteratee: lodash.__, obj: T | null | undefined): LodashMapValues3x2; + (callback: (value: T[keyof T]) => TResult, obj: T | null | undefined): { [P in keyof T]: TResult }; + (iteratee: object): LodashMapValues4x1; + (iteratee: object, obj: lodash.Dictionary | lodash.NumericDictionary | null | undefined): lodash.Dictionary; + (iteratee: object, obj: T | null | undefined): { [P in keyof T]: boolean }; + (iteratee: TKey): LodashMapValues6x1; + (iteratee: TKey, obj: lodash.Dictionary | lodash.NumericDictionary | null | undefined): lodash.Dictionary; + (iteratee: string): LodashMapValues7x1; + (iteratee: string, obj: lodash.Dictionary | lodash.NumericDictionary | null | undefined): lodash.Dictionary; + (iteratee: string, obj: T | null | undefined): { [P in keyof T]: any }; + } + type LodashMapValues1x1 = (obj: string | null | undefined) => lodash.NumericDictionary; + type LodashMapValues1x2 = (callback: (value: string) => TResult) => lodash.NumericDictionary; + type LodashMapValues2x1 = (obj: lodash.Dictionary | lodash.NumericDictionary | null | undefined) => lodash.Dictionary; + interface LodashMapValues2x2 { + (callback: (value: T) => TResult): lodash.Dictionary; + (iteratee: object): lodash.Dictionary; + (iteratee: TKey): lodash.Dictionary; + (iteratee: string): lodash.Dictionary; + } + type LodashMapValues3x1 = (obj: T | null | undefined) => { [P in keyof T]: TResult }; + interface LodashMapValues3x2 { + (callback: (value: T[keyof T]) => TResult): { [P in keyof T]: TResult }; + (iteratee: object): { [P in keyof T]: boolean }; + (iteratee: string): { [P in keyof T]: any }; + } + interface LodashMapValues4x1 { + (obj: lodash.Dictionary | lodash.NumericDictionary | null | undefined): lodash.Dictionary; + (obj: T | null | undefined): { [P in keyof T]: boolean }; + } + type LodashMapValues6x1 = (obj: lodash.Dictionary | lodash.NumericDictionary | null | undefined) => lodash.Dictionary; + interface LodashMapValues7x1 { + (obj: lodash.Dictionary | lodash.NumericDictionary | null | undefined): lodash.Dictionary; + (obj: T | null | undefined): { [P in keyof T]: any }; + } + interface LodashMatchesProperty { + (path: lodash.PropertyPath): LodashMatchesProperty1x1; + (path: lodash.__, srcValue: T): LodashMatchesProperty1x2; + (path: lodash.PropertyPath, srcValue: T): (value: any) => boolean; + } + type LodashMatchesProperty1x1 = (srcValue: T) => (value: any) => boolean; + type LodashMatchesProperty1x2 = (path: lodash.PropertyPath) => (value: any) => boolean; + type LodashMax = (collection: lodash.List | null | undefined) => T | undefined; + interface LodashMaxBy { + (iteratee: lodash.ValueIteratee): LodashMaxBy1x1; + (iteratee: lodash.__, collection: lodash.List | null | undefined): LodashMaxBy1x2; + (iteratee: lodash.ValueIteratee, collection: lodash.List | null | undefined): T | undefined; + } + type LodashMaxBy1x1 = (collection: lodash.List | null | undefined) => T | undefined; + type LodashMaxBy1x2 = (iteratee: lodash.ValueIteratee) => T | undefined; + type LodashMean = (collection: lodash.List | null | undefined) => number; + interface LodashMeanBy { + (iteratee: lodash.ValueIteratee): LodashMeanBy1x1; + (iteratee: lodash.__, collection: lodash.List | null | undefined): LodashMeanBy1x2; + (iteratee: lodash.ValueIteratee, collection: lodash.List | null | undefined): number; + } + type LodashMeanBy1x1 = (collection: lodash.List | null | undefined) => number; + type LodashMeanBy1x2 = (iteratee: lodash.ValueIteratee) => number; + type LodashMemoize = any>(func: T) => T & lodash.MemoizedFunction; + interface LodashMerge { + (object: TObject): LodashMerge1x1; + (object: lodash.__, source: TSource): LodashMerge1x2; + (object: TObject, source: TSource): TObject & TSource; + } + type LodashMerge1x1 = (source: TSource) => TObject & TSource; + type LodashMerge1x2 = (object: TObject) => TObject & TSource; + type LodashMergeAll = (object: ReadonlyArray) => any; + interface LodashMergeAllWith { + (customizer: lodash.MergeWithCustomizer): LodashMergeAllWith1x1; + (customizer: lodash.__, args: ReadonlyArray): LodashMergeAllWith1x2; + (customizer: lodash.MergeWithCustomizer, args: ReadonlyArray): any; + } + type LodashMergeAllWith1x1 = (args: ReadonlyArray) => any; + type LodashMergeAllWith1x2 = (customizer: lodash.MergeWithCustomizer) => any; + interface LodashMergeWith { + (customizer: lodash.MergeWithCustomizer): LodashMergeWith1x1; + (customizer: lodash.__, object: TObject): LodashMergeWith1x2; + (customizer: lodash.MergeWithCustomizer, object: TObject): LodashMergeWith1x3; + (customizer: lodash.__, object: lodash.__, source: TSource): LodashMergeWith1x4; + (customizer: lodash.MergeWithCustomizer, object: lodash.__, source: TSource): LodashMergeWith1x5; + (customizer: lodash.__, object: TObject, source: TSource): LodashMergeWith1x6; + (customizer: lodash.MergeWithCustomizer, object: TObject, source: TSource): TObject & TSource; + } + interface LodashMergeWith1x1 { + (object: TObject): LodashMergeWith1x3; + (object: lodash.__, source: TSource): LodashMergeWith1x5; + (object: TObject, source: TSource): TObject & TSource; + } + interface LodashMergeWith1x2 { + (customizer: lodash.MergeWithCustomizer): LodashMergeWith1x3; + (customizer: lodash.__, source: TSource): LodashMergeWith1x6; + (customizer: lodash.MergeWithCustomizer, source: TSource): TObject & TSource; + } + type LodashMergeWith1x3 = (source: TSource) => TObject & TSource; + interface LodashMergeWith1x4 { + (customizer: lodash.MergeWithCustomizer): LodashMergeWith1x5; + (customizer: lodash.__, object: TObject): LodashMergeWith1x6; + (customizer: lodash.MergeWithCustomizer, object: TObject): TObject & TSource; + } + type LodashMergeWith1x5 = (object: TObject) => TObject & TSource; + type LodashMergeWith1x6 = (customizer: lodash.MergeWithCustomizer) => TObject & TSource; + type LodashMethod = (path: lodash.PropertyPath) => (object: any) => any; + type LodashMethodOf = (object: object) => (path: lodash.PropertyPath) => any; + type LodashMin = (collection: lodash.List | null | undefined) => T | undefined; + interface LodashMinBy { + (iteratee: lodash.ValueIteratee): LodashMinBy1x1; + (iteratee: lodash.__, collection: lodash.List | null | undefined): LodashMinBy1x2; + (iteratee: lodash.ValueIteratee, collection: lodash.List | null | undefined): T | undefined; + } + type LodashMinBy1x1 = (collection: lodash.List | null | undefined) => T | undefined; + type LodashMinBy1x2 = (iteratee: lodash.ValueIteratee) => T | undefined; + interface LodashMultiply { + (multiplier: number): LodashMultiply1x1; + (multiplier: lodash.__, multiplicand: number): LodashMultiply1x2; + (multiplier: number, multiplicand: number): number; + } + type LodashMultiply1x1 = (multiplicand: number) => number; + type LodashMultiply1x2 = (multiplier: number) => number; + type LodashNoConflict = () => typeof _; + type LodashNoop = (...args: any[]) => void; + type LodashNow = () => number; + interface LodashNth { + (n: number): LodashNth1x1; + (n: lodash.__, array: lodash.List | null | undefined): LodashNth1x2; + (n: number, array: lodash.List | null | undefined): T | undefined; + } + type LodashNth1x1 = (array: lodash.List | null | undefined) => T | undefined; + type LodashNth1x2 = (n: number) => T | undefined; + type LodashNthArg = (n: number) => (...args: any[]) => any; + interface LodashOmit { + (paths: lodash.PropertyPath): LodashOmit1x1; + (paths: lodash.__, object: T | null | undefined): LodashOmit1x2; + (paths: lodash.PropertyPath, object: T | null | undefined): T; + (paths: lodash.__, object: T | null | undefined): LodashOmit2x2; + (paths: lodash.PropertyPath, object: T | null | undefined): lodash.PartialObject; + } + interface LodashOmit1x1 { + (object: T | null | undefined): T; + (object: T | null | undefined): lodash.PartialObject; + } + type LodashOmit1x2 = (paths: lodash.PropertyPath) => T; + type LodashOmit2x2 = (paths: lodash.PropertyPath) => lodash.PartialObject; + interface LodashOmitBy { + (predicate: lodash.ValueKeyIteratee): LodashOmitBy1x1; + (predicate: lodash.__, object: T | null | undefined): LodashOmitBy1x2; + (predicate: lodash.ValueKeyIteratee, object: T | null | undefined): lodash.PartialObject; + } + type LodashOmitBy1x1 = (object: T1 | null | undefined) => lodash.PartialObject; + type LodashOmitBy1x2 = (predicate: lodash.ValueKeyIteratee) => lodash.PartialObject; + type LodashOnce = any>(func: T) => T; + interface LodashOrderBy { + (iteratees: lodash.Many<(value: T) => lodash.NotVoid>): LodashOrderBy1x1; + (iteratees: lodash.__, orders: lodash.Many): LodashOrderBy1x2; + (iteratees: lodash.Many<(value: T) => lodash.NotVoid>, orders: lodash.Many): LodashOrderBy1x3; + (iteratees: lodash.__, orders: lodash.__, collection: lodash.List | null | undefined): LodashOrderBy1x4; + (iteratees: lodash.Many<(value: T) => lodash.NotVoid>, orders: lodash.__, collection: lodash.List | null | undefined): LodashOrderBy1x5; + (iteratees: lodash.__, orders: lodash.Many, collection: lodash.List | null | undefined): LodashOrderBy1x6; + (iteratees: lodash.Many<(value: T) => lodash.NotVoid> | lodash.Many>, orders: lodash.Many, collection: lodash.List | null | undefined): T[]; + (iteratees: lodash.Many>): LodashOrderBy2x1; + (iteratees: lodash.Many>, orders: lodash.Many): LodashOrderBy2x3; + (iteratees: lodash.Many>, orders: lodash.__, collection: lodash.List | null | undefined): LodashOrderBy2x5; + (iteratees: lodash.__, orders: lodash.__, collection: T | null | undefined): LodashOrderBy3x4; + (iteratees: lodash.Many<(value: T[keyof T]) => lodash.NotVoid>, orders: lodash.__, collection: T | null | undefined): LodashOrderBy3x5; + (iteratees: lodash.__, orders: lodash.Many, collection: T | null | undefined): LodashOrderBy3x6; + (iteratees: lodash.Many<(value: T[keyof T]) => lodash.NotVoid> | lodash.Many>, orders: lodash.Many, collection: T | null | undefined): Array; + (iteratees: lodash.Many>, orders: lodash.__, collection: T | null | undefined): LodashOrderBy4x5; + } + interface LodashOrderBy1x1 { + (orders: lodash.Many): LodashOrderBy1x3; + (orders: lodash.__, collection: lodash.List | null | undefined): LodashOrderBy1x5; + (orders: lodash.Many, collection: lodash.List | object | null | undefined): T[]; + (orders: lodash.__, collection: T1 | null | undefined): LodashOrderBy3x5; + } + interface LodashOrderBy1x2 { + (iteratees: lodash.Many<(value: T) => lodash.NotVoid>): LodashOrderBy1x3; + (iteratees: lodash.__, collection: lodash.List | null | undefined): LodashOrderBy1x6; + (iteratees: lodash.Many<(value: T) => lodash.NotVoid> | lodash.Many>, collection: lodash.List | null | undefined): T[]; + (iteratees: lodash.Many>): LodashOrderBy2x3; + (iteratees: lodash.__, collection: T | null | undefined): LodashOrderBy3x6; + (iteratees: lodash.Many<(value: T[keyof T]) => lodash.NotVoid> | lodash.Many>, collection: T | null | undefined): Array; + } + interface LodashOrderBy1x3 { + (collection: lodash.List | null | undefined): T[]; + (collection: object | null | undefined): object[]; + } + interface LodashOrderBy1x4 { + (iteratees: lodash.Many<(value: T) => lodash.NotVoid>): LodashOrderBy1x5; + (iteratees: lodash.__, orders: lodash.Many): LodashOrderBy1x6; + (iteratees: lodash.Many<(value: T) => lodash.NotVoid> | lodash.Many>, orders: lodash.Many): T[]; + (iteratees: lodash.Many>): LodashOrderBy2x5; + } + type LodashOrderBy1x5 = (orders: lodash.Many) => T[]; + type LodashOrderBy1x6 = (iteratees: lodash.Many<(value: T) => lodash.NotVoid> | lodash.Many>) => T[]; + interface LodashOrderBy2x1 { + (orders: lodash.Many): LodashOrderBy2x3; + (orders: lodash.__, collection: lodash.List | null | undefined): LodashOrderBy2x5; + (orders: lodash.Many, collection: lodash.List | object | null | undefined): T[]; + (orders: lodash.__, collection: T1 | null | undefined): LodashOrderBy4x5; + } + interface LodashOrderBy2x3 { + (collection: lodash.List | null | undefined): T[]; + (collection: object | null | undefined): object[]; + } + type LodashOrderBy2x5 = (orders: lodash.Many) => T[]; + interface LodashOrderBy3x4 { + (iteratees: lodash.Many<(value: T[keyof T]) => lodash.NotVoid>): LodashOrderBy3x5; + (iteratees: lodash.__, orders: lodash.Many): LodashOrderBy3x6; + (iteratees: lodash.Many<(value: T[keyof T]) => lodash.NotVoid> | lodash.Many>, orders: lodash.Many): Array; + (iteratees: lodash.Many>): LodashOrderBy4x5; + } + type LodashOrderBy3x5 = (orders: lodash.Many) => Array; + type LodashOrderBy3x6 = (iteratees: lodash.Many<(value: T[keyof T]) => lodash.NotVoid> | lodash.Many>) => Array; + type LodashOrderBy4x5 = (orders: lodash.Many) => Array; + interface LodashOverArgs { + (func: (...args: any[]) => any): LodashOverArgs1x1; + (func: lodash.__, transforms: lodash.Many<(...args: any[]) => any>): LodashOverArgs1x2; + (func: (...args: any[]) => any, transforms: lodash.Many<(...args: any[]) => any>): (...args: any[]) => any; + } + type LodashOverArgs1x1 = (transforms: lodash.Many<(...args: any[]) => any>) => (...args: any[]) => any; + type LodashOverArgs1x2 = (func: (...args: any[]) => any) => (...args: any[]) => any; + interface LodashPad { + (length: number): LodashPad1x1; + (length: lodash.__, string: string): LodashPad1x2; + (length: number, string: string): string; + } + type LodashPad1x1 = (string: string) => string; + type LodashPad1x2 = (length: number) => string; + interface LodashPadChars { + (chars: string): LodashPadChars1x1; + (chars: lodash.__, length: number): LodashPadChars1x2; + (chars: string, length: number): LodashPadChars1x3; + (chars: lodash.__, length: lodash.__, string: string): LodashPadChars1x4; + (chars: string, length: lodash.__, string: string): LodashPadChars1x5; + (chars: lodash.__, length: number, string: string): LodashPadChars1x6; + (chars: string, length: number, string: string): string; + } + interface LodashPadChars1x1 { + (length: number): LodashPadChars1x3; + (length: lodash.__, string: string): LodashPadChars1x5; + (length: number, string: string): string; + } + interface LodashPadChars1x2 { + (chars: string): LodashPadChars1x3; + (chars: lodash.__, string: string): LodashPadChars1x6; + (chars: string, string: string): string; + } + type LodashPadChars1x3 = (string: string) => string; + interface LodashPadChars1x4 { + (chars: string): LodashPadChars1x5; + (chars: lodash.__, length: number): LodashPadChars1x6; + (chars: string, length: number): string; + } + type LodashPadChars1x5 = (length: number) => string; + type LodashPadChars1x6 = (chars: string) => string; + interface LodashPadCharsEnd { + (chars: string): LodashPadCharsEnd1x1; + (chars: lodash.__, length: number): LodashPadCharsEnd1x2; + (chars: string, length: number): LodashPadCharsEnd1x3; + (chars: lodash.__, length: lodash.__, string: string): LodashPadCharsEnd1x4; + (chars: string, length: lodash.__, string: string): LodashPadCharsEnd1x5; + (chars: lodash.__, length: number, string: string): LodashPadCharsEnd1x6; + (chars: string, length: number, string: string): string; + } + interface LodashPadCharsEnd1x1 { + (length: number): LodashPadCharsEnd1x3; + (length: lodash.__, string: string): LodashPadCharsEnd1x5; + (length: number, string: string): string; + } + interface LodashPadCharsEnd1x2 { + (chars: string): LodashPadCharsEnd1x3; + (chars: lodash.__, string: string): LodashPadCharsEnd1x6; + (chars: string, string: string): string; + } + type LodashPadCharsEnd1x3 = (string: string) => string; + interface LodashPadCharsEnd1x4 { + (chars: string): LodashPadCharsEnd1x5; + (chars: lodash.__, length: number): LodashPadCharsEnd1x6; + (chars: string, length: number): string; + } + type LodashPadCharsEnd1x5 = (length: number) => string; + type LodashPadCharsEnd1x6 = (chars: string) => string; + interface LodashPadCharsStart { + (chars: string): LodashPadCharsStart1x1; + (chars: lodash.__, length: number): LodashPadCharsStart1x2; + (chars: string, length: number): LodashPadCharsStart1x3; + (chars: lodash.__, length: lodash.__, string: string): LodashPadCharsStart1x4; + (chars: string, length: lodash.__, string: string): LodashPadCharsStart1x5; + (chars: lodash.__, length: number, string: string): LodashPadCharsStart1x6; + (chars: string, length: number, string: string): string; + } + interface LodashPadCharsStart1x1 { + (length: number): LodashPadCharsStart1x3; + (length: lodash.__, string: string): LodashPadCharsStart1x5; + (length: number, string: string): string; + } + interface LodashPadCharsStart1x2 { + (chars: string): LodashPadCharsStart1x3; + (chars: lodash.__, string: string): LodashPadCharsStart1x6; + (chars: string, string: string): string; + } + type LodashPadCharsStart1x3 = (string: string) => string; + interface LodashPadCharsStart1x4 { + (chars: string): LodashPadCharsStart1x5; + (chars: lodash.__, length: number): LodashPadCharsStart1x6; + (chars: string, length: number): string; + } + type LodashPadCharsStart1x5 = (length: number) => string; + type LodashPadCharsStart1x6 = (chars: string) => string; + interface LodashPadEnd { + (length: number): LodashPadEnd1x1; + (length: lodash.__, string: string): LodashPadEnd1x2; + (length: number, string: string): string; + } + type LodashPadEnd1x1 = (string: string) => string; + type LodashPadEnd1x2 = (length: number) => string; + interface LodashPadStart { + (length: number): LodashPadStart1x1; + (length: lodash.__, string: string): LodashPadStart1x2; + (length: number, string: string): string; + } + type LodashPadStart1x1 = (string: string) => string; + type LodashPadStart1x2 = (length: number) => string; + interface LodashParseInt { + (radix: number): LodashParseInt1x1; + (radix: lodash.__, string: string): LodashParseInt1x2; + (radix: number, string: string): number; + } + type LodashParseInt1x1 = (string: string) => number; + type LodashParseInt1x2 = (radix: number) => number; + interface LodashPartial { + (args: ReadonlyArray): LodashPartial1x1; + (args: lodash.__, func: (...args: any[]) => any): LodashPartial1x2; + (args: ReadonlyArray, func: (...args: any[]) => any): (...args: any[]) => any; + placeholder: lodash.__; + } + type LodashPartial1x1 = (func: (...args: any[]) => any) => (...args: any[]) => any; + type LodashPartial1x2 = (args: ReadonlyArray) => (...args: any[]) => any; + interface LodashPartialRight { + (args: ReadonlyArray): LodashPartialRight1x1; + (args: lodash.__, func: (...args: any[]) => any): LodashPartialRight1x2; + (args: ReadonlyArray, func: (...args: any[]) => any): (...args: any[]) => any; + placeholder: lodash.__; + } + type LodashPartialRight1x1 = (func: (...args: any[]) => any) => (...args: any[]) => any; + type LodashPartialRight1x2 = (args: ReadonlyArray) => (...args: any[]) => any; + interface LodashPartition { + (callback: lodash.ValueIteratee): LodashPartition1x1; + (callback: lodash.__, collection: lodash.List | null | undefined): LodashPartition1x2; + (callback: lodash.ValueIteratee, collection: lodash.List | null | undefined): [T[], T[]]; + (callback: lodash.__, collection: T | null | undefined): LodashPartition2x2; + (callback: lodash.ValueIteratee, collection: T | null | undefined): [Array, Array]; + } + type LodashPartition1x1 = (collection: lodash.List | object | null | undefined) => [T[], T[]]; + type LodashPartition1x2 = (callback: lodash.ValueIteratee) => [T[], T[]]; + type LodashPartition2x2 = (callback: lodash.ValueIteratee) => [Array, Array]; + interface LodashPath { + (path: TKey | [TKey]): LodashPath1x1; + (path: lodash.__, object: TObject): LodashPath1x2; + (path: TKey | [TKey], object: TObject): TObject[TKey]; + (path: lodash.__, object: TObject | null | undefined): LodashPath2x2; + (path: TKey | [TKey], object: TObject | null | undefined): TObject[TKey] | undefined; + (path: number): LodashPath3x1; + (path: lodash.__, object: lodash.NumericDictionary): LodashPath3x2; + (path: number, object: lodash.NumericDictionary): T; + (path: lodash.__, object: lodash.NumericDictionary | null | undefined): LodashPath4x2; + (path: number, object: lodash.NumericDictionary | null | undefined): T | undefined; + (path: lodash.PropertyPath): LodashPath5x1; + (path: lodash.__, object: null | undefined): LodashPath5x2; + (path: lodash.PropertyPath, object: null | undefined): undefined; + (path: lodash.__, object: any): LodashPath6x2; + (path: lodash.PropertyPath, object: any): any; + } + interface LodashPath1x1 { + (object: TObject): TObject[TKey]; + (object: TObject | null | undefined): TObject[TKey] | undefined; + } + type LodashPath1x2 = (path: TKey | [TKey]) => TObject[TKey]; + type LodashPath2x2 = (path: TKey | [TKey]) => TObject[TKey] | undefined; + interface LodashPath3x1 { + (object: lodash.NumericDictionary): T; + (object: lodash.NumericDictionary | null | undefined): T | undefined; + } + type LodashPath3x2 = (path: number) => T; + type LodashPath4x2 = (path: number) => T | undefined; + interface LodashPath5x1 { + (object: null | undefined): undefined; + (object: any): any; + } + type LodashPath5x2 = (path: lodash.PropertyPath) => undefined; + type LodashPath6x2 = (path: lodash.PropertyPath) => any; + interface LodashPathOr { + (defaultValue: TDefault): LodashPathOr1x1; + (defaultValue: lodash.__, path: TKey | [TKey]): LodashPathOr1x2; + (defaultValue: TDefault, path: TKey | [TKey]): LodashPathOr1x3; + (defaultValue: lodash.__, path: lodash.__, object: TObject | null | undefined): LodashPathOr1x4; + (defaultValue: TDefault, path: lodash.__, object: TObject | null | undefined): LodashPathOr1x5; + (defaultValue: lodash.__, path: TKey | [TKey], object: TObject | null | undefined): LodashPathOr1x6; + (defaultValue: TDefault, path: TKey | [TKey], object: TObject | null | undefined): TObject[TKey] | TDefault; + (defaultValue: lodash.__, path: number): LodashPathOr2x2; + (defaultValue: TDefault, path: number): LodashPathOr2x3; + (defaultValue: lodash.__, path: lodash.__, object: lodash.NumericDictionary | null | undefined): LodashPathOr2x4; + (defaultValue: TDefault, path: lodash.__, object: lodash.NumericDictionary | null | undefined): LodashPathOr2x5; + (defaultValue: lodash.__, path: number, object: lodash.NumericDictionary | null | undefined): LodashPathOr2x6; + (defaultValue: TDefault, path: number, object: lodash.NumericDictionary | null | undefined): T | TDefault; + (defaultValue: lodash.__, path: lodash.PropertyPath): LodashPathOr3x2; + (defaultValue: TDefault, path: lodash.PropertyPath): LodashPathOr3x3; + (defaultValue: lodash.__, path: lodash.__, object: null | undefined): LodashPathOr3x4; + (defaultValue: TDefault, path: lodash.__, object: null | undefined): LodashPathOr3x5; + (defaultValue: lodash.__, path: lodash.PropertyPath, object: null | undefined): LodashPathOr3x6; + (defaultValue: TDefault, path: lodash.PropertyPath, object: null | undefined): TDefault; + (defaultValue: any): LodashPathOr4x1; + (defaultValue: any, path: lodash.PropertyPath): LodashPathOr4x3; + (defaultValue: lodash.__, path: lodash.__, object: any): LodashPathOr4x4; + (defaultValue: any, path: lodash.__, object: any): LodashPathOr4x5; + (defaultValue: lodash.__, path: lodash.PropertyPath, object: any): LodashPathOr4x6; + (defaultValue: any, path: lodash.PropertyPath, object: any): any; + } + interface LodashPathOr1x1 { + (path: TKey | [TKey]): LodashPathOr1x3; + (path: lodash.__, object: TObject | null | undefined): LodashPathOr1x5; + (path: TKey | [TKey], object: TObject | null | undefined): TObject[TKey] | TDefault; + (path: number): LodashPathOr2x3; + (path: lodash.__, object: lodash.NumericDictionary | null | undefined): LodashPathOr2x5; + (path: number, object: lodash.NumericDictionary | null | undefined): T | TDefault; + (path: lodash.PropertyPath): LodashPathOr3x3; + (path: lodash.__, object: null | undefined): LodashPathOr3x5; + (path: lodash.PropertyPath, object: null | undefined): TDefault; + } + interface LodashPathOr1x2 { + (defaultValue: TDefault): LodashPathOr1x3; + (defaultValue: lodash.__, object: TObject | null | undefined): LodashPathOr1x6; + (defaultValue: TDefault, object: TObject | null | undefined): TObject[TKey] | TDefault; + } + type LodashPathOr1x3 = (object: TObject | null | undefined) => TObject[TKey] | TDefault; + interface LodashPathOr1x4 { + (defaultValue: TDefault): LodashPathOr1x5; + (defaultValue: lodash.__, path: TKey | [TKey]): LodashPathOr1x6; + (defaultValue: TDefault, path: TKey | [TKey]): TObject[TKey] | TDefault; + } + type LodashPathOr1x5 = (path: TKey | [TKey]) => TObject[TKey] | TDefault; + type LodashPathOr1x6 = (defaultValue: TDefault) => TObject[TKey] | TDefault; + interface LodashPathOr2x2 { + (defaultValue: TDefault): LodashPathOr2x3; + (defaultValue: lodash.__, object: lodash.NumericDictionary | null | undefined): LodashPathOr2x6; + (defaultValue: TDefault, object: lodash.NumericDictionary | null | undefined): T | TDefault; + } + type LodashPathOr2x3 = (object: lodash.NumericDictionary | null | undefined) => T | TDefault; + interface LodashPathOr2x4 { + (defaultValue: TDefault): LodashPathOr2x5; + (defaultValue: lodash.__, path: number): LodashPathOr2x6; + (defaultValue: TDefault, path: number): T | TDefault; + } + type LodashPathOr2x5 = (path: number) => T | TDefault; + type LodashPathOr2x6 = (defaultValue: TDefault) => T | TDefault; + interface LodashPathOr3x2 { + (defaultValue: TDefault): LodashPathOr3x3; + (defaultValue: lodash.__, object: null | undefined): LodashPathOr3x6; + (defaultValue: TDefault, object: null | undefined): TDefault; + (defaultValue: any): LodashPathOr4x3; + (defaultValue: lodash.__, object: any): LodashPathOr4x6; + (defaultValue: any, object: any): any; + } + type LodashPathOr3x3 = (object: null | undefined) => TDefault; + interface LodashPathOr3x4 { + (defaultValue: TDefault): LodashPathOr3x5; + (defaultValue: lodash.__, path: lodash.PropertyPath): LodashPathOr3x6; + (defaultValue: TDefault, path: lodash.PropertyPath): TDefault; + } + type LodashPathOr3x5 = (path: lodash.PropertyPath) => TDefault; + type LodashPathOr3x6 = (defaultValue: TDefault) => TDefault; + interface LodashPathOr4x1 { + (path: lodash.PropertyPath): LodashPathOr4x3; + (path: lodash.__, object: any): LodashPathOr4x5; + (path: lodash.PropertyPath, object: any): any; + } + type LodashPathOr4x3 = (object: any) => any; + interface LodashPathOr4x4 { + (defaultValue: any): LodashPathOr4x5; + (defaultValue: lodash.__, path: lodash.PropertyPath): LodashPathOr4x6; + (defaultValue: any, path: lodash.PropertyPath): any; + } + type LodashPathOr4x5 = (path: lodash.PropertyPath) => any; + type LodashPathOr4x6 = (defaultValue: any) => any; + interface LodashPick { + (props: lodash.Many): LodashPick1x1; + (props: lodash.__, object: T): LodashPick1x2; + (props: lodash.Many, object: T): Pick; + (props: lodash.PropertyPath): LodashPick2x1; + (props: lodash.__, object: T | null | undefined): LodashPick2x2; + (props: lodash.PropertyPath, object: T | null | undefined): lodash.PartialDeep; + } + type LodashPick1x1 = (object: T) => Pick; + type LodashPick1x2 = (props: lodash.Many) => Pick; + type LodashPick2x1 = (object: T | null | undefined) => lodash.PartialDeep; + type LodashPick2x2 = (props: lodash.PropertyPath) => lodash.PartialDeep; + interface LodashPickBy { + (predicate: lodash.ValueKeyIteratee): LodashPickBy1x1; + (predicate: lodash.__, object: T | null | undefined): LodashPickBy1x2; + (predicate: lodash.ValueKeyIteratee, object: T | null | undefined): lodash.PartialObject; + } + type LodashPickBy1x1 = (object: T1 | null | undefined) => lodash.PartialObject; + type LodashPickBy1x2 = (predicate: lodash.ValueKeyIteratee) => lodash.PartialObject; + interface LodashProp { + (path: TKey | [TKey]): LodashProp1x1; + (path: lodash.__, object: TObject): LodashProp1x2; + (path: TKey | [TKey], object: TObject): TObject[TKey]; + (path: lodash.__, object: TObject | null | undefined): LodashProp2x2; + (path: TKey | [TKey], object: TObject | null | undefined): TObject[TKey] | undefined; + (path: number): LodashProp3x1; + (path: lodash.__, object: lodash.NumericDictionary): LodashProp3x2; + (path: number, object: lodash.NumericDictionary): T; + (path: lodash.__, object: lodash.NumericDictionary | null | undefined): LodashProp4x2; + (path: number, object: lodash.NumericDictionary | null | undefined): T | undefined; + (path: lodash.PropertyPath): LodashProp5x1; + (path: lodash.__, object: null | undefined): LodashProp5x2; + (path: lodash.PropertyPath, object: null | undefined): undefined; + (path: lodash.__, object: any): LodashProp6x2; + (path: lodash.PropertyPath, object: any): any; + } + interface LodashProp1x1 { + (object: TObject): TObject[TKey]; + (object: TObject | null | undefined): TObject[TKey] | undefined; + } + type LodashProp1x2 = (path: TKey | [TKey]) => TObject[TKey]; + type LodashProp2x2 = (path: TKey | [TKey]) => TObject[TKey] | undefined; + interface LodashProp3x1 { + (object: lodash.NumericDictionary): T; + (object: lodash.NumericDictionary | null | undefined): T | undefined; + } + type LodashProp3x2 = (path: number) => T; + type LodashProp4x2 = (path: number) => T | undefined; + interface LodashProp5x1 { + (object: null | undefined): undefined; + (object: any): any; + } + type LodashProp5x2 = (path: lodash.PropertyPath) => undefined; + type LodashProp6x2 = (path: lodash.PropertyPath) => any; + interface LodashProperty { + (path: TKey | [TKey]): LodashProperty1x1; + (path: lodash.__, object: TObject): LodashProperty1x2; + (path: TKey | [TKey], object: TObject): TObject[TKey]; + (path: lodash.__, object: TObject | null | undefined): LodashProperty2x2; + (path: TKey | [TKey], object: TObject | null | undefined): TObject[TKey] | undefined; + (path: number): LodashProperty3x1; + (path: lodash.__, object: lodash.NumericDictionary): LodashProperty3x2; + (path: number, object: lodash.NumericDictionary): T; + (path: lodash.__, object: lodash.NumericDictionary | null | undefined): LodashProperty4x2; + (path: number, object: lodash.NumericDictionary | null | undefined): T | undefined; + (path: lodash.PropertyPath): LodashProperty5x1; + (path: lodash.__, object: null | undefined): LodashProperty5x2; + (path: lodash.PropertyPath, object: null | undefined): undefined; + (path: lodash.__, object: any): LodashProperty6x2; + (path: lodash.PropertyPath, object: any): any; + } + interface LodashProperty1x1 { + (object: TObject): TObject[TKey]; + (object: TObject | null | undefined): TObject[TKey] | undefined; + } + type LodashProperty1x2 = (path: TKey | [TKey]) => TObject[TKey]; + type LodashProperty2x2 = (path: TKey | [TKey]) => TObject[TKey] | undefined; + interface LodashProperty3x1 { + (object: lodash.NumericDictionary): T; + (object: lodash.NumericDictionary | null | undefined): T | undefined; + } + type LodashProperty3x2 = (path: number) => T; + type LodashProperty4x2 = (path: number) => T | undefined; + interface LodashProperty5x1 { + (object: null | undefined): undefined; + (object: any): any; + } + type LodashProperty5x2 = (path: lodash.PropertyPath) => undefined; + type LodashProperty6x2 = (path: lodash.PropertyPath) => any; + interface LodashPropertyOf { + (path: TKey | [TKey]): LodashPropertyOf1x1; + (path: lodash.__, object: TObject): LodashPropertyOf1x2; + (path: TKey | [TKey], object: TObject): TObject[TKey]; + (path: lodash.__, object: TObject | null | undefined): LodashPropertyOf2x2; + (path: TKey | [TKey], object: TObject | null | undefined): TObject[TKey] | undefined; + (path: number): LodashPropertyOf3x1; + (path: lodash.__, object: lodash.NumericDictionary): LodashPropertyOf3x2; + (path: number, object: lodash.NumericDictionary): T; + (path: lodash.__, object: lodash.NumericDictionary | null | undefined): LodashPropertyOf4x2; + (path: number, object: lodash.NumericDictionary | null | undefined): T | undefined; + (path: lodash.PropertyPath): LodashPropertyOf5x1; + (path: lodash.__, object: null | undefined): LodashPropertyOf5x2; + (path: lodash.PropertyPath, object: null | undefined): undefined; + (path: lodash.__, object: any): LodashPropertyOf6x2; + (path: lodash.PropertyPath, object: any): any; + } + interface LodashPropertyOf1x1 { + (object: TObject): TObject[TKey]; + (object: TObject | null | undefined): TObject[TKey] | undefined; + } + type LodashPropertyOf1x2 = (path: TKey | [TKey]) => TObject[TKey]; + type LodashPropertyOf2x2 = (path: TKey | [TKey]) => TObject[TKey] | undefined; + interface LodashPropertyOf3x1 { + (object: lodash.NumericDictionary): T; + (object: lodash.NumericDictionary | null | undefined): T | undefined; + } + type LodashPropertyOf3x2 = (path: number) => T; + type LodashPropertyOf4x2 = (path: number) => T | undefined; + interface LodashPropertyOf5x1 { + (object: null | undefined): undefined; + (object: any): any; + } + type LodashPropertyOf5x2 = (path: lodash.PropertyPath) => undefined; + type LodashPropertyOf6x2 = (path: lodash.PropertyPath) => any; + interface LodashPropOr { + (defaultValue: TDefault): LodashPropOr1x1; + (defaultValue: lodash.__, path: TKey | [TKey]): LodashPropOr1x2; + (defaultValue: TDefault, path: TKey | [TKey]): LodashPropOr1x3; + (defaultValue: lodash.__, path: lodash.__, object: TObject | null | undefined): LodashPropOr1x4; + (defaultValue: TDefault, path: lodash.__, object: TObject | null | undefined): LodashPropOr1x5; + (defaultValue: lodash.__, path: TKey | [TKey], object: TObject | null | undefined): LodashPropOr1x6; + (defaultValue: TDefault, path: TKey | [TKey], object: TObject | null | undefined): TObject[TKey] | TDefault; + (defaultValue: lodash.__, path: number): LodashPropOr2x2; + (defaultValue: TDefault, path: number): LodashPropOr2x3; + (defaultValue: lodash.__, path: lodash.__, object: lodash.NumericDictionary | null | undefined): LodashPropOr2x4; + (defaultValue: TDefault, path: lodash.__, object: lodash.NumericDictionary | null | undefined): LodashPropOr2x5; + (defaultValue: lodash.__, path: number, object: lodash.NumericDictionary | null | undefined): LodashPropOr2x6; + (defaultValue: TDefault, path: number, object: lodash.NumericDictionary | null | undefined): T | TDefault; + (defaultValue: lodash.__, path: lodash.PropertyPath): LodashPropOr3x2; + (defaultValue: TDefault, path: lodash.PropertyPath): LodashPropOr3x3; + (defaultValue: lodash.__, path: lodash.__, object: null | undefined): LodashPropOr3x4; + (defaultValue: TDefault, path: lodash.__, object: null | undefined): LodashPropOr3x5; + (defaultValue: lodash.__, path: lodash.PropertyPath, object: null | undefined): LodashPropOr3x6; + (defaultValue: TDefault, path: lodash.PropertyPath, object: null | undefined): TDefault; + (defaultValue: any): LodashPropOr4x1; + (defaultValue: any, path: lodash.PropertyPath): LodashPropOr4x3; + (defaultValue: lodash.__, path: lodash.__, object: any): LodashPropOr4x4; + (defaultValue: any, path: lodash.__, object: any): LodashPropOr4x5; + (defaultValue: lodash.__, path: lodash.PropertyPath, object: any): LodashPropOr4x6; + (defaultValue: any, path: lodash.PropertyPath, object: any): any; + } + interface LodashPropOr1x1 { + (path: TKey | [TKey]): LodashPropOr1x3; + (path: lodash.__, object: TObject | null | undefined): LodashPropOr1x5; + (path: TKey | [TKey], object: TObject | null | undefined): TObject[TKey] | TDefault; + (path: number): LodashPropOr2x3; + (path: lodash.__, object: lodash.NumericDictionary | null | undefined): LodashPropOr2x5; + (path: number, object: lodash.NumericDictionary | null | undefined): T | TDefault; + (path: lodash.PropertyPath): LodashPropOr3x3; + (path: lodash.__, object: null | undefined): LodashPropOr3x5; + (path: lodash.PropertyPath, object: null | undefined): TDefault; + } + interface LodashPropOr1x2 { + (defaultValue: TDefault): LodashPropOr1x3; + (defaultValue: lodash.__, object: TObject | null | undefined): LodashPropOr1x6; + (defaultValue: TDefault, object: TObject | null | undefined): TObject[TKey] | TDefault; + } + type LodashPropOr1x3 = (object: TObject | null | undefined) => TObject[TKey] | TDefault; + interface LodashPropOr1x4 { + (defaultValue: TDefault): LodashPropOr1x5; + (defaultValue: lodash.__, path: TKey | [TKey]): LodashPropOr1x6; + (defaultValue: TDefault, path: TKey | [TKey]): TObject[TKey] | TDefault; + } + type LodashPropOr1x5 = (path: TKey | [TKey]) => TObject[TKey] | TDefault; + type LodashPropOr1x6 = (defaultValue: TDefault) => TObject[TKey] | TDefault; + interface LodashPropOr2x2 { + (defaultValue: TDefault): LodashPropOr2x3; + (defaultValue: lodash.__, object: lodash.NumericDictionary | null | undefined): LodashPropOr2x6; + (defaultValue: TDefault, object: lodash.NumericDictionary | null | undefined): T | TDefault; + } + type LodashPropOr2x3 = (object: lodash.NumericDictionary | null | undefined) => T | TDefault; + interface LodashPropOr2x4 { + (defaultValue: TDefault): LodashPropOr2x5; + (defaultValue: lodash.__, path: number): LodashPropOr2x6; + (defaultValue: TDefault, path: number): T | TDefault; + } + type LodashPropOr2x5 = (path: number) => T | TDefault; + type LodashPropOr2x6 = (defaultValue: TDefault) => T | TDefault; + interface LodashPropOr3x2 { + (defaultValue: TDefault): LodashPropOr3x3; + (defaultValue: lodash.__, object: null | undefined): LodashPropOr3x6; + (defaultValue: TDefault, object: null | undefined): TDefault; + (defaultValue: any): LodashPropOr4x3; + (defaultValue: lodash.__, object: any): LodashPropOr4x6; + (defaultValue: any, object: any): any; + } + type LodashPropOr3x3 = (object: null | undefined) => TDefault; + interface LodashPropOr3x4 { + (defaultValue: TDefault): LodashPropOr3x5; + (defaultValue: lodash.__, path: lodash.PropertyPath): LodashPropOr3x6; + (defaultValue: TDefault, path: lodash.PropertyPath): TDefault; + } + type LodashPropOr3x5 = (path: lodash.PropertyPath) => TDefault; + type LodashPropOr3x6 = (defaultValue: TDefault) => TDefault; + interface LodashPropOr4x1 { + (path: lodash.PropertyPath): LodashPropOr4x3; + (path: lodash.__, object: any): LodashPropOr4x5; + (path: lodash.PropertyPath, object: any): any; + } + type LodashPropOr4x3 = (object: any) => any; + interface LodashPropOr4x4 { + (defaultValue: any): LodashPropOr4x5; + (defaultValue: lodash.__, path: lodash.PropertyPath): LodashPropOr4x6; + (defaultValue: any, path: lodash.PropertyPath): any; + } + type LodashPropOr4x5 = (path: lodash.PropertyPath) => any; + type LodashPropOr4x6 = (defaultValue: any) => any; + interface LodashPull { + (values: T): LodashPull1x1; + (values: lodash.__, array: ReadonlyArray): LodashPull1x2; + (values: T, array: ReadonlyArray): T[]; + (values: lodash.__, array: lodash.List): LodashPull2x2; + (values: T, array: lodash.List): lodash.List; + } + interface LodashPull1x1 { + (array: ReadonlyArray): T[]; + (array: lodash.List): lodash.List; + } + type LodashPull1x2 = (values: T) => T[]; + type LodashPull2x2 = (values: T) => lodash.List; + interface LodashPullAll { + (values: lodash.List): LodashPullAll1x1; + (values: lodash.__, array: ReadonlyArray): LodashPullAll1x2; + (values: lodash.List, array: ReadonlyArray): T[]; + (values: lodash.__, array: lodash.List): LodashPullAll2x2; + (values: lodash.List, array: lodash.List): lodash.List; + } + interface LodashPullAll1x1 { + (array: ReadonlyArray): T[]; + (array: lodash.List): lodash.List; + } + type LodashPullAll1x2 = (values: lodash.List) => T[]; + type LodashPullAll2x2 = (values: lodash.List) => lodash.List; + interface LodashPullAllBy { + (iteratee: lodash.ValueIteratee): LodashPullAllBy1x1; + (iteratee: lodash.__, values: lodash.List): LodashPullAllBy1x2; + (iteratee: lodash.ValueIteratee, values: lodash.List): LodashPullAllBy1x3; + (iteratee: lodash.__, values: lodash.__, array: ReadonlyArray): LodashPullAllBy1x4; + (iteratee: lodash.ValueIteratee, values: lodash.__, array: ReadonlyArray): LodashPullAllBy1x5; + (iteratee: lodash.__, values: lodash.List, array: ReadonlyArray): LodashPullAllBy1x6; + (iteratee: lodash.ValueIteratee, values: lodash.List, array: ReadonlyArray): T[]; + (iteratee: lodash.__, values: lodash.__, array: lodash.List): LodashPullAllBy2x4; + (iteratee: lodash.ValueIteratee, values: lodash.__, array: lodash.List): LodashPullAllBy2x5; + (iteratee: lodash.__, values: lodash.List, array: lodash.List): LodashPullAllBy2x6; + (iteratee: lodash.ValueIteratee, values: lodash.List, array: lodash.List): lodash.List; + (iteratee: lodash.ValueIteratee): LodashPullAllBy3x1; + (iteratee: lodash.__, values: lodash.List): LodashPullAllBy3x2; + (iteratee: lodash.ValueIteratee, values: lodash.List): LodashPullAllBy3x3; + (iteratee: lodash.__, values: lodash.__, array: ReadonlyArray): LodashPullAllBy3x4; + (iteratee: lodash.ValueIteratee, values: lodash.__, array: ReadonlyArray): LodashPullAllBy3x5; + (iteratee: lodash.__, values: lodash.List, array: ReadonlyArray): LodashPullAllBy3x6; + (iteratee: lodash.ValueIteratee, values: lodash.List, array: ReadonlyArray): T1[]; + (iteratee: lodash.__, values: lodash.__, array: lodash.List): LodashPullAllBy4x4; + (iteratee: lodash.ValueIteratee, values: lodash.__, array: lodash.List): LodashPullAllBy4x5; + (iteratee: lodash.__, values: lodash.List, array: lodash.List): LodashPullAllBy4x6; + (iteratee: lodash.ValueIteratee, values: lodash.List, array: lodash.List): lodash.List; + } + interface LodashPullAllBy1x1 { + (values: lodash.List): LodashPullAllBy1x3; + (values: lodash.__, array: ReadonlyArray): LodashPullAllBy1x5; + (values: lodash.List, array: ReadonlyArray): T[]; + (values: lodash.__, array: lodash.List): LodashPullAllBy2x5; + (values: lodash.List, array: lodash.List): lodash.List; + } + interface LodashPullAllBy1x2 { + (iteratee: lodash.ValueIteratee): LodashPullAllBy1x3; + (iteratee: lodash.__, array: ReadonlyArray): LodashPullAllBy1x6; + (iteratee: lodash.ValueIteratee, array: ReadonlyArray): T[]; + (iteratee: lodash.__, array: lodash.List): LodashPullAllBy2x6; + (iteratee: lodash.ValueIteratee, array: lodash.List): lodash.List; + } + interface LodashPullAllBy1x3 { + (array: ReadonlyArray): T[]; + (array: lodash.List): lodash.List; + } + interface LodashPullAllBy1x4 { + (iteratee: lodash.ValueIteratee): LodashPullAllBy1x5; + (iteratee: lodash.__, values: lodash.List): LodashPullAllBy1x6; + (iteratee: lodash.ValueIteratee, values: lodash.List): T[]; + } + type LodashPullAllBy1x5 = (values: lodash.List) => T[]; + type LodashPullAllBy1x6 = (iteratee: lodash.ValueIteratee) => T[]; + interface LodashPullAllBy2x4 { + (iteratee: lodash.ValueIteratee): LodashPullAllBy2x5; + (iteratee: lodash.__, values: lodash.List): LodashPullAllBy2x6; + (iteratee: lodash.ValueIteratee, values: lodash.List): lodash.List; + } + type LodashPullAllBy2x5 = (values: lodash.List) => lodash.List; + type LodashPullAllBy2x6 = (iteratee: lodash.ValueIteratee) => lodash.List; + interface LodashPullAllBy3x1 { + (values: lodash.List): LodashPullAllBy3x3; + (values: lodash.__, array: ReadonlyArray): LodashPullAllBy3x5; + (values: lodash.List, array: ReadonlyArray): T1[]; + (values: lodash.__, array: lodash.List): LodashPullAllBy4x5; + (values: lodash.List, array: lodash.List): lodash.List; + } + interface LodashPullAllBy3x2 { + (iteratee: lodash.ValueIteratee): LodashPullAllBy3x3; + (iteratee: lodash.__, array: ReadonlyArray): LodashPullAllBy3x6; + (iteratee: lodash.ValueIteratee, array: ReadonlyArray): T1[]; + (iteratee: lodash.__, array: lodash.List): LodashPullAllBy4x6; + (iteratee: lodash.ValueIteratee, array: lodash.List): lodash.List; + } + interface LodashPullAllBy3x3 { + (array: ReadonlyArray): T1[]; + (array: lodash.List): lodash.List; + } + interface LodashPullAllBy3x4 { + (iteratee: lodash.ValueIteratee): LodashPullAllBy3x5; + (iteratee: lodash.__, values: lodash.List): LodashPullAllBy3x6; + (iteratee: lodash.ValueIteratee, values: lodash.List): T1[]; + } + type LodashPullAllBy3x5 = (values: lodash.List) => T1[]; + type LodashPullAllBy3x6 = (iteratee: lodash.ValueIteratee) => T1[]; + interface LodashPullAllBy4x4 { + (iteratee: lodash.ValueIteratee): LodashPullAllBy4x5; + (iteratee: lodash.__, values: lodash.List): LodashPullAllBy4x6; + (iteratee: lodash.ValueIteratee, values: lodash.List): lodash.List; + } + type LodashPullAllBy4x5 = (values: lodash.List) => lodash.List; + type LodashPullAllBy4x6 = (iteratee: lodash.ValueIteratee) => lodash.List; + interface LodashPullAllWith { + (comparator: lodash.Comparator): LodashPullAllWith1x1; + (comparator: lodash.__, values: lodash.List): LodashPullAllWith1x2; + (comparator: lodash.Comparator, values: lodash.List): LodashPullAllWith1x3; + (comparator: lodash.__, values: lodash.__, array: ReadonlyArray): LodashPullAllWith1x4; + (comparator: lodash.Comparator, values: lodash.__, array: ReadonlyArray): LodashPullAllWith1x5; + (comparator: lodash.__, values: lodash.List, array: ReadonlyArray): LodashPullAllWith1x6; + (comparator: lodash.Comparator, values: lodash.List, array: ReadonlyArray): T[]; + (comparator: lodash.__, values: lodash.__, array: lodash.List): LodashPullAllWith2x4; + (comparator: lodash.Comparator, values: lodash.__, array: lodash.List): LodashPullAllWith2x5; + (comparator: lodash.__, values: lodash.List, array: lodash.List): LodashPullAllWith2x6; + (comparator: lodash.Comparator, values: lodash.List, array: lodash.List): lodash.List; + (comparator: lodash.Comparator2): LodashPullAllWith3x1; + (comparator: lodash.__, values: lodash.List): LodashPullAllWith3x2; + (comparator: lodash.Comparator2, values: lodash.List): LodashPullAllWith3x3; + (comparator: lodash.__, values: lodash.__, array: ReadonlyArray): LodashPullAllWith3x4; + (comparator: lodash.Comparator2, values: lodash.__, array: ReadonlyArray): LodashPullAllWith3x5; + (comparator: lodash.__, values: lodash.List, array: ReadonlyArray): LodashPullAllWith3x6; + (comparator: lodash.Comparator2, values: lodash.List, array: ReadonlyArray): T1[]; + (comparator: lodash.__, values: lodash.__, array: lodash.List): LodashPullAllWith4x4; + (comparator: lodash.Comparator2, values: lodash.__, array: lodash.List): LodashPullAllWith4x5; + (comparator: lodash.__, values: lodash.List, array: lodash.List): LodashPullAllWith4x6; + (comparator: lodash.Comparator2, values: lodash.List, array: lodash.List): lodash.List; + } + interface LodashPullAllWith1x1 { + (values: lodash.List): LodashPullAllWith1x3; + (values: lodash.__, array: ReadonlyArray): LodashPullAllWith1x5; + (values: lodash.List, array: ReadonlyArray): T[]; + (values: lodash.__, array: lodash.List): LodashPullAllWith2x5; + (values: lodash.List, array: lodash.List): lodash.List; + } + interface LodashPullAllWith1x2 { + (comparator: lodash.Comparator): LodashPullAllWith1x3; + (comparator: lodash.__, array: ReadonlyArray): LodashPullAllWith1x6; + (comparator: lodash.Comparator, array: ReadonlyArray): T[]; + (comparator: lodash.__, array: lodash.List): LodashPullAllWith2x6; + (comparator: lodash.Comparator, array: lodash.List): lodash.List; + } + interface LodashPullAllWith1x3 { + (array: ReadonlyArray): T[]; + (array: lodash.List): lodash.List; + } + interface LodashPullAllWith1x4 { + (comparator: lodash.Comparator): LodashPullAllWith1x5; + (comparator: lodash.__, values: lodash.List): LodashPullAllWith1x6; + (comparator: lodash.Comparator, values: lodash.List): T[]; + } + type LodashPullAllWith1x5 = (values: lodash.List) => T[]; + type LodashPullAllWith1x6 = (comparator: lodash.Comparator) => T[]; + interface LodashPullAllWith2x4 { + (comparator: lodash.Comparator): LodashPullAllWith2x5; + (comparator: lodash.__, values: lodash.List): LodashPullAllWith2x6; + (comparator: lodash.Comparator, values: lodash.List): lodash.List; + } + type LodashPullAllWith2x5 = (values: lodash.List) => lodash.List; + type LodashPullAllWith2x6 = (comparator: lodash.Comparator) => lodash.List; + interface LodashPullAllWith3x1 { + (values: lodash.List): LodashPullAllWith3x3; + (values: lodash.__, array: ReadonlyArray): LodashPullAllWith3x5; + (values: lodash.List, array: ReadonlyArray): T1[]; + (values: lodash.__, array: lodash.List): LodashPullAllWith4x5; + (values: lodash.List, array: lodash.List): lodash.List; + } + interface LodashPullAllWith3x2 { + (comparator: lodash.Comparator2): LodashPullAllWith3x3; + (comparator: lodash.__, array: ReadonlyArray): LodashPullAllWith3x6; + (comparator: lodash.Comparator2, array: ReadonlyArray): T1[]; + (comparator: lodash.__, array: lodash.List): LodashPullAllWith4x6; + (comparator: lodash.Comparator2, array: lodash.List): lodash.List; + } + interface LodashPullAllWith3x3 { + (array: ReadonlyArray): T1[]; + (array: lodash.List): lodash.List; + } + interface LodashPullAllWith3x4 { + (comparator: lodash.Comparator2): LodashPullAllWith3x5; + (comparator: lodash.__, values: lodash.List): LodashPullAllWith3x6; + (comparator: lodash.Comparator2, values: lodash.List): T1[]; + } + type LodashPullAllWith3x5 = (values: lodash.List) => T1[]; + type LodashPullAllWith3x6 = (comparator: lodash.Comparator2) => T1[]; + interface LodashPullAllWith4x4 { + (comparator: lodash.Comparator2): LodashPullAllWith4x5; + (comparator: lodash.__, values: lodash.List): LodashPullAllWith4x6; + (comparator: lodash.Comparator2, values: lodash.List): lodash.List; + } + type LodashPullAllWith4x5 = (values: lodash.List) => lodash.List; + type LodashPullAllWith4x6 = (comparator: lodash.Comparator2) => lodash.List; + interface LodashPullAt { + (indexes: lodash.Many): LodashPullAt1x1; + (indexes: lodash.__, array: ReadonlyArray): LodashPullAt1x2; + (indexes: lodash.Many, array: ReadonlyArray): T[]; + (indexes: lodash.__, array: lodash.List): LodashPullAt2x2; + (indexes: lodash.Many, array: lodash.List): lodash.List; + } + interface LodashPullAt1x1 { + (array: ReadonlyArray): T[]; + (array: lodash.List): lodash.List; + } + type LodashPullAt1x2 = (indexes: lodash.Many) => T[]; + type LodashPullAt2x2 = (indexes: lodash.Many) => lodash.List; + interface LodashRandom { + (maxOrMin: number): LodashRandom1x1; + (max: lodash.__, floating: boolean): LodashRandom1x2; + (maxOrMin: number, floatingOrMax: boolean | number): number; + (min: lodash.__, max: number): LodashRandom2x2; + } + type LodashRandom1x1 = (floatingOrMax: boolean | number) => number; + type LodashRandom1x2 = (max: number) => number; + type LodashRandom2x2 = (min: number) => number; + interface LodashRange { + (start: number): LodashRange1x1; + (start: lodash.__, end: number): LodashRange1x2; + (start: number, end: number): number[]; + } + type LodashRange1x1 = (end: number) => number[]; + type LodashRange1x2 = (start: number) => number[]; + interface LodashRangeRight { + (start: number): LodashRangeRight1x1; + (start: lodash.__, end: number): LodashRangeRight1x2; + (start: number, end: number): number[]; + } + type LodashRangeRight1x1 = (end: number) => number[]; + type LodashRangeRight1x2 = (start: number) => number[]; + interface LodashRangeStep { + (start: number): LodashRangeStep1x1; + (start: lodash.__, end: number): LodashRangeStep1x2; + (start: number, end: number): LodashRangeStep1x3; + (start: lodash.__, end: lodash.__, step: number): LodashRangeStep1x4; + (start: number, end: lodash.__, step: number): LodashRangeStep1x5; + (start: lodash.__, end: number, step: number): LodashRangeStep1x6; + (start: number, end: number, step: number): number[]; + } + interface LodashRangeStep1x1 { + (end: number): LodashRangeStep1x3; + (end: lodash.__, step: number): LodashRangeStep1x5; + (end: number, step: number): number[]; + } + interface LodashRangeStep1x2 { + (start: number): LodashRangeStep1x3; + (start: lodash.__, step: number): LodashRangeStep1x6; + (start: number, step: number): number[]; + } + type LodashRangeStep1x3 = (step: number) => number[]; + interface LodashRangeStep1x4 { + (start: number): LodashRangeStep1x5; + (start: lodash.__, end: number): LodashRangeStep1x6; + (start: number, end: number): number[]; + } + type LodashRangeStep1x5 = (end: number) => number[]; + type LodashRangeStep1x6 = (start: number) => number[]; + interface LodashRangeStepRight { + (start: number): LodashRangeStepRight1x1; + (start: lodash.__, end: number): LodashRangeStepRight1x2; + (start: number, end: number): LodashRangeStepRight1x3; + (start: lodash.__, end: lodash.__, step: number): LodashRangeStepRight1x4; + (start: number, end: lodash.__, step: number): LodashRangeStepRight1x5; + (start: lodash.__, end: number, step: number): LodashRangeStepRight1x6; + (start: number, end: number, step: number): number[]; + } + interface LodashRangeStepRight1x1 { + (end: number): LodashRangeStepRight1x3; + (end: lodash.__, step: number): LodashRangeStepRight1x5; + (end: number, step: number): number[]; + } + interface LodashRangeStepRight1x2 { + (start: number): LodashRangeStepRight1x3; + (start: lodash.__, step: number): LodashRangeStepRight1x6; + (start: number, step: number): number[]; + } + type LodashRangeStepRight1x3 = (step: number) => number[]; + interface LodashRangeStepRight1x4 { + (start: number): LodashRangeStepRight1x5; + (start: lodash.__, end: number): LodashRangeStepRight1x6; + (start: number, end: number): number[]; + } + type LodashRangeStepRight1x5 = (end: number) => number[]; + type LodashRangeStepRight1x6 = (start: number) => number[]; + interface LodashRearg { + (indexes: lodash.Many): LodashRearg1x1; + (indexes: lodash.__, func: (...args: any[]) => any): LodashRearg1x2; + (indexes: lodash.Many, func: (...args: any[]) => any): (...args: any[]) => any; + } + type LodashRearg1x1 = (func: (...args: any[]) => any) => (...args: any[]) => any; + type LodashRearg1x2 = (indexes: lodash.Many) => (...args: any[]) => any; + interface LodashReduce { + (callback: lodash.MemoIteratorCapped): LodashReduce1x1; + (callback: lodash.__, accumulator: TResult): LodashReduce1x2; + (callback: lodash.MemoIteratorCapped, accumulator: TResult): LodashReduce1x3; + (callback: lodash.__, accumulator: lodash.__, collection: T[] | null | undefined): LodashReduce1x4; + (callback: lodash.MemoIteratorCapped, accumulator: lodash.__, collection: T[] | null | undefined): LodashReduce1x5; + (callback: lodash.__, accumulator: TResult, collection: T[] | null | undefined): LodashReduce1x6; + (callback: lodash.MemoIteratorCapped, accumulator: TResult, collection: T[] | lodash.List | null | undefined): TResult; + (callback: lodash.__, accumulator: lodash.__, collection: lodash.List | null | undefined): LodashReduce2x4; + (callback: lodash.MemoIteratorCapped, accumulator: lodash.__, collection: lodash.List | null | undefined): LodashReduce2x5; + (callback: lodash.__, accumulator: TResult, collection: lodash.List | null | undefined): LodashReduce2x6; + (callback: lodash.MemoIteratorCapped): LodashReduce3x1; + (callback: lodash.MemoIteratorCapped, accumulator: TResult): LodashReduce3x3; + (callback: lodash.__, accumulator: lodash.__, collection: T | null | undefined): LodashReduce3x4; + (callback: lodash.MemoIteratorCapped, accumulator: lodash.__, collection: T | null | undefined): LodashReduce3x5; + (callback: lodash.__, accumulator: TResult, collection: T | null | undefined): LodashReduce3x6; + (callback: lodash.MemoIteratorCapped, accumulator: TResult, collection: T | null | undefined): TResult; + } + interface LodashReduce1x1 { + (accumulator: TResult): LodashReduce1x3; + (accumulator: lodash.__, collection: T[] | null | undefined): LodashReduce1x5; + (accumulator: TResult, collection: T[] | lodash.List | null | undefined): TResult; + (accumulator: lodash.__, collection: lodash.List | null | undefined): LodashReduce2x5; + } + interface LodashReduce1x2 { + (callback: lodash.MemoIteratorCapped): LodashReduce1x3; + (callback: lodash.__, collection: T[] | null | undefined): LodashReduce1x6; + (callback: lodash.MemoIteratorCapped, collection: T[] | lodash.List | null | undefined): TResult; + (callback: lodash.__, collection: lodash.List | null | undefined): LodashReduce2x6; + (callback: lodash.MemoIteratorCapped): LodashReduce3x3; + (callback: lodash.__, collection: T | null | undefined): LodashReduce3x6; + (callback: lodash.MemoIteratorCapped, collection: T | null | undefined): TResult; + } + type LodashReduce1x3 = (collection: T[] | lodash.List | null | undefined) => TResult; + interface LodashReduce1x4 { + (callback: lodash.MemoIteratorCapped): LodashReduce1x5; + (callback: lodash.__, accumulator: TResult): LodashReduce1x6; + (callback: lodash.MemoIteratorCapped, accumulator: TResult): TResult; + } + type LodashReduce1x5 = (accumulator: TResult) => TResult; + type LodashReduce1x6 = (callback: lodash.MemoIteratorCapped) => TResult; + interface LodashReduce2x4 { + (callback: lodash.MemoIteratorCapped): LodashReduce2x5; + (callback: lodash.__, accumulator: TResult): LodashReduce2x6; + (callback: lodash.MemoIteratorCapped, accumulator: TResult): TResult; + } + type LodashReduce2x5 = (accumulator: TResult) => TResult; + type LodashReduce2x6 = (callback: lodash.MemoIteratorCapped) => TResult; + interface LodashReduce3x1 { + (accumulator: TResult): LodashReduce3x3; + (accumulator: lodash.__, collection: T | null | undefined): LodashReduce3x5; + (accumulator: TResult, collection: T | null | undefined): TResult; + } + type LodashReduce3x3 = (collection: T | null | undefined) => TResult; + interface LodashReduce3x4 { + (callback: lodash.MemoIteratorCapped): LodashReduce3x5; + (callback: lodash.__, accumulator: TResult): LodashReduce3x6; + (callback: lodash.MemoIteratorCapped, accumulator: TResult): TResult; + } + type LodashReduce3x5 = (accumulator: TResult) => TResult; + type LodashReduce3x6 = (callback: lodash.MemoIteratorCapped) => TResult; + interface LodashReduceRight { + (callback: lodash.MemoIteratorCappedRight): LodashReduceRight1x1; + (callback: lodash.__, accumulator: TResult): LodashReduceRight1x2; + (callback: lodash.MemoIteratorCappedRight, accumulator: TResult): LodashReduceRight1x3; + (callback: lodash.__, accumulator: lodash.__, collection: T[] | null | undefined): LodashReduceRight1x4; + (callback: lodash.MemoIteratorCappedRight, accumulator: lodash.__, collection: T[] | null | undefined): LodashReduceRight1x5; + (callback: lodash.__, accumulator: TResult, collection: T[] | null | undefined): LodashReduceRight1x6; + (callback: lodash.MemoIteratorCappedRight, accumulator: TResult, collection: T[] | lodash.List | null | undefined): TResult; + (callback: lodash.__, accumulator: lodash.__, collection: lodash.List | null | undefined): LodashReduceRight2x4; + (callback: lodash.MemoIteratorCappedRight, accumulator: lodash.__, collection: lodash.List | null | undefined): LodashReduceRight2x5; + (callback: lodash.__, accumulator: TResult, collection: lodash.List | null | undefined): LodashReduceRight2x6; + (callback: lodash.MemoIteratorCappedRight): LodashReduceRight3x1; + (callback: lodash.MemoIteratorCappedRight, accumulator: TResult): LodashReduceRight3x3; + (callback: lodash.__, accumulator: lodash.__, collection: T | null | undefined): LodashReduceRight3x4; + (callback: lodash.MemoIteratorCappedRight, accumulator: lodash.__, collection: T | null | undefined): LodashReduceRight3x5; + (callback: lodash.__, accumulator: TResult, collection: T | null | undefined): LodashReduceRight3x6; + (callback: lodash.MemoIteratorCappedRight, accumulator: TResult, collection: T | null | undefined): TResult; + } + interface LodashReduceRight1x1 { + (accumulator: TResult): LodashReduceRight1x3; + (accumulator: lodash.__, collection: T[] | null | undefined): LodashReduceRight1x5; + (accumulator: TResult, collection: T[] | lodash.List | null | undefined): TResult; + (accumulator: lodash.__, collection: lodash.List | null | undefined): LodashReduceRight2x5; + } + interface LodashReduceRight1x2 { + (callback: lodash.MemoIteratorCappedRight): LodashReduceRight1x3; + (callback: lodash.__, collection: T[] | null | undefined): LodashReduceRight1x6; + (callback: lodash.MemoIteratorCappedRight, collection: T[] | lodash.List | null | undefined): TResult; + (callback: lodash.__, collection: lodash.List | null | undefined): LodashReduceRight2x6; + (callback: lodash.MemoIteratorCappedRight): LodashReduceRight3x3; + (callback: lodash.__, collection: T | null | undefined): LodashReduceRight3x6; + (callback: lodash.MemoIteratorCappedRight, collection: T | null | undefined): TResult; + } + type LodashReduceRight1x3 = (collection: T[] | lodash.List | null | undefined) => TResult; + interface LodashReduceRight1x4 { + (callback: lodash.MemoIteratorCappedRight): LodashReduceRight1x5; + (callback: lodash.__, accumulator: TResult): LodashReduceRight1x6; + (callback: lodash.MemoIteratorCappedRight, accumulator: TResult): TResult; + } + type LodashReduceRight1x5 = (accumulator: TResult) => TResult; + type LodashReduceRight1x6 = (callback: lodash.MemoIteratorCappedRight) => TResult; + interface LodashReduceRight2x4 { + (callback: lodash.MemoIteratorCappedRight): LodashReduceRight2x5; + (callback: lodash.__, accumulator: TResult): LodashReduceRight2x6; + (callback: lodash.MemoIteratorCappedRight, accumulator: TResult): TResult; + } + type LodashReduceRight2x5 = (accumulator: TResult) => TResult; + type LodashReduceRight2x6 = (callback: lodash.MemoIteratorCappedRight) => TResult; + interface LodashReduceRight3x1 { + (accumulator: TResult): LodashReduceRight3x3; + (accumulator: lodash.__, collection: T | null | undefined): LodashReduceRight3x5; + (accumulator: TResult, collection: T | null | undefined): TResult; + } + type LodashReduceRight3x3 = (collection: T | null | undefined) => TResult; + interface LodashReduceRight3x4 { + (callback: lodash.MemoIteratorCappedRight): LodashReduceRight3x5; + (callback: lodash.__, accumulator: TResult): LodashReduceRight3x6; + (callback: lodash.MemoIteratorCappedRight, accumulator: TResult): TResult; + } + type LodashReduceRight3x5 = (accumulator: TResult) => TResult; + type LodashReduceRight3x6 = (callback: lodash.MemoIteratorCappedRight) => TResult; + interface LodashReject { + (predicate: (value: string) => boolean): LodashReject1x1; + (predicate: lodash.__, collection: string | null | undefined): LodashReject1x2; + (predicate: (value: string) => boolean, collection: string | null | undefined): string[]; + (predicate: lodash.ValueIterateeCustom): LodashReject2x1; + (predicate: lodash.__, collection: lodash.List | null | undefined): LodashReject2x2; + (predicate: lodash.ValueIterateeCustom, collection: lodash.List | null | undefined): T[]; + (predicate: lodash.__, collection: T | null | undefined): LodashReject3x2; + (predicate: lodash.ValueIterateeCustom, collection: T | null | undefined): Array; + } + type LodashReject1x1 = (collection: string | null | undefined) => string[]; + type LodashReject1x2 = (predicate: (value: string) => boolean) => string[]; + type LodashReject2x1 = (collection: lodash.List | object | null | undefined) => T[]; + type LodashReject2x2 = (predicate: lodash.ValueIterateeCustom) => T[]; + type LodashReject3x2 = (predicate: lodash.ValueIterateeCustom) => Array; + interface LodashRemove { + (predicate: lodash.ValueIteratee): LodashRemove1x1; + (predicate: lodash.__, array: lodash.List): LodashRemove1x2; + (predicate: lodash.ValueIteratee, array: lodash.List): T[]; + } + type LodashRemove1x1 = (array: lodash.List) => T[]; + type LodashRemove1x2 = (predicate: lodash.ValueIteratee) => T[]; + interface LodashRepeat { + (n: number): LodashRepeat1x1; + (n: lodash.__, string: string): LodashRepeat1x2; + (n: number, string: string): string; + } + type LodashRepeat1x1 = (string: string) => string; + type LodashRepeat1x2 = (n: number) => string; + interface LodashReplace { + (pattern: RegExp | string): LodashReplace1x1; + (pattern: lodash.__, replacement: lodash.ReplaceFunction | string): LodashReplace1x2; + (pattern: RegExp | string, replacement: lodash.ReplaceFunction | string): LodashReplace1x3; + (pattern: lodash.__, replacement: lodash.__, string: string): LodashReplace1x4; + (pattern: RegExp | string, replacement: lodash.__, string: string): LodashReplace1x5; + (pattern: lodash.__, replacement: lodash.ReplaceFunction | string, string: string): LodashReplace1x6; + (pattern: RegExp | string, replacement: lodash.ReplaceFunction | string, string: string): string; + } + interface LodashReplace1x1 { + (replacement: lodash.ReplaceFunction | string): LodashReplace1x3; + (replacement: lodash.__, string: string): LodashReplace1x5; + (replacement: lodash.ReplaceFunction | string, string: string): string; + } + interface LodashReplace1x2 { + (pattern: RegExp | string): LodashReplace1x3; + (pattern: lodash.__, string: string): LodashReplace1x6; + (pattern: RegExp | string, string: string): string; + } + type LodashReplace1x3 = (string: string) => string; + interface LodashReplace1x4 { + (pattern: RegExp | string): LodashReplace1x5; + (pattern: lodash.__, replacement: lodash.ReplaceFunction | string): LodashReplace1x6; + (pattern: RegExp | string, replacement: lodash.ReplaceFunction | string): string; + } + type LodashReplace1x5 = (replacement: lodash.ReplaceFunction | string) => string; + type LodashReplace1x6 = (pattern: RegExp | string) => string; + type LodashRest = (func: (...args: any[]) => any) => (...args: any[]) => any; + interface LodashRestFrom { + (start: number): LodashRestFrom1x1; + (start: lodash.__, func: (...args: any[]) => any): LodashRestFrom1x2; + (start: number, func: (...args: any[]) => any): (...args: any[]) => any; + } + type LodashRestFrom1x1 = (func: (...args: any[]) => any) => (...args: any[]) => any; + type LodashRestFrom1x2 = (start: number) => (...args: any[]) => any; + interface LodashResult { + (path: lodash.PropertyPath): LodashResult1x1; + (path: lodash.__, object: any): LodashResult1x2; + (path: lodash.PropertyPath, object: any): TResult; + } + type LodashResult1x1 = (object: any) => TResult; + type LodashResult1x2 = (path: lodash.PropertyPath) => TResult; + type LodashReverse = >(array: TList) => TList; + type LodashRound = (n: number) => number; + type LodashRunInContext = (context: object) => lodash.LoDashStatic; + interface LodashSample { + (collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): T | undefined; + (collection: T | null | undefined): T[keyof T] | undefined; + } + interface LodashSampleSize { + (n: number): LodashSampleSize1x1; + (n: lodash.__, collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): LodashSampleSize1x2; + (n: number, collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): T[]; + (n: lodash.__, collection: T | null | undefined): LodashSampleSize2x2; + (n: number, collection: T | null | undefined): Array; + } + interface LodashSampleSize1x1 { + (collection: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): T[]; + (collection: T | null | undefined): Array; + } + type LodashSampleSize1x2 = (n: number) => T[]; + type LodashSampleSize2x2 = (n: number) => Array; + interface LodashSetWith { + (customizer: lodash.SetWithCustomizer): LodashSetWith1x1; + (customizer: lodash.__, path: lodash.PropertyPath): LodashSetWith1x2; + (customizer: lodash.SetWithCustomizer, path: lodash.PropertyPath): LodashSetWith1x3; + (customizer: lodash.__, path: lodash.__, value: any): LodashSetWith1x4; + (customizer: lodash.SetWithCustomizer, path: lodash.__, value: any): LodashSetWith1x5; + (customizer: lodash.__, path: lodash.PropertyPath, value: any): LodashSetWith1x6; + (customizer: lodash.SetWithCustomizer, path: lodash.PropertyPath, value: any): LodashSetWith1x7; + (customizer: lodash.__, path: lodash.__, value: lodash.__, object: T): LodashSetWith1x8; + (customizer: lodash.SetWithCustomizer, path: lodash.__, value: lodash.__, object: T): LodashSetWith1x9; + (customizer: lodash.__, path: lodash.PropertyPath, value: lodash.__, object: T): LodashSetWith1x10; + (customizer: lodash.SetWithCustomizer, path: lodash.PropertyPath, value: lodash.__, object: T): LodashSetWith1x11; + (customizer: lodash.__, path: lodash.__, value: any, object: T): LodashSetWith1x12; + (customizer: lodash.SetWithCustomizer, path: lodash.__, value: any, object: T): LodashSetWith1x13; + (customizer: lodash.__, path: lodash.PropertyPath, value: any, object: T): LodashSetWith1x14; + (customizer: lodash.SetWithCustomizer, path: lodash.PropertyPath, value: any, object: T): T; + } + interface LodashSetWith1x1 { + (path: lodash.PropertyPath): LodashSetWith1x3; + (path: lodash.__, value: any): LodashSetWith1x5; + (path: lodash.PropertyPath, value: any): LodashSetWith1x7; + (path: lodash.__, value: lodash.__, object: T): LodashSetWith1x9; + (path: lodash.PropertyPath, value: lodash.__, object: T): LodashSetWith1x11; + (path: lodash.__, value: any, object: T): LodashSetWith1x13; + (path: lodash.PropertyPath, value: any, object: T): T; + } + interface LodashSetWith1x2 { + (customizer: lodash.SetWithCustomizer): LodashSetWith1x3; + (customizer: lodash.__, value: any): LodashSetWith1x6; + (customizer: lodash.SetWithCustomizer, value: any): LodashSetWith1x7; + (customizer: lodash.__, value: lodash.__, object: T): LodashSetWith1x10; + (customizer: lodash.SetWithCustomizer, value: lodash.__, object: T): LodashSetWith1x11; + (customizer: lodash.__, value: any, object: T): LodashSetWith1x14; + (customizer: lodash.SetWithCustomizer, value: any, object: T): T; + } + interface LodashSetWith1x3 { + (value: any): LodashSetWith1x7; + (value: lodash.__, object: T): LodashSetWith1x11; + (value: any, object: T): T; + } + interface LodashSetWith1x4 { + (customizer: lodash.SetWithCustomizer): LodashSetWith1x5; + (customizer: lodash.__, path: lodash.PropertyPath): LodashSetWith1x6; + (customizer: lodash.SetWithCustomizer, path: lodash.PropertyPath): LodashSetWith1x7; + (customizer: lodash.__, path: lodash.__, object: T): LodashSetWith1x12; + (customizer: lodash.SetWithCustomizer, path: lodash.__, object: T): LodashSetWith1x13; + (customizer: lodash.__, path: lodash.PropertyPath, object: T): LodashSetWith1x14; + (customizer: lodash.SetWithCustomizer, path: lodash.PropertyPath, object: T): T; + } + interface LodashSetWith1x5 { + (path: lodash.PropertyPath): LodashSetWith1x7; + (path: lodash.__, object: T): LodashSetWith1x13; + (path: lodash.PropertyPath, object: T): T; + } + interface LodashSetWith1x6 { + (customizer: lodash.SetWithCustomizer): LodashSetWith1x7; + (customizer: lodash.__, object: T): LodashSetWith1x14; + (customizer: lodash.SetWithCustomizer, object: T): T; + } + type LodashSetWith1x7 = (object: T) => T; + interface LodashSetWith1x8 { + (customizer: lodash.SetWithCustomizer): LodashSetWith1x9; + (customizer: lodash.__, path: lodash.PropertyPath): LodashSetWith1x10; + (customizer: lodash.SetWithCustomizer, path: lodash.PropertyPath): LodashSetWith1x11; + (customizer: lodash.__, path: lodash.__, value: any): LodashSetWith1x12; + (customizer: lodash.SetWithCustomizer, path: lodash.__, value: any): LodashSetWith1x13; + (customizer: lodash.__, path: lodash.PropertyPath, value: any): LodashSetWith1x14; + (customizer: lodash.SetWithCustomizer, path: lodash.PropertyPath, value: any): T; + } + interface LodashSetWith1x9 { + (path: lodash.PropertyPath): LodashSetWith1x11; + (path: lodash.__, value: any): LodashSetWith1x13; + (path: lodash.PropertyPath, value: any): T; + } + interface LodashSetWith1x10 { + (customizer: lodash.SetWithCustomizer): LodashSetWith1x11; + (customizer: lodash.__, value: any): LodashSetWith1x14; + (customizer: lodash.SetWithCustomizer, value: any): T; + } + type LodashSetWith1x11 = (value: any) => T; + interface LodashSetWith1x12 { + (customizer: lodash.SetWithCustomizer): LodashSetWith1x13; + (customizer: lodash.__, path: lodash.PropertyPath): LodashSetWith1x14; + (customizer: lodash.SetWithCustomizer, path: lodash.PropertyPath): T; + } + type LodashSetWith1x13 = (path: lodash.PropertyPath) => T; + type LodashSetWith1x14 = (customizer: lodash.SetWithCustomizer) => T; + interface LodashShuffle { + (collection: lodash.List | null | undefined): T[]; + (collection: T | null | undefined): Array; + } + type LodashSize = (collection: object | string | null | undefined) => number; + interface LodashSlice { + (start: number): LodashSlice1x1; + (start: lodash.__, end: number): LodashSlice1x2; + (start: number, end: number): LodashSlice1x3; + (start: lodash.__, end: lodash.__, array: lodash.List | null | undefined): LodashSlice1x4; + (start: number, end: lodash.__, array: lodash.List | null | undefined): LodashSlice1x5; + (start: lodash.__, end: number, array: lodash.List | null | undefined): LodashSlice1x6; + (start: number, end: number, array: lodash.List | null | undefined): T[]; + } + interface LodashSlice1x1 { + (end: number): LodashSlice1x3; + (end: lodash.__, array: lodash.List | null | undefined): LodashSlice1x5; + (end: number, array: lodash.List | null | undefined): T[]; + } + interface LodashSlice1x2 { + (start: number): LodashSlice1x3; + (start: lodash.__, array: lodash.List | null | undefined): LodashSlice1x6; + (start: number, array: lodash.List | null | undefined): T[]; + } + type LodashSlice1x3 = (array: lodash.List | null | undefined) => T[]; + interface LodashSlice1x4 { + (start: number): LodashSlice1x5; + (start: lodash.__, end: number): LodashSlice1x6; + (start: number, end: number): T[]; + } + type LodashSlice1x5 = (end: number) => T[]; + type LodashSlice1x6 = (start: number) => T[]; + type LodashSnakeCase = (string: string) => string; + interface LodashSortBy { + (iteratees: lodash.Many>): LodashSortBy1x1; + (iteratees: lodash.__, collection: lodash.List | null | undefined): LodashSortBy1x2; + (iteratees: lodash.Many>, collection: lodash.List | null | undefined): T[]; + (iteratees: lodash.__, collection: T | null | undefined): LodashSortBy2x2; + (iteratees: lodash.Many>, collection: T | null | undefined): Array; + } + type LodashSortBy1x1 = (collection: lodash.List | object | null | undefined) => T[]; + type LodashSortBy1x2 = (iteratees: lodash.Many>) => T[]; + type LodashSortBy2x2 = (iteratees: lodash.Many>) => Array; + interface LodashSortedIndex { + (value: T): LodashSortedIndex1x1; + (value: lodash.__, array: lodash.List | null | undefined): LodashSortedIndex1x2; + (value: T, array: lodash.List | null | undefined): number; + } + type LodashSortedIndex1x1 = (array: lodash.List | null | undefined) => number; + type LodashSortedIndex1x2 = (value: T) => number; + interface LodashSortedIndexBy { + (iteratee: lodash.ValueIteratee): LodashSortedIndexBy1x1; + (iteratee: lodash.__, value: T): LodashSortedIndexBy1x2; + (iteratee: lodash.ValueIteratee, value: T): LodashSortedIndexBy1x3; + (iteratee: lodash.__, value: lodash.__, array: lodash.List | null | undefined): LodashSortedIndexBy1x4; + (iteratee: lodash.ValueIteratee, value: lodash.__, array: lodash.List | null | undefined): LodashSortedIndexBy1x5; + (iteratee: lodash.__, value: T, array: lodash.List | null | undefined): LodashSortedIndexBy1x6; + (iteratee: lodash.ValueIteratee, value: T, array: lodash.List | null | undefined): number; + } + interface LodashSortedIndexBy1x1 { + (value: T): LodashSortedIndexBy1x3; + (value: lodash.__, array: lodash.List | null | undefined): LodashSortedIndexBy1x5; + (value: T, array: lodash.List | null | undefined): number; + } + interface LodashSortedIndexBy1x2 { + (iteratee: lodash.ValueIteratee): LodashSortedIndexBy1x3; + (iteratee: lodash.__, array: lodash.List | null | undefined): LodashSortedIndexBy1x6; + (iteratee: lodash.ValueIteratee, array: lodash.List | null | undefined): number; + } + type LodashSortedIndexBy1x3 = (array: lodash.List | null | undefined) => number; + interface LodashSortedIndexBy1x4 { + (iteratee: lodash.ValueIteratee): LodashSortedIndexBy1x5; + (iteratee: lodash.__, value: T): LodashSortedIndexBy1x6; + (iteratee: lodash.ValueIteratee, value: T): number; + } + type LodashSortedIndexBy1x5 = (value: T) => number; + type LodashSortedIndexBy1x6 = (iteratee: lodash.ValueIteratee) => number; + interface LodashSortedIndexOf { + (value: T): LodashSortedIndexOf1x1; + (value: lodash.__, array: lodash.List | null | undefined): LodashSortedIndexOf1x2; + (value: T, array: lodash.List | null | undefined): number; + } + type LodashSortedIndexOf1x1 = (array: lodash.List | null | undefined) => number; + type LodashSortedIndexOf1x2 = (value: T) => number; + interface LodashSortedLastIndex { + (value: T): LodashSortedLastIndex1x1; + (value: lodash.__, array: lodash.List | null | undefined): LodashSortedLastIndex1x2; + (value: T, array: lodash.List | null | undefined): number; + } + type LodashSortedLastIndex1x1 = (array: lodash.List | null | undefined) => number; + type LodashSortedLastIndex1x2 = (value: T) => number; + interface LodashSortedLastIndexBy { + (iteratee: lodash.ValueIteratee): LodashSortedLastIndexBy1x1; + (iteratee: lodash.__, value: T): LodashSortedLastIndexBy1x2; + (iteratee: lodash.ValueIteratee, value: T): LodashSortedLastIndexBy1x3; + (iteratee: lodash.__, value: lodash.__, array: lodash.List | null | undefined): LodashSortedLastIndexBy1x4; + (iteratee: lodash.ValueIteratee, value: lodash.__, array: lodash.List | null | undefined): LodashSortedLastIndexBy1x5; + (iteratee: lodash.__, value: T, array: lodash.List | null | undefined): LodashSortedLastIndexBy1x6; + (iteratee: lodash.ValueIteratee, value: T, array: lodash.List | null | undefined): number; + } + interface LodashSortedLastIndexBy1x1 { + (value: T): LodashSortedLastIndexBy1x3; + (value: lodash.__, array: lodash.List | null | undefined): LodashSortedLastIndexBy1x5; + (value: T, array: lodash.List | null | undefined): number; + } + interface LodashSortedLastIndexBy1x2 { + (iteratee: lodash.ValueIteratee): LodashSortedLastIndexBy1x3; + (iteratee: lodash.__, array: lodash.List | null | undefined): LodashSortedLastIndexBy1x6; + (iteratee: lodash.ValueIteratee, array: lodash.List | null | undefined): number; + } + type LodashSortedLastIndexBy1x3 = (array: lodash.List | null | undefined) => number; + interface LodashSortedLastIndexBy1x4 { + (iteratee: lodash.ValueIteratee): LodashSortedLastIndexBy1x5; + (iteratee: lodash.__, value: T): LodashSortedLastIndexBy1x6; + (iteratee: lodash.ValueIteratee, value: T): number; + } + type LodashSortedLastIndexBy1x5 = (value: T) => number; + type LodashSortedLastIndexBy1x6 = (iteratee: lodash.ValueIteratee) => number; + interface LodashSortedLastIndexOf { + (value: T): LodashSortedLastIndexOf1x1; + (value: lodash.__, array: lodash.List | null | undefined): LodashSortedLastIndexOf1x2; + (value: T, array: lodash.List | null | undefined): number; + } + type LodashSortedLastIndexOf1x1 = (array: lodash.List | null | undefined) => number; + type LodashSortedLastIndexOf1x2 = (value: T) => number; + type LodashSortedUniq = (array: lodash.List | null | undefined) => T[]; + interface LodashSortedUniqBy { + (iteratee: (value: string) => lodash.NotVoid): LodashSortedUniqBy1x1; + (iteratee: lodash.__, array: string | null | undefined): LodashSortedUniqBy1x2; + (iteratee: (value: string) => lodash.NotVoid, array: string | null | undefined): string[]; + (iteratee: lodash.ValueIteratee): LodashSortedUniqBy2x1; + (iteratee: lodash.__, array: lodash.List | null | undefined): LodashSortedUniqBy2x2; + (iteratee: lodash.ValueIteratee, array: lodash.List | null | undefined): T[]; + } + type LodashSortedUniqBy1x1 = (array: string | null | undefined) => string[]; + type LodashSortedUniqBy1x2 = (iteratee: (value: string) => lodash.NotVoid) => string[]; + type LodashSortedUniqBy2x1 = (array: lodash.List | null | undefined) => T[]; + type LodashSortedUniqBy2x2 = (iteratee: lodash.ValueIteratee) => T[]; + interface LodashSplit { + (separator: RegExp|string): LodashSplit1x1; + (separator: lodash.__, string: string): LodashSplit1x2; + (separator: RegExp|string, string: string): string[]; + } + type LodashSplit1x1 = (string: string) => string[]; + type LodashSplit1x2 = (separator: RegExp|string) => string[]; + type LodashSpread = (func: (...args: any[]) => TResult) => (...args: any[]) => TResult; + interface LodashSpreadFrom { + (start: number): LodashSpreadFrom1x1; + (start: lodash.__, func: (...args: any[]) => TResult): LodashSpreadFrom1x2; + (start: number, func: (...args: any[]) => TResult): (...args: any[]) => TResult; + } + type LodashSpreadFrom1x1 = (func: (...args: any[]) => TResult) => (...args: any[]) => TResult; + type LodashSpreadFrom1x2 = (start: number) => (...args: any[]) => TResult; + type LodashStartCase = (string: string) => string; + interface LodashStartsWith { + (target: string): LodashStartsWith1x1; + (target: lodash.__, string: string): LodashStartsWith1x2; + (target: string, string: string): boolean; + } + type LodashStartsWith1x1 = (string: string) => boolean; + type LodashStartsWith1x2 = (target: string) => boolean; + type LodashStubArray = () => any[]; + type LodashStubObject = () => any; + type LodashStubString = () => string; + type LodashStubTrue = () => boolean; + interface LodashSubtract { + (minuend: number): LodashSubtract1x1; + (minuend: lodash.__, subtrahend: number): LodashSubtract1x2; + (minuend: number, subtrahend: number): number; + } + type LodashSubtract1x1 = (subtrahend: number) => number; + type LodashSubtract1x2 = (minuend: number) => number; + type LodashSum = (collection: lodash.List | null | undefined) => number; + interface LodashSumBy { + (iteratee: ((value: T) => number) | string): LodashSumBy1x1; + (iteratee: lodash.__, collection: lodash.List | null | undefined): LodashSumBy1x2; + (iteratee: ((value: T) => number) | string, collection: lodash.List | null | undefined): number; + } + type LodashSumBy1x1 = (collection: lodash.List | null | undefined) => number; + type LodashSumBy1x2 = (iteratee: ((value: T) => number) | string) => number; + interface LodashXor { + (arrays2: lodash.List | null | undefined): LodashXor1x1; + (arrays2: lodash.__, arrays: lodash.List | null | undefined): LodashXor1x2; + (arrays2: lodash.List | null | undefined, arrays: lodash.List | null | undefined): T[]; + } + type LodashXor1x1 = (arrays: lodash.List | null | undefined) => T[]; + type LodashXor1x2 = (arrays2: lodash.List | null | undefined) => T[]; + interface LodashXorBy { + (iteratee: lodash.ValueIteratee): LodashXorBy1x1; + (iteratee: lodash.__, arrays: lodash.List | null | undefined): LodashXorBy1x2; + (iteratee: lodash.ValueIteratee, arrays: lodash.List | null | undefined): LodashXorBy1x3; + (iteratee: lodash.__, arrays: lodash.__, arrays2: lodash.List | null | undefined): LodashXorBy1x4; + (iteratee: lodash.ValueIteratee, arrays: lodash.__, arrays2: lodash.List | null | undefined): LodashXorBy1x5; + (iteratee: lodash.__, arrays: lodash.List | null | undefined, arrays2: lodash.List | null | undefined): LodashXorBy1x6; + (iteratee: lodash.ValueIteratee, arrays: lodash.List | null | undefined, arrays2: lodash.List | null | undefined): T[]; + } + interface LodashXorBy1x1 { + (arrays: lodash.List | null | undefined): LodashXorBy1x3; + (arrays: lodash.__, arrays2: lodash.List | null | undefined): LodashXorBy1x5; + (arrays: lodash.List | null | undefined, arrays2: lodash.List | null | undefined): T[]; + } + interface LodashXorBy1x2 { + (iteratee: lodash.ValueIteratee): LodashXorBy1x3; + (iteratee: lodash.__, arrays2: lodash.List | null | undefined): LodashXorBy1x6; + (iteratee: lodash.ValueIteratee, arrays2: lodash.List | null | undefined): T[]; + } + type LodashXorBy1x3 = (arrays2: lodash.List | null | undefined) => T[]; + interface LodashXorBy1x4 { + (iteratee: lodash.ValueIteratee): LodashXorBy1x5; + (iteratee: lodash.__, arrays: lodash.List | null | undefined): LodashXorBy1x6; + (iteratee: lodash.ValueIteratee, arrays: lodash.List | null | undefined): T[]; + } + type LodashXorBy1x5 = (arrays: lodash.List | null | undefined) => T[]; + type LodashXorBy1x6 = (iteratee: lodash.ValueIteratee) => T[]; + interface LodashXorWith { + (comparator: lodash.Comparator): LodashXorWith1x1; + (comparator: lodash.__, arrays: lodash.List | null | undefined): LodashXorWith1x2; + (comparator: lodash.Comparator, arrays: lodash.List | null | undefined): LodashXorWith1x3; + (comparator: lodash.__, arrays: lodash.__, arrays2: lodash.List | null | undefined): LodashXorWith1x4; + (comparator: lodash.Comparator, arrays: lodash.__, arrays2: lodash.List | null | undefined): LodashXorWith1x5; + (comparator: lodash.__, arrays: lodash.List | null | undefined, arrays2: lodash.List | null | undefined): LodashXorWith1x6; + (comparator: lodash.Comparator, arrays: lodash.List | null | undefined, arrays2: lodash.List | null | undefined): T[]; + } + interface LodashXorWith1x1 { + (arrays: lodash.List | null | undefined): LodashXorWith1x3; + (arrays: lodash.__, arrays2: lodash.List | null | undefined): LodashXorWith1x5; + (arrays: lodash.List | null | undefined, arrays2: lodash.List | null | undefined): T[]; + } + interface LodashXorWith1x2 { + (comparator: lodash.Comparator): LodashXorWith1x3; + (comparator: lodash.__, arrays2: lodash.List | null | undefined): LodashXorWith1x6; + (comparator: lodash.Comparator, arrays2: lodash.List | null | undefined): T[]; + } + type LodashXorWith1x3 = (arrays2: lodash.List | null | undefined) => T[]; + interface LodashXorWith1x4 { + (comparator: lodash.Comparator): LodashXorWith1x5; + (comparator: lodash.__, arrays: lodash.List | null | undefined): LodashXorWith1x6; + (comparator: lodash.Comparator, arrays: lodash.List | null | undefined): T[]; + } + type LodashXorWith1x5 = (arrays: lodash.List | null | undefined) => T[]; + type LodashXorWith1x6 = (comparator: lodash.Comparator) => T[]; + type LodashTail = (array: lodash.List | null | undefined) => T[]; + interface LodashTake { + (n: number): LodashTake1x1; + (n: lodash.__, array: lodash.List | null | undefined): LodashTake1x2; + (n: number, array: lodash.List | null | undefined): T[]; + } + type LodashTake1x1 = (array: lodash.List | null | undefined) => T[]; + type LodashTake1x2 = (n: number) => T[]; + interface LodashTakeRight { + (n: number): LodashTakeRight1x1; + (n: lodash.__, array: lodash.List | null | undefined): LodashTakeRight1x2; + (n: number, array: lodash.List | null | undefined): T[]; + } + type LodashTakeRight1x1 = (array: lodash.List | null | undefined) => T[]; + type LodashTakeRight1x2 = (n: number) => T[]; + interface LodashTakeRightWhile { + (predicate: lodash.ValueIteratee): LodashTakeRightWhile1x1; + (predicate: lodash.__, array: lodash.List | null | undefined): LodashTakeRightWhile1x2; + (predicate: lodash.ValueIteratee, array: lodash.List | null | undefined): T[]; + } + type LodashTakeRightWhile1x1 = (array: lodash.List | null | undefined) => T[]; + type LodashTakeRightWhile1x2 = (predicate: lodash.ValueIteratee) => T[]; + interface LodashTakeWhile { + (predicate: lodash.ValueIteratee): LodashTakeWhile1x1; + (predicate: lodash.__, array: lodash.List | null | undefined): LodashTakeWhile1x2; + (predicate: lodash.ValueIteratee, array: lodash.List | null | undefined): T[]; + } + type LodashTakeWhile1x1 = (array: lodash.List | null | undefined) => T[]; + type LodashTakeWhile1x2 = (predicate: lodash.ValueIteratee) => T[]; + interface LodashTap { + (interceptor: (value: T) => void): LodashTap1x1; + (interceptor: lodash.__, value: T): LodashTap1x2; + (interceptor: (value: T) => void, value: T): T; + } + type LodashTap1x1 = (value: T) => T; + type LodashTap1x2 = (interceptor: (value: T) => void) => T; + type LodashTemplate = (string: string) => lodash.TemplateExecutor; + interface LodashThrottle { + (wait: number): LodashThrottle1x1; + any>(wait: lodash.__, func: T): LodashThrottle1x2; + any>(wait: number, func: T): T & lodash.Cancelable; + } + type LodashThrottle1x1 = any>(func: T) => T & lodash.Cancelable; + type LodashThrottle1x2 = (wait: number) => T & lodash.Cancelable; + interface LodashThru { + (interceptor: (value: T) => TResult): LodashThru1x1; + (interceptor: lodash.__, value: T): LodashThru1x2; + (interceptor: (value: T) => TResult, value: T): TResult; + } + type LodashThru1x1 = (value: T) => TResult; + type LodashThru1x2 = (interceptor: (value: T) => TResult) => TResult; + interface LodashTimes { + (iteratee: (num: number) => TResult): LodashTimes1x1; + (iteratee: lodash.__, n: number): LodashTimes1x2; + (iteratee: (num: number) => TResult, n: number): TResult[]; + } + type LodashTimes1x1 = (n: number) => TResult[]; + type LodashTimes1x2 = (iteratee: (num: number) => TResult) => TResult[]; + interface LodashToArray { + (value: lodash.List | lodash.Dictionary | lodash.NumericDictionary | null | undefined): T[]; + (value: T): Array; + (): any[]; + } + type LodashToFinite = (value: any) => number; + type LodashToInteger = (value: any) => number; + type LodashToLength = (value: any) => number; + type LodashToLower = (string: string) => string; + type LodashToNumber = (value: any) => number; + type LodashToPath = (value: any) => string[]; + type LodashToPlainObject = (value: any) => any; + type LodashToSafeInteger = (value: any) => number; + type LodashToString = (value: any) => string; + type LodashToUpper = (string: string) => string; + interface LodashTransform { + (iteratee: lodash.MemoVoidIteratorCapped): LodashTransform1x1; + (iteratee: lodash.__, accumulator: ReadonlyArray): LodashTransform1x2; + (iteratee: lodash.MemoVoidIteratorCapped, accumulator: ReadonlyArray): LodashTransform1x3; + (iteratee: lodash.__, accumulator: lodash.__, object: ReadonlyArray): LodashTransform1x4; + (iteratee: lodash.MemoVoidIteratorCapped, accumulator: lodash.__, object: ReadonlyArray): LodashTransform1x5; + (iteratee: lodash.__, accumulator: ReadonlyArray, object: ReadonlyArray): LodashTransform1x6; + (iteratee: lodash.MemoVoidIteratorCapped, accumulator: ReadonlyArray, object: ReadonlyArray | lodash.Dictionary): TResult[]; + (iteratee: lodash.MemoVoidIteratorCapped>): LodashTransform2x1; + (iteratee: lodash.__, accumulator: lodash.Dictionary): LodashTransform2x2; + (iteratee: lodash.MemoVoidIteratorCapped>, accumulator: lodash.Dictionary): LodashTransform2x3; + (iteratee: lodash.MemoVoidIteratorCapped>, accumulator: lodash.__, object: ReadonlyArray): LodashTransform2x5; + (iteratee: lodash.__, accumulator: lodash.Dictionary, object: ReadonlyArray): LodashTransform2x6; + (iteratee: lodash.MemoVoidIteratorCapped>, accumulator: lodash.Dictionary, object: ReadonlyArray | lodash.Dictionary): lodash.Dictionary; + (iteratee: lodash.__, accumulator: lodash.__, object: lodash.Dictionary): LodashTransform3x4; + (iteratee: lodash.MemoVoidIteratorCapped>, accumulator: lodash.__, object: lodash.Dictionary): LodashTransform3x5; + (iteratee: lodash.__, accumulator: lodash.Dictionary, object: lodash.Dictionary): LodashTransform3x6; + (iteratee: lodash.MemoVoidIteratorCapped, accumulator: lodash.__, object: lodash.Dictionary): LodashTransform4x5; + (iteratee: lodash.__, accumulator: ReadonlyArray, object: lodash.Dictionary): LodashTransform4x6; + } + interface LodashTransform1x1 { + (accumulator: ReadonlyArray): LodashTransform1x3; + (accumulator: lodash.__, object: ReadonlyArray): LodashTransform1x5; + (accumulator: ReadonlyArray, object: ReadonlyArray | lodash.Dictionary): TResult[]; + (accumulator: lodash.__, object: lodash.Dictionary): LodashTransform4x5; + } + interface LodashTransform1x2 { + (iteratee: lodash.MemoVoidIteratorCapped): LodashTransform1x3; + (iteratee: lodash.__, object: ReadonlyArray): LodashTransform1x6; + (iteratee: lodash.MemoVoidIteratorCapped, object: ReadonlyArray | lodash.Dictionary): TResult[]; + (iteratee: lodash.__, object: lodash.Dictionary): LodashTransform4x6; + } + type LodashTransform1x3 = (object: ReadonlyArray | lodash.Dictionary) => TResult[]; + interface LodashTransform1x4 { + (iteratee: lodash.MemoVoidIteratorCapped): LodashTransform1x5; + (iteratee: lodash.__, accumulator: ReadonlyArray): LodashTransform1x6; + (iteratee: lodash.MemoVoidIteratorCapped, accumulator: ReadonlyArray): TResult[]; + (iteratee: lodash.MemoVoidIteratorCapped>): LodashTransform2x5; + (iteratee: lodash.__, accumulator: lodash.Dictionary): LodashTransform2x6; + (iteratee: lodash.MemoVoidIteratorCapped>, accumulator: lodash.Dictionary): lodash.Dictionary; + } + type LodashTransform1x5 = (accumulator: ReadonlyArray) => TResult[]; + type LodashTransform1x6 = (iteratee: lodash.MemoVoidIteratorCapped) => TResult[]; + interface LodashTransform2x1 { + (accumulator: lodash.Dictionary): LodashTransform2x3; + (accumulator: lodash.__, object: ReadonlyArray): LodashTransform2x5; + (accumulator: lodash.Dictionary, object: ReadonlyArray | lodash.Dictionary): lodash.Dictionary; + (accumulator: lodash.__, object: lodash.Dictionary): LodashTransform3x5; + } + interface LodashTransform2x2 { + (iteratee: lodash.MemoVoidIteratorCapped>): LodashTransform2x3; + (iteratee: lodash.__, object: ReadonlyArray): LodashTransform2x6; + (iteratee: lodash.MemoVoidIteratorCapped>, object: ReadonlyArray | lodash.Dictionary): lodash.Dictionary; + (iteratee: lodash.__, object: lodash.Dictionary): LodashTransform3x6; + } + type LodashTransform2x3 = (object: ReadonlyArray | lodash.Dictionary) => lodash.Dictionary; + type LodashTransform2x5 = (accumulator: lodash.Dictionary) => lodash.Dictionary; + type LodashTransform2x6 = (iteratee: lodash.MemoVoidIteratorCapped>) => lodash.Dictionary; + interface LodashTransform3x4 { + (iteratee: lodash.MemoVoidIteratorCapped>): LodashTransform3x5; + (iteratee: lodash.__, accumulator: lodash.Dictionary): LodashTransform3x6; + (iteratee: lodash.MemoVoidIteratorCapped>, accumulator: lodash.Dictionary): lodash.Dictionary; + (iteratee: lodash.MemoVoidIteratorCapped): LodashTransform4x5; + (iteratee: lodash.__, accumulator: ReadonlyArray): LodashTransform4x6; + (iteratee: lodash.MemoVoidIteratorCapped, accumulator: ReadonlyArray): TResult[]; + } + type LodashTransform3x5 = (accumulator: lodash.Dictionary) => lodash.Dictionary; + type LodashTransform3x6 = (iteratee: lodash.MemoVoidIteratorCapped>) => lodash.Dictionary; + type LodashTransform4x5 = (accumulator: ReadonlyArray) => TResult[]; + type LodashTransform4x6 = (iteratee: lodash.MemoVoidIteratorCapped) => TResult[]; + type LodashTrim = (string: string) => string; + interface LodashTrimChars { + (chars: string): LodashTrimChars1x1; + (chars: lodash.__, string: string): LodashTrimChars1x2; + (chars: string, string: string): string; + } + type LodashTrimChars1x1 = (string: string) => string; + type LodashTrimChars1x2 = (chars: string) => string; + interface LodashTrimCharsEnd { + (chars: string): LodashTrimCharsEnd1x1; + (chars: lodash.__, string: string): LodashTrimCharsEnd1x2; + (chars: string, string: string): string; + } + type LodashTrimCharsEnd1x1 = (string: string) => string; + type LodashTrimCharsEnd1x2 = (chars: string) => string; + interface LodashTrimCharsStart { + (chars: string): LodashTrimCharsStart1x1; + (chars: lodash.__, string: string): LodashTrimCharsStart1x2; + (chars: string, string: string): string; + } + type LodashTrimCharsStart1x1 = (string: string) => string; + type LodashTrimCharsStart1x2 = (chars: string) => string; + type LodashTrimEnd = (string: string) => string; + type LodashTrimStart = (string: string) => string; + interface LodashTruncate { + (options: lodash.TruncateOptions): LodashTruncate1x1; + (options: lodash.__, string: string): LodashTruncate1x2; + (options: lodash.TruncateOptions, string: string): string; + } + type LodashTruncate1x1 = (string: string) => string; + type LodashTruncate1x2 = (options: lodash.TruncateOptions) => string; + type LodashUnapply = (func: (...args: any[]) => any) => (...args: any[]) => any; + type LodashUnary = (func: (arg1: T, ...args: any[]) => TResult) => (arg1: T) => TResult; + type LodashUnescape = (string: string) => string; + interface LodashUnion { + (arrays2: lodash.List | null | undefined): LodashUnion1x1; + (arrays2: lodash.__, arrays: lodash.List | null | undefined): LodashUnion1x2; + (arrays2: lodash.List | null | undefined, arrays: lodash.List | null | undefined): T[]; + } + type LodashUnion1x1 = (arrays: lodash.List | null | undefined) => T[]; + type LodashUnion1x2 = (arrays2: lodash.List | null | undefined) => T[]; + interface LodashUnionBy { + (iteratee: lodash.ValueIteratee): LodashUnionBy1x1; + (iteratee: lodash.__, arrays1: lodash.List | null | undefined): LodashUnionBy1x2; + (iteratee: lodash.ValueIteratee, arrays1: lodash.List | null | undefined): LodashUnionBy1x3; + (iteratee: lodash.__, arrays1: lodash.__, arrays2: lodash.List | null | undefined): LodashUnionBy1x4; + (iteratee: lodash.ValueIteratee, arrays1: lodash.__, arrays2: lodash.List | null | undefined): LodashUnionBy1x5; + (iteratee: lodash.__, arrays1: lodash.List | null | undefined, arrays2: lodash.List | null | undefined): LodashUnionBy1x6; + (iteratee: lodash.ValueIteratee, arrays1: lodash.List | null | undefined, arrays2: lodash.List | null | undefined): T[]; + } + interface LodashUnionBy1x1 { + (arrays1: lodash.List | null | undefined): LodashUnionBy1x3; + (arrays1: lodash.__, arrays2: lodash.List | null | undefined): LodashUnionBy1x5; + (arrays1: lodash.List | null | undefined, arrays2: lodash.List | null | undefined): T[]; + } + interface LodashUnionBy1x2 { + (iteratee: lodash.ValueIteratee): LodashUnionBy1x3; + (iteratee: lodash.__, arrays2: lodash.List | null | undefined): LodashUnionBy1x6; + (iteratee: lodash.ValueIteratee, arrays2: lodash.List | null | undefined): T[]; + } + type LodashUnionBy1x3 = (arrays2: lodash.List | null | undefined) => T[]; + interface LodashUnionBy1x4 { + (iteratee: lodash.ValueIteratee): LodashUnionBy1x5; + (iteratee: lodash.__, arrays1: lodash.List | null | undefined): LodashUnionBy1x6; + (iteratee: lodash.ValueIteratee, arrays1: lodash.List | null | undefined): T[]; + } + type LodashUnionBy1x5 = (arrays1: lodash.List | null | undefined) => T[]; + type LodashUnionBy1x6 = (iteratee: lodash.ValueIteratee) => T[]; + interface LodashUnionWith { + (comparator: lodash.Comparator): LodashUnionWith1x1; + (comparator: lodash.__, arrays: lodash.List | null | undefined): LodashUnionWith1x2; + (comparator: lodash.Comparator, arrays: lodash.List | null | undefined): LodashUnionWith1x3; + (comparator: lodash.__, arrays: lodash.__, arrays2: lodash.List | null | undefined): LodashUnionWith1x4; + (comparator: lodash.Comparator, arrays: lodash.__, arrays2: lodash.List | null | undefined): LodashUnionWith1x5; + (comparator: lodash.__, arrays: lodash.List | null | undefined, arrays2: lodash.List | null | undefined): LodashUnionWith1x6; + (comparator: lodash.Comparator, arrays: lodash.List | null | undefined, arrays2: lodash.List | null | undefined): T[]; + } + interface LodashUnionWith1x1 { + (arrays: lodash.List | null | undefined): LodashUnionWith1x3; + (arrays: lodash.__, arrays2: lodash.List | null | undefined): LodashUnionWith1x5; + (arrays: lodash.List | null | undefined, arrays2: lodash.List | null | undefined): T[]; + } + interface LodashUnionWith1x2 { + (comparator: lodash.Comparator): LodashUnionWith1x3; + (comparator: lodash.__, arrays2: lodash.List | null | undefined): LodashUnionWith1x6; + (comparator: lodash.Comparator, arrays2: lodash.List | null | undefined): T[]; + } + type LodashUnionWith1x3 = (arrays2: lodash.List | null | undefined) => T[]; + interface LodashUnionWith1x4 { + (comparator: lodash.Comparator): LodashUnionWith1x5; + (comparator: lodash.__, arrays: lodash.List | null | undefined): LodashUnionWith1x6; + (comparator: lodash.Comparator, arrays: lodash.List | null | undefined): T[]; + } + type LodashUnionWith1x5 = (arrays: lodash.List | null | undefined) => T[]; + type LodashUnionWith1x6 = (comparator: lodash.Comparator) => T[]; + type LodashUniq = (array: lodash.List | null | undefined) => T[]; + interface LodashUniqBy { + (iteratee: (value: string) => lodash.NotVoid): LodashUniqBy1x1; + (iteratee: lodash.__, array: string | null | undefined): LodashUniqBy1x2; + (iteratee: (value: string) => lodash.NotVoid, array: string | null | undefined): string[]; + (iteratee: lodash.ValueIteratee): LodashUniqBy2x1; + (iteratee: lodash.__, array: lodash.List | null | undefined): LodashUniqBy2x2; + (iteratee: lodash.ValueIteratee, array: lodash.List | null | undefined): T[]; + } + type LodashUniqBy1x1 = (array: string | null | undefined) => string[]; + type LodashUniqBy1x2 = (iteratee: (value: string) => lodash.NotVoid) => string[]; + type LodashUniqBy2x1 = (array: lodash.List | null | undefined) => T[]; + type LodashUniqBy2x2 = (iteratee: lodash.ValueIteratee) => T[]; + type LodashUniqueId = (prefix: string) => string; + interface LodashUniqWith { + (comparator: lodash.Comparator): LodashUniqWith1x1; + (comparator: lodash.__, array: lodash.List | null | undefined): LodashUniqWith1x2; + (comparator: lodash.Comparator, array: lodash.List | null | undefined): T[]; + } + type LodashUniqWith1x1 = (array: lodash.List | null | undefined) => T[]; + type LodashUniqWith1x2 = (comparator: lodash.Comparator) => T[]; + type LodashUnzip = (array: T[][] | lodash.List> | null | undefined) => T[][]; + interface LodashUnzipWith { + (iteratee: (...values: T[]) => TResult): LodashUnzipWith1x1; + (iteratee: lodash.__, array: lodash.List> | null | undefined): LodashUnzipWith1x2; + (iteratee: (...values: T[]) => TResult, array: lodash.List> | null | undefined): TResult[]; + } + type LodashUnzipWith1x1 = (array: lodash.List> | null | undefined) => TResult[]; + type LodashUnzipWith1x2 = (iteratee: (...values: T[]) => TResult) => TResult[]; + interface LodashUpdate { + (path: lodash.PropertyPath): LodashUpdate1x1; + (path: lodash.__, updater: (value: any) => any): LodashUpdate1x2; + (path: lodash.PropertyPath, updater: (value: any) => any): LodashUpdate1x3; + (path: lodash.__, updater: lodash.__, object: object): LodashUpdate1x4; + (path: lodash.PropertyPath, updater: lodash.__, object: object): LodashUpdate1x5; + (path: lodash.__, updater: (value: any) => any, object: object): LodashUpdate1x6; + (path: lodash.PropertyPath, updater: (value: any) => any, object: object): any; + } + interface LodashUpdate1x1 { + (updater: (value: any) => any): LodashUpdate1x3; + (updater: lodash.__, object: object): LodashUpdate1x5; + (updater: (value: any) => any, object: object): any; + } + interface LodashUpdate1x2 { + (path: lodash.PropertyPath): LodashUpdate1x3; + (path: lodash.__, object: object): LodashUpdate1x6; + (path: lodash.PropertyPath, object: object): any; + } + type LodashUpdate1x3 = (object: object) => any; + interface LodashUpdate1x4 { + (path: lodash.PropertyPath): LodashUpdate1x5; + (path: lodash.__, updater: (value: any) => any): LodashUpdate1x6; + (path: lodash.PropertyPath, updater: (value: any) => any): any; + } + type LodashUpdate1x5 = (updater: (value: any) => any) => any; + type LodashUpdate1x6 = (path: lodash.PropertyPath) => any; + interface LodashUpdateWith { + (customizer: lodash.SetWithCustomizer): LodashUpdateWith1x1; + (customizer: lodash.__, path: lodash.PropertyPath): LodashUpdateWith1x2; + (customizer: lodash.SetWithCustomizer, path: lodash.PropertyPath): LodashUpdateWith1x3; + (customizer: lodash.__, path: lodash.__, updater: (oldValue: any) => any): LodashUpdateWith1x4; + (customizer: lodash.SetWithCustomizer, path: lodash.__, updater: (oldValue: any) => any): LodashUpdateWith1x5; + (customizer: lodash.__, path: lodash.PropertyPath, updater: (oldValue: any) => any): LodashUpdateWith1x6; + (customizer: lodash.SetWithCustomizer, path: lodash.PropertyPath, updater: (oldValue: any) => any): LodashUpdateWith1x7; + (customizer: lodash.__, path: lodash.__, updater: lodash.__, object: T): LodashUpdateWith1x8; + (customizer: lodash.SetWithCustomizer, path: lodash.__, updater: lodash.__, object: T): LodashUpdateWith1x9; + (customizer: lodash.__, path: lodash.PropertyPath, updater: lodash.__, object: T): LodashUpdateWith1x10; + (customizer: lodash.SetWithCustomizer, path: lodash.PropertyPath, updater: lodash.__, object: T): LodashUpdateWith1x11; + (customizer: lodash.__, path: lodash.__, updater: (oldValue: any) => any, object: T): LodashUpdateWith1x12; + (customizer: lodash.SetWithCustomizer, path: lodash.__, updater: (oldValue: any) => any, object: T): LodashUpdateWith1x13; + (customizer: lodash.__, path: lodash.PropertyPath, updater: (oldValue: any) => any, object: T): LodashUpdateWith1x14; + (customizer: lodash.SetWithCustomizer, path: lodash.PropertyPath, updater: (oldValue: any) => any, object: T): T; + } + interface LodashUpdateWith1x1 { + (path: lodash.PropertyPath): LodashUpdateWith1x3; + (path: lodash.__, updater: (oldValue: any) => any): LodashUpdateWith1x5; + (path: lodash.PropertyPath, updater: (oldValue: any) => any): LodashUpdateWith1x7; + (path: lodash.__, updater: lodash.__, object: T): LodashUpdateWith1x9; + (path: lodash.PropertyPath, updater: lodash.__, object: T): LodashUpdateWith1x11; + (path: lodash.__, updater: (oldValue: any) => any, object: T): LodashUpdateWith1x13; + (path: lodash.PropertyPath, updater: (oldValue: any) => any, object: T): T; + } + interface LodashUpdateWith1x2 { + (customizer: lodash.SetWithCustomizer): LodashUpdateWith1x3; + (customizer: lodash.__, updater: (oldValue: any) => any): LodashUpdateWith1x6; + (customizer: lodash.SetWithCustomizer, updater: (oldValue: any) => any): LodashUpdateWith1x7; + (customizer: lodash.__, updater: lodash.__, object: T): LodashUpdateWith1x10; + (customizer: lodash.SetWithCustomizer, updater: lodash.__, object: T): LodashUpdateWith1x11; + (customizer: lodash.__, updater: (oldValue: any) => any, object: T): LodashUpdateWith1x14; + (customizer: lodash.SetWithCustomizer, updater: (oldValue: any) => any, object: T): T; + } + interface LodashUpdateWith1x3 { + (updater: (oldValue: any) => any): LodashUpdateWith1x7; + (updater: lodash.__, object: T): LodashUpdateWith1x11; + (updater: (oldValue: any) => any, object: T): T; + } + interface LodashUpdateWith1x4 { + (customizer: lodash.SetWithCustomizer): LodashUpdateWith1x5; + (customizer: lodash.__, path: lodash.PropertyPath): LodashUpdateWith1x6; + (customizer: lodash.SetWithCustomizer, path: lodash.PropertyPath): LodashUpdateWith1x7; + (customizer: lodash.__, path: lodash.__, object: T): LodashUpdateWith1x12; + (customizer: lodash.SetWithCustomizer, path: lodash.__, object: T): LodashUpdateWith1x13; + (customizer: lodash.__, path: lodash.PropertyPath, object: T): LodashUpdateWith1x14; + (customizer: lodash.SetWithCustomizer, path: lodash.PropertyPath, object: T): T; + } + interface LodashUpdateWith1x5 { + (path: lodash.PropertyPath): LodashUpdateWith1x7; + (path: lodash.__, object: T): LodashUpdateWith1x13; + (path: lodash.PropertyPath, object: T): T; + } + interface LodashUpdateWith1x6 { + (customizer: lodash.SetWithCustomizer): LodashUpdateWith1x7; + (customizer: lodash.__, object: T): LodashUpdateWith1x14; + (customizer: lodash.SetWithCustomizer, object: T): T; + } + type LodashUpdateWith1x7 = (object: T) => T; + interface LodashUpdateWith1x8 { + (customizer: lodash.SetWithCustomizer): LodashUpdateWith1x9; + (customizer: lodash.__, path: lodash.PropertyPath): LodashUpdateWith1x10; + (customizer: lodash.SetWithCustomizer, path: lodash.PropertyPath): LodashUpdateWith1x11; + (customizer: lodash.__, path: lodash.__, updater: (oldValue: any) => any): LodashUpdateWith1x12; + (customizer: lodash.SetWithCustomizer, path: lodash.__, updater: (oldValue: any) => any): LodashUpdateWith1x13; + (customizer: lodash.__, path: lodash.PropertyPath, updater: (oldValue: any) => any): LodashUpdateWith1x14; + (customizer: lodash.SetWithCustomizer, path: lodash.PropertyPath, updater: (oldValue: any) => any): T; + } + interface LodashUpdateWith1x9 { + (path: lodash.PropertyPath): LodashUpdateWith1x11; + (path: lodash.__, updater: (oldValue: any) => any): LodashUpdateWith1x13; + (path: lodash.PropertyPath, updater: (oldValue: any) => any): T; + } + interface LodashUpdateWith1x10 { + (customizer: lodash.SetWithCustomizer): LodashUpdateWith1x11; + (customizer: lodash.__, updater: (oldValue: any) => any): LodashUpdateWith1x14; + (customizer: lodash.SetWithCustomizer, updater: (oldValue: any) => any): T; + } + type LodashUpdateWith1x11 = (updater: (oldValue: any) => any) => T; + interface LodashUpdateWith1x12 { + (customizer: lodash.SetWithCustomizer): LodashUpdateWith1x13; + (customizer: lodash.__, path: lodash.PropertyPath): LodashUpdateWith1x14; + (customizer: lodash.SetWithCustomizer, path: lodash.PropertyPath): T; + } + type LodashUpdateWith1x13 = (path: lodash.PropertyPath) => T; + type LodashUpdateWith1x14 = (customizer: lodash.SetWithCustomizer) => T; + type LodashUpperCase = (string: string) => string; + type LodashUpperFirst = (string: string) => string; + interface LodashValues { + (object: lodash.Dictionary | lodash.NumericDictionary | lodash.List | null | undefined): T[]; + (object: T | null | undefined): Array; + (object: any): any[]; + } + interface LodashValuesIn { + (object: lodash.Dictionary|lodash.NumericDictionary|lodash.List | null | undefined): T[]; + (object: T | null | undefined): Array; + } + interface LodashWithout { + (values: ReadonlyArray): LodashWithout1x1; + (values: lodash.__, array: lodash.List | null | undefined): LodashWithout1x2; + (values: ReadonlyArray, array: lodash.List | null | undefined): T[]; + } + type LodashWithout1x1 = (array: lodash.List | null | undefined) => T[]; + type LodashWithout1x2 = (values: ReadonlyArray) => T[]; + type LodashWords = (string: string) => string[]; + interface LodashWrap { + (wrapper: (value: T, ...args: TArgs[]) => TResult): LodashWrap1x1; + (wrapper: lodash.__, value: T): LodashWrap1x2; + (wrapper: (value: T, ...args: TArgs[]) => TResult, value: T): (...args: TArgs[]) => TResult; + (wrapper: (value: T, ...args: any[]) => TResult): LodashWrap2x1; + (wrapper: (value: T, ...args: any[]) => TResult, value: T): (...args: any[]) => TResult; + } + type LodashWrap1x1 = (value: T) => (...args: TArgs[]) => TResult; + interface LodashWrap1x2 { + (wrapper: (value: T, ...args: TArgs[]) => TResult): (...args: TArgs[]) => TResult; + (wrapper: (value: T, ...args: any[]) => TResult): (...args: any[]) => TResult; + } + type LodashWrap2x1 = (value: T) => (...args: any[]) => TResult; + interface LodashZip { + (arrays1: lodash.List): LodashZip1x1; + (arrays1: lodash.__, arrays2: lodash.List): LodashZip1x2; + (arrays1: lodash.List, arrays2: lodash.List): Array<[T1 | undefined, T2 | undefined]>; + } + type LodashZip1x1 = (arrays2: lodash.List) => Array<[T1 | undefined, T2 | undefined]>; + type LodashZip1x2 = (arrays1: lodash.List) => Array<[T1 | undefined, T2 | undefined]>; + type LodashZipAll = (arrays: ReadonlyArray | null | undefined>) => Array>; + interface LodashZipObject { + (props: lodash.List): LodashZipObject1x1; + (props: lodash.__, values: lodash.List): LodashZipObject1x2; + (props: lodash.List, values: lodash.List): lodash.Dictionary; + } + type LodashZipObject1x1 = (values: lodash.List) => lodash.Dictionary; + type LodashZipObject1x2 = (props: lodash.List) => lodash.Dictionary; + interface LodashZipObjectDeep { + (paths: lodash.List): LodashZipObjectDeep1x1; + (paths: lodash.__, values: lodash.List): LodashZipObjectDeep1x2; + (paths: lodash.List, values: lodash.List): object; + } + type LodashZipObjectDeep1x1 = (values: lodash.List) => object; + type LodashZipObjectDeep1x2 = (paths: lodash.List) => object; + interface LodashZipWith { + (iteratee: (value1: T1, value2: T2) => TResult): LodashZipWith1x1; + (iteratee: lodash.__, arrays1: lodash.List): LodashZipWith1x2; + (iteratee: (value1: T1, value2: T2) => TResult, arrays1: lodash.List): LodashZipWith1x3; + (iteratee: lodash.__, arrays1: lodash.__, arrays2: lodash.List): LodashZipWith1x4; + (iteratee: (value1: T1, value2: T2) => TResult, arrays1: lodash.__, arrays2: lodash.List): LodashZipWith1x5; + (iteratee: lodash.__, arrays1: lodash.List, arrays2: lodash.List): LodashZipWith1x6; + (iteratee: (value1: T1, value2: T2) => TResult, arrays1: lodash.List, arrays2: lodash.List): TResult[]; + } + interface LodashZipWith1x1 { + (arrays1: lodash.List): LodashZipWith1x3; + (arrays1: lodash.__, arrays2: lodash.List): LodashZipWith1x5; + (arrays1: lodash.List, arrays2: lodash.List): TResult[]; + } + interface LodashZipWith1x2 { + (iteratee: (value1: T1, value2: T2) => TResult): LodashZipWith1x3; + (iteratee: lodash.__, arrays2: lodash.List): LodashZipWith1x6; + (iteratee: (value1: T1, value2: T2) => TResult, arrays2: lodash.List): TResult[]; + } + type LodashZipWith1x3 = (arrays2: lodash.List) => TResult[]; + interface LodashZipWith1x4 { + (iteratee: (value1: T1, value2: T2) => TResult): LodashZipWith1x5; + (iteratee: lodash.__, arrays1: lodash.List): LodashZipWith1x6; + (iteratee: (value1: T1, value2: T2) => TResult, arrays1: lodash.List): TResult[]; + } + type LodashZipWith1x5 = (arrays1: lodash.List) => TResult[]; + type LodashZipWith1x6 = (iteratee: (value1: T1, value2: T2) => TResult) => TResult[]; + + interface LoDashFp { + add: LodashAdd; + after: LodashAfter; + all: LodashEvery; + allPass: LodashOverEvery; + always: LodashConstant; + any: LodashSome; + anyPass: LodashOverSome; + apply: LodashApply; + ary: LodashAry; + assign: LodashAssign; + assignAll: LodashAssignAll; + assignAllWith: LodashAssignAllWith; + assignIn: LodashAssignIn; + assignInAll: LodashAssignInAll; + assignInAllWith: LodashAssignInAllWith; + assignInWith: LodashAssignInWith; + assignWith: LodashAssignWith; + assoc: LodashSet; + assocPath: LodashSet; + at: LodashAt; + attempt: LodashAttempt; + before: LodashBefore; + bind: LodashBind; + bindAll: LodashBindAll; + bindKey: LodashBindKey; + camelCase: LodashCamelCase; + capitalize: LodashCapitalize; + castArray: LodashCastArray; + ceil: LodashCeil; + chunk: LodashChunk; + clamp: LodashClamp; + clone: LodashClone; + cloneDeep: LodashCloneDeep; + cloneDeepWith: LodashCloneDeepWith; + cloneWith: LodashCloneWith; + compact: LodashCompact; + complement: LodashNegate; + compose: LodashFlowRight; + concat: LodashConcat; + cond: LodashCond; + conforms: LodashConformsTo; + conformsTo: LodashConformsTo; + constant: LodashConstant; + contains: LodashContains; + countBy: LodashCountBy; + create: LodashCreate; + curry: LodashCurry; + curryN: LodashCurryN; + curryRight: LodashCurryRight; + curryRightN: LodashCurryRightN; + debounce: LodashDebounce; + deburr: LodashDeburr; + defaults: LodashDefaults; + defaultsAll: LodashDefaultsAll; + defaultsDeep: LodashDefaultsDeep; + defaultsDeepAll: LodashDefaultsDeepAll; + defaultTo: LodashDefaultTo; + defer: LodashDefer; + delay: LodashDelay; + difference: LodashDifference; + differenceBy: LodashDifferenceBy; + differenceWith: LodashDifferenceWith; + dissoc: LodashUnset; + dissocPath: LodashUnset; + divide: LodashDivide; + drop: LodashDrop; + dropLast: LodashDropRight; + dropLastWhile: LodashDropRightWhile; + dropRight: LodashDropRight; + dropRightWhile: LodashDropRightWhile; + dropWhile: LodashDropWhile; + each: LodashForEach; + eachRight: LodashForEachRight; + endsWith: LodashEndsWith; + entries: LodashToPairs; + entriesIn: LodashToPairsIn; + eq: LodashEq; + equals: LodashIsEqual; + escape: LodashEscape; + escapeRegExp: LodashEscapeRegExp; + every: LodashEvery; + extend: LodashExtend; + extendAll: LodashExtendAll; + extendAllWith: LodashExtendAllWith; + extendWith: LodashExtendWith; + F: LodashStubFalse; + fill: LodashFill; + filter: LodashFilter; + find: LodashFind; + findFrom: LodashFindFrom; + findIndex: LodashFindIndex; + findIndexFrom: LodashFindIndexFrom; + findKey: LodashFindKey; + findLast: LodashFindLast; + findLastFrom: LodashFindLastFrom; + findLastIndex: LodashFindLastIndex; + findLastIndexFrom: LodashFindLastIndexFrom; + findLastKey: LodashFindLastKey; + first: LodashHead; + flatMap: LodashFlatMap; + flatMapDeep: LodashFlatMapDeep; + flatMapDepth: LodashFlatMapDepth; + flatten: LodashFlatten; + flattenDeep: LodashFlattenDeep; + flattenDepth: LodashFlattenDepth; + flip: LodashFlip; + floor: LodashFloor; + flow: LodashFlow; + flowRight: LodashFlowRight; + forEach: LodashForEach; + forEachRight: LodashForEachRight; + forIn: LodashForIn; + forInRight: LodashForInRight; + forOwn: LodashForOwn; + forOwnRight: LodashForOwnRight; + fromPairs: LodashFromPairs; + functions: LodashFunctions; + functionsIn: LodashFunctionsIn; + get: LodashGet; + getOr: LodashGetOr; + groupBy: LodashGroupBy; + gt: LodashGt; + gte: LodashGte; + has: LodashHas; + hasIn: LodashHasIn; + head: LodashHead; + identical: LodashEq; + identity: LodashIdentity; + includes: LodashIncludes; + includesFrom: LodashIncludesFrom; + indexBy: LodashKeyBy; + indexOf: LodashIndexOf; + indexOfFrom: LodashIndexOfFrom; + init: LodashInitial; + initial: LodashInitial; + inRange: LodashInRange; + intersection: LodashIntersection; + intersectionBy: LodashIntersectionBy; + intersectionWith: LodashIntersectionWith; + invert: LodashInvert; + invertBy: LodashInvertBy; + invertObj: LodashInvert; + invoke: LodashInvoke; + invokeArgs: LodashInvokeArgs; + invokeArgsMap: LodashInvokeArgsMap; + invokeMap: LodashInvokeMap; + isArguments: LodashIsArguments; + isArray: LodashIsArray; + isArrayBuffer: LodashIsArrayBuffer; + isArrayLike: LodashIsArrayLike; + isArrayLikeObject: LodashIsArrayLikeObject; + isBoolean: LodashIsBoolean; + isBuffer: LodashIsBuffer; + isDate: LodashIsDate; + isElement: LodashIsElement; + isEmpty: LodashIsEmpty; + isEqual: LodashIsEqual; + isEqualWith: LodashIsEqualWith; + isError: LodashIsError; + isFinite: LodashIsFinite; + isFunction: LodashIsFunction; + isInteger: LodashIsInteger; + isLength: LodashIsLength; + isMap: LodashIsMap; + isMatch: LodashIsMatch; + isMatchWith: LodashIsMatchWith; + isNaN: LodashIsNaN; + isNative: LodashIsNative; + isNil: LodashIsNil; + isNull: LodashIsNull; + isNumber: LodashIsNumber; + isObject: LodashIsObject; + isObjectLike: LodashIsObjectLike; + isPlainObject: LodashIsPlainObject; + isRegExp: LodashIsRegExp; + isSafeInteger: LodashIsSafeInteger; + isSet: LodashIsSet; + isString: LodashIsString; + isSymbol: LodashIsSymbol; + isTypedArray: LodashIsTypedArray; + isUndefined: LodashIsUndefined; + isWeakMap: LodashIsWeakMap; + isWeakSet: LodashIsWeakSet; + iteratee: LodashIteratee; + join: LodashJoin; + juxt: LodashOver; + kebabCase: LodashKebabCase; + keyBy: LodashKeyBy; + keys: LodashKeys; + keysIn: LodashKeysIn; + last: LodashLast; + lastIndexOf: LodashLastIndexOf; + lastIndexOfFrom: LodashLastIndexOfFrom; + lowerCase: LodashLowerCase; + lowerFirst: LodashLowerFirst; + lt: LodashLt; + lte: LodashLte; + map: LodashMap; + mapKeys: LodashMapKeys; + mapValues: LodashMapValues; + matches: LodashIsMatch; + matchesProperty: LodashMatchesProperty; + max: LodashMax; + maxBy: LodashMaxBy; + mean: LodashMean; + meanBy: LodashMeanBy; + memoize: LodashMemoize; + merge: LodashMerge; + mergeAll: LodashMergeAll; + mergeAllWith: LodashMergeAllWith; + mergeWith: LodashMergeWith; + method: LodashMethod; + methodOf: LodashMethodOf; + min: LodashMin; + minBy: LodashMinBy; + multiply: LodashMultiply; + nAry: LodashAry; + negate: LodashNegate; + noConflict: LodashNoConflict; + noop: LodashNoop; + now: LodashNow; + nth: LodashNth; + nthArg: LodashNthArg; + omit: LodashOmit; + omitAll: LodashOmit; + omitBy: LodashOmitBy; + once: LodashOnce; + orderBy: LodashOrderBy; + over: LodashOver; + overArgs: LodashOverArgs; + overEvery: LodashOverEvery; + overSome: LodashOverSome; + pad: LodashPad; + padChars: LodashPadChars; + padCharsEnd: LodashPadCharsEnd; + padCharsStart: LodashPadCharsStart; + padEnd: LodashPadEnd; + padStart: LodashPadStart; + parseInt: LodashParseInt; + partial: LodashPartial; + partialRight: LodashPartialRight; + partition: LodashPartition; + path: LodashPath; + pathEq: LodashMatchesProperty; + pathOr: LodashPathOr; + paths: LodashAt; + pick: LodashPick; + pickAll: LodashPick; + pickBy: LodashPickBy; + pipe: LodashFlow; + pluck: LodashMap; + prop: LodashProp; + propEq: LodashMatchesProperty; + property: LodashProperty; + propertyOf: LodashPropertyOf; + propOr: LodashPropOr; + props: LodashAt; + pull: LodashPull; + pullAll: LodashPullAll; + pullAllBy: LodashPullAllBy; + pullAllWith: LodashPullAllWith; + pullAt: LodashPullAt; + random: LodashRandom; + range: LodashRange; + rangeRight: LodashRangeRight; + rangeStep: LodashRangeStep; + rangeStepRight: LodashRangeStepRight; + rearg: LodashRearg; + reduce: LodashReduce; + reduceRight: LodashReduceRight; + reject: LodashReject; + remove: LodashRemove; + repeat: LodashRepeat; + replace: LodashReplace; + rest: LodashRest; + restFrom: LodashRestFrom; + result: LodashResult; + reverse: LodashReverse; + round: LodashRound; + runInContext: LodashRunInContext; + sample: LodashSample; + sampleSize: LodashSampleSize; + set: LodashSet; + setWith: LodashSetWith; + shuffle: LodashShuffle; + size: LodashSize; + slice: LodashSlice; + snakeCase: LodashSnakeCase; + some: LodashSome; + sortBy: LodashSortBy; + sortedIndex: LodashSortedIndex; + sortedIndexBy: LodashSortedIndexBy; + sortedIndexOf: LodashSortedIndexOf; + sortedLastIndex: LodashSortedLastIndex; + sortedLastIndexBy: LodashSortedLastIndexBy; + sortedLastIndexOf: LodashSortedLastIndexOf; + sortedUniq: LodashSortedUniq; + sortedUniqBy: LodashSortedUniqBy; + split: LodashSplit; + spread: LodashSpread; + spreadFrom: LodashSpreadFrom; + startCase: LodashStartCase; + startsWith: LodashStartsWith; + stubArray: LodashStubArray; + stubFalse: LodashStubFalse; + stubObject: LodashStubObject; + stubString: LodashStubString; + stubTrue: LodashStubTrue; + subtract: LodashSubtract; + sum: LodashSum; + sumBy: LodashSumBy; + symmetricDifference: LodashXor; + symmetricDifferenceBy: LodashXorBy; + symmetricDifferenceWith: LodashXorWith; + T: LodashStubTrue; + tail: LodashTail; + take: LodashTake; + takeLast: LodashTakeRight; + takeLastWhile: LodashTakeRightWhile; + takeRight: LodashTakeRight; + takeRightWhile: LodashTakeRightWhile; + takeWhile: LodashTakeWhile; + tap: LodashTap; + template: LodashTemplate; + throttle: LodashThrottle; + thru: LodashThru; + times: LodashTimes; + toArray: LodashToArray; + toFinite: LodashToFinite; + toInteger: LodashToInteger; + toLength: LodashToLength; + toLower: LodashToLower; + toNumber: LodashToNumber; + toPairs: LodashToPairs; + toPairsIn: LodashToPairsIn; + toPath: LodashToPath; + toPlainObject: LodashToPlainObject; + toSafeInteger: LodashToSafeInteger; + toString: LodashToString; + toUpper: LodashToUpper; + transform: LodashTransform; + trim: LodashTrim; + trimChars: LodashTrimChars; + trimCharsEnd: LodashTrimCharsEnd; + trimCharsStart: LodashTrimCharsStart; + trimEnd: LodashTrimEnd; + trimStart: LodashTrimStart; + truncate: LodashTruncate; + unapply: LodashUnapply; + unary: LodashUnary; + unescape: LodashUnescape; + union: LodashUnion; + unionBy: LodashUnionBy; + unionWith: LodashUnionWith; + uniq: LodashUniq; + uniqBy: LodashUniqBy; + uniqueId: LodashUniqueId; + uniqWith: LodashUniqWith; + unnest: LodashFlatten; + unset: LodashUnset; + unzip: LodashUnzip; + unzipWith: LodashUnzipWith; + update: LodashUpdate; + updateWith: LodashUpdateWith; + upperCase: LodashUpperCase; + upperFirst: LodashUpperFirst; + useWith: LodashOverArgs; + values: LodashValues; + valuesIn: LodashValuesIn; + where: LodashConformsTo; + whereEq: LodashIsMatch; + without: LodashWithout; + words: LodashWords; + wrap: LodashWrap; + xor: LodashXor; + xorBy: LodashXorBy; + xorWith: LodashXorWith; + zip: LodashZip; + zipAll: LodashZipAll; + zipObj: LodashZipObject; + zipObject: LodashZipObject; + zipObjectDeep: LodashZipObjectDeep; + zipWith: LodashZipWith; + __: lodash.__; + placehodler: lodash.__; + } +} diff --git a/types/lodash/fp/F.d.ts b/types/lodash/fp/F.d.ts new file mode 100644 index 0000000000..33fc57930d --- /dev/null +++ b/types/lodash/fp/F.d.ts @@ -0,0 +1,2 @@ +import { F } from "../fp"; +export = F; diff --git a/types/lodash/fp/T.d.ts b/types/lodash/fp/T.d.ts new file mode 100644 index 0000000000..886606ef6f --- /dev/null +++ b/types/lodash/fp/T.d.ts @@ -0,0 +1,2 @@ +import { T } from "../fp"; +export = T; diff --git a/types/lodash/fp/__.d.ts b/types/lodash/fp/__.d.ts new file mode 100644 index 0000000000..aec0a51422 --- /dev/null +++ b/types/lodash/fp/__.d.ts @@ -0,0 +1,3 @@ +import _ = require("../index"); +declare const __: _.__; +export = __; diff --git a/types/lodash/fp/add.d.ts b/types/lodash/fp/add.d.ts new file mode 100644 index 0000000000..47c9c6a1a4 --- /dev/null +++ b/types/lodash/fp/add.d.ts @@ -0,0 +1,2 @@ +import { add } from "../fp"; +export = add; diff --git a/types/lodash/fp/after.d.ts b/types/lodash/fp/after.d.ts new file mode 100644 index 0000000000..93863a5613 --- /dev/null +++ b/types/lodash/fp/after.d.ts @@ -0,0 +1,2 @@ +import { after } from "../fp"; +export = after; diff --git a/types/lodash/fp/all.d.ts b/types/lodash/fp/all.d.ts new file mode 100644 index 0000000000..5ca0f70736 --- /dev/null +++ b/types/lodash/fp/all.d.ts @@ -0,0 +1,2 @@ +import { all } from "../fp"; +export = all; diff --git a/types/lodash/fp/allPass.d.ts b/types/lodash/fp/allPass.d.ts new file mode 100644 index 0000000000..5013913efc --- /dev/null +++ b/types/lodash/fp/allPass.d.ts @@ -0,0 +1,2 @@ +import { allPass } from "../fp"; +export = allPass; diff --git a/types/lodash/fp/always.d.ts b/types/lodash/fp/always.d.ts new file mode 100644 index 0000000000..07bd82d47c --- /dev/null +++ b/types/lodash/fp/always.d.ts @@ -0,0 +1,2 @@ +import { always } from "../fp"; +export = always; diff --git a/types/lodash/fp/any.d.ts b/types/lodash/fp/any.d.ts new file mode 100644 index 0000000000..5d8c38f27c --- /dev/null +++ b/types/lodash/fp/any.d.ts @@ -0,0 +1,2 @@ +import { any } from "../fp"; +export = any; diff --git a/types/lodash/fp/anyPass.d.ts b/types/lodash/fp/anyPass.d.ts new file mode 100644 index 0000000000..b69becfaf3 --- /dev/null +++ b/types/lodash/fp/anyPass.d.ts @@ -0,0 +1,2 @@ +import { anyPass } from "../fp"; +export = anyPass; diff --git a/types/lodash/fp/apply.d.ts b/types/lodash/fp/apply.d.ts new file mode 100644 index 0000000000..e13c42c5de --- /dev/null +++ b/types/lodash/fp/apply.d.ts @@ -0,0 +1,2 @@ +import { apply } from "../fp"; +export = apply; diff --git a/types/lodash/fp/ary.d.ts b/types/lodash/fp/ary.d.ts new file mode 100644 index 0000000000..932d7f45f3 --- /dev/null +++ b/types/lodash/fp/ary.d.ts @@ -0,0 +1,2 @@ +import { ary } from "../fp"; +export = ary; diff --git a/types/lodash/fp/assign.d.ts b/types/lodash/fp/assign.d.ts new file mode 100644 index 0000000000..cf173104ab --- /dev/null +++ b/types/lodash/fp/assign.d.ts @@ -0,0 +1,2 @@ +import { assign } from "../fp"; +export = assign; diff --git a/types/lodash/fp/assignAll.d.ts b/types/lodash/fp/assignAll.d.ts new file mode 100644 index 0000000000..f95b06b475 --- /dev/null +++ b/types/lodash/fp/assignAll.d.ts @@ -0,0 +1,2 @@ +import { assignAll } from "../fp"; +export = assignAll; diff --git a/types/lodash/fp/assignAllWith.d.ts b/types/lodash/fp/assignAllWith.d.ts new file mode 100644 index 0000000000..c2695a07a6 --- /dev/null +++ b/types/lodash/fp/assignAllWith.d.ts @@ -0,0 +1,2 @@ +import { assignAllWith } from "../fp"; +export = assignAllWith; diff --git a/types/lodash/fp/assignIn.d.ts b/types/lodash/fp/assignIn.d.ts new file mode 100644 index 0000000000..f6cdee768b --- /dev/null +++ b/types/lodash/fp/assignIn.d.ts @@ -0,0 +1,2 @@ +import { assignIn } from "../fp"; +export = assignIn; diff --git a/types/lodash/fp/assignInAll.d.ts b/types/lodash/fp/assignInAll.d.ts new file mode 100644 index 0000000000..539344b67b --- /dev/null +++ b/types/lodash/fp/assignInAll.d.ts @@ -0,0 +1,2 @@ +import { assignInAll } from "../fp"; +export = assignInAll; diff --git a/types/lodash/fp/assignInAllWith.d.ts b/types/lodash/fp/assignInAllWith.d.ts new file mode 100644 index 0000000000..3b421fb332 --- /dev/null +++ b/types/lodash/fp/assignInAllWith.d.ts @@ -0,0 +1,2 @@ +import { assignInAllWith } from "../fp"; +export = assignInAllWith; diff --git a/types/lodash/fp/assignInWith.d.ts b/types/lodash/fp/assignInWith.d.ts new file mode 100644 index 0000000000..c410091c62 --- /dev/null +++ b/types/lodash/fp/assignInWith.d.ts @@ -0,0 +1,2 @@ +import { assignInWith } from "../fp"; +export = assignInWith; diff --git a/types/lodash/fp/assignWith.d.ts b/types/lodash/fp/assignWith.d.ts new file mode 100644 index 0000000000..2205db0119 --- /dev/null +++ b/types/lodash/fp/assignWith.d.ts @@ -0,0 +1,2 @@ +import { assignWith } from "../fp"; +export = assignWith; diff --git a/types/lodash/fp/assoc.d.ts b/types/lodash/fp/assoc.d.ts new file mode 100644 index 0000000000..2a2e29c6f0 --- /dev/null +++ b/types/lodash/fp/assoc.d.ts @@ -0,0 +1,2 @@ +import { assoc } from "../fp"; +export = assoc; diff --git a/types/lodash/fp/assocPath.d.ts b/types/lodash/fp/assocPath.d.ts new file mode 100644 index 0000000000..e2dd5179e3 --- /dev/null +++ b/types/lodash/fp/assocPath.d.ts @@ -0,0 +1,2 @@ +import { assocPath } from "../fp"; +export = assocPath; diff --git a/types/lodash/fp/at.d.ts b/types/lodash/fp/at.d.ts new file mode 100644 index 0000000000..beefa3343b --- /dev/null +++ b/types/lodash/fp/at.d.ts @@ -0,0 +1,2 @@ +import { at } from "../fp"; +export = at; diff --git a/types/lodash/fp/attempt.d.ts b/types/lodash/fp/attempt.d.ts new file mode 100644 index 0000000000..72d60af08f --- /dev/null +++ b/types/lodash/fp/attempt.d.ts @@ -0,0 +1,2 @@ +import { attempt } from "../fp"; +export = attempt; diff --git a/types/lodash/fp/before.d.ts b/types/lodash/fp/before.d.ts new file mode 100644 index 0000000000..ead2869093 --- /dev/null +++ b/types/lodash/fp/before.d.ts @@ -0,0 +1,2 @@ +import { before } from "../fp"; +export = before; diff --git a/types/lodash/fp/bind.d.ts b/types/lodash/fp/bind.d.ts new file mode 100644 index 0000000000..a312192a31 --- /dev/null +++ b/types/lodash/fp/bind.d.ts @@ -0,0 +1,2 @@ +import { bind } from "../fp"; +export = bind; diff --git a/types/lodash/fp/bindAll.d.ts b/types/lodash/fp/bindAll.d.ts new file mode 100644 index 0000000000..4f7c7dbffc --- /dev/null +++ b/types/lodash/fp/bindAll.d.ts @@ -0,0 +1,2 @@ +import { bindAll } from "../fp"; +export = bindAll; diff --git a/types/lodash/fp/bindKey.d.ts b/types/lodash/fp/bindKey.d.ts new file mode 100644 index 0000000000..8986b2f3a5 --- /dev/null +++ b/types/lodash/fp/bindKey.d.ts @@ -0,0 +1,2 @@ +import { bindKey } from "../fp"; +export = bindKey; diff --git a/types/lodash/fp/camelCase.d.ts b/types/lodash/fp/camelCase.d.ts new file mode 100644 index 0000000000..be6628dd27 --- /dev/null +++ b/types/lodash/fp/camelCase.d.ts @@ -0,0 +1,2 @@ +import { camelCase } from "../fp"; +export = camelCase; diff --git a/types/lodash/fp/capitalize.d.ts b/types/lodash/fp/capitalize.d.ts new file mode 100644 index 0000000000..7dc552f9e4 --- /dev/null +++ b/types/lodash/fp/capitalize.d.ts @@ -0,0 +1,2 @@ +import { capitalize } from "../fp"; +export = capitalize; diff --git a/types/lodash/fp/castArray.d.ts b/types/lodash/fp/castArray.d.ts new file mode 100644 index 0000000000..a431805adf --- /dev/null +++ b/types/lodash/fp/castArray.d.ts @@ -0,0 +1,2 @@ +import { castArray } from "../fp"; +export = castArray; diff --git a/types/lodash/fp/ceil.d.ts b/types/lodash/fp/ceil.d.ts new file mode 100644 index 0000000000..13cd7317b1 --- /dev/null +++ b/types/lodash/fp/ceil.d.ts @@ -0,0 +1,2 @@ +import { ceil } from "../fp"; +export = ceil; diff --git a/types/lodash/fp/chunk.d.ts b/types/lodash/fp/chunk.d.ts new file mode 100644 index 0000000000..2e4066660b --- /dev/null +++ b/types/lodash/fp/chunk.d.ts @@ -0,0 +1,2 @@ +import { chunk } from "../fp"; +export = chunk; diff --git a/types/lodash/fp/clamp.d.ts b/types/lodash/fp/clamp.d.ts new file mode 100644 index 0000000000..121c6f9b9c --- /dev/null +++ b/types/lodash/fp/clamp.d.ts @@ -0,0 +1,2 @@ +import { clamp } from "../fp"; +export = clamp; diff --git a/types/lodash/fp/clone.d.ts b/types/lodash/fp/clone.d.ts new file mode 100644 index 0000000000..9edf0c8d13 --- /dev/null +++ b/types/lodash/fp/clone.d.ts @@ -0,0 +1,2 @@ +import { clone } from "../fp"; +export = clone; diff --git a/types/lodash/fp/cloneDeep.d.ts b/types/lodash/fp/cloneDeep.d.ts new file mode 100644 index 0000000000..3bdab159ac --- /dev/null +++ b/types/lodash/fp/cloneDeep.d.ts @@ -0,0 +1,2 @@ +import { cloneDeep } from "../fp"; +export = cloneDeep; diff --git a/types/lodash/fp/cloneDeepWith.d.ts b/types/lodash/fp/cloneDeepWith.d.ts new file mode 100644 index 0000000000..57cf5af8bd --- /dev/null +++ b/types/lodash/fp/cloneDeepWith.d.ts @@ -0,0 +1,2 @@ +import { cloneDeepWith } from "../fp"; +export = cloneDeepWith; diff --git a/types/lodash/fp/cloneWith.d.ts b/types/lodash/fp/cloneWith.d.ts new file mode 100644 index 0000000000..9c63e13693 --- /dev/null +++ b/types/lodash/fp/cloneWith.d.ts @@ -0,0 +1,2 @@ +import { cloneWith } from "../fp"; +export = cloneWith; diff --git a/types/lodash/fp/compact.d.ts b/types/lodash/fp/compact.d.ts new file mode 100644 index 0000000000..6ca1547040 --- /dev/null +++ b/types/lodash/fp/compact.d.ts @@ -0,0 +1,2 @@ +import { compact } from "../fp"; +export = compact; diff --git a/types/lodash/fp/complement.d.ts b/types/lodash/fp/complement.d.ts new file mode 100644 index 0000000000..e4c3112534 --- /dev/null +++ b/types/lodash/fp/complement.d.ts @@ -0,0 +1,2 @@ +import { complement } from "../fp"; +export = complement; diff --git a/types/lodash/fp/compose.d.ts b/types/lodash/fp/compose.d.ts new file mode 100644 index 0000000000..7950c7c585 --- /dev/null +++ b/types/lodash/fp/compose.d.ts @@ -0,0 +1,2 @@ +import { compose } from "../fp"; +export = compose; diff --git a/types/lodash/fp/concat.d.ts b/types/lodash/fp/concat.d.ts new file mode 100644 index 0000000000..5e109d1daa --- /dev/null +++ b/types/lodash/fp/concat.d.ts @@ -0,0 +1,2 @@ +import { concat } from "../fp"; +export = concat; diff --git a/types/lodash/fp/cond.d.ts b/types/lodash/fp/cond.d.ts new file mode 100644 index 0000000000..b9216e308f --- /dev/null +++ b/types/lodash/fp/cond.d.ts @@ -0,0 +1,2 @@ +import { cond } from "../fp"; +export = cond; diff --git a/types/lodash/fp/conforms.d.ts b/types/lodash/fp/conforms.d.ts new file mode 100644 index 0000000000..9bd3353f44 --- /dev/null +++ b/types/lodash/fp/conforms.d.ts @@ -0,0 +1,2 @@ +import { conforms } from "../fp"; +export = conforms; diff --git a/types/lodash/fp/conformsTo.d.ts b/types/lodash/fp/conformsTo.d.ts new file mode 100644 index 0000000000..ad1728006d --- /dev/null +++ b/types/lodash/fp/conformsTo.d.ts @@ -0,0 +1,2 @@ +import { conformsTo } from "../fp"; +export = conformsTo; diff --git a/types/lodash/fp/constant.d.ts b/types/lodash/fp/constant.d.ts new file mode 100644 index 0000000000..ef80ff57c3 --- /dev/null +++ b/types/lodash/fp/constant.d.ts @@ -0,0 +1,2 @@ +import { constant } from "../fp"; +export = constant; diff --git a/types/lodash/fp/contains.d.ts b/types/lodash/fp/contains.d.ts new file mode 100644 index 0000000000..6c29e95f1a --- /dev/null +++ b/types/lodash/fp/contains.d.ts @@ -0,0 +1,2 @@ +import { contains } from "../fp"; +export = contains; diff --git a/types/lodash/fp/convert.d.ts b/types/lodash/fp/convert.d.ts new file mode 100644 index 0000000000..c06ecd9370 --- /dev/null +++ b/types/lodash/fp/convert.d.ts @@ -0,0 +1,15 @@ +interface ConvertOptions { + cap?: boolean; + curry?: boolean; + fixed?: boolean; + immutable?: boolean; + rearg?: boolean; +} + +interface Convert { + (func: object, options?: ConvertOptions): any; + (name: string, func: (...args: any[]) => any, options?: ConvertOptions): any; +} + +declare const convert: Convert; +export = convert; diff --git a/types/lodash/fp/countBy.d.ts b/types/lodash/fp/countBy.d.ts new file mode 100644 index 0000000000..e3725c3521 --- /dev/null +++ b/types/lodash/fp/countBy.d.ts @@ -0,0 +1,2 @@ +import { countBy } from "../fp"; +export = countBy; diff --git a/types/lodash/fp/create.d.ts b/types/lodash/fp/create.d.ts new file mode 100644 index 0000000000..2818e10e8d --- /dev/null +++ b/types/lodash/fp/create.d.ts @@ -0,0 +1,2 @@ +import { create } from "../fp"; +export = create; diff --git a/types/lodash/fp/curry.d.ts b/types/lodash/fp/curry.d.ts new file mode 100644 index 0000000000..e8fcf1ded7 --- /dev/null +++ b/types/lodash/fp/curry.d.ts @@ -0,0 +1,2 @@ +import { curry } from "../fp"; +export = curry; diff --git a/types/lodash/fp/curryN.d.ts b/types/lodash/fp/curryN.d.ts new file mode 100644 index 0000000000..55b579b716 --- /dev/null +++ b/types/lodash/fp/curryN.d.ts @@ -0,0 +1,2 @@ +import { curryN } from "../fp"; +export = curryN; diff --git a/types/lodash/fp/curryRight.d.ts b/types/lodash/fp/curryRight.d.ts new file mode 100644 index 0000000000..d431f3c673 --- /dev/null +++ b/types/lodash/fp/curryRight.d.ts @@ -0,0 +1,2 @@ +import { curryRight } from "../fp"; +export = curryRight; diff --git a/types/lodash/fp/curryRightN.d.ts b/types/lodash/fp/curryRightN.d.ts new file mode 100644 index 0000000000..89866d16ae --- /dev/null +++ b/types/lodash/fp/curryRightN.d.ts @@ -0,0 +1,2 @@ +import { curryRightN } from "../fp"; +export = curryRightN; diff --git a/types/lodash/fp/debounce.d.ts b/types/lodash/fp/debounce.d.ts new file mode 100644 index 0000000000..88b003cbb0 --- /dev/null +++ b/types/lodash/fp/debounce.d.ts @@ -0,0 +1,2 @@ +import { debounce } from "../fp"; +export = debounce; diff --git a/types/lodash/fp/deburr.d.ts b/types/lodash/fp/deburr.d.ts new file mode 100644 index 0000000000..769abfb504 --- /dev/null +++ b/types/lodash/fp/deburr.d.ts @@ -0,0 +1,2 @@ +import { deburr } from "../fp"; +export = deburr; diff --git a/types/lodash/fp/defaultTo.d.ts b/types/lodash/fp/defaultTo.d.ts new file mode 100644 index 0000000000..e02cc46fed --- /dev/null +++ b/types/lodash/fp/defaultTo.d.ts @@ -0,0 +1,2 @@ +import { defaultTo } from "../fp"; +export = defaultTo; diff --git a/types/lodash/fp/defaults.d.ts b/types/lodash/fp/defaults.d.ts new file mode 100644 index 0000000000..132e47ba2e --- /dev/null +++ b/types/lodash/fp/defaults.d.ts @@ -0,0 +1,2 @@ +import { defaults } from "../fp"; +export = defaults; diff --git a/types/lodash/fp/defaultsAll.d.ts b/types/lodash/fp/defaultsAll.d.ts new file mode 100644 index 0000000000..1f2a3309e7 --- /dev/null +++ b/types/lodash/fp/defaultsAll.d.ts @@ -0,0 +1,2 @@ +import { defaultsAll } from "../fp"; +export = defaultsAll; diff --git a/types/lodash/fp/defaultsDeep.d.ts b/types/lodash/fp/defaultsDeep.d.ts new file mode 100644 index 0000000000..6268a02594 --- /dev/null +++ b/types/lodash/fp/defaultsDeep.d.ts @@ -0,0 +1,2 @@ +import { defaultsDeep } from "../fp"; +export = defaultsDeep; diff --git a/types/lodash/fp/defaultsDeepAll.d.ts b/types/lodash/fp/defaultsDeepAll.d.ts new file mode 100644 index 0000000000..7791666232 --- /dev/null +++ b/types/lodash/fp/defaultsDeepAll.d.ts @@ -0,0 +1,2 @@ +import { defaultsDeepAll } from "../fp"; +export = defaultsDeepAll; diff --git a/types/lodash/fp/defer.d.ts b/types/lodash/fp/defer.d.ts new file mode 100644 index 0000000000..f8be4ae8e2 --- /dev/null +++ b/types/lodash/fp/defer.d.ts @@ -0,0 +1,2 @@ +import { defer } from "../fp"; +export = defer; diff --git a/types/lodash/fp/delay.d.ts b/types/lodash/fp/delay.d.ts new file mode 100644 index 0000000000..2f0c39909f --- /dev/null +++ b/types/lodash/fp/delay.d.ts @@ -0,0 +1,2 @@ +import { delay } from "../fp"; +export = delay; diff --git a/types/lodash/fp/difference.d.ts b/types/lodash/fp/difference.d.ts new file mode 100644 index 0000000000..9448085041 --- /dev/null +++ b/types/lodash/fp/difference.d.ts @@ -0,0 +1,2 @@ +import { difference } from "../fp"; +export = difference; diff --git a/types/lodash/fp/differenceBy.d.ts b/types/lodash/fp/differenceBy.d.ts new file mode 100644 index 0000000000..52ba5b80ac --- /dev/null +++ b/types/lodash/fp/differenceBy.d.ts @@ -0,0 +1,2 @@ +import { differenceBy } from "../fp"; +export = differenceBy; diff --git a/types/lodash/fp/differenceWith.d.ts b/types/lodash/fp/differenceWith.d.ts new file mode 100644 index 0000000000..fd3c9a2cd4 --- /dev/null +++ b/types/lodash/fp/differenceWith.d.ts @@ -0,0 +1,2 @@ +import { differenceWith } from "../fp"; +export = differenceWith; diff --git a/types/lodash/fp/dissoc.d.ts b/types/lodash/fp/dissoc.d.ts new file mode 100644 index 0000000000..9b0fd6bb90 --- /dev/null +++ b/types/lodash/fp/dissoc.d.ts @@ -0,0 +1,2 @@ +import { dissoc } from "../fp"; +export = dissoc; diff --git a/types/lodash/fp/dissocPath.d.ts b/types/lodash/fp/dissocPath.d.ts new file mode 100644 index 0000000000..a201aa4b88 --- /dev/null +++ b/types/lodash/fp/dissocPath.d.ts @@ -0,0 +1,2 @@ +import { dissocPath } from "../fp"; +export = dissocPath; diff --git a/types/lodash/fp/divide.d.ts b/types/lodash/fp/divide.d.ts new file mode 100644 index 0000000000..5cd02e49dc --- /dev/null +++ b/types/lodash/fp/divide.d.ts @@ -0,0 +1,2 @@ +import { divide } from "../fp"; +export = divide; diff --git a/types/lodash/fp/drop.d.ts b/types/lodash/fp/drop.d.ts new file mode 100644 index 0000000000..bc3b9b2049 --- /dev/null +++ b/types/lodash/fp/drop.d.ts @@ -0,0 +1,2 @@ +import { drop } from "../fp"; +export = drop; diff --git a/types/lodash/fp/dropLast.d.ts b/types/lodash/fp/dropLast.d.ts new file mode 100644 index 0000000000..1dd388ae15 --- /dev/null +++ b/types/lodash/fp/dropLast.d.ts @@ -0,0 +1,2 @@ +import { dropLast } from "../fp"; +export = dropLast; diff --git a/types/lodash/fp/dropLastWhile.d.ts b/types/lodash/fp/dropLastWhile.d.ts new file mode 100644 index 0000000000..97529a6a49 --- /dev/null +++ b/types/lodash/fp/dropLastWhile.d.ts @@ -0,0 +1,2 @@ +import { dropLastWhile } from "../fp"; +export = dropLastWhile; diff --git a/types/lodash/fp/dropRight.d.ts b/types/lodash/fp/dropRight.d.ts new file mode 100644 index 0000000000..a2740ff029 --- /dev/null +++ b/types/lodash/fp/dropRight.d.ts @@ -0,0 +1,2 @@ +import { dropRight } from "../fp"; +export = dropRight; diff --git a/types/lodash/fp/dropRightWhile.d.ts b/types/lodash/fp/dropRightWhile.d.ts new file mode 100644 index 0000000000..1a5aa5fe3e --- /dev/null +++ b/types/lodash/fp/dropRightWhile.d.ts @@ -0,0 +1,2 @@ +import { dropRightWhile } from "../fp"; +export = dropRightWhile; diff --git a/types/lodash/fp/dropWhile.d.ts b/types/lodash/fp/dropWhile.d.ts new file mode 100644 index 0000000000..2cab8d8698 --- /dev/null +++ b/types/lodash/fp/dropWhile.d.ts @@ -0,0 +1,2 @@ +import { dropWhile } from "../fp"; +export = dropWhile; diff --git a/types/lodash/fp/each.d.ts b/types/lodash/fp/each.d.ts new file mode 100644 index 0000000000..af1d3b20a6 --- /dev/null +++ b/types/lodash/fp/each.d.ts @@ -0,0 +1,2 @@ +import { each } from "../fp"; +export = each; diff --git a/types/lodash/fp/eachRight.d.ts b/types/lodash/fp/eachRight.d.ts new file mode 100644 index 0000000000..5ca2934abd --- /dev/null +++ b/types/lodash/fp/eachRight.d.ts @@ -0,0 +1,2 @@ +import { eachRight } from "../fp"; +export = eachRight; diff --git a/types/lodash/fp/endsWith.d.ts b/types/lodash/fp/endsWith.d.ts new file mode 100644 index 0000000000..7e1b243d6f --- /dev/null +++ b/types/lodash/fp/endsWith.d.ts @@ -0,0 +1,2 @@ +import { endsWith } from "../fp"; +export = endsWith; diff --git a/types/lodash/fp/entries.d.ts b/types/lodash/fp/entries.d.ts new file mode 100644 index 0000000000..534c7bda3d --- /dev/null +++ b/types/lodash/fp/entries.d.ts @@ -0,0 +1,2 @@ +import { entries } from "../fp"; +export = entries; diff --git a/types/lodash/fp/entriesIn.d.ts b/types/lodash/fp/entriesIn.d.ts new file mode 100644 index 0000000000..932b17f625 --- /dev/null +++ b/types/lodash/fp/entriesIn.d.ts @@ -0,0 +1,2 @@ +import { entriesIn } from "../fp"; +export = entriesIn; diff --git a/types/lodash/fp/eq.d.ts b/types/lodash/fp/eq.d.ts new file mode 100644 index 0000000000..4778846a30 --- /dev/null +++ b/types/lodash/fp/eq.d.ts @@ -0,0 +1,2 @@ +import { eq } from "../fp"; +export = eq; diff --git a/types/lodash/fp/equals.d.ts b/types/lodash/fp/equals.d.ts new file mode 100644 index 0000000000..18ec108d66 --- /dev/null +++ b/types/lodash/fp/equals.d.ts @@ -0,0 +1,2 @@ +import { equals } from "../fp"; +export = equals; diff --git a/types/lodash/fp/escape.d.ts b/types/lodash/fp/escape.d.ts new file mode 100644 index 0000000000..36e7e87556 --- /dev/null +++ b/types/lodash/fp/escape.d.ts @@ -0,0 +1,2 @@ +import { escape } from "../fp"; +export = escape; diff --git a/types/lodash/fp/escapeRegExp.d.ts b/types/lodash/fp/escapeRegExp.d.ts new file mode 100644 index 0000000000..6adc20e806 --- /dev/null +++ b/types/lodash/fp/escapeRegExp.d.ts @@ -0,0 +1,2 @@ +import { escapeRegExp } from "../fp"; +export = escapeRegExp; diff --git a/types/lodash/fp/every.d.ts b/types/lodash/fp/every.d.ts new file mode 100644 index 0000000000..7fbeaf7b15 --- /dev/null +++ b/types/lodash/fp/every.d.ts @@ -0,0 +1,2 @@ +import { every } from "../fp"; +export = every; diff --git a/types/lodash/fp/extend.d.ts b/types/lodash/fp/extend.d.ts new file mode 100644 index 0000000000..cbe294ee0b --- /dev/null +++ b/types/lodash/fp/extend.d.ts @@ -0,0 +1,2 @@ +import { extend } from "../fp"; +export = extend; diff --git a/types/lodash/fp/extendAll.d.ts b/types/lodash/fp/extendAll.d.ts new file mode 100644 index 0000000000..92cb3d6e0c --- /dev/null +++ b/types/lodash/fp/extendAll.d.ts @@ -0,0 +1,2 @@ +import { extendAll } from "../fp"; +export = extendAll; diff --git a/types/lodash/fp/extendAllWith.d.ts b/types/lodash/fp/extendAllWith.d.ts new file mode 100644 index 0000000000..712d1d8eea --- /dev/null +++ b/types/lodash/fp/extendAllWith.d.ts @@ -0,0 +1,2 @@ +import { extendAllWith } from "../fp"; +export = extendAllWith; diff --git a/types/lodash/fp/extendWith.d.ts b/types/lodash/fp/extendWith.d.ts new file mode 100644 index 0000000000..9681360bbf --- /dev/null +++ b/types/lodash/fp/extendWith.d.ts @@ -0,0 +1,2 @@ +import { extendWith } from "../fp"; +export = extendWith; diff --git a/types/lodash/fp/fill.d.ts b/types/lodash/fp/fill.d.ts new file mode 100644 index 0000000000..577801504d --- /dev/null +++ b/types/lodash/fp/fill.d.ts @@ -0,0 +1,2 @@ +import { fill } from "../fp"; +export = fill; diff --git a/types/lodash/fp/filter.d.ts b/types/lodash/fp/filter.d.ts new file mode 100644 index 0000000000..8619741343 --- /dev/null +++ b/types/lodash/fp/filter.d.ts @@ -0,0 +1,2 @@ +import { filter } from "../fp"; +export = filter; diff --git a/types/lodash/fp/find.d.ts b/types/lodash/fp/find.d.ts new file mode 100644 index 0000000000..06418fb456 --- /dev/null +++ b/types/lodash/fp/find.d.ts @@ -0,0 +1,2 @@ +import { find } from "../fp"; +export = find; diff --git a/types/lodash/fp/findFrom.d.ts b/types/lodash/fp/findFrom.d.ts new file mode 100644 index 0000000000..64275d0c83 --- /dev/null +++ b/types/lodash/fp/findFrom.d.ts @@ -0,0 +1,2 @@ +import { findFrom } from "../fp"; +export = findFrom; diff --git a/types/lodash/fp/findIndex.d.ts b/types/lodash/fp/findIndex.d.ts new file mode 100644 index 0000000000..77d1f7b6be --- /dev/null +++ b/types/lodash/fp/findIndex.d.ts @@ -0,0 +1,2 @@ +import { findIndex } from "../fp"; +export = findIndex; diff --git a/types/lodash/fp/findIndexFrom.d.ts b/types/lodash/fp/findIndexFrom.d.ts new file mode 100644 index 0000000000..22330adc53 --- /dev/null +++ b/types/lodash/fp/findIndexFrom.d.ts @@ -0,0 +1,2 @@ +import { findIndexFrom } from "../fp"; +export = findIndexFrom; diff --git a/types/lodash/fp/findKey.d.ts b/types/lodash/fp/findKey.d.ts new file mode 100644 index 0000000000..c5a225a776 --- /dev/null +++ b/types/lodash/fp/findKey.d.ts @@ -0,0 +1,2 @@ +import { findKey } from "../fp"; +export = findKey; diff --git a/types/lodash/fp/findLast.d.ts b/types/lodash/fp/findLast.d.ts new file mode 100644 index 0000000000..b400c946b0 --- /dev/null +++ b/types/lodash/fp/findLast.d.ts @@ -0,0 +1,2 @@ +import { findLast } from "../fp"; +export = findLast; diff --git a/types/lodash/fp/findLastFrom.d.ts b/types/lodash/fp/findLastFrom.d.ts new file mode 100644 index 0000000000..1f034dfa88 --- /dev/null +++ b/types/lodash/fp/findLastFrom.d.ts @@ -0,0 +1,2 @@ +import { findLastFrom } from "../fp"; +export = findLastFrom; diff --git a/types/lodash/fp/findLastIndex.d.ts b/types/lodash/fp/findLastIndex.d.ts new file mode 100644 index 0000000000..51ee410fb1 --- /dev/null +++ b/types/lodash/fp/findLastIndex.d.ts @@ -0,0 +1,2 @@ +import { findLastIndex } from "../fp"; +export = findLastIndex; diff --git a/types/lodash/fp/findLastIndexFrom.d.ts b/types/lodash/fp/findLastIndexFrom.d.ts new file mode 100644 index 0000000000..08bd53a087 --- /dev/null +++ b/types/lodash/fp/findLastIndexFrom.d.ts @@ -0,0 +1,2 @@ +import { findLastIndexFrom } from "../fp"; +export = findLastIndexFrom; diff --git a/types/lodash/fp/findLastKey.d.ts b/types/lodash/fp/findLastKey.d.ts new file mode 100644 index 0000000000..7437a9ddda --- /dev/null +++ b/types/lodash/fp/findLastKey.d.ts @@ -0,0 +1,2 @@ +import { findLastKey } from "../fp"; +export = findLastKey; diff --git a/types/lodash/fp/first.d.ts b/types/lodash/fp/first.d.ts new file mode 100644 index 0000000000..4554ad0e92 --- /dev/null +++ b/types/lodash/fp/first.d.ts @@ -0,0 +1,2 @@ +import { first } from "../fp"; +export = first; diff --git a/types/lodash/fp/flatMap.d.ts b/types/lodash/fp/flatMap.d.ts new file mode 100644 index 0000000000..eb6d80434f --- /dev/null +++ b/types/lodash/fp/flatMap.d.ts @@ -0,0 +1,2 @@ +import { flatMap } from "../fp"; +export = flatMap; diff --git a/types/lodash/fp/flatMapDeep.d.ts b/types/lodash/fp/flatMapDeep.d.ts new file mode 100644 index 0000000000..0ce4db4801 --- /dev/null +++ b/types/lodash/fp/flatMapDeep.d.ts @@ -0,0 +1,2 @@ +import { flatMapDeep } from "../fp"; +export = flatMapDeep; diff --git a/types/lodash/fp/flatMapDepth.d.ts b/types/lodash/fp/flatMapDepth.d.ts new file mode 100644 index 0000000000..b60af92cc4 --- /dev/null +++ b/types/lodash/fp/flatMapDepth.d.ts @@ -0,0 +1,2 @@ +import { flatMapDepth } from "../fp"; +export = flatMapDepth; diff --git a/types/lodash/fp/flatten.d.ts b/types/lodash/fp/flatten.d.ts new file mode 100644 index 0000000000..02c051ff0b --- /dev/null +++ b/types/lodash/fp/flatten.d.ts @@ -0,0 +1,2 @@ +import { flatten } from "../fp"; +export = flatten; diff --git a/types/lodash/fp/flattenDeep.d.ts b/types/lodash/fp/flattenDeep.d.ts new file mode 100644 index 0000000000..44b40e3a1f --- /dev/null +++ b/types/lodash/fp/flattenDeep.d.ts @@ -0,0 +1,2 @@ +import { flattenDeep } from "../fp"; +export = flattenDeep; diff --git a/types/lodash/fp/flattenDepth.d.ts b/types/lodash/fp/flattenDepth.d.ts new file mode 100644 index 0000000000..f046f2086a --- /dev/null +++ b/types/lodash/fp/flattenDepth.d.ts @@ -0,0 +1,2 @@ +import { flattenDepth } from "../fp"; +export = flattenDepth; diff --git a/types/lodash/fp/flip.d.ts b/types/lodash/fp/flip.d.ts new file mode 100644 index 0000000000..e5b3b7d4f9 --- /dev/null +++ b/types/lodash/fp/flip.d.ts @@ -0,0 +1,2 @@ +import { flip } from "../fp"; +export = flip; diff --git a/types/lodash/fp/floor.d.ts b/types/lodash/fp/floor.d.ts new file mode 100644 index 0000000000..167ab95438 --- /dev/null +++ b/types/lodash/fp/floor.d.ts @@ -0,0 +1,2 @@ +import { floor } from "../fp"; +export = floor; diff --git a/types/lodash/fp/flow.d.ts b/types/lodash/fp/flow.d.ts new file mode 100644 index 0000000000..97f0fb82b2 --- /dev/null +++ b/types/lodash/fp/flow.d.ts @@ -0,0 +1,2 @@ +import { flow } from "../fp"; +export = flow; diff --git a/types/lodash/fp/flowRight.d.ts b/types/lodash/fp/flowRight.d.ts new file mode 100644 index 0000000000..f148feaad9 --- /dev/null +++ b/types/lodash/fp/flowRight.d.ts @@ -0,0 +1,2 @@ +import { flowRight } from "../fp"; +export = flowRight; diff --git a/types/lodash/fp/forEach.d.ts b/types/lodash/fp/forEach.d.ts new file mode 100644 index 0000000000..f8aa7a4a1a --- /dev/null +++ b/types/lodash/fp/forEach.d.ts @@ -0,0 +1,2 @@ +import { forEach } from "../fp"; +export = forEach; diff --git a/types/lodash/fp/forEachRight.d.ts b/types/lodash/fp/forEachRight.d.ts new file mode 100644 index 0000000000..135a4243a9 --- /dev/null +++ b/types/lodash/fp/forEachRight.d.ts @@ -0,0 +1,2 @@ +import { forEachRight } from "../fp"; +export = forEachRight; diff --git a/types/lodash/fp/forIn.d.ts b/types/lodash/fp/forIn.d.ts new file mode 100644 index 0000000000..dab37b1075 --- /dev/null +++ b/types/lodash/fp/forIn.d.ts @@ -0,0 +1,2 @@ +import { forIn } from "../fp"; +export = forIn; diff --git a/types/lodash/fp/forInRight.d.ts b/types/lodash/fp/forInRight.d.ts new file mode 100644 index 0000000000..c560df0cef --- /dev/null +++ b/types/lodash/fp/forInRight.d.ts @@ -0,0 +1,2 @@ +import { forInRight } from "../fp"; +export = forInRight; diff --git a/types/lodash/fp/forOwn.d.ts b/types/lodash/fp/forOwn.d.ts new file mode 100644 index 0000000000..7099c48a9d --- /dev/null +++ b/types/lodash/fp/forOwn.d.ts @@ -0,0 +1,2 @@ +import { forOwn } from "../fp"; +export = forOwn; diff --git a/types/lodash/fp/forOwnRight.d.ts b/types/lodash/fp/forOwnRight.d.ts new file mode 100644 index 0000000000..f1e3928866 --- /dev/null +++ b/types/lodash/fp/forOwnRight.d.ts @@ -0,0 +1,2 @@ +import { forOwnRight } from "../fp"; +export = forOwnRight; diff --git a/types/lodash/fp/fromPairs.d.ts b/types/lodash/fp/fromPairs.d.ts new file mode 100644 index 0000000000..b0d0082a59 --- /dev/null +++ b/types/lodash/fp/fromPairs.d.ts @@ -0,0 +1,2 @@ +import { fromPairs } from "../fp"; +export = fromPairs; diff --git a/types/lodash/fp/functions.d.ts b/types/lodash/fp/functions.d.ts new file mode 100644 index 0000000000..727d68e138 --- /dev/null +++ b/types/lodash/fp/functions.d.ts @@ -0,0 +1,2 @@ +import { functions } from "../fp"; +export = functions; diff --git a/types/lodash/fp/functionsIn.d.ts b/types/lodash/fp/functionsIn.d.ts new file mode 100644 index 0000000000..448746e619 --- /dev/null +++ b/types/lodash/fp/functionsIn.d.ts @@ -0,0 +1,2 @@ +import { functionsIn } from "../fp"; +export = functionsIn; diff --git a/types/lodash/fp/get.d.ts b/types/lodash/fp/get.d.ts new file mode 100644 index 0000000000..ff3ab8b09d --- /dev/null +++ b/types/lodash/fp/get.d.ts @@ -0,0 +1,2 @@ +import { get } from "../fp"; +export = get; diff --git a/types/lodash/fp/getOr.d.ts b/types/lodash/fp/getOr.d.ts new file mode 100644 index 0000000000..ce3d5bba31 --- /dev/null +++ b/types/lodash/fp/getOr.d.ts @@ -0,0 +1,2 @@ +import { getOr } from "../fp"; +export = getOr; diff --git a/types/lodash/fp/groupBy.d.ts b/types/lodash/fp/groupBy.d.ts new file mode 100644 index 0000000000..813830aa0e --- /dev/null +++ b/types/lodash/fp/groupBy.d.ts @@ -0,0 +1,2 @@ +import { groupBy } from "../fp"; +export = groupBy; diff --git a/types/lodash/fp/gt.d.ts b/types/lodash/fp/gt.d.ts new file mode 100644 index 0000000000..517071f511 --- /dev/null +++ b/types/lodash/fp/gt.d.ts @@ -0,0 +1,2 @@ +import { gt } from "../fp"; +export = gt; diff --git a/types/lodash/fp/gte.d.ts b/types/lodash/fp/gte.d.ts new file mode 100644 index 0000000000..5f6d85c7f0 --- /dev/null +++ b/types/lodash/fp/gte.d.ts @@ -0,0 +1,2 @@ +import { gte } from "../fp"; +export = gte; diff --git a/types/lodash/fp/has.d.ts b/types/lodash/fp/has.d.ts new file mode 100644 index 0000000000..8cbda7fb8c --- /dev/null +++ b/types/lodash/fp/has.d.ts @@ -0,0 +1,2 @@ +import { has } from "../fp"; +export = has; diff --git a/types/lodash/fp/hasIn.d.ts b/types/lodash/fp/hasIn.d.ts new file mode 100644 index 0000000000..7e06a87ae3 --- /dev/null +++ b/types/lodash/fp/hasIn.d.ts @@ -0,0 +1,2 @@ +import { hasIn } from "../fp"; +export = hasIn; diff --git a/types/lodash/fp/head.d.ts b/types/lodash/fp/head.d.ts new file mode 100644 index 0000000000..4a7d5e59cd --- /dev/null +++ b/types/lodash/fp/head.d.ts @@ -0,0 +1,2 @@ +import { head } from "../fp"; +export = head; diff --git a/types/lodash/fp/identical.d.ts b/types/lodash/fp/identical.d.ts new file mode 100644 index 0000000000..954dff5569 --- /dev/null +++ b/types/lodash/fp/identical.d.ts @@ -0,0 +1,2 @@ +import { identical } from "../fp"; +export = identical; diff --git a/types/lodash/fp/identity.d.ts b/types/lodash/fp/identity.d.ts new file mode 100644 index 0000000000..97e613c6c8 --- /dev/null +++ b/types/lodash/fp/identity.d.ts @@ -0,0 +1,2 @@ +import { identity } from "../fp"; +export = identity; diff --git a/types/lodash/fp/inRange.d.ts b/types/lodash/fp/inRange.d.ts new file mode 100644 index 0000000000..06ed312687 --- /dev/null +++ b/types/lodash/fp/inRange.d.ts @@ -0,0 +1,2 @@ +import { inRange } from "../fp"; +export = inRange; diff --git a/types/lodash/fp/includes.d.ts b/types/lodash/fp/includes.d.ts new file mode 100644 index 0000000000..afc9984286 --- /dev/null +++ b/types/lodash/fp/includes.d.ts @@ -0,0 +1,2 @@ +import { includes } from "../fp"; +export = includes; diff --git a/types/lodash/fp/includesFrom.d.ts b/types/lodash/fp/includesFrom.d.ts new file mode 100644 index 0000000000..13042d029a --- /dev/null +++ b/types/lodash/fp/includesFrom.d.ts @@ -0,0 +1,2 @@ +import { includesFrom } from "../fp"; +export = includesFrom; diff --git a/types/lodash/fp/indexBy.d.ts b/types/lodash/fp/indexBy.d.ts new file mode 100644 index 0000000000..f3f75a41fa --- /dev/null +++ b/types/lodash/fp/indexBy.d.ts @@ -0,0 +1,2 @@ +import { indexBy } from "../fp"; +export = indexBy; diff --git a/types/lodash/fp/indexOf.d.ts b/types/lodash/fp/indexOf.d.ts new file mode 100644 index 0000000000..8078c468fd --- /dev/null +++ b/types/lodash/fp/indexOf.d.ts @@ -0,0 +1,2 @@ +import { indexOf } from "../fp"; +export = indexOf; diff --git a/types/lodash/fp/indexOfFrom.d.ts b/types/lodash/fp/indexOfFrom.d.ts new file mode 100644 index 0000000000..fe66609f7a --- /dev/null +++ b/types/lodash/fp/indexOfFrom.d.ts @@ -0,0 +1,2 @@ +import { indexOfFrom } from "../fp"; +export = indexOfFrom; diff --git a/types/lodash/fp/init.d.ts b/types/lodash/fp/init.d.ts new file mode 100644 index 0000000000..2f37ecd284 --- /dev/null +++ b/types/lodash/fp/init.d.ts @@ -0,0 +1,2 @@ +import { init } from "../fp"; +export = init; diff --git a/types/lodash/fp/initial.d.ts b/types/lodash/fp/initial.d.ts new file mode 100644 index 0000000000..446da0678b --- /dev/null +++ b/types/lodash/fp/initial.d.ts @@ -0,0 +1,2 @@ +import { initial } from "../fp"; +export = initial; diff --git a/types/lodash/fp/intersection.d.ts b/types/lodash/fp/intersection.d.ts new file mode 100644 index 0000000000..41d7915841 --- /dev/null +++ b/types/lodash/fp/intersection.d.ts @@ -0,0 +1,2 @@ +import { intersection } from "../fp"; +export = intersection; diff --git a/types/lodash/fp/intersectionBy.d.ts b/types/lodash/fp/intersectionBy.d.ts new file mode 100644 index 0000000000..a123ddda0d --- /dev/null +++ b/types/lodash/fp/intersectionBy.d.ts @@ -0,0 +1,2 @@ +import { intersectionBy } from "../fp"; +export = intersectionBy; diff --git a/types/lodash/fp/intersectionWith.d.ts b/types/lodash/fp/intersectionWith.d.ts new file mode 100644 index 0000000000..9ad9941570 --- /dev/null +++ b/types/lodash/fp/intersectionWith.d.ts @@ -0,0 +1,2 @@ +import { intersectionWith } from "../fp"; +export = intersectionWith; diff --git a/types/lodash/fp/invert.d.ts b/types/lodash/fp/invert.d.ts new file mode 100644 index 0000000000..a41c2bc244 --- /dev/null +++ b/types/lodash/fp/invert.d.ts @@ -0,0 +1,2 @@ +import { invert } from "../fp"; +export = invert; diff --git a/types/lodash/fp/invertBy.d.ts b/types/lodash/fp/invertBy.d.ts new file mode 100644 index 0000000000..e28f7135f4 --- /dev/null +++ b/types/lodash/fp/invertBy.d.ts @@ -0,0 +1,2 @@ +import { invertBy } from "../fp"; +export = invertBy; diff --git a/types/lodash/fp/invertObj.d.ts b/types/lodash/fp/invertObj.d.ts new file mode 100644 index 0000000000..2e16c4f8fb --- /dev/null +++ b/types/lodash/fp/invertObj.d.ts @@ -0,0 +1,2 @@ +import { invertObj } from "../fp"; +export = invertObj; diff --git a/types/lodash/fp/invoke.d.ts b/types/lodash/fp/invoke.d.ts new file mode 100644 index 0000000000..1a9ce3b355 --- /dev/null +++ b/types/lodash/fp/invoke.d.ts @@ -0,0 +1,2 @@ +import { invoke } from "../fp"; +export = invoke; diff --git a/types/lodash/fp/invokeArgs.d.ts b/types/lodash/fp/invokeArgs.d.ts new file mode 100644 index 0000000000..8b498e0ec1 --- /dev/null +++ b/types/lodash/fp/invokeArgs.d.ts @@ -0,0 +1,2 @@ +import { invokeArgs } from "../fp"; +export = invokeArgs; diff --git a/types/lodash/fp/invokeArgsMap.d.ts b/types/lodash/fp/invokeArgsMap.d.ts new file mode 100644 index 0000000000..f5ba3e7ec5 --- /dev/null +++ b/types/lodash/fp/invokeArgsMap.d.ts @@ -0,0 +1,2 @@ +import { invokeArgsMap } from "../fp"; +export = invokeArgsMap; diff --git a/types/lodash/fp/invokeMap.d.ts b/types/lodash/fp/invokeMap.d.ts new file mode 100644 index 0000000000..9f0aea9c11 --- /dev/null +++ b/types/lodash/fp/invokeMap.d.ts @@ -0,0 +1,2 @@ +import { invokeMap } from "../fp"; +export = invokeMap; diff --git a/types/lodash/fp/isArguments.d.ts b/types/lodash/fp/isArguments.d.ts new file mode 100644 index 0000000000..23c438c0a5 --- /dev/null +++ b/types/lodash/fp/isArguments.d.ts @@ -0,0 +1,2 @@ +import { isArguments } from "../fp"; +export = isArguments; diff --git a/types/lodash/fp/isArray.d.ts b/types/lodash/fp/isArray.d.ts new file mode 100644 index 0000000000..dadecce65f --- /dev/null +++ b/types/lodash/fp/isArray.d.ts @@ -0,0 +1,2 @@ +import { isArray } from "../fp"; +export = isArray; diff --git a/types/lodash/fp/isArrayBuffer.d.ts b/types/lodash/fp/isArrayBuffer.d.ts new file mode 100644 index 0000000000..32018346ba --- /dev/null +++ b/types/lodash/fp/isArrayBuffer.d.ts @@ -0,0 +1,2 @@ +import { isArrayBuffer } from "../fp"; +export = isArrayBuffer; diff --git a/types/lodash/fp/isArrayLike.d.ts b/types/lodash/fp/isArrayLike.d.ts new file mode 100644 index 0000000000..2be9b54c93 --- /dev/null +++ b/types/lodash/fp/isArrayLike.d.ts @@ -0,0 +1,2 @@ +import { isArrayLike } from "../fp"; +export = isArrayLike; diff --git a/types/lodash/fp/isArrayLikeObject.d.ts b/types/lodash/fp/isArrayLikeObject.d.ts new file mode 100644 index 0000000000..709f5135fe --- /dev/null +++ b/types/lodash/fp/isArrayLikeObject.d.ts @@ -0,0 +1,2 @@ +import { isArrayLikeObject } from "../fp"; +export = isArrayLikeObject; diff --git a/types/lodash/fp/isBoolean.d.ts b/types/lodash/fp/isBoolean.d.ts new file mode 100644 index 0000000000..605cb2cb7e --- /dev/null +++ b/types/lodash/fp/isBoolean.d.ts @@ -0,0 +1,2 @@ +import { isBoolean } from "../fp"; +export = isBoolean; diff --git a/types/lodash/fp/isBuffer.d.ts b/types/lodash/fp/isBuffer.d.ts new file mode 100644 index 0000000000..3d06b548c1 --- /dev/null +++ b/types/lodash/fp/isBuffer.d.ts @@ -0,0 +1,2 @@ +import { isBuffer } from "../fp"; +export = isBuffer; diff --git a/types/lodash/fp/isDate.d.ts b/types/lodash/fp/isDate.d.ts new file mode 100644 index 0000000000..979594f995 --- /dev/null +++ b/types/lodash/fp/isDate.d.ts @@ -0,0 +1,2 @@ +import { isDate } from "../fp"; +export = isDate; diff --git a/types/lodash/fp/isElement.d.ts b/types/lodash/fp/isElement.d.ts new file mode 100644 index 0000000000..26739ad952 --- /dev/null +++ b/types/lodash/fp/isElement.d.ts @@ -0,0 +1,2 @@ +import { isElement } from "../fp"; +export = isElement; diff --git a/types/lodash/fp/isEmpty.d.ts b/types/lodash/fp/isEmpty.d.ts new file mode 100644 index 0000000000..ed9b33f822 --- /dev/null +++ b/types/lodash/fp/isEmpty.d.ts @@ -0,0 +1,2 @@ +import { isEmpty } from "../fp"; +export = isEmpty; diff --git a/types/lodash/fp/isEqual.d.ts b/types/lodash/fp/isEqual.d.ts new file mode 100644 index 0000000000..0a51c5c80d --- /dev/null +++ b/types/lodash/fp/isEqual.d.ts @@ -0,0 +1,2 @@ +import { isEqual } from "../fp"; +export = isEqual; diff --git a/types/lodash/fp/isEqualWith.d.ts b/types/lodash/fp/isEqualWith.d.ts new file mode 100644 index 0000000000..27fa4414cb --- /dev/null +++ b/types/lodash/fp/isEqualWith.d.ts @@ -0,0 +1,2 @@ +import { isEqualWith } from "../fp"; +export = isEqualWith; diff --git a/types/lodash/fp/isError.d.ts b/types/lodash/fp/isError.d.ts new file mode 100644 index 0000000000..4adb9885ca --- /dev/null +++ b/types/lodash/fp/isError.d.ts @@ -0,0 +1,2 @@ +import { isError } from "../fp"; +export = isError; diff --git a/types/lodash/fp/isFinite.d.ts b/types/lodash/fp/isFinite.d.ts new file mode 100644 index 0000000000..5641edc0ae --- /dev/null +++ b/types/lodash/fp/isFinite.d.ts @@ -0,0 +1,2 @@ +import { isFinite } from "../fp"; +export = isFinite; diff --git a/types/lodash/fp/isFunction.d.ts b/types/lodash/fp/isFunction.d.ts new file mode 100644 index 0000000000..3404e74871 --- /dev/null +++ b/types/lodash/fp/isFunction.d.ts @@ -0,0 +1,2 @@ +import { isFunction } from "../fp"; +export = isFunction; diff --git a/types/lodash/fp/isInteger.d.ts b/types/lodash/fp/isInteger.d.ts new file mode 100644 index 0000000000..310df93478 --- /dev/null +++ b/types/lodash/fp/isInteger.d.ts @@ -0,0 +1,2 @@ +import { isInteger } from "../fp"; +export = isInteger; diff --git a/types/lodash/fp/isLength.d.ts b/types/lodash/fp/isLength.d.ts new file mode 100644 index 0000000000..3073b672b6 --- /dev/null +++ b/types/lodash/fp/isLength.d.ts @@ -0,0 +1,2 @@ +import { isLength } from "../fp"; +export = isLength; diff --git a/types/lodash/fp/isMap.d.ts b/types/lodash/fp/isMap.d.ts new file mode 100644 index 0000000000..e76745c1e2 --- /dev/null +++ b/types/lodash/fp/isMap.d.ts @@ -0,0 +1,2 @@ +import { isMap } from "../fp"; +export = isMap; diff --git a/types/lodash/fp/isMatch.d.ts b/types/lodash/fp/isMatch.d.ts new file mode 100644 index 0000000000..58a0a2db95 --- /dev/null +++ b/types/lodash/fp/isMatch.d.ts @@ -0,0 +1,2 @@ +import { isMatch } from "../fp"; +export = isMatch; diff --git a/types/lodash/fp/isMatchWith.d.ts b/types/lodash/fp/isMatchWith.d.ts new file mode 100644 index 0000000000..40ff3a691b --- /dev/null +++ b/types/lodash/fp/isMatchWith.d.ts @@ -0,0 +1,2 @@ +import { isMatchWith } from "../fp"; +export = isMatchWith; diff --git a/types/lodash/fp/isNaN.d.ts b/types/lodash/fp/isNaN.d.ts new file mode 100644 index 0000000000..2f92885d09 --- /dev/null +++ b/types/lodash/fp/isNaN.d.ts @@ -0,0 +1,2 @@ +import { isNaN } from "../fp"; +export = isNaN; diff --git a/types/lodash/fp/isNative.d.ts b/types/lodash/fp/isNative.d.ts new file mode 100644 index 0000000000..6e189a8e52 --- /dev/null +++ b/types/lodash/fp/isNative.d.ts @@ -0,0 +1,2 @@ +import { isNative } from "../fp"; +export = isNative; diff --git a/types/lodash/fp/isNil.d.ts b/types/lodash/fp/isNil.d.ts new file mode 100644 index 0000000000..0baee7ff8b --- /dev/null +++ b/types/lodash/fp/isNil.d.ts @@ -0,0 +1,2 @@ +import { isNil } from "../fp"; +export = isNil; diff --git a/types/lodash/fp/isNull.d.ts b/types/lodash/fp/isNull.d.ts new file mode 100644 index 0000000000..5e5fad5575 --- /dev/null +++ b/types/lodash/fp/isNull.d.ts @@ -0,0 +1,2 @@ +import { isNull } from "../fp"; +export = isNull; diff --git a/types/lodash/fp/isNumber.d.ts b/types/lodash/fp/isNumber.d.ts new file mode 100644 index 0000000000..93368f1726 --- /dev/null +++ b/types/lodash/fp/isNumber.d.ts @@ -0,0 +1,2 @@ +import { isNumber } from "../fp"; +export = isNumber; diff --git a/types/lodash/fp/isObject.d.ts b/types/lodash/fp/isObject.d.ts new file mode 100644 index 0000000000..7e9e2575ab --- /dev/null +++ b/types/lodash/fp/isObject.d.ts @@ -0,0 +1,2 @@ +import { isObject } from "../fp"; +export = isObject; diff --git a/types/lodash/fp/isObjectLike.d.ts b/types/lodash/fp/isObjectLike.d.ts new file mode 100644 index 0000000000..ba03ddc0f7 --- /dev/null +++ b/types/lodash/fp/isObjectLike.d.ts @@ -0,0 +1,2 @@ +import { isObjectLike } from "../fp"; +export = isObjectLike; diff --git a/types/lodash/fp/isPlainObject.d.ts b/types/lodash/fp/isPlainObject.d.ts new file mode 100644 index 0000000000..87da4bdb47 --- /dev/null +++ b/types/lodash/fp/isPlainObject.d.ts @@ -0,0 +1,2 @@ +import { isPlainObject } from "../fp"; +export = isPlainObject; diff --git a/types/lodash/fp/isRegExp.d.ts b/types/lodash/fp/isRegExp.d.ts new file mode 100644 index 0000000000..47edf50a1f --- /dev/null +++ b/types/lodash/fp/isRegExp.d.ts @@ -0,0 +1,2 @@ +import { isRegExp } from "../fp"; +export = isRegExp; diff --git a/types/lodash/fp/isSafeInteger.d.ts b/types/lodash/fp/isSafeInteger.d.ts new file mode 100644 index 0000000000..a32b12cfd8 --- /dev/null +++ b/types/lodash/fp/isSafeInteger.d.ts @@ -0,0 +1,2 @@ +import { isSafeInteger } from "../fp"; +export = isSafeInteger; diff --git a/types/lodash/fp/isSet.d.ts b/types/lodash/fp/isSet.d.ts new file mode 100644 index 0000000000..85e493338e --- /dev/null +++ b/types/lodash/fp/isSet.d.ts @@ -0,0 +1,2 @@ +import { isSet } from "../fp"; +export = isSet; diff --git a/types/lodash/fp/isString.d.ts b/types/lodash/fp/isString.d.ts new file mode 100644 index 0000000000..9a2149451d --- /dev/null +++ b/types/lodash/fp/isString.d.ts @@ -0,0 +1,2 @@ +import { isString } from "../fp"; +export = isString; diff --git a/types/lodash/fp/isSymbol.d.ts b/types/lodash/fp/isSymbol.d.ts new file mode 100644 index 0000000000..3d82e9719c --- /dev/null +++ b/types/lodash/fp/isSymbol.d.ts @@ -0,0 +1,2 @@ +import { isSymbol } from "../fp"; +export = isSymbol; diff --git a/types/lodash/fp/isTypedArray.d.ts b/types/lodash/fp/isTypedArray.d.ts new file mode 100644 index 0000000000..fce6c44a69 --- /dev/null +++ b/types/lodash/fp/isTypedArray.d.ts @@ -0,0 +1,2 @@ +import { isTypedArray } from "../fp"; +export = isTypedArray; diff --git a/types/lodash/fp/isUndefined.d.ts b/types/lodash/fp/isUndefined.d.ts new file mode 100644 index 0000000000..ccb010033b --- /dev/null +++ b/types/lodash/fp/isUndefined.d.ts @@ -0,0 +1,2 @@ +import { isUndefined } from "../fp"; +export = isUndefined; diff --git a/types/lodash/fp/isWeakMap.d.ts b/types/lodash/fp/isWeakMap.d.ts new file mode 100644 index 0000000000..11edaab05d --- /dev/null +++ b/types/lodash/fp/isWeakMap.d.ts @@ -0,0 +1,2 @@ +import { isWeakMap } from "../fp"; +export = isWeakMap; diff --git a/types/lodash/fp/isWeakSet.d.ts b/types/lodash/fp/isWeakSet.d.ts new file mode 100644 index 0000000000..6d877e9e23 --- /dev/null +++ b/types/lodash/fp/isWeakSet.d.ts @@ -0,0 +1,2 @@ +import { isWeakSet } from "../fp"; +export = isWeakSet; diff --git a/types/lodash/fp/iteratee.d.ts b/types/lodash/fp/iteratee.d.ts new file mode 100644 index 0000000000..0ec2832c84 --- /dev/null +++ b/types/lodash/fp/iteratee.d.ts @@ -0,0 +1,2 @@ +import { iteratee } from "../fp"; +export = iteratee; diff --git a/types/lodash/fp/join.d.ts b/types/lodash/fp/join.d.ts new file mode 100644 index 0000000000..beee04ccf5 --- /dev/null +++ b/types/lodash/fp/join.d.ts @@ -0,0 +1,2 @@ +import { join } from "../fp"; +export = join; diff --git a/types/lodash/fp/juxt.d.ts b/types/lodash/fp/juxt.d.ts new file mode 100644 index 0000000000..5e972d4488 --- /dev/null +++ b/types/lodash/fp/juxt.d.ts @@ -0,0 +1,2 @@ +import { juxt } from "../fp"; +export = juxt; diff --git a/types/lodash/fp/kebabCase.d.ts b/types/lodash/fp/kebabCase.d.ts new file mode 100644 index 0000000000..8231b1593a --- /dev/null +++ b/types/lodash/fp/kebabCase.d.ts @@ -0,0 +1,2 @@ +import { kebabCase } from "../fp"; +export = kebabCase; diff --git a/types/lodash/fp/keyBy.d.ts b/types/lodash/fp/keyBy.d.ts new file mode 100644 index 0000000000..e4b1381096 --- /dev/null +++ b/types/lodash/fp/keyBy.d.ts @@ -0,0 +1,2 @@ +import { keyBy } from "../fp"; +export = keyBy; diff --git a/types/lodash/fp/keys.d.ts b/types/lodash/fp/keys.d.ts new file mode 100644 index 0000000000..0323484453 --- /dev/null +++ b/types/lodash/fp/keys.d.ts @@ -0,0 +1,2 @@ +import { keys } from "../fp"; +export = keys; diff --git a/types/lodash/fp/keysIn.d.ts b/types/lodash/fp/keysIn.d.ts new file mode 100644 index 0000000000..f6f3482852 --- /dev/null +++ b/types/lodash/fp/keysIn.d.ts @@ -0,0 +1,2 @@ +import { keysIn } from "../fp"; +export = keysIn; diff --git a/types/lodash/fp/last.d.ts b/types/lodash/fp/last.d.ts new file mode 100644 index 0000000000..f74171a309 --- /dev/null +++ b/types/lodash/fp/last.d.ts @@ -0,0 +1,2 @@ +import { last } from "../fp"; +export = last; diff --git a/types/lodash/fp/lastIndexOf.d.ts b/types/lodash/fp/lastIndexOf.d.ts new file mode 100644 index 0000000000..2d60e64837 --- /dev/null +++ b/types/lodash/fp/lastIndexOf.d.ts @@ -0,0 +1,2 @@ +import { lastIndexOf } from "../fp"; +export = lastIndexOf; diff --git a/types/lodash/fp/lastIndexOfFrom.d.ts b/types/lodash/fp/lastIndexOfFrom.d.ts new file mode 100644 index 0000000000..7a2f23e5ae --- /dev/null +++ b/types/lodash/fp/lastIndexOfFrom.d.ts @@ -0,0 +1,2 @@ +import { lastIndexOfFrom } from "../fp"; +export = lastIndexOfFrom; diff --git a/types/lodash/fp/lowerCase.d.ts b/types/lodash/fp/lowerCase.d.ts new file mode 100644 index 0000000000..1a5360fdbc --- /dev/null +++ b/types/lodash/fp/lowerCase.d.ts @@ -0,0 +1,2 @@ +import { lowerCase } from "../fp"; +export = lowerCase; diff --git a/types/lodash/fp/lowerFirst.d.ts b/types/lodash/fp/lowerFirst.d.ts new file mode 100644 index 0000000000..23ce92585d --- /dev/null +++ b/types/lodash/fp/lowerFirst.d.ts @@ -0,0 +1,2 @@ +import { lowerFirst } from "../fp"; +export = lowerFirst; diff --git a/types/lodash/fp/lt.d.ts b/types/lodash/fp/lt.d.ts new file mode 100644 index 0000000000..a309bdce1a --- /dev/null +++ b/types/lodash/fp/lt.d.ts @@ -0,0 +1,2 @@ +import { lt } from "../fp"; +export = lt; diff --git a/types/lodash/fp/lte.d.ts b/types/lodash/fp/lte.d.ts new file mode 100644 index 0000000000..0d4af2cbe3 --- /dev/null +++ b/types/lodash/fp/lte.d.ts @@ -0,0 +1,2 @@ +import { lte } from "../fp"; +export = lte; diff --git a/types/lodash/fp/map.d.ts b/types/lodash/fp/map.d.ts new file mode 100644 index 0000000000..17d014caf4 --- /dev/null +++ b/types/lodash/fp/map.d.ts @@ -0,0 +1,2 @@ +import { map } from "../fp"; +export = map; diff --git a/types/lodash/fp/mapKeys.d.ts b/types/lodash/fp/mapKeys.d.ts new file mode 100644 index 0000000000..acc6d752d8 --- /dev/null +++ b/types/lodash/fp/mapKeys.d.ts @@ -0,0 +1,2 @@ +import { mapKeys } from "../fp"; +export = mapKeys; diff --git a/types/lodash/fp/mapValues.d.ts b/types/lodash/fp/mapValues.d.ts new file mode 100644 index 0000000000..abef821aab --- /dev/null +++ b/types/lodash/fp/mapValues.d.ts @@ -0,0 +1,2 @@ +import { mapValues } from "../fp"; +export = mapValues; diff --git a/types/lodash/fp/matches.d.ts b/types/lodash/fp/matches.d.ts new file mode 100644 index 0000000000..e9796de4fb --- /dev/null +++ b/types/lodash/fp/matches.d.ts @@ -0,0 +1,2 @@ +import { matches } from "../fp"; +export = matches; diff --git a/types/lodash/fp/matchesProperty.d.ts b/types/lodash/fp/matchesProperty.d.ts new file mode 100644 index 0000000000..81db8f75da --- /dev/null +++ b/types/lodash/fp/matchesProperty.d.ts @@ -0,0 +1,2 @@ +import { matchesProperty } from "../fp"; +export = matchesProperty; diff --git a/types/lodash/fp/max.d.ts b/types/lodash/fp/max.d.ts new file mode 100644 index 0000000000..7b08dc52c6 --- /dev/null +++ b/types/lodash/fp/max.d.ts @@ -0,0 +1,2 @@ +import { max } from "../fp"; +export = max; diff --git a/types/lodash/fp/maxBy.d.ts b/types/lodash/fp/maxBy.d.ts new file mode 100644 index 0000000000..68f30dd896 --- /dev/null +++ b/types/lodash/fp/maxBy.d.ts @@ -0,0 +1,2 @@ +import { maxBy } from "../fp"; +export = maxBy; diff --git a/types/lodash/fp/mean.d.ts b/types/lodash/fp/mean.d.ts new file mode 100644 index 0000000000..a0b7e22e5b --- /dev/null +++ b/types/lodash/fp/mean.d.ts @@ -0,0 +1,2 @@ +import { mean } from "../fp"; +export = mean; diff --git a/types/lodash/fp/meanBy.d.ts b/types/lodash/fp/meanBy.d.ts new file mode 100644 index 0000000000..d76afd77c1 --- /dev/null +++ b/types/lodash/fp/meanBy.d.ts @@ -0,0 +1,2 @@ +import { meanBy } from "../fp"; +export = meanBy; diff --git a/types/lodash/fp/memoize.d.ts b/types/lodash/fp/memoize.d.ts new file mode 100644 index 0000000000..a60b79cafa --- /dev/null +++ b/types/lodash/fp/memoize.d.ts @@ -0,0 +1,2 @@ +import { memoize } from "../fp"; +export = memoize; diff --git a/types/lodash/fp/merge.d.ts b/types/lodash/fp/merge.d.ts new file mode 100644 index 0000000000..f80117b7e9 --- /dev/null +++ b/types/lodash/fp/merge.d.ts @@ -0,0 +1,2 @@ +import { merge } from "../fp"; +export = merge; diff --git a/types/lodash/fp/mergeAll.d.ts b/types/lodash/fp/mergeAll.d.ts new file mode 100644 index 0000000000..6b462d85cb --- /dev/null +++ b/types/lodash/fp/mergeAll.d.ts @@ -0,0 +1,2 @@ +import { mergeAll } from "../fp"; +export = mergeAll; diff --git a/types/lodash/fp/mergeAllWith.d.ts b/types/lodash/fp/mergeAllWith.d.ts new file mode 100644 index 0000000000..3d2f7f296e --- /dev/null +++ b/types/lodash/fp/mergeAllWith.d.ts @@ -0,0 +1,2 @@ +import { mergeAllWith } from "../fp"; +export = mergeAllWith; diff --git a/types/lodash/fp/mergeWith.d.ts b/types/lodash/fp/mergeWith.d.ts new file mode 100644 index 0000000000..d1f541e81b --- /dev/null +++ b/types/lodash/fp/mergeWith.d.ts @@ -0,0 +1,2 @@ +import { mergeWith } from "../fp"; +export = mergeWith; diff --git a/types/lodash/fp/method.d.ts b/types/lodash/fp/method.d.ts new file mode 100644 index 0000000000..f9f2ee8795 --- /dev/null +++ b/types/lodash/fp/method.d.ts @@ -0,0 +1,2 @@ +import { method } from "../fp"; +export = method; diff --git a/types/lodash/fp/methodOf.d.ts b/types/lodash/fp/methodOf.d.ts new file mode 100644 index 0000000000..a9e0e4fe14 --- /dev/null +++ b/types/lodash/fp/methodOf.d.ts @@ -0,0 +1,2 @@ +import { methodOf } from "../fp"; +export = methodOf; diff --git a/types/lodash/fp/min.d.ts b/types/lodash/fp/min.d.ts new file mode 100644 index 0000000000..7c80ab0ff9 --- /dev/null +++ b/types/lodash/fp/min.d.ts @@ -0,0 +1,2 @@ +import { min } from "../fp"; +export = min; diff --git a/types/lodash/fp/minBy.d.ts b/types/lodash/fp/minBy.d.ts new file mode 100644 index 0000000000..020a8f506c --- /dev/null +++ b/types/lodash/fp/minBy.d.ts @@ -0,0 +1,2 @@ +import { minBy } from "../fp"; +export = minBy; diff --git a/types/lodash/fp/multiply.d.ts b/types/lodash/fp/multiply.d.ts new file mode 100644 index 0000000000..b3e5f3abd9 --- /dev/null +++ b/types/lodash/fp/multiply.d.ts @@ -0,0 +1,2 @@ +import { multiply } from "../fp"; +export = multiply; diff --git a/types/lodash/fp/nAry.d.ts b/types/lodash/fp/nAry.d.ts new file mode 100644 index 0000000000..882e4a37d6 --- /dev/null +++ b/types/lodash/fp/nAry.d.ts @@ -0,0 +1,2 @@ +import { nAry } from "../fp"; +export = nAry; diff --git a/types/lodash/fp/negate.d.ts b/types/lodash/fp/negate.d.ts new file mode 100644 index 0000000000..a7693c1928 --- /dev/null +++ b/types/lodash/fp/negate.d.ts @@ -0,0 +1,2 @@ +import { negate } from "../fp"; +export = negate; diff --git a/types/lodash/fp/noConflict.d.ts b/types/lodash/fp/noConflict.d.ts new file mode 100644 index 0000000000..7694f5aa5a --- /dev/null +++ b/types/lodash/fp/noConflict.d.ts @@ -0,0 +1,2 @@ +import { noConflict } from "../fp"; +export = noConflict; diff --git a/types/lodash/fp/noop.d.ts b/types/lodash/fp/noop.d.ts new file mode 100644 index 0000000000..5b6a27b61a --- /dev/null +++ b/types/lodash/fp/noop.d.ts @@ -0,0 +1,2 @@ +import { noop } from "../fp"; +export = noop; diff --git a/types/lodash/fp/now.d.ts b/types/lodash/fp/now.d.ts new file mode 100644 index 0000000000..fdbbd2bcf7 --- /dev/null +++ b/types/lodash/fp/now.d.ts @@ -0,0 +1,2 @@ +import { now } from "../fp"; +export = now; diff --git a/types/lodash/fp/nth.d.ts b/types/lodash/fp/nth.d.ts new file mode 100644 index 0000000000..e3987e17cb --- /dev/null +++ b/types/lodash/fp/nth.d.ts @@ -0,0 +1,2 @@ +import { nth } from "../fp"; +export = nth; diff --git a/types/lodash/fp/nthArg.d.ts b/types/lodash/fp/nthArg.d.ts new file mode 100644 index 0000000000..216c9bbab2 --- /dev/null +++ b/types/lodash/fp/nthArg.d.ts @@ -0,0 +1,2 @@ +import { nthArg } from "../fp"; +export = nthArg; diff --git a/types/lodash/fp/omit.d.ts b/types/lodash/fp/omit.d.ts new file mode 100644 index 0000000000..1cd1b7fcc3 --- /dev/null +++ b/types/lodash/fp/omit.d.ts @@ -0,0 +1,2 @@ +import { omit } from "../fp"; +export = omit; diff --git a/types/lodash/fp/omitAll.d.ts b/types/lodash/fp/omitAll.d.ts new file mode 100644 index 0000000000..dab5cfa5fc --- /dev/null +++ b/types/lodash/fp/omitAll.d.ts @@ -0,0 +1,2 @@ +import { omitAll } from "../fp"; +export = omitAll; diff --git a/types/lodash/fp/omitBy.d.ts b/types/lodash/fp/omitBy.d.ts new file mode 100644 index 0000000000..8be4f5b40b --- /dev/null +++ b/types/lodash/fp/omitBy.d.ts @@ -0,0 +1,2 @@ +import { omitBy } from "../fp"; +export = omitBy; diff --git a/types/lodash/fp/once.d.ts b/types/lodash/fp/once.d.ts new file mode 100644 index 0000000000..24d859cc53 --- /dev/null +++ b/types/lodash/fp/once.d.ts @@ -0,0 +1,2 @@ +import { once } from "../fp"; +export = once; diff --git a/types/lodash/fp/orderBy.d.ts b/types/lodash/fp/orderBy.d.ts new file mode 100644 index 0000000000..9443fcfc22 --- /dev/null +++ b/types/lodash/fp/orderBy.d.ts @@ -0,0 +1,2 @@ +import { orderBy } from "../fp"; +export = orderBy; diff --git a/types/lodash/fp/over.d.ts b/types/lodash/fp/over.d.ts new file mode 100644 index 0000000000..1bd2502fdc --- /dev/null +++ b/types/lodash/fp/over.d.ts @@ -0,0 +1,2 @@ +import { over } from "../fp"; +export = over; diff --git a/types/lodash/fp/overArgs.d.ts b/types/lodash/fp/overArgs.d.ts new file mode 100644 index 0000000000..c054c92707 --- /dev/null +++ b/types/lodash/fp/overArgs.d.ts @@ -0,0 +1,2 @@ +import { overArgs } from "../fp"; +export = overArgs; diff --git a/types/lodash/fp/overEvery.d.ts b/types/lodash/fp/overEvery.d.ts new file mode 100644 index 0000000000..1cf8b4061b --- /dev/null +++ b/types/lodash/fp/overEvery.d.ts @@ -0,0 +1,2 @@ +import { overEvery } from "../fp"; +export = overEvery; diff --git a/types/lodash/fp/overSome.d.ts b/types/lodash/fp/overSome.d.ts new file mode 100644 index 0000000000..6b098b73b3 --- /dev/null +++ b/types/lodash/fp/overSome.d.ts @@ -0,0 +1,2 @@ +import { overSome } from "../fp"; +export = overSome; diff --git a/types/lodash/fp/pad.d.ts b/types/lodash/fp/pad.d.ts new file mode 100644 index 0000000000..a5519771dd --- /dev/null +++ b/types/lodash/fp/pad.d.ts @@ -0,0 +1,2 @@ +import { pad } from "../fp"; +export = pad; diff --git a/types/lodash/fp/padChars.d.ts b/types/lodash/fp/padChars.d.ts new file mode 100644 index 0000000000..74d1aabbbf --- /dev/null +++ b/types/lodash/fp/padChars.d.ts @@ -0,0 +1,2 @@ +import { padChars } from "../fp"; +export = padChars; diff --git a/types/lodash/fp/padCharsEnd.d.ts b/types/lodash/fp/padCharsEnd.d.ts new file mode 100644 index 0000000000..3a468dc11f --- /dev/null +++ b/types/lodash/fp/padCharsEnd.d.ts @@ -0,0 +1,2 @@ +import { padCharsEnd } from "../fp"; +export = padCharsEnd; diff --git a/types/lodash/fp/padCharsStart.d.ts b/types/lodash/fp/padCharsStart.d.ts new file mode 100644 index 0000000000..a22523505f --- /dev/null +++ b/types/lodash/fp/padCharsStart.d.ts @@ -0,0 +1,2 @@ +import { padCharsStart } from "../fp"; +export = padCharsStart; diff --git a/types/lodash/fp/padEnd.d.ts b/types/lodash/fp/padEnd.d.ts new file mode 100644 index 0000000000..5c4e4d80ba --- /dev/null +++ b/types/lodash/fp/padEnd.d.ts @@ -0,0 +1,2 @@ +import { padEnd } from "../fp"; +export = padEnd; diff --git a/types/lodash/fp/padStart.d.ts b/types/lodash/fp/padStart.d.ts new file mode 100644 index 0000000000..a4fca5d1ec --- /dev/null +++ b/types/lodash/fp/padStart.d.ts @@ -0,0 +1,2 @@ +import { padStart } from "../fp"; +export = padStart; diff --git a/types/lodash/fp/parseInt.d.ts b/types/lodash/fp/parseInt.d.ts new file mode 100644 index 0000000000..47aff97b71 --- /dev/null +++ b/types/lodash/fp/parseInt.d.ts @@ -0,0 +1,2 @@ +import { parseInt } from "../fp"; +export = parseInt; diff --git a/types/lodash/fp/partial.d.ts b/types/lodash/fp/partial.d.ts new file mode 100644 index 0000000000..f5ebd726e5 --- /dev/null +++ b/types/lodash/fp/partial.d.ts @@ -0,0 +1,2 @@ +import { partial } from "../fp"; +export = partial; diff --git a/types/lodash/fp/partialRight.d.ts b/types/lodash/fp/partialRight.d.ts new file mode 100644 index 0000000000..bc0fa1b9c6 --- /dev/null +++ b/types/lodash/fp/partialRight.d.ts @@ -0,0 +1,2 @@ +import { partialRight } from "../fp"; +export = partialRight; diff --git a/types/lodash/fp/partition.d.ts b/types/lodash/fp/partition.d.ts new file mode 100644 index 0000000000..6ad41cd7db --- /dev/null +++ b/types/lodash/fp/partition.d.ts @@ -0,0 +1,2 @@ +import { partition } from "../fp"; +export = partition; diff --git a/types/lodash/fp/path.d.ts b/types/lodash/fp/path.d.ts new file mode 100644 index 0000000000..db86d6023d --- /dev/null +++ b/types/lodash/fp/path.d.ts @@ -0,0 +1,2 @@ +import { path } from "../fp"; +export = path; diff --git a/types/lodash/fp/pathEq.d.ts b/types/lodash/fp/pathEq.d.ts new file mode 100644 index 0000000000..9f328756c3 --- /dev/null +++ b/types/lodash/fp/pathEq.d.ts @@ -0,0 +1,2 @@ +import { pathEq } from "../fp"; +export = pathEq; diff --git a/types/lodash/fp/pathOr.d.ts b/types/lodash/fp/pathOr.d.ts new file mode 100644 index 0000000000..6cad6b1836 --- /dev/null +++ b/types/lodash/fp/pathOr.d.ts @@ -0,0 +1,2 @@ +import { pathOr } from "../fp"; +export = pathOr; diff --git a/types/lodash/fp/paths.d.ts b/types/lodash/fp/paths.d.ts new file mode 100644 index 0000000000..1e6eb8908f --- /dev/null +++ b/types/lodash/fp/paths.d.ts @@ -0,0 +1,2 @@ +import { paths } from "../fp"; +export = paths; diff --git a/types/lodash/fp/pick.d.ts b/types/lodash/fp/pick.d.ts new file mode 100644 index 0000000000..4772ecacc3 --- /dev/null +++ b/types/lodash/fp/pick.d.ts @@ -0,0 +1,2 @@ +import { pick } from "../fp"; +export = pick; diff --git a/types/lodash/fp/pickAll.d.ts b/types/lodash/fp/pickAll.d.ts new file mode 100644 index 0000000000..38d2e3fe2b --- /dev/null +++ b/types/lodash/fp/pickAll.d.ts @@ -0,0 +1,2 @@ +import { pickAll } from "../fp"; +export = pickAll; diff --git a/types/lodash/fp/pickBy.d.ts b/types/lodash/fp/pickBy.d.ts new file mode 100644 index 0000000000..0b192629e0 --- /dev/null +++ b/types/lodash/fp/pickBy.d.ts @@ -0,0 +1,2 @@ +import { pickBy } from "../fp"; +export = pickBy; diff --git a/types/lodash/fp/pipe.d.ts b/types/lodash/fp/pipe.d.ts new file mode 100644 index 0000000000..a53a04823b --- /dev/null +++ b/types/lodash/fp/pipe.d.ts @@ -0,0 +1,2 @@ +import { pipe } from "../fp"; +export = pipe; diff --git a/types/lodash/fp/placeholder.d.ts b/types/lodash/fp/placeholder.d.ts new file mode 100644 index 0000000000..ddaed8ed1b --- /dev/null +++ b/types/lodash/fp/placeholder.d.ts @@ -0,0 +1,3 @@ +import _ = require("../index"); +declare const placeholder: _.__; +export = placeholder; diff --git a/types/lodash/fp/pluck.d.ts b/types/lodash/fp/pluck.d.ts new file mode 100644 index 0000000000..c5c916f814 --- /dev/null +++ b/types/lodash/fp/pluck.d.ts @@ -0,0 +1,2 @@ +import { pluck } from "../fp"; +export = pluck; diff --git a/types/lodash/fp/prop.d.ts b/types/lodash/fp/prop.d.ts new file mode 100644 index 0000000000..f2061e7d61 --- /dev/null +++ b/types/lodash/fp/prop.d.ts @@ -0,0 +1,2 @@ +import { prop } from "../fp"; +export = prop; diff --git a/types/lodash/fp/propEq.d.ts b/types/lodash/fp/propEq.d.ts new file mode 100644 index 0000000000..5e3f4b413f --- /dev/null +++ b/types/lodash/fp/propEq.d.ts @@ -0,0 +1,2 @@ +import { propEq } from "../fp"; +export = propEq; diff --git a/types/lodash/fp/propOr.d.ts b/types/lodash/fp/propOr.d.ts new file mode 100644 index 0000000000..feabcf6e95 --- /dev/null +++ b/types/lodash/fp/propOr.d.ts @@ -0,0 +1,2 @@ +import { propOr } from "../fp"; +export = propOr; diff --git a/types/lodash/fp/property.d.ts b/types/lodash/fp/property.d.ts new file mode 100644 index 0000000000..aaa6c25711 --- /dev/null +++ b/types/lodash/fp/property.d.ts @@ -0,0 +1,2 @@ +import { property } from "../fp"; +export = property; diff --git a/types/lodash/fp/propertyOf.d.ts b/types/lodash/fp/propertyOf.d.ts new file mode 100644 index 0000000000..a4d55130c6 --- /dev/null +++ b/types/lodash/fp/propertyOf.d.ts @@ -0,0 +1,2 @@ +import { propertyOf } from "../fp"; +export = propertyOf; diff --git a/types/lodash/fp/props.d.ts b/types/lodash/fp/props.d.ts new file mode 100644 index 0000000000..46addba7ad --- /dev/null +++ b/types/lodash/fp/props.d.ts @@ -0,0 +1,2 @@ +import { props } from "../fp"; +export = props; diff --git a/types/lodash/fp/pull.d.ts b/types/lodash/fp/pull.d.ts new file mode 100644 index 0000000000..801cf33771 --- /dev/null +++ b/types/lodash/fp/pull.d.ts @@ -0,0 +1,2 @@ +import { pull } from "../fp"; +export = pull; diff --git a/types/lodash/fp/pullAll.d.ts b/types/lodash/fp/pullAll.d.ts new file mode 100644 index 0000000000..042fe89ac1 --- /dev/null +++ b/types/lodash/fp/pullAll.d.ts @@ -0,0 +1,2 @@ +import { pullAll } from "../fp"; +export = pullAll; diff --git a/types/lodash/fp/pullAllBy.d.ts b/types/lodash/fp/pullAllBy.d.ts new file mode 100644 index 0000000000..5e5de1fc07 --- /dev/null +++ b/types/lodash/fp/pullAllBy.d.ts @@ -0,0 +1,2 @@ +import { pullAllBy } from "../fp"; +export = pullAllBy; diff --git a/types/lodash/fp/pullAllWith.d.ts b/types/lodash/fp/pullAllWith.d.ts new file mode 100644 index 0000000000..0c448bf8c8 --- /dev/null +++ b/types/lodash/fp/pullAllWith.d.ts @@ -0,0 +1,2 @@ +import { pullAllWith } from "../fp"; +export = pullAllWith; diff --git a/types/lodash/fp/pullAt.d.ts b/types/lodash/fp/pullAt.d.ts new file mode 100644 index 0000000000..4bdffd993f --- /dev/null +++ b/types/lodash/fp/pullAt.d.ts @@ -0,0 +1,2 @@ +import { pullAt } from "../fp"; +export = pullAt; diff --git a/types/lodash/fp/random.d.ts b/types/lodash/fp/random.d.ts new file mode 100644 index 0000000000..a69555ca16 --- /dev/null +++ b/types/lodash/fp/random.d.ts @@ -0,0 +1,2 @@ +import { random } from "../fp"; +export = random; diff --git a/types/lodash/fp/range.d.ts b/types/lodash/fp/range.d.ts new file mode 100644 index 0000000000..ace50ce46b --- /dev/null +++ b/types/lodash/fp/range.d.ts @@ -0,0 +1,2 @@ +import { range } from "../fp"; +export = range; diff --git a/types/lodash/fp/rangeRight.d.ts b/types/lodash/fp/rangeRight.d.ts new file mode 100644 index 0000000000..20c8baefaa --- /dev/null +++ b/types/lodash/fp/rangeRight.d.ts @@ -0,0 +1,2 @@ +import { rangeRight } from "../fp"; +export = rangeRight; diff --git a/types/lodash/fp/rangeStep.d.ts b/types/lodash/fp/rangeStep.d.ts new file mode 100644 index 0000000000..e5f4c891ce --- /dev/null +++ b/types/lodash/fp/rangeStep.d.ts @@ -0,0 +1,2 @@ +import { rangeStep } from "../fp"; +export = rangeStep; diff --git a/types/lodash/fp/rangeStepRight.d.ts b/types/lodash/fp/rangeStepRight.d.ts new file mode 100644 index 0000000000..6c7add468d --- /dev/null +++ b/types/lodash/fp/rangeStepRight.d.ts @@ -0,0 +1,2 @@ +import { rangeStepRight } from "../fp"; +export = rangeStepRight; diff --git a/types/lodash/fp/rearg.d.ts b/types/lodash/fp/rearg.d.ts new file mode 100644 index 0000000000..5c407d13a4 --- /dev/null +++ b/types/lodash/fp/rearg.d.ts @@ -0,0 +1,2 @@ +import { rearg } from "../fp"; +export = rearg; diff --git a/types/lodash/fp/reduce.d.ts b/types/lodash/fp/reduce.d.ts new file mode 100644 index 0000000000..e262f39370 --- /dev/null +++ b/types/lodash/fp/reduce.d.ts @@ -0,0 +1,2 @@ +import { reduce } from "../fp"; +export = reduce; diff --git a/types/lodash/fp/reduceRight.d.ts b/types/lodash/fp/reduceRight.d.ts new file mode 100644 index 0000000000..fa54fa3a5e --- /dev/null +++ b/types/lodash/fp/reduceRight.d.ts @@ -0,0 +1,2 @@ +import { reduceRight } from "../fp"; +export = reduceRight; diff --git a/types/lodash/fp/reject.d.ts b/types/lodash/fp/reject.d.ts new file mode 100644 index 0000000000..d0a12af963 --- /dev/null +++ b/types/lodash/fp/reject.d.ts @@ -0,0 +1,2 @@ +import { reject } from "../fp"; +export = reject; diff --git a/types/lodash/fp/remove.d.ts b/types/lodash/fp/remove.d.ts new file mode 100644 index 0000000000..e0da9b147c --- /dev/null +++ b/types/lodash/fp/remove.d.ts @@ -0,0 +1,2 @@ +import { remove } from "../fp"; +export = remove; diff --git a/types/lodash/fp/repeat.d.ts b/types/lodash/fp/repeat.d.ts new file mode 100644 index 0000000000..1f757a2778 --- /dev/null +++ b/types/lodash/fp/repeat.d.ts @@ -0,0 +1,2 @@ +import { repeat } from "../fp"; +export = repeat; diff --git a/types/lodash/fp/replace.d.ts b/types/lodash/fp/replace.d.ts new file mode 100644 index 0000000000..c7a75d1fa1 --- /dev/null +++ b/types/lodash/fp/replace.d.ts @@ -0,0 +1,2 @@ +import { replace } from "../fp"; +export = replace; diff --git a/types/lodash/fp/rest.d.ts b/types/lodash/fp/rest.d.ts new file mode 100644 index 0000000000..b059d673e1 --- /dev/null +++ b/types/lodash/fp/rest.d.ts @@ -0,0 +1,2 @@ +import { rest } from "../fp"; +export = rest; diff --git a/types/lodash/fp/restFrom.d.ts b/types/lodash/fp/restFrom.d.ts new file mode 100644 index 0000000000..218edbd5a3 --- /dev/null +++ b/types/lodash/fp/restFrom.d.ts @@ -0,0 +1,2 @@ +import { restFrom } from "../fp"; +export = restFrom; diff --git a/types/lodash/fp/result.d.ts b/types/lodash/fp/result.d.ts new file mode 100644 index 0000000000..5a919dd455 --- /dev/null +++ b/types/lodash/fp/result.d.ts @@ -0,0 +1,2 @@ +import { result } from "../fp"; +export = result; diff --git a/types/lodash/fp/reverse.d.ts b/types/lodash/fp/reverse.d.ts new file mode 100644 index 0000000000..f754d6aac6 --- /dev/null +++ b/types/lodash/fp/reverse.d.ts @@ -0,0 +1,2 @@ +import { reverse } from "../fp"; +export = reverse; diff --git a/types/lodash/fp/round.d.ts b/types/lodash/fp/round.d.ts new file mode 100644 index 0000000000..02f4e6f300 --- /dev/null +++ b/types/lodash/fp/round.d.ts @@ -0,0 +1,2 @@ +import { round } from "../fp"; +export = round; diff --git a/types/lodash/fp/runInContext.d.ts b/types/lodash/fp/runInContext.d.ts new file mode 100644 index 0000000000..6041db7053 --- /dev/null +++ b/types/lodash/fp/runInContext.d.ts @@ -0,0 +1,2 @@ +import { runInContext } from "../fp"; +export = runInContext; diff --git a/types/lodash/fp/sample.d.ts b/types/lodash/fp/sample.d.ts new file mode 100644 index 0000000000..f2fcf1ac03 --- /dev/null +++ b/types/lodash/fp/sample.d.ts @@ -0,0 +1,2 @@ +import { sample } from "../fp"; +export = sample; diff --git a/types/lodash/fp/sampleSize.d.ts b/types/lodash/fp/sampleSize.d.ts new file mode 100644 index 0000000000..41a3cabf92 --- /dev/null +++ b/types/lodash/fp/sampleSize.d.ts @@ -0,0 +1,2 @@ +import { sampleSize } from "../fp"; +export = sampleSize; diff --git a/types/lodash/fp/set.d.ts b/types/lodash/fp/set.d.ts new file mode 100644 index 0000000000..57960cba78 --- /dev/null +++ b/types/lodash/fp/set.d.ts @@ -0,0 +1,2 @@ +import { set } from "../fp"; +export = set; diff --git a/types/lodash/fp/setWith.d.ts b/types/lodash/fp/setWith.d.ts new file mode 100644 index 0000000000..800a49429c --- /dev/null +++ b/types/lodash/fp/setWith.d.ts @@ -0,0 +1,2 @@ +import { setWith } from "../fp"; +export = setWith; diff --git a/types/lodash/fp/shuffle.d.ts b/types/lodash/fp/shuffle.d.ts new file mode 100644 index 0000000000..7f07282642 --- /dev/null +++ b/types/lodash/fp/shuffle.d.ts @@ -0,0 +1,2 @@ +import { shuffle } from "../fp"; +export = shuffle; diff --git a/types/lodash/fp/size.d.ts b/types/lodash/fp/size.d.ts new file mode 100644 index 0000000000..657c8b7c20 --- /dev/null +++ b/types/lodash/fp/size.d.ts @@ -0,0 +1,2 @@ +import { size } from "../fp"; +export = size; diff --git a/types/lodash/fp/slice.d.ts b/types/lodash/fp/slice.d.ts new file mode 100644 index 0000000000..fabbbe0eeb --- /dev/null +++ b/types/lodash/fp/slice.d.ts @@ -0,0 +1,2 @@ +import { slice } from "../fp"; +export = slice; diff --git a/types/lodash/fp/snakeCase.d.ts b/types/lodash/fp/snakeCase.d.ts new file mode 100644 index 0000000000..a06ac452fe --- /dev/null +++ b/types/lodash/fp/snakeCase.d.ts @@ -0,0 +1,2 @@ +import { snakeCase } from "../fp"; +export = snakeCase; diff --git a/types/lodash/fp/some.d.ts b/types/lodash/fp/some.d.ts new file mode 100644 index 0000000000..870b23160d --- /dev/null +++ b/types/lodash/fp/some.d.ts @@ -0,0 +1,2 @@ +import { some } from "../fp"; +export = some; diff --git a/types/lodash/fp/sortBy.d.ts b/types/lodash/fp/sortBy.d.ts new file mode 100644 index 0000000000..72c5799b36 --- /dev/null +++ b/types/lodash/fp/sortBy.d.ts @@ -0,0 +1,2 @@ +import { sortBy } from "../fp"; +export = sortBy; diff --git a/types/lodash/fp/sortedIndex.d.ts b/types/lodash/fp/sortedIndex.d.ts new file mode 100644 index 0000000000..35b57feed2 --- /dev/null +++ b/types/lodash/fp/sortedIndex.d.ts @@ -0,0 +1,2 @@ +import { sortedIndex } from "../fp"; +export = sortedIndex; diff --git a/types/lodash/fp/sortedIndexBy.d.ts b/types/lodash/fp/sortedIndexBy.d.ts new file mode 100644 index 0000000000..f6968df691 --- /dev/null +++ b/types/lodash/fp/sortedIndexBy.d.ts @@ -0,0 +1,2 @@ +import { sortedIndexBy } from "../fp"; +export = sortedIndexBy; diff --git a/types/lodash/fp/sortedIndexOf.d.ts b/types/lodash/fp/sortedIndexOf.d.ts new file mode 100644 index 0000000000..beeb6db0ca --- /dev/null +++ b/types/lodash/fp/sortedIndexOf.d.ts @@ -0,0 +1,2 @@ +import { sortedIndexOf } from "../fp"; +export = sortedIndexOf; diff --git a/types/lodash/fp/sortedLastIndex.d.ts b/types/lodash/fp/sortedLastIndex.d.ts new file mode 100644 index 0000000000..eea77a0382 --- /dev/null +++ b/types/lodash/fp/sortedLastIndex.d.ts @@ -0,0 +1,2 @@ +import { sortedLastIndex } from "../fp"; +export = sortedLastIndex; diff --git a/types/lodash/fp/sortedLastIndexBy.d.ts b/types/lodash/fp/sortedLastIndexBy.d.ts new file mode 100644 index 0000000000..6c8e4ee545 --- /dev/null +++ b/types/lodash/fp/sortedLastIndexBy.d.ts @@ -0,0 +1,2 @@ +import { sortedLastIndexBy } from "../fp"; +export = sortedLastIndexBy; diff --git a/types/lodash/fp/sortedLastIndexOf.d.ts b/types/lodash/fp/sortedLastIndexOf.d.ts new file mode 100644 index 0000000000..a02caf3ce5 --- /dev/null +++ b/types/lodash/fp/sortedLastIndexOf.d.ts @@ -0,0 +1,2 @@ +import { sortedLastIndexOf } from "../fp"; +export = sortedLastIndexOf; diff --git a/types/lodash/fp/sortedUniq.d.ts b/types/lodash/fp/sortedUniq.d.ts new file mode 100644 index 0000000000..03d8e691e0 --- /dev/null +++ b/types/lodash/fp/sortedUniq.d.ts @@ -0,0 +1,2 @@ +import { sortedUniq } from "../fp"; +export = sortedUniq; diff --git a/types/lodash/fp/sortedUniqBy.d.ts b/types/lodash/fp/sortedUniqBy.d.ts new file mode 100644 index 0000000000..466981a264 --- /dev/null +++ b/types/lodash/fp/sortedUniqBy.d.ts @@ -0,0 +1,2 @@ +import { sortedUniqBy } from "../fp"; +export = sortedUniqBy; diff --git a/types/lodash/fp/split.d.ts b/types/lodash/fp/split.d.ts new file mode 100644 index 0000000000..8274d4081f --- /dev/null +++ b/types/lodash/fp/split.d.ts @@ -0,0 +1,2 @@ +import { split } from "../fp"; +export = split; diff --git a/types/lodash/fp/spread.d.ts b/types/lodash/fp/spread.d.ts new file mode 100644 index 0000000000..44eb90cd21 --- /dev/null +++ b/types/lodash/fp/spread.d.ts @@ -0,0 +1,2 @@ +import { spread } from "../fp"; +export = spread; diff --git a/types/lodash/fp/spreadFrom.d.ts b/types/lodash/fp/spreadFrom.d.ts new file mode 100644 index 0000000000..7eb840b036 --- /dev/null +++ b/types/lodash/fp/spreadFrom.d.ts @@ -0,0 +1,2 @@ +import { spreadFrom } from "../fp"; +export = spreadFrom; diff --git a/types/lodash/fp/startCase.d.ts b/types/lodash/fp/startCase.d.ts new file mode 100644 index 0000000000..4f580aa5d0 --- /dev/null +++ b/types/lodash/fp/startCase.d.ts @@ -0,0 +1,2 @@ +import { startCase } from "../fp"; +export = startCase; diff --git a/types/lodash/fp/startsWith.d.ts b/types/lodash/fp/startsWith.d.ts new file mode 100644 index 0000000000..f84397dc68 --- /dev/null +++ b/types/lodash/fp/startsWith.d.ts @@ -0,0 +1,2 @@ +import { startsWith } from "../fp"; +export = startsWith; diff --git a/types/lodash/fp/stubArray.d.ts b/types/lodash/fp/stubArray.d.ts new file mode 100644 index 0000000000..8ff910e591 --- /dev/null +++ b/types/lodash/fp/stubArray.d.ts @@ -0,0 +1,2 @@ +import { stubArray } from "../fp"; +export = stubArray; diff --git a/types/lodash/fp/stubFalse.d.ts b/types/lodash/fp/stubFalse.d.ts new file mode 100644 index 0000000000..4cc041482d --- /dev/null +++ b/types/lodash/fp/stubFalse.d.ts @@ -0,0 +1,2 @@ +import { stubFalse } from "../fp"; +export = stubFalse; diff --git a/types/lodash/fp/stubObject.d.ts b/types/lodash/fp/stubObject.d.ts new file mode 100644 index 0000000000..d7c826997f --- /dev/null +++ b/types/lodash/fp/stubObject.d.ts @@ -0,0 +1,2 @@ +import { stubObject } from "../fp"; +export = stubObject; diff --git a/types/lodash/fp/stubString.d.ts b/types/lodash/fp/stubString.d.ts new file mode 100644 index 0000000000..cbfa449758 --- /dev/null +++ b/types/lodash/fp/stubString.d.ts @@ -0,0 +1,2 @@ +import { stubString } from "../fp"; +export = stubString; diff --git a/types/lodash/fp/stubTrue.d.ts b/types/lodash/fp/stubTrue.d.ts new file mode 100644 index 0000000000..0ed7e5b927 --- /dev/null +++ b/types/lodash/fp/stubTrue.d.ts @@ -0,0 +1,2 @@ +import { stubTrue } from "../fp"; +export = stubTrue; diff --git a/types/lodash/fp/subtract.d.ts b/types/lodash/fp/subtract.d.ts new file mode 100644 index 0000000000..201301b300 --- /dev/null +++ b/types/lodash/fp/subtract.d.ts @@ -0,0 +1,2 @@ +import { subtract } from "../fp"; +export = subtract; diff --git a/types/lodash/fp/sum.d.ts b/types/lodash/fp/sum.d.ts new file mode 100644 index 0000000000..6d7d02026e --- /dev/null +++ b/types/lodash/fp/sum.d.ts @@ -0,0 +1,2 @@ +import { sum } from "../fp"; +export = sum; diff --git a/types/lodash/fp/sumBy.d.ts b/types/lodash/fp/sumBy.d.ts new file mode 100644 index 0000000000..3f44c3f6c5 --- /dev/null +++ b/types/lodash/fp/sumBy.d.ts @@ -0,0 +1,2 @@ +import { sumBy } from "../fp"; +export = sumBy; diff --git a/types/lodash/fp/symmetricDifference.d.ts b/types/lodash/fp/symmetricDifference.d.ts new file mode 100644 index 0000000000..cba1d1f70d --- /dev/null +++ b/types/lodash/fp/symmetricDifference.d.ts @@ -0,0 +1,2 @@ +import { symmetricDifference } from "../fp"; +export = symmetricDifference; diff --git a/types/lodash/fp/symmetricDifferenceBy.d.ts b/types/lodash/fp/symmetricDifferenceBy.d.ts new file mode 100644 index 0000000000..8e9316cf42 --- /dev/null +++ b/types/lodash/fp/symmetricDifferenceBy.d.ts @@ -0,0 +1,2 @@ +import { symmetricDifferenceBy } from "../fp"; +export = symmetricDifferenceBy; diff --git a/types/lodash/fp/symmetricDifferenceWith.d.ts b/types/lodash/fp/symmetricDifferenceWith.d.ts new file mode 100644 index 0000000000..864ec01b50 --- /dev/null +++ b/types/lodash/fp/symmetricDifferenceWith.d.ts @@ -0,0 +1,2 @@ +import { symmetricDifferenceWith } from "../fp"; +export = symmetricDifferenceWith; diff --git a/types/lodash/fp/tail.d.ts b/types/lodash/fp/tail.d.ts new file mode 100644 index 0000000000..df9bcdcd57 --- /dev/null +++ b/types/lodash/fp/tail.d.ts @@ -0,0 +1,2 @@ +import { tail } from "../fp"; +export = tail; diff --git a/types/lodash/fp/take.d.ts b/types/lodash/fp/take.d.ts new file mode 100644 index 0000000000..ab46aca056 --- /dev/null +++ b/types/lodash/fp/take.d.ts @@ -0,0 +1,2 @@ +import { take } from "../fp"; +export = take; diff --git a/types/lodash/fp/takeLast.d.ts b/types/lodash/fp/takeLast.d.ts new file mode 100644 index 0000000000..027dcda5ee --- /dev/null +++ b/types/lodash/fp/takeLast.d.ts @@ -0,0 +1,2 @@ +import { takeLast } from "../fp"; +export = takeLast; diff --git a/types/lodash/fp/takeLastWhile.d.ts b/types/lodash/fp/takeLastWhile.d.ts new file mode 100644 index 0000000000..c6729c3529 --- /dev/null +++ b/types/lodash/fp/takeLastWhile.d.ts @@ -0,0 +1,2 @@ +import { takeLastWhile } from "../fp"; +export = takeLastWhile; diff --git a/types/lodash/fp/takeRight.d.ts b/types/lodash/fp/takeRight.d.ts new file mode 100644 index 0000000000..162c5166e4 --- /dev/null +++ b/types/lodash/fp/takeRight.d.ts @@ -0,0 +1,2 @@ +import { takeRight } from "../fp"; +export = takeRight; diff --git a/types/lodash/fp/takeRightWhile.d.ts b/types/lodash/fp/takeRightWhile.d.ts new file mode 100644 index 0000000000..b23f7a4608 --- /dev/null +++ b/types/lodash/fp/takeRightWhile.d.ts @@ -0,0 +1,2 @@ +import { takeRightWhile } from "../fp"; +export = takeRightWhile; diff --git a/types/lodash/fp/takeWhile.d.ts b/types/lodash/fp/takeWhile.d.ts new file mode 100644 index 0000000000..b8cb517606 --- /dev/null +++ b/types/lodash/fp/takeWhile.d.ts @@ -0,0 +1,2 @@ +import { takeWhile } from "../fp"; +export = takeWhile; diff --git a/types/lodash/fp/tap.d.ts b/types/lodash/fp/tap.d.ts new file mode 100644 index 0000000000..8ffbbd7f23 --- /dev/null +++ b/types/lodash/fp/tap.d.ts @@ -0,0 +1,2 @@ +import { tap } from "../fp"; +export = tap; diff --git a/types/lodash/fp/template.d.ts b/types/lodash/fp/template.d.ts new file mode 100644 index 0000000000..3a37ed1af7 --- /dev/null +++ b/types/lodash/fp/template.d.ts @@ -0,0 +1,2 @@ +import { template } from "../fp"; +export = template; diff --git a/types/lodash/fp/throttle.d.ts b/types/lodash/fp/throttle.d.ts new file mode 100644 index 0000000000..24d8b7f4ef --- /dev/null +++ b/types/lodash/fp/throttle.d.ts @@ -0,0 +1,2 @@ +import { throttle } from "../fp"; +export = throttle; diff --git a/types/lodash/fp/thru.d.ts b/types/lodash/fp/thru.d.ts new file mode 100644 index 0000000000..b9725820ad --- /dev/null +++ b/types/lodash/fp/thru.d.ts @@ -0,0 +1,2 @@ +import { thru } from "../fp"; +export = thru; diff --git a/types/lodash/fp/times.d.ts b/types/lodash/fp/times.d.ts new file mode 100644 index 0000000000..3d9f0c6077 --- /dev/null +++ b/types/lodash/fp/times.d.ts @@ -0,0 +1,2 @@ +import { times } from "../fp"; +export = times; diff --git a/types/lodash/fp/toArray.d.ts b/types/lodash/fp/toArray.d.ts new file mode 100644 index 0000000000..4b18ce6d55 --- /dev/null +++ b/types/lodash/fp/toArray.d.ts @@ -0,0 +1,2 @@ +import { toArray } from "../fp"; +export = toArray; diff --git a/types/lodash/fp/toFinite.d.ts b/types/lodash/fp/toFinite.d.ts new file mode 100644 index 0000000000..1d41996182 --- /dev/null +++ b/types/lodash/fp/toFinite.d.ts @@ -0,0 +1,2 @@ +import { toFinite } from "../fp"; +export = toFinite; diff --git a/types/lodash/fp/toInteger.d.ts b/types/lodash/fp/toInteger.d.ts new file mode 100644 index 0000000000..46ccaf945b --- /dev/null +++ b/types/lodash/fp/toInteger.d.ts @@ -0,0 +1,2 @@ +import { toInteger } from "../fp"; +export = toInteger; diff --git a/types/lodash/fp/toLength.d.ts b/types/lodash/fp/toLength.d.ts new file mode 100644 index 0000000000..bb62924318 --- /dev/null +++ b/types/lodash/fp/toLength.d.ts @@ -0,0 +1,2 @@ +import { toLength } from "../fp"; +export = toLength; diff --git a/types/lodash/fp/toLower.d.ts b/types/lodash/fp/toLower.d.ts new file mode 100644 index 0000000000..64e6e364d0 --- /dev/null +++ b/types/lodash/fp/toLower.d.ts @@ -0,0 +1,2 @@ +import { toLower } from "../fp"; +export = toLower; diff --git a/types/lodash/fp/toNumber.d.ts b/types/lodash/fp/toNumber.d.ts new file mode 100644 index 0000000000..262b91c52d --- /dev/null +++ b/types/lodash/fp/toNumber.d.ts @@ -0,0 +1,2 @@ +import { toNumber } from "../fp"; +export = toNumber; diff --git a/types/lodash/fp/toPairs.d.ts b/types/lodash/fp/toPairs.d.ts new file mode 100644 index 0000000000..89334fcb5d --- /dev/null +++ b/types/lodash/fp/toPairs.d.ts @@ -0,0 +1,2 @@ +import { toPairs } from "../fp"; +export = toPairs; diff --git a/types/lodash/fp/toPairsIn.d.ts b/types/lodash/fp/toPairsIn.d.ts new file mode 100644 index 0000000000..278ff0b1df --- /dev/null +++ b/types/lodash/fp/toPairsIn.d.ts @@ -0,0 +1,2 @@ +import { toPairsIn } from "../fp"; +export = toPairsIn; diff --git a/types/lodash/fp/toPath.d.ts b/types/lodash/fp/toPath.d.ts new file mode 100644 index 0000000000..9f2287ceae --- /dev/null +++ b/types/lodash/fp/toPath.d.ts @@ -0,0 +1,2 @@ +import { toPath } from "../fp"; +export = toPath; diff --git a/types/lodash/fp/toPlainObject.d.ts b/types/lodash/fp/toPlainObject.d.ts new file mode 100644 index 0000000000..22fa070387 --- /dev/null +++ b/types/lodash/fp/toPlainObject.d.ts @@ -0,0 +1,2 @@ +import { toPlainObject } from "../fp"; +export = toPlainObject; diff --git a/types/lodash/fp/toSafeInteger.d.ts b/types/lodash/fp/toSafeInteger.d.ts new file mode 100644 index 0000000000..2f85078fcb --- /dev/null +++ b/types/lodash/fp/toSafeInteger.d.ts @@ -0,0 +1,2 @@ +import { toSafeInteger } from "../fp"; +export = toSafeInteger; diff --git a/types/lodash/fp/toString.d.ts b/types/lodash/fp/toString.d.ts new file mode 100644 index 0000000000..ee6703c068 --- /dev/null +++ b/types/lodash/fp/toString.d.ts @@ -0,0 +1,2 @@ +import { toString } from "../fp"; +export = toString; diff --git a/types/lodash/fp/toUpper.d.ts b/types/lodash/fp/toUpper.d.ts new file mode 100644 index 0000000000..6bf21c1fce --- /dev/null +++ b/types/lodash/fp/toUpper.d.ts @@ -0,0 +1,2 @@ +import { toUpper } from "../fp"; +export = toUpper; diff --git a/types/lodash/fp/transform.d.ts b/types/lodash/fp/transform.d.ts new file mode 100644 index 0000000000..ab0653cb7c --- /dev/null +++ b/types/lodash/fp/transform.d.ts @@ -0,0 +1,2 @@ +import { transform } from "../fp"; +export = transform; diff --git a/types/lodash/fp/trim.d.ts b/types/lodash/fp/trim.d.ts new file mode 100644 index 0000000000..f0f9b905d0 --- /dev/null +++ b/types/lodash/fp/trim.d.ts @@ -0,0 +1,2 @@ +import { trim } from "../fp"; +export = trim; diff --git a/types/lodash/fp/trimChars.d.ts b/types/lodash/fp/trimChars.d.ts new file mode 100644 index 0000000000..929a49300e --- /dev/null +++ b/types/lodash/fp/trimChars.d.ts @@ -0,0 +1,2 @@ +import { trimChars } from "../fp"; +export = trimChars; diff --git a/types/lodash/fp/trimCharsEnd.d.ts b/types/lodash/fp/trimCharsEnd.d.ts new file mode 100644 index 0000000000..2f5609ae2d --- /dev/null +++ b/types/lodash/fp/trimCharsEnd.d.ts @@ -0,0 +1,2 @@ +import { trimCharsEnd } from "../fp"; +export = trimCharsEnd; diff --git a/types/lodash/fp/trimCharsStart.d.ts b/types/lodash/fp/trimCharsStart.d.ts new file mode 100644 index 0000000000..fb998f7e50 --- /dev/null +++ b/types/lodash/fp/trimCharsStart.d.ts @@ -0,0 +1,2 @@ +import { trimCharsStart } from "../fp"; +export = trimCharsStart; diff --git a/types/lodash/fp/trimEnd.d.ts b/types/lodash/fp/trimEnd.d.ts new file mode 100644 index 0000000000..b666494483 --- /dev/null +++ b/types/lodash/fp/trimEnd.d.ts @@ -0,0 +1,2 @@ +import { trimEnd } from "../fp"; +export = trimEnd; diff --git a/types/lodash/fp/trimStart.d.ts b/types/lodash/fp/trimStart.d.ts new file mode 100644 index 0000000000..988227ca74 --- /dev/null +++ b/types/lodash/fp/trimStart.d.ts @@ -0,0 +1,2 @@ +import { trimStart } from "../fp"; +export = trimStart; diff --git a/types/lodash/fp/truncate.d.ts b/types/lodash/fp/truncate.d.ts new file mode 100644 index 0000000000..d38b7b18b6 --- /dev/null +++ b/types/lodash/fp/truncate.d.ts @@ -0,0 +1,2 @@ +import { truncate } from "../fp"; +export = truncate; diff --git a/types/lodash/fp/unapply.d.ts b/types/lodash/fp/unapply.d.ts new file mode 100644 index 0000000000..c59b6b2a19 --- /dev/null +++ b/types/lodash/fp/unapply.d.ts @@ -0,0 +1,2 @@ +import { unapply } from "../fp"; +export = unapply; diff --git a/types/lodash/fp/unary.d.ts b/types/lodash/fp/unary.d.ts new file mode 100644 index 0000000000..02e319576a --- /dev/null +++ b/types/lodash/fp/unary.d.ts @@ -0,0 +1,2 @@ +import { unary } from "../fp"; +export = unary; diff --git a/types/lodash/fp/unescape.d.ts b/types/lodash/fp/unescape.d.ts new file mode 100644 index 0000000000..efcccf2a51 --- /dev/null +++ b/types/lodash/fp/unescape.d.ts @@ -0,0 +1,2 @@ +import { unescape } from "../fp"; +export = unescape; diff --git a/types/lodash/fp/union.d.ts b/types/lodash/fp/union.d.ts new file mode 100644 index 0000000000..8e098ee7f6 --- /dev/null +++ b/types/lodash/fp/union.d.ts @@ -0,0 +1,2 @@ +import { union } from "../fp"; +export = union; diff --git a/types/lodash/fp/unionBy.d.ts b/types/lodash/fp/unionBy.d.ts new file mode 100644 index 0000000000..f3882c6b4a --- /dev/null +++ b/types/lodash/fp/unionBy.d.ts @@ -0,0 +1,2 @@ +import { unionBy } from "../fp"; +export = unionBy; diff --git a/types/lodash/fp/unionWith.d.ts b/types/lodash/fp/unionWith.d.ts new file mode 100644 index 0000000000..46e19fd176 --- /dev/null +++ b/types/lodash/fp/unionWith.d.ts @@ -0,0 +1,2 @@ +import { unionWith } from "../fp"; +export = unionWith; diff --git a/types/lodash/fp/uniq.d.ts b/types/lodash/fp/uniq.d.ts new file mode 100644 index 0000000000..877d0d94d9 --- /dev/null +++ b/types/lodash/fp/uniq.d.ts @@ -0,0 +1,2 @@ +import { uniq } from "../fp"; +export = uniq; diff --git a/types/lodash/fp/uniqBy.d.ts b/types/lodash/fp/uniqBy.d.ts new file mode 100644 index 0000000000..0e6522d704 --- /dev/null +++ b/types/lodash/fp/uniqBy.d.ts @@ -0,0 +1,2 @@ +import { uniqBy } from "../fp"; +export = uniqBy; diff --git a/types/lodash/fp/uniqWith.d.ts b/types/lodash/fp/uniqWith.d.ts new file mode 100644 index 0000000000..165f45f1e3 --- /dev/null +++ b/types/lodash/fp/uniqWith.d.ts @@ -0,0 +1,2 @@ +import { uniqWith } from "../fp"; +export = uniqWith; diff --git a/types/lodash/fp/uniqueId.d.ts b/types/lodash/fp/uniqueId.d.ts new file mode 100644 index 0000000000..57736d9ccd --- /dev/null +++ b/types/lodash/fp/uniqueId.d.ts @@ -0,0 +1,2 @@ +import { uniqueId } from "../fp"; +export = uniqueId; diff --git a/types/lodash/fp/unnest.d.ts b/types/lodash/fp/unnest.d.ts new file mode 100644 index 0000000000..852e9a1367 --- /dev/null +++ b/types/lodash/fp/unnest.d.ts @@ -0,0 +1,2 @@ +import { unnest } from "../fp"; +export = unnest; diff --git a/types/lodash/fp/unset.d.ts b/types/lodash/fp/unset.d.ts new file mode 100644 index 0000000000..3e99247714 --- /dev/null +++ b/types/lodash/fp/unset.d.ts @@ -0,0 +1,2 @@ +import { unset } from "../fp"; +export = unset; diff --git a/types/lodash/fp/unzip.d.ts b/types/lodash/fp/unzip.d.ts new file mode 100644 index 0000000000..ba9d4cd709 --- /dev/null +++ b/types/lodash/fp/unzip.d.ts @@ -0,0 +1,2 @@ +import { unzip } from "../fp"; +export = unzip; diff --git a/types/lodash/fp/unzipWith.d.ts b/types/lodash/fp/unzipWith.d.ts new file mode 100644 index 0000000000..599eadb355 --- /dev/null +++ b/types/lodash/fp/unzipWith.d.ts @@ -0,0 +1,2 @@ +import { unzipWith } from "../fp"; +export = unzipWith; diff --git a/types/lodash/fp/update.d.ts b/types/lodash/fp/update.d.ts new file mode 100644 index 0000000000..76dfe482f8 --- /dev/null +++ b/types/lodash/fp/update.d.ts @@ -0,0 +1,2 @@ +import { update } from "../fp"; +export = update; diff --git a/types/lodash/fp/updateWith.d.ts b/types/lodash/fp/updateWith.d.ts new file mode 100644 index 0000000000..6d6331d1b5 --- /dev/null +++ b/types/lodash/fp/updateWith.d.ts @@ -0,0 +1,2 @@ +import { updateWith } from "../fp"; +export = updateWith; diff --git a/types/lodash/fp/upperCase.d.ts b/types/lodash/fp/upperCase.d.ts new file mode 100644 index 0000000000..10aadb28ec --- /dev/null +++ b/types/lodash/fp/upperCase.d.ts @@ -0,0 +1,2 @@ +import { upperCase } from "../fp"; +export = upperCase; diff --git a/types/lodash/fp/upperFirst.d.ts b/types/lodash/fp/upperFirst.d.ts new file mode 100644 index 0000000000..e2c9adfd57 --- /dev/null +++ b/types/lodash/fp/upperFirst.d.ts @@ -0,0 +1,2 @@ +import { upperFirst } from "../fp"; +export = upperFirst; diff --git a/types/lodash/fp/useWith.d.ts b/types/lodash/fp/useWith.d.ts new file mode 100644 index 0000000000..991905a402 --- /dev/null +++ b/types/lodash/fp/useWith.d.ts @@ -0,0 +1,2 @@ +import { useWith } from "../fp"; +export = useWith; diff --git a/types/lodash/fp/values.d.ts b/types/lodash/fp/values.d.ts new file mode 100644 index 0000000000..75ec6fb4e5 --- /dev/null +++ b/types/lodash/fp/values.d.ts @@ -0,0 +1,2 @@ +import { values } from "../fp"; +export = values; diff --git a/types/lodash/fp/valuesIn.d.ts b/types/lodash/fp/valuesIn.d.ts new file mode 100644 index 0000000000..6f4f3b43bb --- /dev/null +++ b/types/lodash/fp/valuesIn.d.ts @@ -0,0 +1,2 @@ +import { valuesIn } from "../fp"; +export = valuesIn; diff --git a/types/lodash/fp/where.d.ts b/types/lodash/fp/where.d.ts new file mode 100644 index 0000000000..41e21ec8ac --- /dev/null +++ b/types/lodash/fp/where.d.ts @@ -0,0 +1,2 @@ +import { where } from "../fp"; +export = where; diff --git a/types/lodash/fp/whereEq.d.ts b/types/lodash/fp/whereEq.d.ts new file mode 100644 index 0000000000..893316d625 --- /dev/null +++ b/types/lodash/fp/whereEq.d.ts @@ -0,0 +1,2 @@ +import { whereEq } from "../fp"; +export = whereEq; diff --git a/types/lodash/fp/without.d.ts b/types/lodash/fp/without.d.ts new file mode 100644 index 0000000000..600890a400 --- /dev/null +++ b/types/lodash/fp/without.d.ts @@ -0,0 +1,2 @@ +import { without } from "../fp"; +export = without; diff --git a/types/lodash/fp/words.d.ts b/types/lodash/fp/words.d.ts new file mode 100644 index 0000000000..2b06b26368 --- /dev/null +++ b/types/lodash/fp/words.d.ts @@ -0,0 +1,2 @@ +import { words } from "../fp"; +export = words; diff --git a/types/lodash/fp/wrap.d.ts b/types/lodash/fp/wrap.d.ts new file mode 100644 index 0000000000..d9c2a283e2 --- /dev/null +++ b/types/lodash/fp/wrap.d.ts @@ -0,0 +1,2 @@ +import { wrap } from "../fp"; +export = wrap; diff --git a/types/lodash/fp/xor.d.ts b/types/lodash/fp/xor.d.ts new file mode 100644 index 0000000000..ac69bde236 --- /dev/null +++ b/types/lodash/fp/xor.d.ts @@ -0,0 +1,2 @@ +import { xor } from "../fp"; +export = xor; diff --git a/types/lodash/fp/xorBy.d.ts b/types/lodash/fp/xorBy.d.ts new file mode 100644 index 0000000000..1232972323 --- /dev/null +++ b/types/lodash/fp/xorBy.d.ts @@ -0,0 +1,2 @@ +import { xorBy } from "../fp"; +export = xorBy; diff --git a/types/lodash/fp/xorWith.d.ts b/types/lodash/fp/xorWith.d.ts new file mode 100644 index 0000000000..ec93e40b30 --- /dev/null +++ b/types/lodash/fp/xorWith.d.ts @@ -0,0 +1,2 @@ +import { xorWith } from "../fp"; +export = xorWith; diff --git a/types/lodash/fp/zip.d.ts b/types/lodash/fp/zip.d.ts new file mode 100644 index 0000000000..2a83e733b6 --- /dev/null +++ b/types/lodash/fp/zip.d.ts @@ -0,0 +1,2 @@ +import { zip } from "../fp"; +export = zip; diff --git a/types/lodash/fp/zipAll.d.ts b/types/lodash/fp/zipAll.d.ts new file mode 100644 index 0000000000..af0b3ed3f5 --- /dev/null +++ b/types/lodash/fp/zipAll.d.ts @@ -0,0 +1,2 @@ +import { zipAll } from "../fp"; +export = zipAll; diff --git a/types/lodash/fp/zipObj.d.ts b/types/lodash/fp/zipObj.d.ts new file mode 100644 index 0000000000..4f4c19a87d --- /dev/null +++ b/types/lodash/fp/zipObj.d.ts @@ -0,0 +1,2 @@ +import { zipObj } from "../fp"; +export = zipObj; diff --git a/types/lodash/fp/zipObject.d.ts b/types/lodash/fp/zipObject.d.ts new file mode 100644 index 0000000000..f302d7b155 --- /dev/null +++ b/types/lodash/fp/zipObject.d.ts @@ -0,0 +1,2 @@ +import { zipObject } from "../fp"; +export = zipObject; diff --git a/types/lodash/fp/zipObjectDeep.d.ts b/types/lodash/fp/zipObjectDeep.d.ts new file mode 100644 index 0000000000..601063489d --- /dev/null +++ b/types/lodash/fp/zipObjectDeep.d.ts @@ -0,0 +1,2 @@ +import { zipObjectDeep } from "../fp"; +export = zipObjectDeep; diff --git a/types/lodash/fp/zipWith.d.ts b/types/lodash/fp/zipWith.d.ts new file mode 100644 index 0000000000..9faaf3c589 --- /dev/null +++ b/types/lodash/fp/zipWith.d.ts @@ -0,0 +1,2 @@ +import { zipWith } from "../fp"; +export = zipWith; diff --git a/types/lodash/lodash-tests.ts b/types/lodash/lodash-tests.ts index 7646cd02a6..ee86770a2a 100644 --- a/types/lodash/lodash-tests.ts +++ b/types/lodash/lodash-tests.ts @@ -1,26 +1,7 @@ -declare const $: any; +import fp = require("lodash/fp"); +import _ = require("lodash"); -interface FoodOrganic { - name: string; - organic: boolean; -} -interface StoogesAge { - name: string; - age: number; -} - -const foodsOrganic: FoodOrganic[] = [ - { name: 'banana', organic: true }, - { name: 'beet', organic: false }, -]; -const stoogesAges: StoogesAge[] = [ - { 'name': 'moe', 'age': 40 }, - { 'name': 'larry', 'age': 50 } -]; - -let result: any; - -let anything: any; +declare const anything: any; interface AbcObject { a: number; @@ -28,58 +9,6 @@ interface AbcObject { c: boolean; } -// _.MapCache -let testMapCache: _.MapCache = { - delete(key: string) { return true; }, - get(key: string): any { return 1; }, - has(key: string) { return true; }, - set(key: string, value: any): _.Dictionary { return {}; }, - clear() { }, -}; -result = <(key: string) => boolean>testMapCache.delete; -result = <(key: string) => any>testMapCache.get; -result = <(key: string) => boolean>testMapCache.has; -result = <(key: string, value: any) => _.Dictionary>testMapCache.set; -result = <() => void>testMapCache.clear; - -// _ -namespace TestWrapper { - { - let result: _.LoDashImplicitWrapper; - result = _(''); - } - - { - let result: _.LoDashImplicitWrapper; - result = _(42); - } - - { - let result: _.LoDashImplicitWrapper; - result = _(true); - } - - { - let result: _.LoDashImplicitArrayWrapper; - result = _(['']); - } - - { - let result: _.LoDashImplicitObjectWrapper<{a: string}>; - result = _<{a: string}>({a: ''}); - } - - { - let a: AbcObject[] = []; - _(a); // $ExpectType LoDashImplicitWrapper - } - - { - let a: AbcObject[] | null | undefined = anything; - _(a); // $ExpectType LoDashImplicitWrapper - } -} - // Wrapped array shortcut methods _([1, 2, 3, 4]).pop(); // $ExpectType number | undefined _([1, 2, 3, 4]).push(5, 6, 7); // $ExpectType LoDashImplicitWrapper @@ -102,312 +31,121 @@ _.chain([1, 2, 3, 4]).unshift(5, 6); // $ExpectType LoDashExplicitWrapper | null | undefined = [] as any; +{ + const list: _.List | null | undefined = anything; - { - let result: AbcObject[][]; + _.chunk(list); // $ExpectType AbcObject[][] + _.chunk(list, 42); // $ExpectType AbcObject[][] - result = _.chunk(array); - result = _.chunk(array, 42); + _(list).chunk(); // $ExpectType LoDashImplicitWrapper + _(list).chunk(42); // $ExpectType LoDashImplicitWrapper - result = _.chunk(list); - result = _.chunk(list, 42); - } + _.chain(list).chunk(); // $ExpectType LoDashExplicitWrapper + _.chain(list).chunk(42); // $ExpectType LoDashExplicitWrapper - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).chunk(); - result = _(array).chunk(42); - - result = _(list).chunk(); - result = _(list).chunk(42); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _.chain(array).chunk(); - result = _(array).chain().chunk(); - result = _(array).chain().chunk(42); - - result = _(list).chain().chunk(); - result = _(list).chain().chunk(42); - } + fp.chunk(42, list); // $ExpectType AbcObject[][] + fp.chunk(42)(list); // $ExpectType AbcObject[][] + fp.chunk(fp.__, list)(42); // $ExpectType AbcObject[][] } // _.compact -namespace TestCompact { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let array2: Array | null | undefined = anything; - let list2: _.List | null | undefined = anything; +{ + const list: _.List | null | undefined = anything; - { - let result: AbcObject[]; - - result = _.compact(array); - result = _.compact(list); - result = _.compact(array2); - result = _.compact(list2); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).compact(); - result = _(list).compact(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().compact(); - result = _(list).chain().compact(); - } + _.compact(list); // $ExpectType AbcObject[] + _(list).compact(); // $ExpectType LoDashImplicitWrapper + _.chain(list).compact(); // $ExpectType LoDashExplicitWrapper + fp.compact(list); // $ExpectType AbcObject[] } // _.difference -namespace TestDifference { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let arrayParam: AbcObject[] = []; - let listParam: _.List = []; +{ + const list: _.List | null | undefined = anything; + const arrayParam: AbcObject[] = []; + const listParam: _.List = []; - { - let result: AbcObject[]; + _.difference(list); // $ExpectType AbcObject[] + _.difference(list, listParam); // $ExpectType AbcObject[] + _.difference(list, listParam, arrayParam, listParam); // $ExpectType AbcObject[] - result = _.difference(array); - result = _.difference(array, arrayParam); - result = _.difference(array, listParam, arrayParam); - result = _.difference(array, listParam, listParam, arrayParam); + _(list).difference(); // $ExpectType LoDashImplicitWrapper + _(list).difference(listParam); // $ExpectType LoDashImplicitWrapper + _(list).difference(listParam, arrayParam, listParam); // $ExpectType LoDashImplicitWrapper - result = _.difference(list); - result = _.difference(list, listParam); - result = _.difference(list, arrayParam, listParam); - result = _.difference(list, listParam, arrayParam, listParam); - } + _.chain(list).difference(); // $ExpectType LoDashExplicitWrapper + _.chain(list).difference(listParam); // $ExpectType LoDashExplicitWrapper + _.chain(list).difference(listParam, arrayParam, listParam); // $ExpectType LoDashExplicitWrapper - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).difference(); - result = _(array).difference(arrayParam); - result = _(array).difference(listParam, arrayParam); - result = _(array).difference(arrayParam, listParam, arrayParam); - - result = _(list).difference(); - result = _(list).difference(listParam); - result = _(list).difference(arrayParam, listParam); - result = _(list).difference(listParam, arrayParam, listParam); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().difference(); - result = _(array).chain().difference(arrayParam); - result = _(array).chain().difference(listParam, arrayParam); - result = _(array).chain().difference(arrayParam, listParam, arrayParam); - - result = _(list).chain().difference(); - result = _(list).chain().difference(listParam); - result = _(list).chain().difference(arrayParam, listParam); - result = _(list).chain().difference(listParam, arrayParam, listParam); - } + fp.difference(list, arrayParam); // $ExpectType AbcObject[] + fp.difference(list)(arrayParam); // $ExpectType AbcObject[] } // _.differenceBy -namespace TestDifferenceBy { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let arrayParam: AbcObject[] = []; - let listParam: _.List = []; - let iteratee: (value: AbcObject) => any = (value: AbcObject) => 1; +{ + const list: _.List | null | undefined = anything; + const arrayParam: AbcObject[] = []; + const listParam: _.List = []; + const iteratee = (value: AbcObject) => 1; - { - let result: AbcObject[]; + _.differenceBy(list); // $ExpectType AbcObject[] + _.differenceBy(list, listParam); // $ExpectType AbcObject[] + _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam); // $ExpectType AbcObject[] - result = _.differenceBy(array); - result = _.differenceBy(array, arrayParam); - result = _.differenceBy(array, listParam, arrayParam); - result = _.differenceBy(array, arrayParam, listParam, arrayParam); - result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam); - result = _.differenceBy(array, arrayParam, listParam, arrayParam, listParam, arrayParam); - result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); + _.differenceBy(list, listParam, iteratee); // $ExpectType AbcObject[] + _.differenceBy(list, listParam, arrayParam, listParam, arrayParam, listParam, iteratee); // $ExpectType AbcObject[] + // $ExpectType AbcObject[] + _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, iteratee); - result = _.differenceBy(array, arrayParam, iteratee); - result = _.differenceBy(array, listParam, arrayParam, iteratee); - result = _.differenceBy(array, arrayParam, listParam, arrayParam, iteratee); - result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, iteratee); - result = _.differenceBy(array, arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); - result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); + _.differenceBy(list, listParam, "a"); // $ExpectType AbcObject[] + _.differenceBy(list, listParam, arrayParam, listParam, arrayParam, listParam, "a"); // $ExpectType AbcObject[] + // $ExpectType AbcObject[] + _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, "a"); - result = _.differenceBy(array, arrayParam, 'a'); - result = _.differenceBy(array, listParam, arrayParam, 'a'); - result = _.differenceBy(array, arrayParam, listParam, arrayParam, 'a'); - result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, 'a'); - result = _.differenceBy(array, arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); - result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); + _.differenceBy(list, listParam, {a: 1}); // $ExpectType AbcObject[] + _.differenceBy(list, listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); // $ExpectType AbcObject[] + // $ExpectType AbcObject[] + _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); - result = _.differenceBy(array, arrayParam, {a: 1}); - result = _.differenceBy(array, listParam, arrayParam, {a: 1}); - result = _.differenceBy(array, arrayParam, listParam, arrayParam, {a: 1}); - result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _.differenceBy(array, arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _.differenceBy(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); + _(list).differenceBy(listParam); // $ExpectType LoDashImplicitWrapper + _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam); // $ExpectType LoDashImplicitWrapper - result = _.differenceBy(list); - result = _.differenceBy(list, listParam); - result = _.differenceBy(list, arrayParam, listParam); - result = _.differenceBy(list, listParam, arrayParam, listParam); - result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam); - result = _.differenceBy(list, listParam, arrayParam, listParam, arrayParam, listParam); - result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam); + _(list).differenceBy(listParam, iteratee); // $ExpectType LoDashImplicitWrapper + _(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, iteratee); // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper + _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, iteratee); - result = _.differenceBy(list, listParam, iteratee); - result = _.differenceBy(list, arrayParam, listParam, iteratee); - result = _.differenceBy(list, listParam, arrayParam, listParam, iteratee); - result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, iteratee); - result = _.differenceBy(list, listParam, arrayParam, listParam, arrayParam, listParam, iteratee); - result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, iteratee); + _(list).differenceBy(listParam, "a"); // $ExpectType LoDashImplicitWrapper + _(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, "a"); // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper + _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, "a"); - result = _.differenceBy(list, listParam, 'a'); - result = _.differenceBy(list, arrayParam, listParam, 'a'); - result = _.differenceBy(list, listParam, arrayParam, listParam, 'a'); - result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, 'a'); - result = _.differenceBy(list, listParam, arrayParam, listParam, arrayParam, listParam, 'a'); - result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, 'a'); + _(list).differenceBy(listParam, {a: 1}); // $ExpectType LoDashImplicitWrapper + _(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper + _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); - result = _.differenceBy(list, listParam, {a: 1}); - result = _.differenceBy(list, arrayParam, listParam, {a: 1}); - result = _.differenceBy(list, listParam, arrayParam, listParam, {a: 1}); - result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, {a: 1}); - result = _.differenceBy(list, listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); - result = _.differenceBy(list, arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); - } + _.chain(list).differenceBy(arrayParam); // $ExpectType LoDashExplicitWrapper + _.chain(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); // $ExpectType LoDashExplicitWrapper - { - let result: _.LoDashImplicitWrapper; + _.chain(list).differenceBy(arrayParam, iteratee); // $ExpectType LoDashExplicitWrapper + _.chain(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper + _.chain(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); - result = _(array).differenceBy(arrayParam); - result = _(array).differenceBy(listParam, arrayParam); - result = _(array).differenceBy(arrayParam, listParam, arrayParam); - result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam); - result = _(array).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam); - result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); + _.chain(list).differenceBy(arrayParam, "a"); // $ExpectType LoDashExplicitWrapper + _.chain(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, "a"); // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper + _.chain(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, "a"); - result = _(array).differenceBy(arrayParam, iteratee); - result = _(array).differenceBy(listParam, arrayParam, iteratee); - result = _(array).differenceBy(arrayParam, listParam, arrayParam, iteratee); - result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, iteratee); - result = _(array).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); - result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); + _.chain(list).differenceBy(arrayParam, {a: 1}); // $ExpectType LoDashExplicitWrapper + _.chain(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper + _.chain(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _(array).differenceBy(arrayParam, 'a'); - result = _(array).differenceBy(listParam, arrayParam, 'a'); - result = _(array).differenceBy(arrayParam, listParam, arrayParam, 'a'); - result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, 'a'); - result = _(array).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); - result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); - - result = _(array).differenceBy(arrayParam, {a: 1}); - result = _(array).differenceBy(listParam, arrayParam, {a: 1}); - result = _(array).differenceBy(arrayParam, listParam, arrayParam, {a: 1}); - result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _(array).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _(array).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); - - result = _(list).differenceBy(listParam); - result = _(list).differenceBy(arrayParam, listParam); - result = _(list).differenceBy(listParam, arrayParam, listParam); - result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam); - result = _(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam); - result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam); - - result = _(list).differenceBy(listParam, iteratee); - result = _(list).differenceBy(arrayParam, listParam, iteratee); - result = _(list).differenceBy(listParam, arrayParam, listParam, iteratee); - result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, iteratee); - result = _(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, iteratee); - result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, iteratee); - - result = _(list).differenceBy(listParam, 'a'); - result = _(list).differenceBy(arrayParam, listParam, 'a'); - result = _(list).differenceBy(listParam, arrayParam, listParam, 'a'); - result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, 'a'); - result = _(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, 'a'); - result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, 'a'); - - result = _(list).differenceBy(listParam, {a: 1}); - result = _(list).differenceBy(arrayParam, listParam, {a: 1}); - result = _(list).differenceBy(listParam, arrayParam, listParam, {a: 1}); - result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, {a: 1}); - result = _(list).differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); - result = _(list).differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(array).chain().differenceBy(arrayParam); - result = _(array).chain().differenceBy(listParam, arrayParam); - result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam); - result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam); - result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam); - result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); - - result = _(array).chain().differenceBy(arrayParam, iteratee); - result = _(array).chain().differenceBy(listParam, arrayParam, iteratee); - result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, iteratee); - result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, iteratee); - result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); - result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, iteratee); - - result = _(array).chain().differenceBy(arrayParam, 'a'); - result = _(array).chain().differenceBy(listParam, arrayParam, 'a'); - result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, 'a'); - result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, 'a'); - result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); - result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, 'a'); - - result = _(array).chain().differenceBy(arrayParam, {a: 1}); - result = _(array).chain().differenceBy(listParam, arrayParam, {a: 1}); - result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, {a: 1}); - result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _(array).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); - result = _(array).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, {a: 1}); - - result = _(list).chain().differenceBy(listParam); - result = _(list).chain().differenceBy(arrayParam, listParam); - result = _(list).chain().differenceBy(listParam, arrayParam, listParam); - result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam); - result = _(list).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam); - result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam); - - result = _(list).chain().differenceBy(listParam, iteratee); - result = _(list).chain().differenceBy(arrayParam, listParam, iteratee); - result = _(list).chain().differenceBy(listParam, arrayParam, listParam, iteratee); - result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, iteratee); - result = _(list).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, iteratee); - result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, iteratee); - - result = _(list).chain().differenceBy(listParam, 'a'); - result = _(list).chain().differenceBy(arrayParam, listParam, 'a'); - result = _(list).chain().differenceBy(listParam, arrayParam, listParam, 'a'); - result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, 'a'); - result = _(list).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, 'a'); - result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, 'a'); - - result = _(list).chain().differenceBy(listParam, {a: 1}); - result = _(list).chain().differenceBy(arrayParam, listParam, {a: 1}); - result = _(list).chain().differenceBy(listParam, arrayParam, listParam, {a: 1}); - result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, {a: 1}); - result = _(list).chain().differenceBy(listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); - result = _(list).chain().differenceBy(arrayParam, listParam, arrayParam, listParam, arrayParam, listParam, {a: 1}); - } + fp.differenceBy(iteratee, list, arrayParam); // $ExpectType AbcObject[] + fp.differenceBy(iteratee)(list)(listParam); // $ExpectType AbcObject[] + fp.differenceBy("a", list, arrayParam); // $ExpectType AbcObject[] + fp.differenceBy({a: 1}, list, arrayParam); // $ExpectType AbcObject[] { interface T1 { @@ -427,13 +165,13 @@ namespace TestDifferenceBy { b: any[]; } - const t1: T1 = { a: 'a', b: 'b' }; - const t2: T2 = { a: 'a', b: 30 }; - const t3: T3 = { a: 'a', b: true }; - const t4: T4 = { a: 'a', b: [] }; + const t1: T1 = { a: "a", b: "b" }; + const t2: T2 = { a: "a", b: 30 }; + const t3: T3 = { a: "a", b: true }; + const t4: T4 = { a: "a", b: [] }; // $ExpectType T1[] - _.differenceBy([t1], [t2], 'name'); + _.differenceBy([t1], [t2], "name"); // $ExpectType T1[] _.differenceBy([t1], [t2], (value) => { value; // $ExpectType T1 | T2 @@ -460,18 +198,18 @@ namespace TestDifferenceBy { return 0; }); // $ExpectType T1[] - _.differenceBy([t1], [t2], [t3], [t4], [''], (value) => { + _.differenceBy([t1], [t2], [t3], [t4], [""], (value) => { value; // $ExpectType string | T1 | T2 | T3 | T4 return 0; }); // $ExpectType T1[] - _.differenceBy([t1], [t2], [t3], [t4], [''], [42], (value) => { + _.differenceBy([t1], [t2], [t3], [t4], [""], [42], (value) => { value; // $ExpectType string | number | T1 | T2 | T3 | T4 return 0; }); // $ExpectType LoDashImplicitWrapper - _([t1]).differenceBy([t2], 'name'); + _([t1]).differenceBy([t2], "name"); // $ExpectType LoDashImplicitWrapper _([t1]).differenceBy([t2], (value) => { value; // $ExpectType T1 | T2 @@ -498,18 +236,18 @@ namespace TestDifferenceBy { return 0; }); // $ExpectType LoDashImplicitWrapper - _([t1]).differenceBy([t2], [t3], [t4], [''], (value) => { + _([t1]).differenceBy([t2], [t3], [t4], [""], (value) => { value; // $ExpectType string | T1 | T2 | T3 | T4 return 0; }); // $ExpectType LoDashImplicitWrapper - _([t1]).differenceBy([t2], [t3], [t4], [''], [42], (value) => { + _([t1]).differenceBy([t2], [t3], [t4], [""], [42], (value) => { value; // $ExpectType string | number | T1 | T2 | T3 | T4 return 0; }); // $ExpectType LoDashExplicitWrapper - _.chain([t1]).differenceBy([t2], 'name'); + _.chain([t1]).differenceBy([t2], "name"); // $ExpectType LoDashExplicitWrapper _.chain([t1]).differenceBy([t2], (value) => { value; // $ExpectType T1 | T2 @@ -536,79 +274,49 @@ namespace TestDifferenceBy { return 0; }); // $ExpectType LoDashExplicitWrapper - _.chain([t1]).differenceBy([t2], [t3], [t4], [''], (value) => { + _.chain([t1]).differenceBy([t2], [t3], [t4], [""], (value) => { value; // $ExpectType string | T1 | T2 | T3 | T4 return 0; }); // $ExpectType LoDashExplicitWrapper - _.chain([t1]).differenceBy([t2], [t3], [t4], [''], [42], (value) => { + _.chain([t1]).differenceBy([t2], [t3], [t4], [""], [42], (value) => { value; // $ExpectType string | number | T1 | T2 | T3 | T4 return 0; }); + + fp.differenceBy("name", [t1], [t2]); // $ExpectType T1[] + fp.differenceBy((value: T1 | T2) => 0, [t1], [t2]); // $ExpectType T1[] + fp.differenceBy((value: T1 | T2 | T3) => 0, [t1], [t2, t3]); // $ExpectType T1[] } } // _.differenceWith { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let arrayParam: AbcObject[] = []; - let listParam: _.List = []; - let comparator = (a: AbcObject, b: AbcObject) => true; + const list: _.List | null | undefined = [] as any; + const arrayParam: AbcObject[] = []; + const listParam: _.List = []; + const comparator = (a: AbcObject, b: AbcObject) => true; - { - // $ExpectType AbcObject[] - _.differenceWith(array); - // $ExpectType AbcObject[] - _.differenceWith(array, arrayParam); - // $ExpectType AbcObject[] - _.differenceWith(array, listParam, arrayParam); - // $ExpectType AbcObject[] - _.differenceWith(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); + _.differenceWith(list); // $ExpectType AbcObject[] + _.differenceWith(list, arrayParam); // $ExpectType AbcObject[] + _.differenceWith(list, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); // $ExpectType AbcObject[] + _.differenceWith(list, arrayParam, comparator); // $ExpectType AbcObject[] + _.differenceWith(list, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, comparator); // $ExpectType AbcObject[] - // $ExpectType AbcObject[] - _.differenceWith(array, arrayParam, comparator); - // $ExpectType AbcObject[] - _.differenceWith(array, listParam, arrayParam, comparator); - // $ExpectType AbcObject[] - _.differenceWith(array, listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, comparator); - } + _(list).differenceWith(arrayParam); // $ExpectType LoDashImplicitWrapper + _(list).differenceWith(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); // $ExpectType LoDashImplicitWrapper + _(list).differenceWith(arrayParam, comparator); // $ExpectType LoDashImplicitWrapper + _(list).differenceWith(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, comparator); // $ExpectType LoDashImplicitWrapper - { - // $ExpectType LoDashImplicitWrapper - _(array).differenceWith(arrayParam); - // $ExpectType LoDashImplicitWrapper - _(array).differenceWith(listParam, arrayParam); - // $ExpectType LoDashImplicitWrapper - _(array).differenceWith(arrayParam, listParam, arrayParam); - // $ExpectType LoDashImplicitWrapper - _(array).differenceWith(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); + _.chain(list).differenceWith(arrayParam); // $ExpectType LoDashExplicitWrapper + _.chain(list).differenceWith(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); // $ExpectType LoDashExplicitWrapper + _.chain(list).differenceWith(arrayParam, comparator); // $ExpectType LoDashExplicitWrapper + _.chain(list).differenceWith(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, comparator); // $ExpectType LoDashExplicitWrapper - // $ExpectType LoDashImplicitWrapper - _(array).differenceWith(arrayParam, comparator); - // $ExpectType LoDashImplicitWrapper - _(array).differenceWith(listParam, arrayParam, comparator); - // $ExpectType LoDashImplicitWrapper - _(array).differenceWith(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, comparator); - } - - { - // $ExpectType LoDashExplicitWrapper - _.chain(array).differenceWith(arrayParam); - // $ExpectType LoDashExplicitWrapper - _.chain(array).differenceWith(listParam, arrayParam); - // $ExpectType LoDashExplicitWrapper - _.chain(array).differenceWith(arrayParam, listParam, arrayParam); - // $ExpectType LoDashExplicitWrapper - _.chain(array).differenceWith(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam); - - // $ExpectType LoDashExplicitWrapper - _.chain(array).differenceWith(arrayParam, comparator); - // $ExpectType LoDashExplicitWrapper - _.chain(array).differenceWith(listParam, arrayParam, comparator); - // $ExpectType LoDashExplicitWrapper - _.chain(array).differenceWith(listParam, arrayParam, listParam, arrayParam, listParam, arrayParam, comparator); - } + fp.differenceWith(comparator, list, arrayParam); // $ExpectType AbcObject[] + fp.differenceWith(comparator)(list)(arrayParam); // $ExpectType AbcObject[] + fp.differenceWith(comparator)(list, arrayParam); // $ExpectType AbcObject[] + fp.differenceWith(comparator, list)(arrayParam); // $ExpectType AbcObject[] { interface T1 { @@ -620,7 +328,7 @@ namespace TestDifferenceBy { b: number; } - const t1: T1 = { a: 'a', b: 'b' }; + const t1: T1 = { a: "a", b: "b" }; const t2: T2 | undefined = anything; // $ExpectType T1[] @@ -643,824 +351,371 @@ namespace TestDifferenceBy { b; // $ExpectType T2 | undefined return true; }); + + fp.differenceWith((a: T1, b: T2 | undefined) => true, [t1], [t2]); // $ExpectType T1[] } } // _.drop -{ - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - - { - let result: AbcObject[]; - result = _.drop(array); - result = _.drop(array, 42); - - result = _.drop(list); - result = _.drop(list, 42); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).drop(); - result = _(array).drop(42); - - result = _(list).drop(); - result = _(list).drop(42); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().drop(); - result = _(array).chain().drop(42); - - result = _(list).chain().drop(); - result = _(list).chain().drop(42); - } -} - // _.dropRight -namespace TestDropRight { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; +{ + const list: _.List | null | undefined = anything; - { - let result: AbcObject[]; + _.drop(list); // $ExpectType AbcObject[] + _.drop(list, 42); // $ExpectType AbcObject[] + _(list).drop(42); // $ExpectType LoDashImplicitWrapper + _.chain(list).drop(42); // $ExpectType LoDashExplicitWrapper - result = _.dropRight(array); - result = _.dropRight(array, 42); + fp.drop(42, list); // $ExpectType AbcObject[] + fp.drop(42)(list); // $ExpectType AbcObject[] - result = _.dropRight(list); - result = _.dropRight(list, 42); - } + _.dropRight(list); // $ExpectType AbcObject[] + _.dropRight(list, 42); // $ExpectType AbcObject[] + _(list).dropRight(42); // $ExpectType LoDashImplicitWrapper + _.chain(list).dropRight(42); // $ExpectType LoDashExplicitWrapper - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).dropRight(); - result = _(array).dropRight(42); - - result = _(list).dropRight(); - result = _(list).dropRight(42); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().dropRight(); - result = _(array).chain().dropRight(42); - - result = _(list).chain().dropRight(); - result = _(list).chain().dropRight(42); - } -} - -// _.dropRightWhile -namespace TestDropRightWhile { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let predicateFn = (value: AbcObject, index: number, collection: _.List) => true; - - { - let result: AbcObject[]; - - result = _.dropRightWhile(array); - result = _.dropRightWhile(array, predicateFn); - result = _.dropRightWhile(array, ''); - result = _.dropRightWhile(array, {a: 42}); - - result = _.dropRightWhile(list); - result = _.dropRightWhile(list, predicateFn); - result = _.dropRightWhile(list, ''); - result = _.dropRightWhile(list, {a: 42}); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).dropRightWhile(); - result = _(array).dropRightWhile(predicateFn); - result = _(array).dropRightWhile(''); - result = _(array).dropRightWhile({a: 42}); - - result = _(list).dropRightWhile(); - result = _(list).dropRightWhile(predicateFn); - result = _(list).dropRightWhile(''); - result = _(list).dropRightWhile({a: 42}); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().dropRightWhile(); - result = _(array).chain().dropRightWhile(predicateFn); - result = _(array).chain().dropRightWhile(''); - result = _(array).chain().dropRightWhile({a: 42}); - - result = _(list).chain().dropRightWhile(); - result = _(list).chain().dropRightWhile(predicateFn); - result = _(list).chain().dropRightWhile(''); - result = _(list).chain().dropRightWhile({a: 42}); - } + fp.dropRight(42, list); // $ExpectType AbcObject[] + fp.dropRight(42)(list); // $ExpectType AbcObject[] } // _.dropWhile -namespace TestDropWhile { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let predicateFn = (value: AbcObject, index: number, collection: _.List) => true; +// _.dropRightWhile +{ + const list: _.List | null | undefined = anything; + const predicateFn = (value: AbcObject, index: number, collection: _.List) => true; + const predicateFn2 = (value: AbcObject) => true; - { - let result: AbcObject[]; + _.dropWhile(list); // $ExpectType AbcObject[] + _.dropWhile(list, predicateFn); // $ExpectType AbcObject[] + _.dropWhile(list, ""); // $ExpectType AbcObject[] + _.dropWhile(list, {a: 42}); // $ExpectType AbcObject[] - result = _.dropWhile(array); - result = _.dropWhile(array, predicateFn); - result = _.dropWhile(array, ''); - result = _.dropWhile(array, {a: 42}); + _(list).dropWhile(); // $ExpectType LoDashImplicitWrapper + _(list).dropWhile(predicateFn); // $ExpectType LoDashImplicitWrapper + _(list).dropWhile(""); // $ExpectType LoDashImplicitWrapper + _(list).dropWhile({a: 42}); // $ExpectType LoDashImplicitWrapper - result = _.dropWhile(list); - result = _.dropWhile(list, predicateFn); - result = _.dropWhile(list, ''); - result = _.dropWhile(list, {a: 42}); - } + _.chain(list).dropWhile(); // $ExpectType LoDashExplicitWrapper + _.chain(list).dropWhile(predicateFn); // $ExpectType LoDashExplicitWrapper + _.chain(list).dropWhile(""); // $ExpectType LoDashExplicitWrapper + _.chain(list).dropWhile({a: 42}); // $ExpectType LoDashExplicitWrapper - { - let result: _.LoDashImplicitArrayWrapper; + fp.dropWhile(predicateFn2, list); // $ExpectType AbcObject[] + fp.dropWhile(predicateFn2)(list); // $ExpectType AbcObject[] + fp.dropWhile("", list); // $ExpectType AbcObject[] + fp.dropWhile({ a: 42 }, list); // $ExpectType AbcObject[] - result = _(array).dropWhile(); - result = _(array).dropWhile(predicateFn); - result = _(array).dropWhile(''); - result = _(array).dropWhile({a: 42}); + _.dropRightWhile(list); // $ExpectType AbcObject[] + _.dropRightWhile(list, predicateFn); // $ExpectType AbcObject[] + _.dropRightWhile(list, ""); // $ExpectType AbcObject[] + _.dropRightWhile(list, {a: 42}); // $ExpectType AbcObject[] - result = _(list).dropWhile(); - result = _(list).dropWhile(predicateFn); - result = _(list).dropWhile(''); - result = _(list).dropWhile({a: 42}); - } + _(list).dropRightWhile(); // $ExpectType LoDashImplicitWrapper + _(list).dropRightWhile(predicateFn); // $ExpectType LoDashImplicitWrapper + _(list).dropRightWhile(""); // $ExpectType LoDashImplicitWrapper + _(list).dropRightWhile({a: 42}); // $ExpectType LoDashImplicitWrapper - { - let result: _.LoDashExplicitArrayWrapper; + _.chain(list).dropRightWhile(); // $ExpectType LoDashExplicitWrapper + _.chain(list).dropRightWhile(predicateFn); // $ExpectType LoDashExplicitWrapper + _.chain(list).dropRightWhile(""); // $ExpectType LoDashExplicitWrapper + _.chain(list).dropRightWhile({a: 42}); // $ExpectType LoDashExplicitWrapper - result = _(array).chain().dropWhile(); - result = _(array).chain().dropWhile(predicateFn); - result = _(array).chain().dropWhile(''); - result = _(array).chain().dropWhile({a: 42}); - - result = _(list).chain().dropWhile(); - result = _(list).chain().dropWhile(predicateFn); - result = _(list).chain().dropWhile(''); - result = _(list).chain().dropWhile({a: 42}); - } + fp.dropRightWhile(predicateFn2, list); // $ExpectType AbcObject[] + fp.dropRightWhile(predicateFn2)(list); // $ExpectType AbcObject[] + fp.dropRightWhile("", list); // $ExpectType AbcObject[] + fp.dropRightWhile({ a: 42 }, list); // $ExpectType AbcObject[] } // _.fill -namespace TestFill { - let array: number[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; +{ + const array: number[] | null | undefined = anything; + const list: _.List | null | undefined = anything; - { - let result: number[]; + _.fill(array, 42); // $ExpectType number[] + _.fill(array, 42, 0); // $ExpectType number[] + _.fill(array, 42, 0, 10); // $ExpectType number[] - result = _.fill(array, 42); - result = _.fill(array, 42, 0); - result = _.fill(array, 42, 0, 10); - } + _.fill(list, 42); // $ExpectType ArrayLike + _.fill(list, 42, 0); // $ExpectType ArrayLike + _.fill(list, 42, 0, 10); // $ExpectType ArrayLike - { - let result: _.List; + _(list).fill(42); // $ExpectType LoDashImplicitWrapper> + _(list).fill(42, 0); // $ExpectType LoDashImplicitWrapper> + _(list).fill(42, 0, 10); // $ExpectType LoDashImplicitWrapper> - result = _.fill(list, 42); - result = _.fill(list, 42, 0); - result = _.fill(list, 42, 0, 10); - } + _.chain(list).fill(42); // $ExpectType LoDashExplicitWrapper> + _.chain(list).fill(42, 0); // $ExpectType LoDashExplicitWrapper> + _.chain(list).fill(42, 0, 10); // $ExpectType LoDashExplicitWrapper> - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).fill(42); - result = _(array).fill(42, 0); - result = _(array).fill(42, 0, 10); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.List>; - - result = _(list).fill(42); - result = _(list).fill(42, 0); - result = _(list).fill(42, 0, 10); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().fill(42); - result = _(array).chain().fill(42, 0); - result = _(array).chain().fill(42, 0, 10); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.List>; - - result = _(list).chain().fill(42); - result = _(list).chain().fill(42, 0); - result = _(list).chain().fill(42, 0, 10); - } + fp.fill(0, 10, 42, array); // $ExpectType number[] + fp.fill(0)(10)(42)(array); // $ExpectType number[] + fp.fill(0, 10, 42, list); // $ExpectType ArrayLike } // _.findIndex -namespace TestFindIndex { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let predicateFn = (value: AbcObject, index: number, collection: _.List) => true; - let fromIndex = 0; - - { - let result: number; - - result = _.findIndex(array); - result = _.findIndex(array, predicateFn); - result = _.findIndex(array, ''); - result = _.findIndex(array, {a: 42}); - result = _.findIndex(array, predicateFn, fromIndex); - - result = _.findIndex(list); - result = _.findIndex(list, predicateFn); - result = _.findIndex(list, ''); - result = _.findIndex(list, {a: 42}); - result = _.findIndex(list, predicateFn, fromIndex); - result = _.findIndex([{ b: 5 }], ['b', 5]); - - result = _(array).findIndex(); - result = _(array).findIndex(predicateFn); - result = _(array).findIndex(''); - result = _(array).findIndex<{a: number}>({a: 42}); - result = _(array).findIndex(predicateFn, fromIndex); - - result = _(list).findIndex(); - result = _(list).findIndex(predicateFn); - result = _(list).findIndex(''); - result = _(list).findIndex<{a: number}>({a: 42}); - result = _(list).findIndex(predicateFn, fromIndex); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(array).chain().findIndex(); - result = _(array).chain().findIndex(predicateFn); - result = _(array).chain().findIndex(''); - result = _(array).chain().findIndex<{a: number}>({a: 42}); - result = _(array).chain().findIndex(predicateFn, fromIndex); - - result = _(list).chain().findIndex(); - result = _(list).chain().findIndex(predicateFn); - result = _(list).chain().findIndex(''); - result = _(list).chain().findIndex<{a: number}>({a: 42}); - result = _(list).chain().findIndex(predicateFn, fromIndex); - } -} - // _.findLastIndex -namespace TestFindLastIndex { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; +{ + const list: _.List | null | undefined = anything; + const predicateFn = (value: AbcObject, index: number, collection: _.List) => true; + const predicateFn2 = (value: AbcObject) => true; - let predicateFn = (value: AbcObject, index: number, collection: _.List) => true; - let fromIndex = 0; + _.findIndex(list); // $ExpectType number + _.findIndex(list, predicateFn); // $ExpectType number + _.findIndex(list, ""); // $ExpectType number + _.findIndex(list, {a: 42}); // $ExpectType number + _.findIndex(list, predicateFn, 1); // $ExpectType number - { - let result: number; + _(list).findIndex(); // $ExpectType number + _(list).findIndex(predicateFn); // $ExpectType number + _(list).findIndex(""); // $ExpectType number + _(list).findIndex<{a: number}>({a: 42}); // $ExpectType number + _(list).findIndex(predicateFn, 1); // $ExpectType number - result = _.findLastIndex(array); - result = _.findLastIndex(array, predicateFn); - result = _.findLastIndex(array, ''); - result = _.findLastIndex(array, {a: 42}); - result = _.findLastIndex(array, predicateFn, fromIndex); + _.chain(list).findIndex(); // $ExpectType LoDashExplicitWrapper + _.chain(list).findIndex(predicateFn); // $ExpectType LoDashExplicitWrapper + _.chain(list).findIndex(""); // $ExpectType LoDashExplicitWrapper + _.chain(list).findIndex<{a: number}>({a: 42}); // $ExpectType LoDashExplicitWrapper + _.chain(list).findIndex(predicateFn, 1); // $ExpectType LoDashExplicitWrapper - result = _.findLastIndex(list); - result = _.findLastIndex(list, predicateFn); - result = _.findLastIndex(list, ''); - result = _.findLastIndex(list, {a: 42}); - result = _.findLastIndex(list, predicateFn, fromIndex); - result = _.findLastIndex([{ b: 5 }], ['b', 5]); + fp.findIndex(predicateFn2, list); // $ExpectType number + fp.findIndex(predicateFn2)(list); // $ExpectType number + fp.findIndex("", list); // $ExpectType number + fp.findIndex({ a: 42 }, list); // $ExpectType number - result = _(array).findLastIndex(); - result = _(array).findLastIndex(predicateFn); - result = _(array).findLastIndex(''); - result = _(array).findLastIndex<{a: number}>({a: 42}); - result = _(array).findLastIndex(predicateFn, fromIndex); + fp.findIndexFrom(predicateFn2, 1, list); // $ExpectType number + fp.findIndexFrom(predicateFn2)(1)(list); // $ExpectType number + fp.findIndexFrom("", 1, list); // $ExpectType number + fp.findIndexFrom({ a: 42 }, 1, list); // $ExpectType number - result = _(list).findLastIndex(); - result = _(list).findLastIndex(predicateFn); - result = _(list).findLastIndex(''); - result = _(list).findLastIndex<{a: number}>({a: 42}); - result = _(list).findLastIndex(predicateFn, fromIndex); - } + _.findLastIndex(list); // $ExpectType number + _.findLastIndex(list, predicateFn); // $ExpectType number + _.findLastIndex(list, ""); // $ExpectType number + _.findLastIndex(list, {a: 42}); // $ExpectType number + _.findLastIndex(list, predicateFn, 1); // $ExpectType number - { - let result: _.LoDashExplicitWrapper; + _(list).findLastIndex(); // $ExpectType number + _(list).findLastIndex(predicateFn); // $ExpectType number + _(list).findLastIndex(""); // $ExpectType number + _(list).findLastIndex<{a: number}>({a: 42}); // $ExpectType number + _(list).findLastIndex(predicateFn, 1); // $ExpectType number - result = _(array).chain().findLastIndex(); - result = _(array).chain().findLastIndex(predicateFn); - result = _(array).chain().findLastIndex(''); - result = _(array).chain().findLastIndex<{a: number}>({a: 42}); - result = _(array).chain().findLastIndex(predicateFn, fromIndex); + _.chain(list).findLastIndex(); // $ExpectType LoDashExplicitWrapper + _.chain(list).findLastIndex(predicateFn); // $ExpectType LoDashExplicitWrapper + _.chain(list).findLastIndex(""); // $ExpectType LoDashExplicitWrapper + _.chain(list).findLastIndex<{a: number}>({a: 42}); // $ExpectType LoDashExplicitWrapper + _.chain(list).findLastIndex(predicateFn, 1); // $ExpectType LoDashExplicitWrapper - result = _(list).chain().findLastIndex(); - result = _(list).chain().findLastIndex(predicateFn); - result = _(list).chain().findLastIndex(''); - result = _(list).chain().findLastIndex<{a: number}>({a: 42}); - result = _(list).chain().findLastIndex(predicateFn, fromIndex); - } + fp.findLastIndex(predicateFn2, list); // $ExpectType number + fp.findLastIndex(predicateFn2)(list); // $ExpectType number + fp.findLastIndex("", list); // $ExpectType number + fp.findLastIndex({ a: 42 }, list); // $ExpectType number + + fp.findLastIndexFrom(predicateFn2, 1, list); // $ExpectType number + fp.findLastIndexFrom(predicateFn2)(1)(list); // $ExpectType number + fp.findLastIndexFrom("", 1, list); // $ExpectType number + fp.findLastIndexFrom({ a: 42 }, 1, list); // $ExpectType number } // _.first -namespace TestFirst { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; +{ + const list: _.List | null | undefined = anything; - { - let result: string | undefined; + _.first("abc"); // $ExpectType string | undefined + _.first(list); // $ExpectType AbcObject | undefined - result = _.first('abc'); - result = _('abc').first(); - } + _("abc").first(); // $ExpectType string | undefined + _(list).first(); // $ExpectType AbcObject | undefined - { - let result: AbcObject | undefined; + _.chain("abc").first(); // $ExpectType LoDashExplicitWrapper + _.chain(list).first(); // $ExpectType LoDashExplicitWrapper - result = _.first(array); - result = _.first(list); - - result = _(array).first(); - result = _(list).first(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('abc').chain().first(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(array).chain().first(); - result = _(list).chain().first(); - } + fp.first("abc"); // $ExpectType string | undefined + fp.first(list); // $ExpectType AbcObject | undefined } // _.flatten -namespace TestFlatten { - let array: number[][] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; +{ + _.flatten("abc"); // $ExpectType string[] + _.flatten([1, 2, 3]); // $ExpectType number[] + _.flatten([1, [2, 3]]); // $ExpectType number[] + _.flatten({0: 1, 1: [2, 3], length: 2}); // $ExpectType number[] - { - let result: string[]; + _("abc").flatten(); // $ExpectType LoDashImplicitWrapper + _([1, 2, 3]).flatten(); // $ExpectType LoDashImplicitWrapper + _([1, [2, 3]]).flatten(); // $ExpectType LoDashImplicitWrapper + _({0: 1, 1: [2, 3], length: 2}).flatten(); // $ExpectType LoDashImplicitWrapper - result = _.flatten('abc'); - } + _.chain("abc").flatten(); // $ExpectType LoDashExplicitWrapper + _.chain([1, 2, 3]).flatten(); // $ExpectType LoDashExplicitWrapper + _.chain([1, [2, 3]]).flatten(); // $ExpectType LoDashExplicitWrapper + _.chain({0: 1, 1: [2, 3], length: 2}).flatten(); // $ExpectType LoDashExplicitWrapper - { - let result: number[]; - - result = _.flatten(array); - result = _.flatten(list); - result = _.flatten([1, 2, 3]); - result = _.flatten([1, 2, 3]); - result = _.flatten([1, 2, 3]); - result = _.flatten([1, [2, 3]]); - result = _.flatten([1, [2, [3]]], true); - result = _.flatten([1, [2, [3]], [[4]]], true); - - result = _.flatten({0: 1, 1: 2, 2: 3, length: 3}); - result = _.flatten({0: 1, 1: [2, 3], length: 2}); - result = _.flatten({0: 1, 1: [2, [3]], length: 2}, true); - result = _.flatten({0: 1, 1: [2, [3]], 2: [[4]], length: 3}, true); - } - - { - let result: _.RecursiveArray; - - result = _.flatten([1, [2, [3]]]); - result = _.flatten([1, [2, [3]], [[4]]]); - - result = _.flatten({0: 1, 1: [2, [3]], length: 2}); - result = _.flatten({0: 1, 1: [2, [3]], 2: [[4]], length: 3}); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _('abc').flatten(); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _([1, 2, 3]).flatten(); - result = _([1, [2, 3]]).flatten(); - result = _([1, [2, [3]]]).flatten(true); - result = _([1, [2, [3]], [[4]]]).flatten(true); - - result = _({0: 1, 1: 2, 2: 3, length: 3}).flatten(); - result = _({0: 1, 1: [2, 3], length: 2}).flatten(); - result = _({0: 1, 1: [2, [3]], length: 2}).flatten(true); - result = _({0: 1, 1: [2, [3]], 2: [[4]], length: 3}).flatten(true); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _([1, [2, [3]]]).flatten(); - result = _([1, [2, [3]], [[4]]]).flatten(); - - result = _({0: 1, 1: [2, [3]], length: 2}).flatten(); - result = _({0: 1, 1: [2, [3]], 2: [[4]], length: 3}).flatten(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _('abc').chain().flatten(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _([1, 2, 3]).chain().flatten(); - result = _([1, [2, 3]]).chain().flatten(); - result = _([1, [2, [3]]]).chain().flatten(true); - result = _([1, [2, [3]], [[4]]]).chain().flatten(true); - - result = _({0: 1, 1: 2, 2: 3, length: 3}).chain().flatten(); - result = _({0: 1, 1: [2, 3], length: 2}).chain().flatten(); - result = _({0: 1, 1: [2, [3]], length: 2}).chain().flatten(true); - result = _({0: 1, 1: [2, [3]], 2: [[4]], length: 3}).chain().flatten(true); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _([1, [2, [3]]]).chain().flatten(); - result = _([1, [2, [3]], [[4]]]).chain().flatten(); - - result = _({0: 1, 1: [2, [3]], length: 2}).chain().flatten(); - result = _({0: 1, 1: [2, [3]], 2: [[4]], length: 3}).chain().flatten(); - } + fp.flatten("abc"); // $ExpectType string[] + fp.flatten([1, 2, 3]); // $ExpectType number[] + fp.flatten([1, [2, 3]]); // $ExpectType number[] + fp.flatten({0: 1, 1: [2, 3], length: 2}); // $ExpectType number[] + fp.unnest([1, [2, 3]]); // $ExpectType number[] } // _.flattenDeep -namespace TestFlattenDeep { - let array: number[][] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; +{ + _.flattenDeep([1, 2, 3]); // $ExpectType number[] + _.flattenDeep([1, [2, [3, [4, 5]]]]); // $ExpectType number[] + _.flattenDeep({0: 1, 1: [2, [3, [4, 5]]], length: 2}); // $ExpectType number[] - { - let result: string[]; + _([1, 2, 3]).flattenDeep(); // $ExpectType LoDashImplicitWrapper + _([1, [2, [3, [4, 5]]]]).flattenDeep(); // $ExpectType LoDashImplicitWrapper + _({0: 1, 1: [2, [3, [4, 5]]], length: 2}).flattenDeep(); // $ExpectType LoDashImplicitWrapper - result = _.flattenDeep('abc'); - } + _.chain([1, 2, 3]).flattenDeep(); // $ExpectType LoDashExplicitWrapper + _.chain([1, [2, [3, [4, 5]]]]).flattenDeep(); // $ExpectType LoDashExplicitWrapper + _.chain({0: 1, 1: [2, [3, [4, 5]]], length: 2}).flattenDeep(); // $ExpectType LoDashExplicitWrapper - { - let result: number[]; - - result = _.flattenDeep(array); - result = _.flattenDeep(list); - result = _.flattenDeep([1, 2, 3]); - result = _.flattenDeep([1, [2, 3]]); - result = _.flattenDeep([1, [2, [3]]]); - result = _.flattenDeep([1, [2, [3]], [[4]]]); - - result = _.flattenDeep({0: 1, 1: 2, 2: 3, length: 3}); - result = _.flattenDeep({0: 1, 1: [2, 3], length: 2}); - result = _.flattenDeep({0: 1, 1: [2, [3]], length: 2}); - result = _.flattenDeep({0: 1, 1: [2, [3]], 2: [[4]], length: 3}); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _('abc').flattenDeep(); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _([1, 2, 3]).flattenDeep(); - result = _([1, [2, 3]]).flattenDeep(); - result = _([1, [2, [3]]]).flattenDeep(); - result = _([1, [2, [3]], [[4]]]).flattenDeep(); - - result = _({0: 1, 1: 2, 2: 3, length: 3}).flattenDeep(); - result = _({0: 1, 1: [2, 3], length: 2}).flattenDeep(); - result = _({0: 1, 1: [2, [3]], length: 2}).flattenDeep(); - result = _({0: 1, 1: [2, [3]], 2: [[4]], length: 3}).flattenDeep(); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _([1, [2, [3]]]).flattenDeep(); - result = _([1, [2, [3]], [[4]]]).flattenDeep(); - - result = _({0: 1, 1: [2, [3]], length: 2}).flattenDeep(); - result = _({0: 1, 1: [2, [3]], 2: [[4]], length: 3}).flattenDeep(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _('abc').chain().flattenDeep(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _([1, 2, 3]).chain().flattenDeep(); - result = _([1, [2, 3]]).chain().flattenDeep(); - result = _([1, [2, [3]]]).chain().flattenDeep(); - result = _([1, [2, [3]], [[4]]]).chain().flattenDeep(); - - result = _({0: 1, 1: 2, 2: 3, length: 3}).chain().flattenDeep(); - result = _({0: 1, 1: [2, 3], length: 2}).chain().flattenDeep(); - result = _({0: 1, 1: [2, [3]], length: 2}).chain().flattenDeep(); - result = _({0: 1, 1: [2, [3]], 2: [[4]], length: 3}).chain().flattenDeep(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _([1, [2, [3]]]).chain().flattenDeep(); - result = _([1, [2, [3]], [[4]]]).chain().flattenDeep(); - - result = _({0: 1, 1: [2, [3]], length: 2}).chain().flattenDeep(); - result = _({0: 1, 1: [2, [3]], 2: [[4]], length: 3}).chain().flattenDeep(); - } + fp.flattenDeep([1, 2, 3]); // $ExpectType number[] + fp.flattenDeep([1, [2, [3, [4, 5]]]]); // $ExpectType number[] + fp.flattenDeep({0: 1, 1: [2, [3, [4, 5]]], length: 2}); // $ExpectType number[] } // _.fromPairs -namespace TestFromPairs { - let twoDimensionalArray: string[][] | null | undefined = [] as any; - let numberTupleArray: Array<[string, number]> | null | undefined = [] as any; - let stringDict: _.Dictionary; - let numberDict: _.Dictionary; +{ + const twoDimensionalArray: string[][] | null | undefined = anything; + const numberTupleArray: Array<[string, number]> | null | undefined = anything; - { - stringDict = _.fromPairs(twoDimensionalArray); - numberDict = _.fromPairs(numberTupleArray); - // Ensure we're getting the parameterized overload rather than the 'any' catch-all. - numberDict = _.fromPairs(numberTupleArray); - // This doesn't compile because you can't assign arrays to tuples. - // stringDict = _.fromPairs(twoDimensionalArray); - } - - { - stringDict = _(twoDimensionalArray).fromPairs().value(); - } - - { - stringDict = _.chain(twoDimensionalArray).fromPairs().value(); - } + _.fromPairs(twoDimensionalArray); // $ExpectType Dictionary + _.fromPairs(numberTupleArray); // $ExpectType Dictionary + _(twoDimensionalArray).fromPairs(); // $ExpectType LoDashImplicitWrapper> + _.chain(twoDimensionalArray).fromPairs(); // $ExpectType LoDashExplicitWrapper> + fp.fromPairs(numberTupleArray); // $ExpectType Dictionary } // _.head -namespace TestHead { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; +{ + const list: _.List | null | undefined = anything; - { - let result: string | undefined; + _.head("abc"); // $ExpectType string | undefined + _.head(list); // $ExpectType AbcObject | undefined - result = _.head('abc'); - result = _('abc').head(); - } + _("abc").head(); // $ExpectType string | undefined + _(list).head(); // $ExpectType AbcObject | undefined - { - let result: AbcObject | undefined; + _.chain("abc").head(); // $ExpectType LoDashExplicitWrapper + _.chain(list).head(); // $ExpectType LoDashExplicitWrapper - result = _.head(array); - result = _.head(list); - - result = _(array).head(); - result = _(list).head(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('abc').chain().head(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(array).chain().head(); - result = _(list).chain().head(); - } + fp.head("abc"); // $ExpectType string | undefined + fp.head(list); // $ExpectType AbcObject | undefined } // _.indexOf -namespace TestIndexOf { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let value: AbcObject = { a: 1, b: "", c: true }; - - { - let result: number; - - result = _.indexOf(array, value); - result = _.indexOf(array, value, true); - result = _.indexOf(array, value, 42); - - result = _.indexOf(list, value); - result = _.indexOf(list, value, true); - result = _.indexOf(list, value, 42); - - result = _(array).indexOf(value); - result = _(array).indexOf(value, true); - result = _(array).indexOf(value, 42); - - result = _(list).indexOf(value); - result = _(list).indexOf(value, true); - result = _(list).indexOf(value, 42); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(array).chain().indexOf(value); - result = _(array).chain().indexOf(value, true); - result = _(array).chain().indexOf(value, 42); - - result = _(list).chain().indexOf(value); - result = _(list).chain().indexOf(value, true); - result = _(list).chain().indexOf(value, 42); - } -} - +// _.lastIndexOf // _.sortedIndexOf +// _.sortedLastIndexOf { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let value: AbcObject = { a: 1, b: "", c: true }; + const list: _.List | null | undefined = anything; + const value: AbcObject = { a: 1, b: "", c: true }; - { - let result: number; + _.indexOf(list, value); // $ExpectType number + _.indexOf(list, value, 42); // $ExpectType number + _(list).indexOf(value); // $ExpectType number + _(list).indexOf(value, 42); // $ExpectType number + _.chain(list).indexOf(value); // $ExpectType LoDashExplicitWrapper + _.chain(list).indexOf(value, 42); // $ExpectType LoDashExplicitWrapper + fp.indexOf(value, list); // $ExpectType number + fp.indexOf(value)(list); // $ExpectType number + fp.indexOfFrom(value)(42)(list); // $ExpectType number - result = _.sortedIndexOf(array, value); - result = _.sortedIndexOf(list, value); - result = _(array).sortedIndexOf(value); - result = _(list).sortedIndexOf(value); - } + _.lastIndexOf(list, value); // $ExpectType number + _.lastIndexOf(list, value, 42); // $ExpectType number + _(list).lastIndexOf(value); // $ExpectType number + _(list).lastIndexOf(value, 42); // $ExpectType number + _.chain(list).lastIndexOf(value); // $ExpectType LoDashExplicitWrapper + _.chain(list).lastIndexOf(value, 42); // $ExpectType LoDashExplicitWrapper + fp.lastIndexOf(value, list); // $ExpectType number + fp.lastIndexOf(value)(list); // $ExpectType number + fp.lastIndexOfFrom(value)(42)(list); // $ExpectType number - { - let result: _.LoDashExplicitWrapper; + _.sortedIndexOf(list, value); // $ExpectType number + _(list).sortedIndexOf(value); // $ExpectType number + _.chain(list).indexOf(value); // $ExpectType LoDashExplicitWrapper + fp.sortedIndexOf(value, list); // $ExpectType number + fp.sortedIndexOf(value)(list); // $ExpectType number - result = _(array).chain().sortedIndexOf(value); - result = _(list).chain().sortedIndexOf(value); - } + _.sortedLastIndexOf(list, value); // $ExpectType number + _(list).sortedLastIndexOf(value); // $ExpectType number + _.chain(list).sortedLastIndexOf(value); // $ExpectType LoDashExplicitWrapper + fp.sortedLastIndexOf(value, list); // $ExpectType number + fp.sortedLastIndexOf(value)(list); // $ExpectType number } -//_.initial -namespace TestInitial { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; +// _.initial +{ + const list: _.List | null | undefined = anything; - { - let result: AbcObject[]; - - result = _.initial(array); - result = _.initial(list); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).initial(); - result = _(list).initial(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().initial(); - result = _(list).chain().initial(); - } + _.initial(list); // $ExpectType AbcObject[] + _(list).initial(); // $ExpectType LoDashImplicitWrapper + _.chain(list).initial(); // $ExpectType LoDashExplicitWrapper + fp.initial(list); // $ExpectType AbcObject[] } // _.intersection -namespace TestIntersection { - let array: AbcObject[] = [] as any; - let list: _.List = [] as any; - let arrayParam: AbcObject[] = [] as any; - let listParam: _.List = [] as any; +{ + const list: _.List = anything; - { - let result: AbcObject[]; - - result = _.intersection(array, list); - result = _.intersection(list, array, list); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).intersection(arrayParam); - result = _(array).intersection(listParam, arrayParam); - - result = _(list).intersection(arrayParam); - result = _(list).intersection(listParam, arrayParam); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().intersection(arrayParam); - result = _(array).chain().intersection(listParam, arrayParam); - - result = _(list).chain().intersection(arrayParam); - result = _(list).chain().intersection(listParam, arrayParam); - } + _.intersection(list, list); // $ExpectType AbcObject[] + _.intersection(list, list, list); // $ExpectType AbcObject[] + _(list).intersection(list); // $ExpectType LoDashImplicitWrapper + _(list).intersection(list, list); // $ExpectType LoDashImplicitWrapper + _.chain(list).intersection(list); // $ExpectType LoDashExplicitWrapper + _.chain(list).intersection(list, list); // $ExpectType LoDashExplicitWrapper + fp.intersection(list, list); // $ExpectType AbcObject[] + fp.intersection(list)(list); // $ExpectType AbcObject[] } // _.intersectionBy { - let array: AbcObject[] = [] as any; - let list: _.List = [] as any; - let arrayParam: AbcObject[] = [] as any; - let listParam: _.List = [] as any; + const list: _.List = anything; + _.intersectionBy(list, list); // $ExpectType AbcObject[] + _.intersectionBy(list, list, list); // $ExpectType AbcObject[] + _.intersectionBy(list, list, "a"); // $ExpectType AbcObject[] + _.intersectionBy(list, list, list, { a: 42 }); // $ExpectType AbcObject[] + _.intersectionBy(list, list, ["a", 42]); // $ExpectType AbcObject[] // $ExpectType AbcObject[] - result = _.intersectionBy(array, list); - // $ExpectType AbcObject[] - result = _.intersectionBy(list, array, list); - // $ExpectType AbcObject[] - result = _.intersectionBy(array, list, 'a'); - // $ExpectType AbcObject[] - result = _.intersectionBy(array, list, { a: 42 }); - // $ExpectType AbcObject[] - result = _.intersectionBy(list, array, list, { a: 42 }); - // $ExpectType AbcObject[] - result = _.intersectionBy(array, list, ['a', 42]); - // $ExpectType AbcObject[] - result = _.intersectionBy(array, list, (value) => { + _.intersectionBy(list, list, (value) => { value; // $ExpectType AbcObject return 0; }); // $ExpectType AbcObject[] - result = _.intersectionBy(list, array, list, (value) => { + _.intersectionBy(list, list, list, (value) => { value; // $ExpectType AbcObject return 0; }); + _(list).intersectionBy(list); // $ExpectType LoDashImplicitWrapper + _(list).intersectionBy(list, "a"); // $ExpectType LoDashImplicitWrapper + _(list).intersectionBy(list, list, { a: 42 }); // $ExpectType LoDashImplicitWrapper + _(list).intersectionBy(list, ["a", 42]); // $ExpectType LoDashImplicitWrapper // $ExpectType LoDashImplicitWrapper - result = _(array).intersectionBy(arrayParam); - // $ExpectType LoDashImplicitWrapper - result = _(array).intersectionBy(listParam, arrayParam); - // $ExpectType LoDashImplicitWrapper - result = _(array).intersectionBy(list, 'a'); - // $ExpectType LoDashImplicitWrapper - result = _(array).intersectionBy(list, { a: 42 }); - // $ExpectType LoDashImplicitWrapper - result = _(list).intersectionBy(array, list, { a: 42 }); - // $ExpectType LoDashImplicitWrapper - result = _(array).intersectionBy(list, ['a', 42]); - // $ExpectType LoDashImplicitWrapper - result = _(array).intersectionBy(list, (value) => { - value; // $ExpectType AbcObject - return ""; - }); - // $ExpectType LoDashImplicitWrapper - result = _(list).intersectionBy(array, list, (value) => { + _(list).intersectionBy(list, (value) => { value; // $ExpectType AbcObject return 1; }); + _.chain(list).intersectionBy(list); // $ExpectType LoDashExplicitWrapper + _.chain(list).intersectionBy(list, "a"); // $ExpectType LoDashExplicitWrapper + _.chain(list).intersectionBy(list, list, { a: 42 }); // $ExpectType LoDashExplicitWrapper + _.chain(list).intersectionBy(list, ["a", 42]); // $ExpectType LoDashExplicitWrapper // $ExpectType LoDashExplicitWrapper - result = _.chain(array).intersectionBy(arrayParam); - // $ExpectType LoDashExplicitWrapper - result = _.chain(array).intersectionBy(listParam, arrayParam); - // $ExpectType LoDashExplicitWrapper - result = _.chain(array).intersectionBy(list, 'a'); - // $ExpectType LoDashExplicitWrapper - result = _.chain(array).intersectionBy(list, { a: 42 }); - // $ExpectType LoDashExplicitWrapper - result = _.chain(list).intersectionBy(array, list, { a: 42 }); - // $ExpectType LoDashExplicitWrapper - result = _.chain(array).intersectionBy(list, ['a', 42]); - // $ExpectType LoDashExplicitWrapper - result = _.chain(array).intersectionBy(list, (value) => { - value; // $ExpectType AbcObject - return false; - }); - // $ExpectType LoDashExplicitWrapper - result = _.chain(list).intersectionBy(array, list, (value) => { + _.chain(list).intersectionBy(list, (value) => { value; // $ExpectType AbcObject return null; }); + fp.intersectionBy("a", list, list); // $ExpectType AbcObject[] + fp.intersectionBy("a", list, list); // $ExpectType AbcObject[] + fp.intersectionBy({ a: 42 }, list, list); // $ExpectType AbcObject[] + fp.intersectionBy(["a", 42], list, list); // $ExpectType AbcObject[] + fp.intersectionBy((value: AbcObject) => 0, list, list); // $ExpectType AbcObject[] + interface T1 { a: string; b: string; @@ -1469,20 +724,20 @@ namespace TestIntersection { a: string; b: number; } - const t1: T1 = { a: 'a', b: 'b' }; - const t2: T2 = { a: 'a', b: 1 }; + const t1: T1 = { a: "a", b: "b" }; + const t2: T2 = { a: "a", b: 1 }; // $ExpectType T1[] - result = _.intersectionBy([t1], [t2], (value) => { + _.intersectionBy([t1], [t2], (value) => { value; // $ExpectType T1 | T2 return undefined; }); // $ExpectType LoDashImplicitWrapper - result = _([t1]).intersectionBy([t2], (value) => { + _([t1]).intersectionBy([t2], (value) => { value; // $ExpectType T1 | T2 return {}; }); // $ExpectType LoDashExplicitWrapper - result = _.chain([t1]).intersectionBy([t2], (value) => { + _.chain([t1]).intersectionBy([t2], (value) => { value; // $ExpectType T1 | T2 return {}; }); @@ -1490,62 +745,44 @@ namespace TestIntersection { // _.intersectionWith { - let array: AbcObject[] = [] as any; - let list: _.List = [] as any; - let arrayParam: AbcObject[] = [] as any; - let listParam: _.List = [] as any; + const list: _.List = anything; + _.intersectionWith(list, list); // $ExpectType AbcObject[] + _.intersectionWith(list, list, list); // $ExpectType AbcObject[] // $ExpectType AbcObject[] - result = _.intersectionWith(array, list); - // $ExpectType AbcObject[] - result = _.intersectionWith(list, array, list); - // $ExpectType AbcObject[] - result = _.intersectionWith(array, list, (a, b) => { + _.intersectionWith(list, list, (a, b) => { a; // $ExpectType AbcObject b; // $ExpectType AbcObject return true; }); // $ExpectType AbcObject[] - result = _.intersectionWith(list, array, list, (a, b) => { + _.intersectionWith(list, list, list, (a, b) => { a; // $ExpectType AbcObject b; // $ExpectType AbcObject return true; }); + _(list).intersectionWith(list); // $ExpectType LoDashImplicitWrapper + _(list).intersectionWith(list, list); // $ExpectType LoDashImplicitWrapper // $ExpectType LoDashImplicitWrapper - result = _(array).intersectionWith(arrayParam); - // $ExpectType LoDashImplicitWrapper - result = _(array).intersectionWith(listParam, arrayParam); - // $ExpectType LoDashImplicitWrapper - result = _(array).intersectionWith(list, (a, b) => { - a; // $ExpectType AbcObject - b; // $ExpectType AbcObject - return true; - }); - // $ExpectType LoDashImplicitWrapper - result = _(list).intersectionWith(array, list, (a, b) => { + _(list).intersectionWith(list, (a, b) => { a; // $ExpectType AbcObject b; // $ExpectType AbcObject return true; }); + _.chain(list).intersectionWith(list); // $ExpectType LoDashExplicitWrapper + _.chain(list).intersectionWith(list, list); // $ExpectType LoDashExplicitWrapper // $ExpectType LoDashExplicitWrapper - result = _.chain(array).intersectionWith(arrayParam); - // $ExpectType LoDashExplicitWrapper - result = _.chain(array).intersectionWith(listParam, arrayParam); - // $ExpectType LoDashExplicitWrapper - result = _.chain(array).intersectionWith(list, (a, b) => { - a; // $ExpectType AbcObject - b; // $ExpectType AbcObject - return true; - }); - // $ExpectType LoDashExplicitWrapper - result = _.chain(list).intersectionWith(array, list, (a, b) => { + _.chain(list).intersectionWith(list, (a, b) => { a; // $ExpectType AbcObject b; // $ExpectType AbcObject return true; }); + fp.intersectionWith((a: AbcObject, b: AbcObject) => true, list, list); // $ExpectType AbcObject[] + fp.intersectionWith((a: AbcObject, b: AbcObject) => true)(list)(list); // $ExpectType AbcObject[] + interface T1 { a: string; b: string; @@ -1554,434 +791,244 @@ namespace TestIntersection { a: string; b: number; } - const t1: T1 = { a: 'a', b: 'b' }; - const t2: T2 = { a: 'a', b: 1 }; + const t1: T1 = { a: "a", b: "b" }; + const t2: T2 = { a: "a", b: 1 }; // $ExpectType T1[] - result = _.intersectionWith([t1], [t2], (a, b) => { + _.intersectionWith([t1], [t2], (a, b) => { a; // $ExpectType T1 b; // $ExpectType T2 return true; }); // $ExpectType LoDashImplicitWrapper - result = _([t1]).intersectionWith([t2], (a, b) => { + _([t1]).intersectionWith([t2], (a, b) => { a; // $ExpectType T1 b; // $ExpectType T2 return true; }); // $ExpectType LoDashExplicitWrapper - result = _.chain([t1]).intersectionWith([t2], (a, b) => { + _.chain([t1]).intersectionWith([t2], (a, b) => { a; // $ExpectType T1 b; // $ExpectType T2 return true; }); + + fp.intersectionWith((a: T1, b: T2) => true)([t1])([t2]); // $ExpectType T1[] } // _.join -namespace TestJoin { - let array = [1, 2]; - let list = {0: 1, 1: 2, length: 2}; - let nilArray: string[] | null | undefined = undefined as any; - let nilList: _.List | null | undefined = undefined as any; +{ + const list: _.List | null | undefined = anything; - { - let result: string; + _.join("abc"); // $ExpectType string + _.join("abc", "_"); // $ExpectType string + _.join(list); // $ExpectType string + _.join(list, "_"); // $ExpectType string - result = _.join('abc'); - result = _.join('abc', '_'); - result = _.join(array); - result = _.join(array, '_'); - result = _.join(list); - result = _.join(list, '_'); - result = _.join(nilArray); - result = _.join(nilArray, '_'); - result = _.join(nilList); - result = _.join(nilList, '_'); + _("abc").join(); // $ExpectType string + _("abc").join("_"); // $ExpectType string + _(list).join(); // $ExpectType string + _(list).join("_"); // $ExpectType string - result = _('abc').join(); - result = _('abc').join('_'); - result = _(array).join(); - result = _(array).join('_'); - result = _(list).join(); - result = _(list).join('_'); - } + _.chain("abc").join(); // $ExpectType LoDashExplicitWrapper + _.chain("abc").join("_"); // $ExpectType LoDashExplicitWrapper + _.chain(list).join(); // $ExpectType LoDashExplicitWrapper + _.chain(list).join("_"); // $ExpectType LoDashExplicitWrapper - { - let result: _.LoDashExplicitWrapper; - - result = _('abc').chain().join(); - result = _('abc').chain().join('_'); - result = _(array).chain().join(); - result = _(array).chain().join('_'); - result = _(list).chain().join(); - result = _(list).chain().join('_'); - } + fp.join("_", "abc"); // $ExpectType string + fp.join("_")(list); // $ExpectType string } // _.last -namespace TestLast { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; +{ + const list: _.List | null | undefined = anything; - { - let result: string | undefined; + _.last("abc"); // $ExpectType string | undefined + _.last(list); // $ExpectType AbcObject | undefined - result = _.last('abc'); - result = _('abc').last(); - } + _("abc").last(); // $ExpectType string | undefined + _(list).last(); // $ExpectType AbcObject | undefined - { - let result: AbcObject | undefined; + _.chain("abc").last(); // $ExpectType LoDashExplicitWrapper + _.chain(list).last(); // $ExpectType LoDashExplicitWrapper - result = _.last(array); - result = _.last(list); - - result = _(array).last(); - result = _(list).last(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('abc').chain().last(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(array).chain().last(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(list).chain().last(); - } -} - -// _.lastIndexOf -namespace TestLastIndexOf { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let value: AbcObject = { a: 1, b: "", c: true }; - - { - let result: number; - - result = _.lastIndexOf(array, value); - result = _.lastIndexOf(array, value, true); - result = _.lastIndexOf(array, value, 42); - - result = _.lastIndexOf(list, value); - result = _.lastIndexOf(list, value, true); - result = _.lastIndexOf(list, value, 42); - - result = _(array).lastIndexOf(value); - result = _(array).lastIndexOf(value, true); - result = _(array).lastIndexOf(value, 42); - - result = _(list).lastIndexOf(value); - result = _(list).lastIndexOf(value, true); - result = _(list).lastIndexOf(value, 42); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(array).chain().lastIndexOf(value); - result = _(array).chain().lastIndexOf(value, true); - result = _(array).chain().lastIndexOf(value, 42); - - result = _(list).chain().lastIndexOf(value); - result = _(list).chain().lastIndexOf(value, true); - result = _(list).chain().lastIndexOf(value, 42); - } + fp.last("abc"); // $ExpectType string | undefined + fp.last(list); // $ExpectType AbcObject | undefined } // _.nth -namespace TestNth { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let value = 0; +{ + const list: _.List | null | undefined = anything; - { - let result: AbcObject | undefined; + _.nth(list, 42); // $ExpectType AbcObject | undefined + _(list).nth(42); // $ExpectType AbcObject | undefined + _.chain(list).nth(42); // $ExpectType LoDashExplicitWrapper - result = _.nth(array); - - result = _.nth(array, 42); - - result = _(array).nth(); - result = _(array).nth(42); - - result = _(list).nth(); - result = _(list).nth(42); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(array).chain().nth(); - result = _(array).chain().nth(42); - - result = _(list).chain().nth(); - result = _(list).chain().nth(42); - } + fp.nth(42, list); // $ExpectType AbcObject | undefined + fp.nth(42)(list); // $ExpectType AbcObject | undefined } // _.pull -namespace TestPull { - let array: AbcObject[] = []; - let list: _.List = []; - let value: AbcObject = { a: 1, b: "", c: true }; +{ + const array: AbcObject[] = []; + const list: _.List = []; + const value: AbcObject = { a: 1, b: "", c: true }; - { - let result: AbcObject[]; + _.pull(array); // $ExpectType AbcObject[] + _.pull(array, value); // $ExpectType AbcObject[] + _.pull(array, value, value, value); // $ExpectType AbcObject[] + _.pull(list); // $ExpectType ArrayLike + _.pull(list, value); // $ExpectType ArrayLike + _.pull(list, value, value, value); // $ExpectType ArrayLike - result = _.pull(array); - result = _.pull(array, value); - result = _.pull(array, value, value); - result = _.pull(array, value, value, value); - } + _(array).pull(); // $ExpectType LoDashImplicitWrapper + _(array).pull(value); // $ExpectType LoDashImplicitWrapper + _(array).pull(value, value, value); // $ExpectType LoDashImplicitWrapper + _(list).pull(); // $ExpectType LoDashImplicitWrapper> + _(list).pull(value); // $ExpectType LoDashImplicitWrapper> + _(list).pull(value, value, value); // $ExpectType LoDashImplicitWrapper> - { - let result: _.List; + _.chain(array).pull(); // $ExpectType LoDashExplicitWrapper + _.chain(array).pull(value); // $ExpectType LoDashExplicitWrapper + _.chain(array).pull(value, value, value); // $ExpectType LoDashExplicitWrapper + _.chain(list).pull(); // $ExpectType LoDashExplicitWrapper> + _.chain(list).pull(value); // $ExpectType LoDashExplicitWrapper> + _.chain(list).pull(value, value, value); // $ExpectType LoDashExplicitWrapper> - result = _.pull(list); - result = _.pull(list, value); - result = _.pull(list, value, value); - result = _.pull(list, value, value, value); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).pull(); - result = _(array).pull(value); - result = _(array).pull(value, value); - result = _(array).pull(value, value, value); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.List>; - - result = _(list).pull(); - result = _(list).pull(value); - result = _(list).pull(value, value); - result = _(list).pull(value, value, value); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().pull(); - result = _(array).chain().pull(value); - result = _(array).chain().pull(value, value); - result = _(array).chain().pull(value, value, value); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.List>; - - result = _(list).chain().pull(); - result = _(list).chain().pull(value); - result = _(list).chain().pull(value, value); - result = _(list).chain().pull(value, value, value); - } + fp.pull(value, array); // $ExpectType AbcObject[] + fp.pull(value, list); // $ExpectType ArrayLike + fp.pull(value)(list); // $ExpectType ArrayLike } // _.pullAt -namespace TestPullAt { - let array: AbcObject[] = []; - let list: _.List = []; +{ + const array: AbcObject[] = []; + const list: _.List = []; - { - let result: AbcObject[]; + _.pullAt(array); // $ExpectType AbcObject[] + _.pullAt(array, 1); // $ExpectType AbcObject[] + _.pullAt(array, [2, 3], 4); // $ExpectType AbcObject[] + _.pullAt(list); // $ExpectType ArrayLike + _.pullAt(list, 1); // $ExpectType ArrayLike + _.pullAt(list, [2, 3], 4); // $ExpectType ArrayLike - result = _.pullAt(array); - result = _.pullAt(array, 1); - result = _.pullAt(array, [2, 3], 1); - result = _.pullAt(array, 4, [2, 3], 1); - } + _(array).pullAt(); // $ExpectType LoDashImplicitWrapper + _(array).pullAt(1); // $ExpectType LoDashImplicitWrapper + _(array).pullAt([2, 3], 4); // $ExpectType LoDashImplicitWrapper + _(list).pullAt(); // $ExpectType LoDashImplicitWrapper> + _(list).pullAt(1); // $ExpectType LoDashImplicitWrapper> + _(list).pullAt([2, 3], 4); // $ExpectType LoDashImplicitWrapper> - { - let result: ArrayLike; + _.chain(array).pullAt(); // $ExpectType LoDashExplicitWrapper + _.chain(array).pullAt(1); // $ExpectType LoDashExplicitWrapper + _.chain(array).pullAt([2, 3], 4); // $ExpectType LoDashExplicitWrapper + _.chain(list).pullAt(); // $ExpectType LoDashExplicitWrapper> + _.chain(list).pullAt(1); // $ExpectType LoDashExplicitWrapper> + _.chain(list).pullAt([2, 3], 4); // $ExpectType LoDashExplicitWrapper> - result = _.pullAt(list); - result = _.pullAt(list, 1); - result = _.pullAt(list, [2, 3], 1); - result = _.pullAt(list, 4, [2, 3], 1); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).pullAt(); - result = _(array).pullAt(1); - result = _(array).pullAt([2, 3], 1); - result = _(array).pullAt(4, [2, 3], 1); - } - - { - let result: _.LoDashImplicitWrapper>; - - result = _(list).pullAt(); - result = _(list).pullAt(1); - result = _(list).pullAt([2, 3], 1); - result = _(list).pullAt(4, [2, 3], 1); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().pullAt(); - result = _(array).chain().pullAt(1); - result = _(array).chain().pullAt([2, 3], 1); - result = _(array).chain().pullAt(4, [2, 3], 1); - } - - { - let result: _.LoDashExplicitWrapper>; - - result = _(list).chain().pullAt(); - result = _(list).chain().pullAt(1); - result = _(list).chain().pullAt([2, 3], 1); - result = _(list).chain().pullAt(4, [2, 3], 1); - } + fp.pullAt(1, array); // $ExpectType AbcObject[] + fp.pullAt([2, 3], array); // $ExpectType AbcObject[] + fp.pullAt(1, list); // $ExpectType ArrayLike + fp.pullAt([2, 3], list); // $ExpectType ArrayLike + fp.pullAt(1)(list); // $ExpectType ArrayLike } // _.pullAll { - let array: AbcObject[] = anything; - let list: _.List = anything; - let values: _.List = anything; + const array: AbcObject[] = anything; + const list: _.List = anything; + const values: _.List = anything; - // $ExpectType AbcObject[] - _.pullAll(array); - // $ExpectType AbcObject[] - _.pullAll(array, values); - // $ExpectType ArrayLike - _.pullAll(list); - // $ExpectType ArrayLike - _.pullAll(list, values); + _.pullAll(array); // $ExpectType AbcObject[] + _.pullAll(array, values); // $ExpectType AbcObject[] + _.pullAll(list); // $ExpectType ArrayLike + _.pullAll(list, values); // $ExpectType ArrayLike - // $ExpectType LoDashImplicitWrapper - _(array).pullAll(); - // $ExpectType LoDashImplicitWrapper - _(array).pullAll(values); - // $ExpectType LoDashImplicitWrapper> - _(list).pullAll(); - // $ExpectType LoDashImplicitWrapper> - _(list).pullAll(values); + _(array).pullAll(); // $ExpectType LoDashImplicitWrapper + _(array).pullAll(values); // $ExpectType LoDashImplicitWrapper + _(list).pullAll(); // $ExpectType LoDashImplicitWrapper> + _(list).pullAll(values); // $ExpectType LoDashImplicitWrapper> - // $ExpectType LoDashExplicitWrapper - _.chain(array).pullAll(); - // $ExpectType LoDashExplicitWrapper - _.chain(array).pullAll(values); - // $ExpectType LoDashExplicitWrapper> - _.chain(list).pullAll(); - // $ExpectType LoDashExplicitWrapper> - _.chain(list).pullAll(values); + _.chain(array).pullAll(); // $ExpectType LoDashExplicitWrapper + _.chain(array).pullAll(values); // $ExpectType LoDashExplicitWrapper + _.chain(list).pullAll(); // $ExpectType LoDashExplicitWrapper> + _.chain(list).pullAll(values); // $ExpectType LoDashExplicitWrapper> + + fp.pullAll(values, array); // $ExpectType AbcObject[] + fp.pullAll(values, list); // $ExpectType ArrayLike + fp.pullAll(values)(list); // $ExpectType ArrayLike } // _.pullAllBy +// _.pullAllWith { - let array: AbcObject[] = anything; - let list: _.List = anything; - let values: _.List = anything; + const array: AbcObject[] = anything; + const list: _.List = anything; + const values: _.List = anything; - // $ExpectType AbcObject[] - _.pullAllBy(array); - // $ExpectType AbcObject[] - _.pullAllBy(array, values); - // $ExpectType AbcObject[] - _.pullAllBy(array, values, 'a'); - // $ExpectType AbcObject[] - _.pullAllBy(array, values, { a: 42 }); - // $ExpectType AbcObject[] - _.pullAllBy(array, values, ['a', 42]); + _.pullAllBy(array); // $ExpectType AbcObject[] + _.pullAllBy(array, values, "a"); // $ExpectType AbcObject[] // $ExpectType AbcObject[] _.pullAllBy(array, values, (value) => { value; // $ExpectType AbcObject return []; }); - // $ExpectType ArrayLike - _.pullAllBy(list); - // $ExpectType ArrayLike - _.pullAllBy(list, values); - // $ExpectType ArrayLike - _.pullAllBy(list, values, 'a'); - // $ExpectType ArrayLike - _.pullAllBy(list, values, { a: 42 }); - // $ExpectType ArrayLike - _.pullAllBy(list, values, ['a', 42]); + + _.pullAllBy(list); // $ExpectType ArrayLike + _.pullAllBy(list, values); // $ExpectType ArrayLike + _.pullAllBy(list, values, "a"); // $ExpectType ArrayLike + _.pullAllBy(list, values, { a: 42 }); // $ExpectType ArrayLike + _.pullAllBy(list, values, ["a", 42]); // $ExpectType ArrayLike // $ExpectType ArrayLike _.pullAllBy(list, values, (value) => { value; // $ExpectType AbcObject return () => {}; }); - // $ExpectType LoDashImplicitWrapper - _(array).pullAllBy(); - // $ExpectType LoDashImplicitWrapper - _(array).pullAllBy(values); - // $ExpectType LoDashImplicitWrapper - _(array).pullAllBy(values, 'a'); - // $ExpectType LoDashImplicitWrapper - _(array).pullAllBy(values, { a: 42 }); - // $ExpectType LoDashImplicitWrapper - _(array).pullAllBy(values, ['a', 42]); + _(array).pullAllBy(); // $ExpectType LoDashImplicitWrapper + _(array).pullAllBy(values, "a"); // $ExpectType LoDashImplicitWrapper // $ExpectType LoDashImplicitWrapper _(array).pullAllBy(values, (value) => { value; // $ExpectType AbcObject return 0; }); - // $ExpectType LoDashImplicitWrapper> - _(list).pullAllBy(); - // $ExpectType LoDashImplicitWrapper> - _(list).pullAllBy(values); - // $ExpectType LoDashImplicitWrapper> - _(list).pullAllBy(values, 'a'); - // $ExpectType LoDashImplicitWrapper> - _(list).pullAllBy(values, { a: 42 }); - // $ExpectType LoDashImplicitWrapper> - _(list).pullAllBy(values, ['a', 42]); + _(list).pullAllBy(); // $ExpectType LoDashImplicitWrapper> + _(list).pullAllBy(values, "a"); // $ExpectType LoDashImplicitWrapper> // $ExpectType LoDashImplicitWrapper> _(list).pullAllBy(values, (value) => { value; // $ExpectType AbcObject return 0; }); - // $ExpectType LoDashExplicitWrapper - _.chain(array).pullAllBy(); - // $ExpectType LoDashExplicitWrapper - _.chain(array).pullAllBy(values); - // $ExpectType LoDashExplicitWrapper - _.chain(array).pullAllBy(values, 'a'); - // $ExpectType LoDashExplicitWrapper - _.chain(array).pullAllBy(values, { a: 42 }); - // $ExpectType LoDashExplicitWrapper - _.chain(array).pullAllBy(values, ['a', 42]); + _.chain(array).pullAllBy(); // $ExpectType LoDashExplicitWrapper + _.chain(array).pullAllBy(values, "a"); // $ExpectType LoDashExplicitWrapper // $ExpectType LoDashExplicitWrapper _.chain(array).pullAllBy(values, (value) => { value; // $ExpectType AbcObject return 0; }); - // $ExpectType LoDashExplicitWrapper> - _.chain(list).pullAllBy(); - // $ExpectType LoDashExplicitWrapper> - _.chain(list).pullAllBy(values); - // $ExpectType LoDashExplicitWrapper> - _.chain(list).pullAllBy(values, 'a'); - // $ExpectType LoDashExplicitWrapper> - _.chain(list).pullAllBy(values, { a: 42 }); - // $ExpectType LoDashExplicitWrapper> - _.chain(list).pullAllBy(values, ['a', 42]); + _.chain(list).pullAllBy(); // $ExpectType LoDashExplicitWrapper> + _.chain(list).pullAllBy(values, "a"); // $ExpectType LoDashExplicitWrapper> // $ExpectType LoDashExplicitWrapper> _.chain(list).pullAllBy(values, (value) => { value; // $ExpectType AbcObject return 0; }); + fp.pullAllBy("a", values, array); // $ExpectType AbcObject[] + fp.pullAllBy({ a: 42 }, values, array); // $ExpectType AbcObject[] + fp.pullAllBy(["a", 42], values, array); // $ExpectType AbcObject[] + fp.pullAllBy((value: AbcObject) => true, values, array); // $ExpectType AbcObject[] + fp.pullAllBy((value: AbcObject) => true)(values, array); // $ExpectType AbcObject[] + fp.pullAllBy((value: AbcObject) => true, values)(array); // $ExpectType AbcObject[] + fp.pullAllBy((value: AbcObject) => true)(values)(array); // $ExpectType AbcObject[] + fp.pullAllBy("a", values, list); // $ExpectType ArrayLike + fp.pullAllBy({ a: 42 }, values, list); // $ExpectType ArrayLike + fp.pullAllBy(["a", 42], values, list); // $ExpectType ArrayLike + fp.pullAllBy((value: AbcObject) => true, values, list); // $ExpectType ArrayLike + fp.pullAllBy((value: AbcObject) => true)(values, list); // $ExpectType ArrayLike + fp.pullAllBy((value: AbcObject) => true, values)(list); // $ExpectType ArrayLike + fp.pullAllBy((value: AbcObject) => true)(values)(list); // $ExpectType ArrayLike + interface T1 { a: string; b: string; @@ -1990,45 +1037,36 @@ namespace TestPullAt { a: string; b: number; } - const t1: T1 = { a: 'a', b: 'b' }; - const t2: T2 = { a: 'a', b: 1 }; + const t1: T1 = { a: "a", b: "b" }; + const t2: T2 = { a: "a", b: 1 }; // $ExpectType T1[] - result = _.pullAllBy([t1], [t2], (value) => { + _.pullAllBy([t1], [t2], (value) => { value; // $ExpectType T1 | T2 return ""; }); // $ExpectType LoDashImplicitWrapper - result = _([t1]).pullAllBy([t2], (value) => { + _([t1]).pullAllBy([t2], (value) => { value; // $ExpectType T1 | T2 return ""; }); // $ExpectType LoDashExplicitWrapper - result = _.chain([t1]).pullAllBy([t2], (value) => { + _.chain([t1]).pullAllBy([t2], (value) => { value; // $ExpectType T1 | T2 return ""; }); -} -// _.pullAllWith -{ - let array: AbcObject[] = anything; - let list: _.List = anything; - let values: _.List = anything; + fp.pullAllBy((value: T1 | T2) => value.a, [t2], [t1]); // $ExpectType T1[] + fp.pullAllBy((value: T1 | T2) => value.a)([t2])([t1]); // $ExpectType (T1 | T2)[] - // $ExpectType AbcObject[] - _.pullAllWith(array); - // $ExpectType AbcObject[] - _.pullAllWith(array, values); + _.pullAllWith(array); // $ExpectType AbcObject[] + _.pullAllWith(array, values); // $ExpectType AbcObject[] // $ExpectType AbcObject[] _.pullAllWith(array, values, (a, b) => { a; // $ExpectType AbcObject b; // $ExpectType AbcObject return true; }); - // $ExpectType ArrayLike - _.pullAllWith(list); - // $ExpectType ArrayLike - _.pullAllWith(list, values); + _.pullAllWith(list); // $ExpectType ArrayLike // $ExpectType ArrayLike _.pullAllWith(list, values, (a, b) => { a; // $ExpectType AbcObject @@ -2036,20 +1074,15 @@ namespace TestPullAt { return true; }); - // $ExpectType LoDashImplicitWrapper - _(array).pullAllWith(); - // $ExpectType LoDashImplicitWrapper - _(array).pullAllWith(values); + _(array).pullAllWith(); // $ExpectType LoDashImplicitWrapper + _(array).pullAllWith(values); // $ExpectType LoDashImplicitWrapper // $ExpectType LoDashImplicitWrapper _(array).pullAllWith(values, (a, b) => { a; // $ExpectType AbcObject b; // $ExpectType AbcObject return true; }); - // $ExpectType LoDashImplicitWrapper> - _(list).pullAllWith(); - // $ExpectType LoDashImplicitWrapper> - _(list).pullAllWith(values); + _(list).pullAllWith(); // $ExpectType LoDashImplicitWrapper> // $ExpectType LoDashImplicitWrapper> _(list).pullAllWith(values, (a, b) => { a; // $ExpectType AbcObject @@ -2057,20 +1090,15 @@ namespace TestPullAt { return true; }); - // $ExpectType LoDashExplicitWrapper - _.chain(array).pullAllWith(); - // $ExpectType LoDashExplicitWrapper - _.chain(array).pullAllWith(values); + _.chain(array).pullAllWith(); // $ExpectType LoDashExplicitWrapper + _.chain(array).pullAllWith(values); // $ExpectType LoDashExplicitWrapper // $ExpectType LoDashExplicitWrapper _.chain(array).pullAllWith(values, (a, b) => { a; // $ExpectType AbcObject b; // $ExpectType AbcObject return true; }); - // $ExpectType LoDashExplicitWrapper> - _.chain(list).pullAllWith(); - // $ExpectType LoDashExplicitWrapper> - _.chain(list).pullAllWith(values); + _.chain(list).pullAllWith(); // $ExpectType LoDashExplicitWrapper> // $ExpectType LoDashExplicitWrapper> _.chain(list).pullAllWith(values, (a, b) => { a; // $ExpectType AbcObject @@ -2078,1703 +1106,5200 @@ namespace TestPullAt { return true; }); - interface T1 { - a: string; - b: string; - } - interface T2 { - a: string; - b: number; - } - const t1: T1 = { a: 'a', b: 'b' }; - const t2: T2 = { a: 'a', b: 1 }; + fp.pullAllWith((a, b) => true, values, array); // $ExpectType AbcObject[] + fp.pullAllWith((a: AbcObject, b: AbcObject) => true)(values, array); // $ExpectType AbcObject[] + fp.pullAllWith((a, b) => true, values, list); // $ExpectType ArrayLike + fp.pullAllWith((a: AbcObject, b: AbcObject) => true)(values, list); // $ExpectType ArrayLike + // $ExpectType T1[] - result = _.pullAllWith([t1], [t2], (a, b) => { + _.pullAllWith([t1], [t2], (a, b) => { a; // $ExpectType T1 b; // $ExpectType T2 return true; }); // $ExpectType LoDashImplicitWrapper - result = _([t1]).pullAllWith([t2], (a, b) => { + _([t1]).pullAllWith([t2], (a, b) => { a; // $ExpectType T1 b; // $ExpectType T2 return true; }); // $ExpectType LoDashExplicitWrapper - result = _.chain([t1]).pullAllWith([t2], (a, b) => { + _.chain([t1]).pullAllWith([t2], (a, b) => { a; // $ExpectType T1 b; // $ExpectType T2 return true; }); + + fp.pullAllWith((a, b) => a.a === b.a, [t2], [t1]); // $ExpectType T1[] + fp.pullAllWith((a: T1, b: T2) => a.a === b.a)([t2], [t1]); // $ExpectType T1[] } // _.remove -namespace TestRemove { - let array: AbcObject[] = []; - let list: _.List = []; - let predicateFn = (value: AbcObject, index: number, collection: _.List) => true; +{ + const list: _.List = []; + const predicateFn = (value: AbcObject, index: number, collection: _.List) => true; - { - let result: AbcObject[]; + _.remove(list); // $ExpectType AbcObject[] + _.remove(list, predicateFn); // $ExpectType AbcObject[] + _.remove(list, ""); // $ExpectType AbcObject[] + _.remove(list, { a: 42 }); // $ExpectType AbcObject[] - result = _.remove(array); - result = _.remove(array, predicateFn); - result = _.remove(array, ''); - result = _.remove(array, {a: 42}); + _(list).remove(); // $ExpectType LoDashImplicitWrapper + _(list).remove(predicateFn); // $ExpectType LoDashImplicitWrapper + _(list).remove(""); // $ExpectType LoDashImplicitWrapper + _(list).remove({ a: 42 }); // $ExpectType LoDashImplicitWrapper - result = _.remove(list); - result = _.remove(list, predicateFn); - result = _.remove(list, ''); - result = _.remove(list, {a: 42}); - } + _.chain(list).remove(); // $ExpectType LoDashExplicitWrapper + _.chain(list).remove(predicateFn); // $ExpectType LoDashExplicitWrapper + _.chain(list).remove(""); // $ExpectType LoDashExplicitWrapper + _.chain(list).remove({ a: 42 }); // $ExpectType LoDashExplicitWrapper - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).remove(); - result = _(array).remove(predicateFn); - result = _(array).remove(''); - result = _(array).remove({a: 42}); - - result = _(list).remove(); - result = _(list).remove(predicateFn); - result = _(list).remove(''); - result = _(list).remove({a: 42}); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().remove(); - result = _(array).chain().remove(predicateFn); - result = _(array).chain().remove(''); - result = _(array).chain().remove({a: 42}); - - result = _(list).chain().remove(); - result = _(list).chain().remove(predicateFn); - result = _(list).chain().remove(''); - result = _(list).chain().remove({a: 42}); - } + const predicateFn2 = (value: AbcObject) => true; + fp.remove(predicateFn2, list); // $ExpectType AbcObject[] + fp.remove(predicateFn2)(list); // $ExpectType AbcObject[] + fp.remove("", list); // $ExpectType AbcObject[] + fp.remove({ a: 42 }, list); // $ExpectType AbcObject[] } // _.tail -namespace TestTail { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; +{ + const list: _.List | null | undefined = anything; - { - let result: AbcObject[]; - - result = _.tail(array); - result = _.tail(list); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).tail(); - result = _(list).tail(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().tail(); - result = _(list).chain().tail(); - } + _.tail(list); // $ExpectType AbcObject[] + _(list).tail(); // $ExpectType LoDashImplicitWrapper + _.chain(list).tail(); // $ExpectType LoDashExplicitWrapper + fp.tail(list); // $ExpectType AbcObject[] } // _.slice -namespace TestSlice { - let array: AbcObject[] | null | undefined = [] as any; +{ + const array: AbcObject[] | null | undefined = anything; - { - let result: AbcObject[]; - - result = _.slice(array); - result = _.slice(array, 42); - result = _.slice(array, 42, 42); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).slice(); - result = _(array).slice(42); - result = _(array).slice(42, 42); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().slice(); - result = _(array).chain().slice(42); - result = _(array).chain().slice(42, 42); - } -} - -// _.sortedIndex -namespace TestSortedIndex { - type SampleType = {a: number; b: string; c: boolean;}; - - let array: SampleType[] = []; - let list: _.List = []; - - let value: SampleType = { a: 1, b: "", c: true }; - - let stringIterator: (x: string) => number; - let arrayIterator: (x: SampleType) => number; - let listIterator: (x: SampleType) => number; - - { - let result: number; - - result = _.sortedIndex('', ''); - - result = _.sortedIndex(array, value); - - result = _.sortedIndex(list, value); - - result = _('').sortedIndex(''); - - result = _(array).sortedIndex(value); - - result = _(list).sortedIndex(value); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('').chain().sortedIndex(''); - - result = _(array).chain().sortedIndex(value); - - result = _(list).chain().sortedIndex(value); - } + _.slice(array); // $ExpectType AbcObject[] + _.slice(array, 42); // $ExpectType AbcObject[] + _.slice(array, 42, 42); // $ExpectType AbcObject[] + _(array).slice(); // $ExpectType LoDashImplicitWrapper + _(array).slice(42, 42); // $ExpectType LoDashImplicitWrapper + _.chain(array).slice(); // $ExpectType LoDashExplicitWrapper + _.chain(array).slice(42, 42); // $ExpectType LoDashExplicitWrapper + fp.slice(0, 10, array); // $ExpectType AbcObject[] + fp.slice(0)(10, array); // $ExpectType AbcObject[] + fp.slice(0)(10)(array); // $ExpectType AbcObject[] } // _.sortedIndexBy -namespace TestSortedIndexBy { - type SampleType = {a: number; b: string; c: boolean;}; - - let array: SampleType[] = []; - let list: _.List = []; - - let value: SampleType = { a: 1, b: "", c: true }; - - let stringIterator = (x: string) => 0; - let arrayIterator = (x: SampleType) => 0; - let listIterator = (x: SampleType) => 0; - - { - let result: number; - - result = _.sortedIndexBy('', '', stringIterator); - - result = _.sortedIndexBy(array, value, arrayIterator); - result = _.sortedIndexBy(array, value, ''); - result = _.sortedIndexBy(array, value, {a: 42}); - - result = _.sortedIndexBy(list, value, listIterator); - result = _.sortedIndexBy(list, value, ''); - result = _.sortedIndexBy(list, value, {a: 42}); - - result = _('').sortedIndexBy('', stringIterator); - - result = _(array).sortedIndexBy(value, arrayIterator); - result = _(array).sortedIndexBy(value, ''); - result = _(array).sortedIndexBy(value, {a: 42}); - - result = _(list).sortedIndexBy(value, listIterator); - result = _(list).sortedIndexBy(value, ''); - result = _(list).sortedIndexBy(value, {a: 42}); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('').chain().sortedIndexBy('', stringIterator); - - result = _(array).chain().sortedIndexBy(value, arrayIterator); - result = _(array).chain().sortedIndexBy(value, ''); - result = _(array).chain().sortedIndexBy(value, {a: 42}); - - result = _(list).chain().sortedIndexBy(value, listIterator); - result = _(list).chain().sortedIndexBy(value, ''); - result = _(list).chain().sortedIndexBy(value, {a: 42}); - } -} - -// _.sortedLastIndex -namespace TestSortedLastIndex { - type SampleType = {a: number; b: string; c: boolean;}; - - let array: SampleType[] = []; - let list: _.List = []; - - let value: SampleType = { a: 1, b: "", c: true }; - - let stringIterator: (x: string) => number; - let arrayIterator: (x: SampleType) => number; - let listIterator: (x: SampleType) => number; - - { - let result: number; - - result = _.sortedLastIndex('', ''); - - result = _.sortedLastIndex(array, value); - - result = _.sortedLastIndex(list, value); - - result = _('').sortedLastIndex(''); - - result = _(array).sortedLastIndex(value); - - result = _(list).sortedLastIndex(value); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('').chain().sortedLastIndex(''); - - result = _(array).chain().sortedLastIndex(value); - - result = _(list).chain().sortedLastIndex(value); - } -} - // _.sortedLastIndexBy -namespace TestSortedLastIndexBy { - type SampleType = {a: number; b: string; c: boolean;}; +{ + const list: _.List | null | undefined = anything; + const value: AbcObject = { a: 1, b: "", c: true }; + const listIterator = (value: AbcObject) => 0; - let array: SampleType[] = []; - let list: _.List = []; + _.sortedIndexBy(list, value, listIterator); // $ExpectType number + _.sortedIndexBy(list, value, ""); // $ExpectType number + _.sortedIndexBy(list, value, { a: 42 }); // $ExpectType number + _(list).sortedIndexBy(value, listIterator); // $ExpectType number + _(list).sortedIndexBy(value, ""); // $ExpectType number + _(list).sortedIndexBy(value, { a: 42 }); // $ExpectType number + _.chain(list).sortedIndexBy(value, listIterator); // $ExpectType LoDashExplicitWrapper + _.chain(list).sortedIndexBy(value, ""); // $ExpectType LoDashExplicitWrapper + _.chain(list).sortedIndexBy(value, { a: 42 }); // $ExpectType LoDashExplicitWrapper + fp.sortedIndexBy(listIterator, value, list); // $ExpectType number + fp.sortedIndexBy(listIterator)(value)(list); // $ExpectType number + fp.sortedIndexBy("a", value, list); // $ExpectType number + fp.sortedIndexBy({ a: 42 }, value, list); // $ExpectType number - let value: SampleType = { a: 1, b: "", c: true }; + _.sortedLastIndexBy(list, value, listIterator); // $ExpectType number + _.sortedLastIndexBy(list, value, ""); // $ExpectType number + _.sortedLastIndexBy(list, value, { a: 42 }); // $ExpectType number + _(list).sortedLastIndexBy(value, listIterator); // $ExpectType number + _(list).sortedLastIndexBy(value, ""); // $ExpectType number + _(list).sortedLastIndexBy(value, { a: 42 }); // $ExpectType number + _.chain(list).sortedLastIndexBy(value, listIterator); // $ExpectType LoDashExplicitWrapper + _.chain(list).sortedLastIndexBy(value, ""); // $ExpectType LoDashExplicitWrapper + _.chain(list).sortedLastIndexBy(value, { a: 42 }); // $ExpectType LoDashExplicitWrapper + fp.sortedLastIndexBy(listIterator, value, list); // $ExpectType number + fp.sortedLastIndexBy(listIterator)(value)(list); // $ExpectType number + fp.sortedLastIndexBy("a", value, list); // $ExpectType number + fp.sortedLastIndexBy({ a: 42 }, value, list); // $ExpectType number +} - let stringIterator = (x: string) => 0; - let arrayIterator = (x: SampleType) => 0; - let listIterator = (x: SampleType) => 0; +// _.sortedIndex +// _.sortedLastIndex +{ + const list: _.List | null | undefined = anything; + const value: AbcObject = { a: 1, b: "", c: true }; - { - let result: number; + _.sortedIndex(list, value); // $ExpectType number + _(list).sortedIndex(value); // $ExpectType number + _.chain(list).sortedIndex(value); // $ExpectType LoDashExplicitWrapper + fp.sortedIndex(value, list); // $ExpectType number + fp.sortedIndex(value)(list); // $ExpectType number - result = _.sortedLastIndexBy('', '', stringIterator); - - result = _.sortedLastIndexBy(array, value, arrayIterator); - result = _.sortedLastIndexBy(array, value, ''); - result = _.sortedLastIndexBy(array, value, {a: 42}); - - result = _.sortedLastIndexBy(list, value, listIterator); - result = _.sortedLastIndexBy(list, value, ''); - result = _.sortedLastIndexBy(list, value, {a: 42}); - - result = _('').sortedLastIndexBy('', stringIterator); - - result = _(array).sortedLastIndexBy(value, arrayIterator); - result = _(array).sortedLastIndexBy(value, ''); - result = _(array).sortedLastIndexBy(value, {a: 42}); - - result = _(list).sortedLastIndexBy(value, listIterator); - result = _(list).sortedLastIndexBy(value, ''); - result = _(list).sortedLastIndexBy(value, {a: 42}); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('').chain().sortedLastIndexBy('', stringIterator); - - result = _(array).chain().sortedLastIndexBy(value, arrayIterator); - result = _(array).chain().sortedLastIndexBy(value, ''); - result = _(array).chain().sortedLastIndexBy(value, {a: 42}); - - result = _(list).chain().sortedLastIndexBy(value, listIterator); - result = _(list).chain().sortedLastIndexBy(value, ''); - result = _(list).chain().sortedLastIndexBy(value, {a: 42}); - } + _.sortedLastIndex(list, value); // $ExpectType number + _(list).sortedLastIndex(value); // $ExpectType number + _.chain(list).sortedLastIndex(value); // $ExpectType LoDashExplicitWrapper + fp.sortedLastIndex(value, list); // $ExpectType number + fp.sortedLastIndex(value)(list); // $ExpectType number } // _.take -namespace TestTake { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - - { - let result: AbcObject[]; - - result = _.take(array); - result = _.take(array, 42); - - result = _.take(list); - result = _.take(list, 42); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).take(); - result = _(array).take(42); - - result = _(list).take(); - result = _(list).take(42); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().take(); - result = _(array).chain().take(42); - - result = _(list).chain().take(); - result = _(list).chain().take(42); - } -} - // _.takeRight -namespace TestTakeRight { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; +{ + const list: _.List | null | undefined = anything; - { - let result: AbcObject[]; + _.take(list); // $ExpectType AbcObject[] + _.take(list, 42); // $ExpectType AbcObject[] + _(list).take(); // $ExpectType LoDashImplicitWrapper + _(list).take(42); // $ExpectType LoDashImplicitWrapper + _.chain(list).take(); // $ExpectType LoDashExplicitWrapper + _.chain(list).take(42); // $ExpectType LoDashExplicitWrapper + fp.take(42, list); // $ExpectType AbcObject[] + fp.take(42)(list); // $ExpectType AbcObject[] - result = _.takeRight(array); - result = _.takeRight(array, 42); - - result = _.takeRight(list); - result = _.takeRight(list, 42); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).takeRight(); - result = _(array).takeRight(42); - - result = _(list).takeRight(); - result = _(list).takeRight(42); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().takeRight(); - result = _(array).chain().takeRight(42); - - result = _(list).chain().takeRight(); - result = _(list).chain().takeRight(42); - } -} - -// _.takeRightWhile -namespace TestTakeRightWhile { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let predicateFn = (value: AbcObject, index: number, collection: _.List) => true; - - { - let result: AbcObject[]; - - result = _.takeRightWhile(array); - result = _.takeRightWhile(array, predicateFn); - result = _.takeRightWhile(array, ''); - result = _.takeRightWhile(array, {a: 42}); - - result = _.takeRightWhile(list); - result = _.takeRightWhile(list, predicateFn); - result = _.takeRightWhile(list, ''); - result = _.takeRightWhile(list, {a: 42}); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).takeRightWhile(); - result = _(array).takeRightWhile(predicateFn); - result = _(array).takeRightWhile(''); - result = _(array).takeRightWhile({a: 42}); - - result = _(list).takeRightWhile(); - result = _(list).takeRightWhile(predicateFn); - result = _(list).takeRightWhile(''); - result = _(list).takeRightWhile({a: 42}); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().takeRightWhile(); - result = _(array).chain().takeRightWhile(predicateFn); - result = _(array).chain().takeRightWhile(''); - result = _(array).chain().takeRightWhile({a: 42}); - - result = _(list).chain().takeRightWhile(); - result = _(list).chain().takeRightWhile(predicateFn); - result = _(list).chain().takeRightWhile(''); - result = _(list).chain().takeRightWhile({a: 42}); - } + _.takeRight(list); // $ExpectType AbcObject[] + _.takeRight(list, 42); // $ExpectType AbcObject[] + _(list).takeRight(); // $ExpectType LoDashImplicitWrapper + _(list).takeRight(42); // $ExpectType LoDashImplicitWrapper + _.chain(list).takeRight(); // $ExpectType LoDashExplicitWrapper + _.chain(list).takeRight(42); // $ExpectType LoDashExplicitWrapper + fp.takeRight(42, list); // $ExpectType AbcObject[] + fp.takeRight(42)(list); // $ExpectType AbcObject[] } // _.takeWhile -namespace TestTakeWhile { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let predicateFn = (value: AbcObject, index: number, collection: _.List) => true; +// _.takeRightWhile +{ + const list: _.List | null | undefined = anything; + const predicateFn = (value: AbcObject, index: number, collection: _.List) => true; + const predicateFn2 = (value: AbcObject) => true; - { - let result: AbcObject[]; + _.takeWhile(list); // $ExpectType AbcObject[] + _.takeWhile(list, predicateFn); // $ExpectType AbcObject[] + _.takeWhile(list, ""); // $ExpectType AbcObject[] + _.takeWhile(list, { a: 42 }); // $ExpectType AbcObject[] - result = _.takeWhile(array); - result = _.takeWhile(array, predicateFn); - result = _.takeWhile(array, ''); - result = _.takeWhile(array, {a: 42}); + _(list).takeWhile(); // $ExpectType LoDashImplicitWrapper + _(list).takeWhile(predicateFn); // $ExpectType LoDashImplicitWrapper + _(list).takeWhile(""); // $ExpectType LoDashImplicitWrapper + _(list).takeWhile({ a: 42 }); // $ExpectType LoDashImplicitWrapper - result = _.takeWhile(list); - result = _.takeWhile(list, predicateFn); - result = _.takeWhile(list, ''); - result = _.takeWhile(list, {a: 42}); - } + _.chain(list).takeWhile(); // $ExpectType LoDashExplicitWrapper + _.chain(list).takeWhile(predicateFn); // $ExpectType LoDashExplicitWrapper + _.chain(list).takeWhile(""); // $ExpectType LoDashExplicitWrapper + _.chain(list).takeWhile({ a: 42 }); // $ExpectType LoDashExplicitWrapper - { - let result: _.LoDashImplicitArrayWrapper; + fp.takeWhile(predicateFn2, list); // $ExpectType AbcObject[] + fp.takeWhile(predicateFn2)(list); // $ExpectType AbcObject[] + fp.takeWhile("a", list); // $ExpectType AbcObject[] + fp.takeWhile({ a: 42 }, list); // $ExpectType AbcObject[] - result = _(array).takeWhile(); - result = _(array).takeWhile(predicateFn); - result = _(array).takeWhile(''); - result = _(array).takeWhile({a: 42}); + _.takeRightWhile(list); // $ExpectType AbcObject[] + _.takeRightWhile(list, predicateFn); // $ExpectType AbcObject[] + _.takeRightWhile(list, ""); // $ExpectType AbcObject[] + _.takeRightWhile(list, { a: 42 }); // $ExpectType AbcObject[] - result = _(list).takeWhile(); - result = _(list).takeWhile(predicateFn); - result = _(list).takeWhile(''); - result = _(list).takeWhile({a: 42}); - } + _(list).takeRightWhile(); // $ExpectType LoDashImplicitWrapper + _(list).takeRightWhile(predicateFn); // $ExpectType LoDashImplicitWrapper + _(list).takeRightWhile(""); // $ExpectType LoDashImplicitWrapper + _(list).takeRightWhile({ a: 42 }); // $ExpectType LoDashImplicitWrapper - { - let result: _.LoDashExplicitArrayWrapper; + _.chain(list).takeRightWhile(); // $ExpectType LoDashExplicitWrapper + _.chain(list).takeRightWhile(predicateFn); // $ExpectType LoDashExplicitWrapper + _.chain(list).takeRightWhile(""); // $ExpectType LoDashExplicitWrapper + _.chain(list).takeRightWhile({ a: 42 }); // $ExpectType LoDashExplicitWrapper - result = _(array).chain().takeWhile(); - result = _(array).chain().takeWhile(predicateFn); - result = _(array).chain().takeWhile(''); - result = _(array).chain().takeWhile({a: 42}); - - result = _(list).chain().takeWhile(); - result = _(list).chain().takeWhile(predicateFn); - result = _(list).chain().takeWhile(''); - result = _(list).chain().takeWhile({a: 42}); - } + fp.takeRightWhile(predicateFn2, list); // $ExpectType AbcObject[] + fp.takeRightWhile(predicateFn2)(list); // $ExpectType AbcObject[] + fp.takeRightWhile("a", list); // $ExpectType AbcObject[] + fp.takeRightWhile({ a: 42 }, list); // $ExpectType AbcObject[] } // _.union -namespace TestUnion { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; +{ + const list: _.List | null | undefined = anything; - { - let result: AbcObject[]; + _.union(list); // $ExpectType AbcObject[] + _.union(list, list); // $ExpectType AbcObject[] + _.union(list, list, list); // $ExpectType AbcObject[] - result = _.union(); + _(list).union(); // $ExpectType LoDashImplicitWrapper + _(list).union(list); // $ExpectType LoDashImplicitWrapper + _(list).union(list, list); // $ExpectType LoDashImplicitWrapper - result = _.union(array); - result = _.union(array, list); - result = _.union(array, list, array); + _.chain(list).union(); // $ExpectType LoDashExplicitWrapper + _.chain(list).union(list); // $ExpectType LoDashExplicitWrapper + _.chain(list).union(list, list); // $ExpectType LoDashExplicitWrapper - result = _.union(list); - result = _.union(list, array); - result = _.union(list, array, list); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).union(); - result = _(array).union(list); - result = _(array).union(list, array); - - result = _(array).union(); - result = _(array).union(list); - result = _(array).union(list, array); - - result = _(list).union(); - result = _(list).union(array); - result = _(list).union(array, list); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().union(); - result = _(array).chain().union(list); - result = _(array).chain().union(list, array); - - result = _(array).chain().union(); - result = _(array).chain().union(list); - result = _(array).chain().union(list, array); - - result = _(list).chain().union(); - result = _(list).chain().union(array); - result = _(list).chain().union(array, list); - } + fp.union(list, list); // $ExpectType AbcObject[] + fp.union(list)(list); // $ExpectType AbcObject[] } // _.unionBy -namespace TestUnionBy { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let iteratee: (value: AbcObject) => any = (value: AbcObject) => 1; +{ + const list: _.List | null | undefined = anything; + const iteratee = (value: AbcObject) => 1; - { - let result: AbcObject[]; + _.unionBy(list, list); // $ExpectType AbcObject[] + _.unionBy(list, list, list, list, list, list); // $ExpectType AbcObject[] + _.unionBy(list, list, iteratee); // $ExpectType AbcObject[] + _.unionBy(list, list, list, list, list, list, iteratee); // $ExpectType AbcObject[] + _.unionBy(list, list, "a"); // $ExpectType AbcObject[] + // param needed for TS 2.3 + _.unionBy(list, list, list, list, list, list, "a"); // $ExpectType AbcObject[] + _.unionBy(list, list, {a: 1}); // $ExpectType AbcObject[] + _.unionBy(list, list, list, list, list, list, {a: 1}); // $ExpectType AbcObject[] - result = _.unionBy(array, array); - result = _.unionBy(array, list, array); - result = _.unionBy(array, array, list, array); - result = _.unionBy(array, list, array, list, array); - result = _.unionBy(array, array, list, array, list, array); + _(list).unionBy(list); // $ExpectType LoDashImplicitWrapper + _(list).unionBy(list, list, list, list, list); // $ExpectType LoDashImplicitWrapper + _(list).unionBy(list, iteratee); // $ExpectType LoDashImplicitWrapper + _(list).unionBy(list, list, list, list, list, iteratee); // $ExpectType LoDashImplicitWrapper + _(list).unionBy(list, "a"); // $ExpectType LoDashImplicitWrapper + // param needed for TS 2.3 + _(list).unionBy(list, list, list, list, list, "a"); // $ExpectType LoDashImplicitWrapper + _(list).unionBy(list, {a: 1}); // $ExpectType LoDashImplicitWrapper + _(list).unionBy(list, list, list, list, list, {a: 1}); // $ExpectType LoDashImplicitWrapper - result = _.unionBy(array, array, iteratee); - result = _.unionBy(array, list, array, iteratee); - result = _.unionBy(array, array, list, array, iteratee); - result = _.unionBy(array, list, array, list, array, iteratee); - result = _.unionBy(array, array, list, array, list, array, iteratee); + _.chain(list).unionBy(list); // $ExpectType LoDashExplicitWrapper + _.chain(list).unionBy(list, list, list, list, list); // $ExpectType LoDashExplicitWrapper + _.chain(list).unionBy(list, iteratee); // $ExpectType LoDashExplicitWrapper + _.chain(list).unionBy(list, list, list, list, list, iteratee); // $ExpectType LoDashExplicitWrapper + _.chain(list).unionBy(list, "a"); // $ExpectType LoDashExplicitWrapper + // param needed for TS 2.3 + _.chain(list).unionBy(list, list, list, list, list, "a"); // $ExpectType LoDashExplicitWrapper + _.chain(list).unionBy(list, {a: 1}); // $ExpectType LoDashExplicitWrapper + _.chain(list).unionBy(list, list, list, list, list, {a: 1}); // $ExpectType LoDashExplicitWrapper - result = _.unionBy(array, array, 'a'); - result = _.unionBy(array, list, array, 'a'); - result = _.unionBy(array, array, list, array, 'a'); - result = _.unionBy(array, list, array, list, array, 'a'); - result = _.unionBy(array, array, list, array, list, array, 'a'); - - result = _.unionBy(array, array, {a: 1}); - result = _.unionBy(array, list, array, {a: 1}); - result = _.unionBy(array, array, list, array, {a: 1}); - result = _.unionBy(array, list, array, list, array, {a: 1}); - result = _.unionBy(array, list, array, list, array, list, {a: 1}); - - result = _.unionBy(list, list); - result = _.unionBy(list, array, list); - result = _.unionBy(list, list, array, list); - result = _.unionBy(list, array, list, array, list); - result = _.unionBy(list, list, array, list, array, list); - - result = _.unionBy(list, list, iteratee); - result = _.unionBy(list, array, list, iteratee); - result = _.unionBy(list, list, array, list, iteratee); - result = _.unionBy(list, array, list, array, list, iteratee); - result = _.unionBy(list, list, array, list, array, list, iteratee); - - result = _.unionBy(list, list, 'a'); - result = _.unionBy(list, array, list, 'a'); - result = _.unionBy(list, list, array, list, 'a'); - result = _.unionBy(list, array, list, array, list, 'a'); - result = _.unionBy(list, list, array, list, array, list, 'a'); - - result = _.unionBy(list, list, {a: 1}); - result = _.unionBy(list, array, list, {a: 1}); - result = _.unionBy(list, list, array, list, {a: 1}); - result = _.unionBy(list, array, list, array, list, {a: 1}); - result = _.unionBy(list, array, list, array, list, array, {a: 1}); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).unionBy(array); - result = _(array).unionBy(list, array); - result = _(array).unionBy(array, list, array); - result = _(array).unionBy(list, array, list, array); - result = _(array).unionBy(array, list, array, list, array); - - result = _(array).unionBy(array, iteratee); - result = _(array).unionBy(list, array, iteratee); - result = _(array).unionBy(array, list, array, iteratee); - result = _(array).unionBy(list, array, list, array, iteratee); - result = _(array).unionBy(array, list, array, list, array, iteratee); - - result = _(array).unionBy(array, 'a'); - result = _(array).unionBy(list, array, 'a'); - result = _(array).unionBy(array, list, array, 'a'); - result = _(array).unionBy(list, array, list, array, 'a'); - result = _(array).unionBy(array, list, array, list, array, 'a'); - - result = _(array).unionBy(array, {a: 1}); - result = _(array).unionBy(list, array, {a: 1}); - result = _(array).unionBy(array, list, array, {a: 1}); - result = _(array).unionBy(list, array, list, array, {a: 1}); - result = _(array).unionBy(list, array, list, array, list, {a: 1}); - - result = _(list).unionBy(list); - result = _(list).unionBy(array, list); - result = _(list).unionBy(list, array, list); - result = _(list).unionBy(array, list, array, list); - result = _(list).unionBy(list, array, list, array, list); - - result = _(list).unionBy(list, iteratee); - result = _(list).unionBy(array, list, iteratee); - result = _(list).unionBy(list, array, list, iteratee); - result = _(list).unionBy(array, list, array, list, iteratee); - result = _(list).unionBy(list, array, list, array, list, iteratee); - - result = _(list).unionBy(list, 'a'); - result = _(list).unionBy(array, list, 'a'); - result = _(list).unionBy(list, array, list, 'a'); - result = _(list).unionBy(array, list, array, list, 'a'); - result = _(list).unionBy(list, array, list, array, list, 'a'); - - result = _(list).unionBy(list, {a: 1}); - result = _(list).unionBy(array, list, {a: 1}); - result = _(list).unionBy(list, array, list, {a: 1}); - result = _(list).unionBy(array, list, array, list, {a: 1}); - result = _(list).unionBy(array, list, array, list, array, {a: 1}); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().unionBy(array); - result = _(array).chain().unionBy(list, array); - result = _(array).chain().unionBy(array, list, array); - result = _(array).chain().unionBy(list, array, list, array); - result = _(array).chain().unionBy(array, list, array, list, array); - - result = _(array).chain().unionBy(array, iteratee); - result = _(array).chain().unionBy(list, array, iteratee); - result = _(array).chain().unionBy(array, list, array, iteratee); - result = _(array).chain().unionBy(list, array, list, array, iteratee); - result = _(array).chain().unionBy(array, list, array, list, array, iteratee); - - result = _(array).chain().unionBy(array, 'a'); - result = _(array).chain().unionBy(list, array, 'a'); - result = _(array).chain().unionBy(array, list, array, 'a'); - result = _(array).chain().unionBy(list, array, list, array, 'a'); - result = _(array).chain().unionBy(array, list, array, list, array, 'a'); - - result = _(array).chain().unionBy(array, {a: 1}); - result = _(array).chain().unionBy(list, array, {a: 1}); - result = _(array).chain().unionBy(array, list, array, {a: 1}); - result = _(array).chain().unionBy(list, array, list, array, {a: 1}); - result = _(array).chain().unionBy(list, array, list, array, list, {a: 1}); - - result = _(list).chain().unionBy(list); - result = _(list).chain().unionBy(array, list); - result = _(list).chain().unionBy(list, array, list); - result = _(list).chain().unionBy(array, list, array, list); - result = _(list).chain().unionBy(list, array, list, array, list); - - result = _(list).chain().unionBy(list, iteratee); - result = _(list).chain().unionBy(array, list, iteratee); - result = _(list).chain().unionBy(list, array, list, iteratee); - result = _(list).chain().unionBy(array, list, array, list, iteratee); - result = _(list).chain().unionBy(list, array, list, array, list, iteratee); - - result = _(list).chain().unionBy(list, 'a'); - result = _(list).chain().unionBy(array, list, 'a'); - result = _(list).chain().unionBy(list, array, list, 'a'); - result = _(list).chain().unionBy(array, list, array, list, 'a'); - result = _(list).chain().unionBy(list, array, list, array, list, 'a'); - - result = _(list).chain().unionBy(list, {a: 1}); - result = _(list).chain().unionBy(array, list, {a: 1}); - result = _(list).chain().unionBy(list, array, list, {a: 1}); - result = _(list).chain().unionBy(array, list, array, list, {a: 1}); - result = _(list).chain().unionBy(array, list, array, list, array, {a: 1}); - } + fp.unionBy(iteratee, list, list); // $ExpectType AbcObject[] + fp.unionBy(iteratee)(list)(list); // $ExpectType AbcObject[] + fp.unionBy("a", list, list); // $ExpectType AbcObject[] + fp.unionBy({ a: 1 }, list, list); // $ExpectType AbcObject[] } // _.uniq -namespace TestUniq { - type SampleObject = {a: number; b: string; c: boolean}; +// _.sortedUniq +{ + const list: _.List | null | undefined = anything; - let array: SampleObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + _.uniq("abc"); // $ExpectType string[] + _.uniq(list); // $ExpectType AbcObject[] + _(list).uniq(); // $ExpectType LoDashImplicitWrapper + _.chain(list).uniq(); // $ExpectType LoDashExplicitWrapper + fp.uniq("abc"); // $ExpectType string[] + fp.uniq(list); // $ExpectType AbcObject[] - { - let result: string[]; - result = _.uniq('abc'); - } - - { - let result: SampleObject[]; - - result = _.uniq(array); - result = _.uniq(list); - } - - { - let result: _.LoDashImplicitArrayWrapper; - result = _('abc').uniq(); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).uniq(); - result = _(list).uniq(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _('abc').chain().uniq(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().uniq(); - result = _(list).chain().uniq(); - } + _.sortedUniq("abc"); // $ExpectType string[] + _.sortedUniq(list); // $ExpectType AbcObject[] + _(list).sortedUniq(); // $ExpectType LoDashImplicitWrapper + _.chain(list).sortedUniq(); // $ExpectType LoDashExplicitWrapper + fp.sortedUniq("abc"); // $ExpectType string[] + fp.sortedUniq(list); // $ExpectType AbcObject[] } // _.uniqBy -namespace TestUniqBy { - type SampleObject = {a: number; b: string; c: boolean}; - - let array: SampleObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - - let stringIterator = (value: string, index: number, collection: string) => ""; - let listIterator = (value: SampleObject, index: number, collection: _.List) => 0; - - { - let result: string[]; - - result = _.uniqBy('abc', stringIterator); - } - - { - let result: SampleObject[]; - - result = _.uniqBy(array, listIterator); - result = _.uniqBy(array, 'a'); - result = _.uniqBy(array, {a: 42}); - - result = _.uniqBy(list, listIterator); - result = _.uniqBy(list, 'a'); - result = _.uniqBy(list, {a: 42}); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _('abc').uniqBy(stringIterator); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).uniqBy(listIterator); - result = _(array).uniqBy('a'); - result = _(array).uniqBy({a: 42}); - - result = _(list).uniqBy(listIterator); - result = _(list).uniqBy('a'); - result = _(list).uniqBy({a: 42}); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _('abc').chain().uniqBy(stringIterator); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().uniqBy(listIterator); - result = _(array).chain().uniqBy('a'); - result = _(array).chain().uniqBy({a: 42}); - - result = _(list).chain().uniqBy(listIterator); - result = _(list).chain().uniqBy('a'); - result = _(list).chain().uniqBy({a: 42}); - } -} - -// _.sortedUniq -namespace TestSortedUniq { - type SampleObject = {a: number; b: string; c: boolean}; - - let array: SampleObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - - { - let result: string[]; - result = _.sortedUniq('abc'); - } - - { - let result: SampleObject[]; - result = _.sortedUniq(array); - result = _.sortedUniq(list); - } - - { - let result: _.LoDashImplicitArrayWrapper; - result = _('abc').sortedUniq(); - } - - { - let result: _.LoDashImplicitArrayWrapper; - result = _(array).sortedUniq(); - result = _(list).sortedUniq(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - result = _('abc').chain().sortedUniq(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - result = _(array).chain().sortedUniq(); - result = _(list).chain().sortedUniq(); - } -} - // _.sortedUniqBy -namespace TestSortedUniqBy { - type SampleObject = {a: number; b: string; c: boolean}; +{ + const list: _.List | null | undefined = anything; + const stringIterator = (value: string, index: number, collection: string) => ""; + const listIterator = (value: AbcObject, index: number, collection: _.List) => 0; + const stringIterator2 = (value: string) => ""; + const listIterator2 = (value: AbcObject) => 0; - let array: SampleObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + _.uniqBy("abc", stringIterator); // $ExpectType string[] + _.uniqBy(list, listIterator); // $ExpectType AbcObject[] + _.uniqBy(list, "a"); // $ExpectType AbcObject[] + _(list).uniqBy(listIterator); // $ExpectType LoDashImplicitWrapper + _(list).uniqBy("a"); // $ExpectType LoDashImplicitWrapper + _.chain(list).uniqBy(listIterator); // $ExpectType LoDashExplicitWrapper + _.chain(list).uniqBy("a"); // $ExpectType LoDashExplicitWrapper - let stringIterator = (value: string, index: number, collection: string) => ""; - let listIterator = (value: SampleObject, index: number, collection: _.List) => 0; + fp.uniqBy(stringIterator2, "abc"); // $ExpectType string[] + fp.uniqBy(listIterator2, list); // $ExpectType AbcObject[] + fp.uniqBy(listIterator2)(list); // $ExpectType AbcObject[] + fp.uniqBy("a", list); // $ExpectType AbcObject[] - { - let result: string[]; + _.sortedUniqBy("abc", stringIterator); // $ExpectType string[] + _.sortedUniqBy(list, listIterator); // $ExpectType AbcObject[] + _.sortedUniqBy(list, "a"); // $ExpectType AbcObject[] + _(list).sortedUniqBy(listIterator); // $ExpectType LoDashImplicitWrapper + _(list).sortedUniqBy("a"); // $ExpectType LoDashImplicitWrapper + _.chain(list).sortedUniqBy(listIterator); // $ExpectType LoDashExplicitWrapper + _.chain(list).sortedUniqBy("a"); // $ExpectType LoDashExplicitWrapper - result = _.sortedUniqBy('abc', stringIterator); - } - - { - let result: SampleObject[]; - - result = _.sortedUniqBy(array, listIterator); - result = _.sortedUniqBy(array, 'a'); - result = _.sortedUniqBy(array, {a: 42}); - - result = _.sortedUniqBy(list, listIterator); - result = _.sortedUniqBy(list, 'a'); - result = _.sortedUniqBy(list, {a: 42}); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _('abc').sortedUniqBy(stringIterator); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).sortedUniqBy(listIterator); - result = _(array).sortedUniqBy('a'); - result = _(array).sortedUniqBy({a: 42}); - - result = _(list).sortedUniqBy(listIterator); - result = _(list).sortedUniqBy('a'); - result = _(list).sortedUniqBy({a: 42}); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _('abc').chain().sortedUniqBy(stringIterator); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().sortedUniqBy(listIterator); - result = _(array).chain().sortedUniqBy('a'); - result = _(array).chain().sortedUniqBy({a: 42}); - - result = _(list).chain().sortedUniqBy(listIterator); - result = _(list).chain().sortedUniqBy('a'); - result = _(list).chain().sortedUniqBy({a: 42}); - } + fp.sortedUniqBy(stringIterator2, "abc"); // $ExpectType string[] + fp.sortedUniqBy(listIterator2, list); // $ExpectType AbcObject[] + fp.sortedUniqBy(listIterator2)(list); // $ExpectType AbcObject[] + fp.sortedUniqBy("a", list); // $ExpectType AbcObject[] } // _.unzip -namespace TestUnzip { - let array = [['a', 'b'], [1, 2], [true, false]]; +{ + const list: _.List<_.List> | null | undefined = anything; - let list: _.List<_.List> = { - 0: {0: 'a', 1: 'b', length: 2}, - 1: {0: 1, 1: 2, length: 2}, - 2: {0: true, 1: false, length: 2}, - length: 3 - }; - let nilArray: AbcObject[][] | null | undefined = [] as any; - let nilList: _.List<_.List> | null | undefined = [] as any; - - { - let result: AbcObject[][]; - - result = _.unzip(nilArray); - result = _.unzip(nilList); - } - - { - let result: Array>; - - result = _.unzip(array); - result = _.unzip(list); - } - - { - let result: _.LoDashImplicitArrayWrapper>; - - result = _(array).unzip(); - result = _(list).unzip(); - } - - { - let result: _.LoDashExplicitArrayWrapper>; - - result = _(array).chain().unzip(); - result = _(list).chain().unzip(); - } + _.unzip(list); // $ExpectType AbcObject[][] + _(list).unzip(); // $ExpectType LoDashImplicitWrapper + _.chain(list).unzip(); // $ExpectType LoDashExplicitWrapper + fp.unzip(list); // $ExpectType AbcObject[][] } // _.unzipWith { - let testUnzipWithArray: Array> | null | undefined = [] as any; - let testUnzipWithList: _.List> | null | undefined = [] as any; + const list: _.List<_.List> | null | undefined = anything; - { - _.unzipWith(testUnzipWithArray); // $ExpectType number[][] - _.unzipWith(testUnzipWithList); // $ExpectType number[][] - _(testUnzipWithArray).unzipWith(); // $ExpectType LoDashImplicitWrapper - _(testUnzipWithList).unzipWith(); // $ExpectType LoDashImplicitWrapper - _.chain(testUnzipWithArray).unzipWith(); // $ExpectType LoDashExplicitWrapper - _.chain(testUnzipWithList).unzipWith(); // $ExpectType LoDashExplicitWrapper - } + _.unzipWith(list); // $ExpectType AbcObject[][] + // $ExpectType number[] + _.unzipWith(list, (...group) => { + group; // $ExpectType AbcObject[] + return 1; + }); + // $ExpectType boolean[] + _.unzipWith(list, (value1, value2, value3) => { + value1; // $ExpectType AbcObject + value2; // $ExpectType AbcObject + value3; // $ExpectType AbcObject + return true; + }); + _(list).unzipWith(); // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper + _(list).unzipWith((...group) => { + group; // $ExpectType AbcObject[] + return 1; + }); + _.chain(list).unzipWith(); // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper + _.chain(list).unzipWith((...group) => { + group; // $ExpectType AbcObject[] + return 1; + }); - { - let result: AbcObject[]; - result = _.unzipWith(testUnzipWithArray, (...group) => { - group; // $ExpectType number[] - return anything as AbcObject; - }); - result = _.unzipWith(testUnzipWithArray, (value1, value2, value3) => { - value1; // $ExpectType number - value2; // $ExpectType number - value3; // $ExpectType number - return anything as AbcObject; - }); - result = _.unzipWith(testUnzipWithList, (...group) => { - group; // $ExpectType number[] - return anything as AbcObject; - }); - result = _.unzipWith(testUnzipWithList, (value1, value2, value3) => { - value1; // $ExpectType number - value2; // $ExpectType number - value3; // $ExpectType number - return anything as AbcObject; - }); - - result = _(testUnzipWithArray).unzipWith((...group): AbcObject => { - group; // $ExpectType number[] - return anything as AbcObject; - }).value(); - result = _(testUnzipWithArray).unzipWith((value1, value2, value3) => { - value1; // $ExpectType number - value2; // $ExpectType number - value3; // $ExpectType number - return anything as AbcObject; - }).value(); - result = _(testUnzipWithList).unzipWith((...group): AbcObject => { - group; // $ExpectType number[] - return anything as AbcObject; - }).value(); - result = _(testUnzipWithList).unzipWith((value1, value2, value3) => { - value1; // $ExpectType number - value2; // $ExpectType number - value3; // $ExpectType number - return anything as AbcObject; - }).value(); - } + fp.unzipWith((...group: AbcObject[]) => 1, list); // $ExpectType number[] + fp.unzipWith((...group: AbcObject[]) => 1)(list); // $ExpectType number[] } // _.without -namespace TestWithout { - let array: number[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; +{ + const list: _.List | null | undefined = anything; - { - let result: number[]; + _.without(list); // $ExpectType number[] + _.without(list, 1); // $ExpectType number[] + _.without(list, 1, 2, 3); // $ExpectType number[] - result = _.without(array); - result = _.without(array, 1); - result = _.without(array, 1, 2); - result = _.without(array, 1, 2, 3); + _(list).without(); // $ExpectType LoDashImplicitWrapper + _(list).without(1); // $ExpectType LoDashImplicitWrapper + _(list).without(1, 2, 3); // $ExpectType LoDashImplicitWrapper - result = _.without(list); - result = _.without(list, 1); - result = _.without(list, 1, 2); - result = _.without(list, 1, 2, 3); - } + _.chain(list).without(); // $ExpectType LoDashExplicitWrapper + _.chain(list).without(1); // $ExpectType LoDashExplicitWrapper + _.chain(list).without(1, 2, 3); // $ExpectType LoDashExplicitWrapper - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).without(); - result = _(array).without(1); - result = _(array).without(1, 2); - result = _(array).without(1, 2, 3); - result = _(list).without(); - result = _(list).without(1); - result = _(list).without(1, 2); - result = _(list).without(1, 2, 3); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().without(); - result = _(array).chain().without(1); - result = _(array).chain().without(1, 2); - result = _(array).chain().without(1, 2, 3); - - result = _(list).chain().without(); - result = _(list).chain().without(1); - result = _(list).chain().without(1, 2); - result = _(list).chain().without(1, 2, 3); - } + fp.without([1, 2], list); + fp.without([1, 2])(list); } // _.xor -namespace TestXor { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; +{ + const list: _.List | null | undefined = anything; - { - let result: AbcObject[]; + _.xor(list); // $ExpectType AbcObject[] + _.xor(list, list); // $ExpectType AbcObject[] + _.xor(list, list, list); // $ExpectType AbcObject[] - result = _.xor(); + _(list).xor(); // $ExpectType LoDashImplicitWrapper + _(list).xor(list); // $ExpectType LoDashImplicitWrapper + _(list).xor(list, list); // $ExpectType LoDashImplicitWrapper - result = _.xor(array); - result = _.xor(array, list); - result = _.xor(array, list, array); + _.chain(list).xor(); // $ExpectType LoDashExplicitWrapper + _.chain(list).xor(list); // $ExpectType LoDashExplicitWrapper + _.chain(list).xor(list, list); // $ExpectType LoDashExplicitWrapper - result = _.xor(list); - result = _.xor(list, array); - result = _.xor(list, array, list); - } + fp.xor(list, list); // $ExpectType AbcObject[] + fp.xor(list)(list); // $ExpectType AbcObject[] +} - { - let result: _.LoDashImplicitArrayWrapper; +// _.xorBy +{ + const list: _.List | null | undefined = anything; + const iteratee = (value: AbcObject) => 1; - result = _(array).xor(); - result = _(array).xor(list); - result = _(array).xor(list, array); + _.xorBy(list, list); // $ExpectType AbcObject[] + _.xorBy(list, list, list, list, list, list); // $ExpectType AbcObject[] + _.xorBy(list, list, iteratee); // $ExpectType AbcObject[] + _.xorBy(list, list, list, list, list, list, iteratee); // $ExpectType AbcObject[] + _.xorBy(list, list, "a"); // $ExpectType AbcObject[] + // param needed for TS 2.3 + _.xorBy(list, list, list, list, list, list, "a"); // $ExpectType AbcObject[] + _.xorBy(list, list, {a: 1}); // $ExpectType AbcObject[] + _.xorBy(list, list, list, list, list, list, {a: 1}); // $ExpectType AbcObject[] - result = _(list).xor(); - result = _(list).xor(array); - result = _(list).xor(array, list); - } + _(list).xorBy(list); // $ExpectType LoDashImplicitWrapper + _(list).xorBy(list, list, list, list, list); // $ExpectType LoDashImplicitWrapper + _(list).xorBy(list, iteratee); // $ExpectType LoDashImplicitWrapper + _(list).xorBy(list, list, list, list, list, iteratee); // $ExpectType LoDashImplicitWrapper + _(list).xorBy(list, "a"); // $ExpectType LoDashImplicitWrapper + // param needed for TS 2.3 + _(list).xorBy(list, list, list, list, list, "a"); // $ExpectType LoDashImplicitWrapper + _(list).xorBy(list, {a: 1}); // $ExpectType LoDashImplicitWrapper + _(list).xorBy(list, list, list, list, list, {a: 1}); // $ExpectType LoDashImplicitWrapper - { - let result: _.LoDashExplicitArrayWrapper; + _.chain(list).xorBy(list); // $ExpectType LoDashExplicitWrapper + _.chain(list).xorBy(list, list, list, list, list); // $ExpectType LoDashExplicitWrapper + _.chain(list).xorBy(list, iteratee); // $ExpectType LoDashExplicitWrapper + _.chain(list).xorBy(list, list, list, list, list, iteratee); // $ExpectType LoDashExplicitWrapper + _.chain(list).xorBy(list, "a"); // $ExpectType LoDashExplicitWrapper + // param needed for TS 2.3 + _.chain(list).xorBy(list, list, list, list, list, "a"); // $ExpectType LoDashExplicitWrapper + _.chain(list).xorBy(list, {a: 1}); // $ExpectType LoDashExplicitWrapper + _.chain(list).xorBy(list, list, list, list, list, {a: 1}); // $ExpectType LoDashExplicitWrapper - result = _(array).chain().xor(); - result = _(array).chain().xor(list); - result = _(array).chain().xor(list, array); - - result = _(list).chain().xor(); - result = _(list).chain().xor(array); - result = _(list).chain().xor(array, list); - } + fp.xorBy(iteratee, list, list); // $ExpectType AbcObject[] + fp.xorBy(iteratee)(list)(list); // $ExpectType AbcObject[] + fp.xorBy("a", list, list); // $ExpectType AbcObject[] + fp.xorBy({ a: 1 }, list, list); // $ExpectType AbcObject[] } // _.zip { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; + const list: _.List | null | undefined = anything; - { - // $ExpectType (AbcObject | undefined)[][] - _.zip(array); - // $ExpectType (AbcObject | undefined)[][] - _.zip(array, list); - // $ExpectType (AbcObject | undefined)[][] - _.zip(array, list, array); + _.zip(list); // $ExpectType (AbcObject | undefined)[][] + _.zip(list, list); // $ExpectType (AbcObject | undefined)[][] + _.zip(list, list, list, list, list, list); // $ExpectType (AbcObject | undefined)[][] + _.zip([1, 2], [3, 4]); // $ExpectType [number | undefined, number | undefined][] + _.zip([1, 2], ["a", "b"]); // $ExpectType [number | undefined, string | undefined][] + _.zip([1, 2], ["a", "b"], [true, false]); // $ExpectType [number | undefined, string | undefined, boolean | undefined][] - // $ExpectType (AbcObject | undefined)[][] - _.zip(list); - // $ExpectType (AbcObject | undefined)[][] - _.zip(list, array); - // $ExpectType (AbcObject | undefined)[][] - _.zip(list, array, list); + _(list).zip(list); // $ExpectType LoDashImplicitWrapper<(AbcObject | undefined)[][]> + _(list).zip(list, list, list, list, list); // $ExpectType LoDashImplicitWrapper<(AbcObject | undefined)[][]> - // $ExpectType (AbcObject | undefined)[][] - _.zip(list, array, list, array, list, array); - } + _.chain(list).zip(list); // $ExpectType LoDashExplicitWrapper<(AbcObject | undefined)[][]> + _.chain(list).zip(list, list, list, list, list); // $ExpectType LoDashExplicitWrapper<(AbcObject | undefined)[][]> - { - // $ExpectType LoDashImplicitWrapper<(AbcObject | undefined)[][]> - _(array).zip(list); - // $ExpectType LoDashImplicitWrapper<(AbcObject | undefined)[][]> - _(array).zip(list, array); - - // $ExpectType LoDashImplicitWrapper<(AbcObject | undefined)[][]> - _(list).zip(array); - // $ExpectType LoDashImplicitWrapper<(AbcObject | undefined)[][]> - _(list).zip(array, list); - } - - { - // $ExpectType LoDashExplicitWrapper<(AbcObject | undefined)[][]> - _(array).chain().zip(list); - // $ExpectType LoDashExplicitWrapper<(AbcObject | undefined)[][]> - _(array).chain().zip(list, array); - - // $ExpectType LoDashExplicitWrapper<(AbcObject | undefined)[][]> - _(list).chain().zip(array); - // $ExpectType LoDashExplicitWrapper<(AbcObject | undefined)[][]> - _(list).chain().zip(array, list); - } - - { - _.zip([1, 2], [3, 4]); // $ExpectType [number | undefined, number | undefined][] - _.zip([1, 2], ["a", "b"]); // $ExpectType [number | undefined, string | undefined][] - _.zip([1, 2], ["a", "b"], [true, false]); // $ExpectType [number | undefined, string | undefined, boolean | undefined][] - } + const list2: _.List = anything; + fp.zip(list2, list2); // $ExpectType [AbcObject | undefined, AbcObject | undefined][] + fp.zip(list2)(list2); // $ExpectType [AbcObject | undefined, AbcObject | undefined][] + fp.zip(["a", "b"], [1, 2]); // $ExpectType [string | undefined, number | undefined][] + fp.zipAll([list2, list2, list2]); // $ExpectType (AbcObject | undefined)[][] + fp.zipAll([[1, 2], ["a", "b"], [true, false]]); // $ExpectType (string | number | boolean | undefined)[][] } // _.zipObject -namespace TestZipObject { - const zipObjectResult = _.zipObject(['a', 'b'], [1, 2]); - const zipObjectDeepResult = _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); +// _.zipObjectDeep +{ + const listOfKeys: _.List = anything; + const listOfValues: _.List = anything; - let arrayOfKeys: string[] = []; - let arrayOfValues: number[] = []; + _.zipObject(["a", "b"], [1, 2]); // $ExpectType Dictionary + _.zipObject(listOfKeys, listOfValues); // $ExpectType Dictionary + _(listOfKeys).zipObject(listOfValues); // $ExpectType LoDashImplicitWrapper> + _.chain(listOfKeys).zipObject(listOfValues); // $ExpectType LoDashExplicitWrapper> + fp.zipObject(["a", "b"], [1, 2]); // $ExpectType Dictionary + fp.zipObject(listOfKeys)(listOfValues); // $ExpectType Dictionary - let listOfKeys: _.List = []; - let listOfValues: _.List = []; - - { - let result: _.Dictionary; - - result = _.zipObject(arrayOfKeys); - result = _.zipObject(listOfKeys); - } - - { - let result: _.Dictionary; - - result = _.zipObject(arrayOfKeys, arrayOfValues); - result = _.zipObject(arrayOfKeys, listOfValues); - result = _.zipObject(listOfKeys, listOfValues); - result = _.zipObject(listOfKeys, arrayOfValues); - - result = _.zipObject(arrayOfKeys, arrayOfValues); - result = _.zipObject(arrayOfKeys, listOfValues); - result = _.zipObject(listOfKeys, listOfValues); - result = _.zipObject(listOfKeys, arrayOfValues); - } - - { - let result: _.Dictionary; - - result = _.zipObject(arrayOfKeys); - result = _.zipObjectDeep(arrayOfKeys); - result = _.zipObject(arrayOfKeys, arrayOfValues); - result = _.zipObjectDeep(arrayOfKeys, arrayOfValues); - result = _.zipObject(arrayOfKeys, listOfValues); - result = _.zipObjectDeep(arrayOfKeys, listOfValues); - - result = _.zipObject(listOfKeys); - result = _.zipObjectDeep(listOfKeys); - result = _.zipObject(listOfKeys, listOfValues); - result = _.zipObjectDeep(listOfKeys, listOfValues); - result = _.zipObject(listOfKeys, arrayOfValues); - result = _.zipObjectDeep(listOfKeys, arrayOfValues); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _(arrayOfKeys).zipObject(); - result = _(listOfKeys).zipObject(); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _(arrayOfKeys).zipObject(arrayOfValues); - result = _(arrayOfKeys).zipObject(listOfValues); - result = _(listOfKeys).zipObject(listOfValues); - result = _(listOfKeys).zipObject(arrayOfValues); - - result = _(arrayOfKeys).zipObject(arrayOfValues); - result = _(arrayOfKeys).zipObject(listOfValues); - result = _(listOfKeys).zipObject(listOfValues); - result = _(listOfKeys).zipObject(arrayOfValues); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _(arrayOfKeys).zipObject(); - result = _(arrayOfKeys).zipObjectDeep(); - result = _(arrayOfKeys).zipObject(arrayOfValues); - result = _(arrayOfKeys).zipObjectDeep(arrayOfValues); - result = _(arrayOfKeys).zipObject(listOfValues); - result = _(arrayOfKeys).zipObjectDeep(listOfValues); - - result = _(listOfKeys).zipObject(); - result = _(listOfKeys).zipObjectDeep(); - result = _(listOfKeys).zipObject(listOfValues); - result = _(listOfKeys).zipObjectDeep(listOfValues); - result = _(listOfKeys).zipObject(arrayOfValues); - result = _(listOfKeys).zipObjectDeep(arrayOfValues); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _(arrayOfKeys).chain().zipObject(); - result = _(listOfKeys).chain().zipObject(); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _(arrayOfKeys).chain().zipObject(arrayOfValues); - result = _(arrayOfKeys).chain().zipObject(listOfValues); - result = _(listOfKeys).chain().zipObject(listOfValues); - result = _(listOfKeys).chain().zipObject(arrayOfValues); - - result = _(arrayOfKeys).chain().zipObject(arrayOfValues); - result = _(arrayOfKeys).chain().zipObject(listOfValues); - result = _(listOfKeys).chain().zipObject(listOfValues); - result = _(listOfKeys).chain().zipObject(arrayOfValues); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _(arrayOfKeys).chain().zipObject(); - result = _(arrayOfKeys).chain().zipObjectDeep(); - result = _(arrayOfKeys).chain().zipObject(arrayOfValues); - result = _(arrayOfKeys).chain().zipObjectDeep(arrayOfValues); - result = _(arrayOfKeys).chain().zipObject(listOfValues); - result = _(arrayOfKeys).chain().zipObjectDeep(listOfValues); - - result = _(listOfKeys).chain().zipObject(); - result = _(listOfKeys).chain().zipObjectDeep(); - result = _(listOfKeys).chain().zipObject(listOfValues); - result = _(listOfKeys).chain().zipObjectDeep(listOfValues); - result = _(listOfKeys).chain().zipObject(arrayOfValues); - result = _(listOfKeys).chain().zipObjectDeep(arrayOfValues); - } + _.zipObjectDeep(["a.b[0].c", "a.b[1].d"], [1, 2]); // $ExpectType object + _.zipObjectDeep(listOfKeys, listOfValues); // $ExpectType object + _(listOfKeys).zipObjectDeep(listOfValues); // $ExpectType LoDashImplicitWrapper + _.chain(listOfKeys).zipObjectDeep(listOfValues); // $ExpectType LoDashExplicitWrapper + fp.zipObjectDeep(["a.b[0].c", "a.b[1].d"], [1, 2]); // $ExpectType object + fp.zipObjectDeep(listOfKeys)(listOfValues); // $ExpectType object } // _.zipWith { - type TestZipWithFn = (a1: number, a2: number) => number; + // $ExpectType string[] + _.zipWith([1, 2], (value1) => { + value1; // $ExpectType number + return ""; + }); + // $ExpectType string[] + _.zipWith([1, 2], [1, 2], (value1, value2) => { + value1; // $ExpectType number + value2; // $ExpectType number + return ""; + }); + // $ExpectType string[] + _.zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], (value1, value2, value3, value4, value5, value6) => { + value1; // $ExpectType number + value2; // $ExpectType number + value3; // $ExpectType number + value4; // $ExpectType number + value5; // $ExpectType number + value6; // $ExpectType number + return ""; + }); + // $ExpectType string[] + _.zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], (...group) => { + group; // $ExpectType number[] + return ""; + }); + // $ExpectType string[] + _.zipWith([1, 2], ["a", "b"], [true, false], (value1, value2, value3) => { + value1; // $ExpectType number + value2; // $ExpectType string + value3; // $ExpectType boolean + return ""; + }); + + const values = [[1, 2], [1, 2], [1, 2]]; + _.zipWith(...values, (...group: number[]) => ""); // $ExpectType string[] + + // $ExpectType LoDashImplicitWrapper + _([1, 2]).zipWith((value1) => { + value1; // $ExpectType number + return ""; + }); + // $ExpectType LoDashImplicitWrapper + _([1, 2]).zipWith([1, 2], (value1, value2) => { + value1; // $ExpectType number + value2; // $ExpectType number + return ""; + }); + // $ExpectType LoDashImplicitWrapper + _([1, 2]).zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], (...group) => { + group; // $ExpectType number[] + return ""; + }); + // $ExpectType LoDashImplicitWrapper + _([1, 2]).zipWith(["a", "b"], [true, false], (value1, value2, value3) => { + value1; // $ExpectType number + value2; // $ExpectType string + value3; // $ExpectType boolean + return ""; + }); + + // $ExpectType LoDashExplicitWrapper + _.chain([1, 2]).zipWith((value1) => { + value1; // $ExpectType number + return ""; + }); + // $ExpectType LoDashExplicitWrapper + _.chain([1, 2]).zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], (...group) => { + group; // $ExpectType number[] + return ""; + }); + // $ExpectType LoDashExplicitWrapper + _.chain([1, 2]).zipWith(["a", "b"], [true, false], (value1, value2, value3) => { + value1; // $ExpectType number + value2; // $ExpectType string + value3; // $ExpectType boolean + return ""; + }); + + fp.zipWith((value1, value2) => "a", [1, 2], [1, 2]); // $ExpectType string[] + fp.zipWith((value1: number, value2: number) => "a")([1, 2])([1, 2]); // $ExpectType string[] +} + +/************** + * Collection * + **************/ + +// _.at +{ + const list: _.List | null | undefined = anything; + const dictionary: _.Dictionary | null | undefined = anything; + const numericDictionary: _.NumericDictionary | null | undefined = anything; + const abcObject: AbcObject | null | undefined = anything; + + _.at(list, 0, "1", [2], ["3"], [4, "5"]); // $ExpectType AbcObject[] + _.at(numericDictionary, 0, "1", [2], ["3"], [4, "5"]); // $ExpectType AbcObject[] + _.at(dictionary, "a", ["b", "c"]); // $ExpectType AbcObject[] + _.at(abcObject, "a", ["b", "c"]); // $ExpectType (string | number | boolean)[] + + _(list).at(0, "1", [2], ["3"], [4, "5"]); // $ExpectType LoDashImplicitWrapper + _(numericDictionary).at(0, "1", [2], ["3"], [4, "5"]); // $ExpectType LoDashImplicitWrapper + _(dictionary).at("a", ["b", "c"]); // $ExpectType LoDashImplicitWrapper + _(abcObject).at("a", ["b", "c"]); // $ExpectType LoDashImplicitWrapper<(string | number | boolean)[]> + + _.chain(list).at(0, "1", [2], ["3"], [4, "5"]); // $ExpectType LoDashExplicitWrapper + _.chain(numericDictionary).at(0, "1", [2], ["3"], [4, "5"]); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).at("a", ["b", "c"]); // $ExpectType LoDashExplicitWrapper + _.chain(abcObject).at("a", ["b", "c"]); // $ExpectType LoDashExplicitWrapper<(string | number | boolean)[]> + + fp.at(0, list); // $ExpectType AbcObject[] + fp.at(0)(list); // $ExpectType AbcObject[] + fp.at([0, "1"], list); // $ExpectType AbcObject[] + fp.at("a", abcObject); // $ExpectType (string | number | boolean)[] +} + +// _.countBy +{ + const list: _.List | null | undefined = anything; + const dictionary: _.Dictionary | null | undefined = anything; + const numericDictionary: _.NumericDictionary | null | undefined = anything; + + const stringIterator = (value: string, index: number, collection: string) => 1; + const listIterator = (value: AbcObject, index: number, collection: _.List) => 1; + const dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => 1; + const numericDictionaryIterator = (value: AbcObject, key: string, collection: _.NumericDictionary) => 1; + + _.countBy(""); // $ExpectType Dictionary + _.countBy("", stringIterator); // $ExpectType Dictionary + + _.countBy(list); // $ExpectType Dictionary + _.countBy(list, listIterator); // $ExpectType Dictionary + _.countBy(list, ""); // $ExpectType Dictionary + _.countBy(list, { a: 42 }); // $ExpectType Dictionary + + _.countBy(dictionary); // $ExpectType Dictionary + _.countBy(dictionary, dictionaryIterator); // $ExpectType Dictionary + _.countBy(dictionary, ""); // $ExpectType Dictionary + _.countBy(dictionary, { a: 42 }); // $ExpectType Dictionary + + _.countBy(numericDictionary); // $ExpectType Dictionary + _.countBy(numericDictionary, numericDictionaryIterator); // $ExpectType Dictionary + _.countBy(numericDictionary, ""); // $ExpectType Dictionary + _.countBy(numericDictionary, { a: 42 }); // $ExpectType Dictionary + + _("").countBy(); // $ExpectType LoDashImplicitWrapper> + _("").countBy(stringIterator); // $ExpectType LoDashImplicitWrapper> + + _(list).countBy(); // $ExpectType LoDashImplicitWrapper> + _(list).countBy(listIterator); // $ExpectType LoDashImplicitWrapper> + _(list).countBy(""); // $ExpectType LoDashImplicitWrapper> + _(list).countBy({ a: 42 }); // $ExpectType LoDashImplicitWrapper> + + _(dictionary).countBy(); // $ExpectType LoDashImplicitWrapper> + _(dictionary).countBy(dictionaryIterator); // $ExpectType LoDashImplicitWrapper> + _(dictionary).countBy(""); // $ExpectType LoDashImplicitWrapper> + _(dictionary).countBy({ a: 42 }); // $ExpectType LoDashImplicitWrapper> + + _(numericDictionary).countBy(); // $ExpectType LoDashImplicitWrapper> + _(numericDictionary).countBy(numericDictionaryIterator); // $ExpectType LoDashImplicitWrapper> + _(numericDictionary).countBy(""); // $ExpectType LoDashImplicitWrapper> + _(numericDictionary).countBy({ a: 42 }); // $ExpectType LoDashImplicitWrapper> + + _.chain("").countBy(); // $ExpectType LoDashExplicitWrapper> + _.chain("").countBy(stringIterator); // $ExpectType LoDashExplicitWrapper> + + _.chain(list).countBy(); // $ExpectType LoDashExplicitWrapper> + _.chain(list).countBy(listIterator); // $ExpectType LoDashExplicitWrapper> + _.chain(list).countBy(""); // $ExpectType LoDashExplicitWrapper> + _.chain(list).countBy({ a: 42 }); // $ExpectType LoDashExplicitWrapper> + + _.chain(dictionary).countBy(); // $ExpectType LoDashExplicitWrapper> + _.chain(dictionary).countBy(dictionaryIterator); // $ExpectType LoDashExplicitWrapper> + _.chain(dictionary).countBy(""); // $ExpectType LoDashExplicitWrapper> + _.chain(dictionary).countBy({ a: 42 }); // $ExpectType LoDashExplicitWrapper> + + _.chain(numericDictionary).countBy(); // $ExpectType LoDashExplicitWrapper> + _.chain(numericDictionary).countBy(numericDictionaryIterator); // $ExpectType LoDashExplicitWrapper> + _.chain(numericDictionary).countBy(""); // $ExpectType LoDashExplicitWrapper> + _.chain(numericDictionary).countBy({ a: 42 }); // $ExpectType LoDashExplicitWrapper> + + const stringIterator2 = (value: string) => 1; + const listIterator2 = (value: AbcObject) => 1; + fp.countBy(stringIterator2, ""); // $ExpectType Dictionary + fp.countBy(stringIterator2)(""); // $ExpectType Dictionary + fp.countBy(listIterator2, list); // $ExpectType Dictionary + fp.countBy("", list); // $ExpectType Dictionary + fp.countBy({ a: 42 }, list); // $ExpectType Dictionary + fp.countBy(listIterator2, dictionary); // $ExpectType Dictionary + fp.countBy({ a: 42 }, dictionary); // $ExpectType Dictionary + fp.countBy(listIterator2, numericDictionary); // $ExpectType Dictionary + fp.countBy({ a: 42 }, numericDictionary); // $ExpectType Dictionary +} + +// _.every +{ + const list: _.List | null | undefined = anything; + const dictionary: _.Dictionary | null | undefined = anything; + const numericDictionary: _.NumericDictionary | null | undefined = anything; + + const listIterator = (value: AbcObject, index: number, collection: _.List) => true; + const dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => true; + const numericDictionaryIterator = (value: AbcObject, key: string, collection: _.NumericDictionary) => true; + const valueIterator = (value: AbcObject) => true; + + _.every(list); // $ExpectType boolean + _.every(list, listIterator); // $ExpectType boolean + _.every(list, "a"); // $ExpectType boolean + _.every(list, ["a", 42]); // $ExpectType boolean + _.every(list, { a: 42 }); // $ExpectType boolean + + _.every(dictionary); // $ExpectType boolean + _.every(dictionary, dictionaryIterator); // $ExpectType boolean + _.every(dictionary, "a"); // $ExpectType boolean + _.every(dictionary, ["a", 42]); // $ExpectType boolean + _.every(dictionary, { a: 42 }); // $ExpectType boolean + + _.every(numericDictionary); // $ExpectType boolean + _.every(numericDictionary, numericDictionaryIterator); // $ExpectType boolean + _.every(numericDictionary, "a"); // $ExpectType boolean + _.every(numericDictionary, ["a", 42]); // $ExpectType boolean + _.every(numericDictionary, { a: 42 }); // $ExpectType boolean + + _(list).every(); // $ExpectType boolean + _(list).every(listIterator); // $ExpectType boolean + _(list).every("a"); // $ExpectType boolean + _(list).every(["a", 42]); // $ExpectType boolean + _(list).every({ a: 42 }); // $ExpectType boolean + + _(dictionary).every(); // $ExpectType boolean + _(dictionary).every(dictionaryIterator); // $ExpectType boolean + _(dictionary).every("a"); // $ExpectType boolean + _(dictionary).every(["a", 42]); // $ExpectType boolean + _(dictionary).every({ a: 42 }); // $ExpectType boolean + + _(numericDictionary).every(); // $ExpectType boolean + _(numericDictionary).every(numericDictionaryIterator); // $ExpectType boolean + _(numericDictionary).every("a"); // $ExpectType boolean + _(numericDictionary).every(["a", 42]); // $ExpectType boolean + _(numericDictionary).every({ a: 42 }); // $ExpectType boolean + + _.chain(list).every(); // $ExpectType LoDashExplicitWrapper + _.chain(list).every(listIterator); // $ExpectType LoDashExplicitWrapper + _.chain(list).every("a"); // $ExpectType LoDashExplicitWrapper + _.chain(list).every(["a", 42]); // $ExpectType LoDashExplicitWrapper + _.chain(list).every({ a: 42 }); // $ExpectType LoDashExplicitWrapper + + _.chain(dictionary).every(); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).every(dictionaryIterator); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).every("a"); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).every(["a", 42]); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).every({ a: 42 }); // $ExpectType LoDashExplicitWrapper + + _.chain(numericDictionary).every(); // $ExpectType LoDashExplicitWrapper + _.chain(numericDictionary).every(numericDictionaryIterator); // $ExpectType LoDashExplicitWrapper + _.chain(numericDictionary).every("a"); // $ExpectType LoDashExplicitWrapper + _.chain(numericDictionary).every(["a", 42]); // $ExpectType LoDashExplicitWrapper + _.chain(numericDictionary).every({ a: 42 }); // $ExpectType LoDashExplicitWrapper + + fp.every(valueIterator, list); // $ExpectType boolean + fp.every("a")(list); // $ExpectType boolean + fp.every({ a: 42 }, list); // $ExpectType boolean + fp.every(["a", 42], list); // $ExpectType boolean + + fp.every(valueIterator, dictionary); // $ExpectType boolean + fp.every("a")(dictionary); // $ExpectType boolean + fp.every({ a: 42 })(dictionary); // $ExpectType boolean + fp.every(["a", 42])(dictionary); // $ExpectType boolean + + fp.every(valueIterator, numericDictionary); // $ExpectType boolean + fp.every("a")(numericDictionary); // $ExpectType boolean + fp.every({ a: 42 })(numericDictionary); // $ExpectType boolean + fp.every(["a", 42])(numericDictionary); // $ExpectType boolean +} + +// _.filter +{ + const list: _.List | null | undefined = anything; + const dictionary: _.Dictionary | null | undefined = anything; + + const stringIterator = (char: string, index: number, string: string) => true; + const listIterator = (value: AbcObject, index: number, collection: _.List) => true; + const dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => true; + const valueIterator = (value: AbcObject) => true; + + _.filter("", stringIterator); // $ExpectType string[] + _.filter(list, listIterator); // $ExpectType AbcObject[] + _.filter(list, ""); // $ExpectType AbcObject[] + _.filter(list, { a: 42 }); // $ExpectType AbcObject[] + _.filter(list, ["a", 42]); // $ExpectType AbcObject[] + _.filter(dictionary, dictionaryIterator); // $ExpectType AbcObject[] + _.filter(dictionary, ""); // $ExpectType AbcObject[] + _.filter(dictionary, { a: 42 }); // $ExpectType AbcObject[] + _.filter(dictionary, ["a", 42]); // $ExpectType AbcObject[] + + _("").filter(stringIterator); // $ExpectType LoDashImplicitWrapper + _(list).filter(listIterator); // $ExpectType LoDashImplicitWrapper + _(list).filter(""); // $ExpectType LoDashImplicitWrapper + _(list).filter({ a: 42 }); // $ExpectType LoDashImplicitWrapper + _(list).filter(["a", 42]); // $ExpectType LoDashImplicitWrapper + _(dictionary).filter(dictionaryIterator); // $ExpectType LoDashImplicitWrapper + _(dictionary).filter(""); // $ExpectType LoDashImplicitWrapper + _(dictionary).filter({ a: 42 }); // $ExpectType LoDashImplicitWrapper + _(dictionary).filter(["a", 42]); // $ExpectType LoDashImplicitWrapper + + _.chain("").filter(stringIterator); // $ExpectType LoDashExplicitWrapper + _.chain(list).filter(listIterator); // $ExpectType LoDashExplicitWrapper + _.chain(list).filter(""); // $ExpectType LoDashExplicitWrapper + _.chain(list).filter({ a: 42 }); // $ExpectType LoDashExplicitWrapper + _.chain(list).filter(["a", 42]); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).filter(dictionaryIterator); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).filter(""); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).filter({ a: 42 }); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).filter(["a", 42]); // $ExpectType LoDashExplicitWrapper + + fp.filter(valueIterator, list); // $ExpectType AbcObject[] + fp.filter(valueIterator)(list); // $ExpectType AbcObject[] + fp.filter("", list); // $ExpectType AbcObject[] + fp.filter({ a: 42 }, list); // $ExpectType AbcObject[] + fp.filter(["a", 42], list); // $ExpectType AbcObject[] + fp.filter(valueIterator, dictionary); // $ExpectType AbcObject[] + fp.filter("", dictionary); // $ExpectType AbcObject[] + fp.filter({ a: 42 }, dictionary); // $ExpectType AbcObject[] + fp.filter(["a", 42], dictionary); // $ExpectType AbcObject[] + + // Test filtering with type guard + const a2: Array | null | undefined = anything; + const d2: _.Dictionary | null | undefined = anything; + + _.filter(a2, (item: string | number): item is number => typeof item === "number"); // $ExpectType number[] + _.filter(d2, (item: string | number): item is number => typeof item === "number"); // $ExpectType number[] + + _(a2).filter((item: string | number): item is number => typeof item === "number"); // $ExpectType LoDashImplicitWrapper + _(d2).filter((item: string | number): item is number => typeof item === "number"); // $ExpectType LoDashImplicitWrapper + + _.chain(a2).filter((item: string | number): item is number => typeof item === "number"); // $ExpectType LoDashExplicitWrapper + _.chain(d2).filter((item: string | number): item is number => typeof item === "number"); // $ExpectType LoDashExplicitWrapper + + fp.filter((item: string | number): item is number => typeof item === "number", a2); // $ExpectType number[] + fp.filter((item: string | number): item is number => typeof item === "number", d2); // $ExpectType number[] +} + +// _.find +// _.findLast +{ + const list: _.List | null | undefined = anything; + const dictionary: _.Dictionary | null | undefined = anything; + + const listIterator = (value: AbcObject, index: number, collection: _.List) => true; + const dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => true; + const valueIterator = (value: AbcObject) => true; + + _.find(list); // $ExpectType AbcObject | undefined + _.find(list, listIterator); // $ExpectType AbcObject | undefined + _.find(list, listIterator, 1); // $ExpectType AbcObject | undefined + _.find(list, "a"); // $ExpectType AbcObject | undefined + _.find(list, "a", 1); // $ExpectType AbcObject | undefined + _.find(list, { a: 42 }); // $ExpectType AbcObject | undefined + _.find(list, { a: 42 }, 1); // $ExpectType AbcObject | undefined + _.find(list, ["a", 5]); // $ExpectType AbcObject | undefined + _.find(list, ["a", 5], 1); // $ExpectType AbcObject | undefined + _.find(dictionary); // $ExpectType AbcObject | undefined + _.find(dictionary, dictionaryIterator); // $ExpectType AbcObject | undefined + _.find(dictionary, dictionaryIterator, 1); // $ExpectType AbcObject | undefined + _.find(dictionary, "a"); // $ExpectType AbcObject | undefined + _.find(dictionary, { a: 42 }); // $ExpectType AbcObject | undefined + _.find(dictionary, ["a", 5]); // $ExpectType AbcObject | undefined + _.find([anything as AbcObject, null, undefined], (value: AbcObject | null | undefined): value is AbcObject | undefined => value !== null); // $ExpectType AbcObject | undefined + + _(list).find(); // $ExpectType AbcObject | undefined + _(list).find(listIterator); // $ExpectType AbcObject | undefined + _(list).find(listIterator, 1); // $ExpectType AbcObject | undefined + _(list).find("a"); // $ExpectType AbcObject | undefined + _(list).find({ a: 42 }); // $ExpectType AbcObject | undefined + _(list).find(["a", 5]); // $ExpectType AbcObject | undefined + _(dictionary).find(); // $ExpectType AbcObject | undefined + _(dictionary).find(dictionaryIterator); // $ExpectType AbcObject | undefined + _(dictionary).find(dictionaryIterator, 1); // $ExpectType AbcObject | undefined + _(dictionary).find("a"); // $ExpectType AbcObject | undefined + _(dictionary).find({ a: 42 }); // $ExpectType AbcObject | undefined + _(dictionary).find(["a", 5]); // $ExpectType AbcObject | undefined + _([anything as AbcObject, null, undefined]).find((value: AbcObject | null | undefined): value is AbcObject | undefined => value !== null); // $ExpectType AbcObject | undefined + + _.chain(list).find(); // $ExpectType LoDashExplicitWrapper + _.chain(list).find(listIterator); // $ExpectType LoDashExplicitWrapper + _.chain(list).find(listIterator, 1); // $ExpectType LoDashExplicitWrapper + _.chain(list).find("a"); // $ExpectType LoDashExplicitWrapper + _.chain(list).find({ a: 42 }); // $ExpectType LoDashExplicitWrapper + _.chain(list).find(["a", 5]); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).find(); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).find(dictionaryIterator); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).find(dictionaryIterator, 1); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).find(""); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).find({ a: 42 }); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).find(["a", 5]); // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper + _.chain([anything as AbcObject, null, undefined]).find((value: AbcObject | null | undefined): value is AbcObject | undefined => value !== null); + + fp.find(valueIterator, list); // $ExpectType AbcObject | undefined + fp.find(valueIterator)(list); // $ExpectType AbcObject | undefined + fp.find("a", list); // $ExpectType AbcObject | undefined + fp.find({ a: 42 }, list); // $ExpectType AbcObject | undefined + fp.find(["a", 42], list); // $ExpectType AbcObject | undefined + fp.find(valueIterator, dictionary); // $ExpectType AbcObject | undefined + fp.find(valueIterator)(dictionary); // $ExpectType AbcObject | undefined + fp.find({ a: 42 }, dictionary); // $ExpectType AbcObject | undefined + fp.find(["a", 42], dictionary); // $ExpectType AbcObject | undefined + fp.find((value: AbcObject | null | undefined): value is AbcObject | undefined => value !== null, [anything as AbcObject, null, undefined]); // $ExpectType AbcObject | undefined + fp.findFrom(valueIterator, 1, list); // $ExpectType AbcObject | undefined + fp.findFrom(valueIterator)(1)(list); // $ExpectType AbcObject | undefined + + _.findLast(list); // $ExpectType AbcObject | undefined + _.findLast(list, listIterator); // $ExpectType AbcObject | undefined + _.findLast(list, listIterator, 1); // $ExpectType AbcObject | undefined + _.findLast(list, "a"); // $ExpectType AbcObject | undefined + _.findLast(list, "a", 1); // $ExpectType AbcObject | undefined + _.findLast(list, { a: 42 }); // $ExpectType AbcObject | undefined + _.findLast(list, { a: 42 }, 1); // $ExpectType AbcObject | undefined + _.findLast(list, ["a", 5]); // $ExpectType AbcObject | undefined + _.findLast(list, ["a", 5], 1); // $ExpectType AbcObject | undefined + _.findLast(dictionary); // $ExpectType AbcObject | undefined + _.findLast(dictionary, dictionaryIterator); // $ExpectType AbcObject | undefined + _.findLast(dictionary, dictionaryIterator, 1); // $ExpectType AbcObject | undefined + _.findLast(dictionary, "a"); // $ExpectType AbcObject | undefined + _.findLast(dictionary, { a: 42 }); // $ExpectType AbcObject | undefined + _.findLast(dictionary, ["a", 5]); // $ExpectType AbcObject | undefined + _.findLast([anything as AbcObject, null, undefined], (value: AbcObject | null | undefined): value is AbcObject | undefined => value !== null); // $ExpectType AbcObject | undefined + + _(list).findLast(); // $ExpectType AbcObject | undefined + _(list).findLast(listIterator); // $ExpectType AbcObject | undefined + _(list).findLast(listIterator, 1); // $ExpectType AbcObject | undefined + _(list).findLast("a"); // $ExpectType AbcObject | undefined + _(list).findLast({ a: 42 }); // $ExpectType AbcObject | undefined + _(list).findLast(["a", 5]); // $ExpectType AbcObject | undefined + _(dictionary).findLast(); // $ExpectType AbcObject | undefined + _(dictionary).findLast(dictionaryIterator); // $ExpectType AbcObject | undefined + _(dictionary).findLast(dictionaryIterator, 1); // $ExpectType AbcObject | undefined + _(dictionary).findLast("a"); // $ExpectType AbcObject | undefined + _(dictionary).findLast({ a: 42 }); // $ExpectType AbcObject | undefined + _(dictionary).findLast(["a", 5]); // $ExpectType AbcObject | undefined + _([anything as AbcObject, null, undefined]).findLast((value: AbcObject | null | undefined): value is AbcObject | undefined => value !== null); // $ExpectType AbcObject | undefined + + _.chain(list).findLast(); // $ExpectType LoDashExplicitWrapper + _.chain(list).findLast(listIterator); // $ExpectType LoDashExplicitWrapper + _.chain(list).findLast(listIterator, 1); // $ExpectType LoDashExplicitWrapper + _.chain(list).findLast("a"); // $ExpectType LoDashExplicitWrapper + _.chain(list).findLast({ a: 42 }); // $ExpectType LoDashExplicitWrapper + _.chain(list).findLast(["a", 5]); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).findLast(); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).findLast(dictionaryIterator); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).findLast(dictionaryIterator, 1); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).findLast(""); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).findLast({ a: 42 }); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).findLast(["a", 5]); // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper + _.chain([anything as AbcObject, null, undefined]).findLast((value: AbcObject | null | undefined): value is AbcObject | undefined => value !== null); + + fp.findLast(valueIterator, list); // $ExpectType AbcObject | undefined + fp.findLast(valueIterator)(list); // $ExpectType AbcObject | undefined + fp.findLast("a", list); // $ExpectType AbcObject | undefined + fp.findLast({ a: 42 }, list); // $ExpectType AbcObject | undefined + fp.findLast(["a", 42], list); // $ExpectType AbcObject | undefined + fp.findLast(valueIterator, dictionary); // $ExpectType AbcObject | undefined + fp.findLast(valueIterator)(dictionary); // $ExpectType AbcObject | undefined + fp.findLast({ a: 42 }, dictionary); // $ExpectType AbcObject | undefined + fp.findLast(["a", 42], dictionary); // $ExpectType AbcObject | undefined + fp.findLast((value: AbcObject | null | undefined): value is AbcObject | undefined => value !== null, [anything as AbcObject, null, undefined]); // $ExpectType AbcObject | undefined + fp.findLastFrom(valueIterator, 1, list); // $ExpectType AbcObject | undefined + fp.findLastFrom(valueIterator)(1)(list); // $ExpectType AbcObject | undefined +} + +// _.flatMap +{ + const numList: _.List | null | undefined = anything; + const objList: _.List<{a: number}|Array<{a: number}>> | null | undefined = anything; + const numDictionary: _.Dictionary | null | undefined = anything; + const objDictionary: _.Dictionary<{a: number}|Array<{a: number}>> | null | undefined = anything; + const numNumericDictionary: _.NumericDictionary | null | undefined = anything; + const objNumericDictionary: _.NumericDictionary<{a: number}|Array<{a: number}>> | null | undefined = anything; + + const stringIterator = (value: string, index: number, collection: _.List): string | string[] => ""; + const listIterator = (value: number | number[], index: number, collection: _.List): number | number[] => 1; + const dictionaryIterator = (value: number | number[], key: string, collection: _.Dictionary): number | number[] => 1; + const numericDictionaryIterator = (value: number | number[], key: string, collection: _.NumericDictionary): number | number[] => 1; + const valueIterator = (value: number | number[]): number | number[] => 1; + + _.flatMap("abc"); // $ExpectType string[] + _.flatMap("abc", stringIterator); // $ExpectType string[] + _.flatMap(numList); // $ExpectType number[] + _.flatMap(numList, listIterator); // $ExpectType number[] + _.flatMap(objList, "a"); // $ExpectType any[] + _.flatMap(objList, ["a", 42]); // $ExpectType boolean[] + _.flatMap(objList, { a: 42 }); // $ExpectType boolean[] + _.flatMap(numDictionary); // $ExpectType number[] + _.flatMap(numDictionary, dictionaryIterator); // $ExpectType number[] + _.flatMap(objDictionary, "a"); // $ExpectType any[] + _.flatMap(objDictionary, ["a", 42]); // $ExpectType boolean[] + _.flatMap(objDictionary, { a: 42 }); // $ExpectType boolean[] + _.flatMap(numNumericDictionary); // $ExpectType number[] + _.flatMap(numNumericDictionary, numericDictionaryIterator); // $ExpectType number[] + _.flatMap(objNumericDictionary, "a"); // $ExpectType any[] + _.flatMap(objNumericDictionary, ["a", 42]); // $ExpectType boolean[] + _.flatMap(objNumericDictionary, { a: 42 }); // $ExpectType boolean[] + + _("abc").flatMap(stringIterator); // $ExpectType LoDashImplicitWrapper + _(numList).flatMap(); // $ExpectType LoDashImplicitWrapper + _(numList).flatMap(listIterator); // $ExpectType LoDashImplicitWrapper + _(objList).flatMap("a"); // $ExpectType LoDashImplicitWrapper + _(objList).flatMap(["a", 42]); // $ExpectType LoDashImplicitWrapper + _(objList).flatMap({ a: 42 }); // $ExpectType LoDashImplicitWrapper + _(numDictionary).flatMap(dictionaryIterator); // $ExpectType LoDashImplicitWrapper + _(objDictionary).flatMap("a"); // $ExpectType LoDashImplicitWrapper + _(numNumericDictionary).flatMap(numericDictionaryIterator); // $ExpectType LoDashImplicitWrapper + _(objNumericDictionary).flatMap("a"); // $ExpectType LoDashImplicitWrapper + + _.chain("abc").flatMap(stringIterator); // $ExpectType LoDashExplicitWrapper + _.chain(numList).flatMap(); // $ExpectType LoDashExplicitWrapper + _.chain(numList).flatMap(listIterator); // $ExpectType LoDashExplicitWrapper + _.chain(objList).flatMap("a"); // $ExpectType LoDashExplicitWrapper + _.chain(objList).flatMap(["a", 42]); // $ExpectType LoDashExplicitWrapper + _.chain(objList).flatMap({ a: 42 }); // $ExpectType LoDashExplicitWrapper + _.chain(numDictionary).flatMap(dictionaryIterator); // $ExpectType LoDashExplicitWrapper + _.chain(objDictionary).flatMap("a"); // $ExpectType LoDashExplicitWrapper + _.chain(numNumericDictionary).flatMap(numericDictionaryIterator); // $ExpectType LoDashExplicitWrapper + _.chain(objNumericDictionary).flatMap("a"); // $ExpectType LoDashExplicitWrapper + + fp.flatMap(valueIterator, numList); // $ExpectType number[] + fp.flatMap(valueIterator)(numList); // $ExpectType number[] + fp.flatMap("a", objList); // $ExpectType any[] + fp.flatMap({ a: 42 }, objList); // $ExpectType boolean[] + fp.flatMap(["a", 42], objList); // $ExpectType boolean[] + fp.flatMap(valueIterator, numDictionary); // $ExpectType number[] + fp.flatMap("a", objDictionary); // $ExpectType any[] + fp.flatMap({ a: 42 }, objDictionary); // $ExpectType boolean[] + fp.flatMap(["a", 42], objDictionary); // $ExpectType boolean[] + fp.flatMap(valueIterator, numNumericDictionary); // $ExpectType number[] + fp.flatMap("a", objNumericDictionary); // $ExpectType any[] + fp.flatMap({ a: 42 }, objNumericDictionary); // $ExpectType boolean[] + fp.flatMap(["a", 42], objNumericDictionary); // $ExpectType boolean[] +} + +// _.flatMapDeep +{ + const numList: _.List | null | undefined = anything; + const objList: _.List<{a: number}|Array<{a: number}>> | null | undefined = anything; + const numDictionary: _.Dictionary | null | undefined = anything; + const objDictionary: _.Dictionary<{a: number}|Array<{a: number}>> | null | undefined = anything; + const numNumericDictionary: _.NumericDictionary | null | undefined = anything; + const objNumericDictionary: _.NumericDictionary<{a: number}|Array<{a: number}>> | null | undefined = anything; + + const stringIterator = (value: string, index: number, collection: _.List): _.ListOfRecursiveArraysOrValues | string => ""; + const listIterator = (value: number | number[], index: number, collection: _.List): _.ListOfRecursiveArraysOrValues | number => 1; + const dictionaryIterator = (value: number | number[], key: string, collection: _.Dictionary): _.ListOfRecursiveArraysOrValues | number => 1; + const numericDictionaryIterator = (value: number | number[], key: string, collection: _.NumericDictionary): _.ListOfRecursiveArraysOrValues | number => 1; + const valueIterator = (value: number | number[]): _.ListOfRecursiveArraysOrValues | number => 1; + + _.flatMapDeep("abc"); // $ExpectType string[] + _.flatMapDeep("abc", stringIterator); // $ExpectType string[] + _.flatMapDeep(numList); // $ExpectType number[] + _.flatMapDeep(numList, listIterator); // $ExpectType number[] + _.flatMapDeep(objList, "a"); // $ExpectType any[] + _.flatMapDeep(objList, ["a", 42]); // $ExpectType boolean[] + _.flatMapDeep(objList, { a: 42 }); // $ExpectType boolean[] + _.flatMapDeep(numDictionary); // $ExpectType number[] + _.flatMapDeep(numDictionary, dictionaryIterator); // $ExpectType number[] + _.flatMapDeep(objDictionary, "a"); // $ExpectType any[] + _.flatMapDeep(objDictionary, ["a", 42]); // $ExpectType boolean[] + _.flatMapDeep(objDictionary, { a: 42 }); // $ExpectType boolean[] + _.flatMapDeep(numNumericDictionary); // $ExpectType number[] + _.flatMapDeep(numNumericDictionary, numericDictionaryIterator); // $ExpectType number[] + _.flatMapDeep(objNumericDictionary, "a"); // $ExpectType any[] + _.flatMapDeep(objNumericDictionary, ["a", 42]); // $ExpectType boolean[] + _.flatMapDeep(objNumericDictionary, { a: 42 }); // $ExpectType boolean[] + + _("abc").flatMapDeep(stringIterator); // $ExpectType LoDashImplicitWrapper + _(numList).flatMapDeep(); // $ExpectType LoDashImplicitWrapper + _(numList).flatMapDeep(listIterator); // $ExpectType LoDashImplicitWrapper + _(objList).flatMapDeep("a"); // $ExpectType LoDashImplicitWrapper + _(objList).flatMapDeep(["a", 42]); // $ExpectType LoDashImplicitWrapper + _(objList).flatMapDeep({ a: 42 }); // $ExpectType LoDashImplicitWrapper + _(numDictionary).flatMapDeep(dictionaryIterator); // $ExpectType LoDashImplicitWrapper + _(objDictionary).flatMapDeep("a"); // $ExpectType LoDashImplicitWrapper + _(numNumericDictionary).flatMapDeep(numericDictionaryIterator); // $ExpectType LoDashImplicitWrapper + _(objNumericDictionary).flatMapDeep("a"); // $ExpectType LoDashImplicitWrapper + + _.chain("abc").flatMapDeep(stringIterator); // $ExpectType LoDashExplicitWrapper + _.chain(numList).flatMapDeep(); // $ExpectType LoDashExplicitWrapper + _.chain(numList).flatMapDeep(listIterator); // $ExpectType LoDashExplicitWrapper + _.chain(objList).flatMapDeep("a"); // $ExpectType LoDashExplicitWrapper + _.chain(objList).flatMapDeep(["a", 42]); // $ExpectType LoDashExplicitWrapper + _.chain(objList).flatMapDeep({ a: 42 }); // $ExpectType LoDashExplicitWrapper + _.chain(numDictionary).flatMapDeep(dictionaryIterator); // $ExpectType LoDashExplicitWrapper + _.chain(objDictionary).flatMapDeep("a"); // $ExpectType LoDashExplicitWrapper + _.chain(numNumericDictionary).flatMapDeep(numericDictionaryIterator); // $ExpectType LoDashExplicitWrapper + _.chain(objNumericDictionary).flatMapDeep("a"); // $ExpectType LoDashExplicitWrapper + + fp.flatMapDeep(valueIterator, numList); // $ExpectType number[] + fp.flatMapDeep(valueIterator)(numList); // $ExpectType number[] + fp.flatMapDeep("a", objList); // $ExpectType any[] + fp.flatMapDeep({ a: 42 }, objList); // $ExpectType boolean[] + fp.flatMapDeep(["a", 42], objList); // $ExpectType boolean[] + fp.flatMapDeep(valueIterator, numDictionary); // $ExpectType number[] + fp.flatMapDeep("a", objDictionary); // $ExpectType any[] + fp.flatMapDeep({ a: 42 }, objDictionary); // $ExpectType boolean[] + fp.flatMapDeep(["a", 42], objDictionary); // $ExpectType boolean[] + fp.flatMapDeep(valueIterator, numNumericDictionary); // $ExpectType number[] + fp.flatMapDeep("a", objNumericDictionary); // $ExpectType any[] + fp.flatMapDeep({ a: 42 }, objNumericDictionary); // $ExpectType boolean[] + fp.flatMapDeep(["a", 42], objNumericDictionary); // $ExpectType boolean[] +} + +// _.flatMapDepth +{ + const numList: _.List | null | undefined = anything; + const objList: _.List<{a: number}|Array<{a: number}>> | null | undefined = anything; + const numDictionary: _.Dictionary | null | undefined = anything; + const objDictionary: _.Dictionary<{a: number}|Array<{a: number}>> | null | undefined = anything; + const numNumericDictionary: _.NumericDictionary | null | undefined = anything; + const objNumericDictionary: _.NumericDictionary<{a: number}|Array<{a: number}>> | null | undefined = anything; + + const stringIterator = (value: string, index: number, collection: _.List): _.ListOfRecursiveArraysOrValues | string => ""; + const listIterator = (value: number | number[], index: number, collection: _.List): _.ListOfRecursiveArraysOrValues | number => 1; + const dictionaryIterator = (value: number | number[], key: string, collection: _.Dictionary): _.ListOfRecursiveArraysOrValues | number => 1; + const numericDictionaryIterator = (value: number | number[], key: string, collection: _.NumericDictionary): _.ListOfRecursiveArraysOrValues | number => 1; + const valueIterator = (value: number | number[]): _.ListOfRecursiveArraysOrValues | number => 1; + + _.flatMapDepth("abc"); // $ExpectType string[] + _.flatMapDepth("abc", stringIterator); // $ExpectType string[] + _.flatMapDepth("abc", stringIterator, 3); // $ExpectType string[] + _.flatMapDepth(numList, listIterator, 3); // $ExpectType number[] + _.flatMapDepth(objList, "a", 3); // $ExpectType any[] + _.flatMapDepth(objList, ["a", 42], 3); // $ExpectType boolean[] + _.flatMapDepth(objList, { a: 42 }, 3); // $ExpectType boolean[] + _.flatMapDepth(numDictionary, dictionaryIterator, 3); // $ExpectType number[] + _.flatMapDepth(objDictionary, "a", 3); // $ExpectType any[] + _.flatMapDepth(objDictionary, ["a", 42], 3); // $ExpectType boolean[] + _.flatMapDepth(objDictionary, { a: 42 }, 3); // $ExpectType boolean[] + _.flatMapDepth(numNumericDictionary, numericDictionaryIterator, 3); // $ExpectType number[] + _.flatMapDepth(objNumericDictionary, "a", 3); // $ExpectType any[] + _.flatMapDepth(objNumericDictionary, ["a", 42], 3); // $ExpectType boolean[] + _.flatMapDepth(objNumericDictionary, { a: 42 }, 3); // $ExpectType boolean[] + + _("abc").flatMapDepth(stringIterator, 3); // $ExpectType LoDashImplicitWrapper + _(numList).flatMapDepth(listIterator, 3); // $ExpectType LoDashImplicitWrapper + _(objList).flatMapDepth("a", 3); // $ExpectType LoDashImplicitWrapper + _(objList).flatMapDepth(["a", 42], 3); // $ExpectType LoDashImplicitWrapper + _(objList).flatMapDepth({ a: 42 }, 3); // $ExpectType LoDashImplicitWrapper + _(numDictionary).flatMapDepth(dictionaryIterator, 3); // $ExpectType LoDashImplicitWrapper + _(objDictionary).flatMapDepth("a", 3); // $ExpectType LoDashImplicitWrapper + _(numNumericDictionary).flatMapDepth(numericDictionaryIterator, 3); // $ExpectType LoDashImplicitWrapper + _(objNumericDictionary).flatMapDepth("a", 3); // $ExpectType LoDashImplicitWrapper + + _.chain("abc").flatMapDepth(stringIterator, 3); // $ExpectType LoDashExplicitWrapper + _.chain(numList).flatMapDepth(listIterator, 3); // $ExpectType LoDashExplicitWrapper + _.chain(objList).flatMapDepth("a", 3); // $ExpectType LoDashExplicitWrapper + _.chain(objList).flatMapDepth(["a", 42], 3); // $ExpectType LoDashExplicitWrapper + _.chain(objList).flatMapDepth({ a: 42 }, 3); // $ExpectType LoDashExplicitWrapper + _.chain(numDictionary).flatMapDepth(dictionaryIterator, 3); // $ExpectType LoDashExplicitWrapper + _.chain(objDictionary).flatMapDepth("a", 3); // $ExpectType LoDashExplicitWrapper + _.chain(numNumericDictionary).flatMapDepth(numericDictionaryIterator, 3); // $ExpectType LoDashExplicitWrapper + _.chain(objNumericDictionary).flatMapDepth("a", 3); // $ExpectType LoDashExplicitWrapper + + fp.flatMapDepth(valueIterator, 3, numList); // $ExpectType number[] + fp.flatMapDepth(valueIterator)(3)(numList); // $ExpectType number[] + fp.flatMapDepth("a", 3, objList); // $ExpectType any[] + fp.flatMapDepth({ a: 42 }, 3, objList); // $ExpectType boolean[] + fp.flatMapDepth(["a", 42], 3, objList); // $ExpectType boolean[] + fp.flatMapDepth(valueIterator, 3, numDictionary); // $ExpectType number[] + fp.flatMapDepth("a", 3, objDictionary); // $ExpectType any[] + fp.flatMapDepth({ a: 42 }, 3, objDictionary); // $ExpectType boolean[] + fp.flatMapDepth(["a", 42], 3, objDictionary); // $ExpectType boolean[] + fp.flatMapDepth(valueIterator, 3, numNumericDictionary); // $ExpectType number[] + fp.flatMapDepth("a", 3, objNumericDictionary); // $ExpectType any[] + fp.flatMapDepth({ a: 42 }, 3, objNumericDictionary); // $ExpectType boolean[] + fp.flatMapDepth(["a", 42], 3, objNumericDictionary); // $ExpectType boolean[] +} + +// _.forEach +// _.forEachRight +// _.each +// _.eachRight +{ + const str: string = anything; + const nilStr: string | null | undefined = anything; + const array: AbcObject[] = anything; + const list: _.List = anything; + const dictionary: _.Dictionary = anything; + const numericDictionary: _.NumericDictionary = anything; + const nilArray: AbcObject[] | null | undefined = anything; + const nilList: _.List | null | undefined = anything; + const nilDictionary: _.Dictionary | null | undefined = anything; + const nilNumericDictionary: _.NumericDictionary | null | undefined = anything; + const abcObject: AbcObject = anything; + const nilAbcObject: AbcObject | null | undefined = anything; + + // $ExpectType string + _.forEach(str, (value, index, collection) => { + value; // $ExpectType string + index; // $ExpectType number + collection; // $ExpectType string + }); + + // $ExpectType string | null | undefined + _.forEach(nilStr, (value, index, collection) => { + value; // $ExpectType string + index; // $ExpectType number + collection; // $ExpectType string + }); + + // $ExpectType AbcObject[] + _.forEach(array, (value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType AbcObject[] + }); + + // $ExpectType AbcObject[] | null | undefined + _.forEach(nilArray, (value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType AbcObject[] + }); + + // $ExpectType ArrayLike + _.forEach(list, (value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType ArrayLike + }); + + // $ExpectType ArrayLike | null | undefined + _.forEach(nilList, (value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType ArrayLike + }); + + // $ExpectType Dictionary + _.forEach(dictionary, (value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType string + collection; // $ExpectType Dictionary + }); + + // $ExpectType Dictionary | null | undefined + _.forEach(nilDictionary, (value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType string + collection; // $ExpectType Dictionary + }); + + // $ExpectType NumericDictionary + _.forEach(numericDictionary, (value, index, collection) => { + /* Broken in TS 2.4: value; // AbcObject */ + index; // $ExpectType string + collection; // $ExpectType NumericDictionary + }); + + // $ExpectType NumericDictionary | null | undefined + _.forEach(nilNumericDictionary, (value, index, collection) => { + /* Broken in TS 2.4: value; // AbcObject */ + index; // $ExpectType string + collection; // $ExpectType NumericDictionary + }); + + // $ExpectType AbcObject + _.forEach(abcObject, (value, index, collection) => { + value; // $ExpectType string | number | boolean + index; // $ExpectType string + collection; // $ExpectType AbcObject + }); + + // $ExpectType AbcObject | null | undefined + _.forEach(nilAbcObject, (value, index, collection) => { + value; // $ExpectType string | number | boolean + index; // $ExpectType string + collection; // $ExpectType AbcObject + }); + + // $ExpectType LoDashImplicitWrapper + _(str).forEach((value, index, collection) => { + value; // $ExpectType string + index; // $ExpectType number + collection; // $ExpectType string + }); + + // $ExpectType LoDashImplicitWrapper + _(nilStr).forEach((value, index, collection) => { + value; // $ExpectType string + index; // $ExpectType number + collection; // $ExpectType string + }); + + // $ExpectType LoDashImplicitWrapper + _(array).forEach((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType AbcObject[] + }); + + // $ExpectType LoDashImplicitWrapper + _(nilArray).forEach((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType AbcObject[] + }); + + // $ExpectType LoDashImplicitWrapper> + _(list).forEach((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType ArrayLike + }); + + // $ExpectType LoDashImplicitWrapper | null | undefined> + _(nilList).forEach((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType ArrayLike + }); + + // $ExpectType LoDashImplicitWrapper> + _(dictionary).forEach((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType string + collection; // $ExpectType Dictionary + }); + + // $ExpectType LoDashImplicitWrapper | null | undefined> + _(nilDictionary).forEach((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType string + collection; // $ExpectType Dictionary + }); + + // $ExpectType LoDashImplicitWrapper> + _(numericDictionary).forEach((value, index, collection) => { + // Broken in TS 2.4: value; // AbcObject + index; // $ExpectType string + collection; // $ExpectType NumericDictionary + }); + + // $ExpectType LoDashImplicitWrapper | null | undefined> + _(nilNumericDictionary).forEach((value, index, collection) => { + /* Broken in TS 2.4: value; // AbcObject */ + index; // $ExpectType string + collection; // $ExpectType NumericDictionary + }); + + // $ExpectType LoDashExplicitWrapper + _.chain(str).forEach((value, index, collection) => { + value; // $ExpectType string + index; // $ExpectType number + collection; // $ExpectType string + }); + + // $ExpectType LoDashExplicitWrapper + _.chain(nilStr).forEach((value, index, collection) => { + value; // $ExpectType string + index; // $ExpectType number + collection; // $ExpectType string + }); + + // $ExpectType LoDashExplicitWrapper + _.chain(array).forEach((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType AbcObject[] + }); + + // $ExpectType LoDashExplicitWrapper + _.chain(nilArray).forEach((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType AbcObject[] + }); + + // $ExpectType LoDashExplicitWrapper> + _.chain(list).forEach((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType ArrayLike + }); + + // $ExpectType LoDashExplicitWrapper | null | undefined> + _.chain(nilList).forEach((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType ArrayLike + }); + + // $ExpectType LoDashExplicitWrapper> + _.chain(dictionary).forEach((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType string + collection; // $ExpectType Dictionary + }); + + // $ExpectType LoDashExplicitWrapper | null | undefined> + _.chain(nilDictionary).forEach((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType string + collection; // $ExpectType Dictionary + }); + + // $ExpectType LoDashExplicitWrapper> + _.chain(numericDictionary).forEach((value, index, collection) => { + // Broken in TS 2.4: value; // AbcObject + index; // $ExpectType string + collection; // $ExpectType NumericDictionary + }); + + // $ExpectType LoDashExplicitWrapper | null | undefined> + _.chain(nilNumericDictionary).forEach((value, index, collection) => { + // Broken in TS 2.4: value; // AbcObject + index; // $ExpectType string + collection; // $ExpectType NumericDictionary + }); + + const stringIterator2 = (char: string) => 1; + const listIterator2 = (value: AbcObject) => 1; + fp.forEach(stringIterator2, ""); // $ExpectType string + fp.forEach(listIterator2, array); // $ExpectType AbcObject[] + fp.forEach(listIterator2)(array); // $ExpectType AbcObject[] + fp.forEach(listIterator2, list); // $ExpectType ArrayLike + fp.forEach(listIterator2, dictionary); // $ExpectType Dictionary + fp.forEach(listIterator2, nilArray); // $ExpectType AbcObject[] | null | undefined + fp.forEach(listIterator2, nilList); // $ExpectType ArrayLike | null | undefined + fp.forEach(listIterator2, nilDictionary); // $ExpectType Dictionary | null | undefined + + // $ExpectType AbcObject[] + _.forEachRight(array, (value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType AbcObject[] + }); + // $ExpectType ArrayLike | null | undefined + _.forEachRight(nilList, (value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType ArrayLike + }); + // $ExpectType LoDashImplicitWrapper + _(array).forEachRight((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType AbcObject[] + }); + // $ExpectType LoDashImplicitWrapper | null | undefined> + _(nilList).forEachRight((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType ArrayLike + }); + // $ExpectType LoDashExplicitWrapper + _.chain(array).forEachRight((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType AbcObject[] + }); + // $ExpectType LoDashExplicitWrapper | null | undefined> + _.chain(nilList).forEachRight((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType ArrayLike + }); + fp.forEachRight(listIterator2, array); // $ExpectType AbcObject[] + fp.forEachRight(listIterator2)(array); // $ExpectType AbcObject[] + + // $ExpectType AbcObject[] + _.each(array, (value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType AbcObject[] + }); + // $ExpectType ArrayLike | null | undefined + _.each(nilList, (value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType ArrayLike + }); + // $ExpectType LoDashImplicitWrapper + _(array).each((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType AbcObject[] + }); + // $ExpectType LoDashImplicitWrapper | null | undefined> + _(nilList).each((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType ArrayLike + }); + // $ExpectType LoDashExplicitWrapper + _.chain(array).each((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType AbcObject[] + }); + // $ExpectType LoDashExplicitWrapper | null | undefined> + _.chain(nilList).each((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType ArrayLike + }); + fp.each(listIterator2, array); // $ExpectType AbcObject[] + fp.each(listIterator2)(array); // $ExpectType AbcObject[] + + // $ExpectType AbcObject[] + _.eachRight(array, (value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType AbcObject[] + }); + // $ExpectType ArrayLike | null | undefined + _.eachRight(nilList, (value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType ArrayLike + }); + // $ExpectType LoDashImplicitWrapper + _(array).eachRight((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType AbcObject[] + }); + // $ExpectType LoDashImplicitWrapper | null | undefined> + _(nilList).eachRight((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType ArrayLike + }); + // $ExpectType LoDashExplicitWrapper + _.chain(array).eachRight((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType AbcObject[] + }); + // $ExpectType LoDashExplicitWrapper | null | undefined> + _.chain(nilList).eachRight((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType ArrayLike + }); + fp.eachRight(listIterator2, array); // $ExpectType AbcObject[] + fp.eachRight(listIterator2)(array); // $ExpectType AbcObject[] +} + +// _.groupBy +{ + const list: _.List | null | undefined = [] as any; + const dictionary: _.Dictionary | null | undefined = anything; + + const stringIterator = (char: string, index: number, string: string) => 0; + const listIterator = (value: AbcObject, index: number, collection: _.List) => 0; + const dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => 0; + const valueIterator = (value: AbcObject) => 0; + + _.groupBy(""); // $ExpectType Dictionary + _.groupBy("", stringIterator); // $ExpectType Dictionary + _.groupBy(list); // $ExpectType Dictionary + _.groupBy(list, listIterator); // $ExpectType Dictionary + _.groupBy(list, "a"); // $ExpectType Dictionary + _.groupBy(list, { a: 42 }); // $ExpectType Dictionary + _.groupBy(dictionary); // $ExpectType Dictionary + _.groupBy(dictionary, dictionaryIterator); // $ExpectType Dictionary + _.groupBy(dictionary, ""); // $ExpectType Dictionary + _.groupBy(dictionary, { a: 42 }); // $ExpectType Dictionary + + _("").groupBy(); // $ExpectType LoDashImplicitWrapper> + _("").groupBy((char: string, index: number, string: ArrayLike) => 0); // $ExpectType LoDashImplicitWrapper> + _(list).groupBy(); // $ExpectType LoDashImplicitWrapper> + _(list).groupBy(listIterator); // $ExpectType LoDashImplicitWrapper> + _(list).groupBy(""); // $ExpectType LoDashImplicitWrapper> + _(list).groupBy({ a: 42 }); // $ExpectType LoDashImplicitWrapper> + _(dictionary).groupBy(); // $ExpectType LoDashImplicitWrapper> + _(dictionary).groupBy(dictionaryIterator); // $ExpectType LoDashImplicitWrapper> + _(dictionary).groupBy(""); // $ExpectType LoDashImplicitWrapper> + _(dictionary).groupBy({ a: 42 }); // $ExpectType LoDashImplicitWrapper> + + _.chain("").groupBy(); // $ExpectType LoDashExplicitWrapper> + _.chain("").groupBy((char: string, index: number, string: ArrayLike) => 0); // $ExpectType LoDashExplicitWrapper> + _.chain(list).groupBy(); // $ExpectType LoDashExplicitWrapper> + _.chain(list).groupBy(listIterator); // $ExpectType LoDashExplicitWrapper> + _.chain(list).groupBy(""); // $ExpectType LoDashExplicitWrapper> + _.chain(list).groupBy({ a: 42 }); // $ExpectType LoDashExplicitWrapper> + _.chain(dictionary).groupBy(); // $ExpectType LoDashExplicitWrapper> + _.chain(dictionary).groupBy(dictionaryIterator); // $ExpectType LoDashExplicitWrapper> + _.chain(dictionary).groupBy(""); // $ExpectType LoDashExplicitWrapper> + _.chain(dictionary).groupBy({ a: 42 }); // $ExpectType LoDashExplicitWrapper> + + fp.groupBy(valueIterator, list); // $ExpectType Dictionary + fp.groupBy(valueIterator)(list); // $ExpectType Dictionary + fp.groupBy("a", list); // $ExpectType Dictionary + fp.groupBy({ a: 42 }, list); // $ExpectType Dictionary + fp.groupBy(["a", 42], list); // $ExpectType Dictionary + fp.groupBy(valueIterator, dictionary); // $ExpectType Dictionary + fp.groupBy("a", dictionary); // $ExpectType Dictionary + fp.groupBy({ a: 42 }, dictionary); // $ExpectType Dictionary + fp.groupBy(["a", 42], dictionary); // $ExpectType Dictionary +} + +// _.includes +{ + const list: _.List | null | undefined = anything; + const dictionary: _.Dictionary | null | undefined = anything; + const target: AbcObject = { a: 42, b: "", c: true }; + + _.includes(list, target); // $ExpectType boolean + _.includes(list, target, 42); // $ExpectType boolean + _.includes(dictionary, target); // $ExpectType boolean + _.includes(dictionary, target, 42); // $ExpectType boolean + + _(list).includes(target); // $ExpectType boolean + _(list).includes(target, 42); // $ExpectType boolean + _(dictionary).includes(target); // $ExpectType boolean + _(dictionary).includes(target, 42); // $ExpectType boolean + + _.chain(list).includes(target); // $ExpectType LoDashExplicitWrapper + _.chain(list).includes(target, 42); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).includes(target); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).includes(target, 42); // $ExpectType LoDashExplicitWrapper + + fp.includes(target, list); // $ExpectType boolean + fp.includes(target)(list); // $ExpectType boolean + fp.includes(target, dictionary); // $ExpectType boolean + + fp.includesFrom(target, 42, list); // $ExpectType boolean + fp.includesFrom(target)(42)(list); // $ExpectType boolean + fp.includesFrom(target, 42, dictionary); // $ExpectType boolean +} + +// _.keyBy +{ + const list: _.List | null | undefined = anything; + const dictionary: _.Dictionary | null | undefined = anything; + const numericDictionary: _.NumericDictionary | null | undefined = anything; + + const stringIterator = (value: string, index: number, collection: string) => "a"; + const listIterator = (value: AbcObject, index: number, collection: _.List) => 1; + const dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => Symbol.name; + const numericDictionaryIterator = (value: AbcObject, key: string, collection: _.NumericDictionary) => "a"; + const valueIterator = (value: AbcObject) => 1; + + _.keyBy("abcd"); // $ExpectType Dictionary + _.keyBy("abcd", stringIterator); // $ExpectType Dictionary + _.keyBy(list); // $ExpectType Dictionary + _.keyBy(list, listIterator); // $ExpectType Dictionary + _.keyBy(list, "a"); // $ExpectType Dictionary + _.keyBy(list, { a: 42 }); // $ExpectType Dictionary + _.keyBy(dictionary); // $ExpectType Dictionary + _.keyBy(dictionary, dictionaryIterator); // $ExpectType Dictionary + _.keyBy(dictionary, "a"); // $ExpectType Dictionary + _.keyBy(dictionary, { a: 42 }); // $ExpectType Dictionary + // These fail in TS 2.4 + // _.keyBy(numericDictionary); // Dictionary + // _.keyBy(numericDictionary, numericDictionaryIterator); // Dictionary + // _.keyBy(numericDictionary, "a"); // Dictionary + // _.keyBy(numericDictionary, { a: 42 }); // Dictionary + + _("abcd").keyBy(); // $ExpectType LoDashImplicitWrapper> + _("abcd").keyBy(stringIterator); // $ExpectType LoDashImplicitWrapper> + _(list).keyBy(); // $ExpectType LoDashImplicitWrapper> + _(list).keyBy(listIterator); // $ExpectType LoDashImplicitWrapper> + _(list).keyBy("a"); // $ExpectType LoDashImplicitWrapper> + _(list).keyBy({ a: 42 }); // $ExpectType LoDashImplicitWrapper> + _(dictionary).keyBy(); // $ExpectType LoDashImplicitWrapper> + _(dictionary).keyBy(dictionaryIterator); // $ExpectType LoDashImplicitWrapper> + _(dictionary).keyBy("a"); // $ExpectType LoDashImplicitWrapper> + _(dictionary).keyBy({ a: 42 }); // $ExpectType LoDashImplicitWrapper> + // These fail in TS 2.4 + // _(numericDictionary).keyBy(); // LoDashImplicitWrapper> + // _(numericDictionary).keyBy(numericDictionaryIterator); // LoDashImplicitWrapper> + // _(numericDictionary).keyBy("a"); // LoDashImplicitWrapper> + // _(numericDictionary).keyBy({ a: 42 }); // LoDashImplicitWrapper> + + _.chain("abcd").keyBy(); // $ExpectType LoDashExplicitWrapper> + _.chain("abcd").keyBy(stringIterator); // $ExpectType LoDashExplicitWrapper> + _.chain(list).keyBy(); // $ExpectType LoDashExplicitWrapper> + _.chain(list).keyBy(listIterator); // $ExpectType LoDashExplicitWrapper> + _.chain(list).keyBy("a"); // $ExpectType LoDashExplicitWrapper> + _.chain(list).keyBy({ a: 42 }); // $ExpectType LoDashExplicitWrapper> + _.chain(dictionary).keyBy(); // $ExpectType LoDashExplicitWrapper> + _.chain(dictionary).keyBy(dictionaryIterator); // $ExpectType LoDashExplicitWrapper> + _.chain(dictionary).keyBy("a"); // $ExpectType LoDashExplicitWrapper> + _.chain(dictionary).keyBy({ a: 42 }); // $ExpectType LoDashExplicitWrapper> + // These fail in TS 2.4 + // _.chain(numericDictionary).keyBy(); // LoDashExplicitWrapper> + // _.chain(numericDictionary).keyBy(numericDictionaryIterator); // LoDashExplicitWrapper> + // _.chain(numericDictionary).keyBy("a"); // LoDashExplicitWrapper> + // _.chain(numericDictionary).keyBy({ a: 42 }); // LoDashExplicitWrapper> + + fp.keyBy(valueIterator, list); // $ExpectType Dictionary + fp.keyBy(valueIterator)(list); // $ExpectType Dictionary + fp.keyBy("a", list); // $ExpectType Dictionary + fp.keyBy({ a: 42 }, list); // $ExpectType Dictionary + fp.keyBy(["a", 42], list); // $ExpectType Dictionary + fp.keyBy(valueIterator, dictionary); // $ExpectType Dictionary + fp.keyBy("a", dictionary); // $ExpectType Dictionary + fp.keyBy({ a: 42 }, dictionary); // $ExpectType Dictionary + fp.keyBy(["a", 42], dictionary); // $ExpectType Dictionary + // These fail in TS 2.4 + // fp.keyBy(valueIterator, numericDictionary); // Dictionary + // fp.keyBy("a", numericDictionary); // Dictionary + // fp.keyBy({ a: 42 }, numericDictionary); // Dictionary + // fp.keyBy(["a", 42], numericDictionary); // Dictionary +} + +// _.invoke +{ + const array = [(n?: number) => {}]; + const nestedDict = { a: [(n?: number) => {}] }; + + _.invoke(array, "[0]"); // $ExpectType any + _.invoke(array, "[0]", 2); // $ExpectType any + _.invoke(array, [0, "call"]); // $ExpectType any + _.invoke(array, [0, "call"], 2); // $ExpectType any + + _.invoke(nestedDict, ["a[0].toString"]); // $ExpectType any + _.invoke(nestedDict, ["a[0].toString"], 2); // $ExpectType any + _.invoke(nestedDict, ["a", 0, "toString"]); // $ExpectType any + _.invoke(nestedDict, ["a", 0, "toString"], 2); // $ExpectType any + + _(array).invoke("[0]"); // $ExpectType any + _(array).invoke("[0]", 2); // $ExpectType any + _(array).invoke([0, "call"]); // $ExpectType any + _(array).invoke([0, "call"], 2); // $ExpectType any + + _(nestedDict).invoke(["a[0].toString"]); // $ExpectType any + _(nestedDict).invoke(["a[0].toString"], 2); // $ExpectType any + _(nestedDict).invoke(["a", 0, "toString"]); // $ExpectType any + _(nestedDict).invoke(["a", 0, "toString"], 2); // $ExpectType any + + _.chain(array).invoke("[0]"); // $ExpectType LoDashExplicitWrapper + _.chain(array).invoke("[0]", 2); // $ExpectType LoDashExplicitWrapper + _.chain(array).invoke([0, "call"]); // $ExpectType LoDashExplicitWrapper + _.chain(array).invoke([0, "call"], 2); // $ExpectType LoDashExplicitWrapper + + _.chain(nestedDict).invoke(["a[0].toString"]); // $ExpectType LoDashExplicitWrapper + _.chain(nestedDict).invoke(["a[0].toString"], 2); // $ExpectType LoDashExplicitWrapper + _.chain(nestedDict).invoke(["a", 0, "toString"]); // $ExpectType LoDashExplicitWrapper + _.chain(nestedDict).invoke(["a", 0, "toString"], 2); // $ExpectType LoDashExplicitWrapper + + fp.invoke("[0]", array); // $ExpectType any + fp.invoke("[0]")(array); // $ExpectType any + fp.invoke(["[0]", 2], array); // $ExpectType any + + fp.invoke("a[0].toString", nestedDict); // $ExpectType any + fp.invoke(["a", 0, "toString"], nestedDict); // $ExpectType any +} + +// _.invokeMap +{ + const numArray: number[] | null | undefined = anything; + const numDict: _.Dictionary | null | undefined = anything; + + _.invokeMap(numArray, "toString"); // $ExpectType any[] + _.invokeMap(numArray, "toString", 2); // $ExpectType any[] + _.invokeMap(numArray, Number.prototype.toString); // $ExpectType string[] + _.invokeMap(numDict, "toString"); // $ExpectType any[] + + _(numArray).invokeMap("toString"); // $ExpectType LoDashImplicitWrapper + _(numArray).invokeMap("toString", 2); // $ExpectType LoDashImplicitWrapper + _(numArray).invokeMap(Number.prototype.toString); // $ExpectType LoDashImplicitWrapper + _(numDict).invokeMap("toString"); // $ExpectType LoDashImplicitWrapper + + _.chain(numArray).invokeMap("toString"); // $ExpectType LoDashExplicitWrapper + _.chain(numArray).invokeMap("toString", 2); // $ExpectType LoDashExplicitWrapper + _.chain(numArray).invokeMap(Number.prototype.toString); // $ExpectType LoDashExplicitWrapper + _.chain(numDict).invokeMap("toString"); // $ExpectType LoDashExplicitWrapper + + fp.invokeMap("toString", numArray); // $ExpectType any[] + fp.invokeMap("toString")(numArray); // $ExpectType any[] + fp.invokeMap(Number.prototype.toString, numArray); // $ExpectType string[] + fp.invokeMap("toString", numDict); // $ExpectType any[] + fp.invokeMap(Number.prototype.toString, numDict); // $ExpectType string[] + + fp.invokeArgsMap("toString", [16], numArray); // $ExpectType any[] + fp.invokeArgsMap("toString")([16])(numArray); // $ExpectType any[] + fp.invokeArgsMap(Number.prototype.toString, [16], numArray); // $ExpectType string[] + fp.invokeArgsMap("toString", [16], numDict); // $ExpectType any[] + fp.invokeArgsMap(Number.prototype.toString, [16], numDict); // $ExpectType string[] +} + +// _.map +{ + const list: _.List | null | undefined = anything; + const dictionary: _.Dictionary | null | undefined = anything; + const numericDictionary: _.NumericDictionary | null | undefined = anything; + const abcObject: AbcObject = anything; + + _.map(list); // $ExpectType AbcObject[] + // $ExpectType number[] + _.map(list, (value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType ArrayLike + return 0; + }); + _.map(dictionary); // $ExpectType AbcObject[] + // $ExpectType number[] + _.map(dictionary, (value, key, collection) => { + value; // $ExpectType AbcObject + key; // $ExpectType string + collection; // $ExpectType Dictionary + return 0; + }); + _.map(numericDictionary); // $ExpectType AbcObject[] + // $ExpectType number[] + _.map(numericDictionary, (value, key, collection) => { + /* Broken in TS 2.4: value; // AbcObject */ + key; // $ExpectType string + collection; // $ExpectType NumericDictionary + return 0; + }); + _.map(list, "a"); // $ExpectType number[] + _.map(dictionary, "a"); // $ExpectType number[] + _.map(numericDictionary, "a"); // $ExpectType number[] + _.map(list, "d.0.b"); // $ExpectType any[] + _.map(dictionary, "d.0.b"); // $ExpectType any[] + _.map(numericDictionary, "d.0.b"); // $ExpectType any[] + _.map(list, { a: 42 }); // $ExpectType boolean[] + _.map(dictionary, { a: 42 }); // $ExpectType boolean[] + _.map(numericDictionary, { a: 42 }); // $ExpectType boolean[] + + _(list).map(); // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper + _(list).map((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType ArrayLike + return 0; + }); + _(dictionary).map(); // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper + _(dictionary).map((value, key, collection) => { + value; // $ExpectType AbcObject + key; // $ExpectType string + collection; // $ExpectType Dictionary + return 0; + }); + _(numericDictionary).map(); // $ExpectType LoDashImplicitWrapper + // $ExpectType LoDashImplicitWrapper + _(numericDictionary).map((value, key, collection) => { + /* Broken in TS 2.4: value; // AbcObject */ + key; // $ExpectType string + collection; // $ExpectType NumericDictionary + return 0; + }); + _(list).map("a"); // $ExpectType LoDashImplicitWrapper + _(dictionary).map("a"); // $ExpectType LoDashImplicitWrapper + _(numericDictionary).map("a"); // $ExpectType LoDashImplicitWrapper + _(list).map("d.0.b"); // $ExpectType LoDashImplicitWrapper + _(dictionary).map("d.0.b"); // $ExpectType LoDashImplicitWrapper + _(numericDictionary).map("d.0.b"); // $ExpectType LoDashImplicitWrapper + _(list).map({ a: 42 }); // $ExpectType LoDashImplicitWrapper + _(dictionary).map({ a: 42 }); // $ExpectType LoDashImplicitWrapper + _(numericDictionary).map({ a: 42 }); // $ExpectType LoDashImplicitWrapper + + _.chain(list).map(); // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper + _.chain(list).map((value, index, collection) => { + value; // $ExpectType AbcObject + index; // $ExpectType number + collection; // $ExpectType ArrayLike + return 0; + }); + _.chain(dictionary).map(); // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).map((value, key, collection) => { + value; // $ExpectType AbcObject + key; // $ExpectType string + collection; // $ExpectType Dictionary + return 0; + }); + _.chain(numericDictionary).map(); // $ExpectType LoDashExplicitWrapper + // $ExpectType LoDashExplicitWrapper + _.chain(numericDictionary).map((value, key, collection) => { + /* Broken in TS 2.4: value; // AbcObject */ + key; // $ExpectType string + collection; // $ExpectType NumericDictionary + return 0; + }); + _.chain(list).map("a"); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).map("a"); // $ExpectType LoDashExplicitWrapper + _.chain(numericDictionary).map("a"); // $ExpectType LoDashExplicitWrapper + _.chain(list).map("d.0.b"); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).map("d.0.b"); // $ExpectType LoDashExplicitWrapper + _.chain(numericDictionary).map("d.0.b"); // $ExpectType LoDashExplicitWrapper + _.chain(list).map({ a: 42 }); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).map({ a: 42 }); // $ExpectType LoDashExplicitWrapper + _.chain(numericDictionary).map({ a: 42 }); // $ExpectType LoDashExplicitWrapper + + const valueIterator = (value: AbcObject): number => value.a; + fp.map(valueIterator)(list); // $ExpectType number[] + fp.map(valueIterator, dictionary); // $ExpectType number[] + fp.map("a", list); // $ExpectType number[] + fp.map({ a: 42 }, list); // $ExpectType boolean[] + fp.map(["a", 42], dictionary); // $ExpectType boolean[] +} + +// _.partition +{ + const list: ArrayLike | null | undefined = anything; + + // $ExpectType [any[], any[]] + _.partition(anything, (value) => { + value; // $ExpectType any + return value < "c"; + }); + // $ExpectType [string[], string[]] + _.partition("abcd", (value) => { + value; // $ExpectType string + return value < "c"; + }); + // $ExpectType [AbcObject[], AbcObject[]] + _.partition(list, (value) => { + value; // $ExpectType AbcObject + return true; + }); + + // $ExpectType LoDashImplicitWrapper<[any[], any[]]> + _(anything).partition((value) => { + value; // $ExpectType any + return value < "c"; + }); + // $ExpectType LoDashImplicitWrapper<[string[], string[]]> + _("abcd").partition((value) => { + value; // $ExpectType string + return value < "c"; + }); + // $ExpectType LoDashImplicitWrapper<[AbcObject[], AbcObject[]]> + _(list).partition((value) => { + value; // $ExpectType AbcObject + return true; + }); + + // $ExpectType LoDashExplicitWrapper<[any[], any[]]> + _.chain(anything).partition((value) => { + value; // $ExpectType any + return value < "c"; + }); + // $ExpectType LoDashExplicitWrapper<[string[], string[]]> + _.chain("abcd").partition((value) => { + value; // $ExpectType string + return value < "c"; + }); + // $ExpectType LoDashExplicitWrapper<[AbcObject[], AbcObject[]]> + _.chain(list).partition((value) => { + value; // $ExpectType AbcObject + return true; + }); + + // $ExpectType [any[], any[]] + fp.partition((value) => { + value; // $ExpectType any + return value < "c"; + }, anything); + // $ExpectType [any[], any[]] + fp.partition((value: any) => value < "c")(anything); + // $ExpectType [string[], string[]] + fp.partition((value) => { + value; // $ExpectType string + return value < "c"; + }, "abcd"); + // $ExpectType [AbcObject[], AbcObject[]] + fp.partition((value) => { + value; // $ExpectType AbcObject + return true; + }, list); +} + +// _.reduce +{ + interface ABC { + [key: string]: number; + a: number; + b: number; + c: number; + } + const initial: ABC = { a: 1, b: 2, c: 3 }; + + _.reduce([1, 2, 3], (sum: number, num: number) => sum + num); // $ExpectType number | undefined + _.reduce(null, (sum: number, num: number) => sum + num); // $ExpectType number | undefined + _.reduce({ a: 1, b: 2, c: 3 }, (r: ABC, num: number, key: string) => r, initial); // $ExpectType ABC + + _([1, 2, 3]).reduce((sum: number, num: number) => sum + num); // $ExpectType number | undefined + _({ a: 1, b: 2, c: 3 }).reduce((r: ABC, num: number, key: string) => r, initial); // $ExpectType ABC + + _.chain([1, 2, 3]).reduce((sum: number, num: number) => sum + num); // $ExpectType LoDashExplicitWrapper + _.chain({ a: 1, b: 2, c: 3 }).reduce((r: ABC, num: number, key: string) => r, initial); // $ExpectType LoDashExplicitWrapper + + fp.reduce((s: string, num: number) => s + num, "", [1, 2, 3]); // $ExpectType string + fp.reduce((s: string, num: number) => s + num)("")([1, 2, 3]); // $ExpectType string + + _.reduceRight([1, 2, 3], (sum: number, num: number) => sum + num); // $ExpectType number | undefined + _.reduceRight(null, (sum: number, num: number) => sum + num); // $ExpectType number | undefined + _.reduceRight({ a: 1, b: 2, c: 3 }, (r: ABC, num: number, key: string) => r, initial); // $ExpectType ABC + + _([1, 2, 3]).reduceRight((sum: number, num: number) => sum + num); // $ExpectType number | undefined + _({ a: 1, b: 2, c: 3 }).reduceRight((r: ABC, num: number, key: string) => r, initial); // $ExpectType ABC + + _.chain([1, 2, 3]).reduceRight((sum: number, num: number) => sum + num); // $ExpectType LoDashExplicitWrapper + _.chain({ a: 1, b: 2, c: 3 }).reduceRight((r: ABC, num: number, key: string) => r, initial); // $ExpectType LoDashExplicitWrapper + + fp.reduceRight((num: number, s: string) => s + num, "", [1, 2, 3]); // $ExpectType string + fp.reduceRight((num: number, s: string) => s + num)("")([1, 2, 3]); // $ExpectType string +} + +// _.reject +{ + const list: _.List | null | undefined = anything; + const dictionary: _.Dictionary | null | undefined = anything; + + const stringIterator = (char: string, index: number, string: string) => true; + const listIterator = (value: AbcObject, index: number, collection: _.List) => true; + const dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => true; + const valueIterator = (value: AbcObject) => true; + + _.reject("", stringIterator); // $ExpectType string[] + _.reject(list, listIterator); // $ExpectType AbcObject[] + _.reject(list, ""); // $ExpectType AbcObject[] + _.reject(list, { a: 42 }); // $ExpectType AbcObject[] + _.reject(dictionary, dictionaryIterator); // $ExpectType AbcObject[] + _.reject(dictionary, ""); // $ExpectType AbcObject[] + _.reject(dictionary, { a: 42 }); // $ExpectType AbcObject[] + + _("").reject(stringIterator); // $ExpectType LoDashImplicitWrapper + _(list).reject(listIterator); // $ExpectType LoDashImplicitWrapper + _(list).reject(""); // $ExpectType LoDashImplicitWrapper + _(list).reject({ a: 42 }); // $ExpectType LoDashImplicitWrapper + _(dictionary).reject(dictionaryIterator); // $ExpectType LoDashImplicitWrapper + _(dictionary).reject(""); // $ExpectType LoDashImplicitWrapper + _(dictionary).reject({ a: 42 }); // $ExpectType LoDashImplicitWrapper + + _.chain("").reject(stringIterator); // $ExpectType LoDashExplicitWrapper + _.chain(list).reject(listIterator); // $ExpectType LoDashExplicitWrapper + _.chain(list).reject(""); // $ExpectType LoDashExplicitWrapper + _.chain(list).reject({ a: 42 }); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).reject(dictionaryIterator); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).reject(""); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).reject({ a: 42 }); // $ExpectType LoDashExplicitWrapper + + fp.reject(valueIterator, list); // $ExpectType AbcObject[] + fp.reject(valueIterator)(list); // $ExpectType AbcObject[] + fp.reject(valueIterator, dictionary); // $ExpectType AbcObject[] + fp.reject("a", list); // $ExpectType AbcObject[] + fp.reject({ a: 42 }, list); // $ExpectType AbcObject[] + fp.reject(["a", 42], list); // $ExpectType AbcObject[] +} + +// _.sample +// _.sampleSize +{ + const list: _.List | null | undefined = anything; + const dictionary: _.Dictionary | null | undefined = anything; + const numericDictionary: _.NumericDictionary | null | undefined = anything; + + _.sample("abc"); // $ExpectType string | undefined + _.sample(list); // $ExpectType string | undefined + _.sample(dictionary); // $ExpectType string | undefined + _.sample(numericDictionary); // $ExpectType string | undefined + _.sample({ a: "foo" }); // $ExpectType string | undefined + + _("abc").sample(); // $ExpectType string | undefined + _(list).sample(); // $ExpectType string | undefined + _(dictionary).sample(); // $ExpectType string | undefined + _(numericDictionary).sample(); // $ExpectType string | undefined + _({ a: "foo" }).sample(); // $ExpectType string | undefined + + _.chain("abc").sample(); // $ExpectType LoDashExplicitWrapper + _.chain(list).sample(); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).sample(); // $ExpectType LoDashExplicitWrapper + _.chain(numericDictionary).sample(); // $ExpectType LoDashExplicitWrapper + _.chain({ a: "foo" }).sample(); // $ExpectType LoDashExplicitWrapper + + fp.sample("abc"); // $ExpectType string | undefined + fp.sample(list); // $ExpectType string | undefined + fp.sample({ a: "foo" }); // $ExpectType string | undefined + + _.sampleSize("abc"); // $ExpectType string[] + _.sampleSize("abc", 3); // $ExpectType string[] + _.sampleSize(list, 3); // $ExpectType string[] + _.sampleSize(dictionary, 3); // $ExpectType string[] + _.sampleSize(numericDictionary, 3); // $ExpectType string[] + _.sampleSize({ a: "foo" }, 3); // $ExpectType string[] + + _("abc").sampleSize(); // $ExpectType LoDashImplicitWrapper + _("abc").sampleSize(3); // $ExpectType LoDashImplicitWrapper + _(list).sampleSize(3); // $ExpectType LoDashImplicitWrapper + _(dictionary).sampleSize(3); // $ExpectType LoDashImplicitWrapper + _(numericDictionary).sampleSize(3); // $ExpectType LoDashImplicitWrapper + _({ a: "foo" }).sampleSize(3); // $ExpectType LoDashImplicitWrapper + + _.chain("abc").sampleSize(); // $ExpectType LoDashExplicitWrapper + _.chain("abc").sampleSize(3); // $ExpectType LoDashExplicitWrapper + _.chain(list).sampleSize(3); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).sampleSize(3); // $ExpectType LoDashExplicitWrapper + _.chain(numericDictionary).sampleSize(3); // $ExpectType LoDashExplicitWrapper + _.chain({ a: "foo" }).sampleSize(3); // $ExpectType LoDashExplicitWrapper + + fp.sampleSize(3, "abc"); // $ExpectType string[] + fp.sampleSize(3)(list); // $ExpectType string[] + fp.sampleSize(3)({ a: "foo" }); // $ExpectType string[] +} + +// _.shuffle +{ + const list: _.List | null | undefined = anything; + const dictionary: _.Dictionary | null | undefined = anything; + + _.shuffle("abc"); // $ExpectType string[] + _.shuffle(list); // $ExpectType AbcObject[] + _.shuffle(dictionary); // $ExpectType AbcObject[] + _("abc").shuffle(); // $ExpectType LoDashImplicitWrapper + _(list).shuffle(); // $ExpectType LoDashImplicitWrapper + _(dictionary).shuffle(); // $ExpectType LoDashImplicitWrapper + _.chain("abc").shuffle(); // $ExpectType LoDashExplicitWrapper + _.chain(list).shuffle(); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).shuffle(); // $ExpectType LoDashExplicitWrapper + fp.shuffle("abc"); // $ExpectType string[] + fp.shuffle(list); // $ExpectType AbcObject[] + fp.shuffle(dictionary); // $ExpectType AbcObject[] +} + +// _.size +{ + const list: _.List | null | undefined = anything; + const dictionary: _.Dictionary | null | undefined = anything; + + _.size(list); // $ExpectType number + _.size(dictionary); // $ExpectType number + _.size(""); // $ExpectType number + _(list).size(); // $ExpectType number + _(dictionary).size(); // $ExpectType number + _("").size(); // $ExpectType number + _.chain(list).size(); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).size(); // $ExpectType LoDashExplicitWrapper + _.chain("").size(); // $ExpectType LoDashExplicitWrapper + fp.size(list); // $ExpectType number + fp.size(dictionary); // $ExpectType number + fp.size(""); // $ExpectType number +} + +// _.some +{ + const list: _.List | null | undefined = anything; + const dictionary: _.Dictionary | null | undefined = anything; + const numericDictionary: _.NumericDictionary | null | undefined = anything; + + const listIterator = (value: AbcObject, index: number, collection: _.List) => true; + const dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => true; + const numericDictionaryIterator = (value: AbcObject, key: string, collection: _.NumericDictionary) => true; + const valueIterator = (value: AbcObject) => true; + + _.some(list); // $ExpectType boolean + _.some(list, listIterator); // $ExpectType boolean + _.some(list, "a"); // $ExpectType boolean + _.some(list, ["a", 42]); // $ExpectType boolean + _.some(list, { a: 42 }); // $ExpectType boolean + + _.some(dictionary); // $ExpectType boolean + _.some(dictionary, dictionaryIterator); // $ExpectType boolean + _.some(dictionary, "a"); // $ExpectType boolean + _.some(dictionary, ["a", 42]); // $ExpectType boolean + _.some(dictionary, { a: 42 }); // $ExpectType boolean + + _.some(numericDictionary); // $ExpectType boolean + _.some(numericDictionary, numericDictionaryIterator); // $ExpectType boolean + _.some(numericDictionary, "a"); // $ExpectType boolean + _.some(numericDictionary, ["a", 42]); // $ExpectType boolean + _.some(numericDictionary, { a: 42 }); // $ExpectType boolean + + _(list).some(); // $ExpectType boolean + _(list).some(listIterator); // $ExpectType boolean + _(list).some("a"); // $ExpectType boolean + _(list).some(["a", 42]); // $ExpectType boolean + _(list).some({ a: 42 }); // $ExpectType boolean + + _(dictionary).some(); // $ExpectType boolean + _(dictionary).some(dictionaryIterator); // $ExpectType boolean + _(dictionary).some("a"); // $ExpectType boolean + _(dictionary).some(["a", 42]); // $ExpectType boolean + _(dictionary).some({ a: 42 }); // $ExpectType boolean + + _(numericDictionary).some(); // $ExpectType boolean + _(numericDictionary).some(numericDictionaryIterator); // $ExpectType boolean + _(numericDictionary).some("a"); // $ExpectType boolean + _(numericDictionary).some(["a", 42]); // $ExpectType boolean + _(numericDictionary).some({ a: 42 }); // $ExpectType boolean + + _.chain(list).some(); // $ExpectType LoDashExplicitWrapper + _.chain(list).some(listIterator); // $ExpectType LoDashExplicitWrapper + _.chain(list).some("a"); // $ExpectType LoDashExplicitWrapper + _.chain(list).some(["a", 42]); // $ExpectType LoDashExplicitWrapper + _.chain(list).some({ a: 42 }); // $ExpectType LoDashExplicitWrapper + + _.chain(dictionary).some(); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).some(dictionaryIterator); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).some("a"); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).some(["a", 42]); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).some({ a: 42 }); // $ExpectType LoDashExplicitWrapper + + _.chain(numericDictionary).some(); // $ExpectType LoDashExplicitWrapper + _.chain(numericDictionary).some(numericDictionaryIterator); // $ExpectType LoDashExplicitWrapper + _.chain(numericDictionary).some("a"); // $ExpectType LoDashExplicitWrapper + _.chain(numericDictionary).some(["a", 42]); // $ExpectType LoDashExplicitWrapper + _.chain(numericDictionary).some({ a: 42 }); // $ExpectType LoDashExplicitWrapper + + fp.some(valueIterator, list); // $ExpectType boolean + fp.some("a")(list); // $ExpectType boolean + fp.some({ a: 42 }, list); // $ExpectType boolean + fp.some(["a", 42], list); // $ExpectType boolean + + fp.some(valueIterator, dictionary); // $ExpectType boolean + fp.some("a")(dictionary); // $ExpectType boolean + fp.some({ a: 42 })(dictionary); // $ExpectType boolean + fp.some(["a", 42])(dictionary); // $ExpectType boolean + + fp.some(valueIterator, numericDictionary); // $ExpectType boolean + fp.some("a")(numericDictionary); // $ExpectType boolean + fp.some({ a: 42 })(numericDictionary); // $ExpectType boolean + fp.some(["a", 42])(numericDictionary); // $ExpectType boolean +} + +// _.sortBy +{ + const list: _.List | null | undefined = anything; + const dictionary: _.Dictionary | null | undefined = anything; + + const listIterator = (value: AbcObject, index: number, collection: _.List) => 0; + const dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => 0; + const valueIterator = (value: AbcObject) => 0; + + _.sortBy(list); // $ExpectType AbcObject[] + _.sortBy(list, listIterator); // $ExpectType AbcObject[] + _.sortBy(list, listIterator, listIterator); // $ExpectType AbcObject[] + _.sortBy(list, [listIterator, listIterator]); // $ExpectType AbcObject[] + _.sortBy(list, ""); // $ExpectType AbcObject[] + _.sortBy(list, { a: 42 }); // $ExpectType AbcObject[] + _.sortBy(dictionary); // $ExpectType AbcObject[] + _.sortBy(dictionary, dictionaryIterator); // $ExpectType AbcObject[] + _.sortBy(dictionary, ""); // $ExpectType AbcObject[] + _.sortBy(dictionary, { a: 42 }); // $ExpectType AbcObject[] + + _(list).sortBy(); // $ExpectType LoDashImplicitWrapper + _(list).sortBy(listIterator); // $ExpectType LoDashImplicitWrapper + _(list).sortBy(listIterator, listIterator); // $ExpectType LoDashImplicitWrapper + _(list).sortBy([listIterator, listIterator]); // $ExpectType LoDashImplicitWrapper + _(list).sortBy(""); // $ExpectType LoDashImplicitWrapper + _(list).sortBy({ a: 42 }); // $ExpectType LoDashImplicitWrapper + _(dictionary).sortBy(); // $ExpectType LoDashImplicitWrapper + _(dictionary).sortBy(dictionaryIterator); // $ExpectType LoDashImplicitWrapper + _(dictionary).sortBy(""); // $ExpectType LoDashImplicitWrapper + _(dictionary).sortBy({ a: 42 }); // $ExpectType LoDashImplicitWrapper + + _.chain(list).sortBy(); // $ExpectType LoDashExplicitWrapper + _.chain(list).sortBy(listIterator); // $ExpectType LoDashExplicitWrapper + _.chain(list).sortBy(listIterator, listIterator); // $ExpectType LoDashExplicitWrapper + _.chain(list).sortBy([listIterator, listIterator]); // $ExpectType LoDashExplicitWrapper + _.chain(list).sortBy(""); // $ExpectType LoDashExplicitWrapper + _.chain(list).sortBy({ a: 42 }); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).sortBy(); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).sortBy(dictionaryIterator); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).sortBy(""); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).sortBy({ a: 42 }); // $ExpectType LoDashExplicitWrapper + + fp.sortBy(fp.identity, "bca"); // $ExpectType string[] + fp.sortBy(valueIterator, list); // $ExpectType AbcObject[] + fp.sortBy(valueIterator)(list); // $ExpectType AbcObject[] + fp.sortBy([valueIterator, valueIterator])(list); // $ExpectType AbcObject[] + fp.sortBy("a", list); // $ExpectType AbcObject[] + fp.sortBy({ a: 42 }, list); // $ExpectType AbcObject[] + fp.sortBy(fp.identity, dictionary); // $ExpectType AbcObject[] + fp.sortBy(valueIterator, dictionary); // $ExpectType AbcObject[] + fp.sortBy("a", dictionary); // $ExpectType AbcObject[] + fp.sortBy({ a: 42 }, dictionary); // $ExpectType AbcObject[] +} + +// _.orderBy +{ + const list: _.List | null | undefined = anything; + const numericDictionary: _.NumericDictionary | null | undefined = anything; + const dictionary: _.Dictionary | null | undefined = anything; + + _.orderBy("acbd", (value) => 1); // $ExpectType string[] + _.orderBy("acbd", (value) => 1, true); // $ExpectType string[] + _.orderBy("acbd", [(value) => 1, (value) => 2], [true, false]); // $ExpectType string[] + _.orderBy(list, (value) => 1); // $ExpectType AbcObject[] + _.orderBy(list, (value) => 1, true); // $ExpectType AbcObject[] + _.orderBy(list, [(value) => 1, (value) => 2], [true, false]); // $ExpectType AbcObject[] + _.orderBy(dictionary, (value) => 1); // $ExpectType AbcObject[] + _.orderBy(dictionary, (value) => 1, true); // $ExpectType AbcObject[] + // These fail in TS 2.4 + // _.orderBy(numericDictionary, (value) => 1); // AbcObject[] + // _.orderBy(numericDictionary, (value) => 1, true); // AbcObject[] + + _(list).orderBy((value) => 1); // $ExpectType LoDashImplicitWrapper + _(list).orderBy((value) => 1, true); // $ExpectType LoDashImplicitWrapper + _(list).orderBy([(value) => 1, (value) => 2], true); // $ExpectType LoDashImplicitWrapper + _(dictionary).orderBy((value) => 1); // $ExpectType LoDashImplicitWrapper + _(dictionary).orderBy((value) => 1, true); // $ExpectType LoDashImplicitWrapper + // These fail in TS 2.4 + // _(numericDictionary).orderBy((value) => 1); // LoDashImplicitWrapper + // _(numericDictionary).orderBy((value) => 1, true); // LoDashImplicitWrapper + + _.chain(list).orderBy((value) => 1); // $ExpectType LoDashExplicitWrapper + _.chain(list).orderBy((value) => 1, true); // $ExpectType LoDashExplicitWrapper + _.chain(list).orderBy([(value) => 1, (value) => 2], true); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).orderBy((value) => 1); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).orderBy((value) => 1, true); // $ExpectType LoDashExplicitWrapper + // These fail in TS 2.4 + // _.chain(numericDictionary).orderBy((value) => 1); // LoDashExplicitWrapper + // _.chain(numericDictionary).orderBy((value) => 1, true); // LoDashExplicitWrapper + + fp.orderBy(fp.identity, "asc", "bca"); // $ExpectType string[] + fp.orderBy(fp.identity, true, "bca"); // $ExpectType string[] + fp.orderBy((value: AbcObject) => 1, true, list); // $ExpectType AbcObject[] + fp.orderBy([(value: AbcObject) => 1, (value: AbcObject) => 1])([true, false])(list); // $ExpectType AbcObject[] + fp.orderBy("a", true, list); // $ExpectType AbcObject[] + fp.orderBy({ a: 42 }, true, list); // $ExpectType AbcObject[] + fp.orderBy((value: AbcObject) => 1, true, dictionary); // $ExpectType AbcObject[] + fp.orderBy("a", true, dictionary); // $ExpectType AbcObject[] + fp.orderBy({ a: 42 }, true, dictionary); // $ExpectType AbcObject[] +} + +/******** + * Date * + ********/ + +_.now(); // $ExpectType number +_({}).now(); // $ExpectType number +_.chain({}).now(); // $ExpectType LoDashExplicitWrapper +fp.now(); // $ExpectType number + +/************ + * Function * + ************/ + +// _.after +{ + _.after(42, (a: string, b: number): boolean => true); // $ExpectType (a: string, b: number) => boolean + _(42).after((a: string, b: number): boolean => true); // $ExpectType LoDashImplicitWrapper<(a: string, b: number) => boolean> + _.chain(42).after((a: string, b: number): boolean => true); // $ExpectType LoDashExplicitWrapper<(a: string, b: number) => boolean> + fp.after((a: string, b: number): boolean => true, 42); // $ExpectType (a: string, b: number) => boolean + fp.after((a: string, b: number): boolean => true)(42); // $ExpectType (a: string, b: number) => boolean +} + +// _.ary +{ + const func = (a: string, b: number) => true; + + _.ary(func); // $ExpectType (...args: any[]) => any + _.ary(func, 2); // $ExpectType (...args: any[]) => any + _(func).ary(); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => any> + _(func).ary(2); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => any> + _.chain(func).ary(); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => any> + _.chain(func).ary(2); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => any> + fp.ary(1, func); // $ExpectType (...args: any[]) => any +} + +// _.before +{ + _.before(42, (a: string, b: number): boolean => true); // $ExpectType (a: string, b: number) => boolean + _(42).before((a: string, b: number): boolean => true); // $ExpectType LoDashImplicitWrapper<(a: string, b: number) => boolean> + _.chain(42).before((a: string, b: number): boolean => true); // $ExpectType LoDashExplicitWrapper<(a: string, b: number) => boolean> + fp.before((a: string, b: number): boolean => true, 42); // $ExpectType (a: string, b: number) => boolean + fp.before((a: string, b: number): boolean => true)(42); // $ExpectType (a: string, b: number) => boolean +} + +// _.bind +{ + const func = (a: string, b: number) => true; + + _.bind(func, anything); // $ExpectType (...args: any[]) => any + _.bind(func, anything, 42); // $ExpectType (...args: any[]) => any + _.bind(func, anything, 42, ""); // $ExpectType (...args: any[]) => any + _(func).bind(anything); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => any> + _(func).bind(anything, 42); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => any> + _(func).bind(anything, 42, ""); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => any> + _.chain(func).bind(anything); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => any> + _.chain(func).bind(anything, 42); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => any> + _.chain(func).bind(anything, 42, ""); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => any> + fp.bind((a: string, b: number) => true, anything); // $ExpectType (...args: any[]) => any + fp.bind((a: string, b: number) => true)(anything); // $ExpectType (...args: any[]) => any +} + +// _.bindAll +{ + const object = { a: () => {}, b: () => {}, c: () => {} }; + + _.bindAll(object); // $ExpectType { a: () => void; b: () => void; c: () => void; } + _.bindAll(object, "a", ["b", "c"]); // $ExpectType { a: () => void; b: () => void; c: () => void; } + _(object).bindAll(); // $ExpectType LoDashImplicitWrapper<{ a: () => void; b: () => void; c: () => void; }> + _(object).bindAll("a", ["b", "c"]); // $ExpectType LoDashImplicitWrapper<{ a: () => void; b: () => void; c: () => void; }> + _.chain(object).bindAll(); // $ExpectType LoDashExplicitWrapper<{ a: () => void; b: () => void; c: () => void; }> + _.chain(object).bindAll("a", ["b", "c"]); // $ExpectType LoDashExplicitWrapper<{ a: () => void; b: () => void; c: () => void; }> + fp.bindAll("a", object); // $ExpectType { a: () => void; b: () => void; c: () => void; } + fp.bindAll(["b", "c"])(object); // $ExpectType { a: () => void; b: () => void; c: () => void; } +} + +// _.bindKey +{ + const object = { + foo: (a: number, b: string) => true, + }; + + _.bindKey(object, "foo"); // $ExpectType (...args: any[]) => any + _.bindKey(object, "foo", 42, ""); // $ExpectType (...args: any[]) => any + _(object).bindKey("foo"); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => any> + _(object).bindKey("foo", 42, ""); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => any> + _.chain(object).bindKey("foo"); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => any> + _.chain(object).bindKey("foo", 42, ""); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => any> + fp.bindKey(object, "foo"); // $ExpectType (...args: any[]) => any + fp.bindKey(object)("foo"); // $ExpectType (...args: any[]) => any +} + +// _.curry +{ + const testCurry = (a: string, b: number, c: boolean): [string, number, boolean] => [a, b, c]; + _.curry(testCurry)("1", 2, true); // $ExpectType [string, number, boolean] + _.curry(testCurry)("1", 2)(true); // $ExpectType [string, number, boolean] + _.curry(testCurry)("1")(2, true); // $ExpectType [string, number, boolean] + _.curry(testCurry)("1")(2)(true); // $ExpectType [string, number, boolean] + _.curry(testCurry)("1", 2); // $ExpectType CurriedFunction1 + _.curry(testCurry)("1")(2); // $ExpectType CurriedFunction1 + _.curry(testCurry)("1"); // $ExpectType CurriedFunction2 + _.curry(testCurry); // $ExpectType CurriedFunction3 + _.curry(testCurry)(_, 2, true)("1"); // $ExpectType [string, number, boolean] + _.curry(testCurry)(_.curry.placeholder, 2, true)("1"); // $ExpectType [string, number, boolean] + _.curry(testCurry)("1", _, true)(2); // $ExpectType [string, number, boolean] + _.curry(testCurry)(_, 2)("1", true); // $ExpectType [string, number, boolean] + _.curry(testCurry)(_.curry.placeholder, 2)("1", true); // $ExpectType [string, number, boolean] + _(testCurry).curry(); // $ExpectType LoDashImplicitWrapper> + _.chain(testCurry).curry(); // $ExpectType LoDashExplicitWrapper> + + fp.curry(testCurry)("1", 2, true); // $ExpectType [string, number, boolean] + fp.curry(testCurry)("1", 2)(true); // $ExpectType [string, number, boolean] + fp.curry(testCurry)("1")(2, true); // $ExpectType [string, number, boolean] + fp.curry(testCurry)("1")(2)(true); // $ExpectType [string, number, boolean] + fp.curry(testCurry)("1", 2); // $ExpectType CurriedFunction1 + fp.curry(testCurry)("1")(2); // $ExpectType CurriedFunction1 + fp.curry(testCurry)("1"); // $ExpectType CurriedFunction2 + fp.curry(testCurry); // $ExpectType CurriedFunction3 + fp.curry(testCurry)(fp.__, 2, true)("1"); // $ExpectType [string, number, boolean] + fp.curry(testCurry)(fp.curry.placeholder, 2, true)("1"); // $ExpectType [string, number, boolean] + fp.curryN(3)(testCurry)(fp.curryN.placeholder, 2, true)("1"); // $ExpectType [string, number, boolean] + + // _.curryRight + _.curryRight(testCurry)("1", 2, true); // $ExpectType [string, number, boolean] + _.curryRight(testCurry)(2, true)("1"); // $ExpectType [string, number, boolean] + _.curryRight(testCurry)(true)("1", 2); // $ExpectType [string, number, boolean] + _.curryRight(testCurry)(true)(2)("1"); // $ExpectType [string, number, boolean] + _.curryRight(testCurry)(2, true); // $ExpectType RightCurriedFunction1 + _.curryRight(testCurry)(true)(2); // $ExpectType RightCurriedFunction1 + _.curryRight(testCurry)(true); // $ExpectType RightCurriedFunction2 + _.curryRight(testCurry); // $ExpectType RightCurriedFunction3 + _.curryRight(testCurry)("1", _, true)(2); // $ExpectType [string, number, boolean] + _.curryRight(testCurry)("1", _.curryRight.placeholder, true)(2); // $ExpectType [string, number, boolean] + _.curryRight(testCurry)(true)("1", _)(2); // $ExpectType [string, number, boolean] + _.curryRight(testCurry)(true)("1", _.curryRight.placeholder)(2); // $ExpectType [string, number, boolean] + _(testCurry).curryRight(); // $ExpectType LoDashImplicitWrapper> + _.chain(testCurry).curryRight(); // $ExpectType LoDashExplicitWrapper> + + fp.curryRight(testCurry)("1", 2, true); // $ExpectType [string, number, boolean] + fp.curryRight(testCurry)(true)("1", 2); // $ExpectType [string, number, boolean] + fp.curryRight(testCurry)(2, true)("1"); // $ExpectType [string, number, boolean] + fp.curryRight(testCurry)(true)(2)("1"); // $ExpectType [string, number, boolean] + fp.curryRight(testCurry)(2, true); // $ExpectType RightCurriedFunction1 + fp.curryRight(testCurry)(true)(2); // $ExpectType RightCurriedFunction1 + fp.curryRight(testCurry)(true); // $ExpectType RightCurriedFunction2 + fp.curryRight(testCurry); // $ExpectType RightCurriedFunction3 + fp.curryRight(testCurry)("1", fp.__, true)(2); // $ExpectType [string, number, boolean] + fp.curryRight(testCurry)("1", fp.curryRight.placeholder, true)(2); // $ExpectType [string, number, boolean] + fp.curryRightN(3)(testCurry)("1", fp.curryRightN.placeholder, true)(2); // $ExpectType [string, number, boolean] +} + +// _.debounce +{ + const func = (n: number, s: string): boolean => true; + const options: _.DebounceSettings = { + leading: true, + maxWait: 100, + trailing: false, + }; + + const result = _.debounce(func); // $ExpectType ((n: number, s: string) => boolean) & Cancelable + result.cancel(); // $ExpectType void + result.flush(); // $ExpectType void + _.debounce(func, 42); // $ExpectType ((n: number, s: string) => boolean) & Cancelable + _.debounce(func, 42, options); // $ExpectType ((n: number, s: string) => boolean) & Cancelable + + _(func).debounce(42, options); // $ExpectType LoDashImplicitWrapper<((n: number, s: string) => boolean) & Cancelable> + _.chain(func).debounce(42, options); // $ExpectType LoDashExplicitWrapper<((n: number, s: string) => boolean) & Cancelable> + fp.debounce(42, func); // $ExpectType ((n: number, s: string) => boolean) & Cancelable + fp.debounce(42)(func); // $ExpectType ((n: number, s: string) => boolean) & Cancelable +} + +// _.defer +{ + const func = (a: number, b: string) => true; + + _.defer(func); // $ExpectType number + _.defer(func, anything, anything, anything); // $ExpectType number + _(func).defer(); // $ExpectType LoDashImplicitWrapper + _(func).defer(anything, anything, anything); // $ExpectType LoDashImplicitWrapper + _.chain(func).defer(); // $ExpectType LoDashExplicitWrapper + _.chain(func).defer(anything, anything, anything); // $ExpectType LoDashExplicitWrapper + fp.defer(func); // $ExpectType number +} + +// _.delay +{ + const func = (a: number, b: string) => true; + + _.delay(func, 500); // $ExpectType number + _.delay(func, 500, anything, anything); // $ExpectType number + _(func).delay(500); // $ExpectType LoDashImplicitWrapper + _(func).delay(500, anything, anything); // $ExpectType LoDashImplicitWrapper + _.chain(func).delay(500); // $ExpectType LoDashExplicitWrapper + _.chain(func).delay(500, anything, anything); // $ExpectType LoDashExplicitWrapper + fp.delay(500, func); // $ExpectType number + fp.delay(500)(func); // $ExpectType number +} + +// _.flip +{ + // TODO: fix - output arguments should be reversed + _.flip((a: string, b: number): boolean => true); // $ExpectType (a: string, b: number) => boolean + _((a: string, b: number): boolean => true).flip(); // $ExpectType LoDashImplicitWrapper<(a: string, b: number) => boolean> + _.chain((a: string, b: number): boolean => true).flip(); // $ExpectType LoDashExplicitWrapper<(a: string, b: number) => boolean> + fp.flip((a: string, b: number): boolean => true); // $ExpectType (a: string, b: number) => boolean +} + +// _.flow +// _.flowRight +{ + const fn1 = (n: number): number => 0; + const fn2 = (m: number, n: number): number => 0; + const fn3 = (a: number): string => ""; + const fn4 = (a: string): boolean => true; + + _.flow(fn2, fn1); // $ExpectType (a1: number, a2: number) => number + _.flow(fn2, fn1, fn1, fn1, fn1, fn1, fn1); // $ExpectType (a1: number, a2: number) => number + _.flow(fn2, fn1, fn3, fn4); // $ExpectType (a1: number, a2: number) => boolean + _.flow([fn2, fn1, fn3, fn4]); // $ExpectType (...args: any[]) => any + + _(fn2).flow(fn1); // $ExpectType LoDashImplicitWrapper<(a1: number, a2: number) => number> + _(fn2).flow(fn1, fn1); // $ExpectType LoDashImplicitWrapper<(a1: number, a2: number) => number> + _(fn2).flow(fn1, fn1, fn1); // $ExpectType LoDashImplicitWrapper<(a1: number, a2: number) => number> + _(fn2).flow([fn1, fn1, fn1]); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => any> + + _.chain(fn2).flow(fn1); // $ExpectType LoDashExplicitWrapper<(a1: number, a2: number) => number> + _.chain(fn2).flow(fn1, fn1); // $ExpectType LoDashExplicitWrapper<(a1: number, a2: number) => number> + _.chain(fn2).flow(fn1, fn1, fn1); // $ExpectType LoDashExplicitWrapper<(a1: number, a2: number) => number> + _.chain(fn2).flow([fn1, fn1, fn1]); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => any> + + fp.flow(fn1, fn1); // $ExpectType (a1: number) => number + fp.flow(fn1, fn3); // $ExpectType (a1: number) => string + fp.flow(fn2, fn1, fn1); // $ExpectType (a1: number, a2: number) => number + fp.flow(fn2, fn1, fn1, fn1); // $ExpectType (a1: number, a2: number) => number + fp.flow(fn2, fn1, fn1, fn1, fn1); // $ExpectType (a1: number, a2: number) => number + fp.flow(fn2, fn1, fn1, fn1, fn1, fn1); // $ExpectType (a1: number, a2: number) => number + fp.flow(fn2, fn1, fn1, fn1, fn1, fn1, fn1); // $ExpectType (a1: number, a2: number) => number + fp.flow(fn2, fn3); // $ExpectType (a1: number, a2: number) => string + fp.flow(fn2, fn3, fn4); // $ExpectType (a1: number, a2: number) => boolean + fp.flow(fn2, fn1, fn3, fn4); // $ExpectType (a1: number, a2: number) => boolean + fp.flow([fn2, fn1, fn3, fn4]); // $ExpectType (...args: any[]) => any + + _.flowRight(fn1, fn2); // $ExpectType (a1: number, a2: number) => number + _.flowRight(fn1, fn1, fn2); // $ExpectType (a1: number, a2: number) => number + _.flowRight(fn1, fn1, fn1, fn2); // $ExpectType (a1: number, a2: number) => number + _.flowRight([fn1, fn1, fn1, fn2]); // $ExpectType (...args: any[]) => any + + _(fn1).flowRight(fn2); // $ExpectType LoDashImplicitWrapper<(a1: number, a2: number) => number> + _(fn1).flowRight(fn1, fn2); // $ExpectType LoDashImplicitWrapper<(a1: number, a2: number) => number> + _(fn1).flowRight(fn1, fn1, fn2); // $ExpectType LoDashImplicitWrapper<(a1: number, a2: number) => number> + _(fn1).flowRight([fn1, fn1, fn2]); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => any> + + _.chain(fn1).flowRight(fn2); // $ExpectType LoDashExplicitWrapper<(a1: number, a2: number) => number> + _.chain(fn1).flowRight(fn1, fn2); // $ExpectType LoDashExplicitWrapper<(a1: number, a2: number) => number> + _.chain(fn1).flowRight(fn1, fn1, fn2); // $ExpectType LoDashExplicitWrapper<(a1: number, a2: number) => number> + _.chain(fn1).flowRight([fn1, fn1, fn2]); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => any> + + fp.flowRight(fn1, fn1); // $ExpectType (a1: number) => number + fp.flowRight(fn3, fn1); // $ExpectType (a1: number) => string + fp.flowRight(fn1, fn1, fn2); // $ExpectType (a1: number, a2: number) => number + fp.flowRight(fn1, fn1, fn1, fn2); // $ExpectType (a1: number, a2: number) => number + fp.flowRight(fn1, fn1, fn1, fn1, fn2); // $ExpectType (a1: number, a2: number) => number + fp.flowRight(fn1, fn1, fn1, fn1, fn1, fn2); // $ExpectType (a1: number, a2: number) => number + fp.flowRight(fn1, fn1, fn1, fn1, fn1, fn1, fn2); // $ExpectType (a1: number, a2: number) => number + fp.flowRight(fn3, fn2); // $ExpectType (a1: number, a2: number) => string + fp.flowRight(fn4, fn3, fn2); // $ExpectType (a1: number, a2: number) => boolean + fp.flowRight(fn4, fn3, fn1, fn2); // $ExpectType (a1: number, a2: number) => boolean + fp.flowRight([fn4, fn3, fn1, fn2]); // $ExpectType (...args: any[]) => any +} + +// _.memoize +{ + const memoizedFunction: _.MemoizedFunction = anything; + memoizedFunction.cache; // $ExpectType MapCache + + const testMapCache: _.MapCache = { + delete(key: string) { return true; }, + get(key: string): any { return 1; }, + has(key: string) { return true; }, + set(key: string, value: any): _.Dictionary { return {}; }, + clear() { }, + }; + + const memoizeFn = (a1: string, a2: number): boolean => true; + const memoizeResolverFn = (a1: string, a2: number) => ""; + + _.memoize(memoizeFn); // $ExpectType ((a1: string, a2: number) => boolean) & MemoizedFunction + _.memoize(memoizeFn, memoizeResolverFn); // $ExpectType ((a1: string, a2: number) => boolean) & MemoizedFunction + _(memoizeFn).memoize(); // $ExpectType LoDashImplicitWrapper<((a1: string, a2: number) => boolean) & MemoizedFunction> + _(memoizeFn).memoize(memoizeResolverFn); // $ExpectType LoDashImplicitWrapper<((a1: string, a2: number) => boolean) & MemoizedFunction> + _.chain(memoizeFn).memoize(); // $ExpectType LoDashExplicitWrapper<((a1: string, a2: number) => boolean) & MemoizedFunction> + _.chain(memoizeFn).memoize(memoizeResolverFn); // $ExpectType LoDashExplicitWrapper<((a1: string, a2: number) => boolean) & MemoizedFunction> + fp.memoize(memoizeFn); // $ExpectType ((a1: string, a2: number) => boolean) & MemoizedFunction + + // $ExpectType MapCache + new _.memoize.Cache(); +} + +// _.overArgs +{ + const func = (a: number, b: string) => true; + + _.overArgs(func, (a: number) => true, (b: string) => true); // $ExpectType (...args: any[]) => any + _.overArgs(func, [(a: number) => true, (b: string) => true]); // $ExpectType (...args: any[]) => any + _(func).overArgs((a: number) => true, (b: string) => true); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => any> + _(func).overArgs([(a: number) => true, (b: string) => true]); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => any> + _.chain(func).overArgs((a: number) => true, (b: string) => true); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => any> + _.chain(func).overArgs([(a: number) => true, (b: string) => true]); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => any> + + fp.overArgs(func, [(a: number) => true, (b: string) => true]); // $ExpectType (...args: any[]) => any + fp.overArgs(func)([(a: number) => true, (b: string) => true]); // $ExpectType (...args: any[]) => any +} + +// _.negate +{ + _.negate((a1: number, a2: number): boolean => true); // $ExpectType (a1: number, a2: number) => boolean + _((a1: number, a2: number): boolean => true).negate(); // $ExpectType LoDashImplicitWrapper<(a1: number, a2: number) => boolean> + _.chain((a1: number, a2: number): boolean => true).negate(); // $ExpectType LoDashExplicitWrapper<(a1: number, a2: number) => boolean> + fp.negate((a1: number, a2: number): boolean => true); // $ExpectType (a1: number, a2: number) => boolean +} + +// _.once +{ + _.once((a: string, b: number): boolean => true); // $ExpectType (a: string, b: number) => boolean + _((a: string, b: number): boolean => true).once(); // $ExpectType LoDashImplicitWrapper<(a: string, b: number) => boolean> + _.chain((a: string, b: number): boolean => true).once(); // $ExpectType LoDashExplicitWrapper<(a: string, b: number) => boolean> + fp.once((a: string, b: number): boolean => true); // $ExpectType (a: string, b: number) => boolean +} + +// _.rearg +{ + const testReargFn = (a: string, b: string, c: string) => [a, b, c]; + _.rearg(testReargFn, 2, 0, 1); // $ExpectType (...args: any[]) => any + _.rearg(testReargFn, [2, 0, 1]); // $ExpectType (...args: any[]) => any + _(testReargFn).rearg(2, 0, 1); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => any> + _(testReargFn).rearg([2, 0, 1]); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => any> + _.chain(testReargFn).rearg(2, 0, 1); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => any> + _.chain(testReargFn).rearg([2, 0, 1]); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => any> + + fp.rearg([2, 0, 1], testReargFn); // $ExpectType (...args: any[]) => any + fp.rearg([2, 0, 1])(testReargFn); // $ExpectType (...args: any[]) => any +} + +// _.rest +{ + _.rest((a: string, b: number[]) => true); // $ExpectType (...args: any[]) => any + _.rest((a: string, b: number[]) => true, 1); // $ExpectType (...args: any[]) => any + _((a: string, b: number[]) => true).rest(); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => any> + _((a: string, b: number[]) => true).rest(1); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => any> + _.chain((a: string, b: number[]) => true).rest(); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => any> + _.chain((a: string, b: number[]) => true).rest(1); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => any> + fp.rest((a: string, b: number[]) => true); // $ExpectType (...args: any[]) => any + fp.restFrom(1)((a: string, b: number[]) => true); // $ExpectType (...args: any[]) => any +} + +// _.spread +{ + _.spread((a: Array): boolean => true); // $ExpectType (...args: any[]) => boolean + _((a: Array): boolean => true).spread(); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => boolean> + _.chain((a: Array): boolean => true).spread(); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => boolean> + fp.spread((a: Array): boolean => true); // $ExpectType (...args: any[]) => boolean +} + +// _.throttle +{ + const options: _.ThrottleSettings = { + leading: true, + trailing: false, + }; + + const func = (a: number, b: string): boolean => true; + + _.throttle(func); // $ExpectType ((a: number, b: string) => boolean) & Cancelable + _.throttle(func, 42); // $ExpectType ((a: number, b: string) => boolean) & Cancelable + _.throttle(func, 42, options); // $ExpectType ((a: number, b: string) => boolean) & Cancelable + _(func).throttle(); // $ExpectType LoDashImplicitWrapper<((a: number, b: string) => boolean) & Cancelable> + _(func).throttle(42); // $ExpectType LoDashImplicitWrapper<((a: number, b: string) => boolean) & Cancelable> + _(func).throttle(42, options); // $ExpectType LoDashImplicitWrapper<((a: number, b: string) => boolean) & Cancelable> + _.chain(func).throttle(); // $ExpectType LoDashExplicitWrapper<((a: number, b: string) => boolean) & Cancelable> + _.chain(func).throttle(42); // $ExpectType LoDashExplicitWrapper<((a: number, b: string) => boolean) & Cancelable> + _.chain(func).throttle(42, options); // $ExpectType LoDashExplicitWrapper<((a: number, b: string) => boolean) & Cancelable> + + fp.throttle(42, func); // $ExpectType ((a: number, b: string) => boolean) & Cancelable + fp.throttle(42)(func); // $ExpectType ((a: number, b: string) => boolean) & Cancelable +} + +// _.unary +{ + _.unary((a: string, b: number): boolean => true); // $ExpectType (arg1: string) => boolean + _((a: string, b: number): boolean => true).unary(); // $ExpectType LoDashImplicitWrapper<(arg1: string) => boolean> + _.chain((a: string, b: number): boolean => true).unary(); // $ExpectType LoDashExplicitWrapper<(arg1: string) => boolean> + fp.unary((a: string, b: number): boolean => true); // $ExpectType (arg1: string) => boolean +} + +// _.wrap +{ + _.wrap("a", (arg1: string, ...args: number[]): boolean => true); // $ExpectType (...args: number[]) => boolean + _("a").wrap((arg1: string, ...args: number[]): boolean => true); // $ExpectType LoDashImplicitWrapper<(...args: number[]) => boolean> + _.chain("a").wrap((arg1: string, ...args: number[]): boolean => true); // $ExpectType LoDashExplicitWrapper<(...args: number[]) => boolean> + fp.wrap((arg1: string, ...args: number[]): boolean => true, "a"); // $ExpectType (...args: number[]) => boolean + fp.wrap((arg1: string, ...args: number[]): boolean => true)("a"); // $ExpectType (...args: number[]) => boolean +} + +/******** + * Lang * + ********/ + +// _.castArray +{ + _.castArray(42); // $ExpectType number[] + _.castArray([42]); // $ExpectType number[] + _.castArray({ a: 42 }); // $ExpectType { a: number; }[] + _(42).castArray(); // $ExpectType LoDashImplicitWrapper + _([42]).castArray(); // $ExpectType LoDashImplicitWrapper + _.chain(42).castArray(); // $ExpectType LoDashExplicitWrapper + _.chain([42]).castArray(); // $ExpectType LoDashExplicitWrapper + + fp.castArray(42); // $ExpectType number[] + fp.castArray([42]); // $ExpectType number[] +} + +// _.clone +{ + _.clone(42); // $ExpectType 42 + _.clone({ a: { b: 42 } }); // $ExpectType { a: { b: number; }; } + _(42).clone(); // $ExpectType number + _({ a: { b: 42 } }).clone(); // $ExpectType { a: { b: number; }; } + _.chain(42).clone(); // $ExpectType LoDashExplicitWrapper + _.chain({ a: { b: 42 } }).clone(); // $ExpectType LoDashExplicitWrapper<{ a: { b: number; }; }> + fp.clone(42); // $ExpectType 42 + fp.clone({ a: { b: 42 } }); // $ExpectType { a: { b: number; }; } +} + +// _.cloneDeep +{ + _.cloneDeep(42); // $ExpectType 42 + _.cloneDeep({ a: { b: 42 } }); // $ExpectType { a: { b: number; }; } + _(42).cloneDeep(); // $ExpectType number + _({ a: { b: 42 } }).cloneDeep(); // $ExpectType { a: { b: number; }; } + _.chain(42).cloneDeep(); // $ExpectType LoDashExplicitWrapper + _.chain({ a: { b: 42 } }).cloneDeep(); // $ExpectType LoDashExplicitWrapper<{ a: { b: number; }; }> + fp.cloneDeep(42); // $ExpectType 42 + fp.cloneDeep({ a: { b: 42 } }); // $ExpectType { a: { b: number; }; } +} + +// _.cloneDeepWith +{ + const customizer = (x: any) => ""; + + _.cloneDeepWith(42, customizer); // $ExpectType any + _(42).cloneDeepWith(customizer); // $ExpectType any + _.chain(42).cloneDeepWith(customizer); // $ExpectType LoDashExplicitWrapper + + _.cloneDeepWith({a: {b: 42}}, customizer); // $ExpectType any + + fp.cloneDeepWith((x) => "", 42); // $ExpectType any + fp.cloneDeepWith((x) => "")(42); // $ExpectType any + fp.cloneDeepWith((x) => "", [42]); // $ExpectType any + fp.cloneDeepWith((x) => "", { a: { b: 42 } }); // $ExpectType any +} + +// _.cloneWith +{ + { + const customizer = (x: number) => ""; + + _.cloneWith(42, customizer); // $ExpectType string + _(42).cloneWith(customizer); // $ExpectType string + _.chain(42).cloneWith(customizer); // $ExpectType LoDashExplicitWrapper + + fp.cloneWith(customizer, 42); // $ExpectType string + fp.cloneWith(customizer)(42); // $ExpectType string + } { - let result: number[]; + const customizer = (x: number): string | undefined => ""; - result = _.zipWith([1, 2], (value1) => { - value1; // $ExpectType number - return 1; - }); - result = _.zipWith([1, 2], [1, 2], (value1, value2) => { - value1; // $ExpectType number - value2; // $ExpectType number - return 1; - }); - result = _.zipWith([1, 2], [1, 2], [1, 2], (value1, value2, value3) => { - value1; // $ExpectType number - value2; // $ExpectType number - value3; // $ExpectType number - return 1; - }); - result = _.zipWith([1, 2], [1, 2], [1, 2], [1, 2], (value1, value2, value3, value4) => { - value1; // $ExpectType number - value2; // $ExpectType number - value3; // $ExpectType number - value4; // $ExpectType number - return 1; - }); - result = _.zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], (value1, value2, value3, value4, value5) => { - value1; // $ExpectType number - value2; // $ExpectType number - value3; // $ExpectType number - value4; // $ExpectType number - value5; // $ExpectType number - return 1; - }); - result = _.zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], (value1, value2, value3, value4, value5, value6) => { - value1; // $ExpectType number - value2; // $ExpectType number - value3; // $ExpectType number - value4; // $ExpectType number - value5; // $ExpectType number - value6; // $ExpectType number - return 1; - }); - result = _.zipWith([1, 2], [1, 2], [1, 2], (...group: number[]) => 1); - result = _.zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], (...group) => { - group; // $ExpectType number[] - return 1; - }); + _.cloneWith(42, customizer); // string | 42 + _(42).cloneWith(customizer); // string | 42 + _.chain(42).cloneWith(customizer); // string | 42 - let mat = [[1, 2], [1, 2], [1, 2]]; - result = _.zipWith(...mat, (...group: number[]) => 1); - - result = _([1, 2]).zipWith((value1) => { - value1; // $ExpectType number - return 1; - }).value(); - result = _([1, 2]).zipWith([1, 2], (value1, value2) => { - value1; // $ExpectType number - value2; // $ExpectType number - return 1; - }).value(); - result = _([1, 2]).zipWith([1, 2], [1, 2], (value1, value2, value3) => { - value1; // $ExpectType number - value2; // $ExpectType number - value3; // $ExpectType number - return 1; - }).value(); - result = _([1, 2]).zipWith([1, 2], [1, 2], [1, 2], (value1, value2, value3, value4) => { - value1; // $ExpectType number - value2; // $ExpectType number - value3; // $ExpectType number - value4; // $ExpectType number - return 1; - }).value(); - result = _([1, 2]).zipWith([1, 2], [1, 2], [1, 2], [1, 2], (value1, value2, value3, value4, value5) => { - value1; // $ExpectType number - value2; // $ExpectType number - value3; // $ExpectType number - value4; // $ExpectType number - value5; // $ExpectType number - return 1; - }).value(); - result = _([1, 2]).zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], (value1, value2, value3, value4, value5, value6) => { - value1; // $ExpectType number - value2; // $ExpectType number - value3; // $ExpectType number - value4; // $ExpectType number - value5; // $ExpectType number - value6; // $ExpectType number - return 1; - }).value(); - result = _([1, 2]).zipWith([1, 2], [1, 2], (...group: number[]) => 1).value(); - result = _([1, 2]).zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], (...group) => { - group; // $ExpectType number[] - return 1; - }).value(); - - result = _.chain([1, 2]).zipWith((value1) => { - value1; // $ExpectType number - return 1; - }).value(); - result = _.chain([1, 2]).zipWith([1, 2], (value1, value2) => { - value1; // $ExpectType number - value2; // $ExpectType number - return 1; - }).value(); - result = _.chain([1, 2]).zipWith([1, 2], [1, 2], (value1, value2, value3) => { - value1; // $ExpectType number - value2; // $ExpectType number - value3; // $ExpectType number - return 1; - }).value(); - result = _.chain([1, 2]).zipWith([1, 2], [1, 2], [1, 2], (value1, value2, value3, value4) => { - value1; // $ExpectType number - value2; // $ExpectType number - value3; // $ExpectType number - value4; // $ExpectType number - return 1; - }).value(); - result = _.chain([1, 2]).zipWith([1, 2], [1, 2], [1, 2], [1, 2], (value1, value2, value3, value4, value5) => { - value1; // $ExpectType number - value2; // $ExpectType number - value3; // $ExpectType number - value4; // $ExpectType number - value5; // $ExpectType number - return 1; - }).value(); - result = _.chain([1, 2]).zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], (value1, value2, value3, value4, value5, value6) => { - value1; // $ExpectType number - value2; // $ExpectType number - value3; // $ExpectType number - value4; // $ExpectType number - value5; // $ExpectType number - value6; // $ExpectType number - return 1; - }).value(); - result = _.chain([1, 2]).zipWith([1, 2], [1, 2], (...group: number[]) => 1).value(); - result = _.chain([1, 2]).zipWith([1, 2], [1, 2], [1, 2], [1, 2], [1, 2], (...group) => { - group; // $ExpectType number[] - return 1; - }).value(); - - result = _([1, 2]).zipWith(["a", "b"], (value1, value2) => { - value1; // $ExpectType number - value2; // $ExpectType string - return 1; - }).value(); - - result = _([1, 2]).zipWith(["a", "b"], [true, false], (value1, value2, value3) => { - value1; // $ExpectType number - value2; // $ExpectType string - value3; // $ExpectType boolean - return 1; - }).value(); + // Note: TS 2.5 fails without explicit <42, string> + fp.cloneWith<42, string>(customizer, 42); // $ExpectType string | 42 + fp.cloneWith<42, string>(customizer)(42); // $ExpectType string | 42 } } -/********* - * Chain * - *********/ +// _.conforms +{ + _.conforms({ foo: (v: string) => false })({ foo: "foo" }); // $ExpectType boolean + fp.conforms({ foo: (v: string) => false })({ foo: "foo" }); // $ExpectType boolean +} + +// _.conformsTo +{ + _.conformsTo({ foo: "foo" }, { foo: (v: string) => false }); // $ExpectType boolean + _({ foo: "foo" }).conformsTo({ foo: (v: string) => false }); // $ExpectType boolean + _.chain({ foo: "foo" }).conformsTo({ foo: (v: string) => false }); // $ExpectType LoDashExplicitWrapper + + fp.conformsTo({ foo: (v: string) => false }, { foo: "foo" }); // $ExpectType boolean + fp.conformsTo({ foo: (v: string) => false })({ foo: "foo" }); // $ExpectType boolean +} + +// _.eq +{ + _.eq(anything, anything); // $ExpectType boolean + _(anything).eq(anything); // $ExpectType boolean + _.chain(anything).eq(anything); // $ExpectType LoDashExplicitWrapper + + fp.eq(anything, anything); // $ExpectType boolean + fp.eq(anything)(anything); // $ExpectType boolean +} + +// _.gt +{ + _.gt(anything, anything); // $ExpectType boolean + _(anything).gt(anything); // $ExpectType boolean + _.chain(anything).gt(anything); // $ExpectType LoDashExplicitWrapper + + fp.gt(anything, anything); // $ExpectType boolean + fp.gt(anything)(anything); // $ExpectType boolean +} + +// _.gte +{ + _.gte(anything, anything); // $ExpectType boolean + _(anything).gte(anything); // $ExpectType boolean + _.chain(anything).gte(anything); // $ExpectType LoDashExplicitWrapper + + fp.gte(anything, anything); // $ExpectType boolean + fp.gte(anything)(anything); // $ExpectType boolean +} + +// _.isArguments +{ + const value: number | IArguments = 0; + + if (_.isArguments(value)) { + const result: IArguments = value; + } else { + value; // $ExpectType number + } + + if (fp.isArguments(value)) { + const result: IArguments = value; + } else { + value; // $ExpectType number + } + + _.isArguments(""); // $ExpectType boolean + _({}).isArguments(); // $ExpectType boolean + _.chain([]).isArguments(); // $ExpectType LoDashExplicitWrapper + fp.isArguments(anything); // $ExpectType boolean +} + +// _.isArray +{ + const value: number | string[] | boolean[] = anything; + + if (_.isArray(value)) { + const result: string[] | boolean[] = value; + } else { + value; // $ExpectType number + } + + if (fp.isArray(value)) { + const result: string[] | boolean[] = value; + } else { + value; // $ExpectType number + } + + _.isArray(anything); // $ExpectType boolean + _({}).isArray(); // $ExpectType boolean + _.chain([]).isArray(); // $ExpectType LoDashExplicitWrapper + fp.isArray(anything); // $ExpectType boolean +} + +// _.isArrayBuffer +{ + const value: ArrayBuffer | number = anything; + + if (_.isArrayBuffer(value)) { + value; // $ExpectType ArrayBuffer + } else { + value; // $ExpectType number + } + + if (fp.isArrayBuffer(value)) { + value; // $ExpectType ArrayBuffer + } else { + value; // $ExpectType number + } + + _.isArrayBuffer(anything); // $ExpectType boolean + _({}).isArrayBuffer(); // $ExpectType boolean + _.chain([]).isArrayBuffer(); // $ExpectType LoDashExplicitWrapper + fp.isArrayBuffer(anything); // $ExpectType boolean +} + +// _.isArrayLike +{ + { + const value: string | string[] | { [index: number]: boolean, length: number } | [number, boolean] + | number | { length: string } | { a: string } | null | undefined + = anything; + + if (_.isArrayLike(value)) { + const result: string | string[] | { [index: number]: boolean, length: number } | [number, boolean] = value; + } else { + const result: number | { length: string } | { a: string; } | null | undefined = value; + } + + if (fp.isArrayLike(value)) { + const result: string | string[] | { [index: number]: boolean; length: number; } | [number, boolean] = value; + } else { + const result: number | { length: string; } | { a: string; } | null | undefined = value; + } + } + + { + const value: boolean[] = anything; + + if (_.isArrayLike(value)) { + const result: boolean[] = value; + } else { + value; // $ExpectType never + } + + if (fp.isArrayLike(value)) { + value; // $ExpectType boolean[] + } else { + value; // $ExpectType never + } + } + + { + const value: () => number = anything; + + if (_.isArrayLike(value)) { + value; // $ExpectType never + } else { + value; // $ExpectType () => number + } + + if (fp.isArrayLike(value)) { + value; // $ExpectType never + } else { + value; // $ExpectType () => number + } + } + + { + const value: { a: string } = anything; + + if (_.isArrayLike(value)) { + const result: { a: string, length: number } = value; + } else { + value; // $ExpectType { a: string; } + } + + if (fp.isArrayLike(value)) { + const result: { a: string, length: number } = value; + } else { + value; // $ExpectType { a: string; } + } + } + + { + const value: any = anything; + + if (_.isArrayLike(value)) { + value; // $ExpectType any + } else { + value; // $ExpectType any + } + + if (fp.isArrayLike(value)) { + value; // $ExpectType any + } else { + value; // $ExpectType any + } + } + + _.isArrayLike(anything); // $ExpectType boolean + _({}).isArrayLike(); // $ExpectType boolean + _.chain([]).isArrayLike(); // $ExpectType LoDashExplicitWrapper + fp.isArrayLike(anything); // $ExpectType boolean +} + +// _.isArrayLikeObject +{ + { + const value: string[] | { [index: number]: boolean, length: number } | [number, boolean] + | number | string | { length: string } | { a: string } | null | undefined + = anything; + + if (_.isArrayLikeObject(value)) { + const result: string[] | { [index: number]: boolean, length: number } | [number, boolean] = value; + } else { + const result: string | number | { length: string; } | { a: string; } | null | undefined = value; + } + + if (fp.isArrayLikeObject(value)) { + const result: string[] | [number, boolean] | { [index: number]: boolean; length: number; } = value; + } else { + const result: string | number | { length: string; } | { a: string; } | null | undefined = value; + } + } + + { + const value: boolean[] = anything; + + if (_.isArrayLikeObject(value)) { + const result: boolean[] = value; + } else { + value; // $ExpectType never + } + + if (fp.isArrayLikeObject(value)) { + const result: boolean[] = value; + } else { + value; // $ExpectType never + } + } + + { + const value: (a: string) => boolean = anything; + + if (_.isArrayLikeObject(value)) { + value; // $ExpectType never + } else { + value; // $ExpectType (a: string) => boolean + } + + if (fp.isArrayLikeObject(value)) { + value; // $ExpectType never + } else { + value; // $ExpectType (a: string) => boolean + } + } + + { + const value: { a: string } = anything; + + if (_.isArrayLikeObject(value)) { + const result: { a: string, length: number } = value; + } else { + value; // $ExpectType { a: string; } + } + + if (fp.isArrayLikeObject(value)) { + const result: { a: string, length: number } = value; + } else { + value; // $ExpectType { a: string; } + } + } + + { + const value: any = anything; + + if (_.isArrayLikeObject(value)) { + value; // $ExpectType any + } else { + value; // $ExpectType any + } + + if (fp.isArrayLikeObject(value)) { + value; // $ExpectType any + } else { + value; // $ExpectType any + } + } + + _.isArrayLikeObject(anything); // $ExpectType boolean + _({}).isArrayLikeObject(); // $ExpectType boolean + _.chain([]).isArrayLikeObject(); // $ExpectType LoDashExplicitWrapper + fp.isArrayLikeObject(anything); // $ExpectType boolean +} + +// _.isBoolean +{ + const value: number | boolean = 0; + + if (_.isBoolean(value)) { + const result: boolean = value; + } else { + value; // $ExpectType number + } + + if (fp.isBoolean(value)) { + const result: boolean = value; + } else { + value; // $ExpectType number + } + + _.isBoolean(anything); // $ExpectType boolean + _({}).isBoolean(); // $ExpectType boolean + _.chain([]).isBoolean(); // $ExpectType LoDashExplicitWrapper +} + +// _.isBuffer +{ + _.isBuffer(anything); // $ExpectType boolean + _({}).isBuffer(); // $ExpectType boolean + _.chain([]).isBuffer(); // $ExpectType LoDashExplicitWrapper + fp.isBuffer(anything); // $ExpectType boolean +} + +// _.isDate +{ + const value: number | Date = 0; + + if (_.isDate(value)) { + const result: Date = value; + } else { + value; // $ExpectType number + } + + if (fp.isDate(value)) { + const date: Date = value; + } else { + value; // $ExpectType number + } + + _.isDate(anything); // $ExpectType boolean + _({}).isDate(); // $ExpectType boolean + _.chain([]).isDate(); // $ExpectType LoDashExplicitWrapper + fp.isDate(anything); // $ExpectType boolean +} + +// _.isElement +{ + _.isElement(anything); // $ExpectType boolean + _({}).isElement(); // $ExpectType boolean + _.chain([]).isElement(); // $ExpectType LoDashExplicitWrapper + fp.isElement(anything); // $ExpectType boolean +} + +// _.isEmpty +{ + _.isEmpty(anything); // $ExpectType boolean + _({}).isEmpty(); // $ExpectType boolean + _.chain([]).isEmpty(); // $ExpectType LoDashExplicitWrapper + fp.isEmpty(anything); // $ExpectType boolean +} + +// _.isEqual +{ + _.isEqual(anything, anything); // $ExpectType boolean + _(anything).isEqual(anything); // $ExpectType boolean + _.chain(anything).isEqual(anything); // $ExpectType LoDashExplicitWrapper + + fp.isEqual(anything, anything); // $ExpectType boolean + fp.isEqual(anything)(anything); // $ExpectType boolean + fp.equals(anything)(anything); // $ExpectType boolean +} + +// _.isEqualWith +{ + const customizer = (value: any, other: any, indexOrKey: number|string|symbol|undefined, parent: any, otherParent: any, stack: any) => true; + + _.isEqualWith(anything, anything, customizer); // $ExpectType boolean + _(anything).isEqualWith(anything, customizer); // $ExpectType boolean + _.chain(anything).isEqualWith(anything, customizer); // $ExpectType LoDashExplicitWrapper + + fp.isEqualWith(customizer, anything, anything); // $ExpectType boolean + fp.isEqualWith(customizer)(anything)(anything); // $ExpectType boolean +} + +// _.isError +{ + { + const value: number | Error = anything; + + if (_.isError(value)) { + value; // $ExpectType Error + } else { + value; // $ExpectType number + } + + if (fp.isError(value)) { + value; // $ExpectType Error + } else { + value; // $ExpectType number + } + } + + { + class CustomError extends Error { + custom: string; + } + + const value: number | CustomError = anything; + + if (_.isError(value)) { + value; // $ExpectType CustomError + } else { + value; // $ExpectType number + } + + if (fp.isError(value)) { + value; // $ExpectType CustomError + } else { + value; // $ExpectType number + } + } + + _.isError(anything); // $ExpectType boolean + _({}).isError(); // $ExpectType boolean + _.chain([]).isError(); // $ExpectType LoDashExplicitWrapper + fp.isError(anything); // $ExpectType boolean +} + +// _.isFinite +{ + _.isFinite(NaN); // $ExpectType boolean + _(42).isFinite(); // $ExpectType boolean + _.chain([]).isFinite(); // $ExpectType LoDashExplicitWrapper + fp.isFinite(anything); // $ExpectType boolean +} + +// _.isFunction +{ + const value: number | (() => void) = anything; + + if (_.isFunction(value)) { + value; // $ExpectType () => void + } else { + value; // $ExpectType number + } + + if (fp.isFunction(value)) { + value; // $ExpectType () => void + } else { + value; // $ExpectType number + } + + if (_.isFunction(anything)) { + anything(); + } + + if (fp.isFunction(anything)) { + anything(); + } + + _.isFunction(anything); // $ExpectType boolean + _({}).isFunction(); // $ExpectType boolean + _.chain([]).isFunction(); // $ExpectType LoDashExplicitWrapper + fp.isFunction(anything); // $ExpectType boolean +} + +// _.isInteger +{ + _.isInteger(NaN); // $ExpectType boolean + _(42).isInteger(); // $ExpectType boolean + _.chain([]).isInteger(); // $ExpectType LoDashExplicitWrapper + fp.isInteger(anything); // $ExpectType boolean +} + +// _.isLength +{ + _.isLength(NaN); // $ExpectType boolean + _(42).isLength(); // $ExpectType boolean + _.chain([]).isLength(); // $ExpectType LoDashExplicitWrapper + fp.isLength(anything); // $ExpectType boolean +} + +// _.isMap +{ + const value: number | Map = 0; + + if (_.isMap(value)) { + const result: Map = value; + } else { + const result: number = value; + } + + if (fp.isMap(value)) { + const result: Map = value; + } else { + const result: number = value; + } + + _.isMap(anything); // $ExpectType boolean + _({}).isMap(); // $ExpectType boolean + _.chain([]).isMap(); // $ExpectType LoDashExplicitWrapper + fp.isMap(anything); // $ExpectType boolean +} + +// _.isMatch +{ + _.isMatch({}, {}); // $ExpectType boolean + _({}).isMatch({}); // $ExpectType boolean + _.chain({}).isMatch({}); // $ExpectType LoDashExplicitWrapper + fp.isMatch({}, {}); // $ExpectType boolean + fp.isMatch({})({}); // $ExpectType boolean +} + +// _.isMatchWith +{ + const testIsMatchCustiomizerFn = (value: any, other: any, indexOrKey: number|string|symbol) => true; + + _.isMatchWith({}, {}, testIsMatchCustiomizerFn); // $ExpectType boolean + _({}).isMatchWith({}, testIsMatchCustiomizerFn); // $ExpectType boolean + _.chain({}).isMatchWith({}, testIsMatchCustiomizerFn); // $ExpectType LoDashExplicitWrapper + + fp.isMatchWith(testIsMatchCustiomizerFn, {}, {}); // $ExpectType boolean + fp.isMatchWith(testIsMatchCustiomizerFn)({})({}); // $ExpectType boolean +} + +// _.isNaN +{ + _.isNaN(NaN); // $ExpectType boolean + _(42).isNaN(); // $ExpectType boolean + _.chain([]).isNaN(); // $ExpectType LoDashExplicitWrapper + fp.isNaN(anything); // $ExpectType boolean +} + +// _.isNative +{ + const value: number | (() => void) = anything; + + if (_.isNative(value)) { + value; // $ExpectType () => void + } else { + value; // $ExpectType number + } + + if (fp.isNative(value)) { + value; // $ExpectType () => void + } else { + value; // $ExpectType number + } + + _.isNative(anything); // $ExpectType boolean + _({}).isNative(); // $ExpectType boolean + _.chain([]).isNative(); // $ExpectType LoDashExplicitWrapper + fp.isNative(anything); // $ExpectType boolean +} + +// _.isNil +{ + _.isNil(null); // $ExpectType boolean + _(undefined).isNil(); // $ExpectType boolean + _.chain(NaN).isNil(); // $ExpectType LoDashExplicitWrapper + fp.isNil(undefined); // $ExpectType boolean +} + +// _.isNull +{ + _.isNull(null); // $ExpectType boolean + _(undefined).isNull(); // $ExpectType boolean + _.chain(NaN).isNull(); // $ExpectType LoDashExplicitWrapper + fp.isNull(undefined); // $ExpectType boolean +} + +// _.isNumber +{ + const value: string | number = 0; + + if (_.isNumber(value)) { + const result: number = value; + } else { + const result: string = value; + } + + if (fp.isNumber(value)) { + const result: number = value; + } else { + const result: string = value; + } + + _.isNumber(NaN); // $ExpectType boolean + _(42).isNumber(); // $ExpectType boolean + _.chain([]).isNumber(); // $ExpectType LoDashExplicitWrapper + fp.isNumber(anything); // $ExpectType boolean +} + +// _.isObject +{ + _.isObject(NaN); // $ExpectType boolean + _(42).isObject(); // $ExpectType boolean + _.chain([]).isObject(); // $ExpectType LoDashExplicitWrapper + fp.isObject(anything); // $ExpectType boolean +} + +// _.isObjectLike +{ + _.isObjectLike(NaN); // $ExpectType boolean + _(42).isObjectLike(); // $ExpectType boolean + _.chain([]).isObjectLike(); // $ExpectType LoDashExplicitWrapper + fp.isObjectLike(anything); // $ExpectType boolean +} + +// _.isPlainObject +{ + _.isPlainObject(NaN); // $ExpectType boolean + _(42).isPlainObject(); // $ExpectType boolean + _.chain([]).isPlainObject(); // $ExpectType LoDashExplicitWrapper + fp.isPlainObject(anything); // $ExpectType boolean +} + +// _.isRegExp +{ + { + const value: number | RegExp = anything; + + if (_.isRegExp(value)) { + const result: RegExp = value; + } else { + const result: number = value; + } + + if (fp.isRegExp(value)) { + const result: RegExp = value; + } else { + const result: number = value; + } + } + + _.isRegExp(/./); // $ExpectType boolean + _(42).isRegExp(); // $ExpectType boolean + _.chain([]).isRegExp(); // $ExpectType LoDashExplicitWrapper + fp.isRegExp(anything); // $ExpectType boolean +} + +// _.isSafeInteger +{ + _.isSafeInteger(NaN); // $ExpectType boolean + _(42).isSafeInteger(); // $ExpectType boolean + _.chain([]).isSafeInteger(); // $ExpectType LoDashExplicitWrapper + fp.isSafeInteger(anything); // $ExpectType boolean +} + +// _.isSet +{ + const value: number | Set = 0; + + if (_.isSet(value)) { + const result: Set = value; + } else { + const result: number = value; + } + + if (fp.isSet(value)) { + const result: Set = value; + } else { + const result: number = value; + } + + _.isSet(NaN); // $ExpectType boolean + _(42).isSet(); // $ExpectType boolean + _.chain([]).isSet(); // $ExpectType LoDashExplicitWrapper + fp.isSet(anything); // $ExpectType boolean +} + +// _.isString +{ + const value: number | string = ""; + + if (_.isString(value)) { + const result: string = value; + } else { + const result: number = value; + } + + if (fp.isString(value)) { + const result: string = value; + } else { + const result: number = value; + } + + _.isString(""); // $ExpectType boolean + _(42).isString(); // $ExpectType boolean + _.chain([]).isString(); // $ExpectType LoDashExplicitWrapper + fp.isString(anything); // $ExpectType boolean +} + +// _.isSymbol +{ + _.isSymbol(NaN); // $ExpectType boolean + _(42).isSymbol(); // $ExpectType boolean + _.chain([]).isSymbol(); // $ExpectType LoDashExplicitWrapper + fp.isSymbol(anything); // $ExpectType boolean +} + +// _.isTypedArray +{ + _.isTypedArray(NaN); // $ExpectType boolean + _(42).isTypedArray(); // $ExpectType boolean + _.chain([]).isTypedArray(); // $ExpectType LoDashExplicitWrapper + fp.isTypedArray(anything); // $ExpectType boolean +} + +// _.isUndefined +{ + _.isUndefined(null); // $ExpectType boolean + _(undefined).isUndefined(); // $ExpectType boolean + _.chain(NaN).isUndefined(); // $ExpectType LoDashExplicitWrapper + fp.isUndefined(undefined); // $ExpectType boolean +} + +// _.isWeakMap +{ + const value: number | WeakMap = 0; + + if (_.isWeakMap(value)) { + const result: WeakMap = value; + } else { + const result: number = value; + } + + if (fp.isWeakMap(value)) { + const result: WeakMap = value; + } else { + const result: number = value; + } + + _.isWeakMap(NaN); // $ExpectType boolean + _(42).isWeakMap(); // $ExpectType boolean + _.chain([]).isWeakMap(); // $ExpectType LoDashExplicitWrapper + fp.isWeakMap(anything); // $ExpectType boolean +} + +// _.isWeakSet +{ + const value: number | WeakSet = 0; + + if (_.isWeakSet(value)) { + const result: WeakSet = value; + } else { + const result: number = value; + } + + if (fp.isWeakSet(value)) { + const result: WeakSet = value; + } else { + const result: number = value; + } + + _.isWeakSet(NaN); // $ExpectType boolean + _(42).isWeakSet(); // $ExpectType boolean + _.chain([]).isWeakSet(); // $ExpectType LoDashExplicitWrapper + fp.isWeakSet(anything); // $ExpectType boolean +} + +// _.lt +{ + _.lt(anything, anything); // $ExpectType boolean + _(anything).lt(anything); // $ExpectType boolean + _.chain(anything).lt(anything); // $ExpectType LoDashExplicitWrapper + + fp.lt(anything, anything); // $ExpectType boolean + fp.lt(anything)(anything); // $ExpectType boolean +} + +// _.lte +{ + _.lte(anything, anything); // $ExpectType boolean + _(anything).lte(anything); // $ExpectType boolean + _.chain(anything).lte(anything); // $ExpectType LoDashExplicitWrapper + + fp.lte(anything, anything); // $ExpectType boolean + fp.lte(anything)(anything); // $ExpectType boolean +} + +// _.toArray +{ + const array: AbcObject[] = []; + const list: _.List = []; + const dictionary: _.Dictionary = {}; + const numericDictionary: _.NumericDictionary = {}; + + _.toArray(""); // $ExpectType string[] + _.toArray(array); // $ExpectType AbcObject[] + _.toArray(list); // $ExpectType AbcObject[] + _.toArray(dictionary); // $ExpectType AbcObject[] + _.toArray(numericDictionary); // $ExpectType AbcObject[] + + _(array).toArray(); // $ExpectType LoDashImplicitWrapper + _(list).toArray(); // $ExpectType LoDashImplicitWrapper + _(dictionary).toArray(); // $ExpectType LoDashImplicitWrapper + _(numericDictionary).toArray(); // $ExpectType LoDashImplicitWrapper + + _.chain(array).toArray(); // $ExpectType LoDashExplicitWrapper + _.chain(list).toArray(); // $ExpectType LoDashExplicitWrapper + _.chain(dictionary).toArray(); // $ExpectType LoDashExplicitWrapper + _.chain(numericDictionary).toArray(); // $ExpectType LoDashExplicitWrapper + + fp.toArray(""); // $ExpectType string[] + fp.toArray(array); // $ExpectType AbcObject[] + fp.toArray(list); // $ExpectType AbcObject[] + fp.toArray(dictionary); // $ExpectType AbcObject[] + fp.toArray(numericDictionary); // $ExpectType AbcObject[] +} + +// _.toPlainObject +{ + _.toPlainObject(); // $ExpectType any + _.toPlainObject(true); // $ExpectType any + _.toPlainObject(1); // $ExpectType any + _.toPlainObject("a"); // $ExpectType any + _.toPlainObject([]); // $ExpectType any + _.toPlainObject({}); // $ExpectType any + + _(true).toPlainObject(); // $ExpectType LoDashImplicitWrapper + _([""]).toPlainObject(); // $ExpectType LoDashImplicitWrapper + _({}).toPlainObject(); // $ExpectType LoDashImplicitWrapper + + _.chain(true).toPlainObject(); // $ExpectType LoDashExplicitWrapper + _.chain([""]).toPlainObject(); // $ExpectType LoDashExplicitWrapper + _.chain({}).toPlainObject(); // $ExpectType LoDashExplicitWrapper + + fp.toPlainObject(true); // $ExpectType any + fp.toPlainObject(["a"]); // $ExpectType any + fp.toPlainObject({}); // $ExpectType any +} + +// _.toFinite +{ + _.toFinite(true); // $ExpectType number + _.toFinite(1); // $ExpectType number + _.toFinite("3.2"); // $ExpectType number + _(1).toFinite(); // $ExpectType number + _("3.2").toFinite(); // $ExpectType number + _.chain(1).toFinite(); // $ExpectType LoDashExplicitWrapper + _.chain("3.2").toFinite(); // $ExpectType LoDashExplicitWrapper + fp.toFinite(true); // $ExpectType number + fp.toFinite(1); // $ExpectType number + fp.toFinite("3.2"); // $ExpectType number +} + +// _.toInteger +{ + _.toInteger(true); // $ExpectType number + _.toInteger(1); // $ExpectType number + _.toInteger("3.2"); // $ExpectType number + _(1).toInteger(); // $ExpectType number + _("3.2").toInteger(); // $ExpectType number + _.chain(1).toInteger(); // $ExpectType LoDashExplicitWrapper + _.chain("3.2").toInteger(); // $ExpectType LoDashExplicitWrapper + fp.toInteger(true); // $ExpectType number + fp.toInteger(1); // $ExpectType number + fp.toInteger("3.2"); // $ExpectType number +} + +// _.toLength +{ + _.toLength(true); // $ExpectType number + _.toLength(1); // $ExpectType number + _.toLength("3.2"); // $ExpectType number + _(1).toLength(); // $ExpectType number + _("3.2").toLength(); // $ExpectType number + _.chain(1).toLength(); // $ExpectType LoDashExplicitWrapper + _.chain("3.2").toLength(); // $ExpectType LoDashExplicitWrapper + fp.toLength(true); // $ExpectType number + fp.toLength(1); // $ExpectType number + fp.toLength("3.2"); // $ExpectType number +} + +// _.toNumber +{ + _.toNumber(true); // $ExpectType number + _.toNumber(1); // $ExpectType number + _.toNumber("3.2"); // $ExpectType number + _(1).toNumber(); // $ExpectType number + _("3.2").toNumber(); // $ExpectType number + _.chain(1).toNumber(); // $ExpectType LoDashExplicitWrapper + _.chain("3.2").toNumber(); // $ExpectType LoDashExplicitWrapper + fp.toNumber(true); // $ExpectType number + fp.toNumber(1); // $ExpectType number + fp.toNumber("3.2"); // $ExpectType number +} + +// _.toSafeInteger +{ + _.toSafeInteger(true); // $ExpectType number + _.toSafeInteger(1); // $ExpectType number + _.toSafeInteger("3.2"); // $ExpectType number + _(1).toSafeInteger(); // $ExpectType number + _("3.2").toSafeInteger(); // $ExpectType number + _.chain(1).toSafeInteger(); // $ExpectType LoDashExplicitWrapper + _.chain("3.2").toSafeInteger(); // $ExpectType LoDashExplicitWrapper + fp.toSafeInteger(true); // $ExpectType number + fp.toSafeInteger(1); // $ExpectType number + fp.toSafeInteger("3.2"); // $ExpectType number +} + +/******** + * Math * + ********/ + +// _.add +{ + _.add(1, 1); // $ExpectType number + _(1).add(1); // $ExpectType number + _(1).chain().add(1); // $ExpectType LoDashExplicitWrapper + fp.add(1, 1); // $ExpectType number + fp.add(1)(1); // $ExpectType number +} + +// _.ceil +{ + _.ceil(6.004); // $ExpectType number + _.ceil(6.004, 2); // $ExpectType number + _(6.004).ceil(); // $ExpectType number + _(6.004).ceil(2); // $ExpectType number + _(6.004).chain().ceil(); // $ExpectType LoDashExplicitWrapper + _(6.004).chain().ceil(2); // $ExpectType LoDashExplicitWrapper + fp.ceil(6.004); // $ExpectType number +} + +// _.divide +{ + _.divide(6, 4); // $ExpectType number + _(6).divide(4); // $ExpectType number + _(6).chain().floor(4); // $ExpectType LoDashExplicitWrapper + fp.divide(6, 4); // $ExpectType number + fp.divide(6)(4); // $ExpectType number +} + +// _.floor +{ + _.floor(4.006); // $ExpectType number + _.floor(0.046, 2); // $ExpectType number + _.floor(4060, -2); // $ExpectType number + _(4.006).floor(); // $ExpectType number + _(0.046).floor(2); // $ExpectType number + _(4060).floor(-2); // $ExpectType number + _(4.006).chain().floor(); // $ExpectType LoDashExplicitWrapper + _(0.046).chain().floor(2); // $ExpectType LoDashExplicitWrapper + _(4060).chain().floor(-2); // $ExpectType LoDashExplicitWrapper + fp.floor(4.006); // $ExpectType number +} + +// _.max +// _.min +{ + const list: ArrayLike = anything; + + _.max(list); // $ExpectType string | undefined + _(list).max(); // $ExpectType string | undefined + _.chain(list).max(); // $ExpectType LoDashExplicitWrapper + fp.max(list); // $ExpectType string | undefined + + _.min(list); // $ExpectType string | undefined + _(list).min(); // $ExpectType string | undefined + _.chain(list).min(); // $ExpectType LoDashExplicitWrapper + fp.min(list); // $ExpectType string | undefined +} + +// _.maxBy +// _.minBy +{ + const list: ArrayLike = anything; + + const listIterator = (value: AbcObject, index: number, collection: ArrayLike) => 0; + const valueIterator = (value: AbcObject) => 0; + + _.maxBy(list, listIterator); // $ExpectType AbcObject | undefined + _.maxBy(list, "a"); // $ExpectType AbcObject | undefined + _.maxBy(list, { a: 42 }); // $ExpectType AbcObject | undefined + _(list).maxBy(listIterator); // $ExpectType AbcObject | undefined + _(list).maxBy("a"); // $ExpectType AbcObject | undefined + _(list).maxBy({ a: 42 }); // $ExpectType AbcObject | undefined + _.chain(list).maxBy(listIterator); // $ExpectType LoDashExplicitWrapper + _.chain(list).maxBy("a"); // $ExpectType LoDashExplicitWrapper + _.chain(list).maxBy({ a: 42 }); // $ExpectType LoDashExplicitWrapper + fp.maxBy(valueIterator)(list); // $ExpectType AbcObject | undefined + fp.maxBy("a", list); // $ExpectType AbcObject | undefined + fp.maxBy({ a: 42 }, list); // $ExpectType AbcObject | undefined + + _.minBy(list, listIterator); // $ExpectType AbcObject | undefined + _.minBy(list, "a"); // $ExpectType AbcObject | undefined + _.minBy(list, { a: 42 }); // $ExpectType AbcObject | undefined + _(list).minBy(listIterator); // $ExpectType AbcObject | undefined + _(list).minBy("a"); // $ExpectType AbcObject | undefined + _(list).minBy({ a: 42 }); // $ExpectType AbcObject | undefined + _.chain(list).minBy(listIterator); // $ExpectType LoDashExplicitWrapper + _.chain(list).minBy("a"); // $ExpectType LoDashExplicitWrapper + _.chain(list).minBy({ a: 42 }); // $ExpectType LoDashExplicitWrapper + fp.minBy(valueIterator)(list); // $ExpectType AbcObject | undefined + fp.minBy("a", list); // $ExpectType AbcObject | undefined + fp.minBy({ a: 42 }, list); // $ExpectType AbcObject | undefined +} + +// _.mean +{ + const list: ArrayLike = anything; + + _.mean(list); // $ExpectType number + _(list).mean(); // $ExpectType number + _.chain(list).mean(); // $ExpectType LoDashExplicitWrapper + fp.mean(list); // $ExpectType number +} + +// _.meanBy +{ + const list: ArrayLike = anything; + + _.meanBy(list, (x) => x.a); // $ExpectType number + _.meanBy(list, "a"); // $ExpectType number + _(list).meanBy((x) => x.a); // $ExpectType number + _.chain(list).meanBy((x) => x.a); // $ExpectType LoDashExplicitWrapper + + fp.meanBy((x) => x.a, list); // $ExpectType number + fp.meanBy((x: AbcObject) => x.a)(list); // $ExpectType number + fp.meanBy("a", list); // $ExpectType number +} + +// _.multiply +{ + _.multiply(6, 4); // $ExpectType number + _(6).multiply(4); // $ExpectType number + _(6).chain().multiply(4); // $ExpectType LoDashExplicitWrapper + fp.multiply(6, 4); // $ExpectType number + fp.multiply(6)(4); // $ExpectType number +} + +// _.round +{ + _.round(4.006); // $ExpectType number + _.round(4.006, 2); // $ExpectType number + _(4.006).round(); // $ExpectType number + _(4.006).round(2); // $ExpectType number + _(4.006).chain().round(); // $ExpectType LoDashExplicitWrapper + _(4.006).chain().round(2); // $ExpectType LoDashExplicitWrapper + fp.round(4.006); // $ExpectType number +} + + // _.subtract +{ + _.subtract(3, 2); // $ExpectType number + _(3).subtract(2); // $ExpectType number + _(3).chain().subtract(2); // $ExpectType LoDashExplicitWrapper + fp.subtract(3, 2); // $ExpectType number + fp.subtract(3)(2); // $ExpectType number +} + +// _.sum +{ + const list: ArrayLike | null | undefined = anything; + + _.sum(list); // $ExpectType number + _(list).sum(); // $ExpectType number + _(list).chain().sum(); // $ExpectType LoDashExplicitWrapper + fp.sum(list); // $ExpectType number +} + +// _.sumBy +{ + const list: ArrayLike | null | undefined = anything; + const listIterator = (value: AbcObject) => 0; + + _.sumBy(list, listIterator); // $ExpectType number + _.sumBy(list, "a"); // $ExpectType number + _(list).sumBy(listIterator); // $ExpectType number + _(list).sumBy("a"); // $ExpectType number + _(list).chain().sumBy(listIterator); // $ExpectType LoDashExplicitWrapper + _(list).chain().sumBy("a"); // $ExpectType LoDashExplicitWrapper + + fp.sumBy(listIterator, list); // $ExpectType number + fp.sumBy("a")(list); // $ExpectType number +} + +/********** + * Number * + **********/ + +// _.clamp +{ + _.clamp(3, 2, 4); // $ExpectType number + _.clamp(3, 4); // $ExpectType number + _(3).clamp(2, 4); // $ExpectType number + _(3).clamp(4); // $ExpectType number + _.chain(3).clamp(2, 4); // $ExpectType LoDashExplicitWrapper + fp.clamp(2, 4, 3); // $ExpectType number + fp.clamp(2)(4)(3); // $ExpectType number +} + +// _.inRange +{ + _.inRange(3, 2, 4); // $ExpectType boolean + _.inRange(4, 8); // $ExpectType boolean + _(3).inRange(2, 4); // $ExpectType boolean + _(4).inRange(8); // $ExpectType boolean + _.chain(3).inRange(2, 4); // $ExpectType LoDashExplicitWrapper + _.chain(4).inRange(8); // $ExpectType LoDashExplicitWrapper + fp.inRange(2, 4, 3); // $ExpectType boolean + fp.inRange(2)(4)(3); // $ExpectType boolean +} + +// _.random +{ + _.random(); // $ExpectType number + _.random(1); // $ExpectType number + _.random(1, 2); // $ExpectType number + _.random(1, 2, true); // $ExpectType number + _.random(1, true); // $ExpectType number + _.random(true); // $ExpectType number + + _(1).random(); // $ExpectType number + _(1).random(2); // $ExpectType number + _(1).random(2, true); // $ExpectType number + _(1).random(true); // $ExpectType number + _(true).random(); // $ExpectType number + + _.chain(1).random(); // $ExpectType LoDashExplicitWrapper + _.chain(1).random(2); // $ExpectType LoDashExplicitWrapper + _.chain(1).random(2, true); // $ExpectType LoDashExplicitWrapper + _.chain(1).random(true); // $ExpectType LoDashExplicitWrapper + _.chain(true).random(); // $ExpectType LoDashExplicitWrapper + + fp.random(1, 2); // $ExpectType number + fp.random(1)(2); // $ExpectType number + + _.map([5, 5], _.random); // $ExpectType number[] +} + +/********** + * Object * + **********/ + +// _.assign +// _.assignIn +// _.assignWith +// _.assignInWith +// _.defaults +// _.extend +// _.extendWith +// _.merge +// _.mergeWith +{ + const obj = { a: "" }; + const s1 = { b: 1 }; + const s2 = { c: 1 }; + const s3 = { d: 1 }; + const s4 = { e: 1 }; + const s5 = { f: 1 }; + + const customizer = (objectValue: any, sourceValue: any, key: string | undefined, object: {} | undefined, source: {} | undefined) => 1; + + _.assign(obj); // $ExpectType { a: string; } + _.assign(obj, s1); // $ExpectType { a: string; } & { b: number; } + _.assign(obj, s1, s2, s3, s4); // $ExpectType { a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; } + _.assign(obj, s1, s2, s3, s4, s5); + _(obj).assign(); // $ExpectType LoDashImplicitWrapper<{ a: string; }> + _(obj).assign(s1); // $ExpectType LoDashImplicitWrapper<{ a: string; } & { b: number; }> + _(obj).assign(s1, s2, s3, s4); // $ExpectType LoDashImplicitWrapper<{ a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; }> + _(obj).assign(s1, s2, s3, s4, s5); + _.chain(obj).assign(); // $ExpectType LoDashExplicitWrapper<{ a: string; }> + _.chain(obj).assign(s1); // $ExpectType LoDashExplicitWrapper<{ a: string; } & { b: number; }> + _.chain(obj).assign(s1, s2, s3, s4); // $ExpectType LoDashExplicitWrapper<{ a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; }> + _.chain(obj).assign(s1, s2, s3, s4, s5); + fp.assign(obj, s1); // $ExpectType { a: string; } & { b: number; } + fp.assign(obj)(s1); // $ExpectType { a: string; } & { b: number; } + + _.assignIn(obj); // $ExpectType { a: string; } + _.assignIn(obj, s1); // $ExpectType { a: string; } & { b: number; } + _.assignIn(obj, s1, s2, s3, s4); // $ExpectType { a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; } + _.assignIn(obj, s1, s2, s3, s4, s5); + _(obj).assignIn(); // $ExpectType LoDashImplicitWrapper<{ a: string; }> + _(obj).assignIn(s1); // $ExpectType LoDashImplicitWrapper<{ a: string; } & { b: number; }> + _(obj).assignIn(s1, s2, s3, s4); // $ExpectType LoDashImplicitWrapper<{ a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; }> + _(obj).assignIn(s1, s2, s3, s4, s5); + _.chain(obj).assignIn(); // $ExpectType LoDashExplicitWrapper<{ a: string; }> + _.chain(obj).assignIn(s1); // $ExpectType LoDashExplicitWrapper<{ a: string; } & { b: number; }> + _.chain(obj).assignIn(s1, s2, s3, s4); // $ExpectType LoDashExplicitWrapper<{ a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; }> + _.chain(obj).assignIn(s1, s2, s3, s4, s5); + fp.assignIn(obj, s1); // $ExpectType { a: string; } & { b: number; } + fp.assignIn(obj)(s1); // $ExpectType { a: string; } & { b: number; } + + _.assignWith(obj); // $ExpectType { a: string; } + _.assignWith(obj, s1, customizer); // $ExpectType { a: string; } & { b: number; } + _.assignWith(obj, s1, s2, s3, s4, customizer); // $ExpectType { a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; } + _.assignWith(obj, s1, s2, s3, s4, s5, customizer); + _(obj).assignWith(); // $ExpectType LoDashImplicitWrapper<{ a: string; }> + _(obj).assignWith(s1, customizer); // $ExpectType LoDashImplicitWrapper<{ a: string; } & { b: number; }> + _(obj).assignWith(s1, s2, s3, s4, customizer); // $ExpectType LoDashImplicitWrapper<{ a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; }> + _(obj).assignWith(s1, s2, s3, s4, s5, customizer); + _.chain(obj).assignWith(); // $ExpectType LoDashExplicitWrapper<{ a: string; }> + _.chain(obj).assignWith(s1, customizer); // $ExpectType LoDashExplicitWrapper<{ a: string; } & { b: number; }> + _.chain(obj).assignWith(s1, s2, s3, s4, customizer); // $ExpectType LoDashExplicitWrapper<{ a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; }> + _.chain(obj).assignWith(s1, s2, s3, s4, s5, customizer); + fp.assignWith(customizer, obj, s1); // $ExpectType { a: string; } & { b: number; } + fp.assignWith(customizer)(obj)(s1); // $ExpectType { a: string; } & { b: number; } + + _.assignInWith(obj); // $ExpectType { a: string; } + _.assignInWith(obj, s1, customizer); // $ExpectType { a: string; } & { b: number; } + _.assignInWith(obj, s1, s2, s3, s4, customizer); // $ExpectType { a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; } + _.assignInWith(obj, s1, s2, s3, s4, s5, customizer); + _(obj).assignInWith(); // $ExpectType LoDashImplicitWrapper<{ a: string; }> + _(obj).assignInWith(s1, customizer); // $ExpectType LoDashImplicitWrapper<{ a: string; } & { b: number; }> + _(obj).assignInWith(s1, s2, s3, s4, customizer); // $ExpectType LoDashImplicitWrapper<{ a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; }> + _(obj).assignInWith(s1, s2, s3, s4, s5, customizer); + _.chain(obj).assignInWith(); // $ExpectType LoDashExplicitWrapper<{ a: string; }> + _.chain(obj).assignInWith(s1, customizer); // $ExpectType LoDashExplicitWrapper<{ a: string; } & { b: number; }> + _.chain(obj).assignInWith(s1, s2, s3, s4, customizer); // $ExpectType LoDashExplicitWrapper<{ a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; }> + _.chain(obj).assignInWith(s1, s2, s3, s4, s5, customizer); + fp.assignInWith(customizer, obj, s1); // $ExpectType { a: string; } & { b: number; } + fp.assignInWith(customizer)(obj)(s1); // $ExpectType { a: string; } & { b: number; } + + _.defaults(obj); // $ExpectType { a: string; } + _.defaults(obj, s1); // $ExpectType { b: number; } & { a: string; } + _.defaults(obj, s1, s2, s3, s4); // $ExpectType { e: number; } & { d: number; } & { c: number; } & { b: number; } & { a: string; } + _.defaults(obj, s1, s2, s3, s4, s5); + _(obj).defaults(); // $ExpectType LoDashImplicitWrapper<{ a: string; }> + _(obj).defaults(s1); // $ExpectType LoDashImplicitWrapper<{ b: number; } & { a: string; }> + _(obj).defaults(s1, s2, s3, s4); // $ExpectType LoDashImplicitWrapper<{ e: number; } & { d: number; } & { c: number; } & { b: number; } & { a: string; }> + _(obj).defaults(s1, s2, s3, s4, s5); + _.chain(obj).defaults(); // $ExpectType LoDashExplicitWrapper<{ a: string; }> + _.chain(obj).defaults(s1); // $ExpectType LoDashExplicitWrapper<{ b: number; } & { a: string; }> + _.chain(obj).defaults(s1, s2, s3, s4); // $ExpectType LoDashExplicitWrapper<{ e: number; } & { d: number; } & { c: number; } & { b: number; } & { a: string; }> + _.chain(obj).defaults(s1, s2, s3, s4, s5); + fp.defaults(obj, s1); // $ExpectType { a: string; } & { b: number; } + fp.defaults(obj)(s1); // $ExpectType { a: string; } & { b: number; } + + _.extend(obj); // $ExpectType { a: string; } + _.extend(obj, s1); // $ExpectType { a: string; } & { b: number; } + _.extend(obj, s1, s2, s3, s4); // $ExpectType { a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; } + _.extend(obj, s1, s2, s3, s4, s5); + _(obj).extend(); // $ExpectType LoDashImplicitWrapper<{ a: string; }> + _(obj).extend(s1); // $ExpectType LoDashImplicitWrapper<{ a: string; } & { b: number; }> + _(obj).extend(s1, s2, s3, s4); // $ExpectType LoDashImplicitWrapper<{ a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; }> + _(obj).extend(s1, s2, s3, s4, s5); + _.chain(obj).extend(); // $ExpectType LoDashExplicitWrapper<{ a: string; }> + _.chain(obj).extend(s1); // $ExpectType LoDashExplicitWrapper<{ a: string; } & { b: number; }> + _.chain(obj).extend(s1, s2, s3, s4); // $ExpectType LoDashExplicitWrapper<{ a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; }> + _.chain(obj).extend(s1, s2, s3, s4, s5); + fp.extend(obj, s1); // $ExpectType { a: string; } & { b: number; } + fp.extend(obj)(s1); // $ExpectType { a: string; } & { b: number; } + + _.extendWith(obj); // $ExpectType { a: string; } + _.extendWith(obj, s1, customizer); // $ExpectType { a: string; } & { b: number; } + _.extendWith(obj, s1, s2, s3, s4, customizer); // $ExpectType { a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; } + _.extendWith(obj, s1, s2, s3, s4, s5, customizer); + _(obj).extendWith(); // $ExpectType LoDashImplicitWrapper<{ a: string; }> + _(obj).extendWith(s1, customizer); // $ExpectType LoDashImplicitWrapper<{ a: string; } & { b: number; }> + _(obj).extendWith(s1, s2, s3, s4, customizer); // $ExpectType LoDashImplicitWrapper<{ a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; }> + _(obj).extendWith(s1, s2, s3, s4, s5, customizer); + _.chain(obj).extendWith(); // $ExpectType LoDashExplicitWrapper<{ a: string; }> + _.chain(obj).extendWith(s1, customizer); // $ExpectType LoDashExplicitWrapper<{ a: string; } & { b: number; }> + _.chain(obj).extendWith(s1, s2, s3, s4, customizer); // $ExpectType LoDashExplicitWrapper<{ a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; }> + _.chain(obj).extendWith(s1, s2, s3, s4, s5, customizer); + fp.extendWith(customizer, obj, s1); // $ExpectType { a: string; } & { b: number; } + fp.extendWith(customizer)(obj)(s1); // $ExpectType { a: string; } & { b: number; } + + _.merge(obj, s1); // $ExpectType { a: string; } & { b: number; } + _.merge(obj, s1, s2, s3, s4); // $ExpectType { a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; } + _.merge(obj, s1, s2, s3, s4, s5); + _(obj).merge(s1); // $ExpectType LoDashImplicitWrapper<{ a: string; } & { b: number; }> + _(obj).merge(s1, s2, s3, s4); // $ExpectType LoDashImplicitWrapper<{ a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; }> + _(obj).merge(s1, s2, s3, s4, s5); + _.chain(obj).merge(s1); // $ExpectType LoDashExplicitWrapper<{ a: string; } & { b: number; }> + _.chain(obj).merge(s1, s2, s3, s4); // $ExpectType LoDashExplicitWrapper<{ a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; }> + _.chain(obj).merge(s1, s2, s3, s4, s5); + fp.merge(obj, s1); // $ExpectType { a: string; } & { b: number; } + fp.merge(obj)(s1); // $ExpectType { a: string; } & { b: number; } + + _.mergeWith(obj, s1, customizer); // $ExpectType { a: string; } & { b: number; } + _.mergeWith(obj, s1, s2, s3, s4, customizer); // $ExpectType { a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; } + _.mergeWith(obj, s1, s2, s3, s4, s5, customizer); + _(obj).mergeWith(s1, customizer); // $ExpectType LoDashImplicitWrapper<{ a: string; } & { b: number; }> + _(obj).mergeWith(s1, s2, s3, s4, customizer); // $ExpectType LoDashImplicitWrapper<{ a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; }> + _(obj).mergeWith(s1, s2, s3, s4, s5, customizer); + _.chain(obj).mergeWith(s1, customizer); // $ExpectType LoDashExplicitWrapper<{ a: string; } & { b: number; }> + _.chain(obj).mergeWith(s1, s2, s3, s4, customizer); // $ExpectType LoDashExplicitWrapper<{ a: string; } & { b: number; } & { c: number; } & { d: number; } & { e: number; }> + _.chain(obj).mergeWith(s1, s2, s3, s4, s5, customizer); + fp.mergeWith(customizer, obj, s1); // $ExpectType { a: string; } & { b: number; } + fp.mergeWith(customizer)(obj)(s1); // $ExpectType { a: string; } & { b: number; } +} + +// _.create +{ + const prototype = { a: 1 }; + const properties = { b: "" }; + + _.create(prototype, properties); // $ExpectType { a: number; } & { b: string; } + _(prototype).create(properties); // $ExpectType LoDashImplicitWrapper<{ a: number; } & { b: string; }> + _.chain(prototype).create(properties); // $ExpectType LoDashExplicitWrapper<{ a: number; } & { b: string; }> + // We can't expectType for this line because it fails in TS2.3 + const result: { a: number; } = fp.create(prototype); +} + +{ + const obj = { a: "" }; + const s1 = { b: 1 }; + const s2 = { c: 1 }; + const s3 = { d: 1 }; + const s4 = { e: 1 }; + const s5 = { f: 1 }; +} + +// _.defaultsDeep +{ + const testDefaultsDeepObject = { user: { name: "barney" } }; + const testDefaultsDeepSource = { user: { name: "fred", age: 36 } }; + _.defaultsDeep(testDefaultsDeepObject, testDefaultsDeepSource); // $ExpectType any + _(testDefaultsDeepObject).defaultsDeep(testDefaultsDeepSource); // $ExpectType LoDashImplicitWrapper + _.chain(testDefaultsDeepObject).defaultsDeep(testDefaultsDeepSource); // $ExpectType LoDashExplicitWrapper + + fp.defaultsDeep(testDefaultsDeepSource, testDefaultsDeepObject); // $ExpectType any + fp.defaultsDeep(testDefaultsDeepSource)(testDefaultsDeepObject); // $ExpectType any +} + +// _.entries +// _.entriesIn +{ + const dictionary: _.Dictionary = anything; + const numericDictionary: _.NumericDictionary = anything; + const abcObject: AbcObject = anything; + + _.entries(dictionary); // $ExpectType [string, number][] + _.entries(numericDictionary); // $ExpectType [string, number][] + _.entries(abcObject); // $ExpectType [string, any][] + _(dictionary).entries(); // $ExpectType LoDashImplicitWrapper<[string, number][]> + _(numericDictionary).entries(); // $ExpectType LoDashImplicitWrapper<[string, number][]> + _.chain(dictionary).entries(); // $ExpectType LoDashExplicitWrapper<[string, number][]> + _.chain(numericDictionary).entries(); // $ExpectType LoDashExplicitWrapper<[string, number][]> + _.chain(abcObject).entries(); // $ExpectType LoDashExplicitWrapper<[string, any][]> + fp.entries(dictionary); // $ExpectType [string, number][] + + _.entriesIn(dictionary); // $ExpectType [string, number][] + _.entriesIn(numericDictionary); // $ExpectType [string, number][] + _.entriesIn(abcObject); // $ExpectType [string, any][] + _(dictionary).entriesIn(); // $ExpectType LoDashImplicitWrapper<[string, number][]> + _(numericDictionary).entriesIn(); // $ExpectType LoDashImplicitWrapper<[string, number][]> + _.chain(dictionary).entriesIn(); // $ExpectType LoDashExplicitWrapper<[string, number][]> + _.chain(numericDictionary).entriesIn(); // $ExpectType LoDashExplicitWrapper<[string, number][]> + _.chain(abcObject).entriesIn(); // $ExpectType LoDashExplicitWrapper<[string, any][]> + fp.entriesIn(dictionary); // $ExpectType [string, number][] +} + +// _.findKey +// _.findLastKey +{ + const predicateFn = (value: string, key: string, object: { a: string }) => true; + const predicateFn2 = (value: number) => true; + + _.findKey({ a: "" }); // $ExpectType string | undefined + _.findKey({ a: "" }, predicateFn); // $ExpectType string | undefined + _.findKey({ a: "" }, ""); // $ExpectType string | undefined + _.findKey({ a: { b: 5 } }, { b: 42 }); // $ExpectType string | undefined + _.findKey({ a: { b: 5 } }, ["b", 5]); // $ExpectType string | undefined + _({ a: "" }).findKey(); // $ExpectType string | undefined + _({ a: "" }).findKey(predicateFn); // $ExpectType string | undefined + _({ a: "" }).findKey(""); // $ExpectType string | undefined + _({ a: { b: 5 } }).findKey({ b: 42 }); // $ExpectType string | undefined + _({ a: { b: 5 } }).findKey(["b", 5]); // $ExpectType string | undefined + _.chain({ a: "" }).findKey(); // $ExpectType LoDashExplicitWrapper + _.chain({ a: "" }).findKey(predicateFn); // $ExpectType LoDashExplicitWrapper + _.chain({ a: "" }).findKey(""); // $ExpectType LoDashExplicitWrapper + _.chain({ a: { b: 5 } }).findKey({ b: 42 }); // $ExpectType LoDashExplicitWrapper + _.chain({ a: { b: 5 } }).findKey(["b", 5]); // $ExpectType LoDashExplicitWrapper + fp.findKey(predicateFn2, { a: 1 }); // $ExpectType string | undefined + fp.findKey(predicateFn2)({ a: 1 }); // $ExpectType string | undefined + + _.findLastKey({ a: "" }); // $ExpectType string | undefined + _.findLastKey({ a: "" }, predicateFn); // $ExpectType string | undefined + _.findLastKey({ a: "" }, ""); // $ExpectType string | undefined + _.findLastKey({ a: { b: 5 } }, { b: 42 }); // $ExpectType string | undefined + _.findLastKey({ a: { b: 5 } }, ["b", 5]); // $ExpectType string | undefined + _({ a: "" }).findLastKey(); // $ExpectType string | undefined + _({ a: "" }).findLastKey(predicateFn); // $ExpectType string | undefined + _({ a: "" }).findLastKey(""); // $ExpectType string | undefined + _({ a: { b: 5 } }).findLastKey({ b: 42 }); // $ExpectType string | undefined + _({ a: { b: 5 } }).findLastKey(["b", 5]); // $ExpectType string | undefined + _.chain({ a: "" }).findLastKey(); // $ExpectType LoDashExplicitWrapper + _.chain({ a: "" }).findLastKey(predicateFn); // $ExpectType LoDashExplicitWrapper + _.chain({ a: "" }).findLastKey(""); // $ExpectType LoDashExplicitWrapper + _.chain({ a: { b: 5 } }).findLastKey({ b: 42 }); // $ExpectType LoDashExplicitWrapper + _.chain({ a: { b: 5 } }).findLastKey(["b", 5]); // $ExpectType LoDashExplicitWrapper + fp.findLastKey(predicateFn2, { a: 1 }); // $ExpectType string | undefined + fp.findLastKey(predicateFn2)({ a: 1 }); // $ExpectType string | undefined +} + +// _.forIn +// _.forInRight +// _.forOwn +// _.forOwnRight +{ + const dictionary: _.Dictionary = {}; + const dictionaryIterator = (value: number, key: string, collection: _.Dictionary) => {}; + const dictionaryIterator2 = (value: number) => {}; + + const object: AbcObject | null | undefined = anything; + const objectIterator = (element: string | number | boolean, key: string, collection: AbcObject) => {}; + const objectIterator2 = (element: number | string | boolean) => {}; + + _.forIn(dictionary); // $ExpectType Dictionary + _.forIn(dictionary, dictionaryIterator); // $ExpectType Dictionary + _.forIn(object); // $ExpectType AbcObject | null | undefined + _.forIn(object, objectIterator); // $ExpectType AbcObject | null | undefined + _(object).forIn(); // $ExpectType LoDashImplicitWrapper + _(object).forIn(objectIterator); // $ExpectType LoDashImplicitWrapper + _.chain(object).forIn(); // $ExpectType LoDashExplicitWrapper + _.chain(object).forIn(objectIterator); // $ExpectType LoDashExplicitWrapper + fp.forIn(dictionaryIterator2, dictionary); // $ExpectType Dictionary + fp.forIn(objectIterator2)(object); // $ExpectType AbcObject | null | undefined + + _.forInRight(dictionary); // $ExpectType Dictionary + _.forInRight(dictionary, dictionaryIterator); // $ExpectType Dictionary + _.forInRight(object); // $ExpectType AbcObject | null | undefined + _.forInRight(object, objectIterator); // $ExpectType AbcObject | null | undefined + _(object).forInRight(); // $ExpectType LoDashImplicitWrapper + _(object).forInRight(objectIterator); // $ExpectType LoDashImplicitWrapper + _.chain(object).forInRight(); // $ExpectType LoDashExplicitWrapper + _.chain(object).forInRight(objectIterator); // $ExpectType LoDashExplicitWrapper + fp.forInRight(dictionaryIterator2, dictionary); // $ExpectType Dictionary + fp.forInRight(objectIterator2)(object); // $ExpectType AbcObject | null | undefined + + _.forOwn(dictionary); // $ExpectType Dictionary + _.forOwn(dictionary, dictionaryIterator); // $ExpectType Dictionary + _.forOwn(object); // $ExpectType AbcObject | null | undefined + _.forOwn(object, objectIterator); // $ExpectType AbcObject | null | undefined + _(object).forOwn(); // $ExpectType LoDashImplicitWrapper + _(object).forOwn(objectIterator); // $ExpectType LoDashImplicitWrapper + _.chain(object).forOwn(); // $ExpectType LoDashExplicitWrapper + _.chain(object).forOwn(objectIterator); // $ExpectType LoDashExplicitWrapper + fp.forOwn(dictionaryIterator2, dictionary); // $ExpectType Dictionary + fp.forOwn(objectIterator2)(object); // $ExpectType AbcObject | null | undefined + + _.forOwnRight(dictionary); // $ExpectType Dictionary + _.forOwnRight(dictionary, dictionaryIterator); // $ExpectType Dictionary + _.forOwnRight(object); // $ExpectType AbcObject | null | undefined + _.forOwnRight(object, objectIterator); // $ExpectType AbcObject | null | undefined + _(object).forOwnRight(); // $ExpectType LoDashImplicitWrapper + _(object).forOwnRight(objectIterator); // $ExpectType LoDashImplicitWrapper + _.chain(object).forOwnRight(); // $ExpectType LoDashExplicitWrapper + _.chain(object).forOwnRight(objectIterator); // $ExpectType LoDashExplicitWrapper + fp.forOwnRight(dictionaryIterator2, dictionary); // $ExpectType Dictionary + fp.forOwnRight(objectIterator2)(object); // $ExpectType AbcObject | null | undefined +} + +// _.functions +// _.functionsIn +{ + const object: AbcObject = anything; + + _.functions(object); // $ExpectType string[] + _(object).functions(); // $ExpectType LoDashImplicitWrapper + _.chain(object).functions(); // $ExpectType LoDashExplicitWrapper + fp.functions(object); // $ExpectType string[] + + _.functionsIn(object); // $ExpectType string[] + _(object).functionsIn(); // $ExpectType LoDashImplicitWrapper + _.chain(object).functionsIn(); // $ExpectType LoDashExplicitWrapper + fp.functionsIn(object); // $ExpectType string[] +} + +// _.get +{ + _.get([], Symbol.iterator); + _.get([], [Symbol.iterator]); + + _.get("abc", 1); // $ExpectType string + _.get("abc", ["0"], "_"); + _.get([42], 0, -1); // $ExpectType number + _.get({ a: { b: true } }, "a"); // $ExpectType { b: boolean; } + _.get({ a: { b: true } }, ["a"]); // $ExpectType { b: boolean; } + _.get({ a: { b: true } }, ["a", "b"]); // $ExpectType any + + _("abc").get(1); // $ExpectType string + _("abc").get(["0"], "_"); + _([42]).get(0, -1); // $ExpectType number + _({ a: { b: true } }).get("a"); // $ExpectType { b: boolean; } + _({ a: { b: true } }).get(["a"]); // $ExpectType { b: boolean; } + _({ a: { b: true } }).get(["a", "b"]); // $ExpectType any + + _.chain("abc").get(1); // $ExpectType LoDashExplicitWrapper + _.chain("abc").get(["0"], "_"); + _.chain([42]).get(0, -1); // $ExpectType LoDashExplicitWrapper + _.chain({ a: { b: true } }).get("a"); // $ExpectType LoDashExplicitWrapper<{ b: boolean; }> + _.chain({ a: { b: true } }).get(["a"]); // $ExpectType LoDashExplicitWrapper<{ b: boolean; }> + _.chain({ a: { b: true } }).get(["a", "b"]); // $ExpectType LoDashExplicitWrapper + + fp.get(Symbol.iterator, []); // $ExpectType any + fp.get(Symbol.iterator)([]); // $ExpectType any + fp.get([Symbol.iterator], []); // $ExpectType any + fp.get(1)("abc"); // $ExpectType string + fp.get("1")("abc"); // $ExpectType any + fp.get("a", { a: { b: true } }); // $ExpectType { b: boolean; } + fp.get<{ a: { b: boolean } }, "a">("a")({ a: { b: true } }); // $ExpectType { b: boolean; } + fp.get(["a", "b"])({ a: { b: true } }); // $ExpectType any + fp.get(0)([42]); // $ExpectType number + + fp.getOr(-1, 0, [42]); // $ExpectType number + fp.getOr(-1)(0)([42]); // $ExpectType number + fp.getOr("empty" as "empty")(0)([42]); // $ExpectType number | "empty" +} + +// _.has +// _.hasIn +{ + const object: AbcObject = anything; + + _.has(object, ""); // $ExpectType boolean + _.has(object, 42); // $ExpectType boolean + _.has(object, ["", 42]); // $ExpectType boolean + _(object).has(""); // $ExpectType boolean + _(object).has(42); // $ExpectType boolean + _(object).has(["", 42]); // $ExpectType boolean + _.chain(object).has(""); // $ExpectType LoDashExplicitWrapper + _.chain(object).has(42); // $ExpectType LoDashExplicitWrapper + _.chain(object).has(["", 42]); // $ExpectType LoDashExplicitWrapper + fp.has("a", object); // $ExpectType boolean + fp.has("a")(object); // $ExpectType boolean + fp.has(["a", 42])(object); // $ExpectType boolean + + _.hasIn(object, ""); // $ExpectType boolean + _.hasIn(object, 42); // $ExpectType boolean + _.hasIn(object, ["", 42]); // $ExpectType boolean + _(object).hasIn(""); // $ExpectType boolean + _(object).hasIn(42); // $ExpectType boolean + _(object).hasIn(["", 42]); // $ExpectType boolean + _.chain(object).hasIn(""); // $ExpectType LoDashExplicitWrapper + _.chain(object).hasIn(42); // $ExpectType LoDashExplicitWrapper + _.chain(object).hasIn(["", 42]); // $ExpectType LoDashExplicitWrapper + fp.hasIn("a", object); // $ExpectType boolean + fp.hasIn("a")(object); // $ExpectType boolean + fp.hasIn(["a", 42])(object); // $ExpectType boolean +} + +// _.invert +{ + _.invert({}); // $ExpectType Dictionary + _({}).invert(); // $ExpectType LoDashImplicitWrapper> + _.chain({}).invert(); // $ExpectType LoDashExplicitWrapper> + fp.invert({}); // $ExpectType Dictionary +} + +// _.invertBy +{ + const list: ArrayLike<{ a: number }> = anything; + const dictionary: _.Dictionary<{ a: number }> = {}; + const numericDictionary: _.NumericDictionary<{ a: number }> = {}; + + const stringIterator = (value: string) => 1; + const valueIterator = (value: {a: number }) => 1; + + _.invertBy("foo"); // $ExpectType Dictionary + _.invertBy("foo", stringIterator); // $ExpectType Dictionary + _.invertBy(list); // $ExpectType Dictionary + _.invertBy(list, "a"); // $ExpectType Dictionary + _.invertBy(list, valueIterator); // $ExpectType Dictionary + _.invertBy(list, {a: 1}); // $ExpectType Dictionary + _.invertBy(dictionary); // $ExpectType Dictionary + _.invertBy(dictionary, "a"); // $ExpectType Dictionary + _.invertBy(dictionary, valueIterator); // $ExpectType Dictionary + _.invertBy(dictionary, {a: 1}); // $ExpectType Dictionary + _.invertBy(numericDictionary); // $ExpectType Dictionary + _.invertBy(numericDictionary, "a"); // $ExpectType Dictionary + _.invertBy(numericDictionary, valueIterator); // $ExpectType Dictionary + _.invertBy(numericDictionary, {a: 1}); // $ExpectType Dictionary + + _("foo").invertBy(stringIterator); // $ExpectType LoDashImplicitWrapper> + _(list).invertBy(); // $ExpectType LoDashImplicitWrapper> + _(list).invertBy("a"); // $ExpectType LoDashImplicitWrapper> + _(dictionary).invertBy(valueIterator); // $ExpectType LoDashImplicitWrapper> + _(numericDictionary).invertBy({a: 1}); // $ExpectType LoDashImplicitWrapper> + + _.chain("foo").invertBy(stringIterator); // $ExpectType LoDashExplicitWrapper> + _.chain(list).invertBy(); // $ExpectType LoDashExplicitWrapper> + _.chain(list).invertBy("a"); // $ExpectType LoDashExplicitWrapper> + _.chain(dictionary).invertBy(valueIterator); // $ExpectType LoDashExplicitWrapper> + _.chain(numericDictionary).invertBy({a: 1}); // $ExpectType LoDashExplicitWrapper> + + fp.invertBy(stringIterator, "foo"); // $ExpectType Dictionary + fp.invertBy(stringIterator)("foo"); // $ExpectType Dictionary + fp.invertBy(valueIterator)(list); // $ExpectType Dictionary + fp.invertBy("a")(list); // $ExpectType Dictionary + fp.invertBy({ a: 1 })(list); // $ExpectType Dictionary + fp.invertBy(valueIterator)(dictionary); // $ExpectType Dictionary + fp.invertBy("a")(dictionary); // $ExpectType Dictionary + fp.invertBy({ a: 1 })(dictionary); // $ExpectType Dictionary + fp.invertBy(valueIterator)(numericDictionary); // $ExpectType Dictionary + fp.invertBy("a")(numericDictionary); // $ExpectType Dictionary + fp.invertBy({ a: 1 })(numericDictionary); // $ExpectType Dictionary +} + +// _.keys +// _.keysIn +{ + const object: AbcObject | null | undefined = anything; + + _.keys(object); // $ExpectType string[] + _(object).keys(); // $ExpectType LoDashImplicitWrapper + _.chain(object).keys(); // $ExpectType LoDashExplicitWrapper + fp.keys({}); // $ExpectType string[] + + _.keysIn(object); // $ExpectType string[] + _(object).keysIn(); // $ExpectType LoDashImplicitWrapper + _.chain(object).keysIn(); // $ExpectType LoDashExplicitWrapper + fp.keysIn({}); // $ExpectType string[] +} + +// _.mapKeys +{ + const list: _.List| null | undefined = [] as any; + const dictionary: _.Dictionary | null | undefined = anything; + const numericDictionary: _.NumericDictionary | null | undefined = anything; + const abcObject: AbcObject = anything; + + const listIterator = (value: AbcObject, index: number, collection: _.List) => ""; + const dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => ""; + const numericDictionaryIterator = (value: AbcObject, key: string, collection: _.NumericDictionary) => ""; + const abcObjectIterator = (value: AbcObject[keyof AbcObject], key: string, collection: AbcObject) => ""; + + _.mapKeys(list); // $ExpectType Dictionary + _.mapKeys(list, listIterator); // $ExpectType Dictionary + _.mapKeys(list, ""); // $ExpectType Dictionary + _.mapKeys(list, {}); // $ExpectType Dictionary + + _.mapKeys(dictionary); // $ExpectType Dictionary + _.mapKeys(dictionary, dictionaryIterator); // $ExpectType Dictionary + _.mapKeys(dictionary, ""); // $ExpectType Dictionary + _.mapKeys(dictionary, {}); // $ExpectType Dictionary + + /* Broken in TS 2.4 + _.mapKeys(numericDictionary); // Dictionary + _.mapKeys(numericDictionary, numericDictionaryIterator); // Dictionary + _.mapKeys(numericDictionary, ""); // Dictionary + _.mapKeys(numericDictionary, {}); // Dictionary + */ + + _.mapKeys(abcObject); // $ExpectType Dictionary + _.mapKeys(abcObject, abcObjectIterator); // $ExpectType Dictionary + _.mapKeys(abcObject, ""); // $ExpectType Dictionary + + _(list).mapKeys(); // $ExpectType LoDashImplicitWrapper> + _(list).mapKeys(listIterator); // $ExpectType LoDashImplicitWrapper> + _(list).mapKeys(""); // $ExpectType LoDashImplicitWrapper> + _(list).mapKeys({}); // $ExpectType LoDashImplicitWrapper> + + _(dictionary).mapKeys(); // $ExpectType LoDashImplicitWrapper> + _(dictionary).mapKeys(dictionaryIterator); // $ExpectType LoDashImplicitWrapper> + _(dictionary).mapKeys(""); // $ExpectType LoDashImplicitWrapper> + _(dictionary).mapKeys({}); // $ExpectType LoDashImplicitWrapper> + + /* Broken in TS 2.4 + _(numericDictionary).mapKeys(); // LoDashImplicitWrapper> + _(numericDictionary).mapKeys(numericDictionaryIterator); // LoDashImplicitWrapper> + _(numericDictionary).mapKeys(""); // LoDashImplicitWrapper> + _(numericDictionary).mapKeys({}); // LoDashImplicitWrapper> + */ + + _(abcObject).mapKeys(); // $ExpectType LoDashImplicitWrapper> + _(abcObject).mapKeys(abcObjectIterator); // $ExpectType LoDashImplicitWrapper> + _(abcObject).mapKeys(""); // $ExpectType LoDashImplicitWrapper> + + _.chain(list).mapKeys(); // $ExpectType LoDashExplicitWrapper> + _.chain(list).mapKeys(listIterator); // $ExpectType LoDashExplicitWrapper> + _.chain(list).mapKeys(""); // $ExpectType LoDashExplicitWrapper> + _.chain(list).mapKeys({}); // $ExpectType LoDashExplicitWrapper> + + _.chain(dictionary).mapKeys(); // $ExpectType LoDashExplicitWrapper> + _.chain(dictionary).mapKeys(dictionaryIterator); // $ExpectType LoDashExplicitWrapper> + _.chain(dictionary).mapKeys(""); // $ExpectType LoDashExplicitWrapper> + _.chain(dictionary).mapKeys({}); // $ExpectType LoDashExplicitWrapper> + + /* Broken in TS 2.4 + _.chain(numericDictionary).mapKeys(); // LoDashExplicitWrapper> + _.chain(numericDictionary).mapKeys(numericDictionaryIterator); // LoDashExplicitWrapper> + _.chain(numericDictionary).mapKeys(""); // LoDashExplicitWrapper> + _.chain(numericDictionary).mapKeys({}); // LoDashExplicitWrapper> + */ + + _.chain(abcObject).mapKeys(); // $ExpectType LoDashExplicitWrapper> + _.chain(abcObject).mapKeys(abcObjectIterator); // $ExpectType LoDashExplicitWrapper> + _.chain(abcObject).mapKeys(""); // $ExpectType LoDashExplicitWrapper> + + const indexIterator = (index: number) => index + 1; + const keyIterator = (key: string) => "_" + key; + fp.mapKeys(indexIterator, list); // $ExpectType Dictionary + fp.mapKeys(keyIterator)(dictionary); // $ExpectType Dictionary + fp.mapKeys(keyIterator)(abcObject); // $ExpectType Dictionary +} + +// _.mapValues +{ + const dictionary: _.Dictionary | null | undefined = anything; + const numericDictionary: _.NumericDictionary | null | undefined = anything; + const abcObject: AbcObject = anything; + const abcObjectOrNull: AbcObject | null = anything; + const key: string = anything; + + // $ExpectType NumericDictionary + _.mapValues("foo", (char, index, str) => { + char; // $ExpectType string + index; // $ExpectType number + str; // $ExpectType string + return abcObject; + }); + + // $ExpectType Dictionary + _.mapValues(dictionary, (value, key, collection) => { + value; // $ExpectType AbcObject + key; // $ExpectType string + collection; // $ExpectType Dictionary + return ""; + }); + + // Can"t really support NumericDictionary fully, but it at least gets treated like a Dictionary + // $ExpectType Dictionary + _.mapValues(numericDictionary, (value, key, collection) => { + value; // $ExpectType AbcObject + key; // $ExpectType string + collection; // $ExpectType Dictionary + return ""; + }); + + // $ExpectType { a: string; b: string; c: string; } + _.mapValues(abcObject, (value, key, collection) => { + value; // $ExpectType string | number | boolean + key; // $ExpectType string + collection; // $ExpectType AbcObject + return ""; + }); + + _.mapValues(dictionary, {}); // $ExpectType Dictionary + // Can"t really support NumericDictionary fully, but it at least gets treated like a Dictionary + _.mapValues(numericDictionary, {}); // $ExpectType Dictionary + _.mapValues(abcObject, {}); // $ExpectType { a: boolean; b: boolean; c: boolean; } + + _.mapValues(dictionary, "a"); // $ExpectType Dictionary + // Can"t really support NumericDictionary fully, but it at least gets treated like a Dictionary + _.mapValues(numericDictionary, "a"); // $ExpectType Dictionary + + _.mapValues(abcObject, key); // $ExpectType { a: any; b: any; c: any; } + _.mapValues(dictionary, key); // $ExpectType Dictionary + // Can"t really support NumericDictionary fully, but it at least gets treated like a Dictionary + _.mapValues(numericDictionary, key); // $ExpectType Dictionary + + _.mapValues("a"); // $ExpectType NumericDictionary + _.mapValues(dictionary); // $ExpectType Dictionary + // Can"t really support NumericDictionary fully, but it at least gets treated like a Dictionary + _.mapValues(numericDictionary); // $ExpectType Dictionary + _.mapValues(abcObject); // $ExpectType AbcObject + _.mapValues(abcObjectOrNull); // $ExpectType Partial + + // $ExpectType LoDashImplicitWrapper> + _("foo").mapValues((char, index, str) => { + char; // $ExpectType string + index; // $ExpectType number + str; // $ExpectType string + return abcObject; + }); + + // $ExpectType LoDashImplicitWrapper> + _(dictionary).mapValues((value, key, collection) => { + value; // $ExpectType AbcObject + key; // $ExpectType string + collection; // $ExpectType Dictionary + return ""; + }); + + // Can"t really support NumericDictionary fully, but it at least gets treated like a Dictionary + // $ExpectType LoDashImplicitWrapper> + _(numericDictionary).mapValues((value, key, collection) => { + value; // $ExpectType AbcObject + key; // $ExpectType string + collection; // $ExpectType Dictionary + return ""; + }); + + // $ExpectType LoDashImplicitWrapper<{ a: string; b: string; c: string; }> + _(abcObject).mapValues((value, key, collection) => { + value; // $ExpectType string | number | boolean + key; // $ExpectType string + collection; // $ExpectType AbcObject + return ""; + }); + + _(dictionary).mapValues({}); // $ExpectType LoDashImplicitWrapper> + // Can"t really support NumericDictionary fully, but it at least gets treated like a Dictionary + _(numericDictionary).mapValues({}); // $ExpectType LoDashImplicitWrapper> + _(abcObject).mapValues({}); // $ExpectType LoDashImplicitWrapper<{ a: boolean; b: boolean; c: boolean; }> + + _(dictionary).mapValues("a"); // $ExpectType LoDashImplicitWrapper> + // Can"t really support NumericDictionary fully, but it at least gets treated like a Dictionary + _(numericDictionary).mapValues("a"); // $ExpectType LoDashImplicitWrapper> + + _(abcObject).mapValues(key); // $ExpectType LoDashImplicitWrapper<{ a: any; b: any; c: any; }> + _(dictionary).mapValues(key); // $ExpectType LoDashImplicitWrapper> + // Can"t really support NumericDictionary fully, but it at least gets treated like a Dictionary + _(numericDictionary).mapValues(key); // $ExpectType LoDashImplicitWrapper> + + _("a").mapValues(); // $ExpectType LoDashImplicitWrapper> + _(dictionary).mapValues(); // $ExpectType LoDashImplicitWrapper> + // Can"t really support NumericDictionary fully, but it at least gets treated like a Dictionary + _(numericDictionary).mapValues(); // $ExpectType LoDashImplicitWrapper> + _(abcObject).mapValues(); // $ExpectType LoDashImplicitWrapper + _(abcObjectOrNull).mapValues(); // $ExpectType LoDashImplicitWrapper> + + // $ExpectType LoDashExplicitWrapper> + _.chain("foo").mapValues((char, index, str) => { + char; // $ExpectType string + index; // $ExpectType number + str; // $ExpectType string + return abcObject; + }); + + // $ExpectType LoDashExplicitWrapper> + _.chain(dictionary).mapValues((value, key, collection) => { + value; // $ExpectType AbcObject + key; // $ExpectType string + collection; // $ExpectType Dictionary + return ""; + }); + + // Can"t really support NumericDictionary fully, but it at least gets treated like a Dictionary + // $ExpectType LoDashExplicitWrapper> + _.chain(numericDictionary).mapValues((value, key, collection) => { + value; // $ExpectType AbcObject + key; // $ExpectType string + collection; // $ExpectType Dictionary + return ""; + }); + + // $ExpectType LoDashExplicitWrapper<{ a: string; b: string; c: string; }> + _.chain(abcObject).mapValues((value, key, collection) => { + value; // $ExpectType string | number | boolean + key; // $ExpectType string + collection; // $ExpectType AbcObject + return ""; + }); + + _.chain(dictionary).mapValues({}); // $ExpectType LoDashExplicitWrapper> + // Can"t really support NumericDictionary fully, but it at least gets treated like a Dictionary + _.chain(numericDictionary).mapValues({}); // $ExpectType LoDashExplicitWrapper> + _.chain(abcObject).mapValues({}); // $ExpectType LoDashExplicitWrapper<{ a: boolean; b: boolean; c: boolean; }> + + _.chain(dictionary).mapValues("a"); // $ExpectType LoDashExplicitWrapper> + // Can"t really support NumericDictionary fully, but it at least gets treated like a Dictionary + _.chain(numericDictionary).mapValues("a"); // $ExpectType LoDashExplicitWrapper> + + _.chain(abcObject).mapValues(key); // $ExpectType LoDashExplicitWrapper<{ a: any; b: any; c: any; }> + _.chain(dictionary).mapValues(key); // $ExpectType LoDashExplicitWrapper> + // Can"t really support NumericDictionary fully, but it at least gets treated like a Dictionary + _.chain(numericDictionary).mapValues(key); // $ExpectType LoDashExplicitWrapper> + + _.chain("a").mapValues(); // $ExpectType LoDashExplicitWrapper> + _.chain(dictionary).mapValues(); // $ExpectType LoDashExplicitWrapper> + // Can"t really support NumericDictionary fully, but it at least gets treated like a Dictionary + _.chain(numericDictionary).mapValues(); // $ExpectType LoDashExplicitWrapper> + + _.chain(abcObject).mapValues(); // $ExpectType LoDashExplicitWrapper + _.chain(abcObjectOrNull).mapValues(); // $ExpectType LoDashExplicitWrapper> + + const valueIterator = (value: AbcObject) => ""; + fp.mapValues(valueIterator)(dictionary); // $ExpectType Dictionary + fp.mapValues("a", dictionary); // $ExpectType Dictionary + fp.mapValues(valueIterator)(numericDictionary); // $ExpectType Dictionary + fp.mapValues({ a: 42 })(numericDictionary); // $ExpectType Dictionary + fp.mapValues(value => "", abcObjectOrNull); // $ExpectType { a: string; b: string; c: string; } +} + +// _.omit +{ + const obj: AbcObject | null | undefined = anything; + const dictionary: _.Dictionary = anything; + const numericDictionary: _.NumericDictionary = anything; + + _.omit(obj, "a"); // $ExpectType Partial + _.omit(obj, ["b", 1], 0, "a"); // $ExpectType Partial + _.omit(dictionary, "a"); // $ExpectType Dictionary + _.omit(numericDictionary, "a"); // $ExpectType NumericDictionary + + _(obj).omit("a"); // $ExpectType LoDashImplicitWrapper> + _(obj).omit(["b", 1], 0, "a"); // $ExpectType LoDashImplicitWrapper> + _(dictionary).omit("a"); // $ExpectType LoDashImplicitWrapper> + _(numericDictionary).omit("a"); // $ExpectType LoDashImplicitWrapper> + + _.chain(obj).omit("a"); // $ExpectType LoDashExplicitWrapper> + _.chain(obj).omit(["b", 1], 0, "a"); // $ExpectType LoDashExplicitWrapper> + _.chain(dictionary).omit("a"); // $ExpectType LoDashExplicitWrapper> + _.chain(numericDictionary).omit("a"); // $ExpectType LoDashExplicitWrapper> + + fp.omit("a", obj); // $ExpectType Partial + fp.omit("a")(obj); // $ExpectType Partial + fp.omit(["a", "b"])(obj); // $ExpectType Partial +} + +// _.omitBy +{ + const obj: AbcObject | null | undefined = anything; + const predicate = (element: string | number | boolean, key: string) => true; + + _.omitBy(obj, predicate); // $ExpectType Partial + _(obj).omitBy(predicate); // $ExpectType LoDashImplicitWrapper> + _.chain(obj).omitBy(predicate); // $ExpectType LoDashExplicitWrapper> + fp.omitBy(predicate, obj); // $ExpectType Partial + fp.omitBy(predicate)(obj); // $ExpectType Partial +} + +// _.pick +{ + const obj1: AbcObject | null | undefined = anything; + const obj2: AbcObject = anything; + const readonlyArray: string[] = ["a", "b"]; // TODO: Should be ReadonlyArray, but see comment on type Many + const literalsArray = ["a" as "a", "b" as "b"]; + const roLiteralsArray: Array<"a" | "b"> = literalsArray; // TODO: Should be ReadonlyArray, but see comment on type Many + + _.pick(obj1, "a"); // $ExpectType PartialDeep + _.pick(obj1, 0, "a"); // $ExpectType PartialDeep + _.pick(obj1, ["b", 1], 0, "a"); // $ExpectType PartialDeep + _.pick(obj1, readonlyArray); // $ExpectType PartialDeep + // Broken in TS 2.4 + // _.pick(obj2, "a", "b"); // Pick + _.pick(obj2, literalsArray); // $ExpectType Pick + _.pick(obj2, roLiteralsArray); // $ExpectType Pick + + _(obj1).pick("a"); // $ExpectType LoDashImplicitWrapper> + _(obj1).pick(0, "a"); // $ExpectType LoDashImplicitWrapper> + _(obj1).pick(["b", 1], 0, "a"); // $ExpectType LoDashImplicitWrapper> + _(obj1).pick(readonlyArray); // $ExpectType LoDashImplicitWrapper> + // Broken in TS 2.4 + // _(obj2).pick("a", "b"); // LoDashImplicitWrapper> + _(obj2).pick(literalsArray); // $ExpectType LoDashImplicitWrapper> + _(obj2).pick(roLiteralsArray); // $ExpectType LoDashImplicitWrapper> + + _.chain(obj1).pick("a"); // $ExpectType LoDashExplicitWrapper> + _.chain(obj1).pick(0, "a"); // $ExpectType LoDashExplicitWrapper> + _.chain(obj1).pick(["b", 1], 0, "a"); // $ExpectType LoDashExplicitWrapper> + _.chain(obj1).pick(readonlyArray); // $ExpectType LoDashExplicitWrapper> + // Broken in TS 2.4 + // _.chain(obj2).pick("a", "b"); // LoDashExplicitWrapper> + _.chain(obj2).pick(literalsArray); // $ExpectType LoDashExplicitWrapper> + _.chain(obj2).pick(roLiteralsArray); // $ExpectType LoDashExplicitWrapper> + + fp.pick("a", obj2); // $ExpectType Pick + fp.pick("a")(obj2); // $ExpectType Pick + fp.pick(["a" as "a", "b" as "b"])(obj2); // $ExpectType Pick +} + +// _.pickBy +{ + const obj: AbcObject | null | undefined = anything; + const predicate = (element: string | number | boolean, key: string) => true; + + _.pickBy(obj, predicate); // $ExpectType Partial + _(obj).pickBy(predicate); // $ExpectType LoDashImplicitWrapper> + _.chain(obj).pickBy(predicate); // $ExpectType LoDashExplicitWrapper> + fp.pickBy(predicate, obj); // $ExpectType Partial + fp.pickBy(predicate)(obj); // $ExpectType Partial +} + +// _.result +{ + _.result("abc", "0"); // $ExpectType string + _.result("abc", 0, "_"); // $ExpectType string + _.result("abc", "0", () => "_"); // $ExpectType string + _.result("abc", ["0"]); // $ExpectType string + _.result("abc", [0], () => "_"); // $ExpectType string + _.result({ a: () => true }, "a"); // $ExpectType boolean + _("abc").result("0"); // $ExpectType string + _("abc").result(0, "_"); // $ExpectType string + _("abc").result("0", () => "_"); // $ExpectType string + _("abc").result(["0"]); // $ExpectType string + _("abc").result([0], () => "_"); // $ExpectType string + _({ a: () => true }).result("a"); // $ExpectType boolean + _.chain("abc").result("0"); // $ExpectType LoDashExplicitWrapper + _.chain("abc").result(0, "_"); // $ExpectType LoDashExplicitWrapper + _.chain("abc").result("0", () => "_"); // $ExpectType LoDashExplicitWrapper + _.chain("abc").result(["0"]); // $ExpectType LoDashExplicitWrapper + _.chain("abc").result([0], () => "_"); // $ExpectType LoDashExplicitWrapper + _.chain({ a: () => true }).result("a"); // $ExpectType LoDashExplicitWrapper + + fp.result("0", "abc"); // $ExpectType string + fp.result("0")("abc"); // $ExpectType string +} + +// _.set +// _.setWith +{ + interface SampleResult { + a: { + b: number[]; + }; + } + + const object = { a: {} }; + + _.set(object, "a.b[1]", 42); // $ExpectType SampleResult + _.set(object, ["a", "b", 1], 42); // $ExpectType SampleResult + + _(object).set("a.b[1]", 42); // $ExpectType LoDashImplicitWrapper + _(object).set(["a", "b", 1], 42); // $ExpectType LoDashImplicitWrapper + + _.chain(object).set("a.b[1]", 42); // $ExpectType LoDashExplicitWrapper + _.chain(object).set(["a", "b", 1], 42); // $ExpectType LoDashExplicitWrapper + + fp.set("a", 42, object); // $ExpectType { a: {}; } + fp.set("a.b[1]")(42)(object); // $ExpectType { a: {}; } + fp.set(["a", "b", 1])(42)(object); // $ExpectType { a: {}; } +} +{ + interface SampleResult { + a: { + b: number[]; + }; + } + + const object: SampleResult = { a: { b: [0, 1] } }; + const customizer = (value: any, key: string, object: SampleResult) => 0; + + _.setWith(object, "a.b[1]", 42); // $ExpectType SampleResult + _.setWith(object, "a.b[1]", 42, customizer); // $ExpectType SampleResult + _.setWith(object, ["a", "b", 1], 42, customizer); // $ExpectType SampleResult + + _(object).setWith("a.b[1]", 42); // $ExpectType LoDashImplicitWrapper + _(object).setWith("a.b[1]", 42, customizer); // $ExpectType LoDashImplicitWrapper + _(object).setWith(["a", "b", 1], 42, customizer); // $ExpectType LoDashImplicitWrapper + + _.chain(object).setWith("a.b[1]", 42); // $ExpectType LoDashExplicitWrapper + _.chain(object).setWith("a.b[1]", 42, customizer); // $ExpectType LoDashExplicitWrapper + _.chain(object).setWith(["a", "b", 1], 42, customizer); // $ExpectType LoDashExplicitWrapper + + fp.setWith(customizer, "a", 42, object); // $ExpectType SampleResult + fp.setWith(customizer)("a.b[1]")(42)(object); // $ExpectType SampleResult + fp.setWith(customizer)(["a", "b", 1])(42)(object); // $ExpectType SampleResult +} + +// _.toPairs +// _.toPairsIn +{ + const dictionary: _.Dictionary = {}; + const numericDictionary: _.NumericDictionary = {}; + const abcObject: AbcObject = anything; + + _.toPairs(dictionary); // $ExpectType [string, number][] + _.toPairs(numericDictionary); // $ExpectType [string, number][] + _.toPairs(abcObject); // $ExpectType [string, any][] + + _(dictionary).toPairs(); // $ExpectType LoDashImplicitWrapper<[string, number][]> + _(numericDictionary).toPairs(); // $ExpectType LoDashImplicitWrapper<[string, number][]> + _(abcObject).toPairs(); // $ExpectType LoDashImplicitWrapper<[string, any][]> + + _.chain(dictionary).toPairs(); // $ExpectType LoDashExplicitWrapper<[string, number][]> + _.chain(numericDictionary).toPairs(); // $ExpectType LoDashExplicitWrapper<[string, number][]> + _.chain(abcObject).toPairs(); // $ExpectType LoDashExplicitWrapper<[string, any][]> + + fp.toPairs(dictionary); // $ExpectType [string, number][] + + _.toPairsIn(dictionary); // $ExpectType [string, number][] + _.toPairsIn(numericDictionary); // $ExpectType [string, number][] + _.toPairsIn(abcObject); // $ExpectType [string, any][] + + _(dictionary).toPairsIn(); // $ExpectType LoDashImplicitWrapper<[string, number][]> + _(numericDictionary).toPairsIn(); // $ExpectType LoDashImplicitWrapper<[string, number][]> + _(abcObject).toPairsIn(); // $ExpectType LoDashImplicitWrapper<[string, any][]> + + _.chain(dictionary).toPairsIn(); // $ExpectType LoDashExplicitWrapper<[string, number][]> + _.chain(numericDictionary).toPairsIn(); // $ExpectType LoDashExplicitWrapper<[string, number][]> + _.chain(abcObject).toPairsIn(); // $ExpectType LoDashExplicitWrapper<[string, any][]> + + fp.toPairsIn(dictionary); // $ExpectType [string, number][] +} + +// _.transform +{ + const array: number[] = []; + const dictionary: _.Dictionary = {}; + + { + const iterator = (acc: AbcObject[], curr: number, index?: number, arr?: number[]) => {}; + const accumulator: AbcObject[] = []; + + _.transform(array); // $ExpectType any[] + _.transform(array, iterator); // $ExpectType AbcObject[] + _.transform(array, iterator, accumulator); // $ExpectType AbcObject[] + _(array).transform(); // $ExpectType LoDashImplicitWrapper + _(array).transform(iterator); // $ExpectType LoDashImplicitWrapper + _(array).transform(iterator, accumulator); // $ExpectType LoDashImplicitWrapper + _.chain(array).transform(iterator, accumulator); // $ExpectType LoDashExplicitWrapper + } + + { + const iterator = (acc: _.Dictionary, curr: number, index?: number, arr?: number[]) => {}; + const accumulator: _.Dictionary = {}; + + _.transform(array, iterator, accumulator); // $ExpectType Dictionary + _(array).transform(iterator, accumulator); // $ExpectType LoDashImplicitWrapper> + _.chain(array).transform(iterator, accumulator); // $ExpectType LoDashExplicitWrapper> + } + + { + const iterator = (acc: _.Dictionary, curr: number, key?: string, dict?: _.Dictionary) => {}; + const accumulator: _.Dictionary = {}; + + _.transform(dictionary); // $ExpectType Dictionary + _.transform(dictionary, iterator); // $ExpectType Dictionary + _.transform(dictionary, iterator, accumulator); // $ExpectType Dictionary + _(dictionary).transform(); // $ExpectType LoDashImplicitWrapper> + _(dictionary).transform(iterator); // $ExpectType LoDashImplicitWrapper> + _(dictionary).transform(iterator, accumulator); // $ExpectType LoDashImplicitWrapper> + } + + { + const iterator = (acc: AbcObject[], curr: number, key?: string, dict?: _.Dictionary) => {}; + const accumulator: AbcObject[] = []; + + _.transform(dictionary, iterator, accumulator); // $ExpectType AbcObject[] + _(dictionary).transform(iterator, accumulator); // $ExpectType LoDashImplicitWrapper + _.chain(dictionary).transform(iterator, accumulator); // $ExpectType LoDashExplicitWrapper + } + + { + const iterator = (acc: AbcObject[], curr: number): AbcObject => anything; + const accumulator: AbcObject[] = []; + + fp.transform(iterator, accumulator, array); // $ExpectType AbcObject[] + fp.transform(iterator)(accumulator)(array); // $ExpectType AbcObject[] + fp.transform(iterator)(accumulator)(dictionary); // $ExpectType AbcObject[] + } + + { + const iterator = (acc: _.Dictionary, curr: number): AbcObject => anything; + const accumulator: _.Dictionary = {}; + + fp.transform(iterator)(accumulator)(array); // $ExpectType Dictionary + fp.transform(iterator)(accumulator)(dictionary); // $ExpectType Dictionary + } +} + +// _.unset +{ + const object = { a: { b: "", c: true } }; + + _.unset(object, "a.b"); // $ExpectType boolean + _.unset(object, ["a", "b"]); // $ExpectType boolean + _(object).unset("a.b"); // $ExpectType LoDashImplicitWrapper + _(object).unset(["a", "b"]); // $ExpectType LoDashImplicitWrapper + _.chain(object).unset("a.b"); // $ExpectType LoDashExplicitWrapper + _.chain(object).unset(["a", "b"]); // $ExpectType LoDashExplicitWrapper + fp.unset("a.b", object); // $ExpectType boolean + fp.unset("a.b")(object); // $ExpectType boolean + fp.unset(["a", "b"])(object); // $ExpectType boolean +} + +// _.update +{ + const object = { a: { b: [0] } }; + const updater = (value: any) => 0; + + _.update(object, "a.b[1]", updater); // $ExpectType any + _.update(object, ["a", "b", 1], updater); // $ExpectType any + _(object).update("a.b[1]", updater); // $ExpectType LoDashImplicitWrapper + _(object).update(["a", "b", 1], updater); // $ExpectType LoDashImplicitWrapper + _.chain(object).update("a.b[1]", updater); // $ExpectType LoDashExplicitWrapper + _.chain(object).update(["a", "b", 1], updater); // $ExpectType LoDashExplicitWrapper + fp.update("a.b[1]", updater, object); // $ExpectType any + fp.update(["a", "b", 1])(updater)(object); // $ExpectType any +} + +// _.updateWith +{ + interface SampleResult { + a: { + b: number[]; + }; + } + const object: SampleResult = { a: { b: [] } }; + const updater = (value: any) => 0; + const customizer = (value: any, key: string, object: SampleResult) => 0; + + _.updateWith(object, "a.b[1]", updater); // $ExpectType SampleResult + _.updateWith(object, "a.b[1]", updater, customizer); // $ExpectType SampleResult + _.updateWith(object, ["a", "b", 1], updater, customizer); // $ExpectType SampleResult + _(object).updateWith("a.b[1]", updater); // $ExpectType LoDashImplicitWrapper + _(object).updateWith("a.b[1]", updater, customizer); // $ExpectType LoDashImplicitWrapper + _(object).updateWith(["a", "b", 1], updater, customizer); // $ExpectType LoDashImplicitWrapper + _.chain(object).updateWith("a.b[1]", updater, customizer); // $ExpectType LoDashExplicitWrapper + fp.updateWith(customizer, "a.b[1]", updater, object); // $ExpectType SampleResult + fp.updateWith(customizer)(["a", "b", 1])(updater)(object); // $ExpectType SampleResult +} + +// _.values +// _.valuesIn +{ + const dict: _.Dictionary = {}; + const numDict: _.NumericDictionary = {}; + const list: _.List | null | undefined = anything; + const object: AbcObject = anything; + + _.values(123); // $ExpectType any[] + _.values(true); // $ExpectType any[] + _.values("hi"); // $ExpectType string[] + _.values(["h", "i"]); // $ExpectType string[] + _.values([true, false]); // $ExpectType boolean[] + _.values(dict); // $ExpectType AbcObject[] + _.values(numDict); // $ExpectType AbcObject[] + _.values(list); // $ExpectType AbcObject[] + _.values(object); // $ExpectType (string | number | boolean)[] + + _(true).values(); // $ExpectType LoDashImplicitWrapper + _("hi").values(); // $ExpectType LoDashImplicitWrapper + _(dict).values(); // $ExpectType LoDashImplicitWrapper + + _.chain(true).values(); // $ExpectType LoDashExplicitWrapper + _.chain("hi").values(); // $ExpectType LoDashExplicitWrapper + _.chain(dict).values(); // $ExpectType LoDashExplicitWrapper + + fp.values("hi"); // $ExpectType string[] + fp.values(["h", "i"]); // $ExpectType string[] + fp.values([true, false]); // $ExpectType boolean[] + fp.values(dict); // $ExpectType AbcObject[] + fp.values(numDict); // $ExpectType AbcObject[] + fp.values(list); // $ExpectType AbcObject[] + fp.values(object); // $ExpectType (string | number | boolean)[] + + _.valuesIn([true, false]); // $ExpectType boolean[] + _.valuesIn(dict); // $ExpectType AbcObject[] + _.valuesIn(numDict); // $ExpectType AbcObject[] + _.valuesIn(list); // $ExpectType AbcObject[] + _.valuesIn(object); // $ExpectType (string | number | boolean)[] + + _(dict).valuesIn(); // $ExpectType LoDashImplicitWrapper + _.chain(dict).valuesIn(); // $ExpectType LoDashExplicitWrapper + + fp.valuesIn(dict); // $ExpectType AbcObject[] + fp.valuesIn(numDict); // $ExpectType AbcObject[] + fp.valuesIn(list); // $ExpectType AbcObject[] + fp.valuesIn(object); // $ExpectType (string | number | boolean)[] +} + +/******* + * Seq * + *******/ + +// _ +{ + _(""); // $ExpectType LoDashImplicitWrapper + _(42); // $ExpectType LoDashImplicitWrapper + _(true); // $ExpectType LoDashImplicitWrapper + _([""]); // $ExpectType LoDashImplicitWrapper + _({ a: "" }); // $ExpectType LoDashImplicitWrapper<{ a: string; }> + + { + const a: AbcObject[] = []; + _(a); // $ExpectType LoDashImplicitWrapper + } + + { + const a: AbcObject[] | null | undefined = anything; + _(a); // $ExpectType LoDashImplicitWrapper + } +} // _.chain -namespace TestChain { - { - let result: _.LoDashExplicitWrapper; - - result = _.chain(''); - result = _('').chain(); - - result = _.chain('').chain(); - result = _('').chain().chain(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _.chain(42); - result = _(42).chain(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _.chain(true); - result = _(true).chain(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _.chain(['']); - result = _(['']).chain(); - } - - { - let result: _.LoDashExplicitObjectWrapper<{a: string}>; - - result = _.chain<{a: string}>({a: ''}); - result = _<{a: string}>({a: ''}).chain(); - } +{ + _.chain(""); // $ExpectType LoDashExplicitWrapper + _("").chain(); // $ExpectType LoDashExplicitWrapper + _.chain("").chain(); // $ExpectType LoDashExplicitWrapper + _.chain(42); // $ExpectType LoDashExplicitWrapper + _.chain([""]); // $ExpectType LoDashExplicitWrapper + _.chain({ a: 42 }); // $ExpectType LoDashExplicitWrapper<{ a: number; }> } // _.tap -namespace TestTap { - { - let interceptor = (value: string) => {}; - let result: string; +{ + // $ExpectType string + _.tap("a", (value) => { + value; // $ExpectType string + }); + // $ExpectType boolean[] + _.tap([true], (value) => { + value; // $ExpectType boolean[] + }); + // $ExpectType { a: number; } + _.tap({ a: 42 }, (value) => { + value; // $ExpectType { a: number; } + }); - _.tap('', interceptor); - } + // $ExpectType LoDashImplicitWrapper + _("a").tap((value) => { + value; // $ExpectType string + }); + // $ExpectType LoDashImplicitWrapper + _([true]).tap((value) => { + value; // $ExpectType boolean[] + }); + // $ExpectType LoDashImplicitWrapper<{ a: number; }> + _({ a: 42 }).tap((value) => { + value; // $ExpectType { a: number; } + }); - { - let interceptor = (value: string[]) => {}; - let result: _.LoDashImplicitArrayWrapper; + // $ExpectType LoDashExplicitWrapper + _.chain("a").tap((value) => { + value; // $ExpectType string + }); + // $ExpectType LoDashExplicitWrapper + _.chain([true]).tap((value) => { + value; // $ExpectType boolean[] + }); + // $ExpectType LoDashExplicitWrapper<{ a: number; }> + _.chain({ a: 42 }).tap((value) => { + value; // $ExpectType { a: number; } + }); - _.tap([''], interceptor); - } - - { - let interceptor = (value: {a: string}) => {}; - let result: _.LoDashImplicitObjectWrapper<{a: string}>; - - _.tap({a: ''}, interceptor); - } - - { - let interceptor = (value: string) => {}; - let result: _.LoDashImplicitWrapper; - - _.chain('').tap(interceptor); - - _('').tap(interceptor); - } - - { - let interceptor = (value: string[]) => {}; - let result: _.LoDashImplicitArrayWrapper; - - _.chain(['']).tap(interceptor); - - _(['']).tap(interceptor); - } - - { - let interceptor = (value: {a: string}) => {}; - let result: _.LoDashImplicitWrapper<{a: string}>; - - _.chain({a: ''}).tap(interceptor); - - _({a: ''}).tap(interceptor); - } - - { - let interceptor = (value: string) => {}; - let result: _.LoDashExplicitWrapper; - - _.chain('').tap(interceptor); - - _('').chain().tap(interceptor); - } - - { - let interceptor = (value: string[]) => {}; - let result: _.LoDashExplicitArrayWrapper; - - _.chain(['']).tap(interceptor); - - _(['']).chain().tap(interceptor); - } - - { - let interceptor = (value: {a: string}) => {}; - let result: _.LoDashExplicitWrapper<{a: string}>; - - _.chain({a: ''}).tap(interceptor); - - _({a: ''}).chain().tap(interceptor); - } + fp.tap((value: string) => {}, "a" as string); // $ExpectType string + fp.tap((value: string) => {})("a"); // $ExpectType string + fp.tap((value: string[]) => {}, ["a"]); // $ExpectType string[] } // _.thru -namespace TestThru { - type Interceptor = (value: T) => T; +{ + // $ExpectType number + _.thru("a", (value) => { + value; // $ExpectType string + return 1; + }); + // $ExpectType number + _.thru([true], (value) => { + value; // $ExpectType boolean[] + return 1; + }); + // $ExpectType number + _.thru({ a: 42 }, (value) => { + value; // $ExpectType { a: number; } + return 1; + }); - { - let interceptor: Interceptor = (x) => x; - let result: number; + // $ExpectType LoDashImplicitWrapper + _("a").thru((value) => { + value; // $ExpectType string + return 1; + }); + // $ExpectType LoDashImplicitWrapper + _([true]).thru((value) => { + value; // $ExpectType boolean[] + return 1; + }); + // $ExpectType LoDashImplicitWrapper + _({ a: 42 }).thru((value) => { + value; // $ExpectType { a: number; } + return 1; + }); - result = _.thru(1, interceptor); - } + // $ExpectType LoDashExplicitWrapper + _.chain("a").thru((value) => { + value; // $ExpectType string + return 1; + }); + // $ExpectType LoDashExplicitWrapper + _.chain([true]).thru((value) => { + value; // $ExpectType boolean[] + return 1; + }); + // $ExpectType LoDashExplicitWrapper + _.chain({ a: 42 }).thru((value) => { + value; // $ExpectType { a: number; } + return 1; + }); - { - let interceptor: Interceptor = (x) => x; - let result: _.LoDashImplicitWrapper; - - result = _(1).thru(interceptor); - } - - { - let interceptor: Interceptor = (x) => x; - let result: _.LoDashImplicitWrapper; - - result = _('').thru(interceptor); - } - - { - let interceptor: Interceptor = (x) => x; - let result: _.LoDashImplicitWrapper; - - result = _(true).thru(interceptor); - } - - { - let interceptor: Interceptor<{a: string}> = (x) => x; - let result: _.LoDashImplicitObjectWrapper<{a: string}>; - - result = _({a: ''}).thru<{a: string}>(interceptor); - } - - { - let interceptor: Interceptor = (x) => x; - let result: _.LoDashImplicitArrayWrapper; - - result = _([1, 2, 3]).thru(interceptor); - } - - { - let interceptor: Interceptor = (x) => x; - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().thru(interceptor); - } - - { - let interceptor: Interceptor = (x) => x; - let result: _.LoDashExplicitWrapper; - - result = _('').chain().thru(interceptor); - } - - { - let interceptor: Interceptor = (x) => x; - let result: _.LoDashExplicitWrapper; - - result = _(true).chain().thru(interceptor); - } - - { - let interceptor: Interceptor<{a: string}> = (x) => x; - let result: _.LoDashExplicitObjectWrapper<{a: string}>; - - result = _({a: ''}).chain().thru<{a: string}>(interceptor); - } - - { - let interceptor: Interceptor = (x) => x; - let result: _.LoDashExplicitArrayWrapper; - - result = _([1, 2, 3]).chain().thru(interceptor); - } + fp.thru((x: number) => x.toString(), 1); // $ExpectType string + fp.thru((x: number) => x.toString())(1); // $ExpectType string + fp.thru((x: number[]) => x.toString())([1]); // $ExpectType string } // _.prototype.commit -namespace TestCommit { - { - let result: _.LoDashImplicitWrapper; - result = _(42).commit(); - } - - { - let result: _.LoDashImplicitArrayWrapper; - result = _([]).commit(); - } - - { - let result: _.LoDashImplicitObjectWrapper; - result = _({}).commit(); - } - - { - let result: _.LoDashExplicitWrapper; - result = _(42).chain().commit(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - result = _([]).chain().commit(); - } - - { - let result: _.LoDashExplicitObjectWrapper; - result = _({}).chain().commit(); - } +{ + _(42).commit(); // $ExpectType LoDashImplicitWrapper + _({ a: 42 }).commit(); // $ExpectType LoDashImplicitWrapper<{ a: number; }> + _.chain(42).commit(); // $ExpectType LoDashExplicitWrapper + _.chain({ a: 42 }).commit(); // $ExpectType LoDashExplicitWrapper<{ a: number; }> } // _.prototype.concat -namespace TestConcat { +{ const numberROA: number[] = [0]; // TODO: Should be ReadonlyArray, but see comment on type Many _.concat(1); // $ExpectType number[] @@ -3798,8586 +6323,66 @@ namespace TestConcat { _.chain(numberROA).concat(numberROA); // $ExpectType LoDashExplicitWrapper _.chain(numberROA).concat(numberROA, numberROA); // $ExpectType LoDashExplicitWrapper - const stringROA: string[] = ['']; // TODO: Should be ReadonlyArray, but see comment on type Many - - _.concat('a'); // $ExpectType string[] - _.concat(['a']); // $ExpectType string[] - _.concat(stringROA); // $ExpectType string[] - _.concat('a', 'b'); // $ExpectType string[] - _.concat('a', ['a']); // $ExpectType string[] - _.concat('a', ['a'], stringROA); // $ExpectType string[] - - _('a').concat('b'); // $ExpectType LoDashImplicitWrapper - _('a').concat(['a']); // $ExpectType LoDashImplicitWrapper - _('a').concat(['b'], stringROA); // $ExpectType LoDashImplicitWrapper - _(['a']).concat('b'); // $ExpectType LoDashImplicitWrapper - _(stringROA).concat(stringROA); // $ExpectType LoDashImplicitWrapper - _(stringROA).concat(stringROA, stringROA); // $ExpectType LoDashImplicitWrapper - - _.chain('a').concat('b'); // $ExpectType LoDashExplicitWrapper - _.chain('a').concat(['a']); // $ExpectType LoDashExplicitWrapper - _.chain('a').concat(['b'], stringROA); // $ExpectType LoDashExplicitWrapper - _.chain(['a']).concat('b'); // $ExpectType LoDashExplicitWrapper - _.chain(stringROA).concat(stringROA); // $ExpectType LoDashExplicitWrapper - _.chain(stringROA).concat(stringROA, stringROA); // $ExpectType LoDashExplicitWrapper - const abcObject: AbcObject = { a: 1, b: 'foo', c: true }; const objectROA: AbcObject[] = [{ a: 1, b: 'foo', c: true }]; // TODO: Should be ReadonlyArray, but see comment on type Many - _.concat(abcObject); // $ExpectType AbcObject[] - _.concat([abcObject]); // $ExpectType AbcObject[] - _.concat(objectROA); // $ExpectType AbcObject[] _.concat(abcObject, abcObject); // $ExpectType AbcObject[] - _.concat(abcObject, [abcObject]); // $ExpectType AbcObject[] _.concat(abcObject, [abcObject], objectROA); // $ExpectType AbcObject[] _(abcObject).concat(abcObject); // $ExpectType LoDashImplicitWrapper - _(abcObject).concat([abcObject]); // $ExpectType LoDashImplicitWrapper _(abcObject).concat([abcObject], objectROA); // $ExpectType LoDashImplicitWrapper - _([abcObject]).concat(abcObject); // $ExpectType LoDashImplicitWrapper - _(objectROA).concat(objectROA); // $ExpectType LoDashImplicitWrapper - _(objectROA).concat(objectROA, objectROA); // $ExpectType LoDashImplicitWrapper _.chain(abcObject).concat(abcObject); // $ExpectType LoDashExplicitWrapper - _.chain(abcObject).concat([abcObject]); // $ExpectType LoDashExplicitWrapper _.chain(abcObject).concat([abcObject], objectROA); // $ExpectType LoDashExplicitWrapper - _.chain([abcObject]).concat(abcObject); // $ExpectType LoDashExplicitWrapper - _.chain(objectROA).concat(objectROA); // $ExpectType LoDashExplicitWrapper - _.chain(objectROA).concat(objectROA, objectROA); // $ExpectType LoDashExplicitWrapper } // _.prototype.plant -namespace TestPlant { - { - let result: _.LoDashImplicitWrapper; - result = _(anything).plant(42); - } +{ + _(anything).plant(""); // $ExpectType LoDashImplicitWrapper + _(anything).plant(42); // $ExpectType LoDashImplicitWrapper + _(anything).plant([""]); // $ExpectType LoDashImplicitWrapper + _(anything).plant({ a: 42 }); // $ExpectType LoDashImplicitWrapper<{ a: number; }> - { - let result: _.LoDashImplicitStringWrapper; - result = _(anything).plant(''); - } - - { - let result: _.LoDashImplicitWrapper; - result = _(anything).plant(true); - } - - { - let result: _.LoDashImplicitNumberArrayWrapper; - result = _(anything).plant([42]); - } - - { - let result: _.LoDashImplicitArrayWrapper; - result = _(anything).plant([]); - } - - { - let result: _.LoDashImplicitWrapper<{}>; - result = _(anything).plant<{}>({}); - } - - { - let result: _.LoDashExplicitWrapper; - result = _(anything).chain().plant(42); - } - - { - let result: _.LoDashExplicitStringWrapper; - result = _(anything).chain().plant(''); - } - - { - let result: _.LoDashExplicitWrapper; - result = _(anything).chain().plant(true); - } - - { - let result: _.LoDashExplicitNumberArrayWrapper; - result = _(anything).chain().plant([42]); - } - - { - let result: _.LoDashExplicitArrayWrapper; - result = _(anything).chain().plant([]); - } - - { - let result: _.LoDashExplicitWrapper<{}>; - result = _(anything).chain().plant<{}>({}); - } + _.chain(anything).plant(""); // $ExpectType LoDashExplicitWrapper + _.chain(anything).plant(42); // $ExpectType LoDashExplicitWrapper + _.chain(anything).plant([""]); // $ExpectType LoDashExplicitWrapper + _.chain(anything).plant({ a: 42 }); // $ExpectType LoDashExplicitWrapper<{ a: number; }> } // _.prototype.reverse -namespace TestReverse { - { - let result: _.LoDashImplicitArrayWrapper; - result = _([42]).reverse(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - result = _([42]).chain().reverse(); - } -} - -// _.prototype.toJSON -namespace TestToJSON { - { - let result: string; - - result = _('').toJSON(); - result = _('').chain().toJSON(); - } - - { - let result: number; - - result = _(42).toJSON(); - result = _(42).chain().toJSON(); - } - - { - let result: boolean; - - result = _(true).toJSON(); - result = _(true).chain().toJSON(); - } - - { - let result: string[]; - - result = _(['']).toJSON(); - result = _(['']).chain().toJSON(); - } - - { - let result: {a: string}; - - result = _({a: ''}).toJSON(); - result = _({a: ''}).chain().toJSON(); - } +{ + _([42]).reverse(); // $ExpectType LoDashImplicitWrapper + _.chain([42]).reverse(); // $ExpectType LoDashExplicitWrapper } // _.prototype.toString -namespace TestToString { - let result: string; +{ + _('').toString(); // $ExpectType string + _(42).toString(); // $ExpectType string + _([true]).toString(); // $ExpectType string + _({}).toString(); // $ExpectType string - result = _('').toString(); - result = _(42).toString(); - result = _(true).toString(); - result = _(['']).toString(); - result = _({}).toString(); - - result = _('').chain().toString(); - result = _(42).chain().toString(); - result = _(true).chain().toString(); - result = _(['']).chain().toString(); - result = _({}).chain().toString(); + _.chain('').toString(); // $ExpectType string + _.chain(42).toString(); // $ExpectType string + _.chain([true]).toString(); // $ExpectType string + _.chain({}).toString(); // $ExpectType string } // _.prototype.value -namespace TestValue { - { - let result: string; - - result = _('').value(); - result = _('').chain().value(); - } - - { - let result: number; - - result = _(42).value(); - result = _(42).chain().value(); - } - - { - let result: boolean; - - result = _(true).value(); - result = _(true).chain().value(); - } - - { - let result: string[]; - - result = _(['']).value(); - result = _(['']).chain().value(); - } - - { - let result: {a: string}; - - result = _({a: ''}).value(); - result = _({a: ''}).chain().value(); - } -} - // _.prototype.valueOf -namespace TestValueOf { - { - let result: string; - - result = _('').valueOf(); - result = _('').chain().valueOf(); - } - - { - let result: number; - - result = _(42).valueOf(); - result = _(42).chain().valueOf(); - } - - { - let result: boolean; - - result = _(true).valueOf(); - result = _(true).chain().valueOf(); - } - - { - let result: string[]; - - result = _(['']).valueOf(); - result = _(['']).chain().valueOf(); - } - - { - let result: {a: string}; - - result = _({a: ''}).valueOf(); - result = _({a: ''}).chain().valueOf(); - } -} - -/************** - * Collection * - **************/ - -// _.at -namespace TestAt { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let dictionary: _.Dictionary | null | undefined = anything; - - { - let result: AbcObject[]; - - result = _.at(array, 0, '1', [2], ['3'], [4, '5']); - result = _.at(list, 0, '1', [2], ['3'], [4, '5']); - result = _.at(dictionary, 0, '1', [2], ['3'], [4, '5']); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).at(0, '1', [2], ['3'], [4, '5']); - result = _(list).at(0, '1', [2], ['3'], [4, '5']); - result = _(dictionary).at(0, '1', [2], ['3'], [4, '5']); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().at(0, '1', [2], ['3'], [4, '5']); - result = _(list).chain().at(0, '1', [2], ['3'], [4, '5']); - result = _(dictionary).chain().at(0, '1', [2], ['3'], [4, '5']); - } -} - -// _.countBy -namespace TestCountBy { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; - let numericDictionary: _.NumericDictionary | null | undefined = obj; - - let stringIterator: (value: string, index: number, collection: string) => any = (value: string, index: number, collection: string) => 1; - let listIterator: (value: AbcObject, index: number, collection: _.List) => any = (value: AbcObject, index: number, collection: _.List) => 1; - let dictionaryIterator: (value: AbcObject, key: string, collection: _.Dictionary) => any = (value: AbcObject, key: string, collection: _.Dictionary) => 1; - let numericDictionaryIterator: (value: AbcObject, key: number, collection: _.NumericDictionary) => any = (value: AbcObject, key: number, collection: _.NumericDictionary) => 1; - - { - let result: _.Dictionary; - - result = _.countBy(''); - result = _.countBy('', stringIterator); - - result = _.countBy(array); - result = _.countBy(array, listIterator); - result = _.countBy(array, ''); - result = _.countBy(array, {a: 42}); - result = _.countBy(array, {a: 42}); - - result = _.countBy(list); - result = _.countBy(list, listIterator); - result = _.countBy(list, ''); - result = _.countBy(list, {a: 42}); - result = _.countBy(list, {a: 42}); - - result = _.countBy(dictionary); - result = _.countBy(dictionary, dictionaryIterator); - result = _.countBy(dictionary, ''); - result = _.countBy(dictionary, {a: 42}); - result = _.countBy(dictionary, {a: 42}); - - result = _.countBy(numericDictionary); - result = _.countBy(numericDictionary, numericDictionaryIterator); - result = _.countBy(numericDictionary, ''); - result = _.countBy(numericDictionary, {a: 42}); - result = _.countBy(numericDictionary, {a: 42}); - } - - { - let resutl: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _('').countBy(); - result = _('').countBy(stringIterator); - - result = _(array).countBy(); - result = _(array).countBy(listIterator); - result = _(array).countBy(''); - result = _(array).countBy<{a: number}>({a: 42}); - result = _(array).countBy({a: 42}); - - result = _(list).countBy(); - result = _(list).countBy(listIterator); - result = _(list).countBy(''); - result = _(list).countBy<{a: number}>({a: 42}); - result = _(list).countBy({a: 42}); - - result = _(dictionary).countBy(); - result = _(dictionary).countBy(dictionaryIterator); - result = _(dictionary).countBy(''); - result = _(dictionary).countBy<{a: number}>({a: 42}); - result = _(dictionary).countBy({a: 42}); - - result = _(numericDictionary).countBy(); - result = _(numericDictionary).countBy(numericDictionaryIterator); - result = _(numericDictionary).countBy(''); - result = _(numericDictionary).countBy<{a: number}>({a: 42}); - result = _(numericDictionary).countBy({a: 42}); - } - - { - let resutl: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _('').chain().countBy(); - result = _('').chain().countBy(stringIterator); - - result = _(array).chain().countBy(); - result = _(array).chain().countBy(listIterator); - result = _(array).chain().countBy(''); - result = _(array).chain().countBy<{a: number}>({a: 42}); - result = _(array).chain().countBy({a: 42}); - - result = _(list).chain().countBy(); - result = _(list).chain().countBy(listIterator); - result = _(list).chain().countBy(''); - result = _(list).chain().countBy<{a: number}>({a: 42}); - result = _(list).chain().countBy({a: 42}); - - result = _(dictionary).chain().countBy(); - result = _(dictionary).chain().countBy(dictionaryIterator); - result = _(dictionary).chain().countBy(''); - result = _(dictionary).chain().countBy<{a: number}>({a: 42}); - result = _(dictionary).chain().countBy({a: 42}); - - result = _(numericDictionary).chain().countBy(); - result = _(numericDictionary).chain().countBy(numericDictionaryIterator); - result = _(numericDictionary).chain().countBy(''); - result = _(numericDictionary).chain().countBy<{a: number}>({a: 42}); - result = _(numericDictionary).chain().countBy({a: 42}); - } -} - -// _.each -namespace TestEach { - let array: AbcObject[] = []; - let list: _.List = []; - let dictionary: _.Dictionary = {}; - let nilArray: AbcObject[] | null | undefined = [] as any; - let nilList: _.List | null | undefined = [] as any; - let nilDictionary: _.Dictionary | null | undefined = anything; - - let stringIterator: (char: string, index: number, string: string) => any = (char: string, index: number, string: string) => 1; - let listIterator: (value: AbcObject, index: number, collection: _.List) => any = (value: AbcObject, index: number, collection: _.List) => 1; - let dictionaryIterator: (value: AbcObject, key: string, collection: _.Dictionary) => any = (value: AbcObject, key: string, collection: _.Dictionary) => 1; - - { - let result: string; - - result = _.each('', stringIterator); - } - - { - let result: string | null | undefined; - - result = _.each('' as (string | null | undefined), stringIterator); - } - - { - let result: AbcObject[]; - - result = _.each(array, listIterator); - } - - { - let result: AbcObject[] | null | undefined; - - result = _.each(nilArray, listIterator); - } - - { - let result: _.List; - - result = _.each(list, listIterator); - } - - { - let result: _.List | null | undefined; - - result = _.each(nilList, listIterator); - } - - { - let result: _.Dictionary; - - result = _.each(dictionary, dictionaryIterator); - } - - { - let result: _.Dictionary | null | undefined; - - result = _.each(nilDictionary, dictionaryIterator); - } - - { - let result: _.LoDashImplicitWrapper; - - result = _('').each(stringIterator); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).each(listIterator); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.List>; - - result = _(list).each(listIterator); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _(dictionary).each(dictionaryIterator); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('').chain().each(stringIterator); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().each(listIterator); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.List>; - - result = _(list).chain().each(listIterator); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _(dictionary).chain().each(dictionaryIterator); - } -} - -// _.eachRight -namespace TestEachRight { - let array: AbcObject[] = []; - let list: _.List = []; - let dictionary: _.Dictionary = {}; - let nilArray: AbcObject[] | null | undefined = [] as any; - let nilList: _.List | null | undefined = [] as any; - let nilDictionary: _.Dictionary | null | undefined = anything; - - let stringIterator: (char: string, index: number, string: string) => any = (char: string, index: number, string: string) => 1; - let listIterator: (value: AbcObject, index: number, collection: _.List) => any = (value: AbcObject, index: number, collection: _.List) => 1; - let dictionaryIterator: (value: AbcObject, key: string, collection: _.Dictionary) => any = (value: AbcObject, key: string, collection: _.Dictionary) => 1; - - { - let result: string; - - result = _.eachRight('', stringIterator); - } - - { - let result: string | null | undefined; - - result = _.eachRight('' as (string | null | undefined), stringIterator); - } - - { - let result: AbcObject[]; - - result = _.eachRight(array, listIterator); - } - - { - let result: AbcObject[] | null | undefined; - - result = _.eachRight(nilArray, listIterator); - } - - { - let result: _.List; - - result = _.eachRight(list, listIterator); - } - - { - let result: _.List | null | undefined; - - result = _.eachRight(nilList, listIterator); - } - - { - let result: _.Dictionary; - - result = _.eachRight(dictionary, dictionaryIterator); - } - - { - let result: _.Dictionary | null | undefined; - - result = _.eachRight(nilDictionary, dictionaryIterator); - } - - { - let result: _.LoDashImplicitWrapper; - - result = _('').eachRight(stringIterator); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).eachRight(listIterator); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.List>; - - result = _(list).eachRight(listIterator); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _(dictionary).eachRight(dictionaryIterator); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('').chain().eachRight(stringIterator); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().eachRight(listIterator); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.List>; - - result = _(list).chain().eachRight(listIterator); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _(dictionary).chain().eachRight(dictionaryIterator); - } -} - -// _.every -namespace TestEvery { - type SampleObject = {a: number; b: string; c: boolean;}; - - let array: SampleObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; - let numericDictionary: _.NumericDictionary | null | undefined = obj; - - let listIterator = (value: SampleObject, index: number, collection: _.List) => true; - let dictionaryIterator = (value: SampleObject, key: string, collection: _.Dictionary) => true; - let numericDictionaryIterator = (value: SampleObject, key: number, collection: _.NumericDictionary) => true; - - { - let result: boolean; - - result = _.every(array); - result = _.every(array, listIterator); - result = _.every(array, 'a'); - result = _.every(array, ['a', 42]); - result = _.every(array, {a: 42}); - - result = _.every(list); - result = _.every(list, listIterator); - result = _.every(list, 'a'); - result = _.every(list, ['a', 42]); - result = _.every(list, {a: 42}); - - result = _.every(dictionary); - result = _.every(dictionary, dictionaryIterator); - result = _.every(dictionary, 'a'); - result = _.every(dictionary, ['a', 42]); - result = _.every(dictionary, {a: 42}); - - result = _.every(numericDictionary); - result = _.every(numericDictionary, numericDictionaryIterator); - result = _.every(numericDictionary, 'a'); - result = _.every(numericDictionary, ['a', 42]); - result = _.every(numericDictionary, {a: 42}); - - result = _(array).every(); - result = _(array).every(listIterator); - result = _(array).every('a'); - result = _(array).every(['a', 42]); - result = _(array).every({a: 42}); - - result = _(list).every(); - result = _(list).every(listIterator); - result = _(list).every('a'); - result = _(list).every(['a', 42]); - result = _(list).every({a: 42}); - - result = _(dictionary).every(); - result = _(dictionary).every(dictionaryIterator); - result = _(dictionary).every('a'); - result = _(dictionary).every(['a', 42]); - result = _(dictionary).every({a: 42}); - - result = _(numericDictionary).every(); - result = _(numericDictionary).every(numericDictionaryIterator); - result = _(numericDictionary).every('a'); - result = _(numericDictionary).every(['a', 42]); - result = _(numericDictionary).every({a: 42}); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(array).chain().every(); - result = _(array).chain().every(listIterator); - result = _(array).chain().every('a'); - result = _(array).chain().every(['a', 42]); - result = _(array).chain().every({a: 42}); - - result = _(list).chain().every(); - result = _(list).chain().every(listIterator); - result = _(list).chain().every('a'); - result = _(list).chain().every(['a', 42]); - result = _(list).chain().every({a: 42}); - - result = _(dictionary).chain().every(); - result = _(dictionary).chain().every(dictionaryIterator); - result = _(dictionary).chain().every('a'); - result = _(dictionary).chain().every(['a', 42]); - result = _(dictionary).chain().every({a: 42}); - - result = _(numericDictionary).chain().every(); - result = _(numericDictionary).chain().every(numericDictionaryIterator); - result = _(numericDictionary).chain().every('a'); - result = _(numericDictionary).chain().every(['a', 42]); - result = _(numericDictionary).chain().every<{a: number}>({a: 42}); - } -} - -// _.filter -namespace TestFilter { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; - - let stringIterator = (char: string, index: number, string: string) => true; - let listIterator = (value: AbcObject, index: number, collection: _.List) => true; - let dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => true; - - { - let result: string[]; - - result = _.filter('', stringIterator); - } - - { - let result: AbcObject[]; - - result = _.filter(array, listIterator); - result = _.filter(array, ''); - result = _.filter(array, {a: 42}); - result = _.filter(array, ["a", 42]); - - result = _.filter(list, listIterator); - result = _.filter(list, ''); - result = _.filter(list, {a: 42}); - result = _.filter(list, ["a", 42]); - - result = _.filter(dictionary, dictionaryIterator); - result = _.filter(dictionary, ''); - result = _.filter(dictionary, {a: 42}); - result = _.filter(dictionary, ["a", 42]); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _('').filter(stringIterator); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).filter(listIterator); - result = _(array).filter(''); - result = _(array).filter({a: 42}); - result = _(array).filter(["a", 42]); - - result = _(list).filter(listIterator); - result = _(list).filter(''); - result = _(list).filter({a: 42}); - result = _(list).filter(["a", 42]); - - result = _(dictionary).filter(dictionaryIterator); - result = _(dictionary).filter(''); - result = _(dictionary).filter({a: 42}); - result = _(dictionary).filter(["a", 42]); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _('').chain().filter(stringIterator); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().filter(listIterator); - result = _(array).chain().filter(''); - result = _(array).chain().filter({a: 42}); - result = _(array).chain().filter(["a", 42]); - - result = _(list).chain().filter(listIterator); - result = _(list).chain().filter(''); - result = _(list).chain().filter({a: 42}); - result = _(list).chain().filter(["a", 42]); - - result = _(dictionary).chain().filter(dictionaryIterator); - result = _(dictionary).chain().filter(''); - result = _(dictionary).chain().filter({a: 42}); - result = _(dictionary).chain().filter(["a", 42]); - } - - { - // Test filtering with type guard - let a2: Array | null | undefined = anything; - let d2: _.Dictionary | null | undefined = anything; - - _.filter(a2, (item: string | number): item is number => typeof item === "number"); // $ExpectType number[] - _.filter(d2, (item: string | number): item is number => typeof item === "number"); // $ExpectType number[] - _(a2).filter((item: string | number): item is number => typeof item === "number"); // $ExpectType LoDashImplicitWrapper - _(d2).filter((item: string | number): item is number => typeof item === "number"); // $ExpectType LoDashImplicitWrapper - _(a2).chain().filter((item: string | number): item is number => typeof item === "number"); // $ExpectType LoDashExplicitWrapper - _(d2).chain().filter((item: string | number): item is number => typeof item === "number"); // $ExpectType LoDashExplicitWrapper - } -} - -// _.find -namespace TestFind { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; - - let listIterator = (value: AbcObject, index: number, collection: _.List) => true; - let dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => true; - - let result: AbcObject | undefined; - - result = _.find(array); - result = _.find(array); - result = _.find(array, listIterator); - result = _.find(array, listIterator, 1); - result = _.find(array, ''); - result = _.find(array, '', 1); - result = _.find(array, {a: 42}); - result = _.find(array, {a: 42}, 1); - result = _.find(array, ['a', 5]); - result = _.find(array, ['a', 5], 1); - - result = _.find(list); - result = _.find(list); - result = _.find(list, listIterator); - result = _.find(list, listIterator, 1); - result = _.find(list, ''); - result = _.find(list, '', 1); - result = _.find(list, {a: 42}); - result = _.find(list, {a: 42}, 1); - result = _.find(list, ['a', 5]); - result = _.find(list, ['a', 5], 1); - - result = _.find(dictionary); - result = _.find(dictionary); - result = _.find(dictionary, dictionaryIterator); - result = _.find(dictionary, dictionaryIterator, 1); - result = _.find(dictionary, ''); - result = _.find(dictionary, '', 1); - result = _.find(dictionary, {a: 42}); - result = _.find(dictionary, {a: 42}, 1); - result = _.find(dictionary, ['a', 5]); - result = _.find(dictionary, ['a', 5], 1); - - result = _(array).find(); - result = _(array).find(listIterator); - result = _(array).find(listIterator, 1); - result = _(array).find(''); - result = _(array).find('', 1); - result = _(array).find({a: 42}); - result = _(array).find({a: 42}, 1); - result = _(array).find(['a', 5]); - result = _(array).find(['a', 5], 1); - - result = _(list).find(); - result = _(list).find(listIterator); - result = _(list).find(listIterator, 1); - result = _(list).find(''); - result = _(list).find('', 1); - result = _(list).find({a: 42}); - result = _(list).find({a: 42}, 1); - result = _(list).find(['a', 5]); - result = _(list).find(['a', 5], 1); - - result = _(dictionary).find(); - result = _(dictionary).find(dictionaryIterator); - result = _(dictionary).find(dictionaryIterator, 1); - result = _(dictionary).find(''); - result = _(dictionary).find('', 1); - result = _(dictionary).find({a: 42}); - result = _(dictionary).find({a: 42}, 1); - result = _(dictionary).find(['a', 5]); - result = _(dictionary).find(['a', 5], 1); - - result = _.find([anything as AbcObject, null, undefined], (value: AbcObject | null | undefined): value is AbcObject | undefined => value !== null); - result = _([anything as AbcObject, null, undefined]).find((value: AbcObject | null | undefined): value is AbcObject | undefined => value !== null); -} - -// _.findLast -namespace TestFindLast { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; - - let listIterator = (value: AbcObject, index: number, collection: _.List) => true; - let dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => true; - - let result: AbcObject | undefined; - - result = _.findLast(array); - result = _.findLast(array); - result = _.findLast(array, listIterator); - result = _.findLast(array, listIterator, 1); - result = _.findLast(array, ''); - result = _.findLast(array, '', 1); - result = _.findLast(array, {a: 42}); - result = _.findLast(array, {a: 42}, 1); - result = _.findLast(array, ['a', 5]); - result = _.findLast(array, ['a', 5], 1); - - result = _.findLast(list); - result = _.findLast(list); - result = _.findLast(list, listIterator); - result = _.findLast(list, listIterator, 1); - result = _.findLast(list, ''); - result = _.findLast(list, '', 1); - result = _.findLast(list, {a: 42}); - result = _.findLast(list, {a: 42}, 1); - result = _.findLast(list, ['a', 5]); - result = _.findLast(list, ['a', 5], 1); - - result = _.findLast(dictionary); - result = _.findLast(dictionary); - result = _.findLast(dictionary, dictionaryIterator); - result = _.findLast(dictionary, dictionaryIterator, 1); - result = _.findLast(dictionary, ''); - result = _.findLast(dictionary, '', 1); - result = _.findLast(dictionary, {a: 42}); - result = _.findLast(dictionary, {a: 42}, 1); - result = _.findLast(dictionary, ['a', 5]); - result = _.findLast(dictionary, ['a', 5], 1); - - result = _(array).findLast(); - result = _(array).findLast(listIterator); - result = _(array).findLast(listIterator, 1); - result = _(array).findLast(''); - result = _(array).findLast('', 1); - result = _(array).findLast({a: 42}); - result = _(array).findLast({a: 42}, 1); - result = _(array).findLast(['a', 5]); - result = _(array).findLast(['a', 5], 1); - - result = _(list).findLast(); - result = _(list).findLast(listIterator); - result = _(list).findLast(listIterator, 1); - result = _(list).findLast(''); - result = _(list).findLast('', 1); - result = _(list).findLast({a: 42}); - result = _(list).findLast({a: 42}, 1); - result = _(list).findLast(['a', 5]); - result = _(list).findLast(['a', 5], 1); - - result = _(dictionary).findLast(); - result = _(dictionary).findLast(dictionaryIterator); - result = _(dictionary).findLast(dictionaryIterator, 1); - result = _(dictionary).findLast(''); - result = _(dictionary).findLast('', 1); - result = _(dictionary).findLast({a: 42}); - result = _(dictionary).findLast({a: 42}, 1); - result = _(dictionary).findLast(['a', 5]); - result = _(dictionary).findLast(['a', 5], 1); - - result = _.findLast([anything as AbcObject, null, undefined], (value: AbcObject | null | undefined): value is AbcObject | undefined => value !== null); - result = _([anything as AbcObject, null, undefined]).findLast((value: AbcObject | null | undefined): value is AbcObject | undefined => value !== null); -} - -// _.flatMap -namespace TestFlatMap { - let numArray: Array | null | undefined = [1, [2, 3]] as any; - let objArray: Array<{a: number}|Array<{a: number}>> | null | undefined = [{a: 1}, [{a: 2}, {a: 3}]] as any; - - let obj: any = {}; - let numList: _.List | null | undefined = obj; - let objList: _.List<{a: number}|Array<{a: number}>> | null | undefined = obj; - - let numDictionary: _.Dictionary | null | undefined = obj; - let objDictionary: _.Dictionary<{a: number}|Array<{a: number}>> | null | undefined = obj; - - let numNumericDictionary: _.NumericDictionary | null | undefined = obj; - let objNumericDictionary: _.NumericDictionary<{a: number}|Array<{a: number}>> | null | undefined = obj; - - let stringIterator: (value: string, index: number, collection: _.List) => string|string[] = (a, b, c) => ""; - - let listIterator: (value: number|number[], index: number, collection: _.List) => number|number[] = (a, b, c) => 1; - - let dictionaryIterator: (value: number|number[], key: string, collection: _.Dictionary) => number|number[] = (a, b, c) => 1; - - let numericDictionaryIterator: (value: number|number[], key: number, collection: _.NumericDictionary) => number|number[] = (a, b, c) => 1; - - { - let result: string[]; - - result = _.flatMap('abc'); - result = _.flatMap('abc'); - - result = _.flatMap('abc', stringIterator); - result = _.flatMap('abc', stringIterator); - } - - { - let result: number[]; - - result = _.flatMap(numArray); - result = _.flatMap(numArray); - - result = _.flatMap(numArray, listIterator); - result = _.flatMap(numArray, listIterator); - - result = _.flatMap(objArray, 'a'); - - result = _.flatMap(numList); - result = _.flatMap(numList); - - result = _.flatMap(numList, listIterator); - result = _.flatMap(numList, listIterator); - - result = _.flatMap(objList, 'a'); - - result = _.flatMap(numDictionary); - result = _.flatMap(numDictionary); - - result = _.flatMap(numDictionary, dictionaryIterator); - - result = _.flatMap(objDictionary, 'a'); - - result = _.flatMap(numNumericDictionary); - result = _.flatMap(numNumericDictionary); - - result = _.flatMap(numNumericDictionary, numericDictionaryIterator); - result = _.flatMap(numNumericDictionary, numericDictionaryIterator); - - result = _.flatMap(objNumericDictionary, 'a'); - } - - { - let result: boolean[]; - - result = _.flatMap(objArray, ['a', 42]); - result = _.flatMap(objArray, {'a': 42}); - - result = _.flatMap(objList, ['a', 42]); - result = _.flatMap(objList, {'a': 42}); - - result = _.flatMap(objDictionary, ['a', 42]); - result = _.flatMap(objDictionary, {'a': 42}); - - result = _.flatMap(objNumericDictionary, ['a', 42]); - result = _.flatMap(objNumericDictionary, {'a': 42}); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _('abc').flatMap(); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(numArray).flatMap(); - result = _(numArray).flatMap(listIterator); - result = _(objArray).flatMap('a'); - - result = _(numList).flatMap(); - result = _(numList).flatMap(listIterator); - result = _(objList).flatMap('a'); - - result = _(numDictionary).flatMap(); - result = _(numDictionary).flatMap(dictionaryIterator); - result = _(objDictionary).flatMap('a'); - - result = _(numNumericDictionary).flatMap(); - result = _(numNumericDictionary).flatMap(numericDictionaryIterator); - result = _(objNumericDictionary).flatMap('a'); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(objArray).flatMap(['a', 42]); - result = _(objArray).flatMap({a: 42}); - - result = _(objList).flatMap(['a', 42]); - result = _(objList).flatMap({a: 42}); - - result = _(objDictionary).flatMap(['a', 42]); - result = _(objDictionary).flatMap({a: 42}); - - result = _(objNumericDictionary).flatMap(['a', 42]); - result = _(objNumericDictionary).flatMap({a: 42}); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _('abc').chain().flatMap(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(numArray).chain().flatMap(); - result = _(numArray).chain().flatMap(listIterator); - result = _(objArray).chain().flatMap('a'); - - result = _(numList).chain().flatMap(); - result = _(numList).chain().flatMap(listIterator); - result = _(objList).chain().flatMap('a'); - - result = _(numDictionary).chain().flatMap(); - result = _(numDictionary).chain().flatMap(dictionaryIterator); - result = _(objDictionary).chain().flatMap('a'); - - result = _(numNumericDictionary).chain().flatMap(); - result = _(numNumericDictionary).chain().flatMap(numericDictionaryIterator); - result = _(objNumericDictionary).chain().flatMap('a'); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(objArray).chain().flatMap(['a', 42]); - result = _(objArray).chain().flatMap({a: 42}); - - result = _(objList).chain().flatMap(['a', 42]); - result = _(objList).chain().flatMap({a: 42}); - - result = _(objDictionary).chain().flatMap(['a', 42]); - result = _(objDictionary).chain().flatMap({a: 42}); - - result = _(objNumericDictionary).chain().flatMap(['a', 42]); - result = _(objNumericDictionary).chain().flatMap({a: 42}); - } - - { - interface SampleObject { - bar: number; - foo: string[]; - } - const obj: SampleObject = { - bar: 1, - foo: [''], - }; - - const result1: Array = _.flatMap(obj); - const result2: _.LoDashImplicitWrapper> = _(obj).flatMap(); - const result3: _.LoDashExplicitWrapper> = _.chain(obj).flatMap(); - } -} - -// _.flatMapDeep -namespace TestFlatMapDeep { - let numArray: Array | null | undefined = [1, [2, 3]] as any; - let objArray: Array<{a: number}|Array<{a: number}>> | null | undefined = [{a: 1}, [{a: 2}, {a: 3}]] as any; - - let numList: _.List | null | undefined = anything; - let objList: _.List<{a: number}|Array<{a: number}>> | null | undefined = anything; - - let numDictionary: _.Dictionary | null | undefined = anything; - let objDictionary: _.Dictionary<{a: number}|Array<{a: number}>> | null | undefined = anything; - - let numNumericDictionary: _.NumericDictionary | null | undefined = anything; - let objNumericDictionary: _.NumericDictionary<{a: number}|Array<{a: number}>> | null | undefined = anything; - - let stringIterator: (value: string, index: number, collection: _.List) => _.ListOfRecursiveArraysOrValues = (a, b, c) => ['a', 'b', 'c']; - - let listIterator: (value: number|number[], index: number, collection: _.List) => _.ListOfRecursiveArraysOrValues = (a, b, c) => [1]; - - let dictionaryIterator: (value: number|number[], key: string, collection: _.Dictionary) =>_.ListOfRecursiveArraysOrValues = (a, b, c) => [1]; - - let numericDictionaryIterator: (value: number|number[], key: number, collection: _.NumericDictionary) => _.ListOfRecursiveArraysOrValues = (a, b, c) => [1]; - - { - let result: string[]; - - result = _.flatMapDeep('abc'); - - result = _.flatMapDeep('abc', stringIterator); - } - - { - let result: number[]; - - result = _.flatMapDeep(numArray); - - result = _.flatMapDeep(numArray, listIterator); - - result = _.flatMapDeep(objArray, 'a'); - - result = _.flatMapDeep(numList); - - result = _.flatMapDeep(numList, listIterator); - - result = _.flatMapDeep(objList, 'a'); - - result = _.flatMapDeep(numDictionary); - - result = _.flatMapDeep(numDictionary, dictionaryIterator); - - result = _.flatMapDeep(objDictionary, 'a'); - - result = _.flatMapDeep(numNumericDictionary); - - result = _.flatMapDeep(numNumericDictionary, numericDictionaryIterator); - - result = _.flatMapDeep(objNumericDictionary, 'a'); - } - - { - let result: boolean[]; - - result = _.flatMapDeep(objArray, ['a', 42]); - result = _.flatMapDeep(objArray, {'a': 42}); - - result = _.flatMapDeep(objList, ['a', 42]); - result = _.flatMapDeep(objList, {'a': 42}); - - result = _.flatMapDeep(objDictionary, ['a', 42]); - result = _.flatMapDeep(objDictionary, {'a': 42}); - - result = _.flatMapDeep(objNumericDictionary, ['a', 42]); - result = _.flatMapDeep(objNumericDictionary, {'a': 42}); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _('abc').flatMapDeep(); - result = _('abc').flatMapDeep(stringIterator); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(numArray).flatMapDeep(); - result = _(numArray).flatMapDeep(listIterator); - result = _(objArray).flatMapDeep('a'); - - result = _(numList).flatMapDeep(); - result = _(numList).flatMapDeep(listIterator); - result = _(objList).flatMapDeep('a'); - - result = _(numDictionary).flatMapDeep(); - result = _(numDictionary).flatMapDeep(dictionaryIterator); - result = _(objDictionary).flatMapDeep('a'); - - result = _(numNumericDictionary).flatMapDeep(); - result = _(numNumericDictionary).flatMapDeep(numericDictionaryIterator); - result = _(objNumericDictionary).flatMapDeep('a'); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(objArray).flatMapDeep(['a', 42]); - result = _(objArray).flatMapDeep({a: 42}); - - result = _(objList).flatMapDeep(['a', 42]); - result = _(objList).flatMapDeep({a: 42}); - - result = _(objDictionary).flatMapDeep(['a', 42]); - result = _(objDictionary).flatMapDeep({a: 42}); - - result = _(objNumericDictionary).flatMapDeep(['a', 42]); - result = _(objNumericDictionary).flatMapDeep({a: 42}); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _('abc').chain().flatMapDeep(); - result = _('abc').chain().flatMapDeep(stringIterator); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(numArray).chain().flatMapDeep(); - result = _(numArray).chain().flatMapDeep(listIterator); - result = _(objArray).chain().flatMapDeep('a'); - - result = _(numList).chain().flatMapDeep(); - result = _(numList).chain().flatMapDeep(listIterator); - result = _(objList).chain().flatMapDeep('a'); - - result = _(numDictionary).chain().flatMapDeep(); - result = _(numDictionary).chain().flatMapDeep(dictionaryIterator); - result = _(objDictionary).chain().flatMapDeep('a'); - - result = _(numNumericDictionary).chain().flatMapDeep(); - result = _(numNumericDictionary).chain().flatMapDeep(numericDictionaryIterator); - result = _(objNumericDictionary).chain().flatMapDeep('a'); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(objArray).chain().flatMapDeep(['a', 42]); - result = _(objArray).chain().flatMapDeep({a: 42}); - - result = _(objList).chain().flatMapDeep(['a', 42]); - result = _(objList).chain().flatMapDeep({a: 42}); - - result = _(objDictionary).chain().flatMapDeep(['a', 42]); - result = _(objDictionary).chain().flatMapDeep({a: 42}); - - result = _(objNumericDictionary).chain().flatMapDeep(['a', 42]); - result = _(objNumericDictionary).chain().flatMapDeep({a: 42}); - } -} - -// _.flatMapDepth -namespace TestFlatMapDepth { - let numArray: Array | null | undefined = [1, [2, 3]] as any; - let objArray: Array<{a: number}|Array<{a: number}>> | null | undefined = [{a: 1}, [{a: 2}, {a: 3}]] as any; - - let numList: _.List | null | undefined = anything; - let objList: _.List<{a: number}|Array<{a: number}>> | null | undefined = anything; - - let numDictionary: _.Dictionary | null | undefined = anything; - let objDictionary: _.Dictionary<{a: number}|Array<{a: number}>> | null | undefined = anything; - - let numNumericDictionary: _.NumericDictionary | null | undefined = anything; - let objNumericDictionary: _.NumericDictionary<{a: number}|Array<{a: number}>> | null | undefined = anything; - - let stringIterator: (value: string, index: number, collection: _.List) => _.ListOfRecursiveArraysOrValues = (a, b, c) => ""; - - let listIterator: (value: number|number[], index: number, collection: _.List) => _.ListOfRecursiveArraysOrValues = (a, b, c) =>[ 1]; - - let dictionaryIterator: (value: number|number[], key: string, collection: _.Dictionary) => _.ListOfRecursiveArraysOrValues = (a, b, c) => [1]; - - let numericDictionaryIterator: (value: number|number[], key: number, collection: _.NumericDictionary) => _.ListOfRecursiveArraysOrValues = (a, b, c) => [1]; - - { - let result: string[]; - - result = _.flatMapDepth('abc'); - - result = _.flatMapDepth('abc', stringIterator, 1); - } - - { - let result: number[]; - - result = _.flatMapDepth(numArray); - - result = _.flatMapDepth(numArray, listIterator, 1); - - result = _.flatMapDepth(objArray, 'a'); - - result = _.flatMapDepth(numList); - - result = _.flatMapDepth(numList, listIterator, 1); - - result = _.flatMapDepth(objList, 'a', 1); - - result = _.flatMapDepth(numDictionary); - - result = _.flatMapDepth(numDictionary, dictionaryIterator, 1); - - result = _.flatMapDepth(objDictionary, 'a', 1); - - result = _.flatMapDepth(numNumericDictionary); - - result = _.flatMapDepth(numNumericDictionary, numericDictionaryIterator, 1); - - result = _.flatMapDepth(objNumericDictionary, 'a', 1); - } - - { - let result: boolean[]; - - result = _.flatMapDepth(objArray, ['a', 42], 1); - result = _.flatMapDepth(objArray, {'a': 42}, 1); - - result = _.flatMapDepth(objList, ['a', 42], 1); - result = _.flatMapDepth(objList, {'a': 42}, 1); - - result = _.flatMapDepth(objDictionary, ['a', 42], 1); - result = _.flatMapDepth(objDictionary, {'a': 42}, 1); - - result = _.flatMapDepth(objNumericDictionary, ['a', 42], 1); - result = _.flatMapDepth(objNumericDictionary, {'a': 42}, 1); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _('abc').flatMapDepth(); - result = _('abc').flatMapDepth(stringIterator, 1); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(numArray).flatMapDepth(); - result = _(numArray).flatMapDepth(listIterator, 1); - result = _(objArray).flatMapDepth('a', 1); - - result = _(numList).flatMapDepth(); - result = _(numList).flatMapDepth(listIterator, 1); - result = _(objList).flatMapDepth('a', 1); - - result = _(numDictionary).flatMapDepth(); - result = _(numDictionary).flatMapDepth(dictionaryIterator, 1); - result = _(objDictionary).flatMapDepth('a', 1); - - result = _(numNumericDictionary).flatMapDepth(); - result = _(numNumericDictionary).flatMapDepth(numericDictionaryIterator, 1); - result = _(objNumericDictionary).flatMapDepth('a', 1); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(objArray).flatMapDepth(['a', 42], 1); - result = _(objArray).flatMapDepth({a: 42}, 1); - - result = _(objList).flatMapDepth(['a', 42], 1); - result = _(objList).flatMapDepth({a: 42}, 1); - - result = _(objDictionary).flatMapDepth(['a', 42], 1); - result = _(objDictionary).flatMapDepth({a: 42}, 1); - - result = _(objNumericDictionary).flatMapDepth(['a', 42], 1); - result = _(objNumericDictionary).flatMapDepth({a: 42}, 1); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _('abc').chain().flatMapDepth(); - result = _('abc').chain().flatMapDepth(stringIterator, 1); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(numArray).chain().flatMapDepth(); - result = _(numArray).chain().flatMapDepth(listIterator, 1); - result = _(objArray).chain().flatMapDepth('a', 1); - - result = _(numList).chain().flatMapDepth(); - result = _(numList).chain().flatMapDepth(listIterator, 1); - result = _(objList).chain().flatMapDepth('a', 1); - - result = _(numDictionary).chain().flatMapDepth(); - result = _(numDictionary).chain().flatMapDepth(dictionaryIterator, 1); - result = _(objDictionary).chain().flatMapDepth('a', 1); - - result = _(numNumericDictionary).chain().flatMapDepth(); - result = _(numNumericDictionary).chain().flatMapDepth(numericDictionaryIterator, 1); - result = _(objNumericDictionary).chain().flatMapDepth('a', 1); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(objArray).chain().flatMapDepth(['a', 42], 1); - result = _(objArray).chain().flatMapDepth({a: 42}, 1); - - result = _(objList).chain().flatMapDepth(['a', 42], 1); - result = _(objList).chain().flatMapDepth({a: 42}, 1); - - result = _(objDictionary).chain().flatMapDepth(['a', 42], 1); - result = _(objDictionary).chain().flatMapDepth({a: 42}, 1); - - result = _(objNumericDictionary).chain().flatMapDepth(['a', 42], 1); - result = _(objNumericDictionary).chain().flatMapDepth({a: 42}, 1); - } -} - -// _.forEach -namespace TestForEach { - let array: AbcObject[] = []; - let list: _.List = []; - let dictionary: _.Dictionary = {}; - let nilArray: AbcObject[] | null | undefined = [] as any; - let nilList: _.List | null | undefined = [] as any; - let nilDictionary: _.Dictionary | null | undefined = anything; - - let listIterator: (value: AbcObject, index: number, collection: _.List) => any = (value, index, collection) => 1; - let dictionaryIterator: (value: AbcObject, key: string, collection: _.Dictionary) => any = (value, key, collection) => 1; - let objectIterator: (value: number | string | boolean, key: string, collection: AbcObject) => any = (value, key, collection) => 1; - - { - let result: string; - - result = _.forEach('', (value, index, collection) => { - value; // $ExpectType string - index; // $ExpectType number - collection; // $ExpectType string - }); - } - - { - let result: string | null | undefined; - - result = _.forEach('' as (string | null | undefined), (value, index, collection) => { - value; // $ExpectType string - index; // $ExpectType number - collection; // $ExpectType string - }); - } - - { - let result: AbcObject[]; - result = _.forEach(array, (value, index, collection: ArrayLike) => { - value; // $ExpectType AbcObject - index; // $ExpectType number - }); - result = _.forEach(array, (value, index, collection) => { - value; // $ExpectType AbcObject - index; // $ExpectType number - collection; // $ExpectType AbcObject[] - }); - } - - { - let result: AbcObject[] | null | undefined; - - result = _.forEach(array, (value, index, collection: ArrayLike) => { - value; // $ExpectType AbcObject - index; // $ExpectType number - }); - result = _.forEach(nilArray, (value, index, collection) => { - value; // $ExpectType AbcObject - index; // $ExpectType number - collection; // $ExpectType AbcObject[] - }); - } - - { - let result: _.List; - - result = _.forEach(list, (value, index, collection) => { - value; // $ExpectType AbcObject - index; // $ExpectType number - collection; // $ExpectType ArrayLike - }); - } - - { - let result: _.List | null | undefined; - - result = _.forEach(nilList, (value, index, collection) => { - value; // $ExpectType AbcObject - index; // $ExpectType number - collection; // $ExpectType ArrayLike - }); - } - - { - let result: _.Dictionary; - - result = _.forEach(dictionary, (value, index, collection) => { - value; // $ExpectType AbcObject - index; // $ExpectType string - collection; // $ExpectType Dictionary - }); - } - - { - let result: _.Dictionary | null | undefined; - - result = _.forEach(nilDictionary, (value, index, collection) => { - value; // $ExpectType AbcObject - index; // $ExpectType string - collection; // $ExpectType Dictionary - }); - } - - { - let sample1: AbcObject = anything; - sample1 = _.forEach(sample1, objectIterator); - - let sample2: AbcObject | null | undefined = anything; - sample2 = _.forEach(sample2, objectIterator); - } - - { - let result: _.LoDashImplicitWrapper; - - result = _('').forEach((value, index, collection) => { - value; // $ExpectType string - index; // $ExpectType number - collection; // $ExpectType string - }); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).forEach((value, index, collection) => { - value; // $ExpectType AbcObject - index; // $ExpectType number - collection; // $ExpectType AbcObject[] - }); - } - - { - let result: _.LoDashImplicitNillableArrayWrapper; - - result = _(nilArray).forEach((value, index, collection) => { - value; // $ExpectType AbcObject - index; // $ExpectType number - collection; // $ExpectType AbcObject[] - }); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.List>; - - result = _(list).forEach(listIterator); - } - - { - let result: _.LoDashImplicitNillableObjectWrapper<_.List>; - - result = _(nilList).forEach(listIterator); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _(dictionary).forEach(dictionaryIterator); - } - - { - let result: _.LoDashImplicitNillableObjectWrapper<_.Dictionary>; - - result = _(nilDictionary).forEach(dictionaryIterator); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('').chain().forEach((value, index, collection) => { - value; // $ExpectType string - index; // $ExpectType number - collection; // $ExpectType string - }); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().forEach((value, index, collection) => { - value; // $ExpectType AbcObject - index; // $ExpectType number - collection; // $ExpectType AbcObject[] - }); - } - - { - let result: _.LoDashExplicitNillableArrayWrapper; - - result = _(nilArray).chain().forEach((value, index, collection) => { - value; // $ExpectType AbcObject - index; // $ExpectType number - collection; // $ExpectType AbcObject[] - }); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.List>; - - result = _(list).chain().forEach(listIterator); - } - - { - let result: _.LoDashExplicitNillableObjectWrapper<_.List>; - - result = _(nilList).chain().forEach(listIterator); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _(dictionary).chain().forEach(dictionaryIterator); - } - - { - let result: _.LoDashExplicitNillableObjectWrapper<_.Dictionary>; - - result = _(nilDictionary).chain().forEach(dictionaryIterator); - } -} - -// _.forEachRight -namespace TestForEachRight { - let array: AbcObject[] = []; - let list: _.List = []; - let dictionary: _.Dictionary = {}; - let nilArray: AbcObject[] | null | undefined = [] as any; - let nilList: _.List | null | undefined = [] as any; - let nilDictionary: _.Dictionary | null | undefined = anything; - - let listIterator: (value: AbcObject, index: number, collection: _.List) => any = (value: AbcObject, index: number, collection: _.List) => 1; - let dictionaryIterator: (value: AbcObject, key: string, collection: _.Dictionary) => any = (value: AbcObject, key: string, collection: _.Dictionary) => 1; - - { - let result: string; - - result = _.forEachRight('', (value, index, collection) => { - value; // $ExpectType string - index; // $ExpectType number - collection; // $ExpectType string - }); - } - - { - let result: string | null | undefined; - - result = _.forEachRight('' as (string | null | undefined), (value, index, collection) => { - value; // $ExpectType string - index; // $ExpectType number - collection; // $ExpectType string - }); - } - - { - let result: AbcObject[]; - - result = _.forEachRight(array, (value, index, collection) => { - value; // $ExpectType AbcObject - index; // $ExpectType number - collection; // $ExpectType AbcObject[] - }); - } - - { - let result: AbcObject[] | null | undefined; - - result = _.forEachRight(nilArray, (value, index, collection) => { - value; // $ExpectType AbcObject - index; // $ExpectType number - collection; // $ExpectType AbcObject[] - }); - } - - { - let result: _.List; - - result = _.forEachRight(list, (value, index, collection) => { - value; // $ExpectType AbcObject - index; // $ExpectType number - collection; // $ExpectType ArrayLike - }); - } - - { - let result: _.List | null | undefined; - - result = _.forEachRight(nilList, (value, index, collection) => { - value; // $ExpectType AbcObject - index; // $ExpectType number - collection; // $ExpectType ArrayLike - }); - } - - { - let result: _.Dictionary; - - result = _.forEachRight(dictionary, (value, index, collection) => { - value; // $ExpectType AbcObject - index; // $ExpectType string - collection; // $ExpectType Dictionary - }); - } - - { - let result: _.Dictionary | null | undefined; - - result = _.forEachRight(nilDictionary, (value, index, collection) => { - value; // $ExpectType AbcObject - index; // $ExpectType string - collection; // $ExpectType Dictionary - }); - } - - { - let result: _.LoDashImplicitWrapper; - - result = _('').forEachRight((value, index, collection) => { - value; // $ExpectType string - index; // $ExpectType number - collection; // $ExpectType string - }); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).forEachRight(listIterator); - } - - { - let result: _.LoDashImplicitNillableArrayWrapper; - - result = _(nilArray).forEachRight(listIterator); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.List>; - - result = _(list).forEachRight(listIterator); - } - - { - let result: _.LoDashImplicitNillableObjectWrapper<_.List>; - - result = _(nilList).forEachRight(listIterator); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _(dictionary).forEachRight(dictionaryIterator); - } - - { - let result: _.LoDashImplicitNillableObjectWrapper<_.Dictionary>; - - result = _(nilDictionary).forEachRight(dictionaryIterator); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('').chain().forEachRight((value, index, collection) => { - value; // $ExpectType string - index; // $ExpectType number - collection; // $ExpectType string - }); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().forEachRight((value, index, collection) => { - value; // $ExpectType AbcObject - index; // $ExpectType number - collection; // $ExpectType AbcObject[] - }); - } - - { - let result: _.LoDashExplicitNillableArrayWrapper; - - result = _(nilArray).chain().forEachRight((value, index, collection) => { - value; // $ExpectType AbcObject - index; // $ExpectType number - collection; // $ExpectType AbcObject[] - }); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.List>; - - result = _(list).chain().forEachRight(listIterator); - } - - { - let result: _.LoDashExplicitNillableObjectWrapper<_.List>; - - result = _(nilList).chain().forEachRight(listIterator); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _(dictionary).chain().forEachRight(dictionaryIterator); - } - - { - let result: _.LoDashExplicitNillableObjectWrapper<_.Dictionary>; - - result = _(nilDictionary).chain().forEachRight(dictionaryIterator); - } -} - -// _.groupBy -namespace TestGroupBy { - type SampleType = {a: number; b: string; c: boolean;}; - - let array: SampleType[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; - - let stringIterator = (char: string, index: number, string: string) => 0; - let listIterator = (value: SampleType, index: number, collection: _.List) => 0; - let dictionaryIterator = (value: SampleType, key: string, collection: _.Dictionary) => 0; - - { - let result: _.Dictionary; - - result = _.groupBy(''); - result = _.groupBy('', stringIterator); - } - - { - let result: _.Dictionary; - - result = _.groupBy(array); - result = _.groupBy(array, listIterator); - result = _.groupBy(array, ''); - result = _.groupBy(array, {a: 42}); - - result = _.groupBy(list); - result = _.groupBy(list, listIterator); - result = _.groupBy(list, ''); - result = _.groupBy(list, {a: 42}); - - result = _.groupBy(dictionary); - result = _.groupBy(dictionary, dictionaryIterator); - result = _.groupBy(dictionary, ''); - result = _.groupBy(dictionary, {a: 42}); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _('').groupBy(); - result = _('').groupBy((char: string, index: number, string: ArrayLike) => 0); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _(array).groupBy(); - result = _(array).groupBy(listIterator); - result = _(array).groupBy(''); - result = _(array).groupBy({a: 42}); - - result = _(list).groupBy(); - result = _(list).groupBy(listIterator); - result = _(list).groupBy(''); - result = _(list).groupBy({a: 42}); - - result = _(dictionary).groupBy(); - result = _(dictionary).groupBy(dictionaryIterator); - result = _(dictionary).groupBy(''); - result = _(dictionary).groupBy({a: 42}); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _('').chain().groupBy(); - result = _('').chain().groupBy((char: string, index: number, string: ArrayLike) => 0); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _(array).chain().groupBy(); - result = _(array).chain().groupBy(listIterator); - result = _(array).chain().groupBy(''); - result = _(array).chain().groupBy({a: 42}); - - result = _(list).chain().groupBy(); - result = _(list).chain().groupBy(listIterator); - result = _(list).chain().groupBy(''); - result = _(list).chain().groupBy({a: 42}); - - result = _(dictionary).chain().groupBy(); - result = _(dictionary).chain().groupBy(dictionaryIterator); - result = _(dictionary).chain().groupBy(''); - result = _(dictionary).chain().groupBy({a: 42}); - } -} - -// _.includes -namespace TestIncludes { - type SampleType = {a: string; b: number; c: boolean;}; - - let array: SampleType[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; - - let target: SampleType = { a: "", b: 1, c: true }; - - { - let result: boolean; - - result = _.includes(array, target); - result = _.includes(array, target, 42); - - result = _.includes(list, target); - result = _.includes(list, target, 42); - - result = _.includes(dictionary, target); - result = _.includes(dictionary, target, 42); - - result = _(array).includes(target); - result = _(array).includes(target, 42); - - result = _(list).includes(target); - result = _(list).includes(target, 42); - - result = _(dictionary).includes(target); - result = _(dictionary).includes(target, 42); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(array).chain().includes(target); - result = _(array).chain().includes(target, 42); - - result = _(list).chain().includes(target); - result = _(list).chain().includes(target, 42); - - result = _(dictionary).chain().includes(target); - result = _(dictionary).chain().includes(target, 42); - } -} - -// _.keyBy -namespace TestKeyBy { - type SampleObject = {a: number; b: string; c: boolean;}; - - let array: SampleObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; - let numericDictionary: _.NumericDictionary | null | undefined = obj; - - let stringIterator = (value: string, index: number, collection: string) => "a"; - let listIterator = (value: SampleObject, index: number, collection: _.List) => 1; - let dictionaryIterator = (value: SampleObject, key: string, collection: _.Dictionary) => Symbol.name; - let numericDictionaryIterator = (value: SampleObject, key: number, collection: _.NumericDictionary) => "a"; - - { - let result: _.Dictionary; - - result = _.keyBy('abcd'); - result = _.keyBy('abcd', stringIterator); - } - - { - let result: _.Dictionary; - - result = _.keyBy(array); - result = _.keyBy(array, listIterator); - result = _.keyBy(array, 'a'); - result = _.keyBy(array, {a: 42}); - - result = _.keyBy(list); - result = _.keyBy(list, listIterator); - result = _.keyBy(list, 'a'); - result = _.keyBy(list, {a: 42}); - - result = _.keyBy(numericDictionary); - result = _.keyBy(numericDictionary, numericDictionaryIterator); - result = _.keyBy(numericDictionary, 'a'); - result = _.keyBy(numericDictionary, {a: 42}); - - result = _.keyBy(dictionary); - result = _.keyBy(dictionary, dictionaryIterator); - result = _.keyBy(dictionary, 'a'); - result = _.keyBy(dictionary, {a: 42}); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _('abcd').keyBy(); - result = _('abcd').keyBy(stringIterator); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _(array).keyBy(); - result = _(array).keyBy(listIterator); - result = _(array).keyBy('a'); - result = _(array).keyBy({a: 42}); - - result = _(list).keyBy(); - result = _(list).keyBy(listIterator); - result = _(list).keyBy('a'); - result = _(list).keyBy({a: 42}); - - result = _(numericDictionary).keyBy(); - result = _(numericDictionary).keyBy(numericDictionaryIterator); - result = _(numericDictionary).keyBy('a'); - result = _(numericDictionary).keyBy({a: 42}); - - result = _(dictionary).keyBy(); - result = _(dictionary).keyBy(dictionaryIterator); - result = _(dictionary).keyBy('a'); - result = _(dictionary).keyBy({a: 42}); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _('abcd').chain().keyBy(); - result = _('abcd').chain().keyBy(stringIterator); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _(array).chain().keyBy(); - result = _(array).chain().keyBy(listIterator); - result = _(array).chain().keyBy('a'); - result = _(array).chain().keyBy({a: 42}); - - result = _(list).chain().keyBy(); - result = _(list).chain().keyBy(listIterator); - result = _(list).chain().keyBy('a'); - result = _(list).chain().keyBy({a: 42}); - - result = _(numericDictionary).chain().keyBy(); - result = _(numericDictionary).chain().keyBy(numericDictionaryIterator); - result = _(numericDictionary).chain().keyBy('a'); - result = _(numericDictionary).chain().keyBy({a: 42}); - - result = _(dictionary).chain().keyBy(); - result = _(dictionary).chain().keyBy(dictionaryIterator); - result = _(dictionary).chain().keyBy('a'); - result = _(dictionary).chain().keyBy({a: 42}); - } -} - -//_.invoke -namespace TestInvoke { - let boolArray: boolean[] = [true, false]; - - let nestedDict: _.Dictionary = { - a: [0, 1, 2] - } - - let numDict: _.Dictionary = { - a: 1, - b: 2, - c: 3, - d: 4 - } - - let result: string; - - result = _.invoke(boolArray, "[1]"); - result = _.invoke(boolArray, "[1]", 2); - result = _.invoke(boolArray, [1, "toString"]); - result = _.invoke(boolArray, [1, "toString"], 2); - - result = _.invoke(boolArray, "[1]"); - result = _.invoke(boolArray, "[1]", 2); - result = _.invoke(boolArray, [1, "toString"]); - result = _.invoke(boolArray, [1, "toString"], 2); - - result = _.invoke(numDict, "a.toString"); - result = _.invoke(numDict, "a.toString", 2); - result = _.invoke(numDict, ["a", "toString"]); - result = _.invoke(numDict, ["a", "toString"], 2); - - result = _.invoke(numDict, "a.toString"); - result = _.invoke(numDict, "a.toString", 2); - result = _.invoke(numDict, ["a", "toString"]); - result = _.invoke(numDict, ["a", "toString"], 2); - - result = _.invoke(nestedDict, ["a[0].toString"]); - result = _.invoke(nestedDict, ["a[0].toString"], 2); - result = _.invoke(nestedDict, ["a", 0, "toString"]); - result = _.invoke(nestedDict, ["a", 0, "toString"], 2); - - result = _.invoke(nestedDict, ["a[0].toString"]); - result = _.invoke(nestedDict, ["a[0].toString"], 2); - result = _.invoke(nestedDict, ["a", 0, "toString"]); - result = _.invoke(nestedDict, ["a", 0, "toString"], 2); - - result = _(boolArray).invoke("[1]"); - result = _(boolArray).invoke("[1]", 2); - result = _(boolArray).invoke([1, "toString"]); - result = _(boolArray).invoke([1, "toString"], 2); - - result = _(numDict).invoke("a.toString"); - result = _(numDict).invoke("a.toString", 2); - result = _(numDict).invoke(["a", "toString"]); - result = _(numDict).invoke(["a", "toString"], 2); - - result = _(nestedDict).invoke("a[0].toString"); - result = _(nestedDict).invoke("a[0].toString", 2); - result = _(nestedDict).invoke(["a", 0, "toString"]); - result = _(nestedDict).invoke(["a", 0, "toString"], 2); - - { - let result: _.LoDashExplicitWrapper; - - result = _(boolArray).chain().invoke("[1]"); - result = _(boolArray).chain().invoke("[1]", 2); - result = _(boolArray).chain().invoke([1, "toString"]); - result = _(boolArray).chain().invoke([1, "toString"], 2); - - result = _(numDict).chain().invoke("a.toString"); - result = _(numDict).chain().invoke("a.toString", 2); - result = _(numDict).chain().invoke(["a", "toString"]); - result = _(numDict).chain().invoke(["a", "toString"], 2); - - result = _(nestedDict).chain().invoke("a[0].toString"); - result = _(nestedDict).chain().invoke("a[0].toString", 2); - result = _(nestedDict).chain().invoke(["a", 0, "toString"]); - result = _(nestedDict).chain().invoke(["a", 0, "toString"], 2); - } -} - -//_.invokeMap -namespace TestInvokeMap { - let numArray: number[] | null | undefined = [4, 2, 1, 3] as any; - let obj: _.Dictionary = { - a: 1, - b: 2, - c: 3, - d: 4 - }; - let numDict: _.Dictionary | null | undefined = obj as any; - - let result: string[]; - result = _.invokeMap(numArray, 'toString'); - result = _.invokeMap(numArray, 'toString', 2); - result = _.invokeMap(numArray, 'toString'); - result = _.invokeMap(numArray, 'toString', 2); - result = _(numArray).invokeMap('toString').value(); - result = _(numArray).invokeMap('toString', 2).value(); - result = _(numArray).chain().invokeMap('toString').value(); - result = _(numArray).chain().invokeMap('toString', 2).value(); - - result = _.invokeMap(numArray, Number.prototype.toString); - result = _.invokeMap(numArray, Number.prototype.toString, 2); - result = _.invokeMap(numArray, Number.prototype.toString); - result = _.invokeMap(numArray, Number.prototype.toString, 2); - result = _(numArray).invokeMap(Number.prototype.toString).value(); - result = _(numArray).invokeMap(Number.prototype.toString, 2).value(); - result = _(numArray).chain().invokeMap(Number.prototype.toString).value(); - result = _(numArray).chain().invokeMap(Number.prototype.toString, 2).value(); - - result = _.invokeMap(numDict, 'toString'); - result = _.invokeMap(numDict, 'toString', 2); - result = _.invokeMap(numDict, 'toString'); - result = _.invokeMap(numDict, 'toString', 2); - result = _(numDict).invokeMap('toString').value(); - result = _(numDict).invokeMap('toString', 2).value(); - result = _(numDict).chain().invokeMap('toString').value(); - result = _(numDict).chain().invokeMap('toString', 2).value(); - - result = _.invokeMap(numDict, Number.prototype.toString); - result = _.invokeMap(numDict, Number.prototype.toString, 2); - result = _.invokeMap(numDict, Number.prototype.toString); - result = _.invokeMap(numDict, Number.prototype.toString, 2); - result = _(numDict).invokeMap(Number.prototype.toString).value(); - result = _(numDict).invokeMap(Number.prototype.toString, 2).value(); - result = _(numDict).chain().invokeMap(Number.prototype.toString).value(); - result = _(numDict).chain().invokeMap(Number.prototype.toString, 2).value(); -} - -// _.map -namespace TestMap { - let array: number[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; - - let listIterator: (value: number, index: number, collection: _.List) => AbcObject = (value: number, index: number, collection: _.List) => ({ a: 1, b: "", c: true }); - let dictionaryIterator: (value: number, key: string, collection: _.Dictionary) => AbcObject = (value: number, key: string, collection: _.Dictionary) => ({ a: 1, b: "", c: true }); - - { - _.map(array); // $ExpectType number[] - _.map(array, listIterator); // $ExpectType AbcObject[] - - _.map(list); // $ExpectType number[] - _.map(list, listIterator); // $ExpectType AbcObject[] - - _.map(dictionary); // $ExpectType number[] - _.map(dictionary, dictionaryIterator); // $ExpectType AbcObject[] - } - - { - // _.matches iteratee shorthand. - _.map(array, {}); // $ExpectType boolean[] - _.map(list, {}); // $ExpectType boolean[] - _.map(dictionary, {}); // $ExpectType boolean[] - } - - { - _(array).map().value(); // $ExpectType number[] - _(array).map(listIterator).value(); // $ExpectType AbcObject[] - - _(list).map().value(); // $ExpectType number[] - _(list).map(listIterator).value(); // $ExpectType AbcObject[] - - _(dictionary).map().value(); // $ExpectType number[] - _(dictionary).map(dictionaryIterator).value(); // $ExpectType AbcObject[] - } - - { - _(array).map({}).value(); // $ExpectType boolean[] - _(list).map({}).value(); // $ExpectType boolean[] - _(dictionary).map({}).value(); // $ExpectType boolean[] - } - - { - _(array).chain().map().value(); // $ExpectType number[] - _(array).chain().map(listIterator).value(); // $ExpectType AbcObject[] - - _(list).chain().map().value(); // $ExpectType number[] - _(list).chain().map(listIterator).value(); // $ExpectType AbcObject[] - - _(dictionary).chain().map().value(); // $ExpectType number[] - _(dictionary).chain().map(dictionaryIterator).value(); // $ExpectType AbcObject[] - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().map({}); - result = _(list).chain().map({}); - result = _(dictionary).chain().map({}); - } - - { - // "pluck"-style map. - _.map([{a: 1}, {a: 2}], 'a'); // $ExpectType number[] - _.map({a: {b: 'str'}, c: {b: 1}}, 'b'); // ExpectType (string | number)[] - - _([{a: 1}, {a: 2}]).map('a').value(); // $ExpectType number[] - _.chain([{a: 1}, {a: 2}]).map('a').value(); // $ExpectType number[] - _([{a: 1}, {a: 2}]).chain().map('a').value(); // $ExpectType number[] - } - - { - // $ExpectType number[] - _.map(['a', 'b', 'c'], ( - v, // $ExpectType string - k // $ExpectType number - ) => k); - } -} - -// _.partition -namespace TestPartition { - { - let result: any[][]; - - result = _.partition(anything, (n) => { - n; // $ExpectType any - return n < 'c'; - }); - } - - { - let result: string[][]; - - result = _.partition('abcd', (n) => { - n; // $ExpectType string - return n < 'c'; - }); - result = _.partition(['a', 'b', 'c', 'd'], (n) => { - n; // $ExpectType string - return n < 'c'; - }); - } - - { - let result: number[][]; - - result = _.partition([1, 2, 3, 4], (n) => n < 3); - result = _.partition({0: 1, 1: 2, 2: 3, 3: 4, length: 4}, (n) => n < 3); - result = _.partition({a: 1, b: 2, c: 3, d: 4}, (n) => { - n; // $ExpectType number - return n < 3; - }); - } - - { - let result: Array>; - - result = _.partition([{a: 1}, {a: 2}], {a: 2}); - result = _.partition({0: {a: 1}, 1: {a: 2}, length: 2}, {a: 2}); - result = _.partition({0: {a: 1}, 1: {a: 2}}, {a: 2}); - result = _.partition([{a: 1}, {a: 2}], 'a'); - result = _.partition([{a: 1}, {a: 2}], ['a', 2]); - result = _.partition({0: {a: 1}, 1: {a: 2}, length: 2}, 'a'); - result = _.partition({0: {a: 1}, 1: {a: 2}, length: 2}, ['a', 2]); - result = _.partition({0: {a: 1}, 1: {a: 2}}, 'a'); - result = _.partition({0: {a: 1}, 1: {a: 2}}, ['a', 2]); - } - - { - _.partition(null, 'a'); - } - - { - let result: _.LoDashImplicitWrapper; - - result = _(anything).partition((n) => { - n; // $ExpectType any - return n < 'c'; - }); - } - - { - let result: _.LoDashImplicitWrapper; - - result = _('abcd').partition((n) => { - n; // $ExpectType string - return n < 'c'; - }); - result = _(['a', 'b', 'c', 'd']).partition((n) => { - n; // $ExpectType string - return n < 'c'; - }); - } - - { - let result: _.LoDashImplicitWrapper; - - result = _([1, 2, 3, 4]).partition((n) => n < 3); - result = _({0: 1, 1: 2, 2: 3, 3: 4, length: 4}).partition((n) => n < 3); - result = _({a: 1, b: 2, c: 3, d: 4}).partition((n) => { - n; // $ExpectType number - return n < 3; - }); - } - - { - let result: _.LoDashImplicitWrapper>>; - - result = _([{a: 1}, {a: 2}]).partition({a: 2}); - result = _({0: {a: 1}, 1: {a: 2}, length: 2}).partition({a: 2}); - result = _({0: {a: 1}, 1: {a: 2}}).partition({a: 2}); - result = _([{a: 1}, {a: 2}]).partition('a'); - result = _([{a: 1}, {a: 2}]).partition(['a', 2]); - result = _({0: {a: 1}, 1: {a: 2}}).partition('a'); - result = _({0: {a: 1}, 1: {a: 2}}).partition(['a', 2]); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _.chain(anything).partition((n) => { - n; // $ExpectType any - return n < 'c'; - }); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _.chain('abcd').partition((n) => { - n; // $ExpectType string - return n < 'c'; - }); - result = _.chain(['a', 'b', 'c', 'd']).partition((n) => { - n; // $ExpectType string - return n < 'c'; - }); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _.chain([1, 2, 3, 4]).partition((n) => n < 3); - result = _.chain({0: 1, 1: 2, 2: 3, 3: 4, length: 4}).partition((n) => n < 3); - result = _.chain({a: 1, b: 2, c: 3, d: 4}).partition((n) => { - n; // $ExpectType number - return n < 3; - }); - } - - { - let result: _.LoDashExplicitWrapper>>; - - result = _.chain([{a: 1}, {a: 2}]).partition({a: 2}); - result = _.chain({0: {a: 1}, 1: {a: 2}, length: 2}).partition({a: 2}); - result = _.chain({0: {a: 1}, 1: {a: 2}}).partition({a: 2}); - result = _.chain([{a: 1}, {a: 2}]).partition('a'); - result = _.chain([{a: 1}, {a: 2}]).partition(['a', 2]); - result = _.chain({0: {a: 1}, 1: {a: 2}}).partition('a'); - result = _.chain({0: {a: 1}, 1: {a: 2}}).partition(['a', 2]); - } -} - -// TODO -// _.map with iteratee shorthand -// module TestMapInsteadOfPluck { -// interface SampleObject { -// d: {b: AbcObject}[]; -// } -// -// let array: SampleObject[] = []; -// let list: _.List = []; -// let dictionary: _.Dictionary = {}; -// -// { -// let result: any[]; -// -// result = _.map(array, 'd.0.b'); -// result = _.map(array, ['d', 0, 'b']); -// -// result = _.map(list, 'd.0.b'); -// result = _.map(list, ['d', 0, 'b']); -// -// result = _.map(dictionary, 'd.0.b'); -// result = _.map(dictionary, ['d', 0, 'b']); -// } -// -// { -// let result: AbcObject[]; -// -// result = _.map(array, 'd.0.b'); -// result = _.map(array, ['d', 0, 'b']); -// -// result = _.map(list, 'd.0.b'); -// result = _.map(list, ['d', 0, 'b']); -// -// result = _.map(dictionary, 'd.0.b'); -// result = _.map(dictionary, ['d', 0, 'b']); -// } -// -// { -// let result: _.LoDashImplicitArrayWrapper; -// -// result = _(array).map('d.0.b'); -// result = _(array).map(['d', 0, 'b']); -// -// result = _(list).map('d.0.b'); -// result = _(list).map(['d', 0, 'b']); -// -// result = _(dictionary).map('d.0.b'); -// result = _(dictionary).map(['d', 0, 'b']); -// } -// -// { -// let result: _.LoDashExplicitArrayWrapper; -// -// result = _(array).chain().map('d.0.b'); -// result = _(array).chain().map(['d', 0, 'b']); -// -// result = _(list).chain().map('d.0.b'); -// result = _(list).chain().map(['d', 0, 'b']); -// -// result = _(dictionary).chain().map('d.0.b'); -// result = _(dictionary).chain().map(['d', 0, 'b']); -// } -// } -namespace TestReduce { - interface ABC { - [key: string]: number; - a: number; - b: number; - c: number; - } - - // $ExpectType number | undefined - _.reduce([1, 2, 3], (sum: number, num: number) => sum + num); - // $ExpectType number | undefined - _.reduce(null, (sum: number, num: number) => sum + num); - - // chained - _([1, 2 ,3]).reduce((sum: number, num: number) => sum + num); - _.chain([1, 2 ,3]).reduce((sum: number, num: number) => sum + num).value(); - - // $ExpectType ABC - _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, (r: ABC, num: number, key: string) => { - r[key] = num * 3; - return r; - // tslint:disable-next-line:no-object-literal-type-assertion - }, {} as ABC); - - // $ExpectType number | undefined - _([1, 2, 3]).reduce((sum: number, num: number) => sum + num); - - const initial: ABC = { a: 1, b: 2, c: 3 }; - // $ExpectType ABC - _({ 'a': 1, 'b': 2, 'c': 3 }).reduce((r: ABC, num: number, key: string) => { - r[key] = num * 3; - return r; - // tslint:disable-next-line:no-object-literal-type-assertion - }, initial); - - // $ExpectType number[] - _.reduceRight([[0, 1], [2, 3], [4, 5]], (a: number[], b: number[]) => a.concat(b), []); -} - -// _.reject -namespace TestReject { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; - - let stringIterator = (char: string, index: number, string: string) => true; - let listIterator = (value: AbcObject, index: number, collection: _.List) => true; - let dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => true; - - { - let result: string[]; - - result = _.reject('', stringIterator); - } - - { - let result: AbcObject[]; - - result = _.reject(array, listIterator); - result = _.reject(array, ''); - result = _.reject(array, {a: 42}); - - result = _.reject(list, listIterator); - result = _.reject(list, ''); - result = _.reject(list, {a: 42}); - - result = _.reject(dictionary, dictionaryIterator); - result = _.reject(dictionary, ''); - result = _.reject(dictionary, {a: 42}); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _('').reject(stringIterator); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).reject(listIterator); - result = _(array).reject(''); - result = _(array).reject({a: 42}); - - result = _(list).reject(listIterator); - result = _(list).reject(''); - result = _(list).reject({a: 42}); - - result = _(dictionary).reject(dictionaryIterator); - result = _(dictionary).reject(''); - result = _(dictionary).reject({a: 42}); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _('').chain().reject(stringIterator); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().reject(listIterator); - result = _(array).chain().reject(''); - result = _(array).chain().reject({a: 42}); - - result = _(list).chain().reject(listIterator); - result = _(list).chain().reject(''); - result = _(list).chain().reject({a: 42}); - - result = _(dictionary).chain().reject(dictionaryIterator); - result = _(dictionary).chain().reject(''); - result = _(dictionary).chain().reject({a: 42}); - } -} - -// _.sample -namespace TestSample { - let array: string[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; - let numericDictionary: _.NumericDictionary | null | undefined= obj; - - { - let result: string | undefined; - - result = _.sample('abc'); - result = _.sample(array); - result = _.sample(list); - result = _.sample(dictionary); - result = _.sample(numericDictionary); - result = _.sample({a: 'foo'}); - result = _.sample({a: 'foo'}); - - result = _('abc').sample(); - result = _(array).sample(); - result = _(list).sample(); - result = _(dictionary).sample(); - result = _(numericDictionary).sample(); - result = _({a: 'foo'}).sample(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('abc').chain().sample(); - result = _(array).chain().sample(); - result = _(list).chain().sample(); - result = _(dictionary).chain().sample(); - result = _(numericDictionary).chain().sample(); - result = _({a: 'foo'}).chain().sample(); - } -} - -// _.sampleSize -namespace TestSampleSize { - let array: string[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; - let numericDictionary: _.NumericDictionary | null | undefined = obj; - - { - let result: string[]; - - result = _.sampleSize('abc'); - result = _.sampleSize('abc', 42); - result = _.sampleSize(array); - result = _.sampleSize(array, 42); - result = _.sampleSize(list); - result = _.sampleSize(list, 42); - result = _.sampleSize(dictionary); - result = _.sampleSize(dictionary, 42); - result = _.sampleSize(numericDictionary); - result = _.sampleSize(numericDictionary, 42); - result = _.sampleSize({a: 'foo'}); - result = _.sampleSize({a: 'foo'}, 42); - result = _.sampleSize({a: 'foo'}); - result = _.sampleSize({a: 'foo'}, 42); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _('abc').sampleSize(); - result = _('abc').sampleSize(42); - result = _(array).sampleSize(); - result = _(array).sampleSize(42); - result = _(list).sampleSize(); - result = _(list).sampleSize(42); - result = _(dictionary).sampleSize(); - result = _(dictionary).sampleSize(42); - result = _(numericDictionary).sampleSize(); - result = _(numericDictionary).sampleSize(42); - result = _({a: 'foo'}).sampleSize(); - result = _({a: 'foo'}).sampleSize(42); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _('abc').chain().sampleSize(); - result = _('abc').chain().sampleSize(42); - result = _(array).chain().sampleSize(); - result = _(array).chain().sampleSize(42); - result = _(list).chain().sampleSize(); - result = _(list).chain().sampleSize(42); - result = _(dictionary).chain().sampleSize(); - result = _(dictionary).chain().sampleSize(42); - result = _(numericDictionary).chain().sampleSize(); - result = _(numericDictionary).chain().sampleSize(42); - result = _({a: 'foo'}).chain().sampleSize(); - result = _({a: 'foo'}).chain().sampleSize(42); - } -} - -// _.shuffle -namespace TestShuffle { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; - - { - let result: string[]; - - result = _.shuffle('abc'); - } - - { - let result: AbcObject[]; - - result = _.shuffle(array); - result = _.shuffle(list); - result = _.shuffle(dictionary); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _('abc').shuffle(); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).shuffle(); - result = _(list).shuffle(); - result = _(dictionary).shuffle(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _('abc').chain().shuffle(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().shuffle(); - result = _(list).chain().shuffle(); - result = _(dictionary).chain().shuffle(); - } -} - -// _.size -namespace TestSize { - type SampleType = {a: string; b: number; c: boolean;}; - - let array: SampleType[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; - - { - let result: number; - - result = _.size(array); - result = _.size(list); - result = _.size(dictionary); - result = _.size(''); - - result = _(array).size(); - result = _(list).size(); - result = _(dictionary).size(); - result = _('').size(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(array).chain().size(); - result = _(list).chain().size(); - result = _(dictionary).chain().size(); - result = _('').chain().size(); - } -} - -// _.some -namespace TestSome { - type SampleObject = {a: number; b: string; c: boolean;}; - - let array: SampleObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; - let numericDictionary: _.NumericDictionary | null | undefined = obj; - let sampleObject: SampleObject | null | undefined = obj; - - let listIterator = (value: SampleObject, index: number, collection: _.List) => true; - let dictionaryIterator = (value: SampleObject, key: string, collection: _.Dictionary) => true; - let numericDictionaryIterator = (value: SampleObject, key: number, collection: _.NumericDictionary) => true; - let objectIterator = (value: any, key: string, collection: any) => true; - - { - let result: boolean; - - result = _.some(array); - result = _.some(array, listIterator); - result = _.some(array, 'a'); - result = _.some(array, ['a', 42]); - result = _.some(array, {a: 42}); - - result = _.some(list); - result = _.some(list, listIterator); - result = _.some(list, 'a'); - result = _.some(list, ['a', 42]); - result = _.some(list, {a: 42}); - - result = _.some(dictionary); - result = _.some(numericDictionary, numericDictionaryIterator); - result = _.some(dictionary, (value, key, collection) => { - value; // $ExpectType SampleObject - key; // $ExpectType string - collection; // $ExpectType Dictionary - return true; - }); - result = _.some(dictionary, 'a'); - result = _.some(dictionary, ['a', 42]); - result = _.some(dictionary, {a: 42}); - - result = _.some(numericDictionary); - result = _.some(numericDictionary, numericDictionaryIterator); - result = _.some(numericDictionary, 'a'); - result = _.some(numericDictionary, ['a', 42]); - result = _.some(numericDictionary, {a: 42}); - - result = _.some(sampleObject); - result = _.some(sampleObject, objectIterator); - result = _.some(sampleObject, 'a'); - result = _.some(sampleObject, ['a', 42]); - result = _.some<{a: number}>(sampleObject, {a: 42}); - - result = _(array).some(); - result = _(array).some(listIterator); - result = _(array).some('a'); - result = _(array).some(['a', 42]); - result = _(array).some({a: 42}); - - result = _(list).some(); - result = _(list).some(listIterator); - result = _(list).some('a'); - result = _(list).some(['a', 42]); - result = _(list).some({a: 42}); - - result = _(dictionary).some(); - result = _(dictionary).some(dictionaryIterator); - result = _(dictionary).some('a'); - result = _(dictionary).some(['a', 42]); - result = _(dictionary).some({a: 42}); - - result = _(numericDictionary).some(); - result = _(numericDictionary).some(numericDictionaryIterator); - result = _(numericDictionary).some('a'); - result = _(numericDictionary).some(['a', 42]); - result = _(numericDictionary).some({a: 42}); - - result = _(sampleObject).some(); - result = _(sampleObject).some(objectIterator); - result = _(sampleObject).some('a'); - result = _(sampleObject).some(['a', 42]); - result = _(sampleObject).some({a: 42}); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(array).chain().some(); - result = _(array).chain().some(listIterator); - result = _(array).chain().some('a'); - result = _(array).chain().some(['a', 42]); - result = _(array).chain().some({a: 42}); - - result = _(list).chain().some(); - result = _(list).chain().some(listIterator); - result = _(list).chain().some('a'); - result = _(list).chain().some(['a', 42]); - result = _(list).chain().some({a: 42}); - - result = _(dictionary).chain().some(); - result = _(dictionary).chain().some(dictionaryIterator); - result = _(dictionary).chain().some('a'); - result = _(dictionary).chain().some(['a', 42]); - result = _(dictionary).chain().some({a: 42}); - - result = _(numericDictionary).chain().some(); - result = _(numericDictionary).chain().some(numericDictionaryIterator); - result = _(numericDictionary).chain().some('a'); - result = _(numericDictionary).chain().some(['a', 42]); - result = _(numericDictionary).chain().some({a: 42}); - - result = _(sampleObject).chain().some(); - result = _(sampleObject).chain().some(objectIterator); - result = _(sampleObject).chain().some('a'); - result = _(sampleObject).chain().some(['a', 42]); - result = _(sampleObject).chain().some({a: 42}); - } -} - -// _.sortBy -namespace TestSortBy { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; - - let listIterator = (value: AbcObject, index: number, collection: _.List) => 0; - let dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => 0; - - { - let result: AbcObject[]; - - result = _.sortBy(array); - result = _.sortBy(array, listIterator); - result = _.sortBy(array, ''); - result = _.sortBy(array, {a: 42}); - - result = _.sortBy(list); - result = _.sortBy(list, listIterator); - result = _.sortBy(list, ''); - result = _.sortBy(list, {a: 42}); - - result = _.sortBy(dictionary); - result = _.sortBy(dictionary, dictionaryIterator); - result = _.sortBy(dictionary, ''); - result = _.sortBy(dictionary, {a: 42}); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).sortBy(); - result = _(array).sortBy(listIterator); - result = _(array).sortBy(''); - result = _(array).sortBy({a: 42}); - - result = _(list).sortBy(); - result = _(list).sortBy(listIterator); - result = _(list).sortBy(''); - result = _(list).sortBy({a: 42}); - - result = _(dictionary).sortBy(); - result = _(dictionary).sortBy(dictionaryIterator); - result = _(dictionary).sortBy(''); - result = _(dictionary).sortBy({a: 42}); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().sortBy(); - result = _(array).chain().sortBy(listIterator); - result = _(array).chain().sortBy(''); - result = _(array).chain().sortBy({a: 42}); - - result = _(list).chain().sortBy(); - result = _(list).chain().sortBy(listIterator); - result = _(list).chain().sortBy(''); - result = _(list).chain().sortBy({a: 42}); - - result = _(dictionary).chain().sortBy(); - result = _(dictionary).chain().sortBy(dictionaryIterator); - result = _(dictionary).chain().sortBy(''); - result = _(dictionary).chain().sortBy({a: 42}); - } -} - -_.sortBy(stoogesAges, stooge => Math.sin(stooge.age), stooge => stooge.name.slice(1)); // $ExpectType StoogesAge[] -_.sortBy(stoogesAges, ['name', 'age']); // $ExpectType StoogesAge[] -_.sortBy(stoogesAges, 'name', stooge => Math.sin(stooge.age)); // $ExpectType StoogesAge[] - -_(foodsOrganic).sortBy('organic', (food) => food.name, { organic: true }).value(); // $ExpectType FoodOrganic[] - -// _.orderBy -namespace TestorderBy { - type SampleObject = {a: number; b: string; c: boolean}; - - const array: SampleObject[] | null | undefined = anything; - const list: _.List | null | undefined = anything; - const numericDictionary: _.NumericDictionary | null | undefined = anything; - const dictionary: _.Dictionary | null | undefined = anything; - const orders: boolean|string|Array = anything; - - { - let iteratees: ((value: string) => any)|Array<(value: string) => any> = anything; - let result: string[]; - - result = _.orderBy('acbd', iteratees); - result = _.orderBy('acbd', iteratees, orders); - } - - { - const iteratees: ((value: SampleObject) => _.NotVoid)|string|_.PartialDeep|Array<((value: SampleObject) => _.NotVoid)|string|_.PartialDeep> = anything; - let result: SampleObject[]; - - result = _.orderBy(array, iteratees); - result = _.orderBy(array, iteratees, orders); - result = _.orderBy(array, iteratees); - result = _.orderBy(array, iteratees, orders); - - result = _.orderBy(list, iteratees); - result = _.orderBy(list, iteratees, orders); - result = _.orderBy(list, iteratees); - result = _.orderBy(list, iteratees, orders); - - result = _.orderBy(numericDictionary, iteratees); - result = _.orderBy(numericDictionary, iteratees, orders); - result = _.orderBy(numericDictionary, iteratees); - result = _.orderBy(numericDictionary, iteratees, orders); - - result = _.orderBy(dictionary, iteratees); - result = _.orderBy(dictionary, iteratees, orders); - result = _.orderBy(dictionary, iteratees); - result = _.orderBy(dictionary, iteratees, orders); - } - - { - const iteratees: ((value: SampleObject) => _.NotVoid)|string|_.PartialDeep|Array<((value: SampleObject) => _.NotVoid)|string|_.PartialDeep> = anything; - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).orderBy(iteratees); - result = _(array).orderBy(iteratees, orders); - - result = _(list).orderBy(iteratees); - result = _(list).orderBy(iteratees, orders); - result = _(list).orderBy(iteratees); - result = _(list).orderBy(iteratees, orders); - - result = _(numericDictionary).orderBy(iteratees); - result = _(numericDictionary).orderBy(iteratees, orders); - result = _(numericDictionary).orderBy(iteratees); - result = _(numericDictionary).orderBy(iteratees, orders); - - result = _(dictionary).orderBy(iteratees); - result = _(dictionary).orderBy(iteratees, orders); - result = _(dictionary).orderBy(iteratees); - result = _(dictionary).orderBy(iteratees, orders); - } - - { - const iteratees: ((value: SampleObject) => _.NotVoid)|string|_.PartialDeep|Array<((value: SampleObject) => _.NotVoid)|string|_.PartialDeep> = anything; - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().orderBy(iteratees); - result = _(array).chain().orderBy(iteratees, orders); - - result = _(list).chain().orderBy(iteratees); - result = _(list).chain().orderBy(iteratees, orders); - result = _(list).chain().orderBy(iteratees); - result = _(list).chain().orderBy(iteratees, orders); - - result = _(numericDictionary).chain().orderBy(iteratees); - result = _(numericDictionary).chain().orderBy(iteratees, orders); - result = _(numericDictionary).chain().orderBy(iteratees); - result = _(numericDictionary).chain().orderBy(iteratees, orders); - - result = _(dictionary).chain().orderBy(iteratees); - result = _(dictionary).chain().orderBy(iteratees, orders); - result = _(dictionary).chain().orderBy(iteratees); - result = _(dictionary).chain().orderBy(iteratees, orders); - } -} - -/******** - * Date * - ********/ - -namespace TestNow { - { - let result: number; - - result = _.now(); - result = _(42).now(); - result = _([]).now(); - result = _({}).now(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(42).chain().now(); - result = _([]).chain().now(); - result = _({}).chain().now(); - } -} - -/************* - * Functions * - *************/ -// _.after -namespace TestAfter { - type Func = (a: string, b: number) => boolean; - - let func: Func = (a, b) => true; - - { - let result: Func; - - _.after(42, func); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - _(42).after(func); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - _(42).chain().after(func); - } -} - -// _.ary -namespace TestAry { - type SampleFunc = (a: number, b: string) => boolean; - - let func: SampleFunc = (a, b) => true; - - { - let result: SampleFunc; - - result = _.ary(func); - result = _.ary(func, 2); - result = _.ary(func); - result = _.ary(func, 2); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(func).ary(); - result = _(func).ary(2); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(func).chain().ary(); - result = _(func).chain().ary(2); - } -} - -// _.before -namespace TestBefore { - type Func = (a: string, b: number) => boolean; - - let func: Func = (a, b) => true; - - { - let result: Func; - - _.before(42, func); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - _(42).before(func); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - _(42).chain().before(func); - } -} - -// _.bind -namespace TestBind { - type SampleFunc = (a: number, b: string) => boolean; - - let func: SampleFunc = (a, b) => true; - - { - type SampleResult = (a: number, b: string) => boolean; - - let result: SampleResult; - - result = _.bind(func, anything); - result = _.bind(func, anything); - } - - { - type SampleResult = (b: string) => boolean; - - let result: SampleResult; - - result = _.bind(func, anything, 42); - result = _.bind(func, anything, 42); - } - - { - type SampleResult = () => boolean; - - let result: SampleResult; - - result = _.bind(func, anything, 42, ''); - result = _.bind(func, anything, 42, ''); - } - - { - type SampleResult = (a: number, b: string) => boolean; - - let result: _.LoDashImplicitObjectWrapper; - - result = _(func).bind(anything); - } - - { - type SampleResult = (b: string) => boolean; - - let result: _.LoDashImplicitObjectWrapper; - - result = _(func).bind(anything, 42); - } - - { - type SampleResult = () => boolean; - - let result: _.LoDashImplicitObjectWrapper; - - result = _(func).bind(anything, 42, ''); - } - - { - type SampleResult = (a: number, b: string) => boolean; - - let result: _.LoDashExplicitObjectWrapper; - - result = _(func).chain().bind(anything); - } - - { - type SampleResult = (b: string) => boolean; - - let result: _.LoDashExplicitWrapper; - - result = _(func).chain().bind(anything, 42); - } - - { - type SampleResult = () => boolean; - - let result: _.LoDashExplicitWrapper; - - result = _(func).chain().bind(anything, 42, ''); - } -} - -// _.bindAll -namespace TestBindAll { - interface SampleObject { - a(): void; - b(): void; - c(): void; - } - - let object: SampleObject = { a: () => {}, b: () => {}, c: () => {} }; - - { - let result: SampleObject; - - result = _.bindAll(object); - result = _.bindAll(object, 'c'); - result = _.bindAll(object, ['b'], 'c'); - result = _.bindAll(object, 'a', ['b'], 'c'); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(object).bindAll(); - result = _(object).bindAll('c'); - result = _(object).bindAll(['b'], 'c'); - result = _(object).bindAll('a', ['b'], 'c'); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(object).chain().bindAll(); - result = _(object).chain().bindAll('c'); - result = _(object).chain().bindAll(['b'], 'c'); - result = _(object).chain().bindAll('a', ['b'], 'c'); - } -} - -// _.bindKey -namespace TestBindKey { - let object = { - foo: (a: number, b: string) => true, - }; - - { - type SampleResult = (a: number, b: string) => boolean; - - let result: SampleResult; - - result = _.bindKey(object, 'foo'); - } - - { - type SampleResult = (b: string) => boolean; - - let result: SampleResult; - - result = _.bindKey(object, 'foo', 42); - } - - { - type SampleResult = () => boolean; - - let result: SampleResult; - - result = _.bindKey(object, 'foo', 42, ''); - } - - { - type SampleResult = (a: number, b: string) => boolean; - - let result: _.LoDashImplicitObjectWrapper; - - result = _(object).bindKey('foo'); - } - - { - type SampleResult = (b: string) => boolean; - - let result: _.LoDashImplicitObjectWrapper; - - result = _(object).bindKey('foo', 42); - } - - { - type SampleResult = () => boolean; - - let result: _.LoDashImplicitObjectWrapper; - - result = _(object).bindKey('foo', 42, ''); - } - - { - type SampleResult = (a: number, b: string) => boolean; - - let result: _.LoDashExplicitObjectWrapper; - - result = _(object).chain().bindKey('foo'); - } - - { - type SampleResult = (b: string) => boolean; - - let result: _.LoDashExplicitObjectWrapper; - - result = _(object).chain().bindKey('foo', 42); - } - - { - type SampleResult = () => boolean; - - let result: _.LoDashExplicitObjectWrapper; - - result = _(object).chain().bindKey('foo', 42, ''); - } -} - -// _.curry -const testCurryFn = (a: number, b: number, c: number) => [a, b, c]; -let curryResult0: number[] -let curryResult1: _.CurriedFunction1 -let curryResult2: _.CurriedFunction2 - -curryResult0 = _.curry(testCurryFn)(1, 2, 3); -curryResult1 = _.curry(testCurryFn)(1, 2); -curryResult0 = _.curry(testCurryFn)(1, 2)(3); -curryResult0 = _.curry(testCurryFn)(1)(2)(3); -curryResult2 = _.curry(testCurryFn)(1); -curryResult1 = _.curry(testCurryFn)(1)(2); -curryResult0 = _.curry(testCurryFn)(1)(2)(3); -curryResult0 = _.curry(testCurryFn)(1)(2, 3); -curryResult0 = _(testCurryFn).curry().value()(1, 2, 3); -curryResult2 = _(testCurryFn).curry().value()(1); - -declare function testCurry2(a: string, b: number, c: boolean): [string, number, boolean]; -let curryResult3: [string, number, boolean]; -let curryResult4: _.CurriedFunction1; -let curryResult5: _.CurriedFunction2; -let curryResult6: _.CurriedFunction3; -curryResult3 = _.curry(testCurry2)("1", 2, true); -curryResult3 = _.curry(testCurry2)("1", 2)(true); -curryResult3 = _.curry(testCurry2)("1")(2, true); -curryResult3 = _.curry(testCurry2)("1")(2)(true); -curryResult4 = _.curry(testCurry2)("1", 2); -curryResult4 = _.curry(testCurry2)("1")(2); -curryResult5 = _.curry(testCurry2)("1"); -curryResult6 = _.curry(testCurry2); - -// _.curryRight -const testCurryRightFn = (a: number, b: number, c: number) => [a, b, c]; -curryResult0 = _.curryRight(testCurryRightFn)(1, 2, 3); -curryResult2 = _.curryRight(testCurryRightFn)(1); -curryResult0 = _(testCurryRightFn).curryRight().value()(1, 2, 3); -curryResult2 = _(testCurryRightFn).curryRight().value()(1); -let curryResult7: _.RightCurriedFunction1; -let curryResult8: _.RightCurriedFunction2; -let curryResult9: _.RightCurriedFunction3; -curryResult3 = _.curryRight(testCurry2)("1", 2, true); -curryResult3 = _.curryRight(testCurry2)( 2,true)("1"); -curryResult3 = _.curryRight(testCurry2)(true)( "1",2); -curryResult3 = _.curryRight(testCurry2)(true)(2)("1"); -curryResult7 = _.curryRight(testCurry2)(2,true); -curryResult7 = _.curryRight(testCurry2)(true)(2); -curryResult8 = _.curryRight(testCurry2)(true); -curryResult9 = _.curryRight(testCurry2); - -// _.debounce -namespace TestDebounce { - type SampleFunc = (n: number, s: string) => boolean; - - interface Options { - leading?: boolean; - maxWait?: number; - trailing?: boolean; - } - - interface ResultFunc { - (n: number, s: string): boolean; - cancel(): void; - flush(): void; - } - - let func: SampleFunc = (a, b) => true; - let options: Options = {}; - - { - let result: ResultFunc; - - result = _.debounce(func); - result = _.debounce(func, 42); - result = _.debounce(func, 42, options); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(func).debounce(); - result = _(func).debounce(42); - result = _(func).debounce(42, options); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(func).chain().debounce(); - result = _(func).chain().debounce(42); - result = _(func).chain().debounce(42, options); - } -} - -// _.defer -namespace TestDefer { - type SampleFunc = (a: number, b: string) => boolean; - - let func: SampleFunc = (a, b) => true; - - { - let result: number; - - result = _.defer(func); - result = _.defer(func, anything); - result = _.defer(func, anything, anything); - result = _.defer(func, anything, anything, anything); - } - - { - let result: _.LoDashImplicitWrapper; - - result = _(func).defer(); - result = _(func).defer(anything); - result = _(func).defer(anything, anything); - result = _(func).defer(anything, anything, anything); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(func).chain().defer(); - result = _(func).chain().defer(anything); - result = _(func).chain().defer(anything, anything); - result = _(func).chain().defer(anything, anything, anything); - } -} - -// _.delay -namespace TestDelay { - type SampleFunc = (a: number, b: string) => boolean; - - let func: SampleFunc = (a, b) => true; - - { - let result: number; - - result = _.delay(func, 1); - result = _.delay(func, 1, 2); - result = _.delay(func, 1, 2, ''); - } - - { - let result: _.LoDashImplicitWrapper; - - result = _(func).delay(1); - result = _(func).delay(1, 2); - result = _(func).delay(1, 2, ''); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(func).chain().delay(1); - result = _(func).chain().delay(1, 2); - result = _(func).chain().delay(1, 2, ''); - } -} - -// _.flip -namespace TestFlip { - type Func = (a: string, b: number) => boolean; - - let func: Func = (a, b) => true; - - { - let result: Func; - - result = _.flip(func); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(func).flip(); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(func).chain().flip(); - } -} - -// _.flow -namespace TestFlow { - let Fn1 = (n: number) => 0; - let Fn2 = (m: number, n: number) => 0; - let Fn3 = (a: number) => ""; - let Fn4 = (a: string) => 0; - - { - // type infer test - let result: (m: number, n: number) => number; - - result = _.flow(Fn2, Fn1); - result = _.flow(Fn2, Fn1, Fn1); - result = _.flow(Fn2, Fn1, Fn1, Fn1); - result = _.flow(Fn2, Fn1, Fn1, Fn1, Fn1); - result = _.flow(Fn2, Fn1, Fn1, Fn1, Fn1, Fn1); - result = _.flow(Fn2, Fn1, Fn1, Fn1, Fn1, Fn1, Fn1); - result = _.flow(Fn2, Fn1, Fn3, Fn4); - result = _.flow([Fn2, Fn1, Fn3, Fn4]); - } - - { - let result: (m: number, n: number) => number; - - result = _.flow(Fn2, Fn1); - result = _.flow(Fn2, Fn1, Fn1); - result = _.flow(Fn2, Fn1, Fn1, Fn1); - result = _.flow([Fn1, Fn1, Fn1, Fn2]); - } - - { - let result: _.LoDashImplicitObjectWrapper<(m: number, n: number) => number>; - - result = _(Fn2).flow(Fn1); - result = _(Fn2).flow(Fn1, Fn1); - result = _(Fn2).flow(Fn1, Fn1, Fn1); - result = _(Fn2).flow([Fn1, Fn1, Fn1]); - } - - { - let result: _.LoDashExplicitObjectWrapper<(m: number, n: number) => number>; - - result = _(Fn2).chain().flow(Fn1); - result = _(Fn2).chain().flow(Fn1, Fn1); - result = _(Fn2).chain().flow(Fn1, Fn1, Fn1); - result = _(Fn2).chain().flow([Fn1, Fn1, Fn1]); - } -} - -// _.flowRight -namespace TestFlowRight { - let Fn1 = (n: number) => 0; - let Fn2 = (m: number, n: number) => 0; - - { - let result: (m: number, n: number) => number; - - result = _.flowRight(Fn1, Fn2); - result = _.flowRight(Fn1, Fn1, Fn2); - result = _.flowRight(Fn1, Fn1, Fn1, Fn2); - result = _.flowRight([Fn1, Fn1, Fn1, Fn2]); - } - - { - let result: _.LoDashImplicitObjectWrapper<(m: number, n: number) => number>; - - result = _(Fn1).flowRight(Fn2); - result = _(Fn1).flowRight(Fn1, Fn2); - result = _(Fn1).flowRight(Fn1, Fn1, Fn2); - result = _(Fn1).flowRight([Fn1, Fn1, Fn2]); - } - - { - let result: _.LoDashExplicitObjectWrapper<(m: number, n: number) => number>; - - result = _(Fn1).chain().flowRight(Fn2); - result = _(Fn1).chain().flowRight(Fn1, Fn2); - result = _(Fn1).chain().flowRight(Fn1, Fn1, Fn2); - result = _(Fn1).chain().flowRight([Fn1, Fn1, Fn2]); - } -} - -// _.memoize -namespace TestMemoize { - { - let fn: any = () => {}; - let memoizedFunction: _.MemoizedFunction = fn; - let cache: _.MapCache = memoizedFunction.cache; - } - - interface MemoizedResultFn extends _.MemoizedFunction { - (a1: string, a2: number): boolean; - } - - let memoizeFn = (a1: string, a2: number) => true; - let memoizeResolverFn = (a1: string, a2: number) => ""; - - { - let result: MemoizedResultFn; - - result = _.memoize(memoizeFn); - result = _.memoize(memoizeFn, memoizeResolverFn); - - result('foo', 1); - result.cache.get('foo1'); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(memoizeFn).memoize(); - result = _(memoizeFn).memoize(memoizeResolverFn); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(memoizeFn).chain().memoize(); - result = _(memoizeFn).chain().memoize(memoizeResolverFn); - } - - interface MemoizeCache { - delete(key: K): boolean; - get(key: K): V; - has(key: K): boolean; - set(key: K, value: V): this; - clear(): void; - } - class MemoizeCacheClass implements MemoizeCache { - delete: (key: any) => true; - get: (key: any) => 1; - has: (key: any) => true; - set: (key: any, value: any) => this; - clear: () => { }; - } - - _.memoize.Cache = MemoizeCacheClass; -} - -// _.overArgs -namespace TestOverArgs { - type Func1 = (a: boolean) => boolean; - type Func2 = (a: boolean, b: boolean) => boolean; - - let func1: Func1 = (a) => true; - let func2: Func2 = (a, b) => true; - - let transform1 = (a: string) => true; - let transform2 = (b: number) => true; - - { - let result: (a: string) => boolean; - - result = _.overArgs(func1, transform1); - result = _.overArgs(func1, [transform1]); - } - - { - let result: (a: string, b: number) => boolean; - - result = _.overArgs(func2, transform1, transform2); - result = _.overArgs(func2, [transform1, transform2]); - } - - { - let result: _.LoDashImplicitObjectWrapper<(a: string) => boolean>; - - result = _(func1).overArgs(transform1); - result = _(func1).overArgs([transform1]); - } - - { - let result: _.LoDashImplicitObjectWrapper<(a: string, b: number) => boolean>; - - result = _(func2).overArgs(transform1, transform2); - result = _(func2).overArgs([transform1, transform2]); - } - - { - let result: _.LoDashExplicitObjectWrapper<(a: string) => boolean>; - - result = _(func1).chain().overArgs(transform1); - result = _(func1).chain().overArgs([transform1]); - } - - { - let result: _.LoDashExplicitObjectWrapper<(a: string, b: number) => boolean>; - - result = _(func2).chain().overArgs(transform1, transform2); - result = _(func2).chain().overArgs([transform1, transform2]); - } -} - -// _.negate -namespace TestNegate { - type PredicateFn = (a1: number, a2: number) => boolean; - - const predicate = (a1: number, a2: number) => a1 > a2; - - { - let result: PredicateFn; - - result = _.negate(predicate); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(predicate).negate(); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(predicate).chain().negate(); - } -} - -// _.once -namespace TestOnce { - type Func = (a: string, b: number) => boolean; - - let func: Func = (a, b) => true; - - { - let result: Func; - - result = _.once(func); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(func).once(); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(func).chain().once(); - } -} - -const greetPartial = (greeting: string, name: string) => `${greeting} ${name}`; -const hi = _.partial(greetPartial, 'hi'); -hi('moe'); - -const defaultsDeep: (...args: any[]) => any = _.partialRight(_.merge, _.defaults); - -const optionsPartialRight = { - 'variable': 'data', - 'imports': { 'jq': $ } -}; - -defaultsDeep(optionsPartialRight, _.templateSettings); - -//_.rearg -const testReargFn = (a: string, b: string, c: string) => [a, b, c]; -result = (_.rearg(testReargFn, 2, 0, 1))('b', 'c', 'a'); -result = (_.rearg(testReargFn, [2, 0, 1]))('b', 'c', 'a'); -result = (_(testReargFn).rearg(2, 0, 1).value())('b', 'c', 'a'); -result = (_(testReargFn).rearg([2, 0, 1]).value())('b', 'c', 'a'); - -// _.rest -namespace TestRest { - type Func = (a: string, b: number[]) => boolean; - type ResultFunc = (a: string, ...b: number[]) => boolean; - - let func: Func = (a, b) => true; - - { - let result: ResultFunc; - - result = _.rest(func); - result = _.rest(func, 1); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(func).rest(); - result = _(func).rest(1); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(func).chain().rest(); - result = _(func).chain().rest(1); - } -} - -//_.spread -namespace TestSpread { - type SampleFunc = (args: Array) => boolean; - type SampleResult = (a: number, b: string) => boolean; - - let func: SampleFunc = (a) => true; - - { - let result: SampleResult; - - result = _.spread(func); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(func).spread(); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(func).chain().spread(); - } -} - -// _.throttle -namespace TestThrottle { - type SampleFunc = (n: number, s: string) => boolean; - - interface Options { - leading?: boolean; - trailing?: boolean; - } - - interface ResultFunc { - (n: number, s: string): boolean; - cancel(): void; - flush(): void; - } - - let func: SampleFunc = (a, b) => true; - let options: Options = {}; - - { - let result: ResultFunc; - - result = _.throttle(func); - result = _.throttle(func, 42); - result = _.throttle(func, 42, options); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(func).throttle(); - result = _(func).throttle(42); - result = _(func).throttle(42, options); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(func).chain().throttle(); - result = _(func).chain().throttle(42); - result = _(func).chain().throttle(42, options); - } -} - -// _.unary -namespace TestUnary { - type Func = (a: string, b: number[]) => boolean; - - let func: Func = (a, b) => true; - - { - let result: Func; - - result = _.unary(func); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(func).unary(); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(func).chain().unary(); - } -} - -// _.wrap -namespace TestWrap { - type SampleValue = {a: number; b: string; c: boolean} - type SampleResult = (arg2: number, arg3: string) => boolean; - - { - type SampleWrapper = (arg1: SampleValue, arg2: number, arg3: string) => boolean; - - let value: SampleValue = { a: 1, b: "", c: true }; - let wrapper: SampleWrapper = (a, b, c) => true; - let result: SampleResult; - - result = _.wrap(value, wrapper); - } - - { - type SampleWrapper = (arg1: number, arg2: number, arg3: string) => boolean; - - let value = 0; - let wrapper: SampleWrapper = (a, b, c) => true; - let result: _.LoDashImplicitObjectWrapper; - - result = _(value).wrap(wrapper); - } - - { - type SampleWrapper = (arg1: number[], arg2: number, arg3: string) => boolean; - - let value: number[] = []; - let wrapper: SampleWrapper = (a, b, c) => true; - let result: _.LoDashImplicitObjectWrapper; - - result = _(value).wrap(wrapper); - } - - { - type SampleWrapper = (arg1: SampleValue, arg2: number, arg3: string) => boolean; - - let value: SampleValue = { a: 1, b: "", c: true }; - let wrapper: SampleWrapper = (a, b, c) => true; - let result: _.LoDashImplicitObjectWrapper; - - result = _(value).wrap(wrapper); - } - - { - type SampleWrapper = (arg1: number, arg2: number, arg3: string) => boolean; - - let value = 0; - let wrapper: SampleWrapper = (a, b, c) => true; - let result: _.LoDashExplicitObjectWrapper; - - result = _(value).chain().wrap(wrapper); - } - - { - type SampleWrapper = (arg1: number[], arg2: number, arg3: string) => boolean; - - let value: number[] = []; - let wrapper: SampleWrapper = (a, b, c) => true; - let result: _.LoDashExplicitObjectWrapper; - - result = _(value).chain().wrap(wrapper); - } - - { - type SampleWrapper = (arg1: SampleValue, arg2: number, arg3: string) => boolean; - - let value: SampleValue = { a: 1, b: "", c: true }; - let wrapper: SampleWrapper = (a, b, c) => true; - let result: _.LoDashExplicitObjectWrapper; - - result = _(value).chain().wrap(wrapper); - } -} - -/******** - * Lang * - ********/ - -// _.castArray -namespace TestCastArray { - { - let result: number[]; - - result = _.castArray(42); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(42).castArray(); - result = _([42]).castArray(); - } - - { - let result: _.LoDashImplicitArrayWrapper<{a: number}>; - - result = _({a: 42}).castArray(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(42).chain().castArray(); - result = _([42]).chain().castArray(); - } - - { - let result: _.LoDashExplicitArrayWrapper<{a: number}>; - - result = _({a: 42}).chain().castArray(); - } -} - -// _.clone -namespace TestClone { - { - let result: number; - - result = _.clone(42); - result = _(42).clone(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(42).chain().clone(); - } - - { - let result: string[]; - - result = _.clone(['']); - result = _(['']).clone(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(['']).chain().clone(); - } - - { - let result: {a: {b: number;};}; - - result = _.clone<{a: {b: number;};}>({a: {b: 42}}); - result = _({a: {b: 42}}).clone(); - } - - { - let result: _.LoDashExplicitObjectWrapper<{a: {b: number;};}>; - - result = _({a: {b: 42}}).chain().clone(); - } -} - -// _.cloneDeep -namespace TestCloneDeep { - { - let result: number; - - result = _.cloneDeep(42); - result = _(42).cloneDeep(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(42).chain().cloneDeep(); - } - - { - let result: string[]; - - result = _.cloneDeep(['']); - result = _(['']).cloneDeep(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(['']).chain().cloneDeep(); - } - - { - let result: {a: {b: number;};}; - - result = _.cloneDeep<{a: {b: number;};}>({a: {b: 42}}); - result = _({a: {b: 42}}).cloneDeep(); - } - - { - let result: _.LoDashExplicitObjectWrapper<{a: {b: number;};}>; - - result = _({a: {b: 42}}).chain().cloneDeep(); - } -} - -// _.cloneDeepWith -namespace TestCloneDeepWith { - type CloneDeepWithCustomizer = (value: V) => R; - - { - let customizer: CloneDeepWithCustomizer = (x) => ""; - let reslut: string; - - result = _.cloneDeepWith(42, customizer); - result = _(42).cloneDeepWith(customizer); - } - - { - let customizer: CloneDeepWithCustomizer = (x) => ""; - let result: _.LoDashExplicitWrapper; - - result = _(42).chain().cloneDeepWith(customizer); - } - - { - let customizer: CloneDeepWithCustomizer = (x) => []; - let reslut: string[]; - - result = _.cloneDeepWith([42], customizer); - result = _([42]).cloneDeepWith(customizer); - } - - { - let customizer: CloneDeepWithCustomizer = (x) => []; - let result: _.LoDashExplicitArrayWrapper; - - result = _([42]).chain().cloneDeepWith(customizer); - } - - { - let customizer: CloneDeepWithCustomizer<{a: {b: number;};}, {a: {b: string;};}> = (x) => ({ a: { b: "" } }); - let reslut: {a: {b: string;};}; - - result = _.cloneDeepWith({a: {b: 42}}, customizer); - result = _({a: {b: 42}}).cloneDeepWith(customizer); - } - - { - let customizer: CloneDeepWithCustomizer<{a: {b: number;};}, {a: {b: string;};}> = (x) => ({ a: { b: "" } }); - let result: _.LoDashExplicitObjectWrapper<{a: {b: string;};}>; - - result = _({a: {b: 42}}).chain().cloneDeepWith(customizer); - } -} - -// _.cloneWith -namespace TestCloneWith { - type CloneWithCustomizer = (value: V) => R; - - { - let customizer: CloneWithCustomizer = (x) => ""; - let reslut: string; - - result = _.cloneWith(42, customizer); - result = _.cloneWith(42, customizer); - result = _(42).cloneWith(customizer); - } - - { - let customizer: CloneWithCustomizer = (x) => ""; - let result: _.LoDashExplicitWrapper; - - result = _(42).chain().cloneWith(customizer); - } - - { - let customizer: CloneWithCustomizer = (x) => []; - let reslut: string[]; - - result = _.cloneWith([42], customizer); - result = _.cloneWith([42], customizer); - result = _([42]).cloneWith(customizer); - } - - { - let customizer: CloneWithCustomizer = (x) => []; - let result: _.LoDashExplicitArrayWrapper; - - result = _([42]).chain().cloneWith(customizer); - } - - { - let customizer: CloneWithCustomizer<{a: {b: number;};}, {a: {b: string;};}> = (x) => ({ a: { b: "" } }); - let reslut: {a: {b: string;};}; - - result = _.cloneWith({a: {b: 42}}, customizer); - result = _.cloneWith<{a: {b: number;};}, {a: {b: string;};}>({a: {b: 42}}, customizer); - result = _({a: {b: 42}}).cloneWith<{a: {b: string;};}>(customizer); - } - - { - let customizer: CloneWithCustomizer<{a: {b: number;};}, {a: {b: string;};}> = (x) => ({ a: { b: "" } }); - let result: _.LoDashExplicitObjectWrapper<{a: {b: string;};}>; - - result = _({a: {b: 42}}).chain().cloneWith<{a: {b: string;};}>(customizer); - } -} - -// _.conforms -namespace TestConforms { - let result: boolean = _.conforms({foo: (v: string) => false})({foo: "foo"}); - let result2: boolean = _.conforms({})({foo: "foo"}); -} - -// _.conformsTo -namespace TestConformsTo { - let result: boolean = _.conformsTo({foo: "foo"}, {foo: (v: string) => false}); - let result2: boolean = _.conformsTo({}, {foo: (v: string) => false}); -} - -// _.eq -namespace TestEq { - let customizer: (value: any, other: any, indexOrKey?: number|string) => boolean; - - { - let result: boolean; - - result = _.eq(anything, anything); - - result = _(anything).eq(anything); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(anything).chain().eq(anything); - } -} - -// _.gt -namespace TestGt { - { - let result: boolean; - - result = _.gt(anything, anything); - result = _(1).gt(anything); - result = _([]).gt(anything); - result = _({}).gt(anything); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().gt(anything); - result = _([]).chain().gt(anything); - result = _({}).chain().gt(anything); - } -} - -// _.gte -namespace TestGte { - { - let result: boolean; - - result = _.gte(anything, anything); - result = _(1).gte(anything); - result = _([]).gte(anything); - result = _({}).gte(anything); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().gte(anything); - result = _([]).chain().gte(anything); - result = _({}).chain().gte(anything); - } -} - -// _.isArguments -namespace TestisArguments { - { - let value: number|IArguments = 0; - - if (_.isArguments(value)) { - let result: IArguments = value; - } - else { - let result: number = value; - } - } - - { - let result: boolean; - - result = _.isArguments(anything); - result = _(1).isArguments(); - result = _([]).isArguments(); - result = _({}).isArguments(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isArguments(); - result = _([]).chain().isArguments(); - result = _({}).chain().isArguments(); - } -} - -// _.isArray -namespace TestIsArray { - { - let value: number|string[]|boolean[] = anything; - - if (_.isArray(value)) { - value; // $ExpectType string[] | boolean[] - } - else { - value; // $ExpectType number - } - } - - { - let result: boolean; - - result = _.isArray(anything); - result = _(1).isArray(); - result = _([]).isArray(); - result = _({}).isArray(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isArray(); - result = _([]).chain().isArray(); - result = _({}).chain().isArray(); - } -} - -// _.isArrayBuffer -namespace TestIsArrayBuffer { - { - let value: ArrayBuffer|number = anything; - - if (_.isArrayBuffer(value)) { - value; // $ExpectType ArrayBuffer - } - else { - value; // $ExpectType number - } - } - - { - let result: boolean; - - result = _.isArrayBuffer(anything); - result = _(1).isArrayBuffer(); - result = _([]).isArrayBuffer(); - result = _({}).isArrayBuffer(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isArrayBuffer(); - result = _([]).chain().isArrayBuffer(); - result = _({}).chain().isArrayBuffer(); - } -} - -// _.isArrayLike -namespace TestIsArrayLike { - { - let value: string | string[] | { [index: number]: boolean, length: number } | [number, boolean] - | number | { length: string } | { a: string } | null | undefined - = anything; - - if (_.isArrayLike(value)) { - let result: string | string[] | { [index: number]: boolean, length: number } | [number, boolean] = value; - } else { - let result: number | { length: string } | { a: string; } | null | undefined = value; - } - } - - { - let value: boolean[] = anything; - - if (_.isArrayLike(value)) { - let result: boolean[] = value; - } - else { - value; // $ExpectType never - } - } - - { - let value: () => number = anything; - - if (_.isArrayLike(value)) { - value; // $ExpectType never - } else { - value; // $ExpectType () => number - } - } - - { - let value: { a: string } = anything; - - if (_.isArrayLike(value)) { - let result: { a: string, length: number } = value; - } - else { - value; // $ExpectType { a: string; } - } - } - - { - let value: any = anything; - - if (_.isArrayLike(value)) { - value; // $ExpectType any - } - else { - value; // $ExpectType any - } - } - - { - let result: boolean; - - result = _.isArrayLike(anything); - result = _(1).isArrayLike(); - result = _([]).isArrayLike(); - result = _({}).isArrayLike(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isArrayLike(); - result = _([]).chain().isArrayLike(); - result = _({}).chain().isArrayLike(); - } -} - -// _.isArrayLikeObject -namespace TestIsArrayLikeObject { - { - let value: string[] | { [index: number]: boolean, length: number } | [number, boolean] - | number | string | { length: string } | { a: string } | null | undefined - = anything; - - if (_.isArrayLikeObject(value)) { - let result: string[] | { [index: number]: boolean, length: number } | [number, boolean] = value; - } else { - let result: string | number | { length: string; } | { a: string; } | null | undefined = value; - } - } - - { - let value: boolean[] = anything; - - if (_.isArrayLikeObject(value)) { - let result: boolean[] = value; - } - else { - value; // $ExpectType never - } - } - - { - let value: (a: string) => boolean = anything; - - if (_.isArrayLikeObject(value)) { - value; // $ExpectType never - } else { - value; // $ExpectType (a: string) => boolean - } - } - - { - let value: { a: string } = anything; - - if (_.isArrayLikeObject(value)) { - let result: { a: string, length: number } = value; - } - else { - value; // $ExpectType { a: string; } - } - } - - { - let value: any = anything; - - if (_.isArrayLikeObject(value)) { - value; // $ExpectType any - } - else { - value; // $ExpectType any - } - } - - { - let result: boolean; - - result = _.isArrayLikeObject(anything); - result = _(1).isArrayLikeObject(); - result = _([]).isArrayLikeObject(); - result = _({}).isArrayLikeObject(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isArrayLikeObject(); - result = _([]).chain().isArrayLikeObject(); - result = _({}).chain().isArrayLikeObject(); - } -} - -// _.isBoolean -namespace TestIsBoolean { - { - let value: number|boolean = 0; - - if (_.isBoolean(value)) { - let result: boolean = value; - } - else { - let result: number = value; - } - } - - { - let result: boolean; - - result = _.isBoolean(anything); - result = _(1).isBoolean(); - result = _([]).isBoolean(); - result = _({}).isBoolean(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isBoolean(); - result = _([]).chain().isBoolean(); - result = _({}).chain().isBoolean(); - } -} - -// _.isBuffer -namespace TestIsBuffer { - { - let result: boolean; - - result = _.isBuffer(anything); - result = _(1).isBuffer(); - result = _([]).isBuffer(); - result = _({}).isBuffer(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isBuffer(); - result = _([]).chain().isBuffer(); - result = _({}).chain().isBuffer(); - } -} - -// _.isDate +// _.prototype.toJSON { - { - let value: number|Date = 0; - - if (_.isDate(value)) { - let result: Date = value; - } - else { - let result: number = value; - } - } - - { - let result: boolean; - - result = _.isDate(anything); - result = _(42).isDate(); - result = _([]).isDate(); - result = _({}).isDate(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(42).chain().isDate(); - result = _([]).chain().isDate(); - result = _({}).chain().isDate(); - } -} - -// _.isElement -namespace TestIsElement { - { - let result: boolean; - - result = _.isElement(anything); - - result = _(42).isElement(); - result = _([]).isElement(); - result = _({}).isElement(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(42).chain().isElement(); - result = _([]).chain().isElement(); - result = _({}).chain().isElement(); - } -} - -// _.isEmpty -namespace TestIsEmpty { - { - let result: boolean; - - result = _.isEmpty(anything); - result = _(1).isEmpty(); - result = _('').isEmpty(); - result = _([]).isEmpty(); - result = _({}).isEmpty(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isEmpty(); - result = _('').chain().isEmpty(); - result = _([]).chain().isEmpty(); - result = _({}).chain().isEmpty(); - } -} - -// _.isEqual -namespace TestIsEqual { - let customizer: (value: any, other: any, indexOrKey?: number|string) => boolean; - - { - let result: boolean; - - result = _.isEqual(anything, anything); - - result = _(anything).isEqual(anything); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(anything).chain().isEqual(anything); - } -} - -// _.isEqualWith -namespace TestIsEqualWith { - let customizer = (value: any, other: any, indexOrKey: number|string|symbol|undefined, parent: any, otherParent: any, stack: any) => true; - - { - let result: boolean; - - result = _.isEqualWith(anything, anything, customizer); - - result = _(anything).isEqualWith(anything, customizer); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(anything).chain().isEqualWith(anything, customizer); - } -} - -// _.isError -namespace TestIsError { - let x: any = 1; - { - let value: number|Error = x; - - if (_.isError(value)) { - let result: Error = value; - } - else { - let result: number = value; - } - } - - { - class CustomError extends Error { - custom: string - } - - let value: number|CustomError = x; - - if (_.isError(value)) { - let result: CustomError = value; - } - else { - let result: number = value; - } - } - - { - let result: boolean; - - result = _.isError(anything); - result = _(1).isError(); - result = _([]).isError(); - result = _({}).isError(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isError(); - result = _([]).chain().isError(); - result = _({}).chain().isError(); - } -} - -// _.isFinite -namespace TestIsFinite { - { - let result: boolean; - - result = _.isFinite(anything); - result = _(1).isFinite(); - result = _([]).isFinite(); - result = _({}).isFinite(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isFinite(); - result = _([]).chain().isFinite(); - result = _({}).chain().isFinite(); - } -} - -// _.isFunction -namespace TestIsFunction { - { - let value: number|(() => void) = anything; - - if (_.isFunction(value)) { - value; // $ExpectType () => void - } - else { - value; // $ExpectType number - } - - if (_.isFunction(anything)) { - anything(); - } - } - - { - let result: boolean; - - result = _.isFunction(anything); - result = _(1).isFunction(); - result = _([]).isFunction(); - result = _({}).isFunction(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isFunction(); - result = _([]).chain().isFunction(); - result = _({}).chain().isFunction(); - } -} - -// _.isInteger -namespace TestIsInteger { - { - let result: boolean; - - result = _.isInteger(anything); - - result = _(1).isInteger(); - result = _([]).isInteger(); - result = _({}).isInteger(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isInteger(); - result = _([]).chain().isInteger(); - result = _({}).chain().isInteger(); - } -} - -// _.isLength -namespace TestIsLength { - { - let result: boolean; - - result = _.isLength(anything); - - result = _(1).isLength(); - result = _([]).isLength(); - result = _({}).isLength(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isLength(); - result = _([]).chain().isLength(); - result = _({}).chain().isLength(); - } -} - -// _.isMap -namespace TestIsMap { - { - let value: number|Map = 0; - - if (_.isMap(value)) { - let result: Map = value; - } - else { - let result: number = value; - } - } - - { - let result: boolean; - - result = _.isMap(anything); - result = _(1).isMap(); - result = _([]).isMap(); - result = _({}).isMap(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isMap(); - result = _([]).chain().isMap(); - result = _({}).chain().isMap(); - } -} - -// _.isMatch -namespace TestIsMatch { - _.isMatch({}, {}); // $ExpectType boolean - _({}).isMatch({}); // $ExpectType boolean - _.chain({}).isMatch({}); // $ExpectType LoDashExplicitWrapper -} - -// _.isMatchWith -namespace TestIsMatchWith { - let testIsMatchCustiomizerFn = (value: any, other: any, indexOrKey: number|string|symbol) => true; - - _.isMatchWith({}, {}, testIsMatchCustiomizerFn); // $ExpectType boolean - _({}).isMatchWith({}, testIsMatchCustiomizerFn); // $ExpectType boolean - _.chain({}).isMatchWith({}, testIsMatchCustiomizerFn); // $ExpectType LoDashExplicitWrapper -} - -// _.isNaN -namespace TestIsNaN { - { - let result: boolean; - - result = _.isNaN(anything); - - result = _(1).isNaN(); - result = _([]).isNaN(); - result = _({}).isNaN(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isNaN(); - result = _([]).chain().isNaN(); - result = _({}).chain().isNaN(); - } -} - -// _.isNative -namespace TestIsNative { - { - let value: number|(() => void) = anything; - - if (_.isNative(value)) { - value; // $ExpectType () => void - } - else { - value; // $ExpectType number - } - } - - { - let result: boolean; - - result = _.isNative(anything); - - result = _(1).isNative(); - result = _([]).isNative(); - result = _({}).isNative(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isNative(); - result = _([]).chain().isNative(); - result = _({}).chain().isNative(); - } -} - -// _.isNil -namespace TestIsNil { - { - let result: boolean; - - result = _.isNil(anything); - - result = _(1).isNil(); - result = _([]).isNil(); - result = _({}).isNil(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isNil(); - result = _([]).chain().isNil(); - result = _({}).chain().isNil(); - } -} - -// _.isNull -namespace TestIsNull { - { - let result: boolean; - - result = _.isNull(anything); - - result = _(1).isNull(); - result = _([]).isNull(); - result = _({}).isNull(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isNull(); - result = _([]).chain().isNull(); - result = _({}).chain().isNull(); - } -} - -// _.isNumber -namespace TestIsNumber { - { - let value: string|number = 0; - - if (_.isNumber(value)) { - let result: number = value; - } - else { - let result: string = value; - } - } - - { - let result: boolean; - - result = _.isNumber(anything); - - result = _(1).isNumber(); - result = _([]).isNumber(); - result = _({}).isNumber(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isNumber(); - result = _([]).chain().isNumber(); - result = _({}).chain().isNumber(); - } -} - -// _.isObject -namespace TestIsObject { - { - let result: boolean; - - result = _.isObject(anything); - result = _(1).isObject(); - result = _([]).isObject(); - result = _({}).isObject(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isObject(); - result = _([]).chain().isObject(); - result = _({}).chain().isObject(); - } -} - -// _.isObjectLike -namespace TestIsObjectLike { - { - let result: boolean; - - result = _.isObjectLike(anything); - result = _(1).isObjectLike(); - result = _([]).isObjectLike(); - result = _({}).isObjectLike(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isObjectLike(); - result = _([]).chain().isObjectLike(); - result = _({}).chain().isObjectLike(); - } -} - -// _.isPlainObject -namespace TestIsPlainObject { - { - let result: boolean; - - result = _.isPlainObject(anything); - result = _(1).isPlainObject(); - result = _([]).isPlainObject(); - result = _({}).isPlainObject(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isPlainObject(); - result = _([]).chain().isPlainObject(); - result = _({}).chain().isPlainObject(); - } -} - -// _.isRegExp -namespace TestIsRegExp { - { - let value: number|RegExp = /./; - - if (_.isRegExp(value)) { - let result: RegExp = value; - } - else { - let result: number = value; - } - } - - { - let result: boolean; - - result = _.isRegExp(anything); - result = _(1).isRegExp(); - result = _([]).isRegExp(); - result = _({}).isRegExp(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isRegExp(); - result = _([]).chain().isRegExp(); - result = _({}).chain().isRegExp(); - } -} - -// _.isSafeInteger -namespace TestIsSafeInteger { - { - let result: boolean; - - result = _.isSafeInteger(anything); - - result = _(1).isSafeInteger(); - result = _([]).isSafeInteger(); - result = _({}).isSafeInteger(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isSafeInteger(); - result = _([]).chain().isSafeInteger(); - result = _({}).chain().isSafeInteger(); - } -} - -// _.isSet -namespace TestIsSet { - { - let value: number|Set = 0; - - if (_.isSet(value)) { - let result: Set = value; - } - else { - let result: number = value; - } - } - - { - let result: boolean; - - result = _.isSet(anything); - result = _(1).isSet(); - result = _([]).isSet(); - result = _({}).isSet(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isSet(); - result = _([]).chain().isSet(); - result = _({}).chain().isSet(); - } -} - -// _.isString -namespace TestIsString { - { - let value: number|string = ''; - - if (_.isString(value)) { - let result: string = value; - } - else { - let result: number = value; - } - } - - { - let result: boolean; - - result = _.isString(anything); - result = _(1).isString(); - result = _([]).isString(); - result = _({}).isString(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isString(); - result = _([]).chain().isString(); - result = _({}).chain().isString(); - } -} - -// _.isSymbol -namespace TestIsSymbol { - { - let result: boolean; - - result = _.isSymbol(anything); - - result = _(1).isSymbol(); - result = _([]).isSymbol(); - result = _({}).isSymbol(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isSymbol(); - result = _([]).chain().isSymbol(); - result = _({}).chain().isSymbol(); - } -} - -// _.isTypedArray -namespace TestIsTypedArray { - { - let result: boolean; - - result = _.isTypedArray([]); - result = _([]).isTypedArray(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _([]).chain().isTypedArray(); - } -} - -// _.isUndefined -namespace TestIsUndefined { - { - let result: boolean; - - result = _.isUndefined(anything); - - result = _(1).isUndefined(); - result = _([]).isUndefined(); - result = _({}).isUndefined(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isUndefined(); - result = _([]).chain().isUndefined(); - result = _({}).chain().isUndefined(); - } -} - -// _.isWeakMap -namespace TestIsWeakMap { - { - let value: number | WeakMap = 0; - - if (_.isWeakMap(value)) { - let result: WeakMap = value; - } - else { - let result: number = value; - } - } - - { - let result: boolean; - - result = _.isWeakMap(anything); - result = _(1).isWeakMap(); - result = _([]).isWeakMap(); - result = _({}).isWeakMap(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isWeakMap(); - result = _([]).chain().isWeakMap(); - result = _({}).chain().isWeakMap(); - } -} - -// _.isWeakSet -namespace TestIsWeakSet { - { - let value: number | WeakSet = 0; - - if (_.isWeakSet(value)) { - let result: WeakSet = value; - } - else { - let result: number = value; - } - } - - { - let result: boolean; - - result = _.isWeakSet(anything); - result = _(1).isWeakSet(); - result = _([]).isWeakSet(); - result = _({}).isWeakSet(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().isWeakSet(); - result = _([]).chain().isWeakSet(); - result = _({}).chain().isWeakSet(); - } -} - -// _.lt -namespace TestLt { - { - let result: boolean; - - result = _.lt(anything, anything); - result = _(1).lt(anything); - result = _([]).lt(anything); - result = _({}).lt(anything); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().lt(anything); - result = _([]).chain().lt(anything); - result = _({}).chain().lt(anything); - } -} - -// _.lte -namespace TestLte { - { - let result: boolean; - - result = _.lte(anything, anything); - result = _(1).lte(anything); - result = _([]).lte(anything); - result = _({}).lte(anything); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().lte(anything); - result = _([]).chain().lte(anything); - result = _({}).chain().lte(anything); - } -} - -// _.toArray -namespace TestToArray { - let array: AbcObject[] = []; - let list: _.List = []; - let dictionary: _.Dictionary = {}; - let numericDictionary: _.NumericDictionary = {}; - - { - let result: string[]; - - result = _.toArray(''); - result = _.toArray(''); - } - - { - let result: AbcObject[]; - - result = _.toArray(array); - result = _.toArray(list); - result = _.toArray(dictionary); - result = _.toArray(numericDictionary); - - result = _.toArray(array); - result = _.toArray(list); - result = _.toArray(dictionary); - result = _.toArray(numericDictionary); - } - - { - let result: any[]; - - result = _.toArray(); - result = _.toArray(42); - result = _.toArray(true); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(array).toArray(); - result = _(list).toArray(); - result = _(dictionary).toArray(); - result = _(numericDictionary).toArray(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(array).chain().toArray(); - result = _(list).chain().toArray(); - result = _(dictionary).chain().toArray(); - result = _(numericDictionary).chain().toArray(); - } -} - -// _.toPlainObject -namespace TestToPlainObject { - { - let result: AbcObject; - result = _.toPlainObject(); - result = _.toPlainObject(true); - result = _.toPlainObject(1); - result = _.toPlainObject('a'); - result = _.toPlainObject([]); - result = _.toPlainObject({}); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(true).toPlainObject(); - result = _(1).toPlainObject(); - result = _('a').toPlainObject(); - result = _([1]).toPlainObject(); - result = _(['']).toPlainObject(); - result = _({}).toPlainObject(); - } -} - -// _.toFinite -namespace TestToFinite { - { - let result: number; - result = _.toFinite(true); - result = _.toFinite(1); - result = _.toFinite('3.2'); - result = _.toFinite([]); - result = _.toFinite({}); - } - - { - let result: number; - - result = _(true).toFinite(); - result = _(1).toFinite(); - result = _('3.2').toFinite(); - result = _([1]).toFinite(); - result = _([]).toFinite(); - result = _({}).toFinite(); - } -} - -// _.toInteger -namespace TestToInteger { - { - let result: number; - result = _.toInteger(true); - result = _.toInteger(1); - result = _.toInteger('3.2'); - result = _.toInteger([]); - result = _.toInteger({}); - } - - { - let result: number; - - result = _(true).toInteger(); - result = _(1).toInteger(); - result = _('a').toInteger(); - result = _([1]).toInteger(); - result = _(['']).toInteger(); - result = _({}).toInteger(); - } -} - -// _.toLength -namespace TestToLength { - { - let result: number; - result = _.toLength(true); - result = _.toLength(1); - result = _.toLength('a'); - result = _.toLength([]); - result = _.toLength({}); - } - - { - let result: number; - - result = _(true).toLength(); - result = _(1).toLength(); - result = _('a').toLength(); - result = _([1]).toLength(); - result = _(['']).toLength(); - result = _({}).toLength(); - } -} - -// _.toNumber -namespace TestToNumber { - { - let result: number; - result = _.toNumber(true); - result = _.toNumber(1); - result = _.toNumber('a'); - result = _.toNumber([]); - result = _.toNumber({}); - } - - { - let result: number; - - result = _(true).toNumber(); - result = _(1).toNumber(); - result = _('a').toNumber(); - result = _([1]).toNumber(); - result = _(['']).toNumber(); - result = _({}).toNumber(); - } -} - -// _.toSafeInteger -namespace TestToSafeInteger { - { - let result: number; - result = _.toSafeInteger(true); - result = _.toSafeInteger(1); - result = _.toSafeInteger('a'); - result = _.toSafeInteger([]); - result = _.toSafeInteger({}); - } - - { - let result: number; - - result = _(true).toSafeInteger(); - result = _(1).toSafeInteger(); - result = _('a').toSafeInteger(); - result = _([1]).toSafeInteger(); - result = _(['']).toSafeInteger(); - result = _({}).toSafeInteger(); - } -} - -/******** - * Math * - ********/ - -// _.add -namespace TestAdd { - { - let result: number; - - result = _.add(1, 1); - result = _(1).add(1); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().add(1); - } -} - -// _.ceil -namespace TestCeil { - { - let result: number; - - result = _.ceil(6.004); - result = _.ceil(6.004, 2); - - result = _(6.004).ceil(); - result = _(6.004).ceil(2); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(6.004).chain().ceil(); - result = _(6.004).chain().ceil(2); - } -} - -// _.divide -namespace TestDivide { - { - let result: number; - - result = _.divide(6, 4); - - result = _(6).divide(4); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(6).chain().floor(4); - } -} - -// _.floor -namespace TestFloor { - { - let result: number; - - result = _.floor(4.006); - result = _.floor(0.046, 2); - result = _.floor(4060, -2); - - result = _(4.006).floor(); - result = _(0.046).floor(2); - result = _(4060).floor(-2); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(4.006).chain().floor(); - result = _(0.046).chain().floor(2); - result = _(4060).chain().floor(-2); - } -} - -// _.max -namespace TestMax { - let array: number[] = []; - let list: _.List = []; - - let result: number | undefined; - - result = _.max(array); - result = _.max(list); - - result = _(array).max(); - result = _(list).max(); -} - -// _.maxBy -namespace TestMaxBy { - let array: number[] = []; - let list: _.List = []; - let array2: AbcObject[] = []; - let list2: _.List = []; - - let listIterator = (value: number, index: number, collection: _.List) => 0; - - let result: number | undefined; - let result2: AbcObject | undefined; - - result = _.maxBy(array); - result = _.maxBy(array, listIterator); - result = _.maxBy(array, ''); - result2 = _.maxBy(array2, {a: 42}); - - result = _.maxBy(list); - result = _.maxBy(list, listIterator); - result = _.maxBy(list, ''); - result2 = _.maxBy(list2, {a: 42}); - - result = _(array).maxBy(); - result = _(array).maxBy(listIterator); - result = _(array).maxBy(''); - result2 = _(array2).maxBy({a: 42}); - - result = _(list).maxBy(); - result = _(list).maxBy(listIterator); - result = _(list).maxBy(''); - result2 = _(list2).maxBy({a: 42}); -} - -// _.mean -namespace TestMean { - let array: number[] = []; - - let result: number; - - result = _.mean(array); - - result = _(array).mean(); -} - -// _.meanBy -{ - let array: AbcObject[] = []; - - let result: number; - - result = _.meanBy(array, (x) => x.a); - result = _.meanBy(array, 'a'); - - result = _(array).mean(); -} - -// _.min -namespace TestMin { - let array: number[] = []; - let list: _.List = []; - - let result: number | undefined; - - result = _.min(array); - result = _.min(list); - - result = _(array).min(); - result = _(list).min(); -} - -// _.minBy -namespace TestMinBy { - let array: number[] = []; - let list: _.List = []; - let array2: AbcObject[] = []; - let list2: _.List = []; - - let listIterator = (value: number, index: number, collection: _.List) => 0; - - let result: number | undefined; - let result2: AbcObject | undefined; - - result = _.minBy(array); - result = _.minBy(array, listIterator); - result = _.minBy(array, ''); - result2 = _.minBy(array2, {a: 42}); - - result = _.minBy(list); - result = _.minBy(list, listIterator); - result = _.minBy(list, ''); - result2 = _.minBy(list2, {a: 42}); - - result = _(array).minBy(); - result = _(array).minBy(listIterator); - result = _(array).minBy(''); - result2 = _(array2).minBy({a: 42}); - - result = _(list).minBy(); - result = _(list).minBy(listIterator); - result = _(list).minBy(''); - result2 = _(list2).minBy({a: 42}); -} - -// _.multiply -namespace TestMultiply { - { - let result: number; - - result = _.multiply(6, 4); - - result = _(6).multiply(4); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(6).chain().multiply(4); - } -} - -// _.round -namespace TestRound { - { - let result: number; - - result = _.round(4.006); - result = _.round(4.006, 2); - - result = _(4.006).round(); - result = _(4.006).round(2); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(4.006).chain().round(); - result = _(4.006).chain().round(2); - } -} - -// _.sum -namespace TestSum { - let array: number[] | null | undefined = [] as any; - let list: _.List | null | undefined = [] as any; - let obj: any = {}; - let dictionary: _.Dictionary | null | undefined = obj; - - let listIterator = (value: number, index: number, collection: _.List) => 0; - let dictionaryIterator = (value: number, key: string, collection: _.Dictionary) => 0; - - { - let result: number; - - result = _.sum(array); - - result = _.sum(list); - - result = _(array).sum(); - - result = _(list).sum(); - - result = _(dictionary).sum(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(array).chain().sum(); - - result = _(list).chain().sum(); - - result = _(dictionary).chain().sum(); - } -} - -// _.sumBy -namespace TestSumBy { - let array: number[] | null | undefined = [] as any; - let objectArray: Array<{ 'age': number }> | null | undefined = [] as any; - - let list: _.List | null | undefined = [] as any; - let objectList: _.List<{ 'age': number }> | null | undefined = [] as any; - - let listIterator = (value: number) => 0; - - { - let result: number; - - result = _.sumBy(array); - result = _.sumBy(array, listIterator); - result = _.sumBy(objectArray, 'age'); - - result = _.sumBy(list); - result = _.sumBy(list, listIterator); - result = _.sumBy(objectList, 'age'); - - result = _(array).sumBy(listIterator); - result = _(objectArray).sumBy('age'); - - result = _(list).sumBy(listIterator); - result = _(objectList).sumBy('age'); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(array).chain().sumBy(listIterator); - result = _(objectArray).chain().sumBy('age'); - - result = _(list).chain().sumBy(listIterator); - result = _(objectList).chain().sumBy('age'); - } -} - -/********** - * Number * - **********/ - - // _.subtract - namespace subtract { - { - let result: number; - - result = _.subtract(3, 2); - - result = _(3).subtract(2); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(3).chain().subtract(2); - } - } - -// _.clamp -namespace TestInClamp { - { - let result: number; - - result = _.clamp(3, 2, 4); - result = _.clamp(3, 4); - - result = _(3).clamp(2, 4); - result = _(3).clamp(4); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(3).chain().clamp(2, 4); - } -} - -// _.inRange -namespace TestInRange { - { - let result: boolean; - - result = _.inRange(3, 2, 4); - result = _.inRange(4, 8); - - result = _(3).inRange(2, 4); - result = _(4).inRange(8); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(3).chain().inRange(2, 4); - result = _(4).chain().inRange(8); - } -} - -// _.random -namespace TestRandom { - { - let result: number; - - result = _.random(); - result = _.random(1); - result = _.random(1, 2); - result = _.random(1, 2, true); - result = _.random(1, true); - result = _.random(true); - - result = _(1).random(); - result = _(1).random(2); - result = _(1).random(2, true); - result = _(1).random(true); - result = _(true).random(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(1).chain().random(); - result = _(1).chain().random(2); - result = _(1).chain().random(2, true); - result = _(1).chain().random(true); - result = _(true).chain().random(); - } - - // $ExpectType number[] - _.map([5, 5], _.random); -} - -/********** - * Object * - **********/ - -// _.assign -namespace TestAssign { - interface Obj { a: string }; - interface S1 { a: number }; - interface S2 { b: number }; - interface S3 { c: number }; - interface S4 { d: number }; - interface S5 { e: number }; - - let obj: Obj = { a: "" }; - let s1: S1 = { a: 1 }; - let s2: S2 = { b: 1 }; - let s3: S3 = { c: 1 }; - let s4: S4 = { d: 1 }; - let s5: S5 = { e: 1 }; - - { - let result: Obj; - - result = _.assign(obj); - } - - { - let result: { a: number }; - - result = _.assign(obj, s1); - } - - { - let result: { a: number, b: number }; - - result = _.assign(obj, s1, s2); - } - - { - let result: { a: number, b: number, c: number }; - - result = _.assign(obj, s1, s2, s3); - } - - { - let result: { a: number, b: number, c: number, d: number }; - - result = _.assign(obj, s1, s2, s3, s4); - } - - { - let result: { a: number, b: number, c: number, d: number, e: number }; - - result = _.assign(obj, s1, s2, s3, s4, s5); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(obj).assign(); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string }>; - - result = _(obj).assign(s1); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string, b: number }>; - - result = _(obj).assign(s1, s2); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string, b: number, c: number }>; - - result = _(obj).assign(s1, s2, s3); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string, b: number, c: number, d: number }>; - - result = _(obj).assign(s1, s2, s3, s4); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - - result = _(obj).assign(s1, s2, s3, s4, s5); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(obj).chain().assign(); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string }>; - - result = _(obj).chain().assign(s1); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string, b: number }>; - - result = _(obj).chain().assign(s1, s2); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string, b: number, c: number }>; - - result = _(obj).chain().assign(s1, s2, s3); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string, b: number, c: number, d: number }>; - - result = _(obj).chain().assign(s1, s2, s3, s4); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - - result = _(obj).chain().assign(s1, s2, s3, s4, s5); - } -} - -// _.assignWith -namespace TestAssignWith { - interface Obj { a: string }; - interface S1 { a: number }; - interface S2 { b: number }; - interface S3 { c: number }; - interface S4 { d: number }; - interface S5 { e: number }; - - let obj: Obj = { a: "" }; - let s1: S1 = { a: 1 }; - let s2: S2 = { b: 1 }; - let s3: S3 = { c: 1 }; - let s4: S4 = { d: 1 }; - let s5: S5 = { e: 1 }; - - let customizer: (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => any = (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => 1; - - { - let result: Obj; - - result = _.assignWith(obj); - } - - { - let result: { a: number }; - result = _.assignWith(obj, s1, customizer); - } - - { - let result: { a: number, b: number }; - result = _.assignWith(obj, s1, s2, customizer); - } - - { - let result: { a: number, b: number, c: number }; - result = _.assignWith(obj, s1, s2, s3, customizer); - } - - { - let result: { a: number, b: number, c: number, d: number }; - result = _.assignWith(obj, s1, s2, s3, s4, customizer); - } - - { - let result: { a: number, b: number, c: number, d: number, e: number }; - result = _.assignWith<{ a: number, b: number, c: number, d: number, e: number }>(obj, s1, s2, s3, s4, s5, customizer); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(obj).assignWith(); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string }>; - result = _(obj).assignWith(s1, customizer); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string, b: number }>; - result = _(obj).assignWith(s1, s2, customizer); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string, b: number, c: number }>; - result = _(obj).assignWith(s1, s2, s3, customizer); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string, b: number, c: number, d: number }>; - result = _(obj).assignWith(s1, s2, s3, s4, customizer); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - result = _(obj).assignWith<{ a: number, b: number, c: number, d: number, e: number }>(s1, s2, s3, s4, s5, customizer); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(obj).chain().assignWith(); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string }>; - result = _(obj).chain().assignWith(s1, customizer); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string, b: number }>; - result = _(obj).chain().assignWith(s1, s2, customizer); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string, b: number, c: number }>; - result = _(obj).chain().assignWith(s1, s2, s3, customizer); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string, b: number, c: number, d: number }>; - result = _(obj).chain().assignWith(s1, s2, s3, s4, customizer); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - result = _(obj).chain().assignWith(s1, s2, s3, s4, s5, customizer); - } -} - -// _.assignIn -namespace TestAssignIn { - interface Obj { a: string }; - interface S1 { a: number }; - interface S2 { b: number }; - interface S3 { c: number }; - interface S4 { d: number }; - interface S5 { e: number }; - - let obj: Obj = { a: "" }; - let s1: S1 = { a: 1 }; - let s2: S2 = { b: 1 }; - let s3: S3 = { c: 1 }; - let s4: S4 = { d: 1 }; - let s5: S5 = { e: 1 }; - - let customizer: (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => any = (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => 1; - - { - let result: Obj; - - result = _.assignIn(obj); - } - - { - let result: { a: number }; - - result = _.assignIn(obj, s1); - } - - { - let result: { a: number, b: number }; - - result = _.assignIn(obj, s1, s2); - } - - { - let result: { a: number, b: number, c: number }; - - result = _.assignIn(obj, s1, s2, s3); - } - - { - let result: { a: number, b: number, c: number, d: number }; - - result = _.assignIn(obj, s1, s2, s3, s4); - } - - { - let result: { a: number, b: number, c: number, d: number, e: number }; - - result = _.assignIn<{ a: number, b: number, c: number, d: number, e: number }>(obj, s1, s2, s3, s4, s5); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(obj).assignIn(); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string }>; - - result = _(obj).assignIn(s1); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string, b: number }>; - - result = _(obj).assignIn(s1, s2); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string, b: number, c: number }>; - - result = _(obj).assignIn(s1, s2, s3); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string, b: number, c: number, d: number }>; - - result = _(obj).assignIn(s1, s2, s3, s4); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - - result = _(obj).assignIn<{ a: number, b: number, c: number, d: number, e: number }>(s1, s2, s3, s4, s5); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(obj).chain().assignIn(); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string }>; - - result = _(obj).chain().assignIn(s1); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string, b: number }>; - - result = _(obj).chain().assignIn(s1, s2); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string, b: number, c: number }>; - - result = _(obj).chain().assignIn(s1, s2, s3); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string, b: number, c: number, d: number }>; - - result = _(obj).chain().assignIn(s1, s2, s3, s4); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - - result = _(obj).chain().assignIn(s1, s2, s3, s4, s5); - } -} - -// _.assignInWith -namespace TestAssignInWith { - interface Obj { a: string }; - interface S1 { a: number }; - interface S2 { b: number }; - interface S3 { c: number }; - interface S4 { d: number }; - interface S5 { e: number }; - - let obj: Obj = { a: "" }; - let s1: S1 = { a: 1 }; - let s2: S2 = { b: 1 }; - let s3: S3 = { c: 1 }; - let s4: S4 = { d: 1 }; - let s5: S5 = { e: 1 }; - - let customizer: (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => any = (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => 1; - - { - let result: Obj; - - result = _.assignInWith(obj); - } - - { - let result: { a: number }; - result = _.assignInWith(obj, s1, customizer); - } - - { - let result: { a: number, b: number }; - result = _.assignInWith(obj, s1, s2, customizer); - } - - { - let result: { a: number, b: number, c: number }; - result = _.assignInWith(obj, s1, s2, s3, customizer); - } - - { - let result: { a: number, b: number, c: number, d: number }; - result = _.assignInWith(obj, s1, s2, s3, s4, customizer); - } - - { - let result: { a: number, b: number, c: number, d: number, e: number }; - result = _.assignInWith<{ a: number, b: number, c: number, d: number, e: number }>(obj, s1, s2, s3, s4, s5, customizer); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(obj).assignInWith(); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string }>; - result = _(obj).assignInWith(s1, customizer); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string, b: number }>; - result = _(obj).assignInWith(s1, s2, customizer); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string, b: number, c: number }>; - result = _(obj).assignInWith(s1, s2, s3, customizer); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string, b: number, c: number, d: number }>; - result = _(obj).assignInWith(s1, s2, s3, s4, customizer); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - result = _(obj).assignInWith<{ a: number, b: number, c: number, d: number, e: number }>(s1, s2, s3, s4, s5, customizer); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(obj).chain().assignInWith(); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string }>; - result = _(obj).chain().assignInWith(s1, customizer); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string, b: number }>; - result = _(obj).chain().assignInWith(s1, s2, customizer); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string, b: number, c: number }>; - result = _(obj).chain().assignInWith(s1, s2, s3, customizer); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string, b: number, c: number, d: number }>; - result = _(obj).chain().assignInWith(s1, s2, s3, s4, customizer); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - result = _(obj).chain().assignInWith(s1, s2, s3, s4, s5, customizer); - } -} - -// _.create -namespace TestCreate { - type SampleProto = {a: number}; - type SampleProps = {b: string}; - - let prototype: SampleProto = { a: 1 }; - let properties: SampleProps = { b: "" }; - - { - let result: {a: number; b: string}; - - result = _.create(prototype, properties); - result = _.create(prototype, properties); - } - - { - let result: _.LoDashImplicitObjectWrapper<{a: number; b: string}>; - - result = _(prototype).create(properties); - result = _(prototype).create(properties); - } - - { - let result: _.LoDashExplicitObjectWrapper<{a: number; b: string}>; - - result = _(prototype).chain().create(properties); - result = _(prototype).chain().create(properties); - } -} - -// _.defaults -namespace TestDefaults { - interface Obj { a: string }; - interface S1 { a: number }; - interface S2 { b: number }; - interface S3 { c: number }; - interface S4 { d: number }; - interface S5 { e: number }; - - let obj: Obj = { a: "" }; - let s1: S1 = { a: 1 }; - let s2: S2 = { b: 1 }; - let s3: S3 = { c: 1 }; - let s4: S4 = { d: 1 }; - let s5: S5 = { e: 1 }; - - { - let result: Obj; - - result = _.defaults(obj); - } - - { - let result: { a: string }; - - result = _.defaults(obj, s1); - } - - { - let result: { a: string, b: number }; - - result = _.defaults(obj, s1, s2); - } - - { - let result: { a: string, b: number, c: number }; - - result = _.defaults(obj, s1, s2, s3); - } - - { - let result: { a: string, b: number, c: number, d: number }; - - result = _.defaults(obj, s1, s2, s3, s4); - } - - { - let result: { a: string, b: number, c: number, d: number, e: number }; - - result = _.defaults(obj, s1, s2, s3, s4, s5); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(obj).defaults(); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: string & number }>; - - result = _(obj).defaults(s1); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: string & number, b: number }>; - - result = _(obj).defaults(s1, s2); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: string & number, b: number, c: number }>; - - result = _(obj).defaults(s1, s2, s3); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: string & number, b: number, c: number, d: number }>; - - result = _(obj).defaults(s1, s2, s3, s4); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: string, b: number, c: number, d: number, e: number }>; - - result = _(obj).defaults(s1, s2, s3, s4, s5); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(obj).chain().defaults(); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: string & number }>; - - result = _(obj).chain().defaults(s1); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: string & number, b: number }>; - - result = _(obj).chain().defaults(s1, s2); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: string & number, b: number, c: number }>; - - result = _(obj).chain().defaults(s1, s2, s3); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: string & number, b: number, c: number, d: number }>; - - result = _(obj).chain().defaults(s1, s2, s3, s4); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: string, b: number, c: number, d: number, e: number }>; - - result = _(obj).chain().defaults(s1, s2, s3, s4, s5); - } -} - -//_.defaultsDeep -interface DefaultsDeepResult { - user: { - name: string; - age: number; - } -} -const TestDefaultsDeepObject = { 'user': { 'name': 'barney' } }; -const TestDefaultsDeepSource = { 'user': { 'name': 'fred', 'age': 36 } }; -result = _.defaultsDeep(TestDefaultsDeepObject, TestDefaultsDeepSource); -result = _(TestDefaultsDeepObject).defaultsDeep(TestDefaultsDeepSource).value(); - -// _.entries -namespace TestEntries { - let object: _.Dictionary = {}; - - { - let result: Array<[string, string]>; - - result = _.entries(object); - } - - { - let result: _.LoDashImplicitArrayWrapper<[string, string]>; - - result = _(object).entries(); - } - - { - let result: _.LoDashExplicitArrayWrapper<[string, string]>; - - result = _(object).chain().entries(); - } -} - -// _.entriesIn -namespace TestEntriesIn { - let object: _.Dictionary = {}; - - { - let result: Array<[string, string]>; - - result = _.entriesIn(object); - } - - { - let result: _.LoDashImplicitArrayWrapper<[string, string]>; - - result = _(object).entriesIn(); - } - - { - let result: _.LoDashExplicitArrayWrapper<[string, string]>; - - result = _(object).chain().entriesIn(); - } - - { - let result: _.LoDashExplicitArrayWrapper<[string, any]>; - - result = _(object).chain().entriesIn(); - } -} - -// _.extend -namespace TestExtend { - type Obj = { a: string }; - type S1 = { a: number }; - type S2 = { b: number }; - type S3 = { c: number }; - type S4 = { d: number }; - type S5 = { e: number }; - - let obj: Obj = { a: "" }; - let s1: S1 = { a: 1 }; - let s2: S2 = { b: 1 }; - let s3: S3 = { c: 1 }; - let s4: S4 = { d: 1 }; - let s5: S5 = { e: 1 }; - - let customizer: (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => any = (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => 1; - - { - let result: Obj; - - result = _.extend(obj); - } - - { - let result: { a: number }; - - result = _.extend(obj, s1); - } - - { - let result: { a: number, b: number }; - - result = _.extend(obj, s1, s2); - } - - { - let result: { a: number, b: number, c: number }; - - result = _.extend(obj, s1, s2, s3); - } - - { - let result: { a: number, b: number, c: number, d: number }; - - result = _.extend(obj, s1, s2, s3, s4); - } - - { - let result: { a: number, b: number, c: number, d: number, e: number }; - - result = _.extend<{ a: number, b: number, c: number, d: number, e: number }>(obj, s1, s2, s3, s4, s5); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(obj).extend(); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string }>; - - result = _(obj).extend(s1); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string, b: number }>; - - result = _(obj).extend(s1, s2); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string, b: number, c: number }>; - - result = _(obj).extend(s1, s2, s3); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string, b: number, c: number, d: number }>; - - result = _(obj).extend(s1, s2, s3, s4); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - - result = _(obj).extend(s1, s2, s3, s4, s5); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(obj).chain().extend(); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string }>; - - result = _(obj).chain().extend(s1); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string, b: number }>; - - result = _(obj).chain().extend(s1, s2); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string, b: number, c: number }>; - - result = _(obj).chain().extend(s1, s2, s3); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string, b: number, c: number, d: number }>; - - result = _(obj).chain().extend(s1, s2, s3, s4); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - - result = _(obj).chain().extend(s1, s2, s3, s4, s5); - } -} - -// _.extendWith -namespace TestExtendWith { - type Obj = { a: string }; - type S1 = { a: number }; - type S2 = { b: number }; - type S3 = { c: number }; - type S4 = { d: number }; - type S5 = { e: number }; - - let obj: Obj = { a: "" }; - let s1: S1 = { a: 1 }; - let s2: S2 = { b: 1 }; - let s3: S3 = { c: 1 }; - let s4: S4 = { d: 1 }; - let s5: S5 = { e: 1 }; - - let customizer: (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => any = (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => 1; - - { - let result: Obj; - - result = _.extendWith(obj); - } - - { - let result: { a: number }; - - result = _.extendWith(obj, s1, customizer); - } - - { - let result: { a: number, b: number }; - - result = _.extendWith(obj, s1, s2, customizer); - } - - { - let result: { a: number, b: number, c: number }; - - result = _.extendWith(obj, s1, s2, s3, customizer); - } - - { - let result: { a: number, b: number, c: number, d: number }; - - result = _.extendWith(obj, s1, s2, s3, s4, customizer); - } - - { - let result: { a: number, b: number, c: number, d: number, e: number }; - - result = _.extendWith<{ a: number, b: number, c: number, d: number, e: number }>(obj, s1, s2, s3, s4, s5, customizer); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(obj).extendWith(); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string }>; - - result = _(obj).extendWith(s1, customizer); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string, b: number }>; - - result = _(obj).extendWith(s1, s2, customizer); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string, b: number, c: number }>; - - result = _(obj).extendWith(s1, s2, s3, customizer); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number & string, b: number, c: number, d: number }>; - - result = _(obj).extendWith(s1, s2, s3, s4, customizer); - } - - { - let result: _.LoDashImplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - - result = _(obj).extendWith(s1, s2, s3, s4, s5, customizer); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(obj).chain().extendWith(); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string }>; - - result = _(obj).chain().extendWith(s1, customizer); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string, b: number }>; - - result = _(obj).chain().extendWith(s1, s2, customizer); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string, b: number, c: number }>; - - result = _(obj).chain().extendWith(s1, s2, s3, customizer); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number & string, b: number, c: number, d: number }>; - - result = _(obj).chain().extendWith(s1, s2, s3, s4, customizer); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: number, b: number, c: number, d: number, e: number }>; - - result = _(obj).chain().extendWith(s1, s2, s3, s4, s5, customizer); - } -} - -// _.findKey -namespace TestFindKey { - { - let a: keyof undefined; - let predicateFn = (value: any, key: string, object: {}) => true; - let result: string | undefined; - - result = _.findKey<{a: string;}>({a: ''}); - - result = _.findKey<{a: string;}>({a: ''}, predicateFn); - - result = _.findKey<{a: string;}>({a: ''}, ''); - - result = _.findKey({a: { b: 5 }}, {b: 42}); - - result = _.findKey({a: { b: 5 }}, ['b', 5]); - - result = _<{a: string;}>({a: ''}).findKey(); - - result = _<{a: string;}>({a: ''}).findKey(predicateFn); - - result = _<{a: string;}>({a: ''}).findKey(''); - - result = _({a: { b: 5 }}).findKey({b: 42}); - } - - { - let predicateFn = (value: string, key: string, collection: _.Dictionary) => true; - let result: string | undefined; - - result = _.findKey({a: ''}, predicateFn); - - result = _({a: ''}).findKey(predicateFn); - } - - { - let predicateFn = (value: any, key: string, object: {}) => true; - let result: _.LoDashExplicitWrapper; - - result = _<{a: string;}>({a: ''}).chain().findKey(); - - result = _<{a: string;}>({a: ''}).chain().findKey(predicateFn); - - result = _<{a: string;}>({a: ''}).chain().findKey(''); - - result = _({a: { b: 5 }}).chain().findKey({b: 42}); - } - - { - let predicateFn = (value: string, key: string, collection: _.Dictionary) => true; - let result: _.LoDashExplicitWrapper; - - result = _({a: ''}).chain().findKey(predicateFn); - } -} - -// _.findLastKey -namespace TestFindLastKey { - { - let predicateFn = (value: any, key: string, object: {}) => true; - let result: string | undefined; - - result = _.findLastKey<{a: string;}>({a: ''}); - - result = _.findLastKey<{a: string;}>({a: ''}, predicateFn); - - result = _.findLastKey<{a: string;}>({a: ''}, ''); - - result = _.findLastKey({a: { b: 5 }}, {b: 42}); - - result = _.findLastKey({a: { b: 5 }}, ['b', 5]); - - result = _<{a: string;}>({a: ''}).findLastKey(); - - result = _<{a: string;}>({a: ''}).findLastKey(predicateFn); - - result = _<{a: string;}>({a: ''}).findLastKey(''); - - result = _({a: { b: 5 }}).findLastKey({b: 42}); - } - - { - let predicateFn = (value: string, key: string, collection: _.Dictionary) => true; - let result: string | undefined; - - result = _.findLastKey({a: ''}, predicateFn); - - result = _({a: ''}).findLastKey(predicateFn); - } - - { - let predicateFn = (value: any, key: string, object: {}) => true; - let result: _.LoDashExplicitWrapper; - - result = _<{a: string;}>({a: ''}).chain().findLastKey(); - - result = _<{a: string;}>({a: ''}).chain().findLastKey(predicateFn); - - result = _<{a: string;}>({a: ''}).chain().findLastKey(''); - - result = _({a: { b: 5 }}).chain().findLastKey({b: 42}); - } - - { - let predicateFn = (value: string, key: string, collection: _.Dictionary) => true; - let result: _.LoDashExplicitWrapper; - - result = _({a: ''}).chain().findLastKey(predicateFn); - } -} - -// _.forIn -namespace TestForIn { - type SampleObject = {a: number; b: string; c: boolean;}; - - let dictionary: _.Dictionary = {}; - let nilDictionary: _.Dictionary | null | undefined = anything; - let dictionaryIterator: (value: number, key: string, collection: _.Dictionary) => any = (value: number, key: string, collection: _.Dictionary) => 1; - - let object: SampleObject = { a: 1, b: "", c: true }; - let nilObject: SampleObject | null | undefined = anything; - let objectIterator: (element: any, key?: string, collection?: any) => any = (element: any, key?: string, collection?: any) => 1; - - { - let result: _.Dictionary; - - result = _.forIn(dictionary); - result = _.forIn(dictionary, dictionaryIterator); - } - - { - let result: _.Dictionary | null | undefined; - - result = _.forIn(nilDictionary); - result = _.forIn(nilDictionary, dictionaryIterator); - } - - { - let result: SampleObject; - - result = _.forIn(object); - result = _.forIn(object, objectIterator); - } - - { - let result: SampleObject | null | undefined; - - result = _.forIn(nilObject); - result = _.forIn(nilObject, objectIterator); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _(dictionary).forIn(); - result = _(dictionary).forIn(dictionaryIterator); - } - - { - let result: _.LoDashImplicitNillableObjectWrapper<_.Dictionary>; - - result = _(nilDictionary).forIn(); - result = _(nilDictionary).forIn(dictionaryIterator); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _(dictionary).chain().forIn(); - result = _(dictionary).chain().forIn(dictionaryIterator); - } - - { - let result: _.LoDashExplicitNillableObjectWrapper<_.Dictionary>; - - result = _(nilDictionary).chain().forIn(); - result = _(nilDictionary).chain().forIn(dictionaryIterator); - } -} - -// _.forInRight -namespace TestForInRight { - type SampleObject = {a: number; b: string; c: boolean;}; - - let dictionary: _.Dictionary = {}; - let nilDictionary: _.Dictionary | null | undefined = anything; - let dictionaryIterator: (value: number, key: string, collection: _.Dictionary) => any = (value: number, key: string, collection: _.Dictionary) => 1; - - let object: SampleObject = { a: 1, b: "", c: true }; - let nilObject: SampleObject | null | undefined = anything; - let objectIterator: (element: any, key?: string, collection?: any) => any = (element: any, key?: string, collection?: any) => 1; - - { - let result: _.Dictionary; - - result = _.forInRight(dictionary); - result = _.forInRight(dictionary, dictionaryIterator); - } - - { - let result: _.Dictionary | null | undefined; - - result = _.forInRight(nilDictionary); - result = _.forInRight(nilDictionary, dictionaryIterator); - } - - { - let result: SampleObject; - - result = _.forInRight(object); - result = _.forInRight(object, objectIterator); - } - - { - let result: SampleObject | null | undefined; - - result = _.forInRight(nilObject); - result = _.forInRight(nilObject, objectIterator); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _(dictionary).forInRight(); - result = _(dictionary).forInRight(dictionaryIterator); - } - - { - let result: _.LoDashImplicitNillableObjectWrapper<_.Dictionary>; - - result = _(nilDictionary).forInRight(); - result = _(nilDictionary).forInRight(dictionaryIterator); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _(dictionary).chain().forInRight(); - result = _(dictionary).chain().forInRight(dictionaryIterator); - } - - { - let result: _.LoDashExplicitNillableObjectWrapper<_.Dictionary>; - - result = _(nilDictionary).chain().forInRight(); - result = _(nilDictionary).chain().forInRight(dictionaryIterator); - } -} - -// _.forOwn -namespace TestForOwn { - type SampleObject = {a: number; b: string; c: boolean;}; - - let dictionary: _.Dictionary = {}; - let nilDictionary: _.Dictionary | null | undefined = anything; - let dictionaryIterator: (value: number, key: string, collection: _.Dictionary) => any = (value: number, key: string, collection: _.Dictionary) => 1; - - let object: SampleObject = { a: 1, b: "", c: true }; - let nilObject: SampleObject | null | undefined = anything; - let objectIterator: (element: any, key?: string, collection?: any) => any = (element: any, key?: string, collection?: any) => 1; - - { - let result: _.Dictionary; - - result = _.forOwn(dictionary); - result = _.forOwn(dictionary, dictionaryIterator); - } - - { - let result: _.Dictionary | null | undefined; - - result = _.forOwn(nilDictionary); - result = _.forOwn(nilDictionary, dictionaryIterator); - } - - { - let result: SampleObject; - - result = _.forOwn(object); - result = _.forOwn(object, objectIterator); - } - - { - let result: SampleObject | null | undefined; - - result = _.forOwn(nilObject); - result = _.forOwn(nilObject, objectIterator); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _(dictionary).forOwn(); - result = _(dictionary).forOwn(dictionaryIterator); - } - - { - let result: _.LoDashImplicitNillableObjectWrapper<_.Dictionary>; - - result = _(nilDictionary).forOwn(); - result = _(nilDictionary).forOwn(dictionaryIterator); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _(dictionary).chain().forOwn(); - result = _(dictionary).chain().forOwn(dictionaryIterator); - } - - { - let result: _.LoDashExplicitNillableObjectWrapper<_.Dictionary>; - - result = _(nilDictionary).chain().forOwn(); - result = _(nilDictionary).chain().forOwn(dictionaryIterator); - } -} - -// _.forOwnRight -namespace TestForOwnRight { - type SampleObject = {a: number; b: string; c: boolean;}; - - let dictionary: _.Dictionary = {}; - let nilDictionary: _.Dictionary | null | undefined = anything; - let dictionaryIterator: (value: number, key: string, collection: _.Dictionary) => any = (value: number, key: string, collection: _.Dictionary) => 1; - - let object: SampleObject = { a: 1, b: "", c: true }; - let nilObject: SampleObject | null | undefined = anything; - let objectIterator: (element: any, key?: string, collection?: any) => any = (element: any, key?: string, collection?: any) => 1; - - { - let result: _.Dictionary; - - result = _.forOwnRight(dictionary); - result = _.forOwnRight(dictionary, dictionaryIterator); - } - - { - let result: _.Dictionary | null | undefined; - - result = _.forOwnRight(nilDictionary); - result = _.forOwnRight(nilDictionary, dictionaryIterator); - } - - { - let result: SampleObject; - - result = _.forOwnRight(object); - result = _.forOwnRight(object, objectIterator); - } - - { - let result: SampleObject | null | undefined; - - result = _.forOwnRight(nilObject); - result = _.forOwnRight(nilObject, objectIterator); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _(dictionary).forOwnRight(); - result = _(dictionary).forOwnRight(dictionaryIterator); - } - - { - let result: _.LoDashImplicitNillableObjectWrapper<_.Dictionary>; - - result = _(nilDictionary).forOwnRight(); - result = _(nilDictionary).forOwnRight(dictionaryIterator); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _(dictionary).chain().forOwnRight(); - result = _(dictionary).chain().forOwnRight(dictionaryIterator); - } - - { - let result: _.LoDashExplicitNillableObjectWrapper<_.Dictionary>; - - result = _(nilDictionary).chain().forOwnRight(); - result = _(nilDictionary).chain().forOwnRight(dictionaryIterator); - } -} - -// _.functions -namespace TestFunctions { - type SampleObject = {a: number; b: string; c: boolean;}; - - let object: SampleObject = { a: 1, b: "", c: true }; - - { - let result: string[]; - - result = _.functions(object); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(object).functions(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(object).chain().functions(); - } -} - -// _.functionsIn -namespace TestFunctionsIn { - type SampleObject = {a: number; b: string; c: boolean;}; - - let object: SampleObject = { a: 1, b: "", c: true }; - - { - let result: string[]; - - result = _.functionsIn(object); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(object).functionsIn(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(object).chain().functionsIn(); - } -} - -// _.get -namespace TestGet { - _.get([], Symbol.iterator); - _.get([], [Symbol.iterator]); - - _.get('abc', 1); // $ExpectType string - _('abc').get(1); // $ExpectType string - _.chain('abc').get(1); // $ExpectType LoDashExplicitWrapper - - _.get({ a: { b: true } }, "a"); // $ExpectType { b: boolean; } - _({ a: { b: true } }).get("a"); // $ExpectType { b: boolean; } - _.chain({ a: { b: true } }).get("a"); // $ExpectType LoDashExplicitWrapper<{ b: boolean; }> - - _.get({ a: { b: true } }, ["a"]); // $ExpectType { b: boolean; } - _({ a: { b: true } }).get(["a"]); // $ExpectType { b: boolean; } - _.chain({ a: { b: true } }).get(["a"]); // $ExpectType LoDashExplicitWrapper<{ b: boolean; }> - - _.get({ a: { b: true } }, ["a", "b"]); // $ExpectType any - _({ a: { b: true } }).get(["a", "b"]); // $ExpectType any - _.chain({ a: { b: true } }).get(["a", "b"]); // $ExpectType LoDashExplicitWrapper - - { - let result: string; - - result = _.get('abc', '0'); - result = _.get('abc', '0', '_'); - result = _.get('abc', ['0']); - result = _.get('abc', ['0'], '_'); - - result = _.get('abc', '0'); - result = _.get('abc', '0', '_'); - result = _.get('abc', ['0']); - result = _.get('abc', ['0'], '_'); - - result = _('abc').get('0'); - result = _('abc').get('0', '_'); - result = _('abc').get(['0']); - result = _('abc').get(['0'], '_'); - } - - { - let result: number; - - result = _.get([42], '0'); - result = _.get([42], '0', -1); - result = _.get([42], ['0']); - result = _.get([42], ['0'], -1); - - result = _.get([42], '0'); - result = _.get([42], '0', -1); - result = _.get([42], ['0']); - result = _.get([42], ['0'], -1); - - result = _([42]).get('0'); - result = _([42]).get('0', -1); - result = _([42]).get(['0']); - result = _([42]).get(['0'], -1); - } - - { - let result: boolean; - - result = _.get({a: true}, 'a'); - result = _.get({a: true}, 'a', false); - result = _.get({a: true}, ['a']); - result = _.get({a: true}, ['a'], false); - - result = _.get({a: true}, 'a'); - result = _.get({a: true}, 'a', false); - result = _.get({a: true}, ['a']); - result = _.get({a: true}, ['a'], false); - - result = _({a: true}).get('a'); - result = _({a: true}).get('a', false); - result = _({a: true}).get(['a']); - result = _({a: true}).get(['a'], false); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('abc').chain().get('0'); - result = _('abc').chain().get('0', '_'); - result = _('abc').chain().get(['0']); - result = _('abc').chain().get(['0'], '_'); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _([42]).chain().get('0'); - result = _([42]).chain().get('0', -1); - result = _([42]).chain().get(['0']); - result = _([42]).chain().get(['0'], -1); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _({a: true}).chain().get('a'); - result = _({a: true}).chain().get('a', false); - result = _({a: true}).chain().get(['a']); - result = _({a: true}).chain().get(['a'], false); - } -} - -// _.has -namespace TestHas { - type SampleObject = {a: number; b: string; c: boolean;}; - - let object: SampleObject = { a: 1, b: "", c: true }; - - { - let result: boolean; - - result = _.has(object, ''); - result = _.has(object, 42); - result = _.has(object, ['', 42]); - - result = _(object).has(''); - result = _(object).has(42); - result = _(object).has(['', 42]); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(object).chain().has(''); - result = _(object).chain().has(42); - result = _(object).chain().has(['', 42]); - } -} - -// _.hasIn -namespace TestHasIn { - type SampleObject = {a: number; b: string; c: boolean;}; - - let object: SampleObject = { a: 1, b: "", c: true }; - - { - let result: boolean; - - result = _.hasIn(object, ''); - result = _.hasIn(object, 42); - result = _.hasIn(object, ['', 42]); - - result = _(object).hasIn(''); - result = _(object).hasIn(42); - result = _(object).hasIn(['', 42]); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(object).chain().hasIn(''); - result = _(object).chain().hasIn(42); - result = _(object).chain().hasIn(['', 42]); - } -} - -// _.invert -namespace TestInvert { - { - let result: _.Dictionary; - - result = _.invert({}); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _({}).invert(); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _({}).chain().invert(); - } -} - -// _.invertBy -namespace TestInvertBy { - let array: Array<{a: number;}> = []; - let list: _.List<{a: number;}> = []; - let dictionary: _.Dictionary<{a: number;}> = {}; - let numericDictionary: _.NumericDictionary<{a: number;}> = {}; - - let stringIterator: (value: string) => any = (value: string) => 1; - let arrayIterator: (value: {a: number;}) => any = (value: {a: number;}) => 1; - let listIterator: (value: {a: number;}) => any = (value: {a: number;}) => 1; - let dictionaryIterator: (value: {a: number;}) => any = (value: {a: number;}) => 1; - let numericDictionaryIterator: (value: {a: number;}) => any = (value: {a: number;}) => 1; - - { - let result: _.Dictionary; - - result = _.invertBy('foo'); - result = _.invertBy('foo', stringIterator); - - result = _.invertBy(array); - result = _.invertBy<{a: number;}>(array, 'a'); - result = _.invertBy<{a: number;}>(array, arrayIterator); - result = _.invertBy<{a: number;}>(array, {a: 1}); - - result = _.invertBy(list); - result = _.invertBy<{a: number;}>(list, 'a'); - result = _.invertBy<{a: number;}>(list, listIterator); - result = _.invertBy<{a: number;}>(list, {a: 1}); - - result = _.invertBy(dictionary); - result = _.invertBy<{a: number;}>(dictionary, 'a'); - result = _.invertBy<{a: number;}>(dictionary, dictionaryIterator); - result = _.invertBy<{a: number;}>(dictionary, {a: 1}); - - result = _.invertBy(numericDictionary); - result = _.invertBy<{a: number;}>(numericDictionary, 'a'); - result = _.invertBy<{a: number;}>(numericDictionary, numericDictionaryIterator); - result = _.invertBy<{a: number;}>(numericDictionary, {a: 1}); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _('foo').invertBy(); - result = _('foo').invertBy(stringIterator); - - result = _(array).invertBy(); - result = _(array).invertBy('a'); - result = _(array).invertBy(arrayIterator); - result = _(array).invertBy({a: 1}); - - result = _(list).invertBy(); - result = _(list).invertBy('a'); - result = _(list).invertBy(listIterator); - result = _(list).invertBy<{a: number;}>({a: 1}); - - result = _(dictionary).invertBy(); - result = _(dictionary).invertBy('a'); - result = _(dictionary).invertBy(dictionaryIterator); - result = _(dictionary).invertBy<{a: number;}>({a: 1}); - - result = _(numericDictionary).invertBy(); - result = _(numericDictionary).invertBy('a'); - result = _(numericDictionary).invertBy(numericDictionaryIterator); - result = _(numericDictionary).invertBy<{a: number;}>({a: 1}); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _('foo').chain().invertBy(); - result = _('foo').chain().invertBy(stringIterator); - - result = _(array).chain().invertBy(); - result = _(array).chain().invertBy('a'); - result = _(array).chain().invertBy(arrayIterator); - result = _(array).chain().invertBy({a: 1}); - - result = _(list).chain().invertBy(); - result = _(list).chain().invertBy('a'); - result = _(list).chain().invertBy(listIterator); - result = _(list).chain().invertBy<{a: number;}>({a: 1}); - - result = _(dictionary).chain().invertBy(); - result = _(dictionary).chain().invertBy('a'); - result = _(dictionary).chain().invertBy(dictionaryIterator); - result = _(dictionary).chain().invertBy<{a: number;}>({a: 1}); - - result = _(numericDictionary).chain().invertBy(); - result = _(numericDictionary).chain().invertBy('a'); - result = _(numericDictionary).chain().invertBy(numericDictionaryIterator); - result = _(numericDictionary).chain().invertBy<{a: number;}>({a: 1}); - } -} - -// _.keys -namespace TestKeys { - let object: _.Dictionary | null | undefined = anything; - - { - let result: string[]; - - result = _.keys(object); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(object).keys(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(object).chain().keys(); - } -} - -// _.keysIn -namespace TestKeysIn { - let object: _.Dictionary | null | undefined = anything; - - { - let result: string[]; - - result = _.keysIn(object); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(object).keysIn(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(object).chain().keysIn(); - } -} - -// _.mapKeys -namespace TestMapKeys { - let array: AbcObject[] | null | undefined = [] as any; - let list: _.List| null | undefined = [] as any; - let dictionary: _.Dictionary | null | undefined = anything; - - let listIterator = (value: AbcObject, index: number, collection: _.List) => ""; - let dictionaryIterator = (value: AbcObject, key: string, collection: _.Dictionary) => ""; - - { - let result: _.Dictionary; - - result = _.mapKeys(array); - result = _.mapKeys(array, listIterator); - result = _.mapKeys(array, ''); - result = _.mapKeys(array, {}); - - result = _.mapKeys(list); - result = _.mapKeys(list, listIterator); - result = _.mapKeys(list, ''); - result = _.mapKeys(list, {}); - - result = _.mapKeys(dictionary); - result = _.mapKeys(dictionary, dictionaryIterator); - result = _.mapKeys(dictionary, ''); - result = _.mapKeys(dictionary, {}); - } - - { - let result: _.LoDashImplicitObjectWrapper<_.Dictionary>; - - result = _(array).mapKeys(); - result = _(array).mapKeys(listIterator); - result = _(array).mapKeys(''); - result = _(array).mapKeys({}); - - result = _(list).mapKeys(); - result = _(list).mapKeys(listIterator); - result = _(list).mapKeys(''); - result = _(list).mapKeys({}); - - result = _(dictionary).mapKeys(); - result = _(dictionary).mapKeys(dictionaryIterator); - result = _(dictionary).mapKeys(''); - result = _(dictionary).mapKeys({}); - } - - { - let result: _.LoDashExplicitObjectWrapper<_.Dictionary>; - - result = _(array).chain().mapKeys(); - result = _(array).chain().mapKeys(listIterator); - result = _(array).chain().mapKeys(''); - result = _(array).chain().mapKeys({}); - - result = _(list).chain().mapKeys(); - result = _(list).chain().mapKeys(listIterator); - result = _(list).chain().mapKeys(''); - result = _(list).chain().mapKeys({}); - - result = _(dictionary).chain().mapKeys(); - result = _(dictionary).chain().mapKeys(dictionaryIterator); - result = _(dictionary).chain().mapKeys(''); - result = _(dictionary).chain().mapKeys({}); - } -} - -// _.merge -namespace TestMerge { - type InitialValue = { a : number }; - type MergingValue = { b : string }; - - const initialValue = { a : 1 }; - const mergingValue = { b : "hi" }; - - type ExpectedResult = { a: number, b: string }; - let result: ExpectedResult; - - // Test for basic merging - - result = _.merge(initialValue, mergingValue); - - result = _.merge(initialValue, {}, mergingValue); - - result = _.merge(initialValue, {}, {}, mergingValue); - - result = _.merge(initialValue, {}, {}, {}, mergingValue); - - // Once we get to the varargs version, you have to specify the result explicitly - result = _.merge(initialValue, {}, {}, {}, {}, mergingValue); - - type ComplicatedExpectedType = { a: number, b: string, c: {}, d: number[], e: boolean }; - - let complicatedResult: ComplicatedExpectedType = _.merge({ a: 1 }, - { b: "string" }, - { c: {} }, - { d: [1] }, - { e: true }); - // Test for type overriding - - type ExpectedTypeAfterOverriding = { a: boolean }; - - let overriddenResult: ExpectedTypeAfterOverriding = _.merge({ a: 1 }, - { a: "string" }, - { a: {} }, - { a: [1] }, - { a: true }); - - // Tests for basic chaining with merge - - result = _(initialValue).merge(mergingValue).value(); - - result = _(initialValue).merge({}, mergingValue).value(); - - result = _(initialValue).merge({}, {}, mergingValue).value(); - - result = _(initialValue).merge({}, {}, {}, mergingValue).value(); - - // Once we get to the varargs version, you have to specify the result explicitly - result = _(initialValue).merge({}, {}, {}, {}, mergingValue).value(); - - // Test complex multiple combinations with chaining - - complicatedResult = _({ a: 1 }).merge({ b: "string" }, - { c: {} }, - { d: [1] }, - { e: true }).value(); - - // Test for type overriding with chaining - - overriddenResult = _({ a: 1 }).merge({ a: "string" }, - { a: {} }, - { a: [1] }, - { a: true }).value(); - - { - let result: _.LoDashExplicitObjectWrapper; - // result = _(initialValue).chain().merge(mergingValue); - // result = _(initialValue).chain().merge({}, mergingValue); - // result = _(initialValue).chain().merge({}, {}, mergingValue); - // result = _(initialValue).chain().merge({}, {}, {}, mergingValue); - // result = _(initialValue).chain().merge({}, {}, {}, {}, mergingValue); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - //result = _({ a: 1 }).chain().merge({ b: "string" }, { c: {} }, { d: [1] }, { e: true }); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - //result = _({ a: 1 }).chain().merge({ a: "string" }, { a: {} }, { a: [1] }, { a: true }); - } -} - -// _.mergeWith -namespace TestMergeWith { - type InitialValue = { a : number }; - type MergingValue = { b : string }; - - const initialValue = { a : 1 }; - const mergingValue = { b : "hi" }; - - type ExpectedResult = { a: number, b: string }; - let result: ExpectedResult; - - let customizer: (value: any, srcValue: any, key: string, object: InitialValue, source: MergingValue) => any = (value: any, srcValue: any, key: string, object: InitialValue, source: MergingValue) => 1; - - // Test for basic merging - result = _.mergeWith(initialValue, mergingValue, customizer); - result = _.mergeWith(initialValue, {}, mergingValue, customizer); - result = _.mergeWith(initialValue, {}, {}, mergingValue, customizer); - result = _.mergeWith(initialValue, {}, {}, {}, mergingValue, customizer); - - // Once we get to the varargs version, you have to specify the result explicitl - result = _.mergeWith(initialValue, {}, {}, {}, {}, mergingValue, customizer); - - // Tests for basic chaining with mergeWith - result = _(initialValue).mergeWith(mergingValue, customizer).value(); - result = _(initialValue).mergeWith({}, mergingValue, customizer).value(); - result = _(initialValue).mergeWith({}, {}, mergingValue, customizer).value(); - result = _(initialValue).mergeWith({}, {}, {}, mergingValue, customizer).value(); - result = _(initialValue).mergeWith({}, {}, {}, {}, mergingValue, customizer).value(); -} - -// _.omit -namespace TestOmit { - let obj: AbcObject | null | undefined = anything; - let dict: { [key: string]: AbcObject } = { }; - - { - let result: Partial; - - result = _.omit(obj, 'a'); - result = _.omit(obj, 0, 'a'); - result = _.omit(obj, ['b', 1], 0, 'a'); - - dict = _.omit(dict, 'a'); - } - - { - let result: _.LoDashImplicitWrapper>; - - result = _(obj).omit('a'); - result = _(obj).omit(0, 'a'); - result = _(obj).omit(['b', 1], 0, 'a'); - - dict = _(dict).omit('a').value(); - } - - { - let result: _.LoDashExplicitWrapper>; - - result = _(obj).chain().omit('a'); - result = _(obj).chain().omit(0, 'a'); - result = _(obj).chain().omit(['b', 1], 0, 'a'); - - dict = _(dict).chain().omit('a').value(); - } -} - -// _.omitBy -namespace TestOmitBy { - let obj: AbcObject | null | undefined = anything; - let predicate = (element: any, key: string) => true; - - { - let result: Partial; - - result = _.omitBy(obj, predicate); - } - - { - let result: _.LoDashImplicitWrapper>; - - result = _(obj).omitBy(predicate); - } - - { - let result: _.LoDashExplicitWrapper>; - - result = _(obj).chain().omitBy(predicate); - } -} - -// _.pick -namespace TestPick { - const obj1: AbcObject | null | undefined = anything; - const obj2: AbcObject = anything; - const readonlyArray: string[] = ['a', 'b']; // TODO: Should be ReadonlyArray, but see comment on type Many - const literalsArray = ['a' as 'a', 'b' as 'b']; - const roLiteralsArray: Array<'a' | 'b'> = literalsArray; // TODO: Should be ReadonlyArray, but see comment on type Many - - _.pick(obj1, 'a'); // $ExpectType PartialDeep - _.pick(obj1, 0, 'a'); // $ExpectType PartialDeep - _.pick(obj1, ['b', 1], 0, 'a'); // $ExpectType PartialDeep - _.pick(obj1, readonlyArray); // $ExpectType PartialDeep - _.pick(obj2, 'a', 'b'); // $ExpectType Pick - _.pick(obj2, literalsArray); // $ExpectType Pick - _.pick(obj2, roLiteralsArray); // $ExpectType Pick - - _(obj1).pick('a'); // $ExpectType LoDashImplicitWrapper> - _(obj1).pick(0, 'a'); // $ExpectType LoDashImplicitWrapper> - _(obj1).pick(['b', 1], 0, 'a'); // $ExpectType LoDashImplicitWrapper> - _(obj1).pick(readonlyArray); // $ExpectType LoDashImplicitWrapper> - _(obj2).pick('a', 'b'); // $ExpectType LoDashImplicitWrapper> - _(obj2).pick(literalsArray); // $ExpectType LoDashImplicitWrapper> - _(obj2).pick(roLiteralsArray); // $ExpectType LoDashImplicitWrapper> - - _.chain(obj1).pick('a'); // $ExpectType LoDashExplicitWrapper> - _.chain(obj1).pick(0, 'a'); // $ExpectType LoDashExplicitWrapper> - _.chain(obj1).pick(['b', 1], 0, 'a'); // $ExpectType LoDashExplicitWrapper> - _.chain(obj1).pick(readonlyArray); // $ExpectType LoDashExplicitWrapper> - _.chain(obj2).pick('a', 'b'); // $ExpectType LoDashExplicitWrapper> - _.chain(obj2).pick(literalsArray); // $ExpectType LoDashExplicitWrapper> - _.chain(obj2).pick(roLiteralsArray); // $ExpectType LoDashExplicitWrapper> -} - -// _.pickBy -namespace TestPickBy { - let obj: AbcObject | null | undefined = anything; - let predicate = (element: any, key: string) => true; - - { - let result: Partial; - - result = _.pickBy(obj, predicate); - } - - { - let result: _.LoDashImplicitWrapper>; - - result = _(obj).pickBy(predicate); - } - - { - let result: _.LoDashExplicitWrapper>; - - result = _(obj).chain().pickBy(predicate); - } -} - -// _.result -namespace TestResult { - { - let result: string; - - result = _.result('abc', '0'); - result = _.result('abc', '0', '_'); - result = _.result('abc', '0', () => '_'); - result = _.result('abc', ['0']); - result = _.result('abc', ['0'], '_'); - result = _.result('abc', ['0'], () => '_'); - - result = _('abc').result('0'); - result = _('abc').result('0', '_'); - result = _('abc').result('0', () => '_'); - result = _('abc').result(['0']); - result = _('abc').result(['0'], '_'); - result = _('abc').result(['0'], () => '_'); - } - - { - let result: number; - - result = _.result([42], '0'); - result = _.result([42], '0', -1); - result = _.result([42], '0', () => -1); - result = _.result([42], ['0']); - result = _.result([42], ['0'], -1); - result = _.result([42], ['0'], () => -1); - - result = _([42]).result('0'); - result = _([42]).result('0', -1); - result = _([42]).result('0', () => -1); - result = _([42]).result(['0']); - result = _([42]).result(['0'], -1); - result = _([42]).result(['0'], () => -1); - } - - { - let result: boolean; - - result = _.result({a: true}, 'a'); - result = _.result({a: true}, 'a', false); - result = _.result({a: true}, 'a', () => false); - result = _.result({a: true}, ['a']); - result = _.result({a: true}, ['a'], false); - result = _.result({a: true}, ['a'], () => false); - - result = _({a: true}).result('a'); - result = _({a: true}).result('a', false); - result = _({a: true}).result('a', () => false); - result = _({a: true}).result(['a']); - result = _({a: true}).result(['a'], false); - result = _({a: true}).result(['a'], () => false); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('abc').chain().result('0'); - result = _('abc').chain().result('0', '_'); - result = _('abc').chain().result('0', '_'); - result = _('abc').chain().result(['0']); - result = _('abc').chain().result(['0'], () => '_'); - result = _('abc').chain().result(['0'], () => '_'); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _([42]).chain().result('0'); - result = _([42]).chain().result('0', -1); - result = _([42]).chain().result('0', () => -1); - result = _([42]).chain().result(['0']); - result = _([42]).chain().result(['0'], -1); - result = _([42]).chain().result(['0'], () => -1); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _({a: true}).chain().result('a'); - result = _({a: true}).chain().result('a', false); - result = _({a: true}).chain().result('a', () => false); - result = _({a: true}).chain().result(['a']); - result = _({a: true}).chain().result(['a'], false); - result = _({a: true}).chain().result(['a'], () => false); - } -} - -// _.set -namespace TestSet { - type SampleObject = {a: {}}; - type SampleResult = {a: {b: number[]}}; - - let object: SampleObject = { a: {} }; - let value = 0; - - { - let result: SampleResult; - - result = _.set(object, 'a.b[1]', value); - result = _.set(object, ['a', 'b', 1], value); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(object).set('a.b[1]', value); - result = _(object).set(['a', 'b', 1], value); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(object).chain().set('a.b[1]', value); - result = _(object).chain().set(['a', 'b', 1], value); - } -} - -// _.setWith -namespace TestSetWith { - type SampleResult = {a: {b: number[]}}; - - let object: SampleResult = { a: { b: [] } }; - let value = 0; - let customizer = (value: any, key: string, object: SampleResult) => 0; - - { - let result: SampleResult; - - result = _.setWith(object, 'a.b[1]', value); - result = _.setWith(object, 'a.b[1]', value, customizer); - result = _.setWith(object, ['a', 'b', 1], value); - result = _.setWith(object, ['a', 'b', 1], value, customizer); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(object).setWith('a.b[1]', value); - result = _(object).setWith('a.b[1]', value, customizer); - result = _(object).setWith(['a', 'b', 1], value); - result = _(object).setWith(['a', 'b', 1], value, customizer); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(object).chain().setWith('a.b[1]', value); - result = _(object).chain().setWith('a.b[1]', value, customizer); - result = _(object).chain().setWith(['a', 'b', 1], value); - result = _(object).chain().setWith(['a', 'b', 1], value, customizer); - } -} - -// _.toPairs -namespace TestToPairs { - let object: _.Dictionary = {}; - - { - let result: Array<[string, string]>; - - result = _.toPairs(object); - } - - { - let result: _.LoDashImplicitArrayWrapper<[string, string]>; - - result = _(object).toPairs(); - } - - { - let result: _.LoDashExplicitArrayWrapper<[string, string]>; - - result = _(object).chain().toPairs(); - } -} - -// _.toPairsIn -namespace TestToPairsIn { - let object: _.Dictionary = {}; - - { - let result: Array<[string, string]>; - - result = _.toPairsIn(object); - } - - { - let result: _.LoDashImplicitArrayWrapper<[string, string]>; - - result = _(object).toPairsIn(); - } - - { - let result: _.LoDashExplicitArrayWrapper<[string, string]>; - - result = _(object).chain().toPairsIn(); - } - - { - let result: _.LoDashExplicitArrayWrapper<[string, any]>; - - result = _(object).chain().toPairsIn(); - } -} - -// _.transform -namespace TestTransform { - let array: number[] = []; - let dictionary: _.Dictionary = {}; - - { - let iterator = (acc: AbcObject[], curr: number, index?: number, arr?: number[]) => {}; - let accumulator: AbcObject[] = []; - let result: AbcObject[]; - - result = _.transform(array); - result = _.transform(array, iterator); - result = _.transform(array, iterator, accumulator); - - result = _(array).transform().value(); - result = _(array).transform(iterator).value(); - result = _(array).transform(iterator, accumulator).value(); - } - - { - let iterator = (acc: _.Dictionary, curr: number, index?: number, arr?: number[]) => {}; - let accumulator: _.Dictionary = {}; - let result: _.Dictionary; - - result = _.transform(array, iterator, accumulator); - - result = _(array).transform(iterator, accumulator).value(); - } - - { - let iterator = (acc: _.Dictionary, curr: number, key?: string, dict?: _.Dictionary) => {}; - let accumulator: _.Dictionary = {}; - let result: _.Dictionary; - - result = _.transform(dictionary); - result = _.transform(dictionary, iterator); - result = _.transform(dictionary, iterator, accumulator); - - result = _(dictionary).transform().value(); - result = _(dictionary).transform(iterator).value(); - result = _(dictionary).transform(iterator, accumulator).value(); - } - - { - let iterator = (acc: AbcObject[], curr: number, key?: string, dict?: _.Dictionary) => {}; - let accumulator: AbcObject[] = []; - let result: AbcObject[]; - - result = _.transform(dictionary, iterator, accumulator); - - result = _(dictionary).transform(iterator, accumulator).value(); - } -} - -// _.unset -namespace TestUnset { - type SampleObject = {a: {b: string; c: boolean}}; - - let object: SampleObject = { a: { b: "", c: true } }; - - { - let result: boolean; - - result = _.unset(object, 'a.b'); - result = _.unset(object, ['a', 'b']); - } - - { - let result: _.LoDashImplicitWrapper; - - result = _(object).unset('a.b'); - result = _(object).unset(['a', 'b']); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(object).chain().unset('a.b'); - result = _(object).chain().unset(['a', 'b']); - } -} - -// _.update -namespace TestUpdate { - type SampleResult = {a: {b: number[]}}; - - let object: SampleResult = { a: { b: [] } }; - let updater = (value: any) => 0; - - { - let result: SampleResult; - - result = _.update(object, 'a.b[1]', updater); - result = _.update(object, ['a', 'b', 1], updater); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(object).update('a.b[1]', updater); - result = _(object).update(['a', 'b', 1], updater); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(object).chain().update('a.b[1]', updater); - result = _(object).chain().update(['a', 'b', 1], updater); - } -} - -// _.updateWith -namespace TestUpdateWith { - type SampleResult = {a: {b: number[]}}; - - let object: SampleResult = { a: { b: [] } }; - let updater = (value: any) => 0; - let customizer = (value: any, key: string, object: SampleResult) => 0; - - { - let result: SampleResult; - - result = _.updateWith(object, 'a.b[1]', updater); - result = _.updateWith(object, 'a.b[1]', updater, customizer); - result = _.updateWith(object, ['a', 'b', 1], updater); - result = _.updateWith(object, ['a', 'b', 1], updater, customizer); - - result = _.updateWith(object, 'a.b[1]', updater); - result = _.updateWith(object, 'a.b[1]', updater, customizer); - result = _.updateWith(object, ['a', 'b', 1], updater); - result = _.updateWith(object, ['a', 'b', 1], updater, customizer); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(object).updateWith('a.b[1]', updater); - result = _(object).updateWith('a.b[1]', updater, customizer); - result = _(object).updateWith(['a', 'b', 1], updater); - result = _(object).updateWith(['a', 'b', 1], updater, customizer); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(object).chain().updateWith('a.b[1]', updater); - result = _(object).chain().updateWith('a.b[1]', updater, customizer); - result = _(object).chain().updateWith(['a', 'b', 1], updater); - result = _(object).chain().updateWith(['a', 'b', 1], updater, customizer); - } -} - -// _.values -namespace TestValues { - type SampleObject = {a: {}}; - - { - let result: any[]; - - result = _.values(123); - result = _.values(true); - result = _.values(null); - } - - { - let result: string[]; - - result = _.values('hi'); - result = _.values(['h', 'i']); - } - - { - let result: number[]; - - result = _.values([1, 2]); - } - - { - let result: boolean[]; - - result = _.values([true, false]); - } - - { - let dict: _.Dictionary = {}; - let numDict: _.NumericDictionary = {}; - let list: _.List = []; - let object: {a: SampleObject} = { a: { a: {} } }; - let result: SampleObject[]; - - result = _.values(dict); - result = _.values(numDict); - result = _.values(list); - result = _.values(object); - } - - // Implicit wrapper - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(123).values(); - result = _(true).values(); - result = _(null).values(); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _('hi').values(); - result = _(['h', 'i']).values(); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _([1, 2]).values(); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _([true, false]).values(); - } - - { - let dict: _.Dictionary = {}; - let numDict: _.NumericDictionary = {}; - let list: _.List = []; - let object: {a: SampleObject} = { a: { a: {} } }; - let result: _.LoDashImplicitArrayWrapper; - - result = _(dict).values(); - result = _(numDict).values(); - result = _(list).values(); - result = _(object).values(); - } - - // Explicit wrapper - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(123).chain().values(); - result = _(true).chain().values(); - result = _(null).chain().values(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _('hi').chain().values(); - result = _(['h', 'i']).chain().values(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _([1, 2]).chain().values(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _([true, false]).chain().values(); - } - - { - let dict: _.Dictionary = {}; - let numDict: _.NumericDictionary = {}; - let list: _.List = []; - let object: {a: SampleObject} = { a: { a: {} } }; - let result: _.LoDashExplicitArrayWrapper; - - result = _(dict).chain().values(); - result = _(numDict).chain().values(); - result = _(list).chain().values(); - result = _(object).chain().values(); - } -} - -// _.valuesIn -namespace TestValuesIn { - let object: _.Dictionary = {}; - - { - let result: AbcObject[]; - - result = _.valuesIn(object); - } - - { - let result: AbcObject[]; - - // Without this type hint, this will fail to compile, as expected. - result = _.valuesIn({}); - } - - { - let result: AbcObject[]; - - result = _.values(object); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(object).valuesIn(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(object).chain().valuesIn(); - } + _("").value(); // $ExpectType string + _([true]).value(); // $ExpectType boolean[] + _({ a: 42 }).value(); // $ExpectType { a: number; } + _({ a: 42 }).valueOf(); // $ExpectType { a: number; } + _({ a: 42 }).toJSON(); // $ExpectType { a: number; } + + _.chain("").value(); // $ExpectType string + _.chain([true]).value(); // $ExpectType boolean[] + _.chain({ a: 42 }).value(); // $ExpectType { a: number; } + _.chain({ a: 42 }).valueOf(); // $ExpectType { a: number; } + _.chain({ a: 42 }).toJSON(); // $ExpectType { a: number; } } /********** @@ -12385,1650 +6390,824 @@ namespace TestValuesIn { **********/ // _.camelCase -namespace TestCamelCase { - { - let result: string; - - result = _.camelCase('Foo Bar'); - result = _('Foo Bar').camelCase(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('Foo Bar').chain().camelCase(); - } +{ + _.camelCase("Foo Bar"); // $ExpectType string + _("Foo Bar").camelCase(); // $ExpectType string + _.chain("Foo Bar").camelCase(); // $ExpectType LoDashExplicitWrapper + fp.camelCase("Foo Bar"); // $ExpectType string } // _.capitalize -namespace TestCapitalize { - { - let result: string; - - result = _.capitalize('fred'); - result = _('fred').capitalize(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('fred').chain().capitalize(); - } +{ + _.capitalize("fred"); // $ExpectType string + _("fred").capitalize(); // $ExpectType string + _.chain("fred").capitalize(); // $ExpectType LoDashExplicitWrapper + fp.capitalize("fred"); // $ExpectType string } // _.deburr -namespace TestDeburr { - { - let result: string; - - result = _.deburr('déjà vu'); - result = _('déjà vu').deburr(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('déjà vu').chain().deburr(); - } +{ + _.deburr("déjà vu"); // $ExpectType string + _("déjà vu").deburr(); // $ExpectType string + _.chain("déjà vu").deburr(); // $ExpectType LoDashExplicitWrapper + fp.deburr("déjà vu"); // $ExpectType string } // _.endsWith -namespace TestEndsWith { - { - let result: boolean; - - result = _.endsWith('abc', 'c'); - result = _.endsWith('abc', 'c', 1); - - result = _('abc').endsWith('c'); - result = _('abc').endsWith('c', 1); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('abc').chain().endsWith('c'); - result = _('abc').chain().endsWith('c', 1); - } +{ + _.endsWith("abc", "c"); // $ExpectType boolean + _.endsWith("abc", "c", 1); // $ExpectType boolean + _("abc").endsWith("c"); // $ExpectType boolean + _("abc").endsWith("c", 1); // $ExpectType boolean + _.chain("abc").endsWith("c"); // $ExpectType LoDashExplicitWrapper + _.chain("abc").endsWith("c", 1); // $ExpectType LoDashExplicitWrapper + fp.endsWith("c", "abc"); // $ExpectType boolean + fp.endsWith("c")("abc"); // $ExpectType boolean } // _.escape -namespace TestEscape { - { - let result: string; - - result = _.escape('fred, barney, & pebbles'); - result = _('fred, barney, & pebbles').escape(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('fred, barney, & pebbles').chain().escape(); - } +{ + _.escape("fred, barney, & pebbles"); // $ExpectType string + _("fred, barney, & pebbles").escape(); // $ExpectType string + _.chain("fred, barney, & pebbles").escape(); // $ExpectType LoDashExplicitWrapper + fp.escape("fred, barney, & pebbles"); // $ExpectType string } // _.escapeRegExp -namespace TestEscapeRegExp { - { - let result: string; - - result = _.escapeRegExp('[lodash](https://lodash.com/)'); - result = _('[lodash](https://lodash.com/)').escapeRegExp(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('[lodash](https://lodash.com/)').chain().escapeRegExp(); - } +{ + _.escapeRegExp("[lodash](https://lodash.com/)"); // $ExpectType string + _("[lodash](https://lodash.com/)").escapeRegExp(); // $ExpectType string + _.chain("[lodash](https://lodash.com/)").escapeRegExp(); // $ExpectType LoDashExplicitWrapper + fp.escapeRegExp("[lodash](https://lodash.com/)"); // $ExpectType string } // _.kebabCase -namespace TestKebabCase { - { - let result: string; - - result = _.kebabCase('Foo Bar'); - result = _('Foo Bar').kebabCase(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('Foo Bar').chain().kebabCase(); - } +{ + _.kebabCase("Foo Bar"); // $ExpectType string + _("Foo Bar").kebabCase(); // $ExpectType string + _.chain("Foo Bar").kebabCase(); // $ExpectType LoDashExplicitWrapper + fp.kebabCase("Foo Bar"); // $ExpectType string } // _.lowerCase -namespace TestLowerCase { - { - let result: string; - - result = _.lowerCase('Foo Bar'); - result = _('Foo Bar').lowerCase(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('Foo Bar').chain().lowerCase(); - } +{ + _.lowerCase("Foo Bar"); // $ExpectType string + _("Foo Bar").lowerCase(); // $ExpectType string + _.chain("Foo Bar").lowerCase(); // $ExpectType LoDashExplicitWrapper + fp.lowerCase("Foo Bar"); // $ExpectType string } // _.lowerFirst -namespace TestLowerFirst { - { - let result: string; - - result = _.lowerFirst('Foo Bar'); - result = _('Foo Bar').lowerFirst(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('Foo Bar').chain().lowerFirst(); - } +{ + _.lowerFirst("Foo Bar"); // $ExpectType string + _("Foo Bar").lowerFirst(); // $ExpectType string + _.chain("Foo Bar").lowerFirst(); // $ExpectType LoDashExplicitWrapper + fp.lowerFirst("Foo Bar"); // $ExpectType string } // _.pad -namespace TestPad { - { - let result: string; - - result = _.pad('abc'); - result = _.pad('abc', 8); - result = _.pad('abc', 8, '_-'); - - result = _('abc').pad(); - result = _('abc').pad(8); - result = _('abc').pad(8, '_-'); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('abc').chain().pad(); - result = _('abc').chain().pad(8); - result = _('abc').chain().pad(8, '_-'); - } +{ + _.pad("abc"); // $ExpectType string + _.pad("abc", 8); // $ExpectType string + _.pad("abc", 8, "_-"); // $ExpectType string + _("abc").pad(); // $ExpectType string + _("abc").pad(8); // $ExpectType string + _("abc").pad(8, "_-"); // $ExpectType string + _.chain("abc").pad(); // $ExpectType LoDashExplicitWrapper + _.chain("abc").pad(8); // $ExpectType LoDashExplicitWrapper + _.chain("abc").pad(8, "_-"); // $ExpectType LoDashExplicitWrapper + fp.pad(8, "abc"); // $ExpectType string + fp.pad(8)("abc"); // $ExpectType string + fp.padChars("_", 8, "abc"); // $ExpectType string + fp.padChars("_")(8)("abc"); // $ExpectType string } // _.padEnd -namespace TestPadEnd { - { - let result: string; - - result = _.padEnd('abc'); - result = _.padEnd('abc', 6); - result = _.padEnd('abc', 6, '_-'); - - result = _('abc').padEnd(); - result = _('abc').padEnd(6); - result = _('abc').padEnd(6, '_-'); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('abc').chain().padEnd(); - result = _('abc').chain().padEnd(6); - result = _('abc').chain().padEnd(6, '_-'); - } +{ + _.padEnd("abc"); // $ExpectType string + _.padEnd("abc", 6); // $ExpectType string + _.padEnd("abc", 6, "_-"); // $ExpectType string + _("abc").padEnd(); // $ExpectType string + _("abc").padEnd(6); // $ExpectType string + _("abc").padEnd(6, "_-"); // $ExpectType string + _.chain("abc").padEnd(); // $ExpectType LoDashExplicitWrapper + _.chain("abc").padEnd(6); // $ExpectType LoDashExplicitWrapper + _.chain("abc").padEnd(6, "_-"); // $ExpectType LoDashExplicitWrapper + fp.padEnd(8, "abc"); // $ExpectType string + fp.padEnd(8)("abc"); // $ExpectType string + fp.padCharsEnd("_", 8, "abc"); // $ExpectType string + fp.padCharsEnd("_")(8)("abc"); // $ExpectType string } // _.padStart -namespace TestPadStart { - { - let result: string; - - result = _.padStart('abc'); - result = _.padStart('abc', 6); - result = _.padStart('abc', 6, '_-'); - - result = _('abc').padStart(); - result = _('abc').padStart(6); - result = _('abc').padStart(6, '_-'); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('abc').chain().padStart(); - result = _('abc').chain().padStart(6); - result = _('abc').chain().padStart(6, '_-'); - } +{ + _.padStart("abc"); // $ExpectType string + _.padStart("abc", 6); // $ExpectType string + _.padStart("abc", 6, "_-"); // $ExpectType string + _("abc").padStart(); // $ExpectType string + _("abc").padStart(6); // $ExpectType string + _("abc").padStart(6, "_-"); // $ExpectType string + _.chain("abc").padStart(); // $ExpectType LoDashExplicitWrapper + _.chain("abc").padStart(6); // $ExpectType LoDashExplicitWrapper + _.chain("abc").padStart(6, "_-"); // $ExpectType LoDashExplicitWrapper + fp.padStart(8, "abc"); // $ExpectType string + fp.padStart(8)("abc"); // $ExpectType string + fp.padCharsStart("_", 8, "abc"); // $ExpectType string + fp.padCharsStart("_")(8)("abc"); // $ExpectType string } // _.parseInt -namespace TestParseInt { - { - let result: number; - - result = _.parseInt('08'); - result = _.parseInt('08', 10); - - result = _('08').parseInt(); - result = _('08').parseInt(10); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('08').chain().parseInt(); - result = _('08').chain().parseInt(10); - } +{ + _.parseInt("08"); // $ExpectType number + _.parseInt("08", 10); // $ExpectType number + _("08").parseInt(); // $ExpectType number + _("08").parseInt(10); // $ExpectType number + _.chain("08").parseInt(); // $ExpectType LoDashExplicitWrapper + _.chain("08").parseInt(10); // $ExpectType LoDashExplicitWrapper + fp.parseInt(10, "08"); // $ExpectType number + fp.parseInt(10)("08"); // $ExpectType number } // _.repeat -namespace TestRepeat { - { - let result: string; - result = _.repeat('*'); - result = _.repeat('*', 3); - - result = _('*').repeat(); - result = _('*').repeat(3); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('*').chain().repeat(); - result = _('*').chain().repeat(3); - } +{ + _.repeat("*"); // $ExpectType string + _.repeat("*", 3); // $ExpectType string + _("*").repeat(); // $ExpectType string + _("*").repeat(3); // $ExpectType string + _.chain("*").repeat(); // $ExpectType LoDashExplicitWrapper + _.chain("*").repeat(3); // $ExpectType LoDashExplicitWrapper + fp.repeat(3, "*"); // $ExpectType string } // _.replace -namespace TestReplace { - let replacer = (match: string, offset: number, string: string) => 'Barney'; +{ + const replacer = (match: string, offset: number, string: string) => "Barney"; - { - let result: string; + _.replace("Hi Fred", "Fred", "Barney"); // $ExpectType string + _.replace("Hi Fred", "Fred", replacer); // $ExpectType string + _.replace("Hi Fred", /fred/i, "Barney"); // $ExpectType string + _.replace("Hi Fred", /fred/i, replacer); // $ExpectType string - result = _.replace('Hi Fred', 'Fred', 'Barney'); - result = _.replace('Hi Fred', 'Fred', replacer); + _("Hi Fred").replace("Fred", "Barney"); // $ExpectType string + _("Hi Fred").replace("Fred", replacer); // $ExpectType string + _("Hi Fred").replace(/fred/i, "Barney"); // $ExpectType string + _("Hi Fred").replace(/fred/i, replacer); // $ExpectType string - result = _.replace('Hi Fred', /fred/i, 'Barney'); - result = _.replace('Hi Fred', /fred/i, replacer); + _.chain("Hi Fred").replace("Fred", "Barney"); // $ExpectType LoDashExplicitWrapper + _.chain("Hi Fred").replace("Fred", replacer); // $ExpectType LoDashExplicitWrapper + _.chain("Hi Fred").replace(/fred/i, "Barney"); // $ExpectType LoDashExplicitWrapper + _.chain("Hi Fred").replace(/fred/i, replacer); // $ExpectType LoDashExplicitWrapper - result = _.replace('Fred', 'Barney'); - result = _.replace('Fred', replacer); - - result = _.replace(/fred/i, 'Barney'); - result = _.replace(/fred/i, replacer); - - result = _('Hi Fred').replace('Fred', 'Barney'); - result = _('Hi Fred').replace('Fred', replacer); - - result = _('Hi Fred').replace(/fred/i, 'Barney'); - result = _('Hi Fred').replace(/fred/i, replacer); - - result = _('Fred').replace('Barney'); - result = _('Fred').replace(replacer); - - result = _(/fred/i).replace('Barney'); - result = _(/fred/i).replace(replacer); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('Hi Fred').chain().replace('Fred', 'Barney'); - result = _('Hi Fred').chain().replace('Fred', replacer); - - result = _('Hi Fred').chain().replace(/fred/i, 'Barney'); - result = _('Hi Fred').chain().replace(/fred/i, replacer); - - result = _('Fred').chain().replace('Barney'); - result = _('Fred').chain().replace(replacer); - - result = _(/fred/i).chain().replace('Barney'); - result = _(/fred/i).chain().replace(replacer); - } + fp.replace("Fred", "Barney", "Hi Fred"); // $ExpectType string + fp.replace("Fred")("Barney")("Hi Fred"); // $ExpectType string + fp.replace("Fred")(replacer)("Hi Fred"); // $ExpectType string + fp.replace(/fred/i)("Barney")("Hi Fred"); // $ExpectType string + fp.replace(/fred/i)(replacer)("Hi Fred"); // $ExpectType string } // _.snakeCase -namespace TestSnakeCase { - { - let result: string; - - result = _.snakeCase('Foo Bar'); - result = _('Foo Bar').snakeCase(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('Foo Bar').chain().snakeCase(); - } +{ + _.snakeCase("Foo Bar"); // $ExpectType string + _("Foo Bar").snakeCase(); // $ExpectType string + _.chain("Foo Bar").snakeCase(); // $ExpectType LoDashExplicitWrapper + fp.snakeCase("Foo Bar"); // $ExpectType string } // _.split -namespace TestSplit { - { - let result: string[]; +{ + _.split("a-b-c"); // $ExpectType string[] + _.split("a-b-c", "-"); // $ExpectType string[] + _.split("a-b-c", "-", 2); // $ExpectType string[] + _("a-b-c").split(); // $ExpectType LoDashImplicitWrapper + _("a-b-c").split("-"); // $ExpectType LoDashImplicitWrapper + _("a-b-c").split("-", 2); // $ExpectType LoDashImplicitWrapper + _.chain("a-b-c").split(); // $ExpectType LoDashExplicitWrapper + _.chain("a-b-c").split("-"); // $ExpectType LoDashExplicitWrapper + _.chain("a-b-c").split("-", 2); // $ExpectType LoDashExplicitWrapper + fp.split("-", "a-b-c"); // $ExpectType string[] + fp.split("-")("a-b-c"); // $ExpectType string[] - result = _.split('a-b-c'); - result = _.split('a-b-c', '-'); - result = _.split('a-b-c', '-', 2); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _('a-b-c').split(); - result = _('a-b-c').split('-'); - result = _('a-b-c').split('-', 2); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _('a-b-c').chain().split(); - result = _('a-b-c').chain().split('-'); - result = _('a-b-c').chain().split('-', 2); - } - - // $ExpectType string[][] - _.map(['abc', 'def'], _.split); + _.map(["abc", "def"], _.split); // $ExpectType string[][] } // _.startCase -namespace TestStartCase { - { - let result: string; - - result = _.startCase('--foo-bar'); - result = _('--foo-bar').startCase(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('--foo-bar').chain().startCase(); - } +{ + _.startCase("--foo-bar"); // $ExpectType string + _("--foo-bar").startCase(); // $ExpectType string + _.chain("--foo-bar").startCase(); // $ExpectType LoDashExplicitWrapper + fp.startCase("--foo-bar"); // $ExpectType string } // _.startsWith -namespace TestStartsWith { - { - let result: boolean; - - result = _.startsWith('abc', 'a'); - result = _.startsWith('abc', 'a', 1); - - result = _('abc').startsWith('a'); - result = _('abc').startsWith('a', 1); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('abc').chain().startsWith('a'); - result = _('abc').chain().startsWith('a', 1); - } +{ + _.startsWith("abc", "a"); // $ExpectType boolean + _.startsWith("abc", "a", 1); // $ExpectType boolean + _("abc").startsWith("a"); // $ExpectType boolean + _("abc").startsWith("a", 1); // $ExpectType boolean + _.chain("abc").startsWith("a"); // $ExpectType LoDashExplicitWrapper + _.chain("abc").startsWith("a", 1); // $ExpectType LoDashExplicitWrapper + fp.startsWith("a", "abc"); // $ExpectType boolean + fp.startsWith("a")("abc"); // $ExpectType boolean } // _.template -namespace TestTemplate { - interface TemplateExecutor { - (obj?: object): string; - source: string; - } +{ + const options: _.TemplateOptions = { + escape: / /, + evaluate: / /, + imports: {}, + interpolate: / /, + sourceURL: "", + variable: "a", + }; - let options: { - escape?: RegExp; - evaluate?: RegExp; - imports?: _.Dictionary; - interpolate?: RegExp; - sourceURL?: string; - variable?: string; - } = {}; + const result = _.template(""); + result.source; // $ExpectType string + result({}); // $ExpectType string - { - let result: TemplateExecutor; + _.template(""); // $ExpectType TemplateExecutor + _.template("", options); // $ExpectType TemplateExecutor + _("").template(); // $ExpectType TemplateExecutor + _("").template(options); // $ExpectType TemplateExecutor + _.chain("").template(); // $ExpectType LoDashExplicitWrapper + _.chain("").template(options); // $ExpectType LoDashExplicitWrapper - result = _.template(''); - result = _.template('', options); - - result = _('').template(); - result = _('').template(options); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _('').chain().template(); - result = _('').chain().template(options); - } + const result2 = fp.template(""); + result2(); // $ExpectType string + result2.source; // $ExpectType string } // _.toLower -namespace TestToLower { - { - let result: string; - - result = _.toLower('fred, barney, & pebbles'); - result = _('fred, barney, & pebbles').toLower(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('fred, barney, & pebbles').chain().toLower(); - } +{ + _.toLower("fred, barney, & pebbles"); // $ExpectType string + _("fred, barney, & pebbles").toLower(); // $ExpectType string + _.chain("fred, barney, & pebbles").toLower(); // $ExpectType LoDashExplicitWrapper + fp.toLower("fred, barney, & pebbles"); // $ExpectType string } // _.toUpper -namespace TestToUpper { - { - let result: string; - - result = _.toUpper('fred, barney, & pebbles'); - result = _('fred, barney, & pebbles').toUpper(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('fred, barney, & pebbles').chain().toUpper(); - } +{ + _.toUpper("fred, barney, & pebbles"); // $ExpectType string + _("fred, barney, & pebbles").toUpper(); // $ExpectType string + _.chain("fred, barney, & pebbles").toUpper(); // $ExpectType LoDashExplicitWrapper + fp.toUpper("fred, barney, & pebbles"); // $ExpectType string } // _.trim -namespace TestTrim { - { - let result: string; +{ + _.trim(); // $ExpectType string + _.trim(" abc "); // $ExpectType string + _.trim("-_-abc-_-", "_-"); // $ExpectType string + _("-_-abc-_-").trim(); // $ExpectType string + _("-_-abc-_-").trim("_-"); // $ExpectType string + _.chain("-_-abc-_-").trim(); // $ExpectType LoDashExplicitWrapper + _.chain("-_-abc-_-").trim("_-"); // $ExpectType LoDashExplicitWrapper + fp.trim(" abc "); // $ExpectType string + fp.trimChars(" ", " abc "); // $ExpectType string + fp.trimChars(" ")(" abc "); // $ExpectType string - result = _.trim(); - result = _.trim(' abc '); - result = _.trim('-_-abc-_-', '_-'); - - result = _('-_-abc-_-').trim(); - result = _('-_-abc-_-').trim('_-'); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('-_-abc-_-').chain().trim(); - result = _('-_-abc-_-').chain().trim('_-'); - } - - // $ExpectType string[] - _.map([' foo ', ' bar '], _.trim); + _.map([" foo ", " bar "], _.trim); // $ExpectType string[] } // _.trimEnd -namespace TestTrimEnd { - { - let result: string; - - result = _.trimEnd(); - result = _.trimEnd(' abc '); - result = _.trimEnd('-_-abc-_-', '_-'); - - result = _('-_-abc-_-').trimEnd(); - result = _('-_-abc-_-').trimEnd('_-'); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('-_-abc-_-').chain().trimEnd(); - result = _('-_-abc-_-').chain().trimEnd('_-'); - } +{ + _.trimEnd(); // $ExpectType string + _.trimEnd(" abc "); // $ExpectType string + _.trimEnd("-_-abc-_-", "_-"); // $ExpectType string + _("-_-abc-_-").trimEnd(); // $ExpectType string + _("-_-abc-_-").trimEnd("_-"); // $ExpectType string + _.chain("-_-abc-_-").trimEnd(); // $ExpectType LoDashExplicitWrapper + _.chain("-_-abc-_-").trimEnd("_-"); // $ExpectType LoDashExplicitWrapper + fp.trimEnd(" abc "); // $ExpectType string + fp.trimCharsEnd(" ", " abc "); // $ExpectType string + fp.trimCharsEnd(" ")(" abc "); // $ExpectType string } // _.trimStart -namespace TestTrimStart { - { - let result: string; - - result = _.trimStart(); - result = _.trimStart(' abc '); - result = _.trimStart('-_-abc-_-', '_-'); - - result = _('-_-abc-_-').trimStart(); - result = _('-_-abc-_-').trimStart('_-'); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('-_-abc-_-').chain().trimStart(); - result = _('-_-abc-_-').chain().trimStart('_-'); - } +{ + _.trimStart(); // $ExpectType string + _.trimStart(" abc "); // $ExpectType string + _.trimStart("-_-abc-_-", "_-"); // $ExpectType string + _("-_-abc-_-").trimStart(); // $ExpectType string + _("-_-abc-_-").trimStart("_-"); // $ExpectType string + _.chain("-_-abc-_-").trimStart(); // $ExpectType LoDashExplicitWrapper + _.chain("-_-abc-_-").trimStart("_-"); // $ExpectType LoDashExplicitWrapper + fp.trimStart(" abc "); // $ExpectType string + fp.trimCharsStart(" ", " abc "); // $ExpectType string + fp.trimCharsStart(" ")(" abc "); // $ExpectType string } // _.truncate -namespace TestTruncate { - { - let result: string; +{ + _.truncate("hi-diddly-ho there, neighborino"); // $ExpectType string + _.truncate("hi-diddly-ho there, neighborino", { length: 24, separator: " " }); // $ExpectType string + _.truncate("hi-diddly-ho there, neighborino", { length: 24, separator: /,? +/ }); // $ExpectType string + _.truncate("hi-diddly-ho there, neighborino", { omission: " […]" }); // $ExpectType string - result = _.truncate('hi-diddly-ho there, neighborino'); - result = _.truncate('hi-diddly-ho there, neighborino', { 'length': 24, 'separator': ' ' }); - result = _.truncate('hi-diddly-ho there, neighborino', { 'length': 24, 'separator': /,? +/ }); - result = _.truncate('hi-diddly-ho there, neighborino', { 'omission': ' […]' }); + _("hi-diddly-ho there, neighborino").truncate(); // $ExpectType string + _("hi-diddly-ho there, neighborino").truncate({ length: 24, separator: " " }); // $ExpectType string + _("hi-diddly-ho there, neighborino").truncate({ length: 24, separator: /,? +/ }); // $ExpectType string + _("hi-diddly-ho there, neighborino").truncate({ omission: " […]" }); // $ExpectType string - result = _('hi-diddly-ho there, neighborino').truncate(); - result = _('hi-diddly-ho there, neighborino').truncate({ 'length': 24, 'separator': ' ' }); - result = _('hi-diddly-ho there, neighborino').truncate({ 'length': 24, 'separator': /,? +/ }); - result = _('hi-diddly-ho there, neighborino').truncate({ 'omission': ' […]' }); - } + _.chain("hi-diddly-ho there, neighborino").truncate(); // $ExpectType LoDashExplicitWrapper + _.chain("hi-diddly-ho there, neighborino").truncate({ length: 24, separator: " " }); // $ExpectType LoDashExplicitWrapper + _.chain("hi-diddly-ho there, neighborino").truncate({ length: 24, separator: /,? +/ }); // $ExpectType LoDashExplicitWrapper + _.chain("hi-diddly-ho there, neighborino").truncate({ omission: " […]" }); // $ExpectType LoDashExplicitWrapper - { - let result: _.LoDashExplicitWrapper; - - result = _('hi-diddly-ho there, neighborino').chain().truncate(); - result = _('hi-diddly-ho there, neighborino').chain().truncate({ 'length': 24, 'separator': ' ' }); - result = _('hi-diddly-ho there, neighborino').chain().truncate({ 'length': 24, 'separator': /,? +/ }); - result = _('hi-diddly-ho there, neighborino').chain().truncate({ 'omission': ' […]' }); - } + fp.truncate({ length: 24, separator: " " }, "hi-diddly-ho there, neighborino"); // $ExpectType string + fp.truncate({ length: 24, separator: " " })("hi-diddly-ho there, neighborino"); // $ExpectType string + fp.truncate({ length: 24, separator: /,? +/ }, "hi-diddly-ho there, neighborino"); // $ExpectType string + fp.truncate({ omission: " […]" }, "hi-diddly-ho there, neighborino"); // $ExpectType string } // _.unescape -namespace TestUnescape { - { - let result: string; - - result = _.unescape('fred, barney, & pebbles'); - result = _('fred, barney, & pebbles').unescape(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('fred, barney, & pebbles').chain().unescape(); - } +{ + _.unescape("fred, barney, & pebbles"); // $ExpectType string + _("fred, barney, & pebbles").unescape(); // $ExpectType string + _.chain("fred, barney, & pebbles").unescape(); // $ExpectType LoDashExplicitWrapper + fp.unescape("fred, barney, & pebbles"); // $ExpectType string } // _.upperCase -namespace TestUpperCase { - { - let result: string; - - result = _.upperCase('fred, barney, & pebbles'); - result = _('fred, barney, & pebbles').upperCase(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('fred, barney, & pebbles').chain().upperCase(); - } +{ + _.upperCase("fred, barney, & pebbles"); // $ExpectType string + _("fred, barney, & pebbles").upperCase(); // $ExpectType string + _.chain("fred, barney, & pebbles").upperCase(); // $ExpectType LoDashExplicitWrapper + fp.upperCase("fred, barney, & pebbles"); // $ExpectType string } // _.upperFirst -namespace TestUpperFirst { - { - let result: string; - - result = _.upperFirst('fred, barney, & pebbles'); - result = _('fred, barney, & pebbles').upperFirst(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('fred, barney, & pebbles').chain().upperFirst(); - } +{ + _.upperFirst("fred, barney, & pebbles"); // $ExpectType string + _("fred, barney, & pebbles").upperFirst(); // $ExpectType string + _.chain("fred, barney, & pebbles").upperFirst(); // $ExpectType LoDashExplicitWrapper + fp.upperFirst("fred, barney, & pebbles"); // $ExpectType string } // _.words -namespace TestWords { - { - let result: string[]; +{ + _.words("fred, barney, & pebbles"); // $ExpectType string[] + _.words("fred, barney, & pebbles", /[^, ]+/g); // $ExpectType string[] + _("fred, barney, & pebbles").words(); // $ExpectType string[] + _("fred, barney, & pebbles").words(/[^, ]+/g); // $ExpectType string[] + _.chain("fred, barney, & pebbles").words(); // $ExpectType LoDashExplicitWrapper + _.chain("fred, barney, & pebbles").words(/[^, ]+/g); // $ExpectType LoDashExplicitWrapper + fp.words("fred, barney, & pebbles"); // $ExpectType string[] - result = _.words('fred, barney, & pebbles'); - result = _.words('fred, barney, & pebbles', /[^, ]+/g); - - result = _('fred, barney, & pebbles').words(); - result = _('fred, barney, & pebbles').words(/[^, ]+/g); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _('fred, barney, & pebbles').chain().words(); - result = _('fred, barney, & pebbles').chain().words(/[^, ]+/g); - } - - // $ExpectType string[][] - _.map(['fred, barney', 'pebbles'], _.words); + _.map(["fred, barney", "pebbles"], _.words); // $ExpectType string[][] } -/*********** - * Utility * - ***********/ +/******** + * Util * + ********/ // _.attempt -namespace TestAttempt { - let func: (...args: any[]) => {a: string} = (...args) => ({ a: "" }); +{ + const func = (...args: any[]): AbcObject => anything; - { - let result: {a: string}|Error; + // We can't use ExpectType here because typescript keeps changing what order the types appear. + let result: Error | AbcObject; + result = _.attempt(func); + result = _.attempt(func, "foo", "bar", "baz"); + result = _(func).attempt(); + result = _(func).attempt("foo", "bar", "baz"); - result = _.attempt<{a: string}>(func); - result = _.attempt<{a: string}>(func, 'foo', 'bar', 'baz'); - result = _(func).attempt<{a: string}>(); - result = _(func).attempt<{a: string}>('foo', 'bar', 'baz'); - } + let explicitResult: _.LoDashExplicitWrapper; + explicitResult = _.chain(func).attempt(); + explicitResult = _.chain(func).attempt("foo", "bar", "baz"); - { - let result: _.LoDashExplicitObjectWrapper<{a: string}|Error>; - - result = _(func).chain().attempt<{a: string}>(); - result = _(func).chain().attempt<{a: string}>('foo', 'bar', 'baz'); - } + result = fp.attempt(func); } // _.cond -namespace TestCond { - let pairPred1: (val: string) => boolean = (val) => true; - let pairPred2: (val: string) => boolean = (val) => false; - let pairRes1: (val: string) => number = (val) => 1; - let pairRes2: (val: string) => number = (val) => 2; +{ + const pairPred1 = (val: string) => true; + const pairPred2 = (val: string) => false; + const pairRes1 = (val: string) => 1; + const pairRes2 = (val: string) => 2; - { - let result: number; - - result = _.cond([[pairPred1, pairRes1],[pairPred2, pairRes2]])('hello'); - } + _.cond([[pairPred1, pairRes1], [pairPred2, pairRes2]])("hello"); // $ExpectType number + fp.cond([[pairPred1, pairRes1], [pairPred2, pairRes2]])("hello"); // $ExpectType number } // _.constant -namespace TestConstant { - { - let result: () => number; - result = _.constant(42); - } +{ + _.constant(42); // $ExpectType () => number + _.constant("a"); // $ExpectType () => string + _.constant([true]); // $ExpectType () => boolean[] + _.constant({ a: "" }); // $ExpectType () => { a: string; } - { - let result: () => string; - result = _.constant('a'); - } + _(42).constant(); // $ExpectType LoDashImplicitWrapper<() => number> + _("a").constant(); // $ExpectType LoDashImplicitWrapper<() => string> + _([true]).constant(); // $ExpectType LoDashImplicitWrapper<() => boolean[]> + _({ a: "" }).constant(); // $ExpectType LoDashImplicitWrapper<() => { a: string; }> - { - let result: () => boolean; - result = _.constant(true); - } + _.chain(42).constant(); // $ExpectType LoDashExplicitWrapper<() => number> + _.chain("a").constant(); // $ExpectType LoDashExplicitWrapper<() => string> + _.chain([true]).constant(); // $ExpectType LoDashExplicitWrapper<() => boolean[]> + _.chain({ a: "" }).constant(); // $ExpectType LoDashExplicitWrapper<() => { a: string; }> - { - let result: () => string[]; - result = _.constant(['a']); - } - - { - let result: () => {a: string}; - result = _.constant<{a: string}>({a: 'a'}); - } - - { - let result: _.LoDashImplicitObjectWrapper<() => number>; - result = _(42).constant(); - } - - { - let result: _.LoDashImplicitObjectWrapper<() => string>; - result = _('a').constant(); - } - - { - let result: _.LoDashImplicitObjectWrapper<() => boolean>; - result = _(true).constant(); - } - - { - let result: _.LoDashImplicitObjectWrapper<() => string[]>; - result = _(['a']).constant(); - } - - { - let result: _.LoDashImplicitObjectWrapper<() => {a: string}>; - result = _({a: 'a'}).constant(); - } - - { - let result: _.LoDashExplicitObjectWrapper<() => number>; - result = _(42).chain().constant(); - } - - { - let result: _.LoDashExplicitObjectWrapper<() => string>; - result = _('a').chain().constant(); - } - - { - let result: _.LoDashExplicitObjectWrapper<() => boolean>; - result = _(true).chain().constant(); - } - - { - let result: _.LoDashExplicitObjectWrapper<() => string[]>; - result = _(['a']).chain().constant(); - } - - { - let result: _.LoDashExplicitObjectWrapper<() => {a: string}>; - result = _({a: 'a'}).chain().constant(); - } + fp.constant(42); // $ExpectType () => number + fp.constant("a"); // $ExpectType () => string + fp.constant([true]); // $ExpectType () => boolean[] + fp.constant({ a: "" }); // $ExpectType () => { a: string; } } // _.defaultTo -namespace TestDefaultTo { - { - let result: number; - result = _.defaultTo(42, 42); - result = _.defaultTo(undefined, 42); - result = _.defaultTo(null, 42); - result = _.defaultTo(NaN, 42); - } +{ + _.defaultTo(42, 42); // $ExpectType 42 + _.defaultTo(undefined, 42); // $ExpectType 42 + _.defaultTo(null, 42); // $ExpectType 42 + _.defaultTo(NaN, 42); // $ExpectType number + _.defaultTo(undefined, "default"); // $ExpectType "default" + _.defaultTo(undefined, [true]); // $ExpectType boolean[] + _.defaultTo(undefined, { a: "" }); // $ExpectType { a: string; } - { - let result: string; - result = _.defaultTo('a', 'default'); - result = _.defaultTo(undefined, 'default'); - result = _.defaultTo(null, 'default'); - } + _(42).defaultTo(42); // $ExpectType number + _(undefined).defaultTo(42); // $ExpectType 42 + _(null).defaultTo(42); // $ExpectType 42 + _(NaN).defaultTo(42); // $ExpectType number + _(undefined).defaultTo("default"); // $ExpectType "default" + _(undefined).defaultTo([true]); // $ExpectType boolean[] + _(undefined).defaultTo({ a: "" }); // $ExpectType { a: string; } - { - let result: boolean; - result = _.defaultTo(true, true); - result = _.defaultTo(undefined, true); - result = _.defaultTo(null, true); - } + _.chain(42).defaultTo(42); // $ExpectType LoDashExplicitWrapper + _.chain(undefined).defaultTo(42); // $ExpectType LoDashExplicitWrapper<42> + _.chain(null).defaultTo(42); // $ExpectType LoDashExplicitWrapper<42> + _.chain(NaN).defaultTo(42); // $ExpectType LoDashExplicitWrapper + _.chain(undefined).defaultTo("default"); // $ExpectType LoDashExplicitWrapper<"default"> + _.chain(undefined).defaultTo([true]); // $ExpectType LoDashExplicitWrapper + _.chain(undefined).defaultTo({ a: "" }); // $ExpectType LoDashExplicitWrapper<{ a: string; }> - { - let result: string[]; - result = _.defaultTo(['a'], ['default']); - result = _.defaultTo(undefined, ['default']); - result = _.defaultTo(null, ['default']); - } + const n: number = anything; + fp.defaultTo(42, n); // $ExpectType number + fp.defaultTo(42)(n); // $ExpectType number + fp.defaultTo(42)(undefined); // $ExpectType number + fp.defaultTo(42)(null); // $ExpectType number + fp.defaultTo(42)(NaN); // $ExpectType number - { - let result: {a: string}; - result = _.defaultTo<{a: string}>({a: 'a'}, {a: 'a'}); - result = _.defaultTo<{a: string}>(undefined, {a: 'a'}); - result = _.defaultTo<{a: string}>(null, {a: 'a'}); - } - - { - let result: number; - result = _(42).defaultTo(42); - result = _(undefined).defaultTo(42); - result = _(null).defaultTo(42); - result = _(NaN).defaultTo(42); - } - - { - let result: string; - result = _('a').defaultTo('default'); - result = _(null).defaultTo('default'); - } - - { - let result: boolean; - result = _(true).defaultTo(true); - result = _(undefined).defaultTo(true); - result = _(null).defaultTo(true); - } - - { - let result: string[]; - result = _(['a']).defaultTo(['default']); - result = _(undefined).defaultTo(['default']); - result = _(null).defaultTo(['default']); - } - - { - let result: { a: string }; - result = _({ a: 'a' }).defaultTo({a : 'a'}); - result = _(undefined).defaultTo({a : 'a'}); - result = _(null).defaultTo({a : 'a'}); - } - - { - let result: _.LoDashExplicitObjectWrapper; - result = _(42).chain().defaultTo(42); - result = _(undefined).chain().defaultTo(42); - result = _(null).chain().defaultTo(42); - result = _(NaN).chain().defaultTo(42); - } - - { - let result: _.LoDashExplicitObjectWrapper; - result = _('a').chain().defaultTo('default'); - result = _(undefined).chain().defaultTo('default'); - result = _(null).chain().defaultTo('default'); - } - - { - let result: _.LoDashExplicitObjectWrapper; - result = _(true).chain().defaultTo(true); - result = _(undefined).chain().defaultTo(true); - result = _(null).chain().defaultTo(true); - } - - { - let result: _.LoDashExplicitObjectWrapper; - result = _(['a']).chain().defaultTo(['default']); - result = _(undefined).chain().defaultTo(['default']); - result = _(null).chain().defaultTo(['default']); - } - - { - let result: _.LoDashExplicitObjectWrapper<{ a: string }>; - result = _({ a: 'a' }).chain().defaultTo({a : 'a'}); - result = _(undefined).chain().defaultTo({a : 'a'}); - result = _(null).chain().defaultTo({a : 'a'}); - } + const arr: boolean[] | undefined = anything; + const result: boolean[] | "a" = fp.defaultTo("a", arr); } // _.identity -namespace TestIdentity { - { - let result: number; - - result = _.identity(42); - result = _(42).identity(); - } - - { - let result: number[]; - - result = _.identity([42]); - result = _([42]).identity(); - } - - { - let result: {a: number}; - - result = _.identity({a: 42}); - result = _({a: 42}).identity(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(42).chain().identity(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _([42]).chain().identity(); - } - - { - let result: _.LoDashExplicitObjectWrapper<{a: number}>; - - result = _({a: 42}).chain().identity(); - } - - { - let input: { a: number; } | null | undefined = anything; - _.identity(input); // $ExpectType { a: number; } | null | undefined - _.identity(); // $ExpectType undefined - } +{ + _.identity(42); // $ExpectType 42 + _.identity([""]); // $ExpectType string[] + _.identity({ a: true }); // $ExpectType { a: boolean; } + _(42).identity(); // $ExpectType number + _([""]).identity(); // $ExpectType string[] + _({ a: true }).identity(); // $ExpectType { a: boolean; } + _.chain(42).identity(); // $ExpectType LoDashExplicitWrapper + _.chain([""]).identity(); // $ExpectType LoDashExplicitWrapper + _.chain({ a: true }).identity(); // $ExpectType LoDashExplicitWrapper<{ a: boolean; }> + fp.identity(42); // $ExpectType 42 + fp.identity([""]); // $ExpectType string[] + fp.identity({ a: true }); // $ExpectType { a: boolean; } } // _.iteratee -namespace TestIteratee { - { - _.iteratee((...args: any[]): AbcObject => anything); // $ExpectType (...args: any[]) => AbcObject - _.iteratee((a: AbcObject): boolean => anything); // $ExpectType (a: AbcObject) => boolean - _.iteratee((a: AbcObject | undefined): a is undefined => anything); // $ExpectType (a: AbcObject | undefined) => a is undefined - } +{ + _.iteratee((a: AbcObject): boolean => anything); // $ExpectType (a: AbcObject) => boolean + _.iteratee((...args: any[]): AbcObject => anything); // $ExpectType (...args: any[]) => AbcObject + _.iteratee("a"); // $ExpectType (...args: any[]) => any + _.iteratee({ a: 42 }); // $ExpectType (...args: any[]) => any + _.iteratee(["a", 42]); // $ExpectType (...args: any[]) => any - { - let result: (object: any) => AbcObject; + _((a: AbcObject): boolean => anything).iteratee(); // $ExpectType LoDashImplicitWrapper<(a: AbcObject) => boolean> + _("a").iteratee(); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => any> + _({ a: 42 }).iteratee(); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => any> + _(["a", 42]).iteratee(); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => any> - result = _.iteratee(''); - } + _.chain((a: AbcObject): boolean => anything).iteratee(); // $ExpectType LoDashExplicitWrapper<(a: AbcObject) => boolean> + _.chain("a").iteratee(); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => any> + _.chain({ a: 42 }).iteratee(); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => any> + _.chain(["a", 42]).iteratee(); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => any> - { - let result: (object: any) => boolean; - - result = _.iteratee({}); - } - - { - let result: _.LoDashImplicitObjectWrapper<(...args: any[]) => AbcObject>; - - let func: (...args: any[]) => AbcObject = anything; - result = _(func).iteratee(); - } - - { - let result: _.LoDashImplicitObjectWrapper<(object: any) => AbcObject>; - - result = _('').iteratee(); - } - - { - let result: _.LoDashImplicitObjectWrapper<(object: any) => boolean>; - - result = _({}).iteratee(); - } - - { - let result: _.LoDashExplicitObjectWrapper<(...args: any[]) => AbcObject>; - - let func: (...args: any[]) => AbcObject = anything; - result = _(func).chain().iteratee(); - } - - { - let result: _.LoDashExplicitObjectWrapper<(object: any) => AbcObject>; - - result = _('').chain().iteratee(); - } - - { - let result: _.LoDashExplicitObjectWrapper<(object: any) => boolean>; - - result = _({}).chain().iteratee(); - } + fp.iteratee((a: AbcObject): boolean => anything); // $ExpectType (a: AbcObject) => boolean + fp.iteratee((...args: any[]): AbcObject => anything); // $ExpectType (...args: any[]) => AbcObject + fp.iteratee(""); // $ExpectType (...args: any[]) => any + fp.iteratee({ a: 42 }); // $ExpectType (...args: any[]) => any + fp.iteratee(["a", 42]); // $ExpectType (...args: any[]) => any } // _.matches -namespace TestMatches { - let source: AbcObject = { a: 1, b: "", c: true }; +{ + const source: AbcObject = { a: 1, b: "", c: true }; - { - let result: (value: any) => boolean; - result = _.matches(source); - } + _.matches(source); // $ExpectType (value: any) => boolean + _.matches(source); // $ExpectType (value: AbcObject) => boolean + _(source).matches(); // $ExpectType LoDashImplicitWrapper<(value: AbcObject) => boolean> + _.chain(source).matches(); // $ExpectType LoDashExplicitWrapper<(value: AbcObject) => boolean> - { - let result: (value: AbcObject) => boolean; - result = _.matches(source); - } - - { - let result: _.LoDashImplicitObjectWrapper<(value: AbcObject) => boolean>; - result = _(source).matches(); - } - - { - let result: _.LoDashExplicitObjectWrapper<(value: AbcObject) => boolean>; - result = _(source).chain().matches(); - } + fp.matches(source, {}); // $ExpectType boolean + fp.matches(source)({}); // $ExpectType boolean } // _.matchesProperty { - let path: string | string[] = []; - let source: AbcObject = { a: 1, b: "", c: true }; + const path: string | string[] = anything; + const source: AbcObject = { a: 1, b: "", c: true }; - { - let result: (value: any) => boolean; - - result = _.matchesProperty(path, source); - } - - { - let result: (value: AbcObject) => boolean; - - result = _.matchesProperty(path, source); - } - - { - let result: _.LoDashImplicitObjectWrapper<(value: any) => boolean>; - - result = _(path).matchesProperty(source); - } - - { - let result: _.LoDashImplicitObjectWrapper<(value: AbcObject) => boolean>; - - result = _(path).matchesProperty(source); - } - - { - let result: _.LoDashExplicitObjectWrapper<(value: any) => boolean>; - - result = _(path).chain().matchesProperty(source); - } - - { - let result: _.LoDashExplicitObjectWrapper<(value: AbcObject) => boolean>; - - result = _(path).chain().matchesProperty(source); - } + _.matchesProperty(path, source); // $ExpectType (value: any) => boolean + _.matchesProperty(path, source); // $ExpectType (value: AbcObject) => boolean + _(path).matchesProperty(source); // $ExpectType LoDashImplicitWrapper<(value: any) => boolean> + _(path).matchesProperty(source); + _.chain(path).matchesProperty(source); // $ExpectType LoDashExplicitWrapper<(value: any) => boolean> + fp.matchesProperty(path, source); // $ExpectType (value: any) => boolean } // _.method -namespace TestMethod { - { - let result: (object: any) => {a: string}; +{ + _.method("a.0"); // $ExpectType (object: any) => any + _.method("a.0", anything, anything, anything); // $ExpectType (object: any) => any + _.method(["a", 0]); // $ExpectType (object: any) => any + _.method(["a", 0], anything, anything, anything); // $ExpectType (object: any) => any - result = _.method('a.0'); - result = _.method('a.0', anything, anything); - result = _.method('a.0', anything, anything, anything); + _("a.0").method(); // $ExpectType LoDashImplicitWrapper<(object: any) => any> + _("a.0").method(anything, anything, anything); // $ExpectType LoDashImplicitWrapper<(object: any) => any> + _(["a", 0]).method(); // $ExpectType LoDashImplicitWrapper<(object: any) => any> + _(["a", 0]).method(anything, anything, anything); // $ExpectType LoDashImplicitWrapper<(object: any) => any> - result = _.method(['a', 0]); - result = _.method(['a', 0], anything); - result = _.method(['a', 0], anything, anything); - result = _.method(['a', 0], anything, anything, anything); - } + _.chain("a.0").method(); // $ExpectType LoDashExplicitWrapper<(object: any) => any> + _.chain("a.0").method(anything, anything, anything); // $ExpectType LoDashExplicitWrapper<(object: any) => any> + _.chain(["a", 0]).method(); // $ExpectType LoDashExplicitWrapper<(object: any) => any> + _.chain(["a", 0]).method(anything, anything, anything); // $ExpectType LoDashExplicitWrapper<(object: any) => any> - { - let result: (object: {a: string}) => {b: string}; - - result = _.method('a.0'); - result = _.method('a.0', anything, anything); - result = _.method('a.0', anything, anything, anything); - - result = _.method(['a', 0]); - result = _.method(['a', 0], anything); - result = _.method(['a', 0], anything, anything); - result = _.method(['a', 0], anything, anything, anything); - } - - { - let result: _.LoDashImplicitObjectWrapper<(object: any) => {a: string}>; - - result = _('a.0').method(); - result = _('a.0').method(anything); - result = _('a.0').method(anything, anything); - result = _('a.0').method(anything, anything, anything); - - result = _(['a', 0]).method(); - result = _(['a', 0]).method(anything); - result = _(['a', 0]).method(anything, anything); - result = _(['a', 0]).method(anything, anything, anything); - } - - { - let result: _.LoDashImplicitObjectWrapper<(object: {a: string}) => {b: string}>; - - result = _('a.0').method(); - result = _('a.0').method(anything); - result = _('a.0').method(anything, anything); - result = _('a.0').method(anything, anything, anything); - - result = _(['a', 0]).method(); - result = _(['a', 0]).method(anything); - result = _(['a', 0]).method(anything, anything); - result = _(['a', 0]).method(anything, anything, anything); - } - - { - let result: _.LoDashExplicitObjectWrapper<(object: any) => {a: string}>; - - result = _('a.0').chain().method(); - result = _('a.0').chain().method(anything); - result = _('a.0').chain().method(anything, anything); - result = _('a.0').chain().method(anything, anything, anything); - - result = _(['a', 0]).chain().method(); - result = _(['a', 0]).chain().method(anything); - result = _(['a', 0]).chain().method(anything, anything); - result = _(['a', 0]).chain().method(anything, anything, anything); - } - - { - let result: _.LoDashExplicitObjectWrapper<(object: {a: string}) => {b: string}>; - - result = _('a.0').chain().method(); - result = _('a.0').chain().method(anything); - result = _('a.0').chain().method(anything, anything); - result = _('a.0').chain().method(anything, anything, anything); - - result = _(['a', 0]).chain().method(); - result = _(['a', 0]).chain().method(anything); - result = _(['a', 0]).chain().method(anything, anything); - result = _(['a', 0]).chain().method(anything, anything, anything); - } + fp.method("a.0"); // $ExpectType (object: any) => any + fp.method(["a", 0]); // $ExpectType (object: any) => any + fp.method(Symbol.replace); // $ExpectType (object: any) => any } // _.methodOf -namespace TestMethodOf { - type SampleObject = { a: Array<{ b(): AbcObject }> }; - type ResultFn = (path: string | string[]) => AbcObject; +{ + const object: AbcObject = anything; - let object: SampleObject = { a: [] }; - - { - let result: ResultFn; - - result = _.methodOf(object); - result = _.methodOf(object, anything); - result = _.methodOf(object, anything, anything); - result = _.methodOf(object, anything, anything, anything); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(object).methodOf(); - result = _(object).methodOf(anything); - result = _(object).methodOf(anything, anything); - result = _(object).methodOf(anything, anything, anything); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(object).chain().methodOf(); - result = _(object).chain().methodOf(anything); - result = _(object).chain().methodOf(anything, anything); - result = _(object).chain().methodOf(anything, anything, anything); - } + _.methodOf(object); // $ExpectType (path: Many) => any + _.methodOf(object, anything, anything, anything); // $ExpectType (path: Many) => any + _(object).methodOf(); // $ExpectType LoDashImplicitWrapper<(path: Many) => any> + _(object).methodOf(anything, anything, anything); // $ExpectType LoDashImplicitWrapper<(path: Many) => any> + _.chain(object).methodOf(); // $ExpectType LoDashExplicitWrapper<(path: Many) => any> + _.chain(object).methodOf(anything, anything, anything); // $ExpectType LoDashExplicitWrapper<(path: Many) => any> + fp.methodOf(object); // $ExpectType (path: Many) => any } // _.mixin -namespace TestMixin { - let source: _.Dictionary<(...args: any[]) => any> = {}; - let dest: AbcObject = anything; - let options: {chain?: boolean} = {}; +{ + const source: _.Dictionary<(...args: any[]) => any> = {}; + const dest: AbcObject = anything; + const options: {chain?: boolean} = {}; - { - let result: _.LoDashStatic; + _.mixin(source); // $ExpectType LoDashStatic + _.mixin(source, options); // $ExpectType LoDashStatic + _.mixin(dest, source); // $ExpectType AbcObject + _.mixin(dest, source, options); // $ExpectType AbcObject - result = _.mixin(source); - result = _.mixin(source, options); - } + _(source).mixin(); // $ExpectType LoDashImplicitWrapper + _(source).mixin(options); // $ExpectType LoDashImplicitWrapper + _(dest).mixin(source); // $ExpectType LoDashImplicitWrapper + _(dest).mixin(source, options); // $ExpectType LoDashImplicitWrapper - { - let result: AbcObject; - - result = _.mixin(dest, source); - result = _.mixin(dest, source, options); - } - - { - let result: _.LoDashImplicitWrapper<_.LoDashStatic>; - - result = _(source).mixin(); - result = _(source).mixin(options); - } - - { - let result: _.LoDashImplicitWrapper; - - result = _(dest).mixin(source); - result = _(dest).mixin(source, options); - } - - { - let result: _.LoDashExplicitWrapper<_.LoDashStatic>; - - result = _(source).chain().mixin(); - result = _(source).chain().mixin(options); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _(dest).chain().mixin(source); - result = _(dest).chain().mixin(source, options); - } + _.chain(source).mixin(); // $ExpectType LoDashExplicitWrapper + _.chain(source).mixin(options); // $ExpectType LoDashExplicitWrapper + _.chain(dest).mixin(source); // $ExpectType LoDashExplicitWrapper + _.chain(dest).mixin(source, options); // $ExpectType LoDashExplicitWrapper } // _.noConflict -namespace TestNoConflict { - { - let result: typeof _; - - result = _.noConflict(); - result = _(42).noConflict(); - result = _([]).noConflict(); - result = _({}).noConflict(); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(42).chain().noConflict(); - result = _([]).chain().noConflict(); - result = _({}).chain().noConflict(); - } +{ + _.noConflict(); // $ExpectType LoDashStatic + _(42).noConflict(); // $ExpectType LoDashStatic + _.chain(42).noConflict(); // $ExpectType LoDashExplicitWrapper + fp.noConflict(); // $ExpectType LoDashFp } // _.noop -namespace TestNoop { - { - let result: void; // tslint:disable-line:void-return +{ + _.noop(); // $ExpectType void + _.noop(1); // $ExpectType void + _.noop(true, "a", 1); // $ExpectType void + _("a").noop(true, "a", 1); // $ExpectType void + _.chain("a").noop(true, "a", 1); // $ExpectType LoDashExplicitWrapper - result = _.noop(); - result = _.noop(1); - result = _.noop('a', 1); - result = _.noop(true, 'a', 1); - - result = _('a').noop(true, 'a', 1); - result = _([1]).noop(true, 'a', 1); - result = _(['']).noop(true, 'a', 1); - result = _({}).noop(true, 'a', 1); - result = _(anything).noop(true, 'a', 1); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('a').chain().noop(true, 'a', 1); - result = _([1]).chain().noop(true, 'a', 1); - result = _(['']).chain().noop(true, 'a', 1); - result = _({}).chain().noop(true, 'a', 1); - result = _(anything).chain().noop(true, 'a', 1); - } + fp.noop(); // $ExpectType void + fp.noop(1); // $ExpectType void + fp.noop(true, "a", 1); // $ExpectType void } -namespace TestNthArg { - type SampleFunc = (...args: any[]) => any; - - { - let result: SampleFunc; - - result = _.nthArg(); - result = _.nthArg(1); - } - - { - let result: _.LoDashImplicitObjectWrapper; - - result = _(1).nthArg(); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _(1).chain().nthArg(); - } +{ + _.nthArg(); // $ExpectType (...args: any[]) => any + _.nthArg(1); // $ExpectType (...args: any[]) => any + _(1).nthArg(); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => any> + _.chain(1).nthArg(); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => any> + fp.nthArg(1); // $ExpectType (...args: any[]) => any } // _.over -namespace TestOver { - { - let result: (...args: any[]) => number[]; +{ + _.over(Math.max); // $ExpectType (...args: any[]) => number[] + _.over(Math.max, Math.min); // $ExpectType (...args: any[]) => number[] + _.over([Math.max]); // $ExpectType (...args: any[]) => number[] + _.over([Math.max], [Math.min]); // $ExpectType (...args: any[]) => number[] - result = _.over(Math.max); - result = _.over(Math.max, Math.min); - result = _.over([Math.max]); - result = _.over([Math.max], [Math.min]); - } + _(Math.max).over(); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => number[]> + _(Math.max).over(Math.min); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => number[]> + _([Math.max]).over(); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => number[]> + _([Math.max]).over([Math.min]); // $ExpectType LoDashImplicitWrapper<(...args: any[]) => number[]> - { - let result: _.LoDashImplicitObjectWrapper<(...args: any[]) => number[]>; + _.chain(Math.max).over(); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => number[]> + _.chain(Math.max).over(Math.min); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => number[]> + _.chain([Math.max]).over(); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => number[]> + _.chain([Math.max]).over([Math.min]); // $ExpectType LoDashExplicitWrapper<(...args: any[]) => number[]> - result = _(Math.max).over(); - result = _(Math.max).over(Math.min); - result = _([Math.max]).over(); - result = _([Math.max]).over([Math.min]); - } - - { - let result: _.LoDashExplicitObjectWrapper<(...args: any[]) => number[]>; - - result = _(Math.max).chain().over(); - result = _(Math.max).chain().over(Math.min); - result = _([Math.max]).chain().over(); - result = _([Math.max]).chain().over([Math.min]); - } + fp.over(Math.max); // $ExpectType (...args: any[]) => number[] + fp.over([Math.max, Math.min]); // $ExpectType (...args: any[]) => number[] } // _.overEvery -namespace TestOverEvery { - { - let result: (...args: number[]) => boolean; - - result = _.overEvery((number) => true); - result = _.overEvery((number) => true, (number) => true); - result = _.overEvery([(number) => true]); - result = _.overEvery([(number) => true], [(number) => true]); - } - - { - let result: _.LoDashImplicitObjectWrapper<(...args: number[]) => boolean>; - - result = _(Math.max).overEvery(); - result = _(Math.max).overEvery((number) => true); - result = _([Math.max]).overEvery(); - result = _([Math.max]).overEvery([(number) => true]); - } - - { - let result: _.LoDashExplicitObjectWrapper<(...args: number[]) => boolean>; - - result = _(Math.max).chain().overEvery(); - result = _(Math.max).chain().overEvery((number) => true); - result = _([Math.max]).chain().overEvery(); - result = _([Math.max]).chain().overEvery([(number) => true]); - } -} - // _.overSome -namespace TestOverSome { - { - let result: (...args: number[]) => boolean; +{ + _.overEvery((number: number) => true); // $ExpectType (...args: number[]) => boolean + _.overEvery((number: number) => true, (number: number) => true); // $ExpectType (...args: number[]) => boolean + _.overEvery([(number: number) => true]); // $ExpectType (...args: number[]) => boolean + _.overEvery([(number: number) => true], [(number: number) => true]); // $ExpectType (...args: number[]) => boolean - result = _.overSome((n: number) => true); - result = _.overSome((n: number) => true, (n: number) => true); - result = _.overSome([(n: number) => true]); - result = _.overSome([(n: number) => true], [(n: number) => true]); - } + _(Math.max).overEvery(); // $ExpectType LoDashImplicitWrapper<(...args: number[]) => boolean> + _(Math.max).overEvery((number: number) => true); // $ExpectType LoDashImplicitWrapper<(...args: number[]) => boolean> + _([Math.max]).overEvery([(number: number) => true]); // $ExpectType LoDashImplicitWrapper<(...args: number[]) => boolean> - { - let result: _.LoDashImplicitObjectWrapper<(...args: number[]) => boolean>; + _.chain(Math.max).overEvery(); // $ExpectType LoDashExplicitWrapper<(...args: number[]) => boolean> + _.chain(Math.max).overEvery((number: number) => true); // $ExpectType LoDashExplicitWrapper<(...args: number[]) => boolean> + _.chain([Math.max]).overEvery([(number: number) => true]); // $ExpectType LoDashExplicitWrapper<(...args: number[]) => boolean> - result = _(Math.max).overSome(); - result = _(Math.max).overSome((n: number) => true); - result = _([Math.max]).overSome(); - result = _([Math.max]).overSome([(n: number) => true]); - } + fp.overEvery((number: number) => true); // $ExpectType (...args: number[]) => boolean + fp.overEvery([(number: number) => true, (number: number) => true]); // $ExpectType (...args: number[]) => boolean - { - let result: _.LoDashExplicitObjectWrapper<(...args: number[]) => boolean>; + _.overSome((number: number) => true); // $ExpectType (...args: number[]) => boolean + _.overSome((number: number) => true, (number: number) => true); // $ExpectType (...args: number[]) => boolean + _.overSome([(number: number) => true]); // $ExpectType (...args: number[]) => boolean + _.overSome([(number: number) => true], [(number: number) => true]); // $ExpectType (...args: number[]) => boolean - result = _(Math.max).chain().overSome(); - result = _(Math.max).chain().overSome((n: number) => true); - result = _([Math.max]).chain().overSome(); - result = _([Math.max]).chain().overSome([(n: number) => true]); - } + _(Math.max).overSome(); // $ExpectType LoDashImplicitWrapper<(...args: number[]) => boolean> + _(Math.max).overSome((number: number) => true); // $ExpectType LoDashImplicitWrapper<(...args: number[]) => boolean> + _([Math.max]).overSome([(number: number) => true]); // $ExpectType LoDashImplicitWrapper<(...args: number[]) => boolean> + + _.chain(Math.max).overSome(); // $ExpectType LoDashExplicitWrapper<(...args: number[]) => boolean> + _.chain(Math.max).overSome((number: number) => true); // $ExpectType LoDashExplicitWrapper<(...args: number[]) => boolean> + _.chain([Math.max]).overSome([(number: number) => true]); // $ExpectType LoDashExplicitWrapper<(...args: number[]) => boolean> + + fp.overSome((number: number) => true); // $ExpectType (...args: number[]) => boolean + fp.overSome([(number: number) => true, (number: number) => true]); // $ExpectType (...args: number[]) => boolean } // _.property -namespace TestProperty { +{ interface SampleObject { a: { b: number[]; - } + }; } - { - let result: (object: SampleObject) => number; - - result = _.property('a.b[0]'); - result = _.property(['a', 'b', 0]); - } - - { - let result: _.LoDashImplicitObjectWrapper<(object: SampleObject) => number>; - - result = _('a.b[0]').property(); - result = _(['a', 'b', 0]).property(); - } - - { - let result: _.LoDashExplicitObjectWrapper<(object: SampleObject) => number>; - - result = _('a.b[0]').chain().property(); - result = _(['a', 'b', 0]).chain().property(); - } + _.property("a.b[0]"); // $ExpectType (obj: SampleObject) => number + _.property(["a", "b", 0]); // $ExpectType (obj: SampleObject) => number + _("a.b[0]").property(); // $ExpectType LoDashImplicitWrapper<(obj: SampleObject) => number> + _(["a", "b", 0]).property(); // $ExpectType LoDashImplicitWrapper<(obj: SampleObject) => number> + _.chain("a.b[0]").property(); // $ExpectType LoDashExplicitWrapper<(obj: SampleObject) => number> + _.chain(["a", "b", 0]).property(); // $ExpectType LoDashExplicitWrapper<(obj: SampleObject) => number> + fp.property(Symbol.iterator)([]); // $ExpectType any + fp.property([Symbol.iterator], []); // $ExpectType any + fp.property(1)("abc"); // $ExpectType string } // _.propertyOf -namespace TestPropertyOf { - interface SampleObject { - a: { - b: number[]; - } - } +{ + _.propertyOf({}); // $ExpectType (path: Many) => any + _({}).propertyOf(); // $ExpectType LoDashImplicitWrapper<(path: Many) => any> + _.chain({}).propertyOf(); // $ExpectType LoDashExplicitWrapper<(path: Many) => any> - let object: SampleObject = { a: { b: [] } }; - - { - let result: (path: string|string[]) => any; - - result = _.propertyOf({}); - result = _.propertyOf(object); - } - - { - let result: _.LoDashImplicitObjectWrapper<(path: string|string[]) => any>; - - result = _({}).propertyOf(); - } - - { - let result: _.LoDashExplicitObjectWrapper<(path: string|string[]) => any>; - - result = _({}).chain().propertyOf(); - } + fp.propertyOf(Symbol.iterator)([]); // $ExpectType any + fp.propertyOf([Symbol.iterator], []); // $ExpectType any + fp.propertyOf(1)("abc"); // $ExpectType string } // _.range -namespace TestRange { - { - let result: number[]; - - result = _.range(10); - result = _.range(1, 11); - result = _.range(0, 30, 5); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(10).range(); - result = _(1).range(11); - result = _(0).range(30, 5); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(10).chain().range(); - result = _(1).chain().range(11); - result = _(0).chain().range(30, 5); - } - - // $ExpectType number[][] - _.map([5, 5], _.range); -} - // _.rangeRight -namespace TestRangeRight { - { - let result: number[]; +{ + _.range(10); // $ExpectType number[] + _.range(1, 11); // $ExpectType number[] + _.range(0, 30, 5); // $ExpectType number[] + _(10).range(); // $ExpectType LoDashImplicitWrapper + _(1).range(11); // $ExpectType LoDashImplicitWrapper + _(0).range(30, 5); // $ExpectType LoDashImplicitWrapper + _.chain(10).range(); // $ExpectType LoDashExplicitWrapper + _.chain(1).range(11); // $ExpectType LoDashExplicitWrapper + _.chain(0).range(30, 5); // $ExpectType LoDashExplicitWrapper + fp.range(1, 11); // $ExpectType number[] + fp.range(1)(11); // $ExpectType number[] - result = _.rangeRight(10); - result = _.rangeRight(1, 11); - result = _.rangeRight(0, 30, 5); - } + _.rangeRight(10); // $ExpectType number[] + _.rangeRight(1, 11); // $ExpectType number[] + _.rangeRight(0, 30, 5); // $ExpectType number[] + _(10).rangeRight(); // $ExpectType LoDashImplicitWrapper + _(1).rangeRight(11); // $ExpectType LoDashImplicitWrapper + _(0).rangeRight(30, 5); // $ExpectType LoDashImplicitWrapper + _.chain(10).rangeRight(); // $ExpectType LoDashExplicitWrapper + _.chain(1).rangeRight(11); // $ExpectType LoDashExplicitWrapper + _.chain(0).rangeRight(30, 5); // $ExpectType LoDashExplicitWrapper + fp.rangeRight(1, 11); // $ExpectType number[] + fp.rangeRight(1)(11); // $ExpectType number[] - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(10).rangeRight(); - result = _(1).rangeRight(11); - result = _(0).rangeRight(30, 5); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(10).chain().rangeRight(); - result = _(1).chain().rangeRight(11); - result = _(0).chain().rangeRight(30, 5); - } - - // $ExpectType number[][] - _.map([5, 5], _.rangeRight); + _.map([5, 5], _.range); // $ExpectType number[][] + _.map([5, 5], _.rangeRight); // $ExpectType number[][] } // _.runInContext { - let result: typeof _; - result = _.runInContext(); - result = _.runInContext({}); - result = _({}).runInContext(); + _.runInContext(); // $ExpectType LoDashStatic + _.runInContext({}); // $ExpectType LoDashStatic + _({}).runInContext(); // $ExpectType LoDashStatic + fp.runInContext({}); // $ExpectType LoDashStatic } // _.stubArray { - { - let result: any[]; - - result = _.stubArray(); - result = _(anything).stubArray(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _('a').chain().stubArray(); - result = _([1]).chain().stubArray(); - result = _(['']).chain().stubArray(); - result = _({}).chain().stubArray(); - result = _(anything).chain().stubArray(); - } + _.stubArray(); // $ExpectType any[] + _(anything).stubArray(); // $ExpectType any[] + _.chain(anything).stubArray(); // $ExpectType LoDashExplicitWrapper + fp.stubArray(); // $ExpectType any[] } // _.stubFalse { - { - let result: boolean; - - result = _.stubFalse(); - result = _(anything).stubFalse(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('a').chain().stubFalse(); - result = _([1]).chain().stubFalse(); - result = _(['']).chain().stubFalse(); - result = _({}).chain().stubFalse(); - result = _(anything).chain().stubFalse(); - } + _.stubFalse(); // $ExpectType boolean + _(anything).stubFalse(); // $ExpectType boolean + _.chain(anything).stubFalse(); // $ExpectType LoDashExplicitWrapper + fp.stubFalse(); // $ExpectType boolean } // _.stubObject { - { - let result: object; - - result = _.stubObject(); - result = _(anything).stubObject(); - } - - { - let result: _.LoDashExplicitObjectWrapper; - - result = _('a').chain().stubObject(); - result = _([1]).chain().stubObject(); - result = _(['']).chain().stubObject(); - result = _({}).chain().stubObject(); - result = _(anything).chain().stubObject(); - } + _.stubObject(); // $ExpectType any + _(anything).stubObject(); // $ExpectType any + _.chain(anything).stubObject(); // $ExpectType LoDashExplicitWrapper + fp.stubObject(); // $ExpectType any } // _.stubString { - { - let result: string; - - result = _.stubString(); - result = _(anything).stubString(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('a').chain().stubString(); - result = _([1]).chain().stubString(); - result = _(['']).chain().stubString(); - result = _({}).chain().stubString(); - result = _(anything).chain().stubString(); - } + _.stubString(); // $ExpectType string + _(anything).stubString(); // $ExpectType string + _.chain(anything).stubString(); // $ExpectType LoDashExplicitWrapper + fp.stubString(); // $ExpectType string } // _.stubTrue { - { - let result: boolean; - - result = _.stubTrue(); - result = _(anything).stubTrue(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('a').chain().stubTrue(); - result = _([1]).chain().stubTrue(); - result = _(['']).chain().stubTrue(); - result = _({}).chain().stubTrue(); - result = _(anything).chain().stubTrue(); - } + _.stubTrue(); // $ExpectType boolean + _(anything).stubTrue(); // $ExpectType boolean + _.chain(anything).stubTrue(); // $ExpectType LoDashExplicitWrapper + fp.stubTrue(); // $ExpectType boolean } // _.times -namespace TestTimes { - let iteratee: (num: number) => AbcObject = (num: number) => ({ a: 1, b: "", c: true }); +{ + const iteratee = (num: number): AbcObject => ({ a: 1, b: "", c: true }); - { - let result: number[]; - - result = _.times(42); - result = _(42).times(); - } - - { - let result: AbcObject[]; - - result = _.times(42, iteratee); - result = _(42).times(iteratee); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(42).chain().times(); - } - - { - let result: _.LoDashExplicitArrayWrapper; - - result = _(42).chain().times(iteratee); - } + _.times(42); // $ExpectType number[] + _.times(42, iteratee); // $ExpectType AbcObject[] + _(42).times(); // $ExpectType number[] + _(42).times(iteratee); // $ExpectType AbcObject[] + _.chain(42).times(); // $ExpectType LoDashExplicitWrapper + _.chain(42).times(iteratee); // $ExpectType LoDashExplicitWrapper + fp.times(iteratee, 42); // $ExpectType AbcObject[] + fp.times(iteratee)(42); // $ExpectType AbcObject[] } // _.toPath -namespace TestToPath { - { - let result: string[]; - result = _.toPath(true); - result = _.toPath(1); - result = _.toPath('a'); - result = _.toPath(["a"]); - result = _.toPath({}); - } - - { - let result: _.LoDashImplicitWrapper; - - result = _(true).toPath(); - result = _(1).toPath(); - result = _('a').toPath(); - result = _([1]).toPath(); - result = _(["a"]).toPath(); - result = _({}).toPath(); - } +{ + _.toPath(1); // $ExpectType string[] + _.toPath("a[0].b.c"); // $ExpectType string[] + _.toPath(["a", 1]); // $ExpectType string[] + _(1).toPath(); // $ExpectType LoDashImplicitWrapper + _("a[0].b.c").toPath(); // $ExpectType LoDashImplicitWrapper + _(["a", 1]).toPath(); // $ExpectType LoDashImplicitWrapper + _.chain(1).toPath(); // $ExpectType LoDashExplicitWrapper + _.chain("a[0].b.c").toPath(); // $ExpectType LoDashExplicitWrapper + _.chain(["a", 1]).toPath(); // $ExpectType LoDashExplicitWrapper + fp.toPath(true); // $ExpectType string[] + fp.toPath(1); // $ExpectType string[] + fp.toPath("a"); // $ExpectType string[] + fp.toPath(["a"]); // $ExpectType string[] + fp.toPath({}); // $ExpectType string[] } // _.uniqueId -namespace TestUniqueId { - { - let result: string; - - result = _.uniqueId(); - result = _.uniqueId(''); - - result = _('').uniqueId(); - } - - { - let result: _.LoDashExplicitWrapper; - - result = _('').chain().uniqueId(); - } +{ + _.uniqueId(); // $ExpectType string + _.uniqueId(""); // $ExpectType string + _("").uniqueId(); // $ExpectType string + _.chain("").uniqueId(); // $ExpectType LoDashExplicitWrapper + fp.uniqueId(""); // $ExpectType string } _.VERSION; // $ExpectType string @@ -14036,115 +7215,52 @@ _.templateSettings; // $ExpectType TemplateSettings // _.partial & _.partialRight { - function func0(): number { + const func0 = (): number => { return 42; - } - function func1(arg1: number): number { + }; + const func1 = (arg1: number): number => { return arg1 * 2; - } - function func2(arg1: number, arg2: string): number { + }; + const func2 = (arg1: number, arg2: string): number => { return arg1 * arg2.length; - } - function func3(arg1: number, arg2: string, arg3: boolean): number { + }; + const func3 = (arg1: number, arg2: string, arg3: boolean): number => { return arg1 * arg2.length + (arg3 ? 1 : 0); - } - function func4(arg1: number, arg2: string, arg3: boolean, arg4: number): number { - return arg1 * arg2.length + (arg3 ? 1 : 0) - arg4; - } - let res____: () => number; - let res1___: (arg1: number ) => number; - let res_2__: ( arg2: string ) => number; - let res__3_: ( arg3: boolean ) => number; - let res___4: ( arg4: number) => number; - let res12__: (arg1: number, arg2: string ) => number; - let res1_3_: (arg1: number, arg3: boolean ) => number; - let res1__4: (arg1: number, arg4: number) => number; - let res_23_: ( arg2: string, arg3: boolean ) => number; - let res_2_4: ( arg2: string, arg4: number) => number; - let res__34: ( arg3: boolean, arg4: number) => number; - let res123_: (arg1: number, arg2: string, arg3: boolean ) => number; - let res12_4: (arg1: number, arg2: string, arg4: number) => number; - let res1_34: (arg1: number, arg3: boolean, arg4: number) => number; - let res_234: ( arg2: string, arg3: boolean, arg4: number) => number; - let res1234: (arg1: number, arg2: string, arg3: boolean, arg4: number) => number; + }; - // - // _.partial - // // with arity 0 function - res____ = _.partial(func0); + _.partial(func0); // $ExpectType Function0 // with arity 1 function - res____ = _.partial(func1, 42 ); - res1___ = _.partial(func1 ); + _.partial(func1, 42); // $ExpectType Function0 + _.partial(func1); // $ExpectType Function1 // with arity 2 function - res12__ = _.partial(func2 ); - res_2__ = _.partial(func2, 42 ); - res1___ = _.partial(func2, _, "foo"); - res____ = _.partial(func2, 42, "foo"); + _.partial(func2); // $ExpectType Function2 + _.partial(func2, 42); // $ExpectType Function1 + _.partial(func2, _, "foo"); // $ExpectType Function1 + _.partial(func2, _.partial.placeholder, "foo"); // $ExpectType Function1 + _.partial(func2, 42, "foo"); // $ExpectType Function0 // with arity 3 function - res123_ = _.partial(func3 ); - res_23_ = _.partial(func3, 42 ); - res1_3_ = _.partial(func3, _, "foo" ); - res__3_ = _.partial(func3, 42, "foo" ); - res12__ = _.partial(func3, _, _, true); - res_2__ = _.partial(func3, 42, _, true); - res1___ = _.partial(func3, _, "foo", true); - res____ = _.partial(func3, 42, "foo", true); - // with arity 4 function - res1234 = _.partial(func4 ); - res_234 = _.partial(func4, 42 ); - res1_34 = _.partial(func4, _, "foo" ); - res__34 = _.partial(func4, 42, "foo" ); - res12_4 = _.partial(func4, _, _, true ); - res_2_4 = _.partial(func4, 42, _, true ); - res1__4 = _.partial(func4, _, "foo", true ); - res___4 = _.partial(func4, 42, "foo", true ); - res123_ = _.partial(func4, _, _, _, 100); - res_23_ = _.partial(func4, 42, _, _, 100); - res1_3_ = _.partial(func4, _, "foo", _, 100); - res__3_ = _.partial(func4, 42, "foo", _, 100); - res12__ = _.partial(func4, _, _, true, 100); - res_2__ = _.partial(func4, 42, _, true, 100); - res1___ = _.partial(func4, _, "foo", true, 100); - res____ = _.partial(func4, 42, "foo", true, 100); + _.partial(func3, 42, _, true); - // - // _.partialRight - // // with arity 0 function - res____ = _.partialRight(func0); + _.partialRight(func0); // $ExpectType Function0 // with arity 1 function - res____ = _.partialRight(func1, 42 ); - res1___ = _.partialRight(func1 ); + _.partialRight(func1, 42); // $ExpectType Function0 + _.partialRight(func1); // $ExpectType Function1 // with arity 2 function - res12__ = _.partialRight(func2 ); - res_2__ = _.partialRight(func2, 42, _); - res1___ = _.partialRight(func2, "foo"); - res____ = _.partialRight(func2, 42, "foo"); + _.partialRight(func2); // $ExpectType Function2 + _.partialRight(func2, 42, _); // $ExpectType Function1 + _.partialRight(func2, 42, _.partialRight.placeholder); // $ExpectType Function1 + _.partialRight(func2, "foo"); // $ExpectType Function1 + _.partialRight(func2, 42, "foo"); // $ExpectType Function0 // with arity 3 function - res123_ = _.partialRight(func3 ); - res_23_ = _.partialRight(func3, 42, _, _); - res1_3_ = _.partialRight(func3, "foo", _); - res__3_ = _.partialRight(func3, 42, "foo", _); - res12__ = _.partialRight(func3, true); - res_2__ = _.partialRight(func3, 42, _, true); - res1___ = _.partialRight(func3, "foo", true); - res____ = _.partialRight(func3, 42, "foo", true); - // with arity 4 function - res1234 = _.partialRight(func4 ); - res_234 = _.partialRight(func4, 42, _, _, _); - res1_34 = _.partialRight(func4, "foo", _, _); - res__34 = _.partialRight(func4, 42, "foo", _, _); - res12_4 = _.partialRight(func4, true, _); - res_2_4 = _.partialRight(func4, 42, _, true, _); - res1__4 = _.partialRight(func4, "foo", true, _); - res___4 = _.partialRight(func4, 42, "foo", true, _); - res123_ = _.partialRight(func4, 100); - res_23_ = _.partialRight(func4, 42, _, _, 100); - res1_3_ = _.partialRight(func4, "foo", _, 100); - res__3_ = _.partialRight(func4, 42, "foo", _, 100); - res12__ = _.partialRight(func4, true, 100); - res_2__ = _.partialRight(func4, 42, _, true, 100); - res1___ = _.partialRight(func4, "foo", true, 100); - res____ = _.partialRight(func4, 42, "foo", true, 100); + _.partialRight(func3, 42, _, true); + + fp.partial([], func0); // $ExpectType (...args: any[]) => any + fp.partial([])(func0); // $ExpectType (...args: any[]) => any + fp.partial([42])(func1); // $ExpectType (...args: any[]) => any + fp.partial([fp.partial.placeholder, "foo"])(func2); + fp.partialRight([])(func0); // $ExpectType (...args: any[]) => any + fp.partialRight([42])(func1); // $ExpectType (...args: any[]) => any + fp.partialRight([fp.partialRight.placeholder, "foo"])(func2); } diff --git a/types/lodash/readme.md b/types/lodash/readme.md new file mode 100644 index 0000000000..d65d7f878f --- /dev/null +++ b/types/lodash/readme.md @@ -0,0 +1,62 @@ +# Notes for lodash developers + +## Folder Structure + +- Root + - `index.d.ts`: this is the main file that will be imported when people do `import _ from "lodash"`. + It references files for the lodash types. + - `fp.d.ts`: like `index.d.ts`, but for the functional programming variant of lodash. + See https://github.com/lodash/lodash/wiki/FP-Guide. + - `lodash-tests.ts`: contains test cases. Update these as necessary when you make a change. + - `tsconfig.json`: usually you shouldn't modify this file. However, if you add a new file, you should + probably add it to the `files` list in `tsconfig.json`. + - `tslint.json`: contains lint rules. The goal is to remove all of the rule overrides and match only the `dtslint/dt.json` rules. + - All other files: these exist so people can import individual functions, e.g. `import * as flatMap from "lodash/flatMap"` +- `common` directory: contains the main lodash types, split into multiple files for maintainability reasons. + These files are NOT meant to be imported directly - they should only be referenced by `index.d.ts`. +- `fp` directory: contains individual functions for `lodash/fp`. These files may be imported. + You should not modify these scripts directly - you should use a script to re-generate them (see below). +- `scripts` directory: contains code generation scripts. + - Before running any scripts, run `npm install` in this directory (it contains its own `package.json`). + - Most notable script is `npm run fp`, which re-generates all of the `fp` files. +- `v3` directory: contains types for lodash v3. + +## Different ways people might use lodash + +- Importing + - `import * as _ from "lodash"` + - `import * as _ from "lodash/fp"` + - `import { flatMap } from "lodash"` + - `import { flatMap } from "lodash/fp"` + - `import * as flatMap from "lodash/flatMap"` + - `import * as flatMap from "lodash/fp/flatMap"` + - `import * as flatMap from "lodash.flatmap"` (requires `npm install lodash.flatmap`) + - `import _ = require("lodash")` + - `import _ from "lodash"` (only if `esModuleInterop` is enabled) +- Global namespace + +## Before creating a PR + +- For every function you modify, don't forget to update the corresponding wrapper functions. +- Re-generate the `fp` types by opening a terminal in the `scripts` directory and running `npm run fp`. + - Note that this directory has its own `package.json`, so you'll need to run `npm install` first if you haven't already. +- Back at the root directory, do `npm run lint lodash` and make sure there are no errors. + +## FAQ +- I'm fixing a bug in v4. Should I also update the v3 types? + - In general, no. +- If the wrapper functions are almost copies of the original functions, shouldn't we auto-generate them like we do for `lodash/fp`? + - Good idea! If you have time, submit a PR. +- When I ran `npm run lint lodash`, I got an error that loks like `<--- Last few GCs --->`. + - Yeah, this error is really annoying. It means that node.js ran out of memory before it could run all of your tests. + - If you see somthing like `Test with 2.6` before that error, it means that there's an error in an older version of typescript. + The hard part is figuring out what the error is. + - The general procedure for diagnosing these errors is: + 1. Delete half of the tests in `lodash-tests.ts` (either the top half or the bottom half). + - If you delete the top half, don't delete the important stuff like `interface AbcObject`. + 2. Run `npm run lint lodash`. + 3. If it succeeds, add that half back and delete the other half. + 4. If it fails with a GC error, delete half of the remaining tests. + - Note: If both halfs succeed on their own, then the tests are probably just consuming too much memory. Try simplifying them until they pass. + 5. Repeat steps 1-4 until it gives you the real error message. Usually it's something obscure that only happens in TS 2.3/T.4, + so commenting/modifying the test is usually the best solution. diff --git a/types/lodash/scripts/generate-all.sh b/types/lodash/scripts/generate-all.sh index 2f79589533..a07bf37932 100644 --- a/types/lodash/scripts/generate-all.sh +++ b/types/lodash/scripts/generate-all.sh @@ -5,6 +5,7 @@ npm i ts-node -g ts-node ./generate-modules.ts +ts-node ./generate-fp.ts cd ../../../ diff --git a/types/lodash/scripts/generate-fp.ts b/types/lodash/scripts/generate-fp.ts new file mode 100644 index 0000000000..3b8320b59c --- /dev/null +++ b/types/lodash/scripts/generate-fp.ts @@ -0,0 +1,921 @@ +// Script for converting the lodash types into functional programming (FP) format. +// The convertion is done based on this guide: https://github.com/lodash/lodash/wiki/FP-Guide + +// Assumptions: +// - All functions are defined in one of the files in the "common" subfolder +// - All functions are defined inside of the LoDashStatic interface (although functions like _.partial may refer to another interface in the same file) +// - Consistent indentation is used for the start and end of the above interface +// - Consistent spacing is used for interface definitions: interface MyInterface { +// - Consistent line breaks (\n, \r, or \r\n) are used in all files +// - All overloads of a given function are defined in the same file + +import fs from "fs"; +import _ from "lodash"; +import convert from "lodash/fp/convert"; +import path from "path"; + +interface Definition { + name: string; + overloads: Overload[]; + constants: string[]; + jsdoc: string; +} +interface InterfaceGroup { + functionName: string; + interfaces: Interface[]; +} +interface Interface { + name: string; + typeParams: TypeParam[]; + overloads: Overload[]; + constants: string[]; +} +interface Overload { + typeParams: TypeParam[]; + params: string[]; + returnType: string; + jsdoc: string; + tslintDisable?: string; +} +interface TypeParam { + name: string; + extends?: string; + equals?: string; +} + +let lineBreak = "\n"; +async function main() { + const commonTypes: string[] = []; + const tsconfigPath = path.join("..", "tsconfig.json"); + const tsconfigFile = await readFile(tsconfigPath); + lineBreak = _.find(["\r\n", "\n", "\r"], x => tsconfigFile.includes(x)) || "\n"; + + // Read each function definition and fp-ify it + const subfolders = ["common"]; + const promises: Array> = []; + for (const subfolder of subfolders) { + promises.push(new Promise((resolve, reject) => { + fs.readdir(path.join("..", subfolder), (err, files) => { + if (err) { + console.error(`failed to list directory contents for '${subfolder}': `, err); + reject(err); + return; + } + const filePaths = files.map(f => path.join("..", subfolder, f)); + try { + resolve(processDefinitions(filePaths, commonTypes)); + } catch (e) { + console.error(`failed to process files in '${subfolder}': `, e); + reject(e); + } + }); + })); + } + + let interfaceGroups: InterfaceGroup[]; + try { + interfaceGroups = _.flatten(await Promise.all(promises)); + } catch (err) { + console.error("Failed to parse all functions: ", err); + return; + } + interfaceGroups = _.sortBy(interfaceGroups, g => _.toLower(g.functionName)); + for (const interfaceGroup of interfaceGroups) { + // Rename interfaces for different versions of the same function with different arity (to avoid name conflicts). + // Don't rename aliases - instead they will be removed from the output when interfaces are written. + const interfaceName = interfaceGroup.interfaces[0].name; + const conflicts = interfaceGroups.filter(g => g.interfaces[0].name === interfaceName); + if (conflicts.length > 1 && _.some(conflicts, c => !_.isEqual(c.interfaces, conflicts[0].interfaces))) { + for (const conflict of conflicts) { + const oldName = conflict.interfaces[0].name; + const newName = getInterfaceBaseName(conflict.functionName); + for (const interfaceDef of conflict.interfaces) { + interfaceDef.name = interfaceDef.name.replace(oldName, newName); + for (const overload of interfaceDef.overloads) + overload.returnType = overload.returnType.replace(oldName, newName); + } + } + } + } + const interfaces = _.uniqBy(_.flatMap(interfaceGroups, g => g.interfaces), i => i.name); + const commonTypeSearch = new RegExp(`\\b(${commonTypes.join("|")})\\b`, "g"); + const interfaceStrings = _(interfaces) + .map(i => tab(interfaceToString(i), 1)) + .join(lineBreak) + .replace(commonTypeSearch, match => `lodash.${match}`); + const fpFile = [ + "// AUTO-GENERATED: do not modify this file directly.", + "// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:", + "// npm run fp", + "", + 'import lodash = require("./index");', + "", + "export = _;", + "", + "declare const _: _.LoDashFp;", + "declare namespace _ {", + interfaceStrings, + "", + " interface LoDashFp {", + ...interfaceGroups.map(g => ` ${g.functionName}: ${g.interfaces[0].name};`), + " __: lodash.__;", + " placehodler: lodash.__;", + " }", + "}", + "", + ].join(lineBreak); + fs.writeFile(path.join("..", "fp.d.ts"), fpFile, (err) => { + if (err) + console.error("Failed to write fp.d.ts: ", err); + }); + + // Make sure the generated files are listed in tsconfig.json, so they are included in the lint checks + const tsconfig = tsconfigFile.split(lineBreak).filter(row => !row.includes("fp/") || row.includes("fp/convert.d.ts")); + const newRows = interfaceGroups.map(g => ` "fp/${g.functionName}.d.ts",`) + .concat(["__", "placeholder"].map(p => ` "fp/${p}.d.ts",`)); + newRows[newRows.length - 1] = newRows[newRows.length - 1].replace(",", ""); + + const insertIndex = _.findLastIndex(tsconfig, row => row.trim() === "]"); // Assume "files" is the last array + if (!tsconfig[insertIndex - 1].endsWith(",")) + tsconfig[insertIndex - 1] += ","; + tsconfig.splice(insertIndex, 0, ...newRows); + + fs.writeFile(tsconfigPath, tsconfig.join(lineBreak), (err) => { + if (err) + console.error(`Failed to write ${tsconfigPath}: `, err); + }); +} + +function readFile(filePath: string): Promise { + return new Promise((resolve, reject) => { + fs.readFile(filePath, "utf8", (err, data) => { + if (err) { + reject(err); + return; + } + try { + resolve(data); + } catch (e) { + reject(e); + } + }); + }); +} + +async function processDefinitions(filePaths: string[], commonTypes: string[]): Promise { + const builder: { [name: string]: (...args: number[][]) => () => Interface[] } = {}; + const unconvertedBuilder: { [name: string]: (...args: number[][]) => () => Interface[] } = {}; + for (const filePath of filePaths) { + const definitions = await parseFile(filePath, commonTypes); + for (const definition of definitions) { + if (definition.overloads.every(o => o.params.length <= 1 && (o.returnType === "typeof _" || o.returnType === "LoDashStatic"))) { + // Our convert technique doesn't work well on "typeof _" functions (or at least runInContext) + // Plus, if there are 0-1 parameters, there's nothing to curry anyways. + unconvertedBuilder[definition.name] = (...args: number[][]) => { + return () => curryDefinition(definition, args[0] || [], -1, false); + }; + } else { + builder[definition.name] = (...args: Array) => { + // args were originally passed in as [0], [1], [2], [3], [4]. If they changed order, that indicates how the functoin was re-arged + // Return a function because some definitons (like rearg) expect to have a function return value + + // If any argument is a number instead of an array, then the argument at that index is being spread (e.g. assignAll, invokeArgs, partial, without) + const spreadIndex = args.findIndex(a => typeof a === "number"); + let isFixed = true; + if (spreadIndex !== -1) { + // If there's a spread parameter, convert() won't cap the number of arguments, so we need to do it manually + const arity = Math.max(spreadIndex, args[spreadIndex] as number) + 1; + args = args.slice(0, arity); + } else if (args.length > 4 || definition.name === "flow" || definition.name === "flowRight") { + // Arity wasn't fixed by convert() + isFixed = false; + } else { + // For some reason, convert() doesn't seems to tell us which functions have unchanged argument order. + // So we have to hard-code it. + const unchangedOrders = ["add", "assign", "assignIn", "bind", "bindKey", "concat", "difference", "divide", "eq", + "gt", "gte", "isEqual", "lt", "lte", "matchesProperty", "merge", "multiply", "overArgs", "partial", "partialRight", + "propertyOf", "random", "range", "rangeRight", "subtract", "zip", "zipObject", "zipObjectDeep"]; + if (unchangedOrders.includes(definition.name)) + args = _.sortBy(args as number[][], (a: number[]) => a[0]); + } + + return () => curryDefinition(definition, _.flatten(args), spreadIndex, isFixed); + }; + } + } + } + + // Use convert() to tell us how functions will be rearged and aliased + const builderFp = convert(builder, { rearg: true, fixed: true, immutable: false, curry: false, cap: false }); + _.defaults(builderFp, unconvertedBuilder); + + const functionNames = Object.keys(builderFp).filter(key => key !== "convert" && typeof builderFp[key] === "function"); + const interfaceGroups: InterfaceGroup[] = functionNames.map((functionName): InterfaceGroup => ({ + functionName, + // Assuming the maximum arity is 4. Pass one more arg than the max arity so we can detect if arguments weren't fixed. + interfaces: builderFp[functionName]([0], [1], [2], [3], [4])([0], [1], [2], [3], [4]), + })); + for (const functionName of functionNames) { + const output = [ + `import { ${functionName} } from "../fp";`, + `export = ${functionName};`, + "", + ].join(lineBreak); + const targetFile = `../fp/${functionName}.d.ts`; + fs.writeFile(targetFile, output, (err) => { + if (err) + console.error(`failed to write file: ${targetFile}`, err); + }); + } + return interfaceGroups; +} + +async function parseFile(filePath: string, commonTypes: string[]): Promise { + const definitionString = await readFile(filePath); + const newCommonTypeRegExp = / (?:type|interface) ([A-Za-z0-9_]+)/g; + let newCommonType = newCommonTypeRegExp.exec(definitionString); + while (newCommonType) { + if (!commonTypes.includes(newCommonType[1])) + commonTypes.push(newCommonType[1]); + newCommonType = newCommonTypeRegExp.exec(definitionString); + } + + const definitons: Definition[] = []; + const lodashStaticRegExp = /( *)interface LoDashStatic {/g; + let lodashStaticMatch = lodashStaticRegExp.exec(definitionString); + while (lodashStaticMatch) { + const startIndex = lodashStaticMatch.index; + const endIndex = definitionString.indexOf(`${lineBreak}${lodashStaticMatch[1]}}`, startIndex); + if (endIndex === -1) { + const lineNumber = getLineNumber(definitionString, startIndex); + console.warn(`Failed to find end of interface 'LoDashStatic' (starting at ${filePath} line ${lineNumber}).`); + break; + } + const parsedDefinitions = parseDefinitions(definitionString, startIndex + lodashStaticMatch[0].length, endIndex, filePath, commonTypes); + definitons.push(...parsedDefinitions); + lodashStaticMatch = lodashStaticRegExp.exec(definitionString); + } + const __test = definitons.filter(d => !_.isEmpty(d.constants)); + return definitons; +} + +function parseDefinitions(definitionString: string, startIndex: number, endIndex: number, filePath: string, commonTypes: string[], name?: string): Definition[] { + const parentName = name; + const overloadRegExp = name ? / [<(]/g : / (\w+)[<(:]/g; + overloadRegExp.lastIndex = startIndex; + let overloadMatch = overloadRegExp.exec(definitionString); + if (!overloadMatch) { + const lineNumber = getLineNumber(definitionString, startIndex); + console.warn(`No function definitions were found in interface at ${filePath} line ${lineNumber}.`); + return []; + } + const definitons: Definition[] = []; + let currentDefinition: Definition | undefined; + for (; overloadMatch && overloadMatch.index < endIndex; overloadMatch = overloadRegExp.exec(definitionString)) { + name = overloadMatch[1] || name!; + + const overloadStartIndex = overloadMatch.index; + if (!currentDefinition || name !== currentDefinition.name) { + if (currentDefinition && !_.isEmpty(currentDefinition.overloads)) + definitons.push(currentDefinition); + currentDefinition = { name, overloads: [], constants: [], jsdoc: "" }; + const jsdocStartIndex = definitionString.lastIndexOf("/**", overloadStartIndex); + const jsdocEndIndex = definitionString.indexOf("*/", jsdocStartIndex); + if (jsdocStartIndex !== -1 && jsdocStartIndex > startIndex && jsdocEndIndex !== -1 && jsdocEndIndex < overloadStartIndex) { + // Verify that the comment is for this overload + const overloadTestIndex = definitionString.indexOf(" " + name, jsdocEndIndex); + if (overloadTestIndex === overloadStartIndex) + currentDefinition.jsdoc = definitionString.substring(jsdocStartIndex, jsdocEndIndex + 2).replace(/ /g, ""); + } + } + let overloadEndIndex = definitionString.indexOf(";", overloadStartIndex); + if (overloadEndIndex === -1 || overloadEndIndex > endIndex) { + const lineNumber = getLineNumber(definitionString, overloadStartIndex); + console.warn(`Overload does not end with semicolon! ${filePath} line ${lineNumber}`); + break; + } + overloadRegExp.lastIndex = overloadEndIndex; + if (name === "chain" || name === "mixin" || name.startsWith("prototype.")) + continue; + + const overloadString = definitionString.substring(overloadStartIndex, overloadEndIndex); + let paramStartIndex = overloadString.indexOf("("); + if (paramStartIndex !== -1) { + const overload: Overload = { typeParams: [], params: [], returnType: "", jsdoc: currentDefinition.jsdoc }; + + const previousLine = getPreviousLine(definitionString, overloadStartIndex).trim(); + if (previousLine.startsWith("// tslint:disable")) + overload.tslintDisable = previousLine; + + const typeParamStartIndex = overloadString.indexOf("<"); + if (typeParamStartIndex !== -1 && typeParamStartIndex < paramStartIndex) { + const typeParamEndIndex = overloadString.indexOf(">(", typeParamStartIndex); + if (typeParamEndIndex !== -1) { + paramStartIndex = typeParamEndIndex + 1; + overload.typeParams = overloadString + .substring(typeParamStartIndex + 1, typeParamEndIndex) + .split(",") + .map((tpString): TypeParam => { + const typeParam: TypeParam = { name: tpString }; + let parts = tpString.split(/=[^>]/); + if (parts[1]) + typeParam.equals = parts[1].trim(); + parts = tpString.split(" extends "); + if (parts[1]) + typeParam.extends = parts[1].trim(); + typeParam.name = parts[0].trim(); + return typeParam; + }); + } + } + const paramEndIndex = overloadString.indexOf("):", paramStartIndex); + if (paramEndIndex === -1) { + console.warn(`Failed to find parameter end position in overload for '${name}' (${filePath}).`); + continue; + } + overload.params = overloadString + .substring(paramStartIndex + 1, paramEndIndex) + .split(/,(?=[^,]+:)(?=(?:[^()]*|.*\(.*\).*)$)/m) // split on commas, but ignore Generic and (a, b) => c + .map(_.trim) + .map(o => _.trim(o, ",")) + .filter(o => !!o); + overload.returnType = overloadString.substring(paramEndIndex + 2).trim(); + currentDefinition.overloads.push(overload); + } else { + // This overload actually points to an interface. Try to find said interface and get the overloads from there. + const overloadParts = overloadString.split(":"); + const interfaceName = overloadParts[1].trim(); + if (interfaceName.startsWith("typeof ") || interfaceName.startsWith("LoDashStatic[")) { + // This is an alias (e.g. first: typeof _.head, or first: LoDashStatic['head']). + // Ignore it since convert() will create this alias based on the original function. + continue; + } + let interfaceStartIndex: number; + let interfaceEndIndex: number; + if (!interfaceName.startsWith("{")) { + const ignoreInterfaceNames = ["string", "TemplateSettings", "MapCacheConstructor"]; + if (ignoreInterfaceNames.includes(interfaceName)) + continue; + const interfaceRegExp = new RegExp(`( *)interface ${interfaceName} {`); + const interfaceMatch = interfaceRegExp.exec(definitionString); + if (!interfaceMatch) { + const lineNumber = getLineNumber(definitionString, overloadStartIndex); + console.warn(`Failed to parse function '${name}': interface '${interfaceName}' not found. (${filePath} line ${lineNumber})`); + continue; + } + interfaceStartIndex = interfaceMatch.index + interfaceMatch[0].length; + interfaceEndIndex = definitionString.indexOf(`${lineBreak}${interfaceMatch[1]}}`, interfaceStartIndex); + if (interfaceEndIndex === -1) { + const lineNumber = getLineNumber(definitionString, interfaceStartIndex); + console.warn(`Failed to find end of interface '${interfaceName}' (starting at ${filePath} line ${lineNumber}).`); + continue; + } + _.pull(commonTypes, interfaceName); + } else { + // This is an inline type definition + interfaceStartIndex = definitionString.indexOf("{", overloadStartIndex + overloadParts[0].length) + 1; + interfaceEndIndex = definitionString.indexOf("}", interfaceStartIndex); + if (interfaceEndIndex === -1 || interfaceEndIndex >= endIndex) { + console.warn(`Failed to find closing '}' character for property '${name}' (${filePath}).`); + continue; + } + overloadEndIndex = definitionString.indexOf(";", interfaceEndIndex); + if (overloadEndIndex === -1 || overloadEndIndex >= endIndex) { + const lineNumber = getLineNumber(definitionString, overloadStartIndex); + console.warn(`Overload does not end with semicolon! ${filePath} line ${lineNumber}`); + continue; + } + overloadRegExp.lastIndex = overloadEndIndex; + } + const [definition] = parseDefinitions(definitionString, interfaceStartIndex, interfaceEndIndex, filePath, commonTypes, name); + if (definition) { + if (currentDefinition.jsdoc) + for (const overload of definition.overloads) + overload.jsdoc = currentDefinition.jsdoc; + currentDefinition.overloads.push(...definition.overloads); + currentDefinition.constants.push(...definition.constants); + } + } + } + if (parentName && currentDefinition) { + const constantRexExp = / (\w+): *([^()\r\n]+);[\r\n]/g; + constantRexExp.lastIndex = startIndex; + for (let constantMatch = constantRexExp.exec(definitionString); constantMatch && constantMatch.index < endIndex; constantMatch = constantRexExp.exec(definitionString)) { + currentDefinition.constants.push(`${constantMatch[1]}: ${constantMatch[2]}`); + } + } + + if (currentDefinition && !_.isEmpty(currentDefinition.overloads)) + definitons.push(currentDefinition); + return definitons; +} + +function curryDefinition(definition: Definition, paramOrder: number[], spreadIndex: number, isFixed: boolean): Interface[] { + // Remove any duplicate/redundant overloads + let overloads = _.uniqWith(_.cloneDeep(definition.overloads), + (a, b) => _.isEqual(a.params, b.params) && _.isEqual(getUsedTypeParams(a.params, a.typeParams), getUsedTypeParams(b.params, b.typeParams))); + const functionName = definition.name; + // Remove unused type parameters + for (const overload of overloads) { + for (let i = 0; i < overload.typeParams.length; ++i) { + const typeParam = overload.typeParams[i]; + const search = new RegExp(`\\b${typeParam.name}\\b`); + if (overload.params.every(p => !search.test(p)) && !search.test(overload.returnType)) { + // overload.returnType = overload.returnType.replace(search, typeParam.extends || "any"); + overload.typeParams.splice(i, 1); + --i; + } + } + } + + if (!isFixed) { + // Non-fixed arity functions cannot be curried. + for (const overload of overloads) + overload.params = overload.params.map(p => p.replace(/\?:/g, ":")); // No optional parameters + return [{ + name: getInterfaceBaseName(functionName), + typeParams: [], + overloads, + constants: definition.constants, + }]; + } + paramOrder = paramOrder.filter(p => typeof p === "number"); + const arity = paramOrder.length; + + if (spreadIndex !== -1) { + // The parameter at this index is an array that will be spread when passed down to the actual function (e.g. assignAll, invokeArgs, partial, without). + // For these parameters, we expect the input to be an array (so remove the "...") + + // Spread/rest parameters could be in any of the following formats: + // 1. The rest parameter is at spreadIndex, and it is the last parameter. + // 2. The rest parameter is immediately after spreadIndex, e.g. assign(object, ...sources[]). In this case, convert it to assignAll(...object[]) + // 3. The rest parameter is not the last parameter, e.g. assignWith(object, ...sources[], customizer) + if (spreadIndex === arity - 1) { + // cases 1-2 + for (let i = 0; i < overloads.length; ++i) { + const overload = overloads[i]; + if (overload.params.length === arity && overload.params[spreadIndex] && overload.params[spreadIndex].startsWith("...")) { + overload.params[spreadIndex] = overload.params[spreadIndex].replace("...", ""); + } else if (overload.params.length === arity + 1 && overload.params[spreadIndex + 1] && overload.params[spreadIndex + 1].startsWith("...")) { + overload.params.splice(spreadIndex + 1, 1); + const parts = overload.params[spreadIndex].split(":").map(_.trim); + parts[1] = `ReadonlyArray<${parts[1]}>`; + overload.params[spreadIndex] = `${parts[0]}: ${parts[1]}`; + } else { + _.pull(overloads, overload); + --i; + } + } + } else { + // case 3 + const overload = overloads[0]; + overloads = [{ + jsdoc: overload.jsdoc, + typeParams: [], + params: [ + ...overload.params.slice(0, spreadIndex), + "args: ReadonlyArray", + ...overload.params.slice(overload.params.length - (arity - spreadIndex - 1)), + ], + returnType: "any", + }]; + } + } + + let filteredOverloads = overloads.filter(o => o.params.length >= arity && o.params.slice(arity).every(p => p.includes("?") && !p.startsWith("iteratee")) + && o.params.every(p => !p.startsWith("...") && !p.startsWith("guard:"))); + if (filteredOverloads.length === 0) + filteredOverloads = overloads.filter(o => o.params.length >= arity && o.params.slice(arity).every(p => p.includes("?") || p.startsWith("...")) + && o.params.every(p => !p.startsWith("guard:"))); + if (filteredOverloads.length === 0) + filteredOverloads = overloads.filter(o => o.params.length > 0 && o.params.length <= arity + 1 && o.params[o.params.length - 1].startsWith("...")); + if (filteredOverloads.length === 0) + console.warn(`No matching overloads found for ${functionName} with arity ${arity}`); + + const restOverloads = overloads.filter(o => o.params.length > 0 && o.params[o.params.length - 1].startsWith("...")); + for (const restOverload of restOverloads) { + restOverload.params[restOverload.params.length - 1] = restOverload.params[restOverload.params.length - 1] + .substring(3) + .replace(/\[\]$/, "") + .replace(/: Array<(.+)>$/, ": $1"); + if (restOverload.params.length < arity) { + const paramToCopy = restOverload.params[restOverload.params.length - 1]; + const copiedParams = _.range(2, arity - restOverload.params.length + 2).map(i => paramToCopy.replace(/(^.+?):/, `$1${i}:`)); + restOverload.params.push(...copiedParams); + } + } + + for (const overload of filteredOverloads) + preProcessOverload(overload, functionName, arity); + + const interfaces = _.flatMap(filteredOverloads, (o, i) => { + const reargParams = o.params.map((p, i) => o.params[paramOrder.indexOf(i)]); + return curryOverload({ + typeParams: o.typeParams, + params: reargParams, + returnType: o.returnType, + jsdoc: o.jsdoc, + }, functionName, i + 1); + }); + if (interfaces.length === 0) + return []; + // Merge interfaces with the same name + const mainInterface = interfaces[0]; + const interfacesToMerge = interfaces.filter(i => i.name === mainInterface.name); + mergeInterfaces(interfacesToMerge); + _.remove(interfaces, i => i !== mainInterface && interfacesToMerge.includes(i)); + // Check for any non-main interfaces that should now be merged + for (const overload of mainInterface.overloads) { + const others = mainInterface.overloads.filter(o2 => o2 !== overload + && _.isEqual(overload.typeParams, o2.typeParams) + && _.isEqual(overload.params.map(getParamType), o2.params.map(getParamType))); + const returnInterface = interfaces.find(i => new RegExp(`\\b${i.name}\\b`).test(overload.returnType)); + for (const otherOverload of others) { + for (let i = 0; i < overload.params.length; ++i) { + const paramNames = _.uniq([overload].concat(others).map(o => getParamName(o.params[i]))); + if (paramNames.length > 1) { + // Some param names are different. Merge them. + const paramType = getParamType(overload.params[i]); + overload.params[i] = `${paramNames[0]}Or${paramNames.slice(1).map(_.upperFirst).join("Or")}: ${paramType}`; + } + } + if (otherOverload.returnType === overload.returnType) { + // Exact duplicate - remove the second overload + _.pull(mainInterface.overloads, otherOverload); + } else { + // Duplicate except for the return type. If the return types are both known interfaces, + // merge the interfaces so we can remove the second overload + const otherReturnInterface = interfaces.find(i => new RegExp(`\\b${i.name}\\b`).test(otherOverload.returnType)); + if (returnInterface && otherReturnInterface) { + _.remove(otherReturnInterface.overloads, o => new RegExp(`\\b${otherReturnInterface.name}\\b`).test(o.returnType)); + mergeInterfaces([returnInterface, otherReturnInterface]); + _.pull(interfaces, otherReturnInterface); + // Rename any other references to the removed interface(s) + for (const overload of _.flatMap(interfaces, i => i.overloads)) + overload.returnType = overload.returnType.replace(new RegExp(`\\b${otherReturnInterface.name}\\b`), returnInterface.name); + } + } + } + _.pull(mainInterface.overloads, ...others); + } + for (const interfaceDef of interfaces) + interfaceDef.overloads = mergeSimilarOverloads(interfaceDef.overloads); + interfaces[0].constants = definition.constants; + return interfaces; +} + +function getParamName(param: string) { + return param.split(":", 1)[0]; +} + +function getParamType(param: string) { + const index = param.indexOf(":"); + return index !== -1 ? param.substring(index + 1).trim() : "any"; +} + +function isPlaceholder(param: string) { + return param.endsWith("__"); +} + +function preProcessOverload(overload: Overload, functionName: string, arity: number): void { + overload.params = overload.params + .slice(0, arity) + .map(p => p + .replace(/\?:/g, ":") // No optional parameters + .replace(/: *(?:Array<(.+)>|([^ |]+)\[\]|\((.+)\)\[\])$/, ": ReadonlyArray<$1$2$3>")); // Convert Array to ReadonlyArray because lodash/fp treats everything as immutable + // Cap the number of callback arguments + for (let i = 0; i < overload.params.length; ++i) + overload.params[i] = capCallback(overload.params[i], functionName); +} + +function capCallback(parameter: string, functionName: string): string { + // We don't support capping these callbacks yet, so flag them if detected + if (functionName !== "zipWith" && functionName !== "unzipWith" && /(?:iteratee|predicate|callback): *\((?:[^,)]+,[^)]+| *\.\.\..+)\) ?=>/.test(parameter)) + console.warn(`${functionName}: Failed to cap callback: ${parameter}`); + + // Special case for mapKeys: callback is capped to the key parameter only + if (functionName === "mapKeys") { + parameter = parameter + .replace(/(iteratee|predicate|callback): *(?:Array|List|NumericDictionary|String)Iteratee<(.+)>$/g, "$1: ValueIteratee") + .replace(/(iteratee|predicate|callback): *(?:Dictionary|Object)Iteratee<(.+)>$/g, "$1: ValueIteratee") + .replace(/(iteratee|predicate|callback): *(?:Array|List|NumericDictionary|String)Iteratee(?:Custom)?<(.+?),(.+)>$/g, "$1: ValueIterateeCustom") + .replace(/(iteratee|predicate|callback): *(?:Dictionary|Object)Iteratee(?:Custom)?<(.+?),(.+)>$/g, "$1: ValueIterateeCustom"); + } + + // Special case for reduceRight: callback argument order of (b, a) + if (functionName === "reduceRight") { + parameter = parameter + .replace(/(iteratee|predicate|callback): *Memo(Void)?(?:List|Object|Dictionary)Iterator<([^,>]+),([^,>]+)(?:,[^,>]+?()?)?>/g, "$1: Memo$2IteratorCappedRight<$3,$4>"); + } + + return parameter + .replace(/(iteratee|predicate|callback): *(?:Array|List|Dictionary|NumericDictionary|String)Iteratee<(.+)>$/g, "$1: ValueIteratee<$2>") + .replace(/(iteratee|predicate|callback): *(?:Array|List|Dictionary|NumericDictionary|String)Iteratee(?:Custom)?<(.+?),(.+)>$/g, "$1: ValueIterateeCustom<$2,$3>") + .replace(/(iteratee|predicate|callback): *(?:Array|List|Dictionary|NumericDictionary|String)IteratorTypeGuard<(.+?),(.+)>$/g, "$1: ValueIteratorTypeGuard<$2,$3>") + .replace(/(iteratee|predicate|callback): *ObjectIteratee<(.+)>$/g, "$1: ValueIteratee<$2[keyof $2]>") + .replace(/(iteratee|predicate|callback): *ObjectIterateeCustom<(.+?),(.+)>$/g, "$1: ValueIterateeCustom<$2[keyof $2],$3>") + .replace(/(iteratee|predicate|callback): *ObjectIteratorTypeGuard<(.+?),(.+)>$/g, "$1: ValueIteratorTypeGuard<$2[keyof $2],$3>") + .replace(/(iteratee|predicate|callback): *(?:Array|List|Dictionary|NumericDictionary)Iterator<(.+?), *(.+)>$/g, "$1: (value: $2) => $3") + .replace(/(iteratee|predicate|callback): *StringIterator<(.+)>$/g, "$1: (value: string) => $2") + .replace(/(iteratee|predicate|callback): *ObjectIterator<(.+?), *(.+?)>$/g, "$1: (value: $2[keyof $2]) => $3") + .replace(/(iteratee|predicate|callback): *Memo(Void)?(?:Array|List|Object|Dictionary)Iterator<([^,>]+),([^,>]+)(?:,[^,>]+?()?)?>/g, "$1: Memo$2IteratorCapped<$3,$4>") + .replace(/(iteratees|predicates|callbacks): *Many<(?:Array|List|Dictionary|NumericDictionary|String)Iteratee<(.+?)>>/g, "$1: Many>") + .replace(/(iteratees|predicates|callbacks): *Many>/g, "$1: Many>") + .replace(/(iteratees|predicates|callbacks): *Many<(?:Array|List|Dictionary|NumericDictionary)Iterator<(.+?), *(.+?)>>/g, "$1: Many<(value: $2) => $3>") + .replace(/(iteratees|predicates|callbacks): *Many>/g, "$1: Many<(value: $2[keyof $2]) => $3>"); +} + +function curryOverload(overload: Overload, functionName: string, overloadId: number): Interface[] { + const baseName = getInterfaceBaseName(functionName); + if (overload.params.length <= 1) { + // Functions with 0 or 1 arguments are not curried. Just use a basic function type. + return [{ + name: baseName, + overloads: [overload], + typeParams: [], + constants: [], + }]; + } + + // Create a separate interface for each possible combination of parameters that could be passed. + // i = binary representation of which parameters were passed to result in this interface (reversed), e.g. + // 1 = 0001 = 1st parameter was passed; 2nd-4th remain + // 6 = 1010 = 2nd and 4th parameters were passed; 1st and 3rd remain + const interfaces: Interface[] = []; + const interfaceCount = (1 << overload.params.length) - 1; + for (let i = 0; i < interfaceCount; ++i) { + const interfaceDef = curryParams(baseName, overloadId, overload, i); + interfaces.push(interfaceDef); + } + // The T[keyof T] constraint doesn't work so well if it's the only constraint. Convert to a plain old T constraint so it can be merged with + // other ValueIteratee overloads + for (const interfaceDef of interfaces) { + for (const overload of interfaceDef.overloads) { + const objectTypeParam = overload.typeParams.find(tp => tp.name === "T" && (tp.extends === "object" || !tp.extends)); + if (objectTypeParam && overload.params.some(p => p.includes("T[keyof T]")) && !overload.params.some(p => /T(?!]|\[keyof T])/.test(p))) { + delete objectTypeParam.extends; + overload.params = overload.params.map(p => p.replace(/\bArray/g, " T[]").replace(/\bT\[keyof T]/g, "T")); + const fixInterfaceName = overload.returnType.split("<")[0]; + const fixInterface = interfaces.find(i => i.name === fixInterfaceName); + if (fixInterface) { + const fixTypeParam = fixInterface.typeParams.find(tp => tp.name === objectTypeParam.name && (tp.extends === "object" || !tp.extends)); + if (fixTypeParam) { + delete fixTypeParam.extends; + for (const fixOverload of fixInterface.overloads) { + // This overload has T referring to a whole object. But now T refers to a single element, so fix it. + // If there's only 1 usage, replace it with 'object'. If there are multiple, create a new type constraint. + const typeParamSearch = new RegExp(`\\b${fixTypeParam.name}\\b(?:(?!(?:\\[keyof ${fixTypeParam.name})?\\])|$)`); + const matches = fixOverload.params.concat(fixOverload.returnType).filter(value => typeParamSearch.test(value)); + let replacement = "object"; + if (matches.length >= 2) { + let i = 1; + const newTypeParam: TypeParam = { name: "T" + i, extends: replacement }; + while (fixInterface.typeParams.some(t => t.name === newTypeParam.name) || fixOverload.typeParams.some(t => t.name === newTypeParam.name)) + newTypeParam.name = "T" + (++i); + fixOverload.typeParams.push(newTypeParam); + replacement = newTypeParam.name; + } + fixOverload.params = fixOverload.params + .map(p => p.replace(new RegExp(typeParamSearch, "g"), replacement) + .replace(new RegExp(`\\bArray<${fixTypeParam.name}\\[keyof ${fixTypeParam.name}]>`, "g"), fixTypeParam.name + "[]") + .replace(new RegExp(`\\b${fixTypeParam.name}\\[keyof ${fixTypeParam.name}]`, "g"), fixTypeParam.name)); + if (!new RegExp(`\\b${baseName}[0-9]+x[0-9]+\\b`).test(fixOverload.returnType)) { + fixOverload.returnType = fixOverload.returnType + .replace(new RegExp(typeParamSearch, "g"), replacement) + .replace(new RegExp(`\\bArray<${fixTypeParam.name}\\[keyof ${fixTypeParam.name}]>`, "g"), fixTypeParam.name + "[]") + .replace(new RegExp(`\\b${fixTypeParam.name}\\[keyof ${fixTypeParam.name}]`, "g"), fixTypeParam.name); + } + } + } + } else { + console.warn(`Fixed T[keyof T] overload, but could not find corresponding interface '${fixInterfaceName}'.`); + } + } + } + } + return interfaces; +} + +function curryParams( + baseName: string, + sourceOverloadId: number, + sourceOverload: Overload, + interfaceIndex: number, +): Interface { + const params = getInterfaceParams(sourceOverload, interfaceIndex); + const interfaceTypeParams = getInterfaceTypeParams(sourceOverload, interfaceIndex); + + const prevParams = _.without(sourceOverload.params, ...params); + const prevTypeParams = getUsedTypeParams(prevParams, sourceOverload.typeParams); + const typeParams = _.without(sourceOverload.typeParams, ...prevTypeParams); + // 1st overload takes no parameters and just returns the same interface (effectively a no-op) + // HACK: omit the parameterless overload because it's not very useful, and it causes the build to run out of memory + // This assumes params.length > 0, which is true because curryParams is only called when params.length >= 2. + /*const overloads: Overload[] = [{ + typeParams: [], + params: [], + returnType: getInterfaceName(baseName, sourceOverloadId, interfaceIndex, interfaceTypeParams), + jsdoc: sourceOverload.jsdoc, + }];*/ + const overloads: Overload[] = []; + const lastOverload = (1 << params.length) - 1; + for (let i = 1; i <= lastOverload; ++i) { + // xxxx i = number of parameters used by this overload + // const totalCombinations = nCk(params.length, i); + // i = binary representation of which parameters are used for this overload (reversed), e.g. + // 1 = 0001 -> 1000 = 1st parameter + // 6 = 1010 -> 0101 = 2nd and 4th parameters + const currentParams = params.map((p, j) => (i & (1 << j)) ? p : `${getParamName(p)}: __`); + while (currentParams.length > 0 && _.last(currentParams)!.endsWith("__")) + currentParams.pop(); // There's no point in passing a placeholder as the last parameter, so don't allow it. + + const usedTypeParams = i < lastOverload ? getUsedTypeParams(currentParams, typeParams) : typeParams; + const combinedIndex = combineIndexes(interfaceIndex, i); + const passTypeParams = getInterfaceTypeParams(sourceOverload, combinedIndex); + const currentReturnType = i < lastOverload ? getInterfaceName(baseName, sourceOverloadId, combinedIndex, passTypeParams) : sourceOverload.returnType; + + overloads.push({ + typeParams: _.cloneDeep(usedTypeParams), + params: currentParams, + returnType: currentReturnType, + jsdoc: interfaceIndex === 0 ? sourceOverload.jsdoc : "", + }); + } + const interfaceDef: Interface = { + name: getInterfaceName(baseName, sourceOverloadId, interfaceIndex, []), + typeParams: _.cloneDeep(interfaceTypeParams), + overloads, + constants: [], + }; + // Remove the `extends` constraint from interface type parameters, because sometimes they extend things that aren't passed to the interface. + for (const typeParam of interfaceDef.typeParams) { + if (!_.startsWith(typeParam.extends, "keyof ")) // We need to keep `extends keyof` constraints, because they're needed for TObject[TKey] to work. + delete typeParam.extends; + } + return interfaceDef; +} + +function getInterfaceBaseName(functionName: string) { + return "Lodash" + _.upperFirst(functionName); +} + +function getInterfaceParams(overload: Overload, interfaceIndex: number) { + return overload.params.filter((p, j) => !(interfaceIndex & (1 << j))); +} + +function getUsedTypeParams(params: string[], typeParams: TypeParam[]) { + const usedTypeParams = typeParams.filter(tp => params.some(p => new RegExp(`\\b${tp.name}\\b`).test(p))); + usedTypeParams.unshift(...typeParams.filter(tp => + !usedTypeParams.includes(tp) && usedTypeParams.some(tp2 => !!tp2.extends && new RegExp(`\\b${tp.name}\\b`).test(tp2.extends)))); + return usedTypeParams; +} + +function getInterfaceTypeParams(overload: Overload, interfaceIndex: number) { + const currentParams = getInterfaceParams(overload, interfaceIndex); + const passedParams = _.without(overload.params, ...currentParams); + const passedTypeParams = getUsedTypeParams(passedParams, overload.typeParams); + const interfaceTypeParams = passedTypeParams.filter(tp => currentParams.concat(overload.returnType).some(p => new RegExp(`\\b${tp.name}\\b`).test(p))); + interfaceTypeParams.unshift(...overload.typeParams.filter(tp => + !interfaceTypeParams.includes(tp) && interfaceTypeParams.some(tp2 => !!tp2.extends && new RegExp(`^keyof ${tp.name}\\b`).test(tp2.extends)))); + return interfaceTypeParams; +} + +function mergeInterfaces(interfaces: Interface[]): void { + const mainInterface = interfaces[0]; + if (!mainInterface) + return; + mainInterface.overloads = _.uniqWith(_.flatMap(interfaces, i => i.overloads), _.isEqual); +} + +function mergeSimilarOverloads(overloads: Overload[]): Overload[] { + const newOverloads = _.cloneDeep(overloads); + for (const overload of newOverloads) { + // We can merge if all param types are the same except one, and the return types are the same. + // Also, we can't merge a placeholder param with a non-placeholder. + const others = newOverloads.filter(o2 => o2 !== overload + && _.isEqual(overload.typeParams, o2.typeParams) + && overload.params.length === o2.params.length + && overload.params.length >= 1 + && overload.params.every((p, i) => isPlaceholder(p) === isPlaceholder(o2.params[i])) + && overload.params.filter((p, i) => getParamType(p) !== getParamType(o2.params[i])).length <= 1 + && overload.returnType === o2.returnType); + if (_.isEmpty(others)) + continue; + + const differingParamIndexes = _(others) + .map(o2 => overload.params.findIndex((p, i) => getParamType(p) !== getParamType(o2.params[i]))) + .filter(i => i !== -1) + .uniq() + .value(); + if (differingParamIndexes.length > 1) + continue; // Only one param is different, but it's a different param for some overloads, so we can't merge + const similarOverloads = [overload].concat(others); + for (let i = 0; i < overload.params.length; ++i) { + const paramNames = _.uniq(similarOverloads.map(o => getParamName(o.params[i]))); + const newParamName = (paramNames.length > 1) ? `${paramNames[0]}Or${paramNames.slice(1).map(_.upperFirst).join("Or")}` : paramNames[0]; + + const newParamType = _(similarOverloads) + .map(o => o.params[i]) + .flatMap(p => getParamType(p).split("|")) + .map(_.trim) + .uniq() + .sortBy(type => type === "undefined" ? 2 : (type === "null" ? 1 : 0)) + .join(" | "); + overload.params[i] = `${newParamName}: ${newParamType}`; + } + _.pull(newOverloads, ...others); + } + return newOverloads; +} + +function combineIndexes(i1: number, i2: number): number { + let result = i1; + let resultMask = 1; + for (let i2mask = 1; i2mask <= i2; i2mask <<= 1) { + while (result & resultMask) + resultMask <<= 1; + if (i2 & i2mask) + result += resultMask; + resultMask <<= 1; + } + return result; +} + +function getInterfaceName(baseName: string, overloadId: number, index: number, typeParams: TypeParam[]): string { + let interfaceName = baseName; + if (index > 0) + interfaceName += `${overloadId}x${index}${typeParamsToString(typeParams, false)}`; + return interfaceName; +} + +function interfaceToString(interfaceDef: Interface): string { + if (_.isEmpty(interfaceDef.overloads)) { + // No point in creating an empty interface + return ""; + } else if (interfaceDef.overloads.length === 1 && _.isEmpty(interfaceDef.constants)) { + // Don't create an interface for a single type. Instead use a basic type def. + const overload = interfaceDef.overloads[0]; + // HACK: omit jsdoc comments because they cause the build to run out of memory + // const jsdoc = overload.jsdoc; + const jsdoc = ""; + overload.jsdoc = ""; + let overloadString = overloadToString(overload, true); + overloadString = jsdoc ? lineBreak + tab(jsdoc + lineBreak + overloadString, 1) : " " + overloadString; + return `type ${interfaceDef.name}${typeParamsToString(interfaceDef.typeParams)} =${overloadString}`; + } else { + const overloadStrings = interfaceDef.overloads.map(o => lineBreak + tab(overloadToString(o), 1)).join("") + + interfaceDef.constants.map(c => `${lineBreak}${tab(c, 1)};`).join(""); + return `interface ${interfaceDef.name}${typeParamsToString(interfaceDef.typeParams)} {${overloadStrings}${lineBreak}}`; + } +} + +function overloadToString(overload: Overload, arrowSyntax = false): string { + const joinedParams = overload.params.join(", "); + // HACK: omit jsdoc comments because they cause the build to run out of memory + // let jsdoc = overload.jsdoc; + let jsdoc = ""; + if (jsdoc) + jsdoc += lineBreak; + if (overload.tslintDisable) + jsdoc += overload.tslintDisable + lineBreak; + return `${jsdoc}${typeParamsToString(overload.typeParams)}(${joinedParams})${arrowSyntax ? " =>" : ":"} ${overload.returnType};`; +} + +function typeParamsToString(typeParams: TypeParam[], includeConstraints = true): string { + return typeParams.length > 0 ? `<${typeParams.map(tp => + tp.name + + (includeConstraints && tp.extends ? " extends " + tp.extends : "") + + (includeConstraints && tp.equals ? " = " + tp.equals : "") + ).join(", ")}>` : ""; +} + +function getPreviousLine(s: string, index: number): string { + const eol = s.lastIndexOf(lineBreak, index); + if (eol === -1) + return ""; + const bol = s.lastIndexOf(lineBreak, eol - 1); + if (bol === -1) + return ""; + return s.substring(bol + 1, eol); +} + +function getLineNumber(fileContents: string, index: number) { + return fileContents.substring(0, index).split(lineBreak).length + 1; +} + +function tab(s: string, count: number) { + const prepend: string = " ".repeat(count * 4); + return (s[0] === "\n" || s[0] === "\r" ? "" : prepend) + s.replace(/(?:\r\n|\n|\r)(.)/g, `${lineBreak}${prepend}$1`); +} + +function indexOfAny(source: string, values: string[], position?: number): number { + const indexes: number[] = []; + for (const value of values) { + const index = source.indexOf(value, position); + if (index !== -1) + indexes.push(index); + } + return indexes.length > 0 ? _.min(indexes)! : -1; +} + +main(); diff --git a/types/lodash/scripts/package.json b/types/lodash/scripts/package.json new file mode 100644 index 0000000000..f98c233642 --- /dev/null +++ b/types/lodash/scripts/package.json @@ -0,0 +1,14 @@ +{ + "private": true, + "name": "lodash-scripts", + "version": "0.0.1", + "scripts": { + "fp": "ts-node generate-fp" + }, + "devDependencies": { + "lodash": "^4.17.4", + "ts-node": "^4.1.0", + "typescript": "^2.7.1" + }, + "dependencies": {} +} diff --git a/types/lodash/scripts/tsconfig.json b/types/lodash/scripts/tsconfig.json index a06b8ed24f..023cb6a0cb 100644 --- a/types/lodash/scripts/tsconfig.json +++ b/types/lodash/scripts/tsconfig.json @@ -1,10 +1,18 @@ { "compilerOptions": { - "target": "es6", + "target": "es2017", + "module": "commonjs", "baseUrl": "../..", + "esModuleInterop": true, + "noEmit": true, + "noImplicitAny": true, + "pretty": true, + "strict": true, "typeRoots": [ "../../" ], - "types": [] + "types": [ + "lodash" + ] } -} \ No newline at end of file +} diff --git a/types/lodash/tsconfig.json b/types/lodash/tsconfig.json index 7ab3d8db99..60a2e8323c 100644 --- a/types/lodash/tsconfig.json +++ b/types/lodash/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true }, "files": [ "index.d.ts", @@ -103,6 +104,7 @@ "forInRight.d.ts", "forOwn.d.ts", "forOwnRight.d.ts", + "fp.d.ts", "fromPairs.d.ts", "functions.d.ts", "functionsIn.d.ts", @@ -316,6 +318,404 @@ "zip.d.ts", "zipObject.d.ts", "zipObjectDeep.d.ts", - "zipWith.d.ts" + "zipWith.d.ts", + "common/array.d.ts", + "common/collection.d.ts", + "common/common.d.ts", + "common/date.d.ts", + "common/function.d.ts", + "common/lang.d.ts", + "common/math.d.ts", + "common/number.d.ts", + "common/object.d.ts", + "common/seq.d.ts", + "common/string.d.ts", + "common/util.d.ts", + "fp/convert.d.ts", + "fp/add.d.ts", + "fp/after.d.ts", + "fp/all.d.ts", + "fp/allPass.d.ts", + "fp/always.d.ts", + "fp/any.d.ts", + "fp/anyPass.d.ts", + "fp/apply.d.ts", + "fp/ary.d.ts", + "fp/assign.d.ts", + "fp/assignAll.d.ts", + "fp/assignAllWith.d.ts", + "fp/assignIn.d.ts", + "fp/assignInAll.d.ts", + "fp/assignInAllWith.d.ts", + "fp/assignInWith.d.ts", + "fp/assignWith.d.ts", + "fp/assoc.d.ts", + "fp/assocPath.d.ts", + "fp/at.d.ts", + "fp/attempt.d.ts", + "fp/before.d.ts", + "fp/bind.d.ts", + "fp/bindAll.d.ts", + "fp/bindKey.d.ts", + "fp/camelCase.d.ts", + "fp/capitalize.d.ts", + "fp/castArray.d.ts", + "fp/ceil.d.ts", + "fp/chunk.d.ts", + "fp/clamp.d.ts", + "fp/clone.d.ts", + "fp/cloneDeep.d.ts", + "fp/cloneDeepWith.d.ts", + "fp/cloneWith.d.ts", + "fp/compact.d.ts", + "fp/complement.d.ts", + "fp/compose.d.ts", + "fp/concat.d.ts", + "fp/cond.d.ts", + "fp/conforms.d.ts", + "fp/conformsTo.d.ts", + "fp/constant.d.ts", + "fp/contains.d.ts", + "fp/countBy.d.ts", + "fp/create.d.ts", + "fp/curry.d.ts", + "fp/curryN.d.ts", + "fp/curryRight.d.ts", + "fp/curryRightN.d.ts", + "fp/debounce.d.ts", + "fp/deburr.d.ts", + "fp/defaults.d.ts", + "fp/defaultsAll.d.ts", + "fp/defaultsDeep.d.ts", + "fp/defaultsDeepAll.d.ts", + "fp/defaultTo.d.ts", + "fp/defer.d.ts", + "fp/delay.d.ts", + "fp/difference.d.ts", + "fp/differenceBy.d.ts", + "fp/differenceWith.d.ts", + "fp/dissoc.d.ts", + "fp/dissocPath.d.ts", + "fp/divide.d.ts", + "fp/drop.d.ts", + "fp/dropLast.d.ts", + "fp/dropLastWhile.d.ts", + "fp/dropRight.d.ts", + "fp/dropRightWhile.d.ts", + "fp/dropWhile.d.ts", + "fp/each.d.ts", + "fp/eachRight.d.ts", + "fp/endsWith.d.ts", + "fp/entries.d.ts", + "fp/entriesIn.d.ts", + "fp/eq.d.ts", + "fp/equals.d.ts", + "fp/escape.d.ts", + "fp/escapeRegExp.d.ts", + "fp/every.d.ts", + "fp/extend.d.ts", + "fp/extendAll.d.ts", + "fp/extendAllWith.d.ts", + "fp/extendWith.d.ts", + "fp/F.d.ts", + "fp/fill.d.ts", + "fp/filter.d.ts", + "fp/find.d.ts", + "fp/findFrom.d.ts", + "fp/findIndex.d.ts", + "fp/findIndexFrom.d.ts", + "fp/findKey.d.ts", + "fp/findLast.d.ts", + "fp/findLastFrom.d.ts", + "fp/findLastIndex.d.ts", + "fp/findLastIndexFrom.d.ts", + "fp/findLastKey.d.ts", + "fp/first.d.ts", + "fp/flatMap.d.ts", + "fp/flatMapDeep.d.ts", + "fp/flatMapDepth.d.ts", + "fp/flatten.d.ts", + "fp/flattenDeep.d.ts", + "fp/flattenDepth.d.ts", + "fp/flip.d.ts", + "fp/floor.d.ts", + "fp/flow.d.ts", + "fp/flowRight.d.ts", + "fp/forEach.d.ts", + "fp/forEachRight.d.ts", + "fp/forIn.d.ts", + "fp/forInRight.d.ts", + "fp/forOwn.d.ts", + "fp/forOwnRight.d.ts", + "fp/fromPairs.d.ts", + "fp/functions.d.ts", + "fp/functionsIn.d.ts", + "fp/get.d.ts", + "fp/getOr.d.ts", + "fp/groupBy.d.ts", + "fp/gt.d.ts", + "fp/gte.d.ts", + "fp/has.d.ts", + "fp/hasIn.d.ts", + "fp/head.d.ts", + "fp/identical.d.ts", + "fp/identity.d.ts", + "fp/includes.d.ts", + "fp/includesFrom.d.ts", + "fp/indexBy.d.ts", + "fp/indexOf.d.ts", + "fp/indexOfFrom.d.ts", + "fp/init.d.ts", + "fp/initial.d.ts", + "fp/inRange.d.ts", + "fp/intersection.d.ts", + "fp/intersectionBy.d.ts", + "fp/intersectionWith.d.ts", + "fp/invert.d.ts", + "fp/invertBy.d.ts", + "fp/invertObj.d.ts", + "fp/invoke.d.ts", + "fp/invokeArgs.d.ts", + "fp/invokeArgsMap.d.ts", + "fp/invokeMap.d.ts", + "fp/isArguments.d.ts", + "fp/isArray.d.ts", + "fp/isArrayBuffer.d.ts", + "fp/isArrayLike.d.ts", + "fp/isArrayLikeObject.d.ts", + "fp/isBoolean.d.ts", + "fp/isBuffer.d.ts", + "fp/isDate.d.ts", + "fp/isElement.d.ts", + "fp/isEmpty.d.ts", + "fp/isEqual.d.ts", + "fp/isEqualWith.d.ts", + "fp/isError.d.ts", + "fp/isFinite.d.ts", + "fp/isFunction.d.ts", + "fp/isInteger.d.ts", + "fp/isLength.d.ts", + "fp/isMap.d.ts", + "fp/isMatch.d.ts", + "fp/isMatchWith.d.ts", + "fp/isNaN.d.ts", + "fp/isNative.d.ts", + "fp/isNil.d.ts", + "fp/isNull.d.ts", + "fp/isNumber.d.ts", + "fp/isObject.d.ts", + "fp/isObjectLike.d.ts", + "fp/isPlainObject.d.ts", + "fp/isRegExp.d.ts", + "fp/isSafeInteger.d.ts", + "fp/isSet.d.ts", + "fp/isString.d.ts", + "fp/isSymbol.d.ts", + "fp/isTypedArray.d.ts", + "fp/isUndefined.d.ts", + "fp/isWeakMap.d.ts", + "fp/isWeakSet.d.ts", + "fp/iteratee.d.ts", + "fp/join.d.ts", + "fp/juxt.d.ts", + "fp/kebabCase.d.ts", + "fp/keyBy.d.ts", + "fp/keys.d.ts", + "fp/keysIn.d.ts", + "fp/last.d.ts", + "fp/lastIndexOf.d.ts", + "fp/lastIndexOfFrom.d.ts", + "fp/lowerCase.d.ts", + "fp/lowerFirst.d.ts", + "fp/lt.d.ts", + "fp/lte.d.ts", + "fp/map.d.ts", + "fp/mapKeys.d.ts", + "fp/mapValues.d.ts", + "fp/matches.d.ts", + "fp/matchesProperty.d.ts", + "fp/max.d.ts", + "fp/maxBy.d.ts", + "fp/mean.d.ts", + "fp/meanBy.d.ts", + "fp/memoize.d.ts", + "fp/merge.d.ts", + "fp/mergeAll.d.ts", + "fp/mergeAllWith.d.ts", + "fp/mergeWith.d.ts", + "fp/method.d.ts", + "fp/methodOf.d.ts", + "fp/min.d.ts", + "fp/minBy.d.ts", + "fp/multiply.d.ts", + "fp/nAry.d.ts", + "fp/negate.d.ts", + "fp/noConflict.d.ts", + "fp/noop.d.ts", + "fp/now.d.ts", + "fp/nth.d.ts", + "fp/nthArg.d.ts", + "fp/omit.d.ts", + "fp/omitAll.d.ts", + "fp/omitBy.d.ts", + "fp/once.d.ts", + "fp/orderBy.d.ts", + "fp/over.d.ts", + "fp/overArgs.d.ts", + "fp/overEvery.d.ts", + "fp/overSome.d.ts", + "fp/pad.d.ts", + "fp/padChars.d.ts", + "fp/padCharsEnd.d.ts", + "fp/padCharsStart.d.ts", + "fp/padEnd.d.ts", + "fp/padStart.d.ts", + "fp/parseInt.d.ts", + "fp/partial.d.ts", + "fp/partialRight.d.ts", + "fp/partition.d.ts", + "fp/path.d.ts", + "fp/pathEq.d.ts", + "fp/pathOr.d.ts", + "fp/paths.d.ts", + "fp/pick.d.ts", + "fp/pickAll.d.ts", + "fp/pickBy.d.ts", + "fp/pipe.d.ts", + "fp/pluck.d.ts", + "fp/prop.d.ts", + "fp/propEq.d.ts", + "fp/property.d.ts", + "fp/propertyOf.d.ts", + "fp/propOr.d.ts", + "fp/props.d.ts", + "fp/pull.d.ts", + "fp/pullAll.d.ts", + "fp/pullAllBy.d.ts", + "fp/pullAllWith.d.ts", + "fp/pullAt.d.ts", + "fp/random.d.ts", + "fp/range.d.ts", + "fp/rangeRight.d.ts", + "fp/rangeStep.d.ts", + "fp/rangeStepRight.d.ts", + "fp/rearg.d.ts", + "fp/reduce.d.ts", + "fp/reduceRight.d.ts", + "fp/reject.d.ts", + "fp/remove.d.ts", + "fp/repeat.d.ts", + "fp/replace.d.ts", + "fp/rest.d.ts", + "fp/restFrom.d.ts", + "fp/result.d.ts", + "fp/reverse.d.ts", + "fp/round.d.ts", + "fp/runInContext.d.ts", + "fp/sample.d.ts", + "fp/sampleSize.d.ts", + "fp/set.d.ts", + "fp/setWith.d.ts", + "fp/shuffle.d.ts", + "fp/size.d.ts", + "fp/slice.d.ts", + "fp/snakeCase.d.ts", + "fp/some.d.ts", + "fp/sortBy.d.ts", + "fp/sortedIndex.d.ts", + "fp/sortedIndexBy.d.ts", + "fp/sortedIndexOf.d.ts", + "fp/sortedLastIndex.d.ts", + "fp/sortedLastIndexBy.d.ts", + "fp/sortedLastIndexOf.d.ts", + "fp/sortedUniq.d.ts", + "fp/sortedUniqBy.d.ts", + "fp/split.d.ts", + "fp/spread.d.ts", + "fp/spreadFrom.d.ts", + "fp/startCase.d.ts", + "fp/startsWith.d.ts", + "fp/stubArray.d.ts", + "fp/stubFalse.d.ts", + "fp/stubObject.d.ts", + "fp/stubString.d.ts", + "fp/stubTrue.d.ts", + "fp/subtract.d.ts", + "fp/sum.d.ts", + "fp/sumBy.d.ts", + "fp/symmetricDifference.d.ts", + "fp/symmetricDifferenceBy.d.ts", + "fp/symmetricDifferenceWith.d.ts", + "fp/T.d.ts", + "fp/tail.d.ts", + "fp/take.d.ts", + "fp/takeLast.d.ts", + "fp/takeLastWhile.d.ts", + "fp/takeRight.d.ts", + "fp/takeRightWhile.d.ts", + "fp/takeWhile.d.ts", + "fp/tap.d.ts", + "fp/template.d.ts", + "fp/throttle.d.ts", + "fp/thru.d.ts", + "fp/times.d.ts", + "fp/toArray.d.ts", + "fp/toFinite.d.ts", + "fp/toInteger.d.ts", + "fp/toLength.d.ts", + "fp/toLower.d.ts", + "fp/toNumber.d.ts", + "fp/toPairs.d.ts", + "fp/toPairsIn.d.ts", + "fp/toPath.d.ts", + "fp/toPlainObject.d.ts", + "fp/toSafeInteger.d.ts", + "fp/toString.d.ts", + "fp/toUpper.d.ts", + "fp/transform.d.ts", + "fp/trim.d.ts", + "fp/trimChars.d.ts", + "fp/trimCharsEnd.d.ts", + "fp/trimCharsStart.d.ts", + "fp/trimEnd.d.ts", + "fp/trimStart.d.ts", + "fp/truncate.d.ts", + "fp/unapply.d.ts", + "fp/unary.d.ts", + "fp/unescape.d.ts", + "fp/union.d.ts", + "fp/unionBy.d.ts", + "fp/unionWith.d.ts", + "fp/uniq.d.ts", + "fp/uniqBy.d.ts", + "fp/uniqueId.d.ts", + "fp/uniqWith.d.ts", + "fp/unnest.d.ts", + "fp/unset.d.ts", + "fp/unzip.d.ts", + "fp/unzipWith.d.ts", + "fp/update.d.ts", + "fp/updateWith.d.ts", + "fp/upperCase.d.ts", + "fp/upperFirst.d.ts", + "fp/useWith.d.ts", + "fp/values.d.ts", + "fp/valuesIn.d.ts", + "fp/where.d.ts", + "fp/whereEq.d.ts", + "fp/without.d.ts", + "fp/words.d.ts", + "fp/wrap.d.ts", + "fp/xor.d.ts", + "fp/xorBy.d.ts", + "fp/xorWith.d.ts", + "fp/zip.d.ts", + "fp/zipAll.d.ts", + "fp/zipObj.d.ts", + "fp/zipObject.d.ts", + "fp/zipObjectDeep.d.ts", + "fp/zipWith.d.ts", + "fp/__.d.ts", + "fp/placeholder.d.ts" ] } \ No newline at end of file diff --git a/types/lodash/tslint.json b/types/lodash/tslint.json index 57df94df09..9457e4398f 100644 --- a/types/lodash/tslint.json +++ b/types/lodash/tslint.json @@ -2,20 +2,10 @@ "extends": "dtslint/dt.json", "rules": { // All are TODOs - "comment-format": [false], - "interface-over-type-literal": false, "jsdoc-format": false, "max-line-length": [false], - "no-namespace": false, "no-unnecessary-generics": false, - "no-void-expression": false, - "object-literal-key-quotes": false, - "one-line": false, - "prefer-const": false, - "semicolon": false, - "space-within-parens": false, "typedef-whitespace": [false], - "unified-signatures": false, - "whitespace": [false] + "unified-signatures": false } } diff --git a/types/lolex/index.d.ts b/types/lolex/index.d.ts index 68f87793d9..fc6dcc3b4b 100644 --- a/types/lolex/index.d.ts +++ b/types/lolex/index.d.ts @@ -75,14 +75,14 @@ export interface LolexClock { * @param args Any extra arguments to pass to the callback. * @returns Time identifier for cancellation. */ - setTimeout(callback: () => any, timeout: number, ...args: any[]): TTimerId; + setTimeout: (callback: () => any, timeout: number, ...args: any[]) => TTimerId; /** * Clears a timer, as long as it was created using setTimeout. * * @param id Timer ID or object. */ - clearTimeout(id: TTimerId): void; + clearTimeout: (id: TTimerId) => void; /** * Schedules a callback to be fired every time timeout milliseconds have ticked by. @@ -92,14 +92,14 @@ export interface LolexClock { * @param args Any extra arguments to pass to the callback. * @returns Time identifier for cancellation. */ - setInterval(callback: () => any, timeout: number, ...args: any[]): TTimerId; + setInterval: (callback: () => any, timeout: number, ...args: any[]) => TTimerId; /** * Clears a timer, as long as it was created using setInterval. * * @param id Timer ID or object. */ - clearInterval(id: TTimerId): void; + clearInterval: (id: TTimerId) => void; /** * Schedules the callback to be fired once 0 milliseconds have ticked by. @@ -108,44 +108,44 @@ export interface LolexClock { * @remarks You'll still have to call clock.tick() for the callback to fire. * @remarks If called during a tick the callback won't fire until 1 millisecond has ticked by. */ - setImmediate(callback: () => any): TTimerId; + setImmediate: (callback: () => any) => TTimerId; /** * Clears a timer, as long as it was created using setImmediate. * * @param id Timer ID or object. */ - clearImmediate(id: TTimerId): void; + clearImmediate: (id: TTimerId) => void; /** * Simulates process.nextTick(); */ - nextTick(callback: () => void): void; + nextTick: (callback: () => void) => void; /** * Advances the clock to the the moment of the first scheduled timer, firing it. */ - next(): void; + next: () => void; /** * Advance the clock, firing callbacks if necessary. * * @param time How many ticks to advance by. */ - tick(time: number | string): void; + tick: (time: number | string) => void; /** * Runs all pending timers until there are none remaining. * * @remarks If new timers are added while it is executing they will be run as well. */ - runAll(): void; + runAll: () => void; /** * Takes note of the last scheduled timer when it is run, and advances the clock to * that time firing callbacks as necessary. */ - runToLast(): void; + runToLast: () => void; /** * Simulates a user changing the system clock. @@ -153,13 +153,13 @@ export interface LolexClock { * @param now New system time. * @remarks This affects the current time but it does not in itself cause timers to fire. */ - setSystemTime(now?: number | Date): void; + setSystemTime: (now?: number | Date) => void; /** * Restores the original methods on the context that was passed to lolex.install, * or the native timers if no context was given. */ - uninstall(): void; + uninstall: () => void; } /** diff --git a/types/lolex/lolex-tests.ts b/types/lolex/lolex-tests.ts index 95b6a2be78..4de6ecc7a6 100644 --- a/types/lolex/lolex-tests.ts +++ b/types/lolex/lolex-tests.ts @@ -73,3 +73,7 @@ nodeClock.nextTick(() => undefined); browserClock.uninstall(); nodeClock.uninstall(); + +// Clocks should be typed to have unbound method signatures that can be passed around +const { clearTimeout } = browserClock; +clearTimeout(0); diff --git a/types/lolex/tslint.json b/types/lolex/tslint.json index a41bf5d19a..2fd2e55629 100644 --- a/types/lolex/tslint.json +++ b/types/lolex/tslint.json @@ -43,6 +43,7 @@ "no-self-import": false, "no-single-declare-module": false, "no-string-throw": false, + "no-unbound-method": true, "no-unnecessary-callback-wrapper": false, "no-unnecessary-class": false, "no-unnecessary-generics": false, diff --git a/types/lory.js/index.d.ts b/types/lory.js/index.d.ts index 37ff46d4be..dd37fb8efa 100644 --- a/types/lory.js/index.d.ts +++ b/types/lory.js/index.d.ts @@ -4,7 +4,7 @@ // philip bulley // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare var lory: LoryStatic; +export declare var lory: LoryStatic; interface LoryStatic { (element: Element, options?: LoryOptions): LoryStatic; diff --git a/types/lory.js/lory.js-tests.ts b/types/lory.js/lory.js-tests.ts index bad97dadf3..616073f180 100644 --- a/types/lory.js/lory.js-tests.ts +++ b/types/lory.js/lory.js-tests.ts @@ -1,4 +1,4 @@ - +import { lory } from 'lory.js'; (function() { var elm = document.querySelector('.js-foo'); diff --git a/types/luxon/index.d.ts b/types/luxon/index.d.ts index ed78e5d542..c3b9d2a029 100644 --- a/types/luxon/index.d.ts +++ b/types/luxon/index.d.ts @@ -135,8 +135,10 @@ declare module 'luxon' { second?: number, millisecond?: number ): DateTime; - static max(...dateTimes: DateTime[]): DateTime | undefined; - static min(...dateTimes: DateTime[]): DateTime | undefined; + static max(): undefined; + static max(...dateTimes: DateTime[]): DateTime; + static min(): undefined; + static min(...dateTimes: DateTime[]): DateTime; static utc( year?: number, month?: number, diff --git a/types/mailgun-js/index.d.ts b/types/mailgun-js/index.d.ts new file mode 100644 index 0000000000..0ab5efcf45 --- /dev/null +++ b/types/mailgun-js/index.d.ts @@ -0,0 +1,167 @@ +// Type definitions for mailgun-js 0.16 +// Project: https://github.com/bojand/mailgun-js +// Definitions by: Sampson Oliver +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/// + +declare const out: Mailgun.MailgunExport; +export = out; + +declare namespace Mailgun { + interface ConstructorParams { + apiKey: string; + publicApiKey?: string; + domain: string; + mute?: boolean; + timeout?: number; + host?: string; + endpoint?: string; + protocol?: string; + port?: number; + retry?: + | number + | { + times: number; + interval: number; + }; + proxy?: string; + } + + interface Error { + statusCode: number; + message: string; + } + + interface AttachmentParams { + data: string | Buffer | NodeJS.ReadWriteStream; + filename?: string; + knownLength?: number; + contentType?: string; + } + + class Attachment { + constructor(params: AttachmentParams); + data: string | Buffer | NodeJS.ReadWriteStream; + filename?: string; + knownLength?: number; + contentType?: string; + getType(): string; + } + + interface MailgunExport { + new (options: ConstructorParams): Mailgun; + (options: ConstructorParams): Mailgun; + } + + namespace messages { + interface SendData { + from?: string; + to: string | string[]; + cc?: string; + bcc?: string; + subject?: string; + text?: string; + html?: string; + attachment?: string | Buffer | NodeJS.ReadWriteStream | Attachment; + } + + interface BatchData extends SendData { + "recipient-variables"?: BatchSendRecipientVars; + } + + interface BatchSendRecipientVars { + [email: string]: { + first: string; + id: number; + }; + } + + interface SendResponse { + message: string; + id: string; + } + } + + namespace lists { + interface MemberCreateData { + subscribed: boolean; + address: string; + name: string; + vars?: object; + } + + interface MemberUpdateData { + subscribed: boolean; + name: string; + vars?: object; + } + + interface Members { + create( + data: MemberCreateData, + callback?: (err: Error, data: any) => void + ): Promise; + + add( + data: MemberCreateData[], + callback?: (err: Error, data: any) => void + ): Promise; + + list(callback?: (err: Error, data: any) => void): Promise; + } + + interface Member { + update( + data: MemberUpdateData, + callback?: (err: Error, data: any) => void + ): Promise; + } + } + + namespace validation { + interface ParseResponse { + parsed: string[]; + unparseable: string[]; + } + + interface ValidateResponse { + is_valid: boolean; + } + } + + interface Mailgun { + messages(): Messages; + lists(list: string): Lists; + Attachment: typeof Attachment; + validateWebhook( + bodyTimestamp: number, + bodyToken: string, + bodySignature: string + ): boolean; + + parse( + addressList: string[], + callback?: (error: Error, body: validation.ValidateResponse) => void + ): Promise; + + validate( + address: string, + callback?: (error: Error, body: validation.ValidateResponse) => void + ): Promise; + } + + interface Lists { + info(callback?: (error: Error, data: any) => void): Promise; + members(): lists.Members; + members(member: string): lists.Member; + } + + interface Messages { + send( + data: messages.SendData | messages.BatchData, + callback?: (error: Error, body: messages.SendResponse) => void + ): Promise; + } +} diff --git a/types/mailgun-js/mailgun-js-tests.ts b/types/mailgun-js/mailgun-js-tests.ts new file mode 100644 index 0000000000..dfbe8ab4a1 --- /dev/null +++ b/types/mailgun-js/mailgun-js-tests.ts @@ -0,0 +1,32 @@ +import * as mailgunFactory from "mailgun-js"; +import mailgunFactory2 = require('mailgun-js'); + +const mailgun = new mailgunFactory({ + apiKey: "auth.api_key", + domain: "auth.domain" +}); + +const mailgun2 = new mailgunFactory2({ + apiKey: "auth.api_key", + domain: "auth.domain" +}); + +mailgun.messages().send( + { + to: "fixture.message.to" + }, + err => { + console.log; + } +); + +mailgun.messages().send( + { + to: "someone@email.com", + attachment: new mailgun.Attachment({ + data: "filepath", + filename: "my_custom_name.png" + }) + }, + (err, body) => {} +); diff --git a/types/mailgun-js/tsconfig.json b/types/mailgun-js/tsconfig.json new file mode 100644 index 0000000000..b6a747659c --- /dev/null +++ b/types/mailgun-js/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": false, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "mailgun-js-tests.ts"] +} diff --git a/types/mailgun-js/tslint.json b/types/mailgun-js/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/mailgun-js/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/mapbox-gl-leaflet/index.d.ts b/types/mapbox-gl-leaflet/index.d.ts new file mode 100644 index 0000000000..34e3578eac --- /dev/null +++ b/types/mapbox-gl-leaflet/index.d.ts @@ -0,0 +1,20 @@ +// Type definitions for mapbox-gl-leaflet 0.0 +// Project: https://github.com/brunob/leaflet.fullscreen +// Definitions by: Alexey Gorshkov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import * as L from 'leaflet'; + +declare module 'leaflet' { + class MapboxGL extends Layer { + constructor(options: MapboxGLOptions); + } + + function mapboxGL(options: MapboxGLOptions): MapboxGL; + + interface MapboxGLOptions { + accessToken: string; + style: string; + } +} diff --git a/types/mapbox-gl-leaflet/mapbox-gl-leaflet-tests.ts b/types/mapbox-gl-leaflet/mapbox-gl-leaflet-tests.ts new file mode 100644 index 0000000000..3c8bc6a207 --- /dev/null +++ b/types/mapbox-gl-leaflet/mapbox-gl-leaflet-tests.ts @@ -0,0 +1,14 @@ +import * as L from 'leaflet'; + +const token = 'token'; + +const map = L.map('map').setView([38.912753, -77.032194], 15); +L.marker([38.912753, -77.032194]) + .bindPopup("Hello Leaflet GL!
Whoa, it works!") + .addTo(map) + .openPopup(); + +const gl = L.mapboxGL({ + accessToken: token, + style: 'mapbox://styles/mapbox/bright-v8' +}).addTo(map); diff --git a/types/mapbox-gl-leaflet/tsconfig.json b/types/mapbox-gl-leaflet/tsconfig.json new file mode 100644 index 0000000000..0eef6c85dd --- /dev/null +++ b/types/mapbox-gl-leaflet/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "strictNullChecks": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "mapbox-gl-leaflet-tests.ts" + ] +} \ No newline at end of file diff --git a/types/mapbox-gl-leaflet/tslint.json b/types/mapbox-gl-leaflet/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/mapbox-gl-leaflet/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/mapbox-gl/index.d.ts b/types/mapbox-gl/index.d.ts index a51172daec..b6a63ef9dd 100644 --- a/types/mapbox-gl/index.d.ts +++ b/types/mapbox-gl/index.d.ts @@ -399,7 +399,7 @@ declare namespace mapboxgl { * Navigation */ export class NavigationControl extends Control { - constructor(); + constructor(options?: {showCompass?: boolean, showZoom?: boolean}); } export class PositionOptions { @@ -610,7 +610,7 @@ declare namespace mapboxgl { interface RasterSource extends Source { type: 'raster'; - url: string; + url?: string; tiles?: string[]; minzoom?: number; maxzoom?: number; diff --git a/types/mapbox-gl/mapbox-gl-tests.ts b/types/mapbox-gl/mapbox-gl-tests.ts index 422cb3913d..ce10a26564 100644 --- a/types/mapbox-gl/mapbox-gl-tests.ts +++ b/types/mapbox-gl/mapbox-gl-tests.ts @@ -205,6 +205,22 @@ var videoSourceObj = new mapboxgl.VideoSource({ map.addSource('some id', videoSourceObj); // add map.removeSource('some id'); // remove +/** + * Add Raster Source /// made URL optional to allow only tiles. + */ +map.addSource('radar', { + type: 'raster', + tiles: ['https://nowcoast.noaa.gov/arcgis/services/nowcoast/radar_meteo_imagery_nexrad_time/MapServer/WmsServer?bbox={bbox-epsg-3857}&service=WMS&request=GetMap&version=1.3.0&layers=1&styles=&format=image/png&transparent=true&height=256&width=256&crs=EPSG:3857'], + tileSize: 256 +}) + +map.addLayer({ + id: 'radar', + type: 'raster', + source: 'radar', + paint: {} +}) + /** * Popup */ diff --git a/types/mathjs/index.d.ts b/types/mathjs/index.d.ts index ad3dec6d75..a02729b635 100644 --- a/types/mathjs/index.d.ts +++ b/types/mathjs/index.d.ts @@ -1,18 +1,22 @@ -// Type definitions for mathjs +// Type definitions for mathjs 3.20 // Project: http://mathjs.org/ -// Definitions by: Ilya Shestakov +// Definitions by: Ilya Shestakov , +// Andy Patterson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 -declare var math: mathjs.IMathJsStatic; +import { Decimal } from 'decimal.js'; -declare namespace mathjs { +declare const math: math.MathJsStatic; // tslint:disable-line strict-export-declare-modifiers +export as namespace math; // tslint:disable-line strict-export-declare-modifiers +export = math; // tslint:disable-line strict-export-declare-modifiers +declare namespace math { // tslint:disable-line strict-export-declare-modifiers type MathArray = number[]|number[][]; type MathType = number|BigNumber|Fraction|Complex|Unit|MathArray|Matrix; type MathExpression = string|string[]|MathArray|Matrix; - export interface IMathJsStatic { - + interface MathJsStatic { e: number; pi: number; i: number; @@ -31,9 +35,9 @@ declare namespace mathjs { uninitialized: any; version: string; - config(options: any): void; + expression: MathNode; - expression: MathNode; + config: (options: any) => void; /** * Solves the linear equation system by forwards substitution. Matrix must be a lower triangular matrix. @@ -44,7 +48,7 @@ declare namespace mathjs { lsolve(L: Matrix|MathArray, b: Matrix|MathArray): Matrix|MathArray; /** - * Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in two matrices (L, U) + * Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in two matrices (L, U) * and a row permutation vector p where A[p,:] = L * U * @param A A two dimensional matrix or array for which to get the LUP decomposition. * @returns The lower triangular matrix, the upper triangular matrix and the permutation matrix. @@ -57,22 +61,22 @@ declare namespace mathjs { * @param b Column Vector * @returns Column vector with the solution to the linear system A * x = b */ - lusolve(A: Matrix|MathArray|Number, b: Matrix|MathArray): Matrix|MathArray; + lusolve(A: Matrix|MathArray|number, b: Matrix|MathArray): Matrix|MathArray; /** - * Calculate the Sparse Matrix LU decomposition with full pivoting. Sparse Matrix A is decomposed in + * Calculate the Sparse Matrix LU decomposition with full pivoting. Sparse Matrix A is decomposed in * two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U * @param A A two dimensional sparse matrix for which to get the LU decomposition. - * @param order The Symbolic Ordering and Analysis order: 0 - Natural ordering, no permutation vector q is - * returned 1 - Matrix must be square, symbolic ordering and analisis is performed on M = A + A' 2 - Symbolic - * ordering and analisis is performed on M = A' * A. Dense columns from A' are dropped, A recreated from A'. - * This is appropriatefor LU factorization of unsymmetric matrices. 3 - Symbolic ordering and analisis is performed - * on M = A' * A. This is best used for LU factorization is matrix M has no dense rows. A dense row is a row with + * @param order The Symbolic Ordering and Analysis order: 0 - Natural ordering, no permutation vector q is + * returned 1 - Matrix must be square, symbolic ordering and analisis is performed on M = A + A' 2 - Symbolic + * ordering and analysis is performed on M = A' * A. Dense columns from A' are dropped, A recreated from A'. + * This is appropriate for LU factorization of non-symmetric matrices. 3 - Symbolic ordering and analysis is performed + * on M = A' * A. This is best used for LU factorization is matrix M has no dense rows. A dense row is a row with * more than 10*sqr(columns) entries. * @param threshold Partial pivoting threshold (1 for partial pivoting) * @returns The lower triangular matrix, the upper triangular matrix and the permutation vectors. */ - slu(A: Matrix, order: Number, threshold: Number): any; + slu(A: Matrix, order: number, threshold: number): any; /** * Solves the linear equation system by backward substitution. Matrix must be an upper triangular matrix. U * x = b @@ -80,7 +84,7 @@ declare namespace mathjs { * @param b A column vector with the b values * @returns A column vector with the linear system solution (x) */ - usolve(U: Matrix|MathArray, b:Matrix|MathArray): Matrix|MathArray; + usolve(U: Matrix|MathArray, b: Matrix|MathArray): Matrix|MathArray; /** * Calculate the absolute value of a number. For matrices, the function is evaluated element wise. @@ -130,7 +134,7 @@ declare namespace mathjs { ceil(x: Matrix): Matrix; ceil(x: Unit): Unit; - /** + /** * Compute the cube of a value, x * x * x. For matrices, the function is evaluated element wise. * @param x Number for which to calculate the cube * @returns Cube of x @@ -151,7 +155,7 @@ declare namespace mathjs { */ divide(x: Unit, y: Unit): Unit; divide(x: number, y: number): number; - divide(x:MathType, y:MathType): MathType; + divide(x: MathType, y: MathType): MathType; /** * Divide two matrices element wise. The function accepts both matrices and scalar values. @@ -169,7 +173,7 @@ declare namespace mathjs { */ dotMultiply(x: MathType, y: MathType): MathType; - /** + /** * Calculates the power of x to y element wise. * @param x The base * @param y The exponent @@ -183,21 +187,21 @@ declare namespace mathjs { * #returns Exponent of x */ exp(x: number): number; - exp(x: BigNumber ): BigNumber ; - exp(x: Complex ): Complex ; - exp(x: MathArray ): MathArray ; + exp(x: BigNumber): BigNumber ; + exp(x: Complex): Complex ; + exp(x: MathArray): MathArray ; exp(x: Matrix): Matrix; - /** + /** * Round a value towards zero. For matrices, the function is evaluated element wise. * @param x Number to be rounded * @returns Rounded value */ fix(x: number): number; - fix(x: BigNumber ): BigNumber ; - fix(x: Fraction ): Fraction ; - fix(x: Complex ): Complex ; - fix(x: MathArray ): MathArray ; + fix(x: BigNumber): BigNumber ; + fix(x: Fraction): Fraction ; + fix(x: Complex): Complex ; + fix(x: MathArray): MathArray ; fix(x: Matrix): Matrix; /** @@ -206,10 +210,10 @@ declare namespace mathjs { * @returns Rounded value */ floor(x: number): number; - floor(x: BigNumber ): BigNumber ; - floor(x: Fraction ): Fraction ; - floor(x: Complex ): Complex ; - floor(x: MathArray ): MathArray ; + floor(x: BigNumber): BigNumber ; + floor(x: Fraction): Fraction ; + floor(x: Complex): Complex ; + floor(x: MathArray): MathArray ; floor(x: Matrix): Matrix; /** @@ -242,7 +246,7 @@ declare namespace mathjs { * For matrices, the function is evaluated element wise. */ lcm(a: number, b: number): number; - lcm(a: BigNumber , b: BigNumber ): BigNumber ; + lcm(a: BigNumber , b: BigNumber): BigNumber ; lcm(a: MathArray, b: MathArray): MathArray; lcm(a: Matrix, b: Matrix): Matrix; @@ -267,7 +271,7 @@ declare namespace mathjs { * Calculates the modulus, the remainder of an integer division. For matrices, the function is evaluated element wise. * The modulus is defined as: * x - y * floor(x / y) - * See http://en.wikipedia.org/wiki/Modulo_operation. + * @see http://en.wikipedia.org/wiki/Modulo_operation. * @param x Dividend * @param y Divisor */ @@ -276,7 +280,6 @@ declare namespace mathjs { /** * Multiply two values, x * y. The result is squeezed. For matrices, the matrix product is calculated. */ - multiply(x: MathArray|Matrix, y: MathArray|Matrix): Matrix; multiply(x: MathArray|Matrix, y: MathType): Matrix; multiply(x: Unit, y: Unit): Unit; multiply(x: number, y: number): number; @@ -304,7 +307,7 @@ declare namespace mathjs { * @param x The base * @param y The exponent */ - pow(x: number|BigNumber|Complex|MathArray|Matrix, y: number|BigNumber|Complex): number|BigNumber|Complex|MathArray|Matrix; + pow(x: MathType, y: number|BigNumber|Complex): MathType; /** * Round a value towards the nearest integer. For matrices, the function is evaluated element wise. @@ -321,9 +324,9 @@ declare namespace mathjs { * For matrices, the function is evaluated element wise. */ sign(x: number): number; - sign(x: BigNumber ): BigNumber; - sign(x: Fraction ): Fraction ; - sign(x: Complex ): Complex ; + sign(x: BigNumber): BigNumber; + sign(x: Fraction): Fraction ; + sign(x: Complex): Complex ; sign(x: MathArray): MathArray; sign(x: Matrix): Matrix; sign(x: Unit): Unit; @@ -332,8 +335,8 @@ declare namespace mathjs { * Calculate the square root of a value. For matrices, the function is evaluated element wise. */ sqrt(x: number): number; - sqrt(x: BigNumber ): BigNumber; - sqrt(x: Complex ): Complex ; + sqrt(x: BigNumber): BigNumber; + sqrt(x: Complex): Complex ; sqrt(x: MathArray): MathArray; sqrt(x: Matrix): Matrix; sqrt(x: Unit): Unit; @@ -342,9 +345,9 @@ declare namespace mathjs { * Compute the square of a value, x * x. For matrices, the function is evaluated element wise. */ square(x: number): number; - square(x: BigNumber ): BigNumber; - square(x: Fraction ): Fraction ; - square(x: Complex ): Complex ; + square(x: BigNumber): BigNumber; + square(x: Fraction): Fraction ; + square(x: Complex): Complex ; square(x: MathArray): MathArray; square(x: Matrix): Matrix; square(x: Unit): Unit; @@ -359,9 +362,9 @@ declare namespace mathjs { * For matrices, the function is evaluated element wise. Boolean values and strings will be converted to a number. For complex numbers, both real and complex value are inverted. */ unaryMinus(x: number): number; - unaryMinus(x: BigNumber ): BigNumber; - unaryMinus(x: Fraction ): Fraction ; - unaryMinus(x: Complex ): Complex ; + unaryMinus(x: BigNumber): BigNumber; + unaryMinus(x: Fraction): Fraction ; + unaryMinus(x: Complex): Complex ; unaryMinus(x: MathArray): MathArray; unaryMinus(x: Matrix): Matrix; unaryMinus(x: Unit): Unit; @@ -371,10 +374,10 @@ declare namespace mathjs { * For matrices, the function is evaluated element wise. */ unaryPlus(x: number): number; - unaryPlus(x: BigNumber ): BigNumber; - unaryPlus(x: Fraction ): Fraction ; + unaryPlus(x: BigNumber): BigNumber; + unaryPlus(x: Fraction): Fraction ; unaryPlus(x: string): string; - unaryPlus(x: Complex ): Complex ; + unaryPlus(x: Complex): Complex ; unaryPlus(x: MathArray): MathArray; unaryPlus(x: Matrix): Matrix; unaryPlus(x: Unit): Unit; @@ -393,7 +396,7 @@ declare namespace mathjs { * Bitwise NOT value, ~x. For matrices, the function is evaluated element wise. For units, the function is evaluated on the best prefix base. */ bitNot(x: number): number; - bitNot(x: BigNumber ): BigNumber ; + bitNot(x: BigNumber): BigNumber ; bitNot(x: MathArray): MathArray; bitNot(x: Matrix): Matrix; @@ -401,7 +404,7 @@ declare namespace mathjs { * Bitwise OR two values, x | y. For matrices, the function is evaluated element wise. For units, the function is evaluated on the lowest print base. */ bitOr(x: number): number; - bitOr(x: BigNumber ): BigNumber ; + bitOr(x: BigNumber): BigNumber ; bitOr(x: MathArray): MathArray; bitOr(x: Matrix): Matrix; @@ -432,17 +435,19 @@ declare namespace mathjs { rightLogShift(x: number|MathArray|Matrix, y: number): number|MathArray|Matrix; /** - * The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. bellNumbers only takes integer arguments. The following condition must be enforced: n >= 0 + * The Bell Numbers count the number of partitions of a set. + * A partition is a pairwise disjoint subset of S whose union is S. bellNumbers only takes integer arguments. + * The following condition must be enforced: n >= 0 * @param n Total number of objects in the set */ - bellNumbers(n: Number): Number; + bellNumbers(n: number): number; bellNumbers(n: BigNumber): BigNumber; /** * The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0 - * @pararm n nth Catalan number + * @param n nth Catalan number */ - catalan(n: Number): Number; + catalan(n: number): number; catalan(n: BigNumber): BigNumber; /** @@ -451,22 +456,22 @@ declare namespace mathjs { * @param k Number of objects in the subset * @returns Returns the composition counts of n into k parts. */ - composition(n: Number|BigNumber, k: Number|BigNumber): Number|BigNumber + composition(n: number|BigNumber, k: number|BigNumber): number|BigNumber; /** - * The Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. stirlingS2 only takes integer arguments. The following condition must be enforced: k <= n. + * The Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. + * stirlingS2 only takes integer arguments. The following condition must be enforced: k <= n. * If n = k or k = 1, then s(n,k) = 1 * @param n Total number of objects in the set * @param k Number of objects in the subset */ - stirlingS2(n: Number|BigNumber, k: Number|BigNumber): Number|BigNumber; + stirlingS2(n: number|BigNumber, k: number|BigNumber): number|BigNumber; /** * Compute the argument of a complex value. For a complex number a + bi, the argument is computed as atan2(b, a). For matrices, the function is evaluated element wise. * @param x A complex number or array with complex numbers */ - arg(x: number): number; - arg(x: Complex): number; + arg(x: number|Complex): number; arg(x: MathArray): MathArray; arg(x: Matrix): Matrix; @@ -476,8 +481,8 @@ declare namespace mathjs { */ conj(x: number|BigNumber|Complex|MathArray|Matrix): number|BigNumber|Complex|MathArray|Matrix; - /** - * Get the imaginary part of a complex number. For a complex number a + bi, the function returns b. + /** + * Get the imaginary part of a complex number. For a complex number a + bi, the function returns b. * For matrices, the function is evaluated element wise. */ im(x: number|BigNumber|Complex|MathArray|Matrix): number|BigNumber|MathArray|Matrix; @@ -494,29 +499,28 @@ declare namespace mathjs { bignumber(x?: number|string|MathArray|Matrix|boolean): BigNumber; /** - * Create a boolean or convert a string or number to a boolean. In case of a number, true is returned for non-zero numbers, and false in case of zero. Strings can be 'true' or 'false', or can contain a number. When value is a matrix, all elements will be converted to boolean. + * Create a boolean or convert a string or number to a boolean. + * In case of a number, true is returned for non-zero numbers, and false in case of zero. + * Strings can be 'true' or 'false', or can contain a number. When value is a matrix, all elements will be converted to boolean. */ - boolean(x: string|number|boolean|MathArray|Matrix ): boolean|MathArray|Matrix; + boolean(x: string|number|boolean|MathArray|Matrix): boolean|MathArray|Matrix; /** * Wrap any value in a chain, allowing to perform chained operations on the value. - * All methods available in the math.js library can be called upon the chain, and then will be evaluated with the value itself as first argument. The chain can be closed by executing chain.done(), which returns the final value. + * All methods available in the math.js library can be called upon the chain, and then will be evaluated with the value itself as first argument. + * The chain can be closed by executing chain.done(), which returns the final value. * The chain has a number of special functions: * done() Finalize the chain and return the chain's value. * valueOf() The same as done() * toString() Executes math.format() onto the chain's value, returning a string representation of the value. */ - chain(value?: any): IMathJsChain; + chain(value?: any): MathJsChain; /** * Create a complex value or convert a value to a complex value. */ - complex(): Complex; + complex(arg?: Complex|string|MathArray| PolarCoordinates): Complex; complex(re: number, im: number): Complex; - complex(complex: Complex): Complex; - complex(arg: string): Complex; - complex(array: MathArray): Complex; - complex(obj: IPolarCoordinates): Complex; /** * Create a fraction convert a value to a fraction. @@ -529,8 +533,8 @@ declare namespace mathjs { index(...ranges: any[]): Index; /** - * Create a Matrix. The function creates a new math.type.Matrix object from an Array. A Matrix has utility functions - * to manipulate the data in the matrix, like getting the size and getting or setting values in the matrix. Supported + * Create a Matrix. The function creates a new math.type.Matrix object from an Array. A Matrix has utility functions + * to manipulate the data in the matrix, like getting the size and getting or setting values in the matrix. Supported * storage formats are 'dense' and 'sparse'. */ matrix(format?: 'sparse'|'dense'): Matrix; @@ -543,11 +547,11 @@ declare namespace mathjs { number(unit: Unit, valuelessUnit: Unit|string): number|MathArray|Matrix; /** - * Create a Sparse Matrix. The function creates a new math.type.Matrix object from an Array. A Matrix has utility + * Create a Sparse Matrix. The function creates a new math.type.Matrix object from an Array. A Matrix has utility * functions to manipulate the data in the matrix, like getting the size and getting or setting values in the matrix. * @param data A two dimensional array */ - sparse(data?: MathArray|Matrix, dataType?:string): Matrix; + sparse(data?: MathArray|Matrix, dataType?: string): Matrix; /** * Create a string or convert any object into a string. Elements of Arrays and Matrices are processed element wise. @@ -556,18 +560,17 @@ declare namespace mathjs { string(value: any): string|MathArray|Matrix; /** - * Create a unit. Depending on the passed arguments, the function will create and return a new math.type.Unit object. + * Create a unit. Depending on the passed arguments, the function will create and return a new math.type.Unit object. * When a matrix is provided, all elements will be converted to units. */ unit(unit: string): Unit; unit(value: number, unit: string): Unit; /** - * Create a user-defined unit and register it with the Unit type. + * Create a user-defined unit and register it with the Unit type. */ - createUnit(name: string): Unit; - createUnit(name: string, definition: string|UnitDefinition, options?: CreateUnitOptions): Unit; - createUnit(units: {[name: string]: string|UnitDefinition}, options?: CreateUnitOptions): Unit; + createUnit(name: string, definition?: string|UnitDefinition, options?: CreateUnitOptions): Unit; + createUnit(units: Record, options?: CreateUnitOptions): Unit; /** * Parse and compile an expression. Returns a an object with a function eval([scope]) to evaluate the compiled expression. @@ -578,8 +581,7 @@ declare namespace mathjs { /** * Evaluate an expression. */ - eval(expr: MathExpression, scope?: any): any; - eval(exprs: MathExpression[], scope?: any): any; + eval(expr: MathExpression|MathExpression[], scope?: any): any; /** * Retrieve help on a function or data type. Help files are retrieved from the documentation in math.expression.docs. @@ -598,21 +600,21 @@ declare namespace mathjs { parser(): Parser; /** - * Calculates: The eucledian distance between two points in 2 and 3 dimensional spaces. Distance between point - * and a line in 2 and 3 dimensional spaces. Pairwise distance between a set of 2D or 3D points NOTE: When - * substituting coefficients of a line(a, b and c), use ax + by + c = 0 instead of ax + by = c For parametric + * Calculates: The eucledian distance between two points in 2 and 3 dimensional spaces. Distance between point + * and a line in 2 and 3 dimensional spaces. Pairwise distance between a set of 2D or 3D points NOTE: When + * substituting coefficients of a line(a, b and c), use ax + by + c = 0 instead of ax + by = c For parametric * equation of a 3D line, x0, y0, z0, a, b, c are from: (x−x0, y−y0, z−z0) = t(a, b, c) */ - distance(x: MathArray|Matrix|any, y: MathArray|Matrix|any): Number | BigNumber; + distance(x: MathType, y: MathType): number | BigNumber; /** - * Calculates the point of intersection of two lines in two or three dimensions and of a line and a plane in - * three dimensions. The inputs are in the form of arrays or 1 dimensional matrices. The line intersection functions + * Calculates the point of intersection of two lines in two or three dimensions and of a line and a plane in + * three dimensions. The inputs are in the form of arrays or 1 dimensional matrices. The line intersection functions * return null if the lines do not meet. * Note: Fill the plane coefficients as x + y + z = c and not as x + y + z + c = 0. * @param w Co-ordinates of first end-point of first line * @param x Co-ordinates of second end-point of first line - * @param y Co-ordinates of first end-point of second line OR Co-efficients of the plane's equation + * @param y Co-ordinates of first end-point of second line OR Coefficients of the plane's equation * @param z Co-ordinates of second end-point of second line OR null if the calculation is for line and plane * @returns Returns the point of intersection of lines/lines-planes */ @@ -642,10 +644,10 @@ declare namespace mathjs { * Concatenate two or more matrices. * dim: number is a zero-based dimension over which to concatenate the matrices. By default the last dimension of the matrices. */ - concat(...args: (MathArray|Matrix|number)[]): MathArray|Matrix; + concat(...args: Array): MathArray|Matrix; /** - * Calculate the cross product for two vectors in three dimensional space. The cross product of A = [a1, a2, a3] + * Calculate the cross product for two vectors in three dimensional space. The cross product of A = [a1, a2, a3] * and B =[b1, b2, b3] is defined as: * cross(A, B) = [ a2 * b3 - a3 * b2, a3 * b1 - a1 * b3, a1 * b2 - a2 * b1 ] */ @@ -658,9 +660,9 @@ declare namespace mathjs { /** * Create a diagonal matrix or retrieve the diagonal of a matrix. - * When x is a vector, a matrix with vector x on the diagonal will be returned. When x is a two dimensional matrix, + * When x is a vector, a matrix with vector x on the diagonal will be returned. When x is a two dimensional matrix, * the matrixes kth diagonal will be returned - * as vector. When k is positive, the values are placed on the super diagonal. When k is negative, the values are + * as vector. When k is positive, the values are placed on the super diagonal. When k is negative, the values are * placed on the sub diagonal. * @param X A two dimensional matrix or a vector * @param k The diagonal where the vector will be filled in or retrieved. Default value: 0. @@ -670,7 +672,8 @@ declare namespace mathjs { diag(X: MathArray|Matrix, k: number|BigNumber, format?: string): Matrix; /** - * Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] + * Calculate the dot product of two vectors. + * The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] * is defined as: * dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn */ @@ -679,14 +682,13 @@ declare namespace mathjs { /** * Create a 2-dimensional identity matrix with size m x n or n x n. The matrix has ones on the diagonal and zeros elsewhere. */ - eye(n: number, format?: string): Matrix; + eye(n: number|number[], format?: string): Matrix; eye(m: number, n: number, format?: string): Matrix; - eye(size: number[], format?: string): Matrix; /** * Flatten a multi dimensional matrix into a single dimensional matrix. */ - flatten(x: MathArray|Matrix): MathArray|Matrix; + flatten(x: MathArray|Matrix): MathArray|Matrix; /** * Calculate the inverse of a square matrix. @@ -696,9 +698,8 @@ declare namespace mathjs { /** * Create a matrix filled with ones. The created matrix can have one or multiple dimensions. */ - ones(n: number, format?: string): MathArray|Matrix; + ones(n: number|number[], format?: string): MathArray|Matrix; ones(m: number, n: number, format?: string): MathArray|Matrix; - ones(size: number[], format?: string): MathArray|Matrix; /** * Create an array from a range. By default, the range end is excluded. This can be customized by providing an extra parameter includeEnd. @@ -709,8 +710,8 @@ declare namespace mathjs { * @returns Parameters describing the ranges start, end, and optional step. */ range(str: string, includeEnd?: boolean): Matrix; - range(start: number|BigNumber, end:number|BigNumber, includeEnd?:boolean): Matrix; - range(start: number|BigNumber, end: number|BigNumber, step: number|BigNumber, includeEnd?:boolean): Matrix; + range(start: number|BigNumber, end: number|BigNumber, includeEnd?: boolean): Matrix; + range(start: number|BigNumber, end: number|BigNumber, step: number|BigNumber, includeEnd?: boolean): Matrix; /** * Resize a matrix @@ -752,12 +753,11 @@ declare namespace mathjs { /** * Create a matrix filled with zeros. The created matrix can have one or multiple dimensions. */ - zeros(n: number, format?: string): MathArray|Matrix; + zeros(n: number|number[], format?: string): MathArray|Matrix; zeros(m: number, n: number, format?: string): MathArray|Matrix; - zeros(size: number[], format?: string): MathArray|Matrix; /** - * Compute the number of ways of picking k unordered outcomes from n possibilities. + * Compute the number of ways of picking k unordered outcomes from n possibilities. * Combinations only takes integer arguments. The following condition must be enforced: k <= n. */ combinations(n: number|BigNumber, k: number|BigNumber): number|BigNumber; @@ -775,7 +775,7 @@ declare namespace mathjs { factorial(n: number|BigNumber|MathArray|Matrix): number|BigNumber|MathArray|Matrix; /** - * Compute the gamma function of a value using Lanczos approximation for small values, and an extended + * Compute the gamma function of a value using Lanczos approximation for small values, and an extended * Stirling approximation for large values. * For matrices, the function is evaluated element wise. */ @@ -798,7 +798,7 @@ declare namespace mathjs { * @param n The number of objects in total * @param k The number of objects in the subset */ - permutations(n: number|BigNumber, k?:number|BigNumber): number|BigNumber; + permutations(n: number|BigNumber, k?: number|BigNumber): number|BigNumber; /** * Random pick a value from a one dimensional array. Array element is picked using a random function with uniform distribution. @@ -808,23 +808,18 @@ declare namespace mathjs { /** * Return a random number larger or equal to min and smaller than max using a uniform distribution. */ - random(): number; - random(max: number): number; - random(min: number, max: number): number; - random(size: MathArray|Matrix, max?: number): MathArray|Matrix; - random(size: MathArray|Matrix, min:number, max: number): MathArray|Matrix; + random(min?: number, max?: number): number; + random(size: MathArray|Matrix, min?: number, max?: number): MathArray|Matrix; /** * Return a random integer number larger or equal to min and smaller than max using a uniform distribution. */ - randomInt(max: number): number; - randomInt(min: number, max: number): number; - randomInt(size: MathArray|Matrix, max?: number): MathArray|Matrix; - randomInt(size: MathArray|Matrix, min:number, max: number): MathArray|Matrix; + randomInt(min: number, max?: number): number; + randomInt(size: MathArray|Matrix, min?: number, max?: number): MathArray|Matrix; /** * Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y. - * x and y are considered equal when the relative difference between x and y is smaller than the configured epsilon. + * x and y are considered equal when the relative difference between x and y is smaller than the configured epsilon. * The function cannot be used to compare values smaller than approximately 2.22e-16. * For matrices, the function is evaluated element wise. */ @@ -837,91 +832,78 @@ declare namespace mathjs { /** * Test whether two values are equal. - * - * The function tests whether the relative difference between x and y is smaller than the configured epsilon. + * + * The function tests whether the relative difference between x and y is smaller than the configured epsilon. * The function cannot be used to compare values smaller than approximately 2.22e-16. - * * For matrices, the function is evaluated element wise. In case of complex numbers, x.re must equal y.re, and x.im must equal y.im. - * * Values null and undefined are compared strictly, thus null is only equal to null and nothing else, and undefined is only equal to undefined and nothing else. */ equal(x: MathType, y: MathType): boolean|MathArray|Matrix; /** * Test whether value x is larger than y. - * - * The function returns true when x is larger than y and the relative difference between x and y is larger than the configured epsilon. + * The function returns true when x is larger than y and the relative difference between x and y is larger than the configured epsilon. * The function cannot be used to compare values smaller than approximately 2.22e-16. - * * For matrices, the function is evaluated element wise. */ larger(x: MathType, y: MathType): boolean|MathArray|Matrix; /** * Test whether value x is larger or equal to y. - * - * The function returns true when x is larger than y or the relative difference between x and y is smaller than the configured epsilon. + * The function returns true when x is larger than y or the relative difference between x and y is smaller than the configured epsilon. * The function cannot be used to compare values smaller than approximately 2.22e-16. - * * For matrices, the function is evaluated element wise. */ largerEq(x: MathType, y: MathType): boolean|MathArray|Matrix; /** * Test whether value x is smaller than y. - * - * The function returns true when x is smaller than y and the relative difference between x and y is smaller than the configured epsilon. + * The function returns true when x is smaller than y and the relative difference between x and y is smaller than the configured epsilon. * The function cannot be used to compare values smaller than approximately 2.22e-16. - * * For matrices, the function is evaluated element wise. */ smaller(x: MathType, y: MathType): boolean|MathArray|Matrix; /** * Test whether value x is smaller or equal to y. - * - * The function returns true when x is smaller than y or the relative difference between x and y is smaller than the configured epsilon. + * The function returns true when x is smaller than y or the relative difference between x and y is smaller than the configured epsilon. * The function cannot be used to compare values smaller than approximately 2.22e-16. For matrices, the function is evaluated element wise. */ smallerEq(x: MathType, y: MathType): boolean|MathArray|Matrix; /** * Test whether two values are unequal. - * - * The function tests whether the relative difference between x and y is larger than the configured epsilon. The function cannot + * The function tests whether the relative difference between x and y is larger than the configured epsilon. The function cannot * be used to compare values smaller than approximately 2.22e-16. - * * For matrices, the function is evaluated element wise. In case of complex numbers, x.re must unequal y.re, or x.im must unequal y.im. - * - * Values null and undefined are compared strictly, thus null is unequal with everything except null, and undefined is unequal with - * everying except. undefined. + * Values null and undefined are compared strictly, thus null is unequal with everything except null, and undefined is unequal with + * everything except undefined. */ unequal(x: MathType, y: MathType): boolean|MathArray|Matrix; /** - * Compute the maximum value of a matrix or a list with values. In case of a multi dimensional array, the maximum of the flattened + * Compute the maximum value of a matrix or a list with values. In case of a multi dimensional array, the maximum of the flattened * array will be calculated. When dim is provided, the maximum over the selected dimension will be calculated. Parameter dim is zero-based. */ max(...args: MathType[]): any; max(A: MathArray|Matrix, dim?: number): any; /** - * Compute the mean value of matrix or a list with values. In case of a multi dimensional array, the mean of the flattened array will be + * Compute the mean value of matrix or a list with values. In case of a multi dimensional array, the mean of the flattened array will be * calculated. When dim is provided, the maximum over the selected dimension will be calculated. Parameter dim is zero-based. */ mean(...args: MathType[]): any; mean(A: MathArray|Matrix, dim?: number): any; /** - * Compute the median of a matrix or a list with values. The values are sorted and the middle value is returned. In case of an + * Compute the median of a matrix or a list with values. The values are sorted and the middle value is returned. In case of an * even number of values, the average of the two middle values is returned. Supported types of values are: Number, BigNumber, Unit - * * In case of a (multi dimensional) array or matrix, the median of all elements will be calculated. */ median(...args: MathType[]): any; /** - * Compute the maximum value of a matrix or a list of values. In case of a multi dimensional array, the maximum of the flattened + * Compute the maximum value of a matrix or a list of values. In case of a multi dimensional array, the maximum of the flattened * array will be calculated. When dim is provided, the maximum over the selected dimension will be calculated. Parameter dim is zero-based. */ min(...args: MathType[]): any; @@ -938,21 +920,18 @@ declare namespace mathjs { prod(...args: MathType[]): any; /** - * Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. + * Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. * Supported types of sequence values are: Number, BigNumber, Unit Supported types of probability are: Number, BigNumber - * * In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated. */ - quantileSeq(A: MathArray|Matrix, prob: Number|BigNumber|MathArray, sorted?: boolean): Number|BigNumber|Unit|MathArray; + quantileSeq(A: MathArray|Matrix, prob: number|BigNumber|MathArray, sorted?: boolean): number|BigNumber|Unit|MathArray; /** - * Compute the standard deviation of a matrix or a list with values. The standard deviations is defined as the square root of the - * variance: std(A) = sqrt(var(A)). In case of a (multi dimensional) array or matrix, the standard deviation over all elements will + * Compute the standard deviation of a matrix or a list with values. The standard deviations is defined as the square root of the + * variance: std(A) = sqrt(var(A)). In case of a (multi dimensional) array or matrix, the standard deviation over all elements will * be calculated. - * - * Optionally, the type of normalization can be specified as second parameter. The parameter normalization can be one of the following + * Optionally, the type of normalization can be specified as second parameter. The parameter normalization can be one of the following * values: - * * 'unbiased' (default) The sum of squared errors is divided by (n - 1) * 'uncorrected' The sum of squared errors is divided by n * 'biased' The sum of squared errors is divided by (n + 1) @@ -962,23 +941,21 @@ declare namespace mathjs { /** * Compute the sum of a matrix or a list with values. In case of a (multi dimensional) array or matrix, the sum of all elements will be calculated. */ - sum(...args: (Number|BigNumber|Fraction)[]): any; + sum(...args: Array): any; sum(array: MathArray|Matrix): any; /** - * Compute the variance of a matrix or a list with values. In case of a (multi dimensional) array or matrix, the variance over all + * Compute the variance of a matrix or a list with values. In case of a (multi dimensional) array or matrix, the variance over all * elements will be calculated. - * - * Optionally, the type of normalization can be specified as second parameter. The parameter normalization can be one of the + * Optionally, the type of normalization can be specified as second parameter. The parameter normalization can be one of the * following values: - * * 'unbiased' (default) The sum of squared errors is divided by (n - 1) * 'uncorrected' The sum of squared errors is divided by n * 'biased' The sum of squared errors is divided by (n + 1) - * Note that older browser may not like the variable name var. In that case, the function can be called as math['var'](...) + * Note that older browser may not like the variable name var. In that case, the function can be called as math['var'](...) * instead of math.var(...). */ - var(...args: (Number|BigNumber|Fraction)[]): any; + var(...args: Array): any; var(array: MathArray|Matrix, normalization?: string): any; /** @@ -1076,9 +1053,8 @@ declare namespace mathjs { atan(x: Matrix): Matrix; /** - * Calculate the inverse tangent function with two arguments, y/x. By providing two arguments, the right quadrant of the + * Calculate the inverse tangent function with two arguments, y/x. By providing two arguments, the right quadrant of the * computed angle can be determined. - * * For matrices, the function is evaluated element wise. */ atan2(y: number, x: number): number; @@ -1093,127 +1069,105 @@ declare namespace mathjs { atanh(x: MathArray): MathArray; atanh(x: Matrix): Matrix; - /** - * Calculate the cosine of a value. For matrices, the function is evaluated element wise. - */ - asin(x: number): number; - asin(x: BigNumber): BigNumber; - asin(x: Complex): Complex; - asin(x: Unit): number; - asin(x: MathArray): MathArray; - asin(x: Matrix): Matrix; - /** * Calculate the hyperbolic cosine of a value, defined as cosh(x) = 1/2 * (exp(x) + exp(-x)). For matrices, the function is evaluated element wise. */ - cosh(x: number): number; + cosh(x: number|Unit): number; cosh(x: BigNumber): BigNumber; cosh(x: Complex): Complex; - cosh(x: Unit): number; cosh(x: MathArray): MathArray; cosh(x: Matrix): Matrix; /** * Calculate the cotangent of a value. cot(x) is defined as 1 / tan(x). For matrices, the function is evaluated element wise. */ - cot(x: number): number; + cot(x: number|Unit): number; cot(x: Complex): Complex; - cot(x: Unit): number; cot(x: MathArray): MathArray; cot(x: Matrix): Matrix; /** * Calculate the hyperbolic cotangent of a value, defined as coth(x) = 1 / tanh(x). For matrices, the function is evaluated element wise. */ - coth(x: number): number; + coth(x: number|Unit): number; coth(x: Complex): Complex; - coth(x: Unit): number; coth(x: MathArray): MathArray; coth(x: Matrix): Matrix; /** * Calculate the cosecant of a value, defined as csc(x) = 1/sin(x). For matrices, the function is evaluated element wise. */ - csc(x: number): number; + csc(x: number|Unit): number; csc(x: Complex): Complex; - csc(x: Unit): number; csc(x: MathArray): MathArray; csc(x: Matrix): Matrix; /** * Calculate the hyperbolic cosecant of a value, defined as csch(x) = 1 / sinh(x). For matrices, the function is evaluated element wise. */ - csch(x: number): number; + csch(x: number|Unit): number; csch(x: Complex): Complex; - csch(x: Unit): number; csch(x: MathArray): MathArray; csch(x: Matrix): Matrix; /** * Calculate the secant of a value, defined as sec(x) = 1/cos(x). For matrices, the function is evaluated element wise. */ - sec(x: number): number; + sec(x: number|Unit): number; sec(x: Complex): Complex; - sec(x: Unit): number; sec(x: MathArray): MathArray; sec(x: Matrix): Matrix; /** * Calculate the hyperbolic secant of a value, defined as sech(x) = 1 / cosh(x). For matrices, the function is evaluated element wise. */ - sech(x: number): number; + sech(x: number|Unit): number; sech(x: Complex): Complex; - sech(x: Unit): number; sech(x: MathArray): MathArray; sech(x: Matrix): Matrix; /** * Calculate the sine of a value. For matrices, the function is evaluated element wise. */ - sin(x: number): number; + sin(x: number|Unit): number; sin(x: BigNumber): BigNumber; sin(x: Complex): Complex; - sin(x: Unit): number; sin(x: MathArray): MathArray; sin(x: Matrix): Matrix; /** * Calculate the cosine of a value. For matrices, the function is evaluated element wise. */ - cos(x: number): number; + cos(x: number|Unit): number; cos(x: BigNumber): BigNumber; cos(x: Complex): Complex; - cos(x: Unit): number; cos(x: MathArray): MathArray; cos(x: Matrix): Matrix; /** * Calculate the hyperbolic sine of a value, defined as sinh(x) = 1/2 * (exp(x) - exp(-x)). For matrices, the function is evaluated element wise. */ - sinh(x: number): number; + sinh(x: number|Unit): number; sinh(x: BigNumber): BigNumber; sinh(x: Complex): Complex; - sinh(x: Unit): number; sinh(x: MathArray): MathArray; sinh(x: Matrix): Matrix; /** * Calculate the tangent of a value. tan(x) is equal to sin(x) / cos(x). For matrices, the function is evaluated element wise. */ - tan(x: number): number; + tan(x: number|Unit): number; tan(x: BigNumber): BigNumber; tan(x: Complex): Complex; - tan(x: Unit): number; tan(x: MathArray): MathArray; tan(x: Matrix): Matrix; /** * Calculate the hyperbolic tangent of a value, defined as tanh(x) = (exp(2 * x) - 1) / (exp(2 * x) + 1). For matrices, the function is evaluated element wise. */ - tanh(x: number): number; + tanh(x: number|Unit): number; tanh(x: BigNumber): BigNumber; tanh(x: Complex): Complex; - tanh(x: Unit): number; tanh(x: MathArray): MathArray; tanh(x: Matrix): Matrix; @@ -1222,7 +1176,7 @@ declare namespace mathjs { * @param x The unit to be converted. * @param unit New unit. Can be a string like "cm" or a unit without value. */ - to(x: Unit|MathArray|Matrix, unit: Unit|string): Unit|MathArray|Matrix + to(x: Unit|MathArray|Matrix, unit: Unit|string): Unit|MathArray|Matrix; /** * Clone an object. @@ -1232,25 +1186,25 @@ declare namespace mathjs { /** * Filter the items in an array or one dimensional matrix. * @param x A one dimensional matrix or array to filter - * @param test + * @param test */ - filter(x: MathArray|Matrix, test: RegExp|((item: any)=>boolean)): MathArray|Matrix; + filter(x: MathArray|Matrix, test: RegExp|((item: any) => boolean)): MathArray|Matrix; /** * Iterate over all elements of a matrix/array, and executes the given callback function. * @param x The matrix to iterate on. * @param callback The callback function is invoked with three parameters: the value of the element, the index of the element, and the Matrix/array being traversed. */ - forEach(x: MathArray|Matrix, callback: (item: any)=>any): void; + forEach: (x: MathArray|Matrix, callback: (item: any) => any) => void; /** * Format a value of any type into a string. * @param value The value to be formatted */ - format(value: any, options?: IFormatOptions|number|((item: any)=>string)): string; + format(value: any, options?: FormatOptions|number|((item: any) => string)): string; /** - * Test whether a value is an integer number. The function supports number, BigNumber, and Fraction. + * Test whether a value is an integer number. The function supports number, BigNumber, and Fraction. * The function is evaluated element-wise in case of Array or Matrix input. */ isInteger(x: any): boolean; @@ -1283,7 +1237,7 @@ declare namespace mathjs { * @param x The matrix to iterate on. * @param callback The callback method is invoked with three parameters: the value of the element, the index of the element, and the matrix being traversed. */ - map(x: MathArray|Matrix, callback: (item: any)=>any): MathArray|Matrix; + map(x: MathArray|Matrix, callback: (item: any) => any): MathArray|Matrix; /** * Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect. @@ -1292,7 +1246,7 @@ declare namespace mathjs { * @param compare An optional comparator function. The function is called as compare(a, b), and must return 1 when a > b, -1 when a < b, and 0 when a == b. Default value: 'asc'. * @returns Returns the kth lowest value. */ - partitionSelect(x: MathArray|Matrix, k: number, compare?: string|((a: any, b: any)=>number)): any; + partitionSelect(x: MathArray|Matrix, k: number, compare?: string|((a: any, b: any) => number)): any; /** * Interpolate values into a string template. @@ -1300,14 +1254,14 @@ declare namespace mathjs { * @param values An object containing variables which will be filled in in the template. * @param precision Number of digits to format numbers. If not provided, the value will not be rounded. */ - print(template:string, values: any, precision?: number): void; + print: (template: string, values: any, precision?: number) => void; /** * Sort the items in a matrix. * @param x A one dimensional matrix or array to sort * @param compare An optional comparator function. The function is called as compare(a, b), and must return 1 when a > b, -1 when a < b, and 0 when a == b. Default value: 'asc'. */ - sort(x: MathArray|Matrix, compare?: string|((a: any, b: any)=>number)): MathArray|Matrix; + sort(x: MathArray|Matrix, compare?: string|((a: any, b: any) => number)): MathArray|Matrix; /** * Determine the type of a variable. @@ -1315,7 +1269,7 @@ declare namespace mathjs { typeof(x: any): string; } - export interface Matrix { + interface Matrix { type: string; storage(): string; datatype(): string; @@ -1327,389 +1281,380 @@ declare namespace mathjs { clone(): Matrix; size(): number[]; map(callback: (a: any, b: number, c: Matrix) => any, skipZeros?: boolean): Matrix; - forEach(callback: (a: any, b: number, c: Matrix) => void, skipZeros?: boolean): void; + forEach: (callback: (a: any, b: number, c: Matrix) => void, skipZeros?: boolean) => void; toJSON(): any; diagonal(k?: number|BigNumber): any[]; swapRows(i: number, j: number): Matrix; } - export interface BigNumber { + interface BigNumber extends Decimal {} // tslint:disable-line no-empty-interface + interface Fraction { + s: number; + n: number; + d: number; } - export interface Fraction { - - } - - export interface Complex { + interface Complex { re: number; im: number; - toPolar(): IPolarCoordinates; + toPolar(): PolarCoordinates; clone(): Complex; } - export interface IPolarCoordinates { - r: number; + interface PolarCoordinates { + r: number; phi: number; - } + } - export interface Unit { + interface Unit { to(unit: string): Unit; toNumber(unit: string): number; } - export interface CreateUnitOptions { + interface CreateUnitOptions { override?: boolean; } - export interface UnitDefinition { + interface UnitDefinition { definition?: string|Unit; prefixes?: string; offset?: number; aliases?: string[]; } - export interface Index { + interface Index {} // tslint:disable-line no-empty-interface - } - - export interface EvalFunction { + interface EvalFunction { eval(scope?: any): any; } - export interface MathNode { - isNode: boolean; - isSymbolNode?: boolean; - isConstantNode?: boolean; - isOperatorNode?: boolean; - op?: string; - fn?: string; - args?: MathNode[]; - type: string; - name?: string; - value?: any; + interface MathNode { + isNode: boolean; + isSymbolNode?: boolean; + isConstantNode?: boolean; + isOperatorNode?: boolean; + op?: string; + fn?: string; + args?: MathNode[]; + type: string; + name?: string; + value?: any; - compile(): EvalFunction; - eval(): any; - eval(expr: string): any; - /** - * - * Filter nodes in an expression tree. The callback function is called as callback(node: Node, path: string, parent: Node) : boolean for every node in the tree, - * and must return a boolean. The function filter returns an array with nodes for which the test returned true. - * Parameter path is a string containing a relative JSON Path. - * - * Example: - * - * ``` - * var node = math.parse('x^2 + x/4 + 3*y'); - * var filtered = node.filter(function (node) { - * return node.isSymbolNode && node.name == 'x'; - * }); - * // returns an array with two entries: two SymbolNodes 'x' - * ``` - * - * @param The callback function is called as callback(node: Node, path: string, parent: Node) : boolean for every node in the tree, and must return a boolean. The function filter returns an array with nodes for which the test returned true. Parameter path is a string containing a relative JSON Path. - * @param {Function} callback(node [description] - * @return {[Mathnode]} Returns an array with nodes for which test returned true - */ - filter(callback: (node: MathNode, path: string, parent: MathNode)=>any ): MathNode[]; + compile(): EvalFunction; + eval(expr?: string): any; + /** + * + * Filter nodes in an expression tree. The callback function is called as callback(node: Node, path: string, parent: Node) : boolean for every node in the tree, + * and must return a boolean. The function filter returns an array with nodes for which the test returned true. + * Parameter path is a string containing a relative JSON Path. + * + * Example: + * + * ``` + * var node = math.parse('x^2 + x/4 + 3*y'); + * var filtered = node.filter(function (node) { + * return node.isSymbolNode && node.name == 'x'; + * }); + * // returns an array with two entries: two SymbolNodes 'x' + * ``` + * + * The callback function is called as callback(node: Node, path: string, parent: Node) : boolean for every node in the tree, and must return a boolean. + * The function filter returns an array with nodes for which the test returned true. Parameter path is a string containing a relative JSON Path. + * @return Returns an array with nodes for which test returned true + */ + filter(callback: (node: MathNode, path: string, parent: MathNode) => any): MathNode[]; + /** + * [forEach description] + */ + forEach(callback: (node: MathNode, path: string, parent: MathNode) => any): MathNode[]; - /** - * [forEach description] - * @param {MathNode} callback(node [description] - * @return {[type]} [description] - */ - forEach(callback: (node: MathNode, path: string, parent: MathNode)=>any): MathNode[]; + /** + * `traverse(callback)` + * + * Recursively traverse all nodes in a node tree. + * Executes given callback for this node and each of its child nodes. + * Similar to Array.forEach, except recursive. + * The callback function is a mapping function accepting a node, and returning a replacement for the node or the original node. + * Function callback is called as callback(node: Node, path: string, parent: Node) for every node in the tree. + * Parameter path is a string containing a relative JSON Path. Example: + * + * ``` + * var node = math.parse('3 * x + 2'); + * node.traverse(function (node, path, parent) { + * switch (node.type) { + * case 'OperatorNode': console.log(node.type, node.op); break; + * case 'ConstantNode': console.log(node.type, node.value); break; + * case 'SymbolNode': console.log(node.type, node.name); break; + * default: console.log(node.type); + * } + * }); + * // outputs: + * // OperatorNode + + * // OperatorNode * + * // ConstantNode 3 + * // SymbolNode x + * // ConstantNode 2 + * ``` + */ + traverse(callback: (node: MathNode, path: string, parent: MathNode) => void): any; + /** + * Recursively transform an expression tree via a transform function. Similar to Array.map, + * but recursively executed on all nodes in the expression tree. The callback function is a + * mapping function accepting a node, and returning a replacement for the node or the original node. + * Function callback is called as callback(node: Node, path: string, parent: Node) for every node in + * the tree, and must return a Node. Parameter path is a string containing a relative JSON Path. + * + * For example, to replace all nodes of type SymbolNode having name ‘x’ with a ConstantNode with value 3: + * ```js + * var node = math.parse('x^2 + 5*x'); + * var transformed = node.transform(function (node, path, parent) { + * if (node.SymbolNode && node.name == 'x') { + * return new math.expression.node.ConstantNode(3); + * } + * else { + * return node; + * } + * }); + * transformed.toString(); // returns '(3 ^ 2) + (5 * 3)' + * ``` + */ + transform(callback: (node: MathNode, path: string, parent: MathNode) => MathNode): MathNode; - - /** - * `traverse(callback)` - * - * Recursively traverse all nodes in a node tree. Executes given callback for this node and each of its child nodes. Similar to Array.forEach, except recursive. The callback function is a mapping function accepting a node, and returning a replacement for the node or the original node. Function callback is called as callback(node: Node, path: string, parent: Node) for every node in the tree. Parameter path is a string containing a relative JSON Path. Example: - * - * ``` - * var node = math.parse('3 * x + 2'); - * node.traverse(function (node, path, parent) { - * switch (node.type) { - * case 'OperatorNode': console.log(node.type, node.op); break; - * case 'ConstantNode': console.log(node.type, node.value); break; - * case 'SymbolNode': console.log(node.type, node.name); break; - * default: console.log(node.type); - * } - * }); - * // outputs: - * // OperatorNode + - * // OperatorNode * - * // ConstantNode 3 - * // SymbolNode x - * // ConstantNode 2 - * ``` - * - * @param {MathNode} callback=(node [description] - * @return {[type]} [description] - */ - traverse(callback: (node: MathNode, path: string, parent: MathNode)=> void): any; -//addEventListener(ev: 'change', callback: (ev: EditorChangeEvent) => any); - /** - * Recursively transform an expression tree via a transform function. Similar to Array.map, - * but recursively executed on all nodes in the expression tree. The callback function is a - * mapping function accepting a node, and returning a replacement for the node or the original node. - * Function callback is called as callback(node: Node, path: string, parent: Node) for every node in - * the tree, and must return a Node. Parameter path is a string containing a relative JSON Path. - * - * For example, to replace all nodes of type SymbolNode having name ‘x’ with a ConstantNode with value 3: - * ```js - * var node = math.parse('x^2 + 5*x'); - * var transformed = node.transform(function (node, path, parent) { - * if (node.SymbolNode && node.name == 'x') { - * return new math.expression.node.ConstantNode(3); - * } - * else { - * return node; - * } - * }); - * transformed.toString(); // returns '(3 ^ 2) + (5 * 3)' - * ``` - */ - transform(callback: (node: MathNode, path: string, parent: MathNode)=>MathNode): MathNode; - /** - * Transform a node. Creates a new Node having it’s childs be the results of calling the provided - * callback function for each of the childs of the original node. The callback function is called - * as `callback(child: Node, path: string, parent: Node)` and must return a Node. - * Parameter path is a string containing a relative JSON Path. - * - * - * See also transform, which is a recursive version of map. - */ - map(callback: (node: MathNode, path: string, parent: MathNode)=>MathNode): MathNode; + /** + * Transform a node. Creates a new Node having it’s child's be the results of calling the provided + * callback function for each of the child's of the original node. The callback function is called + * as `callback(child: Node, path: string, parent: Node)` and must return a Node. + * Parameter path is a string containing a relative JSON Path. + * + * + * See also transform, which is a recursive version of map. + */ + map(callback: (node: MathNode, path: string, parent: MathNode) => MathNode): MathNode; } - - export interface Parser { + interface Parser { eval(expr: string): any; get(variable: string): any; - set(variable: string, value: any): void; - clear(): void; + set: (variable: string, value: any) => void; + clear: () => void; } - export interface Distribution { + interface Distribution { random(size: any, min?: any, max?: any): any; randomInt(min: any, max?: any): any; pickRandom(array: any): any; } - export interface IFormatOptions { + interface FormatOptions { /** * Number notation. Choose from: * 'fixed' Always use regular number notation. For example '123.40' and '14000000' * 'exponential' Always use exponential notation. For example '1.234e+2' and '1.4e+7' - * 'auto' (default) Regular number notation for numbers having an absolute value between lower and upper bounds, and + * 'auto' (default) Regular number notation for numbers having an absolute value between lower and upper bounds, and * uses exponential notation elsewhere. Lower bound is included, upper bound is excluded. For example '123.4' and '1.4e7'. */ notation?: string; /** - * A number between 0 and 16 to round the digits of the number. In case of notations 'exponential' and 'auto', - * precision defines the total number of significant digits returned and is undefined by default. In case of notation 'fixed', + * A number between 0 and 16 to round the digits of the number. In case of notations 'exponential' and 'auto', + * precision defines the total number of significant digits returned and is undefined by default. In case of notation 'fixed', * precision defines the number of significant digits after the decimal point, and is 0 by default. */ precision?: number; /** - * An object containing two parameters, {number} lower and {number} upper, used by notation 'auto' to determine + * An object containing two parameters, {number} lower and {number} upper, used by notation 'auto' to determine * when to return exponential notation. Default values are lower=1e-3 and upper=1e5. Only applicable for notation auto. */ exponential?: {lower: number; upper: number}; /** - * Available values: 'ratio' (default) or 'decimal'. For example format(fraction(1, 3)) will output '1/3' when 'ratio' + * Available values: 'ratio' (default) or 'decimal'. For example format(fraction(1, 3)) will output '1/3' when 'ratio' * is configured, and will output 0.(3) when 'decimal' is configured. */ fraction?: string; - /** - * A custom formatting function. Can be used to override the built-in notations. Function fn is called with - * value as parameter and must return a string. Is useful for example to format all values inside a matrix in a particular way. - * */ - fn?: (item: any)=>string; + /** + * A custom formatting function. Can be used to override the built-in notations. Function fn is called with + * value as parameter and must return a string. Is useful for example to format all values inside a matrix in a particular way. + */ + fn?: (item: any) => string; } - export interface Help { + interface Help { toString(): string; toJSON(): string; - } + } - export interface IMathJsChain { + interface MathJsChain { /** * Solves the linear equation system by forwards substitution. Matrix must be a lower triangular matrix. * @param b A column vector with the b values */ - lsolve(b: Matrix|MathArray): IMathJsChain; + lsolve(b: Matrix|MathArray): MathJsChain; /** - * Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in two matrices (L, U) + * Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in two matrices (L, U) * and a row permutation vector p where A[p,:] = L * U */ - lup(): IMathJsChain; + lup(): MathJsChain; /** * Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector. * @param b Column Vector */ - lusolve(b: Matrix|MathArray): IMathJsChain; + lusolve(b: Matrix|MathArray): MathJsChain; /** - * Calculate the Sparse Matrix LU decomposition with full pivoting. Sparse Matrix A is decomposed in + * Calculate the Sparse Matrix LU decomposition with full pivoting. Sparse Matrix A is decomposed in * two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U - * @param order The Symbolic Ordering and Analysis order: 0 - Natural ordering, no permutation vector q is - * returned 1 - Matrix must be square, symbolic ordering and analisis is performed on M = A + A' 2 - Symbolic - * ordering and analisis is performed on M = A' * A. Dense columns from A' are dropped, A recreated from A'. - * This is appropriatefor LU factorization of unsymmetric matrices. 3 - Symbolic ordering and analisis is performed - * on M = A' * A. This is best used for LU factorization is matrix M has no dense rows. A dense row is a row with + * @param order The Symbolic Ordering and Analysis order: 0 - Natural ordering, no permutation vector q is + * returned 1 - Matrix must be square, symbolic ordering and analysis is performed on M = A + A' 2 - Symbolic + * ordering and analysis is performed on M = A' * A. Dense columns from A' are dropped, A recreated from A'. + * This is appropriate for LU factorization of non-symmetric matrices. 3 - Symbolic ordering and analysis is performed + * on M = A' * A. This is best used for LU factorization is matrix M has no dense rows. A dense row is a row with * more than 10*sqr(columns) entries. * @param threshold Partial pivoting threshold (1 for partial pivoting) * @returns The lower triangular matrix, the upper triangular matrix and the permutation vectors. */ - slu(order: Number, threshold: Number): IMathJsChain; + slu(order: number, threshold: number): MathJsChain; /** * Solves the linear equation system by backward substitution. Matrix must be an upper triangular matrix. U * x = b * @param b A column vector with the b values * @returns A column vector with the linear system solution (x) */ - usolve(b:Matrix|MathArray): IMathJsChain; + usolve(b: Matrix|MathArray): MathJsChain; /** * Calculate the absolute value of a number. For matrices, the function is evaluated element wise. */ - abs(): IMathJsChain; + abs(): MathJsChain; /** * Add two values, x + y. For matrices, the function is evaluated element wise. * @param y Second value to add */ - add(y: MathType): IMathJsChain; + add(y: MathType): MathJsChain; /** * Calculate the cubic root of a value. For matrices, the function is evaluated element wise. * @param allRoots Optional, false by default. Only applicable when x is a number or complex number. If true, all complex roots are returned, if false (default) the principal root is returned. */ - cbrt(allRoots?: boolean): IMathJsChain; + cbrt(allRoots?: boolean): MathJsChain; /** * Round a value towards plus infinity If x is complex, both real and imaginary part are rounded towards plus infinity. For matrices, the function is evaluated element wise. */ - ceil(): IMathJsChain; + ceil(): MathJsChain; - /** + /** * Compute the cube of a value, x * x * x. For matrices, the function is evaluated element wise. */ - cube(): IMathJsChain; + cube(): MathJsChain; /** * Divide two values, x / y. To divide matrices, x is multiplied with the inverse of y: x * inv(y). * @param y Denominator */ - divide(y:MathType): IMathJsChain; + divide(y: MathType): MathJsChain; /** * Divide two matrices element wise. The function accepts both matrices and scalar values. * @param y Denominator */ - dotDivide(y: MathType): IMathJsChain; + dotDivide(y: MathType): MathJsChain; /** * Multiply two matrices element wise. The function accepts both matrices and scalar values. * @param y Right hand value */ - dotMultiply(y: MathType): IMathJsChain; + dotMultiply(y: MathType): MathJsChain; - /** + /** * Calculates the power of x to y element wise. * @param y The exponent */ - dotPow(y: MathType): IMathJsChain; + dotPow(y: MathType): MathJsChain; /** * Calculate the exponent of a value. For matrices, the function is evaluated element wise. */ - exp(): IMathJsChain; + exp(): MathJsChain; - /** + /** * Round a value towards zero. For matrices, the function is evaluated element wise. */ - fix(): IMathJsChain; + fix(): MathJsChain; /** * Round a value towards minus infinity. For matrices, the function is evaluated element wise. */ - floor(): IMathJsChain; + floor(): MathJsChain; /** * Calculate the greatest common divisor for two or more values or arrays. For matrices, the function is evaluated element wise. */ - gcd(...args: number[]): IMathJsChain; - gcd(...args: BigNumber[]): IMathJsChain ; - gcd(...args: Fraction[]): IMathJsChain ; - gcd(...args: MathArray[]): IMathJsChain ; - gcd(...args: Matrix[]): IMathJsChain; + gcd(...args: number[]): MathJsChain; + gcd(...args: BigNumber[]): MathJsChain ; + gcd(...args: Fraction[]): MathJsChain ; + gcd(...args: MathArray[]): MathJsChain ; + gcd(...args: Matrix[]): MathJsChain; /** - * Calculate the hypotenusa of a list with values. The hypotenusa is defined as: + * Calculate the hypotenuse of a list with values. The hypotenuse is defined as: * hypot(a, b, c, ...) = sqrt(a^2 + b^2 + c^2 + ...) - * For matrix input, the hypotenusa is calculated for all values in the matrix. + * For matrix input, the hypotenuse is calculated for all values in the matrix. */ - hypot(...args: number[]): IMathJsChain; - hypot(...args: BigNumber[]): IMathJsChain; + hypot(...args: number[]): MathJsChain; + hypot(...args: BigNumber[]): MathJsChain; /** * Calculate the kronecker product of two matrices or vectors * @param x First Matrix * @param y Second Matrix */ - kron(x: Matrix|MathArray, y: Matrix|MathArray): IMathJsChain; + kron(x: Matrix|MathArray, y: Matrix|MathArray): MathJsChain; /** * Calculate the least common multiple for two or more values or arrays. lcm is defined as: * lcm(a, b) = abs(a * b) / gcd(a, b) * For matrices, the function is evaluated element wise. */ - lcm(b: number): IMathJsChain; - lcm(b: BigNumber ): IMathJsChain ; - lcm(b: MathArray): IMathJsChain; - lcm(b: Matrix): IMathJsChain; + lcm(b: number|BigNumber|MathArray|Matrix): MathJsChain; /** * Calculate the logarithm of a value. For matrices, the function is evaluated element wise. * @param base Optional base for the logarithm. If not provided, the natural logarithm of x is calculated. Default value: e. */ - log(base?: number|BigNumber|Complex): IMathJsChain; + log(base?: number|BigNumber|Complex): MathJsChain; /** * Calculate the 10-base of a value. This is the same as calculating log(x, 10). For matrices, the function is evaluated element wise. */ - log10(): IMathJsChain; + log10(): MathJsChain; /** * Calculates the modulus, the remainder of an integer division. For matrices, the function is evaluated element wise. * The modulus is defined as: * x - y * floor(x / y) - * See http://en.wikipedia.org/wiki/Modulo_operation. + * @see http://en.wikipedia.org/wiki/Modulo_operation. * @param y Divisor */ - mod(y: number|BigNumber|Fraction|MathArray|Matrix): IMathJsChain; + mod(y: number|BigNumber|Fraction|MathArray|Matrix): MathJsChain; /** * Multiply two values, x * y. The result is squeezed. For matrices, the matrix product is calculated. */ - multiply(y: MathType): IMathJsChain; + multiply(y: MathType): MathJsChain; /** * Calculate the norm of a number, vector or matrix. The second parameter p is optional. If not provided, it defaults to 2. * @param p Vector space. Supported numbers include Infinity and -Infinity. Supported strings are: 'inf', '-inf', and 'fro' (The Frobenius norm) Default value: 2. */ - norm(p?: number|BigNumber|string): IMathJsChain; + norm(p?: number|BigNumber|string): MathJsChain; /** * Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation @@ -1717,19 +1662,19 @@ declare namespace mathjs { * For matrices, the function is evaluated element wise. * @param root The root. Default value: 2. */ - nthRoot(root?: number|BigNumber): IMathJsChain; + nthRoot(root?: number|BigNumber): MathJsChain; /** * Calculates the power of x to y, x ^ y. Matrix exponentiation is supported for square matrices x, and positive integer exponents y. * @param y The exponent */ - pow(y: number|BigNumber|Complex): IMathJsChain; + pow(y: number|BigNumber|Complex): MathJsChain; /** * Round a value towards the nearest integer. For matrices, the function is evaluated element wise. * @param n Number of decimals Default value: 0. */ - round(n?: number|BigNumber|MathArray): IMathJsChain; + round(n?: number|BigNumber|MathArray): MathJsChain; /** * Compute the sign of a value. The sign of a value x is: @@ -1738,92 +1683,94 @@ declare namespace mathjs { * 0 when x == 0 * For matrices, the function is evaluated element wise. */ - sign(): IMathJsChain; + sign(): MathJsChain; /** * Calculate the square root of a value. For matrices, the function is evaluated element wise. */ - sqrt(): IMathJsChain; + sqrt(): MathJsChain; /** * Compute the square of a value, x * x. For matrices, the function is evaluated element wise. */ - square(): IMathJsChain; + square(): MathJsChain; /** * Subtract two values, x - y. For matrices, the function is evaluated element wise. */ - subtract(y: MathType): IMathJsChain; + subtract(y: MathType): MathJsChain; /** * Inverse the sign of a value, apply a unary minus operation. * For matrices, the function is evaluated element wise. Boolean values and strings will be converted to a number. For complex numbers, both real and complex value are inverted. */ - unaryMinus(): IMathJsChain; + unaryMinus(): MathJsChain; /** * Unary plus operation. Boolean values and strings will be converted to a number, numeric values will be returned as is. * For matrices, the function is evaluated element wise. */ - unaryPlus(): IMathJsChain; + unaryPlus(): MathJsChain; /** * Calculate the extended greatest common divisor for two values. See http://en.wikipedia.org/wiki/Extended_Euclidean_algorithm. */ - xgcd(b: number|BigNumber): IMathJsChain; + xgcd(b: number|BigNumber): MathJsChain; /** * Bitwise AND two values, x & y. For matrices, the function is evaluated element wise. */ - bitAnd(y: number|BigNumber|MathArray|Matrix): IMathJsChain; + bitAnd(y: number|BigNumber|MathArray|Matrix): MathJsChain; /** * Bitwise NOT value, ~x. For matrices, the function is evaluated element wise. For units, the function is evaluated on the best prefix base. */ - bitNot(): IMathJsChain; + bitNot(): MathJsChain; /** * Bitwise OR two values, x | y. For matrices, the function is evaluated element wise. For units, the function is evaluated on the lowest print base. */ - bitOr(): IMathJsChain; + bitOr(): MathJsChain; /** * Bitwise XOR two values, x ^ y. For matrices, the function is evaluated element wise. */ - bitXor(y: number|BigNumber|MathArray|Matrix): IMathJsChain; + bitXor(y: number|BigNumber|MathArray|Matrix): MathJsChain; /** * Bitwise left logical shift of a value x by y number of bits, x << y. For matrices, the function is evaluated element wise. For units, the function is evaluated on the best prefix base. * @param x Value to be shifted * @param y Amount of shifts */ - leftShift(y: number|BigNumber): IMathJsChain; + leftShift(y: number|BigNumber): MathJsChain; /** * Bitwise right arithmetic shift of a value x by y number of bits, x >> y. For matrices, the function is evaluated element wise. For units, the function is evaluated on the best prefix base. * @param x Value to be shifted * @param y Amount of shifts */ - rightArithShift(y: number|BigNumber): IMathJsChain; + rightArithShift(y: number|BigNumber): MathJsChain; /** * Bitwise right logical shift of value x by y number of bits, x >>> y. For matrices, the function is evaluated element wise. For units, the function is evaluated on the best prefix base. * @param x Value to be shifted * @param y Amount of shifts */ - rightLogShift(y: number): IMathJsChain; + rightLogShift(y: number): MathJsChain; /** - * The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. bellNumbers only takes integer arguments. The following condition must be enforced: n >= 0 + * The Bell Numbers count the number of partitions of a set. + * A partition is a pairwise disjoint subset of S whose union is S. + * bellNumbers only takes integer arguments. The following condition must be enforced: n >= 0 * @param n Total number of objects in the set */ - bellNumbers(): IMathJsChain; + bellNumbers(): MathJsChain; /** * The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0 - * @pararm n nth Catalan number + * @param n nth Catalan number */ - catalan(): IMathJsChain; + catalan(): MathJsChain; /** * The composition counts of n into k parts. Composition only takes integer arguments. The following condition must be enforced: k <= n. @@ -1831,51 +1778,52 @@ declare namespace mathjs { * @param k Number of objects in the subset * @returns Returns the composition counts of n into k parts. */ - composition(k: Number|BigNumber): IMathJsChain; + composition(k: number|BigNumber): MathJsChain; /** - * The Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. stirlingS2 only takes integer arguments. The following condition must be enforced: k <= n. + * The Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. + * stirlingS2 only takes integer arguments. The following condition must be enforced: k <= n. * If n = k or k = 1, then s(n,k) = 1 * @param n Total number of objects in the set * @param k Number of objects in the subset */ - stirlingS2(k: Number|BigNumber): IMathJsChain; + stirlingS2(k: number|BigNumber): MathJsChain; /** * Compute the argument of a complex value. For a complex number a + bi, the argument is computed as atan2(b, a). For matrices, the function is evaluated element wise. * @param x A complex number or array with complex numbers */ - arg(): IMathJsChain; + arg(): MathJsChain; /** * Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate of x is a - bi. For matrices, the function is evaluated element wise. * @param x A complex number or array with complex numbers */ - conj(): IMathJsChain; + conj(): MathJsChain; - /** - * Get the imaginary part of a complex number. For a complex number a + bi, the function returns b. + /** + * Get the imaginary part of a complex number. For a complex number a + bi, the function returns b. * For matrices, the function is evaluated element wise. */ - im(): IMathJsChain; + im(): MathJsChain; /** * Get the real part of a complex number. For a complex number a + bi, the function returns a. * For matrices, the function is evaluated element wise. */ - re(): IMathJsChain; + re(): MathJsChain; /** - * Calculates: The eucledian distance between two points in 2 and 3 dimensional spaces. Distance between point - * and a line in 2 and 3 dimensional spaces. Pairwise distance between a set of 2D or 3D points NOTE: When - * substituting coefficients of a line(a, b and c), use ax + by + c = 0 instead of ax + by = c For parametric + * Calculates: The eucledian distance between two points in 2 and 3 dimensional spaces. Distance between point + * and a line in 2 and 3 dimensional spaces. Pairwise distance between a set of 2D or 3D points NOTE: When + * substituting coefficients of a line(a, b and c), use ax + by + c = 0 instead of ax + by = c For parametric * equation of a 3D line, x0, y0, z0, a, b, c are from: (x−x0, y−y0, z−z0) = t(a, b, c) */ - distance(y: MathArray|Matrix|any): IMathJsChain; + distance(y: MathType): MathJsChain; /** - * Calculates the point of intersection of two lines in two or three dimensions and of a line and a plane in - * three dimensions. The inputs are in the form of arrays or 1 dimensional matrices. The line intersection functions + * Calculates the point of intersection of two lines in two or three dimensions and of a line and a plane in + * three dimensions. The inputs are in the form of arrays or 1 dimensional matrices. The line intersection functions * return null if the lines do not meet. * Note: Fill the plane coefficients as x + y + z = c and not as x + y + z + c = 0. * @param w Co-ordinates of first end-point of first line @@ -1884,39 +1832,39 @@ declare namespace mathjs { * @param z Co-ordinates of second end-point of second line OR null if the calculation is for line and plane * @returns Returns the point of intersection of lines/lines-planes */ - intersect(x: MathArray|Matrix, y: MathArray|Matrix, z: MathArray|Matrix): IMathJsChain; + intersect(x: MathArray|Matrix, y: MathArray|Matrix, z: MathArray|Matrix): MathJsChain; /** * Logical and. Test whether two values are both defined with a nonzero/nonempty value. For matrices, the function is evaluated element wise. */ - and(y: number|BigNumber|Complex|Unit|MathArray|Matrix): IMathJsChain; + and(y: number|BigNumber|Complex|Unit|MathArray|Matrix): MathJsChain; /** * Logical not. Flips boolean value of a given parameter. For matrices, the function is evaluated element wise. */ - not(): IMathJsChain; + not(): MathJsChain; /** * Logical or. Test if at least one value is defined with a nonzero/nonempty value. For matrices, the function is evaluated element wise. */ - or(y: number|BigNumber|Complex|Unit|MathArray|Matrix): IMathJsChain; + or(y: number|BigNumber|Complex|Unit|MathArray|Matrix): MathJsChain; /** * Logical xor. Test whether one and only one value is defined with a nonzero/nonempty value. For matrices, the function is evaluated element wise. */ - xor(y: number|BigNumber|Complex|Unit|MathArray|Matrix): IMathJsChain; + xor(y: number|BigNumber|Complex|Unit|MathArray|Matrix): MathJsChain; /** - * Calculate the cross product for two vectors in three dimensional space. The cross product of A = [a1, a2, a3] + * Calculate the cross product for two vectors in three dimensional space. The cross product of A = [a1, a2, a3] * and B =[b1, b2, b3] is defined as: * cross(A, B) = [ a2 * b3 - a3 * b2, a3 * b1 - a1 * b3, a1 * b2 - a2 * b1 ] */ - cross(y: MathArray|Matrix): IMathJsChain; + cross(y: MathArray|Matrix): MathJsChain; /** * Calculate the determinant of a matrix. */ - det(): IMathJsChain; + det(): MathJsChain; /** * Resize a matrix @@ -1924,17 +1872,17 @@ declare namespace mathjs { * @param size One dimensional array with numbers * @param defaultValue Zero by default, except in case of a string, in that case defaultValue = ' ' Default value: 0. */ - resize(size: MathArray|Matrix, defaultValue?: number|string): IMathJsChain; + resize(size: MathArray|Matrix, defaultValue?: number|string): MathJsChain; /** * Calculate the size of a matrix or scalar. */ - size(): IMathJsChain; + size(): MathJsChain; /** * Squeeze a matrix, remove inner and outer singleton dimensions from a matrix. */ - squeeze(): IMathJsChain; + squeeze(): MathJsChain; /** * Get or set a subset of a matrix or string. @@ -1943,352 +1891,328 @@ declare namespace mathjs { * @param replacement An array, matrix, or scalar. If provided, the subset is replaced with replacement. If not provided, the subset is returned * @param defaultValue Default value, filled in on new entries when the matrix is resized. If not provided, math.matrix elements will be left undefined. Default value: undefined. */ - subset(index: Index, replacement?: any, defaultValue?: any): IMathJsChain; + subset(index: Index, replacement?: any, defaultValue?: any): MathJsChain; /** * Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix. */ - trace(): IMathJsChain; + trace(): MathJsChain; /** * Transpose a matrix. All values of the matrix are reflected over its main diagonal. Only two dimensional matrices are supported. */ - transpose(): IMathJsChain; + transpose(): MathJsChain; /** * Random pick a value from a one dimensional array. Array element is picked using a random function with uniform distribution. */ - pickRandom(): IMathJsChain; + pickRandom(): MathJsChain; /** * Return a random number larger or equal to min and smaller than max using a uniform distribution. */ - random(): IMathJsChain; - random(max?: number): IMathJsChain; - random(min:number, max: number): IMathJsChain; + random(min?: number, max?: number): MathJsChain; /** * Return a random integer number larger or equal to min and smaller than max using a uniform distribution. */ - randomInt(max?: number): IMathJsChain; - randomInt(min:number, max: number): IMathJsChain; + randomInt(min?: number, max?: number): MathJsChain; /** * Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y. - * x and y are considered equal when the relative difference between x and y is smaller than the configured epsilon. + * x and y are considered equal when the relative difference between x and y is smaller than the configured epsilon. * The function cannot be used to compare values smaller than approximately 2.22e-16. * For matrices, the function is evaluated element wise. */ - compare(y: MathType): IMathJsChain; + compare(y: MathType): MathJsChain; /** * Test element wise whether two matrices are equal. The function accepts both matrices and scalar values. */ - deepEqual(y: MathType): IMathJsChain; + deepEqual(y: MathType): MathJsChain; /** * Test whether two values are equal. - * - * The function tests whether the relative difference between x and y is smaller than the configured epsilon. + * The function tests whether the relative difference between x and y is smaller than the configured epsilon. * The function cannot be used to compare values smaller than approximately 2.22e-16. - * * For matrices, the function is evaluated element wise. In case of complex numbers, x.re must equal y.re, and x.im must equal y.im. - * * Values null and undefined are compared strictly, thus null is only equal to null and nothing else, and undefined is only equal to undefined and nothing else. */ - equal(y: MathType): IMathJsChain; + equal(y: MathType): MathJsChain; /** * Test whether value x is larger than y. - * - * The function returns true when x is larger than y and the relative difference between x and y is larger than the configured epsilon. + * The function returns true when x is larger than y and the relative difference between x and y is larger than the configured epsilon. * The function cannot be used to compare values smaller than approximately 2.22e-16. - * * For matrices, the function is evaluated element wise. */ - larger(y: MathType): IMathJsChain; + larger(y: MathType): MathJsChain; /** * Test whether value x is larger or equal to y. - * - * The function returns true when x is larger than y or the relative difference between x and y is smaller than the configured epsilon. + * The function returns true when x is larger than y or the relative difference between x and y is smaller than the configured epsilon. * The function cannot be used to compare values smaller than approximately 2.22e-16. - * * For matrices, the function is evaluated element wise. */ - largerEq(y: MathType): IMathJsChain; + largerEq(y: MathType): MathJsChain; /** * Test whether value x is smaller than y. - * - * The function returns true when x is smaller than y and the relative difference between x and y is smaller than the configured epsilon. + * The function returns true when x is smaller than y and the relative difference between x and y is smaller than the configured epsilon. * The function cannot be used to compare values smaller than approximately 2.22e-16. - * * For matrices, the function is evaluated element wise. */ - smaller(IMathJsChainy: MathType): IMathJsChain; + smaller(MathJsChainy: MathType): MathJsChain; /** * Test whether value x is smaller or equal to y. - * - * The function returns true when x is smaller than y or the relative difference between x and y is smaller than the configured epsilon. + * The function returns true when x is smaller than y or the relative difference between x and y is smaller than the configured epsilon. * The function cannot be used to compare values smaller than approximately 2.22e-16. For matrices, the function is evaluated element wise. */ - smallerEq(IMathJsChainy: MathType): IMathJsChain; + smallerEq(MathJsChainy: MathType): MathJsChain; /** * Test whether two values are unequal. - * - * The function tests whether the relative difference between x and y is larger than the configured epsilon. The function cannot + * The function tests whether the relative difference between x and y is larger than the configured epsilon. The function cannot * be used to compare values smaller than approximately 2.22e-16. - * * For matrices, the function is evaluated element wise. In case of complex numbers, x.re must unequal y.re, or x.im must unequal y.im. - * - * Values null and undefined are compared strictly, thus null is unequal with everything except null, and undefined is unequal with - * everying except. undefined. + * Values null and undefined are compared strictly, thus null is unequal with everything except null, and undefined is unequal with + * everything except undefined. */ - unequal(IMathJsChainy: MathType): IMathJsChain; + unequal(MathJsChainy: MathType): MathJsChain; /** - * Compute the maximum value of a matrix or a list with values. In case of a multi dimensional array, the maximum of the flattened + * Compute the maximum value of a matrix or a list with values. In case of a multi dimensional array, the maximum of the flattened * array will be calculated. When dim is provided, the maximum over the selected dimension will be calculated. Parameter dim is zero-based. */ - max(dim?: number): IMathJsChain; + max(dim?: number): MathJsChain; /** - * Compute the mean value of matrix or a list with values. In case of a multi dimensional array, the mean of the flattened array will be + * Compute the mean value of matrix or a list with values. In case of a multi dimensional array, the mean of the flattened array will be * calculated. When dim is provided, the maximum over the selected dimension will be calculated. Parameter dim is zero-based. */ - mean(dim?: number): IMathJsChain; + mean(dim?: number): MathJsChain; /** - * Compute the median of a matrix or a list with values. The values are sorted and the middle value is returned. In case of an + * Compute the median of a matrix or a list with values. The values are sorted and the middle value is returned. In case of an * even number of values, the average of the two middle values is returned. Supported types of values are: Number, BigNumber, Unit - * * In case of a (multi dimensional) array or matrix, the median of all elements will be calculated. */ - median(): IMathJsChain; + median(): MathJsChain; /** - * Compute the maximum value of a matrix or a list of values. In case of a multi dimensional array, the maximum of the flattened + * Compute the maximum value of a matrix or a list of values. In case of a multi dimensional array, the maximum of the flattened * array will be calculated. When dim is provided, the maximum over the selected dimension will be calculated. Parameter dim is zero-based. */ - min(dim?: number): IMathJsChain; + min(dim?: number): MathJsChain; /** * Computes the mode of a set of numbers or a list with values(numbers or characters). If there are more than one modes, it returns a list of those values. */ - mode(): IMathJsChain; + mode(): MathJsChain; /** * Compute the product of a matrix or a list with values. In case of a (multi dimensional) array or matrix, the sum of all elements will be calculated. */ - prod(): IMathJsChain; + prod(): MathJsChain; /** - * Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. + * Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. * Supported types of sequence values are: Number, BigNumber, Unit Supported types of probability are: Number, BigNumber - * * In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated. */ - quantileSeq(prob: Number|BigNumber|MathArray, sorted?: boolean): IMathJsChain; + quantileSeq(prob: number|BigNumber|MathArray, sorted?: boolean): MathJsChain; /** - * Compute the standard deviation of a matrix or a list with values. The standard deviations is defined as the square root of the - * variance: std(A) = sqrt(var(A)). In case of a (multi dimensional) array or matrix, the standard deviation over all elements will + * Compute the standard deviation of a matrix or a list with values. The standard deviations is defined as the square root of the + * variance: std(A) = sqrt(var(A)). In case of a (multi dimensional) array or matrix, the standard deviation over all elements will * be calculated. - * - * Optionally, the type of normalization can be specified as second parameter. The parameter normalization can be one of the following + * Optionally, the type of normalization can be specified as second parameter. The parameter normalization can be one of the following * values: - * * 'unbiased' (default) The sum of squared errors is divided by (n - 1) * 'uncorrected' The sum of squared errors is divided by n * 'biased' The sum of squared errors is divided by (n + 1) */ - std(normalization?: string): IMathJsChain; + std(normalization?: string): MathJsChain; /** * Compute the sum of a matrix or a list with values. In case of a (multi dimensional) array or matrix, the sum of all elements will be calculated. */ - sum(): IMathJsChain; + sum(): MathJsChain; /** - * Compute the variance of a matrix or a list with values. In case of a (multi dimensional) array or matrix, the variance over all + * Compute the variance of a matrix or a list with values. In case of a (multi dimensional) array or matrix, the variance over all * elements will be calculated. - * - * Optionally, the type of normalization can be specified as second parameter. The parameter normalization can be one of the + * Optionally, the type of normalization can be specified as second parameter. The parameter normalization can be one of the * following values: - * * 'unbiased' (default) The sum of squared errors is divided by (n - 1) * 'uncorrected' The sum of squared errors is divided by n * 'biased' The sum of squared errors is divided by (n + 1) - * Note that older browser may not like the variable name var. In that case, the function can be called as math['var'](...) + * Note that older browser may not like the variable name var. In that case, the function can be called as math['var'](...) * instead of math.var(...). */ - var(normalization?: string): IMathJsChain; + var(normalization?: string): MathJsChain; /** * Calculate the inverse cosine of a value. For matrices, the function is evaluated element wise. */ - acos(): IMathJsChain; + acos(): MathJsChain; /** * Calculate the hyperbolic arccos of a value, defined as acosh(x) = ln(sqrt(x^2 - 1) + x). * For matrices, the function is evaluated element wise. */ - acosh(): IMathJsChain; + acosh(): MathJsChain; /** * Calculate the inverse cotangent of a value. For matrices, the function is evaluated element wise. */ - acot(): IMathJsChain; + acot(): MathJsChain; /** * Calculate the hyperbolic arccotangent of a value, defined as acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2. * For matrices, the function is evaluated element wise. */ - acoth(): IMathJsChain; + acoth(): MathJsChain; /** * Calculate the inverse cosecant of a value. For matrices, the function is evaluated element wise. */ - acsc(): IMathJsChain; + acsc(): MathJsChain; /** * Calculate the hyperbolic arccosecant of a value, defined as acsch(x) = ln(1/x + sqrt(1/x^2 + 1)). * For matrices, the function is evaluated element wise. */ - acsch(): IMathJsChain; + acsch(): MathJsChain; /** * Calculate the inverse secant of a value. For matrices, the function is evaluated element wise. */ - asec(): IMathJsChain; + asec(): MathJsChain; /** * Calculate the hyperbolic arcsecant of a value, defined as asech(x) = ln(sqrt(1/x^2 - 1) + 1/x). For matrices, the function is evaluated element wise. */ - asech(): IMathJsChain; + asech(): MathJsChain; - /** + /** * Calculate the inverse sine of a value. For matrices, the function is evaluated element wise. */ - asin(): IMathJsChain; + asin(): MathJsChain; /** * Calculate the hyperbolic arcsine of a value, defined as asinh(x) = ln(x + sqrt(x^2 + 1)). For matrices, the function is evaluated element wise. */ - asinh(): IMathJsChain; + asinh(): MathJsChain; /** * Calculate the inverse tangent of a value. For matrices, the function is evaluated element wise. */ - atan(): IMathJsChain; + atan(): MathJsChain; /** - * Calculate the inverse tangent function with two arguments, y/x. By providing two arguments, the right quadrant of the + * Calculate the inverse tangent function with two arguments, y/x. By providing two arguments, the right quadrant of the * computed angle can be determined. - * * For matrices, the function is evaluated element wise. */ - atan2(x: number): IMathJsChain; - atan2(x: MathArray|Matrix): IMathJsChain; + atan2(x: number|MathArray|Matrix): MathJsChain; /** * Calculate the hyperbolic arctangent of a value, defined as atanh(x) = ln((1 + x)/(1 - x)) / 2. * For matrices, the function is evaluated element wise. */ - atanh(): IMathJsChain; + atanh(): MathJsChain; /** * Calculate the cosine of a value. For matrices, the function is evaluated element wise. */ - asin(): IMathJsChain; + asin(): MathJsChain; // tslint:disable-line adjacent-overload-signatures /** * Calculate the hyperbolic cosine of a value, defined as cosh(x) = 1/2 * (exp(x) + exp(-x)). For matrices, the function is evaluated element wise. */ - cosh(): IMathJsChain; + cosh(): MathJsChain; /** * Calculate the cotangent of a value. cot(x) is defined as 1 / tan(x). For matrices, the function is evaluated element wise. */ - cot(): IMathJsChain; + cot(): MathJsChain; /** * Calculate the hyperbolic cotangent of a value, defined as coth(x) = 1 / tanh(x). For matrices, the function is evaluated element wise. */ - coth(): IMathJsChain; + coth(): MathJsChain; /** * Calculate the cosecant of a value, defined as csc(x) = 1/sin(x). For matrices, the function is evaluated element wise. */ - csc(): IMathJsChain; + csc(): MathJsChain; /** * Calculate the hyperbolic cosecant of a value, defined as csch(x) = 1 / sinh(x). For matrices, the function is evaluated element wise. */ - csch(): IMathJsChain; + csch(): MathJsChain; /** * Calculate the secant of a value, defined as sec(x) = 1/cos(x). For matrices, the function is evaluated element wise. */ - sec(): IMathJsChain; + sec(): MathJsChain; /** * Calculate the hyperbolic secant of a value, defined as sech(x) = 1 / cosh(x). For matrices, the function is evaluated element wise. */ - sech(): IMathJsChain; + sech(): MathJsChain; /** * Calculate the sine of a value. For matrices, the function is evaluated element wise. */ - sin(): IMathJsChain; + sin(): MathJsChain; /** * Calculate the hyperbolic sine of a value, defined as sinh(x) = 1/2 * (exp(x) - exp(-x)). For matrices, the function is evaluated element wise. */ - sinh(): IMathJsChain; + sinh(): MathJsChain; /** * Calculate the tangent of a value. tan(x) is equal to sin(x) / cos(x). For matrices, the function is evaluated element wise. */ - tan(): IMathJsChain; + tan(): MathJsChain; /** * Calculate the hyperbolic tangent of a value, defined as tanh(x) = (exp(2 * x) - 1) / (exp(2 * x) + 1). For matrices, the function is evaluated element wise. */ - tanh(): IMathJsChain; + tanh(): MathJsChain; /** * Change the unit of a value. For matrices, the function is evaluated element wise. * @param x The unit to be converted. * @param unit New unit. Can be a string like "cm" or a unit without value. */ - to(unit: Unit|string): IMathJsChain; + to(unit: Unit|string): MathJsChain; /** * Clone an object. */ - clone(): IMathJsChain; + clone(): MathJsChain; /** * Filter the items in an array or one dimensional matrix. * @param x A one dimensional matrix or array to filter - * @param test + * @param test */ - filter(test: RegExp|((item: any)=>boolean)): IMathJsChain; + filter(test: RegExp|((item: any) => boolean)): MathJsChain; /** * Format a value of any type into a string. */ - format(options?: IFormatOptions|number|((item: any)=>string)): IMathJsChain; + format(options?: FormatOptions|number|((item: any) => string)): MathJsChain; /** * Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array. * @param callback The callback method is invoked with three parameters: the value of the element, the index of the element, and the matrix being traversed. */ - map(callback: (item: any)=>any): IMathJsChain; + map(callback: (item: any) => any): MathJsChain; /** * Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect. @@ -2296,20 +2220,16 @@ declare namespace mathjs { * @param compare An optional comparator function. The function is called as compare(a, b), and must return 1 when a > b, -1 when a < b, and 0 when a == b. Default value: 'asc'. * @returns Returns the kth lowest value. */ - partitionSelect(k: number, compare?: string|((a: any, b: any)=>number)): IMathJsChain; + partitionSelect(k: number, compare?: string|((a: any, b: any) => number)): MathJsChain; /** * Sort the items in a matrix. * @param compare An optional comparator function. The function is called as compare(a, b), and must return 1 when a > b, -1 when a < b, and 0 when a == b. Default value: 'asc'. */ - sort(compare?: string|((a: any, b: any)=>number)): IMathJsChain; + sort(compare?: string|((a: any, b: any) => number)): MathJsChain; done(): any; valueOf(): any; toString(): string; } } - -declare module 'mathjs'{ - export = math; -} diff --git a/types/mathjs/mathjs-tests.ts b/types/mathjs/mathjs-tests.ts index 64e5e0673b..6cf43dc698 100644 --- a/types/mathjs/mathjs-tests.ts +++ b/types/mathjs/mathjs-tests.ts @@ -1,500 +1,299 @@ - - - /* Basic usage examples */ -(function(){ +{ // functions and constants - math.round(math.e, 3); // 2.718 - math.atan2(3, -3) / math.pi; // 0.75 - math.log(10000, 10); // 4 - math.sqrt(-4); // 2i - math.pow([[-1, 2], [3, 1]], 2); // [[7, 0], [0, 7]] - var angle = 0.2; - math.add(math.pow(math.sin(angle), 2), math.pow(math.cos(angle), 2)); // returns number ~1 + math.round(math.e, 3); + math.atan2(3, -3) / math.pi; + math.log(10000, 10); + math.sqrt(-4); + math.pow([[-1, 2], [3, 1]], 2); + const angle = 0.2; + math.add(math.pow(math.sin(angle), 2), math.pow(math.cos(angle), 2)); // expressions - math.eval('1.2 * (2 + 4.5)'); // 7.8 - math.eval('5.08 cm to inch'); // 2 inch - math.eval('sin(45 deg) ^ 2'); // 0.5 - math.eval('9 / 3 + 2i'); // 3 + 2i - math.eval('det([-1, 2; 3, 1])'); // -7 + math.eval('1.2 * (2 + 4.5)'); // chained operations - var a = math.chain(3) + const a = math.chain(3) .add(4) .multiply(2) .done(); // 14 // mixed use of different data types in functions - console.log('mixed use of data types'); math.add(4, [5, 6]); // number + Array, [9, 10] math.multiply(math.unit('5 mm'), 3); // Unit * number, 15 mm math.subtract([2, 3, 4], 5); // Array - number, [-3, -2, -1] math.add(math.matrix([2, 3]), [4, 5]); // Matrix + Array, [6, 8] -}()); - +} /* Bignumbers examples */ -(function() { +{ // configure the default type of numbers as BigNumbers math.config({ - number: 'bignumber', // Default type of number: - // 'number' (default), 'bignumber', or 'fraction' - precision: 20 // Number of significant digits for BigNumbers + number: 'bignumber', + precision: 20, }); - console.log('round-off errors with numbers'); - math.add(0.1, 0.2); // number, 0.30000000000000004 - math.divide(0.3, 0.2); // number, 1.4999999999999998 - console.log(); - - console.log('no round-off errors with BigNumbers'); - math.add(math.bignumber(0.1), math.bignumber(0.2)); // BigNumber, 0.3 - math.divide(math.bignumber(0.3), math.bignumber(0.2)); // BigNumber, 1.5 - console.log(); - - console.log('create BigNumbers from strings when exceeding the range of a number'); - math.bignumber(1.2e+500); // BigNumber, Infinity WRONG - math.bignumber('1.2e+500'); // BigNumber, 1.2e+500 - console.log(); - - // one can work conveniently with BigNumbers using the expression parser. - // note though that BigNumbers are only supported in arithmetic functions - console.log('use BigNumbers in the expression parser'); - math.eval('0.1 + 0.2'); // BigNumber, 0.3 - math.eval('0.3 / 0.2'); // BigNumber, 1.5 - console.log(); -}()); - - + { + math.add(math.bignumber(0.1), math.bignumber(0.2)); // BigNumber, 0.3 + math.divide(math.bignumber(0.3), math.bignumber(0.2)); // BigNumber, 1.5 + } +} /* Chaining examples */ -(function() { - // create a chained operation using the function `chain(value)` - // end a chain using done(). Let's calculate (3 + 4) * 2 - var a = math.chain(3) +{ + const a = math.chain(3) .add(4) .multiply(2) .done(); // 14 // Another example, calculate square(sin(pi / 4)) - var b = math.chain(math.pi) + const b = math.chain(math.pi) .divide(4) .sin() .square() - .done(); // 0.5 - - // A chain has a few special methods: done, toString, valueOf, get, and set. - // these are demonstrated in the following examples + .done(); // toString will return a string representation of the chain's value - var chain = math.chain(2).divide(3); - var str = chain.toString(); // "0.6666666666666666" - - // a chain has a function .valueOf(), which returns the value hold by the chain. - // This allows using it in regular operations. The function valueOf() acts the - // same as function done(). - chain.valueOf(); // 0.66666666666667 + const chain = math.chain(2).divide(3); + const str: string = chain.toString(); // "0.6666666666666666" + chain.valueOf(); // the function subset can be used to get or replace sub matrices - var array = [[1, 2], [3, 4]]; - var v = math.chain(array) + const array = [[1, 2], [3, 4]]; + const v = math.chain(array) .subset(math.index(1, 0)) .done(); // 3 - var m = math.chain(array) + const m = math.chain(array) .subset(math.index(0, 0), 8) .multiply(3) - .done(); // [[24, 6], [9, 12]] -}()); - + .done(); +} /* Complex numbers examples */ -(function(){ - var a = math.complex(2, 3); // 2 + 3i +{ + const a = math.complex(2, 3); + // create a complex number by providing a string with real and complex parts + const b = math.complex('3 - 7i'); // read the real and complex parts of the complex number - a.re; // 2 - a.im; // 3 + { + const x: number = a.re; + const y: number = a.im; + + // adjust the complex value + a.re = 5; + } // clone a complex value - var clone = a.clone(); // 2 + 3i - - // adjust the complex value - a.re = 5; // 5 + 3i - - // create a complex number by providing a string with real and complex parts - var b = math.complex('3 - 7i'); // 3 - 7i - console.log(); + { + const clone = a.clone(); + } // perform operations with complex numbers - console.log('perform operations'); - math.add(a, b); // 8 - 4i - math.multiply(a, b); // 36 - 26i - math.sin(a); // -9.6541254768548 + 2.8416922956064i - - // some operations will return a complex number depending on the arguments - math.sqrt(4); // 2 - math.sqrt(-4); // 2i + { + math.add(a, b); + math.multiply(a, b); + math.sin(a); + } // create a complex number from polar coordinates - console.log('create complex numbers with polar coordinates'); - var c = math.complex({r: math.sqrt(2), phi: math.pi / 4}); // 1 + i + { + const p: math.PolarCoordinates = { r: math.sqrt(2), phi: math.pi / 4 }; + const c: math.Complex = math + .complex(p); + } // get polar coordinates of a complex number - var d = math.complex(3, 4); - d.toPolar(); // { r: 5, phi: 0.9272952180016122 } -}()); - + { + const p: math.PolarCoordinates = math + .complex(3, 4) + .toPolar(); + } +} /* Expressions examples */ -(function() { - // 1. using the function math.eval - // - // Function `eval` accepts a single expression or an array with - // expressions as first argument, and has an optional second argument - // containing a scope with variables and functions. The scope is a regular - // JavaScript Object. The scope will be used to resolve symbols, and to write - // assigned variables or function. - console.log('1. USING FUNCTION MATH.EVAL'); - +{ // evaluate expressions - console.log('\nevaluate expressions'); - math.eval('sqrt(3^2 + 4^2)'); // 5 - math.eval('sqrt(-4)'); // 2i - math.eval('2 inch to cm'); // 5.08 cm - math.eval('cos(45 deg)'); // 0.70711 + { + math.eval('sqrt(3^2 + 4^2)'); + } // evaluate multiple expressions at once - console.log('\nevaluate multiple expressions at once'); - math.eval([ - 'f = 3', - 'g = 4', - 'f * g' - ]); // [3, 4, 12] - - // provide a scope (just a regular JavaScript Object) - console.log('\nevaluate expressions providing a scope with variables and functions'); - var scope: any = { - a: 3, - b: 4 - }; - - // variables can be read from the scope - math.eval('a * b', scope); // 12 - - // variable assignments are written to the scope - math.eval('c = 2.3 + 4.5', scope); // 6.8 - scope.c; // 6.8 + { + math.eval([ + 'f = 3', + 'g = 4', + 'f * g' + ]); + } // scope can contain both variables and functions - scope["hello"] = function (name: string) { - return 'hello, ' + name + '!'; - }; - math.eval('hello("hero")', scope); // "hello, hero!" + { + const scope = { hello: (name: string) => `hello, ${name}!` }; + math.eval('hello("hero")', scope); // "hello, hero!" + } // define a function as an expression - var f = math.eval('f(x) = x ^ a', scope); - f(2); // 8 - scope.f(2); // 8 - - - - // 2. using function math.parse - // - // Function `math.parse` parses expressions into a node tree. The syntax is - // similar to function `math.eval`. - // Function `parse` accepts a single expression or an array with - // expressions as first argument. The function returns a node tree, which - // then can be compiled against math, and then evaluated against an (optional - // scope. This scope is a regular JavaScript Object. The scope will be used - // to resolve symbols, and to write assigned variables or function. - console.log('\n2. USING FUNCTION MATH.PARSE'); - - // parse an expression - console.log('\nparse an expression into a node tree'); - var node1 = math.parse('sqrt(3^2 + 4^2)'); - node1.toString(); // "sqrt((3 ^ 2) + (4 ^ 2))" - - // compile and evaluate the compiled code - // you could also do this in two steps: node1.compile().eval() - node1.eval(); // 5 - - // provide a scope - console.log('\nprovide a scope'); - var node2 = math.parse('x^a'); - var code2 = node2.compile(); - node2.toString(); // "x ^ a" - var scope: any = { - x: 3, - a: 2 - }; - code2.eval(scope); // 9 - - // change a value in the scope and re-evaluate the node - scope.a = 3; - code2.eval(scope); // 27 + { + const scope: any = { + a: 3, + b: 4, + }; + const f = math.eval('f(x) = x ^ a', scope); + f(2); + scope.f(2); + } + { + const node2 = math.parse('x^a'); + const code2: math.EvalFunction = node2.compile(); + node2.toString(); + } // 3. using function math.compile - // - // Function `math.compile` compiles expressions into a node tree. The syntax is - // similar to function `math.eval`. - // Function `compile` accepts a single expression or an array with - // expressions as first argument, and returns an object with a function eval - // to evaluate the compiled expression. On evaluation, an optional scope can - // be provided. This scope will be used to resolve symbols, and to write - // assigned variables or function. - console.log('\n3. USING FUNCTION MATH.COMPILE'); - // parse an expression - console.log('\ncompile an expression'); - var code3 = math.compile('sqrt(3^2 + 4^2)'); - - // evaluate the compiled code - code3.eval(); // 5 - - // provide a scope for the variable assignment - console.log('\nprovide a scope'); - var code2 = math.compile('a = a + 3'); - var scope: any = { - a: 7 - }; - code2.eval(scope); - scope.a; // 10 - - + { + // provide a scope for the variable assignment + const code2 = math.compile('a = a + 3'); + const scope = { a: 7 }; + code2.eval(scope); + } // 4. using a parser - // - // In addition to the static functions `math.eval` and `math.parse`, math.js - // contains a parser with functions `eval` and `parse`, which automatically - // keeps a scope with assigned variables in memory. The parser also contains - // some convenience methods to get, set, and remove variables from memory. - console.log('\n4. USING A PARSER'); - var parser = math.parser(); - - // evaluate with parser - console.log('\nevaluate expressions'); - parser.eval('sqrt(3^2 + 4^2)'); // 5 - parser.eval('sqrt(-4)'); // 2i - parser.eval('2 inch to cm'); // 5.08 cm - parser.eval('cos(45 deg)'); // 0.70711 - - // define variables and functions - console.log('\ndefine variables and functions'); - parser.eval('x = 7 / 2'); // 3.5 - parser.eval('x + 3'); // 6.5 - parser.eval('f(x, y) = x^y'); // f(x, y) - parser.eval('f(2, 3)'); // 8 - - // manipulate matrices - // Note that matrix indexes in the expression parser are one-based with the - // upper-bound included. On a JavaScript level however, math.js uses zero-based - // indexes with an excluded upper-bound. - console.log('\nmanipulate matrices'); - parser.eval('k = [1, 2; 3, 4]'); // [[1, 2], [3, 4]] - parser.eval('l = zeros(2, 2)'); // [[0, 0], [0, 0]] - parser.eval('l[1, 1:2] = [5, 6]'); // [[5, 6], [0, 0]] - parser.eval('l[2, :] = [7, 8]'); // [[5, 6], [7, 8]] - parser.eval('m = k * l'); // [[19, 22], [43, 50]] - parser.eval('n = m[2, 1]'); // 43 - parser.eval('n = m[:, 1]'); // [[19], [43]] + const parser = math.parser(); // get and set variables and functions - console.log('\nget and set variables and function in the scope of the parser'); - var x = parser.get('x'); - console.log('x =', x); // x = 7 - var f = parser.get('f'); - console.log('f =', math.format(f)); // f = f(x, y) - var g = f(3, 3); - console.log('g =', g); // g = 27 + { + const x = parser.get('x'); + const f = parser.get('f'); + const g = f(3, 3); - parser.set('h', 500); - parser.eval('h / 2'); // 250 - parser.set('hello', function (name: string) { - return 'hello, ' + name + '!'; - }); - parser.eval('hello("hero")'); // "hello, hero!" + parser.set('h', 500); + parser.set('hello', (name: string) => `hello, ${name}!`); + } // clear defined functions and variables parser.clear(); -}()); - +} /* Fractions examples */ -(function(){ +{ // configure the default type of numbers as Fractions math.config({ - number: 'fraction' // Default type of number: - // 'number' (default), 'bignumber', or 'fraction' + number: 'fraction', }); - console.log('basic usage'); - math.fraction(0.125); // Fraction, 1/8 - math.fraction(0.32); // Fraction, 8/25 - math.fraction('1/3'); // Fraction, 1/3 - math.fraction('0.(3)'); // Fraction, 1/3 - math.fraction(2, 3); // Fraction, 2/3 - math.fraction('0.(285714)'); // Fraction, 2/7 - console.log(); + const x = math.fraction(0.125); + const y = math.fraction('1/3'); + math.fraction(2, 3); - console.log('round-off errors with numbers'); - math.add(0.1, 0.2); // number, 0.30000000000000004 - math.divide(0.3, 0.2); // number, 1.4999999999999998 - console.log(); - - console.log('no round-off errors with fractions :)'); - math.add(math.fraction(0.1), math.fraction(0.2)); // Fraction, 3/10 - math.divide(math.fraction(0.3), math.fraction(0.2)); // Fraction, 3/2 - console.log(); - - console.log('represent an infinite number of repeating digits'); - math.fraction('1/3'); // Fraction, 0.(3) - math.fraction('2/7'); // Fraction, 0.(285714) - math.fraction('23/11'); // Fraction, 2.(09) - console.log(); - - // one can work conveniently with fractions using the expression parser. - // note though that Fractions are only supported by basic arithmetic functions - console.log('use fractions in the expression parser'); - math.eval('0.1 + 0.2'); // Fraction, 3/10 - math.eval('0.3 / 0.2'); // Fraction, 3/2 - math.eval('23 / 11'); // Fraction, 23/11 - console.log(); + math.add(x, y); + math.divide(x, y); // output formatting - console.log('output formatting of fractions'); - var a = math.fraction('2/3'); - console.log(math.format(a)); // Fraction, 2/3 - console.log(math.format(a, {fraction: 'ratio'})); // Fraction, 2/3 - console.log(math.format(a, {fraction: 'decimal'})); // Fraction, 0.(6) - console.log(a.toString()); // Fraction, 0.(6) - console.log(); -}()); + const a = math.fraction('2/3'); + console.log(math.format(a)); + console.log(math.format(a, {fraction: 'ratio'})); + console.log(math.format(a, {fraction: 'decimal'})); +} /* Matrices examples */ -(function() { +{ // create matrices and arrays. a matrix is just a wrapper around an Array, // providing some handy utilities. - console.log('create a matrix'); - var a = math.matrix([1, 4, 9, 16, 25]); // [1, 4, 9, 16, 25] - var b = math.matrix(math.ones([2, 3])); // [[1, 1, 1], [1, 1, 1]] - b.size(); // [2, 3] + const a: math.Matrix = math.matrix([1, 4, 9, 16, 25]); + const b: math.Matrix = math.matrix(math.ones([2, 3])); + b.size(); // the Array data of a Matrix can be retrieved using valueOf() - var array = a.valueOf(); // [1, 4, 9, 16, 25] + const array = a.valueOf(); // Matrices can be cloned - var clone = a.clone(); // [1, 4, 9, 16, 25] - console.log(); + const clone: math.Matrix = a.clone(); // perform operations with matrices - console.log('perform operations'); - math.sqrt(a); // [1, 2, 3, 4, 5] - var c = [1, 2, 3, 4, 5]; - math.factorial(c); // [1, 2, 6, 24, 120] - console.log(); + math.sqrt(a); + math.factorial(a); // create and manipulate matrices. Arrays and Matrices can be used mixed. - console.log('manipulate matrices'); - var d = [[1, 2], [3, 4]]; // [[1, 2], [3, 4]] - var e = math.matrix([[5, 6], [1, 1]]); // [[5, 6], [1, 1]] + { + const a = [[1, 2], [3, 4]]; + const b: math.Matrix = math.matrix([[5, 6], [1, 1]]); - // set a submatrix. - // Matrix indexes are zero-based. - e.subset(math.index(1, [0, 1]), [[7, 8]]); // [[5, 6], [7, 8]] - var f = math.multiply(d, e); // [[19, 22], [43, 50]] - var g = f.subset(math.index(1, 0)); // 43 - console.log(); + b.subset(math.index(1, [0, 1]), [[7, 8]]); + const c = math.multiply(a, b); + const d: math.Matrix = c.subset(math.index(1, 0)); + } // get a sub matrix - // Matrix indexes are zero-based. - console.log('get a sub matrix'); - var h = math.diag(math.range(1,4)); // [[1, 0, 0], [0, 2, 0], [0, 0, 3]] - h.subset( math.index([1, 2], [1, 2])); // [[2, 0], [0, 3]] - var i = math.range(1,6); // [1, 2, 3, 4, 5] - i.subset(math.index(math.range(1,4))); // [2, 3, 4] - console.log(); - + { + const a: math.Matrix = math.diag(math.range(1, 4)); + a.subset(math.index([1, 2], [1, 2])); + const b: math.Matrix = math.range(1, 6); + b.subset(math.index(math.range(1, 4))); + } // resize a multi dimensional matrix - console.log('resizing a matrix'); - var j = math.matrix(); - var defaultValue = 0; - j.resize([2, 2, 2], defaultValue); // [[[0, 0], [0, 0]], [[0, 0], [0, 0]]] - j.size(); // [2, 2, 2] - j.resize([2, 2]); // [[0, 0], [0, 0]] - j.size(); // [2, 2] - console.log(); + { + const a = math.matrix(); + a.resize([2, 2, 2], 0); + a.size(); + a.resize([2, 2]); + a.size(); + } - // setting a value outside the matrices range will resize the matrix. - // new elements will be initialized with zero. - console.log('set a value outside a matrices range'); - var k = math.matrix(); - k.subset(math.index(2), 6); // [0, 0, 6] - console.log(); - - console.log('set a value outside a matrices range, leaving new entries uninitialized'); - var m = math.matrix(); - defaultValue = math.uninitialized; - m.subset(math.index(2), 6, defaultValue); // [undefined, undefined, 6] - console.log(); + // can set a subset of a matrix to uninitialized + { + const m = math.matrix(); + m.subset(math.index(2), 6, math.uninitialized); + } // create ranges - console.log('create ranges'); - math.range(1, 6); // [1, 2, 3, 4, 5] - math.range(0, 18, 3); // [0, 3, 6, 9, 12, 15] - math.range('2:-1:-3'); // [2, 1, 0, -1, -2] - math.factorial(math.range('1:6')); // [1, 2, 6, 24, 120] - console.log(); -}()); + { + math.range(1, 6); + math.range(0, 18, 3); + math.range('2:-1:-3'); + math.factorial(math.range('1:6')); + } +} /* Sparse matrices examples */ -(function() { +{ // create a sparse matrix - console.log('creating a 1000x1000 sparse matrix...'); - var a = math.eye(1000, 1000, 'sparse'); + const a = math.eye(1000, 1000, 'sparse'); // do operations with a sparse matrix - console.log('doing some operations on the sparse matrix...'); - var b = math.multiply(a, a); - var c = math.multiply(b, math.complex(2, 2)); - var d = math.transpose(c); - var e = math.multiply(d, a); - - // we will not print the output, but doing the same operations - // with a dense matrix are very slow, try it for yourself. - console.log('already done'); - console.log('now try this with a dense matrix :)'); -}()); + const b = math.multiply(a, a); + const c = math.multiply(b, math.complex(2, 2)); + const d = math.transpose(c); + const e = math.multiply(d, a); +} /* Units examples */ -(function() { +{ // units can be created by providing a value and unit name, or by providing // a string with a valued unit. - console.log('create units'); - var a = math.unit(45, 'cm'); // 450 mm - var b = math.unit('0.1m'); // 100 mm - console.log(); + const a = math.unit(45, 'cm'); // 450 mm + const b = math.unit('0.1m'); // 100 mm // creating units math.createUnit('foo'); @@ -509,7 +308,7 @@ Units examples aliases: ['knots', 'kt', 'kts'], prefixes: 'long' }, {override: true}); - math.createUnit( { + math.createUnit({ foo: { prefixes: 'long' }, @@ -526,146 +325,43 @@ Units examples math.createUnit('c', {definition: b}, {override: true}); // units can be added, subtracted, and multiplied or divided by numbers and by other units - console.log('perform operations'); - math.add(a, b); // 0.55 m - math.multiply(b, 2); // 200 mm - math.divide(math.unit('1 m'), math.unit('1 s')); // 1 m / s - math.pow(math.unit('12 in'), 3); // 1728 in^3 - console.log(); + math.add(a, b); + math.multiply(b, 2); + math.divide(math.unit('1 m'), math.unit('1 s')); + math.pow(math.unit('12 in'), 3); // units can be converted to a specific type, or to a number - console.log('convert to another type or to a number'); - b.to('cm'); // 10 cm Alternatively: math.to(b, 'cm') - math.to(b, 'inch'); // 3.9370... inch - b.toNumber('cm'); // 10 - math.number(b, 'cm'); // 10 - console.log(); + b.to('cm'); + math.to(b, 'inch'); + b.toNumber('cm'); + math.number(b, 'cm'); // the expression parser supports units too - console.log('parse expressions'); - math.eval('2 inch to cm'); // 5.08 cm - math.eval('cos(45 deg)'); // 0.70711... - math.eval('90 km/h to m/s'); // 25 m / s - console.log(); - - // convert a unit to a number - // A second parameter with the unit for the exported number must be provided - math.eval('number(5 cm, mm)'); // number, 50 - console.log(); - - // simplify units - console.log('simplify units'); - math.eval('100000 N / m^2'); // 100 kPa - math.eval('9.81 m/s^2 * 100 kg * 40 m'); // 39.24 kJ - console.log(); - - // example engineering calculations - console.log('compute molar volume of ideal gas at 65 Fahrenheit, 14.7 psi in L/mol'); - var Rg = math.unit('8.314 N m / (mol K)'); - var T = math.unit('65 degF'); - var P = math.unit('14.7 psi'); - var v = math.divide(math.multiply(Rg, T), P); - console.log('gas constant (Rg) = ', format(Rg)); - console.log('P = ' + format(P)); - console.log('T = ' + format(T)); - console.log('v = Rg * T / P = ' + format(math.to(v, 'L/mol'))); // 23.910... L / mol - console.log(); - - console.log('compute speed of fluid flowing out of hole in a container'); - var g = math.unit('9.81 m / s^2'); - var h = math.unit('1 m'); - var v2 = math.pow(math.multiply(2, math.multiply(g, h)), 0.5); // Can also use math.sqrt - console.log('g = ' + format(g)); - console.log('h = ' + format(h)); - console.log('v = (2 g h) ^ 0.5 = ' + format(v2)); // 4.429... m / s - console.log(); - - console.log('electrical power consumption:'); - var expr = '460 V * 20 A * 30 days to kWh'; - console.log(expr + ' = ' + math.eval(expr)); // 6624 kWh - console.log(); - - console.log('circuit design:'); - var expr = '24 V / (6 mA)'; - console.log(expr + ' = ' + math.eval(expr)); // 4 kohm - console.log(); - - console.log('operations on arrays:'); - var B = math.eval('[1, 0, 0] T'); - var v3 = math.eval('[0, 1, 0] m/s'); - var q = math.eval('1 C'); - var F = math.multiply(q, math.cross(v3, B)); - console.log('B (magnetic field strength) = ' + format(B)); // [1 T, 0 T, 0 T] - console.log('v (particle velocity) = ' + format(v3)); // [0 m / s, 1 m / s, 0 m / s] - console.log('q (particle charge) = ' + format(q)); // 1 C - console.log('F (force) = q (v cross B) = ' + format(F)); // [0 N, 0 N, -1 N] - - /** - * Helper function to format an output a value. - * @param {*} value - * @return {string} Returns the formatted value - */ - function format (value: any): string { - var precision = 14; - return math.format(value, precision); - } -}()); - + math.eval('2 inch to cm'); +} /* Expression tree examples */ -(function(){ +{ + // Filter an expression tree + const node: math.MathNode = math.parse('x^2 + x/4 + 3*y'); + const filtered: math.MathNode[] = node.filter((node: math.MathNode) => node.isSymbolNode && node.name === 'x'); - // Filter an expression tree -console.log('Filter all symbol nodes "x" in the expression "x^2 + x/4 + 3*y"'); -var node = math.parse('x^2 + x/4 + 3*y'); -var filtered = node.filter(function (node) { - return node.isSymbolNode && node.name == 'x'; -}); -// returns an array with two entries: two SymbolNodes 'x' + const arr: string[] = filtered.map((node: math.MathNode) => node.toString()); -filtered.forEach(function (node) { - console.log(node.type, node.toString()) -}); -// outputs: -// SymbolNode x -// SymbolNode x - - -// Traverse an expression tree -console.log(); -console.log('Traverse the expression tree of expression "3 * x + 2"'); -var node1 = math.parse('3 * x + 2'); -node1.traverse(function (node, path, parent) { - switch (node.type) { - // case 'OperatorNode': console.log(node.type, node.op); break; - case 'OperatorNode': console.log(node.type); break;//for now removing .op - case 'ConstantNode': console.log(node.type, node.value); break; - case 'SymbolNode': console.log(node.type, node.name); break; - default: console.log(node.type); - } -}); -// outputs: -// OperatorNode + -// OperatorNode * -// ConstantNode 3 -// SymbolNode x -// ConstantNode 2 - - -// transform an expression tree -// console.log(); -// console.log('Replace all symbol nodes "x" in expression "x^2 + 5*x" with a constant 3'); -// var node2 = math.parse('x^2 + 5*x'); -// var transformed = node2.transform(function (node, path, parent) { -// if (node.isSymbolNode && node.name == 'x') { -// return new math.expression.node.ConstantNode(3); -// } -// else { -// return node; -// } -// }); -// console.log(transformed.toString()); -// outputs: '(3 ^ 2) + (5 * 3)' -}()); + // Traverse an expression tree + const node1: math.MathNode = math.parse('3 * x + 2'); + node1.traverse((node: math.MathNode, path: string, parent: math.MathNode) => { + switch (node.type) { + case 'OperatorNode': + return node.type === 'OperatorNode'; + case 'ConstantNode': + return node.type === 'ConstantNode'; + case 'SymbolNode': + return node.type === 'SymbolNode'; + default: + return node.type === 'any string at all'; + } + }); +} diff --git a/types/mathjs/package.json b/types/mathjs/package.json new file mode 100644 index 0000000000..23474e431e --- /dev/null +++ b/types/mathjs/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "decimal.js": "^10.0.0" + } +} diff --git a/types/mathjs/tslint.json b/types/mathjs/tslint.json index a41bf5d19a..c2e987daf6 100644 --- a/types/mathjs/tslint.json +++ b/types/mathjs/tslint.json @@ -1,79 +1,6 @@ { "extends": "dtslint/dt.json", "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false + "only-arrow-functions": false } } diff --git a/types/mem-fs-editor/index.d.ts b/types/mem-fs-editor/index.d.ts new file mode 100644 index 0000000000..01234bbc0c --- /dev/null +++ b/types/mem-fs-editor/index.d.ts @@ -0,0 +1,48 @@ +// Type definitions for mem-fs-editor 4.0 +// Project: https://github.com/SBoudrias/mem-fs-editor#readme +// Definitions by: My Food Bag +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + +import * as Buffer from 'buffer'; +import { Transform } from 'stream'; +import { Store } from 'mem-fs'; +import { Options as TemplateOptions } from 'ejs'; +import { IOptions as GlobOptions } from 'glob'; + +export function create(store: Store): memFsEditor.Editor; + +export namespace memFsEditor { + type Contents = string|Buffer; + + type ReplacerFunc = (key: string, value: any) => string|null|undefined; + + type Space = string|number; + + type ProcessFunc = (contents: Buffer) => Contents; + + interface CopyOptions { + process?: ProcessFunc; + globOptions?: GlobOptions; + } + + interface Editor { + read: (filepath: string, options?: { raw: boolean, defaults: string }) => string; + readJSON: (filepath: string, defaults?: string) => string; + write: (filepath: string, contents: Contents) => void; + writeJSON: (filepath: string, contents: object, replacer?: ReplacerFunc, space?: Space) => void; + append: (filepath: string, contents: Contents, options?: { trimEnd: boolean, separator: string }) => void; + extendJSON: (filepath: string, contents: object, replacer?: ReplacerFunc, space?: Space) => void; + delete: (filepath: string, options?: { globOptions: GlobOptions }) => void; + copy: (from: string, to: string, options?: CopyOptions) => void; + copyTpl: (from: string, to: string, context: object, templateOptions?: TemplateOptions, copyOptions?: CopyOptions) => void; + move: (from: string, to: string, options?: { globOptions: GlobOptions }) => void; + exists: (filepath: string) => boolean; + commit: (filters: ReadonlyArray, callback: () => void) => void; + } + + const prototype: { + }; +} diff --git a/types/mem-fs-editor/mem-fs-editor-tests.ts b/types/mem-fs-editor/mem-fs-editor-tests.ts new file mode 100644 index 0000000000..355c714bf9 --- /dev/null +++ b/types/mem-fs-editor/mem-fs-editor-tests.ts @@ -0,0 +1,18 @@ +import memFs = require('mem-fs'); +import editor = require('mem-fs-editor'); + +const store = memFs.create(); +const fs = editor.create(store); + +fs.write('template.js', 'var a = 1; console.log(\'<%= foo %>\', a);'); + +fs.copy('template.js', 'template.tpl', { + process: (contents) => contents, + globOptions: { + cwd: '.' + } +}); + +fs.copyTpl('template.tpl', 'output.js', { + foo: 'bar' +}); diff --git a/types/mem-fs-editor/tsconfig.json b/types/mem-fs-editor/tsconfig.json new file mode 100644 index 0000000000..52623549e4 --- /dev/null +++ b/types/mem-fs-editor/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "mem-fs-editor-tests.ts" + ] +} diff --git a/types/mem-fs-editor/tslint.json b/types/mem-fs-editor/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/mem-fs-editor/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/mem-fs/index.d.ts b/types/mem-fs/index.d.ts new file mode 100644 index 0000000000..4b1d8c4d14 --- /dev/null +++ b/types/mem-fs/index.d.ts @@ -0,0 +1,22 @@ +// Type definitions for mem-fs 1.1 +// Project: https://github.com/sboudrias/mem-fs +// Definitions by: My Food Bag +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import { EventEmitter } from 'events'; +import { Transform } from 'stream'; +import * as File from 'vinyl'; + +export interface Store extends EventEmitter { + add: (file: File, content: string) => void; + each: (callback: (file: File, index: number) => void) => void; + get: (filepath: string) => File; + stream: () => Transform; +} + +export function create(...args: any[]): Store; + +export namespace memFs { +} diff --git a/types/mem-fs/mem-fs-tests.ts b/types/mem-fs/mem-fs-tests.ts new file mode 100644 index 0000000000..9605c65ef7 --- /dev/null +++ b/types/mem-fs/mem-fs-tests.ts @@ -0,0 +1,8 @@ +import * as fs from 'mem-fs'; + +const store: fs.Store = fs.create(); +const file = store.get('hello'); + +store.add(file, 'hahahahah'); + +store.each(file => console.dir(store.get(file.path))); diff --git a/types/mem-fs/tsconfig.json b/types/mem-fs/tsconfig.json new file mode 100644 index 0000000000..23cb94acb6 --- /dev/null +++ b/types/mem-fs/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "mem-fs-tests.ts" + ] +} diff --git a/types/mem-fs/tslint.json b/types/mem-fs/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/mem-fs/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/meow/index.d.ts b/types/meow/index.d.ts index 20e40c63f7..db3d697691 100644 --- a/types/meow/index.d.ts +++ b/types/meow/index.d.ts @@ -1,20 +1,27 @@ // Type definitions for meow 4.x // Project: https://github.com/sindresorhus/meow -// Definitions by: KnisterPeter , Lindsey Smith +// Definitions by: KnisterPeter +// Lindsey Smith +// Jason Dreyzehner // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -import * as buildOptions from "minimist-options"; +import * as buildOptions from 'minimist-options'; -declare function meow(helpMessage: string | string[], options: meow.Options): meow.Result; -declare function meow(options: string | string[] | meow.Options): meow.Result; +declare function meow( + helpMessage: string | ReadonlyArray, + options: meow.Options +): meow.Result; +declare function meow( + options: string | ReadonlyArray | meow.Options +): meow.Result; declare namespace meow { interface Options { description?: string | boolean; help?: string | boolean; version?: string | boolean; pkg?: any; - argv?: string[]; + argv?: ReadonlyArray; inferType?: boolean; flags?: buildOptions.Options; autoHelp?: boolean; @@ -24,7 +31,7 @@ declare namespace meow { interface Result { input: string[]; flags: { [name: string]: any }; - pkg: object; + pkg: any; help: string; showHelp(code?: number): void; showVersion(): void; diff --git a/types/meow/meow-tests.ts b/types/meow/meow-tests.ts index 8915603292..1b044881b5 100644 --- a/types/meow/meow-tests.ts +++ b/types/meow/meow-tests.ts @@ -1,28 +1,31 @@ import meow = require('meow'); -const cli = meow("Help text", - { - flags: { - unicorn: { - type: 'boolean', - alias: 'u' - }, - fooBar: { - type: 'string', - default: 'foo' - } +const cli = meow('Help text', { + flags: { + unicorn: { + type: 'boolean', + alias: 'u' + }, + fooBar: { + type: 'string', + default: 'foo' } } -); +}); -const cli2 = meow("Help text"); +const input: string = cli.input[0]; +const version: string = cli.pkg.version; + +const cli2 = meow('Help text'); + +const args: ReadonlyArray = ['foo', 'bar']; const cli3 = meow({ - description: "version string", - help: "help string", - version: "1.0.0", + description: 'version string', + help: 'help string', + version: '1.0.0', pkg: {}, - argv: ['foo', 'bar'], + argv: args, inferType: true, autoHelp: true, autoVersion: true, diff --git a/types/meteor-roles/index.d.ts b/types/meteor-roles/index.d.ts index 80a4b02c90..ed91f96ab5 100644 --- a/types/meteor-roles/index.d.ts +++ b/types/meteor-roles/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for Meteor Roles 1.2.14 // Project: https://github.com/alanning/meteor-roles/ // Definitions by: Robbie Van Gorkom +// Matthew Zartman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -262,3 +263,256 @@ declare namespace Roles { declare namespace Meteor { var roles : Mongo.Collection; } + + +/* Declaring in the format prescribed by Meteor */ +declare module "meteor/alanning:roles" { + namespace Roles { + /** + * Constant used to reference the special 'global' group that + * can be used to apply blanket permissions across all groups. + * + * @example + * Roles.addUsersToRoles(user, 'admin', Roles.GLOBAL_GROUP) + * Roles.userIsInRole(user, 'admin') // => true + * + * Roles.setUserRoles(user, 'support-staff', Roles.GLOBAL_GROUP) + * Roles.userIsInRole(user, 'support-staff') // => true + * Roles.userIsInRole(user, 'admin') // => false + * + * @property GLOBAL_GROUP + * @type String + * @static + * @final + */ + var GLOBAL_GROUP : string; + + /** + * Subscription handle for the currently logged in user's permissions. + * + * NOTE: The corresponding publish function, `_roles`, depends on + * `this.userId` so it will automatically re-run when the currently + * logged-in user changes. + * + * @example + * + * `Roles.subscription.ready()` // => `true` if user roles have been loaded + * + * @property subscription + * @type Object + * @for Roles + */ + var subscription : Subscription; + + /** + * Add users to roles. Will create roles as needed. + * + * NOTE: Mixing grouped and non-grouped roles for the same user + * is not supported and will throw an error. + * + * Makes 2 calls to database: + * 1. retrieve list of all existing roles + * 2. update users' roles + * + * @example + * Roles.addUsersToRoles(userId, 'admin') + * Roles.addUsersToRoles(userId, ['view-secrets'], 'example.com') + * Roles.addUsersToRoles([user1, user2], ['user','editor']) + * Roles.addUsersToRoles([user1, user2], ['glorious-admin', 'perform-action'], 'example.org') + * Roles.addUsersToRoles(userId, 'admin', Roles.GLOBAL_GROUP) + * + * @method addUsersToRoles + * @param {Array|String} users User id(s) or object(s) with an _id field + * @param {Array|String} roles Name(s) of roles/permissions to add users to + * @param {String} [group] Optional group name. If supplied, roles will be + * specific to that group. + * Group names can not start with '$' or numbers. + * Periods in names '.' are automatically converted + * to underscores. + * The special group Roles.GLOBAL_GROUP provides + * a convenient way to assign blanket roles/permissions + * across all groups. The roles/permissions in the + * Roles.GLOBAL_GROUP group will be automatically + * included in checks for any group. + */ + function addUsersToRoles( + user : string|string[]|Object|Object[], + roles : string|string[], + group? : string + ) : void; + + /** + * Create a new role. Whitespace will be trimmed. + * + * @method createRole + * @param {String} role Name of role + * @return {String} id of new role + */ + function createRole(role : string) : string; + + /** + * Delete an existing role. Will throw "Role in use" error if any users + * are currently assigned to the target role. + * + * @method deleteRole + * @param {String} role Name of role + */ + function deleteRole (role : string) : void; + + /** + * Retrieve set of all existing roles + * + * @method getAllRoles + * @return {Cursor} cursor of existing roles + */ + function getAllRoles() : Mongo.Cursor; + + /** + * Retrieve users groups, if any + * + * @method getGroupsForUser + * @param {String|Object} user User Id or actual user object + * @param {String} [role] Optional name of roles to restrict groups to. + * + * @return {Array} Array of user's groups, unsorted. Roles.GLOBAL_GROUP will be omitted + */ + function getGroupsForUser( + user : string|Object, + role? : string + ) : string[]; + + /** + * Retrieve users roles + * + * @method getRolesForUser + * @param {String|Object} user User Id or actual user object + * @param {String} [group] Optional name of group to restrict roles to. + * User's Roles.GLOBAL_GROUP will also be included. + * @return {Array} Array of user's roles, unsorted. + */ + function getRolesForUser( + user : string|Object, + group? : string + ) : string[]; + + /** + * Retrieve all users who are in target role. + * + * NOTE: This is an expensive query; it performs a full collection scan + * on the users collection since there is no index set on the 'roles' field. + * This is by design as most queries will specify an _id so the _id index is + * used automatically. + * + * @method getUsersInRole + * @param {Array|String} role Name of role/permission. If array, users + * returned will have at least one of the roles + * specified but need not have _all_ roles. + * @param {String} [group] Optional name of group to restrict roles to. + * User's Roles.GLOBAL_GROUP will also be checked. + * @param {Object} [options] Optional options which are passed directly + * through to `Meteor.users.find(query, options)` + * @return {Cursor} cursor of users in role + */ + function getUsersInRole( + role : string|string[], + group? : string, + options? : { + sort?: Mongo.SortSpecifier; + skip?: number; + limit?: number; + fields?: Mongo.FieldSpecifier; + reactive?: boolean; + transform?: Function; + }) : Mongo.Cursor; + + /** + * Remove users from roles + * + * @example + * Roles.removeUsersFromRoles(users.bob, 'admin') + * Roles.removeUsersFromRoles([users.bob, users.joe], ['editor']) + * Roles.removeUsersFromRoles([users.bob, users.joe], ['editor', 'user']) + * Roles.removeUsersFromRoles(users.eve, ['user'], 'group1') + * + * @method removeUsersFromRoles + * @param {Array|String} users User id(s) or object(s) with an _id field + * @param {Array|String} roles Name(s) of roles to add users to + * @param {String} [group] Optional. Group name. If supplied, only that + * group will have roles removed. + */ + function removeUsersFromRoles( + user : string|string[]|Object|Object[], + roles? : string[], + group? : string + ) : void; + + /** + * Set a users roles/permissions. + * + * @example + * Roles.setUserRoles(userId, 'admin') + * Roles.setUserRoles(userId, ['view-secrets'], 'example.com') + * Roles.setUserRoles([user1, user2], ['user','editor']) + * Roles.setUserRoles([user1, user2], ['glorious-admin', 'perform-action'], 'example.org') + * Roles.setUserRoles(userId, 'admin', Roles.GLOBAL_GROUP) + * + * @method setUserRoles + * @param {Array|String} users User id(s) or object(s) with an _id field + * @param {Array|String} roles Name(s) of roles/permissions to add users to + * @param {String} [group] Optional group name. If supplied, roles will be + * specific to that group. + * Group names can not start with '$'. + * Periods in names '.' are automatically converted + * to underscores. + * The special group Roles.GLOBAL_GROUP provides + * a convenient way to assign blanket roles/permissions + * across all groups. The roles/permissions in the + * Roles.GLOBAL_GROUP group will be automatically + * included in checks for any group. + */ + function setUserRoles ( + user : string|string[]|Object|Object[], + roles : string|string[], + group? : string + ) : void; + + /** + * Check if user has specified permissions/roles + * + * @example + * // non-group usage + * Roles.userIsInRole(user, 'admin') + * Roles.userIsInRole(user, ['admin','editor']) + * Roles.userIsInRole(userId, 'admin') + * Roles.userIsInRole(userId, ['admin','editor']) + * + * // per-group usage + * Roles.userIsInRole(user, ['admin','editor'], 'group1') + * Roles.userIsInRole(userId, ['admin','editor'], 'group1') + * Roles.userIsInRole(userId, ['admin','editor'], Roles.GLOBAL_GROUP) + * + * // this format can also be used as short-hand for Roles.GLOBAL_GROUP + * Roles.userIsInRole(user, 'admin') + * + * @method userIsInRole + * @param {String|Object} user User Id or actual user object + * @param {String|Array} roles Name of role/permission or Array of + * roles/permissions to check against. If array, + * will return true if user is in _any_ role. + * @param {String} [group] Optional. Name of group. If supplied, limits check + * to just that group. + * The user's Roles.GLOBAL_GROUP will always be checked + * whether group is specified or not. + * @return {Boolean} true if user is in _any_ of the target roles + */ + function userIsInRole( + user : string|string[]|Object|Object[], + roles : string|string[], + group? : string + ) : boolean; + + interface Role { + name : string; + } + } +} diff --git a/types/meteor/server-render.d.ts b/types/meteor/server-render.d.ts index 1695142ee4..0f78cac1c0 100644 --- a/types/meteor/server-render.d.ts +++ b/types/meteor/server-render.d.ts @@ -12,5 +12,7 @@ declare module "meteor/server-render" { appendToElementById?(id: string, html: string): void; renderIntoElementById?(id: string, html: string): void; } - function onPageLoad(sink: Sink): Promise | any; + + type Callback = (sink: Sink) => Promise | any; + export function onPageLoad(callback: T): T; } diff --git a/types/microrouter/index.d.ts b/types/microrouter/index.d.ts index 6d65adc8a1..934affd630 100644 --- a/types/microrouter/index.d.ts +++ b/types/microrouter/index.d.ts @@ -8,12 +8,13 @@ import { IncomingMessage, ServerResponse, Server } from 'http'; import { RequestHandler } from 'micro'; - +export type ServerResponse = ServerResponse; +export type ServerRequest = IncomingMessage & { + params: { [key: string]: string }, + query: { [key: string]: string } +}; export type AugmentedRequestHandler = ( - req: IncomingMessage & { - params: {[key: string]: string}, - query: {[key: string]: string} - }, + req: ServerRequest, res: ServerResponse ) => any; diff --git a/types/mini-css-extract-plugin/index.d.ts b/types/mini-css-extract-plugin/index.d.ts new file mode 100644 index 0000000000..f9b57632ef --- /dev/null +++ b/types/mini-css-extract-plugin/index.d.ts @@ -0,0 +1,32 @@ +// Type definitions for mini-css-extract-plugin 0.2 +// Project: https://github.com/webpack-contrib/mini-css-extract-plugin +// Definitions by: JounQin +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import { Loader, Plugin } from 'webpack'; + +/** + * Lightweight CSS extraction webpack plugin + * This plugin extract CSS into separate files. It creates a CSS file per JS file which contains CSS. It supports On-Demand-Loading of CSS and SourceMaps. + * Configuration Detail: https://github.com/webpack-contrib/mini-css-extract-plugin#configuration + */ +declare class MiniCssExtractPlugin extends Plugin { + /** webpack loader used always at the end of loaders list */ + static loader: Loader; + + constructor(options?: MiniCssExtractPlugin.PluginOptions); +} + +declare namespace MiniCssExtractPlugin { + interface PluginOptions { + /** + * Options similar to the same options in webpackOptions.output, both options are optional + * May contain `[name]`, `[id]`, `hash` and `[chunkhash]` + */ + filename?: string; + chunkFilename?: string; + } +} + +export = MiniCssExtractPlugin; diff --git a/types/mini-css-extract-plugin/mini-css-extract-plugin-tests.ts b/types/mini-css-extract-plugin/mini-css-extract-plugin-tests.ts new file mode 100644 index 0000000000..9d418ed211 --- /dev/null +++ b/types/mini-css-extract-plugin/mini-css-extract-plugin-tests.ts @@ -0,0 +1,58 @@ +import webpack = require('webpack'); +import MiniCssExtractPlugin = require('mini-css-extract-plugin'); + +let configuration: webpack.Configuration; + +configuration = { + // The standard entry point and output config + entry: { + posts: './posts', + post: './post', + about: './about', + }, + output: { + filename: '[name].js', + chunkFilename: '[id].js', + }, + module: { + rules: [ + // Extract css files + { + test: /\.css$/, + use: [MiniCssExtractPlugin.loader, 'css-loader'], + }, + // Optionally extract less files + // or any other compile-to-css language + { + test: /\.less$/, + use: [ + MiniCssExtractPlugin.loader, + 'css-loader', + 'style-loader', + ], + }, + // You could also use other loaders the same way. I. e. the autoprefixer-loader + ], + }, + // Use the plugin to specify the resulting filename (and add needed behavior to the compiler) + plugins: [ + new MiniCssExtractPlugin({ + filename: '[name].css', + }), + ], +}; + +configuration = { + // ... + plugins: [new MiniCssExtractPlugin()], +}; + +configuration = { + // ... + plugins: [ + new MiniCssExtractPlugin({ + filename: 'styles.css', + chunkFilename: 'style.css', + }), + ], +}; diff --git a/types/mini-css-extract-plugin/tsconfig.json b/types/mini-css-extract-plugin/tsconfig.json new file mode 100644 index 0000000000..e79daeceef --- /dev/null +++ b/types/mini-css-extract-plugin/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "mini-css-extract-plugin-tests.ts" + ] +} diff --git a/types/mini-css-extract-plugin/tslint.json b/types/mini-css-extract-plugin/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/mini-css-extract-plugin/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/minio/index.d.ts b/types/minio/index.d.ts index 7e920428ff..bdbcb8032a 100644 --- a/types/minio/index.d.ts +++ b/types/minio/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for minio 4.0 +// Type definitions for minio 5.1 // Project: https://github.com/minio/minio-js#readme // Definitions by: Barin Britva +// Lubomir Kaplan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -11,7 +12,6 @@ import EventEmitter = NodeJS.EventEmitter; // Exports only from typings export type Region = 'us-east-1'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-central-1'|'ap-southeast-1'|'ap-northeast-1'|'ap-southeast-2'|'sa-east-1'|'cn-north-1'|string; -export type PolicyValue = 'none'|'readonly'|'writeonly'|'readwrite'; export type NoResultCallback = (error: Error|null) => void; export type ResultCallback = (error: Error|null, result: T) => void; @@ -46,7 +46,7 @@ export interface BucketItemStat { size: number; contentType: string; etag: string; - lastModified: string; + lastModified: Date; } export interface IncompleteUploadedBucketItem { @@ -83,10 +83,10 @@ export class Client { makeBucket(bucketName: string, region: Region): Promise; listBuckets(callback: ResultCallback): void; - listBuckets(): Promise; + listBuckets(): Promise; - bucketExists(bucketName: string, callback: NoResultCallback): void; - bucketExists(bucketName: string): Promise; + bucketExists(bucketName: string, callback: ResultCallback): void; + bucketExists(bucketName: string): Promise; removeBucket(bucketName: string, callback: NoResultCallback): void; removeBucket(bucketName: string): Promise; @@ -158,11 +158,11 @@ export class Client { // todo #low Specify events listenBucketNotification(bucketName: string, prefix: string, suffix: string, events: string[]): EventEmitter; - getBucketPolicy(bucketName: string, objectPrefix: string, callback: ResultCallback): void; - getBucketPolicy(bucketName: string, objectPrefix: string): Promise; + getBucketPolicy(bucketName: string, callback: ResultCallback): void; + getBucketPolicy(bucketName: string): Promise; - setBucketPolicy(bucketName: string, objectPrefix: string, bucketPolice: PolicyValue, callback: NoResultCallback): void; - setBucketPolicy(bucketName: string, objectPrefix: string, bucketPolice: PolicyValue): Promise; + setBucketPolicy(bucketName: string, bucketPolicy: string, callback: NoResultCallback): void; + setBucketPolicy(bucketName: string, bucketPolicy: string): Promise; // Other newPostPolicy(): PostPolicy; diff --git a/types/minio/minio-tests.ts b/types/minio/minio-tests.ts index 78a7fab267..05f8283d32 100644 --- a/types/minio/minio-tests.ts +++ b/types/minio/minio-tests.ts @@ -16,7 +16,7 @@ minio.makeBucket('testBucket', 'region-not-from-list'); minio.listBuckets((error: Error|null, bucketList: Minio.BucketItemFromList[]) => { console.log(error, bucketList); }); minio.listBuckets(); -minio.bucketExists('testBucket', (error: Error|null) => { console.log(error); }); +minio.bucketExists('testBucket', (error: Error|null, exists: boolean) => { console.log(error, exists); }); minio.bucketExists('testBucket'); minio.removeBucket('testBucket', (error: Error|null) => { console.log(error); }); @@ -106,8 +106,14 @@ minio.removeAllBucketNotification('testBucket'); minio.listenBucketNotification('testBucket', 'pref_', '_suf', [ Minio.ObjectCreatedAll ]); -minio.getBucketPolicy('testBucket', 'pref_', (error: Error|null, policy: Minio.PolicyValue) => { console.log(error, policy); }); -minio.getBucketPolicy('testBucket', ''); +minio.getBucketPolicy('testBucket', (error: Error|null, policy: string) => { console.log(error, policy); }); +minio.getBucketPolicy('testBucket'); -minio.setBucketPolicy('testBucket', '', Minio.Policy.READWRITE, (error: Error|null) => { console.log(error); }); -minio.setBucketPolicy('testBucket', 'pref_', Minio.Policy.WRITEONLY); +const testPolicy = `{"Version":"2012-10-17","Statement":[{"Action":["s3:GetBucketLocation"],"Effect":"Allow", +"Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::bucketName"],"Sid":""},{"Action":["s3:ListBucket"], +"Condition":{"StringEquals":{"s3:prefix":["foo","prefix/"]}},"Effect":"Allow","Principal":{"AWS":["*"]}, +"Resource":["arn:aws:s3:::bucketName"],"Sid":""},{"Action":["s3:GetObject"],"Effect":"Allow", +"Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::bucketName/foo*","arn:aws:s3:::bucketName/prefix/*"],"Sid":""}]} +`; +minio.setBucketPolicy('testBucket', testPolicy, (error: Error|null) => { console.log(error); }); +minio.setBucketPolicy('testBucket', testPolicy); diff --git a/types/mocha-steps/index.d.ts b/types/mocha-steps/index.d.ts index 0234f02529..8bd32496aa 100644 --- a/types/mocha-steps/index.d.ts +++ b/types/mocha-steps/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/rprieto/mocha-steps // Definitions by: AryloYeung // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 /// diff --git a/types/mocha/index.d.ts b/types/mocha/index.d.ts index 06ef96c618..0e066791eb 100644 --- a/types/mocha/index.d.ts +++ b/types/mocha/index.d.ts @@ -1,19 +1,24 @@ -// Type definitions for mocha 2.2.5 +// Type definitions for mocha 5.2 // Project: http://mochajs.org/ -// Definitions by: Kazi Manzur Rashid , otiai10 , jt000 , Vadim Macagon +// Definitions by: Kazi Manzur Rashid +// otiai10 +// jt000 +// Vadim Macagon +// Andrew Bradley // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 interface MochaSetupOptions { - //milliseconds to wait before considering a test slow + // milliseconds to wait before considering a test slow slow?: number; // timeout in milliseconds timeout?: number; // ui name "bdd", "tdd", "exports" etc - ui?: string; + ui?: Mocha.Interface; - //array of accepted globals + // array of accepted globals globals?: any[]; // reporter instance (function or string), defaults to `mocha.reporters.Spec` @@ -32,38 +37,36 @@ interface MochaSetupOptions { require?: string[]; } -declare var mocha: Mocha; -declare var describe: Mocha.IContextDefinition; -declare var xdescribe: Mocha.IContextDefinition; +declare const mocha: Mocha; +declare const describe: Mocha.IContextDefinition; +declare const xdescribe: Mocha.IContextDefinition; // alias for `describe` -declare var context: Mocha.IContextDefinition; +declare const context: Mocha.IContextDefinition; // alias for `describe` -declare var suite: Mocha.IContextDefinition; -declare var it: Mocha.ITestDefinition; -declare var xit: Mocha.ITestDefinition; +declare const suite: Mocha.IContextDefinition; +declare const it: Mocha.ITestDefinition; +declare const xit: Mocha.ITestDefinition; // alias for `it` -declare var test: Mocha.ITestDefinition; -declare var specify: Mocha.ITestDefinition; +declare const test: Mocha.ITestDefinition; +declare const specify: Mocha.ITestDefinition; // Used with the --delay flag; see https://mochajs.org/#hooks declare function run(): void; -interface MochaDone { - (error?: any): any; -} +type MochaDone = (error?: any) => void; -declare function setup(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void; -declare function teardown(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void; -declare function suiteSetup(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; -declare function suiteTeardown(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; -declare function before(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; -declare function before(description: string, callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; -declare function after(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; -declare function after(description: string, callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; -declare function beforeEach(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void; -declare function beforeEach(description: string, callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void; -declare function afterEach(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void; -declare function afterEach(description: string, callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void; +declare function setup(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => PromiseLike | void): void; +declare function teardown(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => PromiseLike | void): void; +declare function suiteSetup(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => PromiseLike | void): void; +declare function suiteTeardown(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => PromiseLike | void): void; +declare function before(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => PromiseLike | void): void; +declare function before(description: string, callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => PromiseLike | void): void; +declare function after(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => PromiseLike | void): void; +declare function after(description: string, callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => PromiseLike | void): void; +declare function beforeEach(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => PromiseLike | void): void; +declare function beforeEach(description: string, callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => PromiseLike | void): void; +declare function afterEach(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => PromiseLike | void): void; +declare function afterEach(description: string, callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => PromiseLike | void): void; interface ReporterConstructor { new(runner: Mocha.IRunner, options: any): any; @@ -71,6 +74,8 @@ interface ReporterConstructor { declare class Mocha { currentTest: Mocha.ITestDefinition; + suite: Mocha.ISuite; + constructor(options?: { grep?: RegExp; ui?: string; @@ -81,6 +86,8 @@ declare class Mocha { bail?: boolean; }); + /** Setup mocha with the given interface. */ + setup(interface: Mocha.Interface): Mocha; /** Setup mocha with the given options. */ setup(options: MochaSetupOptions): Mocha; bail(value?: boolean): Mocha; @@ -114,10 +121,21 @@ declare class Mocha { noHighlighting(value: boolean): Mocha; /** Runs tests and invokes `onComplete()` when finished. */ run(onComplete?: (failures: number) => void): Mocha.IRunner; + loadFiles(cb?: () => any): void; } // merge the Mocha class declaration with a module declare namespace Mocha { + /** Third-party declarations that want to add new interfaces can contribute names here */ + interface InterfaceContributions { + bdd: any; + tdd: any; + qunit: any; + exports: any; + } + + type Interface = keyof InterfaceContributions; + interface ISuiteCallbackContext { timeout(ms: number | string): this; retries(n: number): this; @@ -130,7 +148,6 @@ declare namespace Mocha { [index: string]: any; } - interface ITestCallbackContext { skip(): this; timeout(ms: number | string): this; @@ -154,6 +171,7 @@ declare namespace Mocha { interface ISuite { parent: ISuite; title: string; + suites: ISuite[]; fullTitle(): string; } @@ -204,33 +222,33 @@ declare namespace Mocha { } interface ITestDefinition { - (expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): ITest; - only(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): ITest; - skip(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): void; + (expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => PromiseLike | void): ITest; + only(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => PromiseLike | void): ITest; + skip(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => PromiseLike | void): void; timeout(ms: number | string): void; state: "failed" | "passed"; } - export module reporters { - export class Base { + namespace reporters { + class Base { stats: IStats; constructor(runner: IRunner); } - export class Doc extends Base { } - export class Dot extends Base { } - export class HTML extends Base { } - export class HTMLCov extends Base { } - export class JSON extends Base { } - export class JSONCov extends Base { } - export class JSONStream extends Base { } - export class Landing extends Base { } - export class List extends Base { } - export class Markdown extends Base { } - export class Min extends Base { } - export class Nyan extends Base { } - export class Progress extends Base { + class Doc extends Base { } + class Dot extends Base { } + class HTML extends Base { } + class HTMLCov extends Base { } + class JSON extends Base { } + class JSONCov extends Base { } + class JSONStream extends Base { } + class Landing extends Base { } + class List extends Base { } + class Markdown extends Base { } + class Min extends Base { } + class Nyan extends Base { } + class Progress extends Base { /** * @param options.open String used to indicate the start of the progress bar. * @param options.complete String used to indicate a complete test on the progress bar. @@ -244,12 +262,70 @@ declare namespace Mocha { close?: string; }); } - export class Spec extends Base { } - export class TAP extends Base { } - export class XUnit extends Base { + class Spec extends Base { } + class TAP extends Base { } + class XUnit extends Base { constructor(runner: IRunner, options?: any); } } + + /* + * All ambient functions are also available via require('mocha') when invoked via the mocha CLI + * See for details: https://mochajs.org/#require + */ + + /** Only available when invoked via the mocha CLI */ + const describe: IContextDefinition; + /** Only available when invoked via the mocha CLI */ + const xdescribe: IContextDefinition; + /** + * alias for `describe` + * Only available when invoked via the mocha CLI + */ + const context: IContextDefinition; + /** + * alias for `describe` + * Only available when invoked via the mocha CLI + */ + const suite: IContextDefinition; + /** Only available when invoked via the mocha CLI */ + const it: ITestDefinition; + /** Only available when invoked via the mocha CLI */ + const xit: ITestDefinition; + /** + * alias for `it` + * Only available when invoked via the mocha CLI + */ + const test: ITestDefinition; + /** + * Alias for `it` + * Only available when invoked via the mocha CLI + */ + const specify: ITestDefinition; + /** Only available when invoked via the mocha CLI */ + function setup(callback: (this: IBeforeAndAfterContext, done: MochaDone) => PromiseLike | void): void; + /** Only available when invoked via the mocha CLI */ + function teardown(callback: (this: IBeforeAndAfterContext, done: MochaDone) => PromiseLike | void): void; + /** Only available when invoked via the mocha CLI */ + function suiteSetup(callback: (this: IHookCallbackContext, done: MochaDone) => PromiseLike | void): void; + /** Only available when invoked via the mocha CLI */ + function suiteTeardown(callback: (this: IHookCallbackContext, done: MochaDone) => PromiseLike | void): void; + /** Only available when invoked via the mocha CLI */ + function before(callback: (this: IHookCallbackContext, done: MochaDone) => PromiseLike | void): void; + /** Only available when invoked via the mocha CLI */ + function before(description: string, callback: (this: IHookCallbackContext, done: MochaDone) => PromiseLike | void): void; + /** Only available when invoked via the mocha CLI */ + function after(callback: (this: IHookCallbackContext, done: MochaDone) => PromiseLike | void): void; + /** Only available when invoked via the mocha CLI */ + function after(description: string, callback: (this: IHookCallbackContext, done: MochaDone) => PromiseLike | void): void; + /** Only available when invoked via the mocha CLI */ + function beforeEach(callback: (this: IBeforeAndAfterContext, done: MochaDone) => PromiseLike | void): void; + /** Only available when invoked via the mocha CLI */ + function beforeEach(description: string, callback: (this: IBeforeAndAfterContext, done: MochaDone) => PromiseLike | void): void; + /** Only available when invoked via the mocha CLI */ + function afterEach(callback: (this: IBeforeAndAfterContext, done: MochaDone) => PromiseLike | void): void; + /** Only available when invoked via the mocha CLI */ + function afterEach(description: string, callback: (this: IBeforeAndAfterContext, done: MochaDone) => PromiseLike | void): void; } declare module "mocha" { diff --git a/types/mocha/mocha-tests.ts b/types/mocha/mocha-tests.ts index 0146c04b13..f2fa323f19 100644 --- a/types/mocha/mocha-tests.ts +++ b/types/mocha/mocha-tests.ts @@ -1,8 +1,55 @@ +import { + after as importedAfter, + before as importedBefore, + afterEach as importedAfterEach, + beforeEach as importedBeforeEach, + context as importedContext, + describe as importedDescribe, + it as importedIt, + xdescribe as importedXdescribe, + xit as importedXit +} from 'mocha'; + +// Warning!! +// Don't refer node.d.ts!! +// See #22510. +(): number => setTimeout(() => 0, 0); + let boolean: boolean; let string: string; let number: number; let stringOrUndefined: string | undefined; let dateOrUndefined: Date | undefined; +const resolved = Promise.resolve(); +const rejected = Promise.reject('some error'); + +// Use module augmentation to add a third-party interface +declare module 'mocha' { + interface InterfaceContributions { + 'third-party-interface': any; + } +} +const i: Mocha.Interface = 'third-party-interface'; + +// Lazy tests of compatibility between imported and global functions; should be identical +const _after: typeof after = importedAfter; +const _after2: typeof importedAfter = after; +const _before: typeof before = importedBefore; +const _before2: typeof importedBefore = before; +const _afterEach: typeof afterEach = importedAfterEach; +const _afterEach2: typeof importedAfterEach = afterEach; +const _beforeEach: typeof beforeEach = importedBeforeEach; +const _beforeEach2: typeof importedBeforeEach = beforeEach; +const _context: typeof context = importedContext; +const _context2: typeof importedContext = context; +const _describe: typeof describe = importedDescribe; +const _describe2: typeof importedDescribe = describe; +const _it: typeof it = importedIt; +const _it2: typeof importedIt = it; +const _xdescribe: typeof xdescribe = importedXdescribe; +const _xdescribe2: typeof importedXdescribe = xdescribe; +const _xit: typeof xit = importedXit; +const _xit2: typeof importedXit = xit; function test_describe() { describe('something', () => { }); @@ -11,7 +58,7 @@ function test_describe() { describe.skip('something', () => { }); - describe('something', function () { + describe('something', function() { this.retries(3).slow(1000).timeout(2000).retries(3); }); } @@ -23,7 +70,7 @@ function test_context() { context.skip('some context', () => { }); - context('some context', function () { + context('some context', function() { this.retries(3).slow(1000).timeout(2000).retries(3); }); } @@ -35,58 +82,64 @@ function test_suite() { suite.skip('some context', () => { }); - suite('some context', function () { + suite('some context', function() { this.retries(3).slow(1000).timeout(2000).retries(3); }); } function test_it() { - it('does something', () => { }).timeout('2s'); - it('does something', function () { this['sharedState'] = true; }); + it('does something', function() { this['sharedState'] = true; }); it('does something', (done) => { done(); }); + it('does something', () => resolved); + it('does something', () => rejected); + it.only('does something', () => { }); it.skip('does something', () => { }); - it('does something', function () { + it('does something', function() { this.skip().retries(3).slow(1000).timeout(2000).skip(); }); } function test_test() { - test('does something', () => { }); - test('does something', function () { this['sharedState'] = true; }); + test('does something', function() { this['sharedState'] = true; }); test('does something', (done) => { done(); }); + test('does something', () => resolved); + test('does something', () => rejected); + test.only('does something', () => { }); test.skip('does something', () => { }); - test('does something', function () { + test('does something', function() { this.skip().retries(3).slow(1000).timeout(2000).skip(); }); } function test_specify() { - specify('does something', () => { }); - specify('does something', function () { this['sharedState'] = true; }); + specify('does something', function() { this['sharedState'] = true; }); specify('does something', (done) => { done(); }); + specify('does something', () => resolved); + specify('does something', () => rejected); + specify.only('does something', () => { }); specify.skip('does something', () => { }); - specify('does something', function () { + specify('does something', function() { this.skip().retries(3).slow(1000).timeout(2000).skip(); }); } @@ -94,21 +147,26 @@ function test_specify() { function test_before() { before(() => { }); - before(function () { this['sharedState'] = true; }); + before(function() { this['sharedState'] = true; }); before((done) => { done(); }); + before(() => resolved); + before(() => rejected); + before("my description", () => { }); before("my description", done => { }); - before("my description", function () { + before("my description", () => resolved); + + before("my description", function() { this.skip().timeout(2000).skip(); }); } function test_setup() { - setup(function () { + setup(function() { boolean = this.currentTest.async; boolean = this.currentTest.pending; boolean = this.currentTest.sync; @@ -118,7 +176,7 @@ function test_setup() { stringOrUndefined = this.currentTest.state; }); - setup(function () { + setup(function() { this['sharedState'] = true; boolean = this.currentTest.async; boolean = this.currentTest.pending; @@ -129,7 +187,7 @@ function test_setup() { stringOrUndefined = this.currentTest.state; }); - setup(function (done) { + setup(function(done) { done(); boolean = this.currentTest.async; boolean = this.currentTest.pending; @@ -139,22 +197,37 @@ function test_setup() { string = this.currentTest.fullTitle(); stringOrUndefined = this.currentTest.state; }); + + setup(function() { + boolean = this.currentTest.async; + boolean = this.currentTest.pending; + boolean = this.currentTest.sync; + boolean = this.currentTest.timedOut; + string = this.currentTest.title; + string = this.currentTest.fullTitle(); + stringOrUndefined = this.currentTest.state; + return resolved; + }); } function test_after() { after(() => { }); - after(function () { this['sharedState'] = true; }); + after(function() { this['sharedState'] = true; }); after((done) => { done(); }); + after(() => resolved); + after("my description", () => { }); after("my description", done => { }); + + after("my description", () => resolved); } function test_teardown() { - teardown(function () { + teardown(function() { boolean = this.currentTest.async; boolean = this.currentTest.pending; boolean = this.currentTest.sync; @@ -164,7 +237,7 @@ function test_teardown() { stringOrUndefined = this.currentTest.state; }); - teardown(function () { + teardown(function() { this['sharedState'] = true; boolean = this.currentTest.async; boolean = this.currentTest.pending; @@ -175,7 +248,7 @@ function test_teardown() { stringOrUndefined = this.currentTest.state; }); - teardown(function (done) { + teardown(function(done) { done(); boolean = this.currentTest.async; boolean = this.currentTest.pending; @@ -185,10 +258,21 @@ function test_teardown() { string = this.currentTest.fullTitle(); stringOrUndefined = this.currentTest.state; }); + + teardown(function() { + boolean = this.currentTest.async; + boolean = this.currentTest.pending; + boolean = this.currentTest.sync; + boolean = this.currentTest.timedOut; + string = this.currentTest.title; + string = this.currentTest.fullTitle(); + stringOrUndefined = this.currentTest.state; + return resolved; + }); } function test_beforeEach() { - beforeEach(function () { + beforeEach(function() { boolean = this.currentTest.async; boolean = this.currentTest.pending; boolean = this.currentTest.sync; @@ -198,7 +282,7 @@ function test_beforeEach() { stringOrUndefined = this.currentTest.state; }); - beforeEach(function () { + beforeEach(function() { this['sharedState'] = true; boolean = this.currentTest.async; boolean = this.currentTest.pending; @@ -209,7 +293,7 @@ function test_beforeEach() { stringOrUndefined = this.currentTest.state; }); - beforeEach(function (done) { + beforeEach(function(done) { done(); boolean = this.currentTest.async; boolean = this.currentTest.pending; @@ -220,7 +304,18 @@ function test_beforeEach() { stringOrUndefined = this.currentTest.state; }); - beforeEach("my description", function () { + beforeEach(function() { + boolean = this.currentTest.async; + boolean = this.currentTest.pending; + boolean = this.currentTest.sync; + boolean = this.currentTest.timedOut; + string = this.currentTest.title; + string = this.currentTest.fullTitle(); + stringOrUndefined = this.currentTest.state; + return resolved; + }); + + beforeEach("my description", function() { boolean = this.currentTest.async; boolean = this.currentTest.pending; boolean = this.currentTest.sync; @@ -230,7 +325,7 @@ function test_beforeEach() { stringOrUndefined = this.currentTest.state; }); - beforeEach("my description", function (done) { + beforeEach("my description", function(done) { done(); boolean = this.currentTest.async; boolean = this.currentTest.pending; @@ -240,18 +335,31 @@ function test_beforeEach() { string = this.currentTest.fullTitle(); stringOrUndefined = this.currentTest.state; }); + + beforeEach("my description", function() { + boolean = this.currentTest.async; + boolean = this.currentTest.pending; + boolean = this.currentTest.sync; + boolean = this.currentTest.timedOut; + string = this.currentTest.title; + string = this.currentTest.fullTitle(); + stringOrUndefined = this.currentTest.state; + return resolved; + }); } function test_suiteSetup() { suiteSetup(() => { }); - suiteSetup(function () { this['sharedState'] = true; }); + suiteSetup(function() { this['sharedState'] = true; }); suiteSetup((done) => { done(); }); + + suiteSetup(() => resolved); } function test_afterEach() { - afterEach(function () { + afterEach(function() { boolean = this.currentTest.async; boolean = this.currentTest.pending; boolean = this.currentTest.sync; @@ -261,7 +369,7 @@ function test_afterEach() { stringOrUndefined = this.currentTest.state; }); - afterEach(function () { + afterEach(function() { this['sharedState'] = true; boolean = this.currentTest.async; boolean = this.currentTest.pending; @@ -272,7 +380,7 @@ function test_afterEach() { stringOrUndefined = this.currentTest.state; }); - afterEach(function (done) { + afterEach(function(done) { done(); boolean = this.currentTest.async; boolean = this.currentTest.pending; @@ -283,7 +391,18 @@ function test_afterEach() { stringOrUndefined = this.currentTest.state; }); - afterEach("my description", function () { + afterEach(function() { + boolean = this.currentTest.async; + boolean = this.currentTest.pending; + boolean = this.currentTest.sync; + boolean = this.currentTest.timedOut; + string = this.currentTest.title; + string = this.currentTest.fullTitle(); + stringOrUndefined = this.currentTest.state; + return resolved; + }); + + afterEach("my description", function() { boolean = this.currentTest.async; boolean = this.currentTest.pending; boolean = this.currentTest.sync; @@ -293,7 +412,7 @@ function test_afterEach() { stringOrUndefined = this.currentTest.state; }); - afterEach("my description", function (done) { + afterEach("my description", function(done) { done(); boolean = this.currentTest.async; boolean = this.currentTest.pending; @@ -304,14 +423,26 @@ function test_afterEach() { stringOrUndefined = this.currentTest.state; }); + afterEach("my description", function() { + boolean = this.currentTest.async; + boolean = this.currentTest.pending; + boolean = this.currentTest.sync; + boolean = this.currentTest.timedOut; + string = this.currentTest.title; + string = this.currentTest.fullTitle(); + stringOrUndefined = this.currentTest.state; + return resolved; + }); } function test_suiteTeardown() { suiteTeardown(() => { }); - suiteTeardown(function () { this['sharedState'] = true; }); + suiteTeardown(function() { this['sharedState'] = true; }); suiteTeardown((done) => { done(); }); + + suiteTeardown(() => resolved); } function test_reporter_string() { @@ -385,7 +516,7 @@ function test_setup_all_options() { } function test_run() { - mocha.run(function () { }) + mocha.run(() => {}); } function test_growl() { @@ -420,7 +551,6 @@ function test_require_constructor_allOptions() { }); } - function test_require_fluentParams() { const instance = new MochaDef(); @@ -461,7 +591,7 @@ function test_throwError() { function test_mochaRunner_properties(runner: MochaDef.IRunner, suite: MochaDef.ISuite) { runner = runner.abort(); - + if (runner.stats !== undefined) { number = runner.stats.failures; number = runner.stats.passes; @@ -474,7 +604,7 @@ function test_mochaRunner_properties(runner: MochaDef.IRunner, suite: MochaDef.I dateOrUndefined = runner.stats.duration; } - let s: MochaDef.ISuite = runner.suite; + const s: MochaDef.ISuite = runner.suite; boolean = runner.started; number = runner.total; number = runner.failures; @@ -482,7 +612,7 @@ function test_mochaRunner_properties(runner: MochaDef.IRunner, suite: MochaDef.I runner = runner.grep("regex", false); number = runner.grepTotal(suite); - let globals: string[] | MochaDef.IRunner= runner.globals(["hello", "world"]); + const globals: string[] | MochaDef.IRunner = runner.globals(["hello", "world"]); runner = runner.run(); runner = runner.run((f: number) => {}); @@ -498,4 +628,4 @@ function test_base_reporter_properties(reporter: MochaDef.reporters.Base) { dateOrUndefined = reporter.stats.start; dateOrUndefined = reporter.stats.end; dateOrUndefined = reporter.stats.duration; -} \ No newline at end of file +} diff --git a/types/mocha/tslint.json b/types/mocha/tslint.json index a41bf5d19a..1e7d1ca65a 100644 --- a/types/mocha/tslint.json +++ b/types/mocha/tslint.json @@ -1,79 +1,10 @@ { "extends": "dtslint/dt.json", "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, "unified-signatures": false, - "void-return": false, - "whitespace": false + "interface-name": false, + "ban-types": false, + "no-single-declare-module": false, + "no-declare-current-package": false } } diff --git a/types/mock-knex/index.d.ts b/types/mock-knex/index.d.ts index a21ab2eb0a..bad0aadb01 100644 --- a/types/mock-knex/index.d.ts +++ b/types/mock-knex/index.d.ts @@ -48,7 +48,10 @@ export interface Tracker extends EventEmitter { * * @param callback A function that gets executed on 'query' event. */ - on(event: 'query', callback: (query: QueryDetails, step: number) => void): this; + on( + event: "query", + callback: (query: QueryDetails, step: number) => void + ): this; } /** @@ -56,6 +59,8 @@ export interface Tracker extends EventEmitter { * Object properties signature matches with knex toSQL() output with additional method returns(values). */ export interface QueryDetails extends Knex.Sql { + transacting: boolean; + /** * Function that needs to be called to mock database query result for knex. * diff --git a/types/modernizr/index.d.ts b/types/modernizr/index.d.ts index ff88e9f523..a9cfb92f54 100644 --- a/types/modernizr/index.d.ts +++ b/types/modernizr/index.d.ts @@ -448,6 +448,6 @@ interface ModernizrAPI { interface ModernizrStatic extends ModernizrAPI, FeatureDetects { } declare var Modernizr: ModernizrStatic; -declare module "Modernizr" { +declare module "modernizr" { export = Modernizr; } diff --git a/types/modernizr/tslint.json b/types/modernizr/tslint.json index 2279635eb4..9edbcd99ab 100644 --- a/types/modernizr/tslint.json +++ b/types/modernizr/tslint.json @@ -2,6 +2,7 @@ "extends": "dtslint/dt.json", "rules": { "no-single-declare-module": false, - "no-empty-interface": false + "no-empty-interface": false, + "no-declare-current-package": false } } diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index dd4f44f38a..f72af738a3 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -6,6 +6,9 @@ // Jason Dreyzehner // Gaurav Lahoti // Mariano Cortesi +// Enrico Picci +// Alexander Christie +// Julien Chaumond // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -42,7 +45,7 @@ export class MongoClient extends EventEmitter { close(force?: boolean): Promise; close(force: boolean, callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.0/api/MongoClient.html#db */ - db(name: string, options?: MongoClientCommonOption): Db + db(dbName?: string, options?: MongoClientCommonOption): Db /** http://mongodb.github.io/node-mongodb-native/3.0/api/MongoClient.html#isConnected */ isConnected(name: string, options?: MongoClientCommonOption): boolean; /** http://mongodb.github.io/node-mongodb-native/3.0/api/MongoClient.html#logout */ @@ -92,23 +95,31 @@ export interface MongoClientOptions extends logger?: Object; // Default: false; validateOptions?: Object; - // The name of the application that created this MongoClient instance. + // The name of the application that created this MongoClient instance. appname?: string; + auth?: { + user: string; + password: string; + } } export interface SSLOptions { + // Passed directly through to tls.createSecureContext. See https://nodejs.org/dist/latest-v9.x/docs/api/tls.html#tls_tls_createsecurecontext_options for more info. + ciphers?: string; + // Passed directly through to tls.createSecureContext. See https://nodejs.org/dist/latest-v9.x/docs/api/tls.html#tls_tls_createsecurecontext_options for more info. + ecdhCurve?: string; // Default:5; Number of connections for each server instance poolSize?: number; // Use ssl connection (needs to have a mongod server with ssl support) ssl?: boolean; // Default: true; Validate mongod server certificate against ca (mongod server >=2.4 with ssl support required) - sslValidate?: Object; + sslValidate?: boolean; // Default: true; Server identity checking during SSL checkServerIdentity?: boolean | Function; // Array of valid certificates either as Buffers or Strings sslCA?: Array; // SSL Certificate revocation list binary buffer - sslCRL?: Buffer; + sslCRL?: Array; // SSL Certificate binary buffer sslCert?: Buffer | string; // SSL Key file binary buffer @@ -159,8 +170,8 @@ export interface DbCreateOptions extends CommonOptions { raw?: boolean; // Default: true; Promotes Long values to number if they fit inside the 53 bits resolution. promoteLongs?: boolean; - // Default: -1 (unlimited); Amount of operations the driver buffers up untill discard any new ones - promoteBuffers?: number; + // Default: false; Promotes Binary BSON values to native Node Buffers + promoteBuffers?: boolean; // the prefered read preference. use 'ReadPreference' class. readPreference?: ReadPreference | string; // Default: true; Promotes BSON values to native types where possible, set to false to only receive wrapper types. @@ -463,8 +474,8 @@ export interface Collection { // Get current index hint for collection. hint: any; /** http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html#aggregate */ - aggregate(pipeline: Object[], callback: MongoCallback): AggregationCursor; - aggregate(pipeline: Object[], options?: CollectionAggregationOptions, callback?: MongoCallback): AggregationCursor; + aggregate(pipeline: Object[], callback: MongoCallback>): AggregationCursor; + aggregate(pipeline: Object[], options?: CollectionAggregationOptions, callback?: MongoCallback>): AggregationCursor; /** http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html#bulkWrite */ bulkWrite(operations: Object[], callback: MongoCallback): void; bulkWrite(operations: Object[], options?: CollectionBluckWriteOptions): Promise; @@ -482,13 +493,13 @@ export interface Collection { createIndexes(indexSpecs: Object[], options?: {session?: ClientSession}): Promise; createIndexes(indexSpecs: Object[], options: {session?: ClientSession}, callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html#deleteMany */ - deleteMany(filter: Object, callback: MongoCallback): void; - deleteMany(filter: Object, options?: CommonOptions): Promise; - deleteMany(filter: Object, options: CommonOptions, callback: MongoCallback): void; + deleteMany(filter: FilterQuery, callback: MongoCallback): void; + deleteMany(filter: FilterQuery, options?: CommonOptions): Promise; + deleteMany(filter: FilterQuery, options: CommonOptions, callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html#deleteOne */ - deleteOne(filter: Object, callback: MongoCallback): void; - deleteOne(filter: Object, options?: CommonOptions & { bypassDocumentValidation?: boolean }): Promise; - deleteOne(filter: Object, options: CommonOptions & { bypassDocumentValidation?: boolean }, callback: MongoCallback): void; + deleteOne(filter: FilterQuery, callback: MongoCallback): void; + deleteOne(filter: FilterQuery, options?: CommonOptions & { bypassDocumentValidation?: boolean }): Promise; + deleteOne(filter: FilterQuery, options: CommonOptions & { bypassDocumentValidation?: boolean }, callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html#distinct */ distinct(key: string, query: Object, callback: MongoCallback): void; distinct(key: string, query: Object, options?: { readPreference?: ReadPreference | string, maxTimeMS?: number, session?: ClientSession }): Promise; @@ -506,25 +517,25 @@ export interface Collection { dropIndexes(callback?: MongoCallback): void; dropIndexes(options: {session?: ClientSession, maxTimeMS?: number}, callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html#find */ - find(query?: Object): Cursor; + find(query?: FilterQuery): Cursor; /** @deprecated */ - find(query: Object, options?: FindOneOptions): Cursor; + find(query: FilterQuery, options?: FindOneOptions): Cursor; /** http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html#findOne */ - findOne(filter: Object, callback: MongoCallback): void; - findOne(filter: Object, options?: FindOneOptions): Promise; - findOne(filter: Object, options: FindOneOptions, callback: MongoCallback): void; + findOne(filter: FilterQuery, callback: MongoCallback): void; + findOne(filter: FilterQuery, options?: FindOneOptions): Promise; + findOne(filter: FilterQuery, options: FindOneOptions, callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html#findOneAndDelete */ - findOneAndDelete(filter: Object, callback: MongoCallback>): void; - findOneAndDelete(filter: Object, options?: { projection?: Object, sort?: Object, maxTimeMS?: number, session?: ClientSession }): Promise>; - findOneAndDelete(filter: Object, options: { projection?: Object, sort?: Object, maxTimeMS?: number, session?: ClientSession }, callback: MongoCallback>): void; + findOneAndDelete(filter: FilterQuery, callback: MongoCallback>): void; + findOneAndDelete(filter: FilterQuery, options?: { projection?: Object, sort?: Object, maxTimeMS?: number, session?: ClientSession }): Promise>; + findOneAndDelete(filter: FilterQuery, options: { projection?: Object, sort?: Object, maxTimeMS?: number, session?: ClientSession }, callback: MongoCallback>): void; /** http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html#findOneAndReplace */ - findOneAndReplace(filter: Object, replacement: Object, callback: MongoCallback>): void; - findOneAndReplace(filter: Object, replacement: Object, options?: FindOneAndReplaceOption): Promise>; - findOneAndReplace(filter: Object, replacement: Object, options: FindOneAndReplaceOption, callback: MongoCallback>): void; + findOneAndReplace(filter: FilterQuery, replacement: Object, callback: MongoCallback>): void; + findOneAndReplace(filter: FilterQuery, replacement: Object, options?: FindOneAndReplaceOption): Promise>; + findOneAndReplace(filter: FilterQuery, replacement: Object, options: FindOneAndReplaceOption, callback: MongoCallback>): void; /** http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html#findOneAndUpdate */ - findOneAndUpdate(filter: Object, update: Object, callback: MongoCallback>): void; - findOneAndUpdate(filter: Object, update: Object, options?: FindOneAndReplaceOption): Promise>; - findOneAndUpdate(filter: Object, update: Object, options: FindOneAndReplaceOption, callback: MongoCallback>): void; + findOneAndUpdate(filter: FilterQuery, update: Object, callback: MongoCallback>): void; + findOneAndUpdate(filter: FilterQuery, update: Object, options?: FindOneAndReplaceOption): Promise>; + findOneAndUpdate(filter: FilterQuery, update: Object, options: FindOneAndReplaceOption, callback: MongoCallback>): void; /** http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html#geoHaystackSearch */ geoHaystackSearch(x: number, y: number, callback: MongoCallback): void; geoHaystackSearch(x: number, y: number, options?: GeoHaystackSearchOptions): Promise; @@ -602,9 +613,9 @@ export interface Collection { rename(newName: string, options?: { dropTarget?: boolean, session?: ClientSession }): Promise>; rename(newName: string, options: { dropTarget?: boolean, session?: ClientSession }, callback: MongoCallback>): void; /** http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html#replaceOne */ - replaceOne(filter: Object, doc: Object, callback: MongoCallback): void; - replaceOne(filter: Object, doc: Object, options?: ReplaceOneOptions): Promise; - replaceOne(filter: Object, doc: Object, options: ReplaceOneOptions, callback: MongoCallback): void; + replaceOne(filter: FilterQuery, doc: Object, callback: MongoCallback): void; + replaceOne(filter: FilterQuery, doc: Object, options?: ReplaceOneOptions): Promise; + replaceOne(filter: FilterQuery, doc: Object, options: ReplaceOneOptions, callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html#save */ /** @deprecated Use insertOne, insertMany, updateOne or updateMany */ save(doc: Object, callback: MongoCallback): void; @@ -618,23 +629,62 @@ export interface Collection { stats(options: { scale: number, session?: ClientSession }, callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html#update */ /** @deprecated use updateOne, updateMany or bulkWrite */ - update(filter: Object, update: Object, callback: MongoCallback): void; + update(filter: FilterQuery, update: Object, callback: MongoCallback): void; /** @deprecated use updateOne, updateMany or bulkWrite */ - update(filter: Object, update: Object, options?: ReplaceOneOptions & { multi?: boolean }): Promise; + update(filter: FilterQuery, update: Object, options?: ReplaceOneOptions & { multi?: boolean }): Promise; /** @deprecated use updateOne, updateMany or bulkWrite */ - update(filter: Object, update: Object, options: ReplaceOneOptions & { multi?: boolean }, callback: MongoCallback): void; + update(filter: FilterQuery, update: Object, options: ReplaceOneOptions & { multi?: boolean }, callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html#updateMany */ - updateMany(filter: Object, update: Object, callback: MongoCallback): void; - updateMany(filter: Object, update: Object, options?: CommonOptions & { upsert?: boolean }): Promise; - updateMany(filter: Object, update: Object, options: CommonOptions & { upsert?: boolean }, callback: MongoCallback): void; + updateMany(filter: FilterQuery, update: Object, callback: MongoCallback): void; + updateMany(filter: FilterQuery, update: Object, options?: CommonOptions & { upsert?: boolean }): Promise; + updateMany(filter: FilterQuery, update: Object, options: CommonOptions & { upsert?: boolean }, callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html#updateOne */ - updateOne(filter: Object, update: Object, callback: MongoCallback): void; - updateOne(filter: Object, update: Object, options?: ReplaceOneOptions): Promise; - updateOne(filter: Object, update: Object, options: ReplaceOneOptions, callback: MongoCallback): void; + updateOne(filter: FilterQuery, update: Object, callback: MongoCallback): void; + updateOne(filter: FilterQuery, update: Object, options?: ReplaceOneOptions): Promise; + updateOne(filter: FilterQuery, update: Object, options: ReplaceOneOptions, callback: MongoCallback): void; /** http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html#watch */ watch(pipeline?: Object[], options?: ChangeStreamOptions & { session?: ClientSession }): ChangeStream; } +export type FilterQuery = { + [P in keyof T]?: T[P] | { + $eq?: T[P]; + $gt?: T[P]; + $gte?: T[P]; + $in?: T[P][]; + $lt?: T[P]; + $lte?: T[P]; + $ne?: T[P]; + $nin?: T[P][]; + $and?: (FilterQuery | T[P])[]; + $or?: (FilterQuery | T[P])[]; + $not?: (FilterQuery | T[P])[] | T[P]; + $expr?: any; + $jsonSchema?: any; + $mod?: [number, number]; + $regex?: RegExp; + $options?: string; + $text?: { + $search: string; + $language?: string; + $caseSensitive?: boolean; + $diacraticSensitive?: boolean; + }; + $where: Object; + $geoIntersects?: Object; + $geoWithin?: Object; + $near?: Object; + $nearSphere?: Object; + $elemMatch?: Object; + $size?: number; + $bitsAllClear?: Object; + $bitsAllSet?: Object; + $bitsAnyClear?: Object; + $bitsAnySet?: Object; + [key: string]: any; + }; +} | { [key:string]: any }; + // Documentation: http://docs.mongodb.org/manual/reference/command/collStats/ export interface CollStats { // Namespace. @@ -1070,7 +1120,7 @@ export interface FindOneOptions { export interface InsertWriteOpResult { insertedCount: number; ops: Array; - insertedIds: Array; + insertedIds: {[key: number]: ObjectID}; connection: any; result: { ok: number, n: number } } @@ -1169,6 +1219,8 @@ export class Cursor extends Readable { /** http://mongodb.github.io/node-mongodb-native/3.0/api/Cursor.html#close */ close(): Promise; close(callback: MongoCallback): void; + /** http://mongodb.github.io/node-mongodb-native/3.0/api/Cursor.html#collation */ + collation(value: Object): Cursor; /** http://mongodb.github.io/node-mongodb-native/3.0/api/Cursor.html#comment */ comment(value: string): Cursor; /** http://mongodb.github.io/node-mongodb-native/3.0/api/Cursor.html#count */ @@ -1455,7 +1507,7 @@ export interface ChangeStreamOptions { } type GridFSBucketWriteStreamId = string | number | Object | ObjectID; - + export interface LoggerOptions { loggerLevel?: string // Custom logger function logger?: log // Override default global log level. diff --git a/types/mongodb/mongodb-tests.ts b/types/mongodb/mongodb-tests.ts index 36428d786f..bdbddb1250 100644 --- a/types/mongodb/mongodb-tests.ts +++ b/types/mongodb/mongodb-tests.ts @@ -20,12 +20,14 @@ let options: mongodb.MongoClientOptions = { reconnectInterval: 123456, ssl: true, - sslValidate: {}, + sslValidate: false, checkServerIdentity: function () { }, sslCA: ['str'], + sslCRL: ['str'], sslCert: new Buffer(999), sslKey: new Buffer(999), - sslPass: new Buffer(999) + sslPass: new Buffer(999), + promoteBuffers: false } MongoClient.connect('mongodb://127.0.0.1:27017/test', options, function (err: mongodb.MongoError, client: mongodb.MongoClient) { if (err) throw err; @@ -98,4 +100,21 @@ MongoClient.connect('mongodb://127.0.0.1:27017/test', options, function (err: mo type payment = typeof payment; let cursor: mongodb.AggregationCursor = collection.aggregate([{}]) } + + // test for new typings + { + type TestCollection = { + stringField: string; + numberField: number; + }; + let testCollection = db.collection('testCollection'); + + testCollection.find({ + numberField: { + $and: [{ $gt: 0, $lt: 100 }] + } + }); + + const res: mongodb.Cursor = testCollection.find({ _id: 123 }); + } }) diff --git a/types/mongoose/index.d.ts b/types/mongoose/index.d.ts index b555c86729..7363701f2f 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -1,12 +1,12 @@ -// Type definitions for Mongoose 5.0.1 +// Type definitions for Mongoose 5.0.12 // Project: http://mongoosejs.com/ -// Definitions by: simonxca -// horiuchi +// Definitions by: horiuchi // sindrenm // lukasz-zak // Alorel // jendrikw // Ethan Resnick +// vologa // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -72,6 +72,8 @@ declare module "mongoose" { export var STATES: any; /** The default connection of the mongoose module. */ export var connection: Connection; + /** Models registred on the default mongoose connection. */ + export var models: { [index: string]: Model }; /** The node-mongodb-native driver Mongoose uses. */ export var mongo: typeof mongodb; /** The Mongoose version */ @@ -254,6 +256,9 @@ declare module "mongoose" { /** A hash of the collections associated with this connection */ collections: { [index: string]: Collection }; + /** A hash of models registered with this connection */ + models: { [index: string]: Model }; + /** * Connection ready state * 0 = disconnected @@ -326,6 +331,26 @@ declare module "mongoose" { /** How long driver keeps waiting for servers to come back up (default: Number.MAX_VALUE) */ bufferMaxEntries?: number; + /** additional SSL configuration options */ + /** Array of valid certificates either as Buffers or Strings */ + sslCA?: ReadonlyArray; + /** Array of revocation certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher) */ + sslCRL?: ReadonlyArray; + /** SSL certificate */ + sslCert?: Buffer | string; + /** SSL private key */ + sslKey?: Buffer | string; + /** SSL Certificate pass phrase */ + sslPass?: Buffer | string; + /** Default: true; Server identity checking during SSL */ + checkServerIdentity?: boolean | Function; + /** String containing the server name requested via TLS SNI. */ + servername?: string; + + /** Passed directly through to tls.createSecureContext. See https://nodejs.org/dist/latest-v9.x/docs/api/tls.html#tls_tls_createsecurecontext_options for more info. */ + ciphers?: string; + ecdhCurve?: string; + // TODO safe?: any; fsync?: any; @@ -618,8 +643,74 @@ declare module "mongoose" { /** * Defines a pre hook for the document. */ - pre(method: string, parallel: boolean, fn: HookAsyncCallback, errorCb?: HookErrorCallback): this; - pre(method: string, fn: HookSyncCallback, errorCb?: HookErrorCallback): this; + pre( + method: "init" | "validate" | "save" | "remove", + fn: HookSyncCallback, + errorCb?: HookErrorCallback + ): this; + pre = Query>( + method: + | "count" + | "find" + | "findOne" + | "findOneAndRemove" + | "findOneAndUpdate" + | "update", + fn: HookSyncCallback, + errorCb?: HookErrorCallback + ): this; + pre = Aggregate>( + method: "aggregate", + fn: HookSyncCallback, + errorCb?: HookErrorCallback + ): this; + pre = Model>( + method: "insertMany", + fn: HookSyncCallback, + errorCb?: HookErrorCallback + ): this; + pre | Query | Aggregate>( + method: string, + fn: HookSyncCallback, + errorCb?: HookErrorCallback + ): this; + + pre( + method: "init" | "validate" | "save" | "remove", + parallel: boolean, + fn: HookAsyncCallback, + errorCb?: HookErrorCallback + ): this; + pre = Query>( + method: + | "count" + | "find" + | "findOne" + | "findOneAndRemove" + | "findOneAndUpdate" + | "update", + parallel: boolean, + fn: HookAsyncCallback, + errorCb?: HookErrorCallback + ): this; + pre = Aggregate>( + method: "aggregate", + parallel: boolean, + fn: HookAsyncCallback, + errorCb?: HookErrorCallback + ): this; + pre = Model>( + method: "insertMany", + parallel: boolean, + fn: HookAsyncCallback, + errorCb?: HookErrorCallback + ): this; + pre | Query | Aggregate>( + method: string, + parallel: boolean, + fn: HookAsyncCallback, + errorCb?: HookErrorCallback + ): this; /** * Adds a method call to the queue. @@ -679,12 +770,12 @@ declare module "mongoose" { } // Hook functions: https://github.com/vkarpov15/hooks-fixed - interface HookSyncCallback { - (next: HookNextFunction): any; + interface HookSyncCallback { + (this: T, next: HookNextFunction): Promise | void; } - interface HookAsyncCallback { - (next: HookNextFunction, done: HookDoneFunction): any; + interface HookAsyncCallback { + (this: T, next: HookNextFunction, done: HookDoneFunction): Promise | void; } interface HookErrorCallback { @@ -1543,9 +1634,12 @@ declare module "mongoose" { findOneAndUpdate(callback?: (err: any, doc: DocType | null) => void): DocumentQuery; findOneAndUpdate(update: any, callback?: (err: any, doc: DocType | null, res: any) => void): DocumentQuery; - findOneAndUpdate(query: any | Query, update: any, + findOneAndUpdate(query: any, update: any, callback?: (err: any, doc: DocType | null, res: any) => void): DocumentQuery; - findOneAndUpdate(query: any | Query, update: any, options: QueryFindOneAndUpdateOptions, + findOneAndUpdate(query: any, update: any, + options: { upsert: true, new: true } & QueryFindOneAndUpdateOptions, + callback?: (err: any, doc: DocType, res: any) => void): DocumentQuery; + findOneAndUpdate(query: any, update: any, options: QueryFindOneAndUpdateOptions, callback?: (err: any, doc: DocType | null, res: any) => void): DocumentQuery; /** @@ -2520,6 +2614,9 @@ declare module "mongoose" { findByIdAndUpdate(): DocumentQuery; findByIdAndUpdate(id: any | number | string, update: any, callback?: (err: any, res: T | null) => void): DocumentQuery; + findByIdAndUpdate(id: any | number | string, update: any, + options: { upsert: true, new: true } & ModelFindByIdAndUpdateOptions, + callback?: (err: any, res: T) => void): DocumentQuery; findByIdAndUpdate(id: any | number | string, update: any, options: ModelFindByIdAndUpdateOptions, callback?: (err: any, res: T | null) => void): DocumentQuery; @@ -2565,6 +2662,9 @@ declare module "mongoose" { findOneAndUpdate(): DocumentQuery; findOneAndUpdate(conditions: any, update: any, callback?: (err: any, doc: T | null, res: any) => void): DocumentQuery; + findOneAndUpdate(conditions: any, update: any, + options: { upsert: true, new: true } & ModelFindOneAndUpdateOptions, + callback?: (err: any, doc: T, res: any) => void): DocumentQuery; findOneAndUpdate(conditions: any, update: any, options: ModelFindOneAndUpdateOptions, callback?: (err: any, doc: T | null, res: any) => void): DocumentQuery; @@ -2599,10 +2699,18 @@ declare module "mongoose" { * because it only sends one operation to the server, rather than one for each * document. * This function does not trigger save middleware. + * @param docs Documents to insert. + * @param options Optional settings. + * @param options.ordered if true, will fail fast on the first error encountered. + * If false, will insert all the documents it can and report errors later. + * @param options.rawResult if false, the returned promise resolves to the documents that passed mongoose document validation. + * If `false`, will return the [raw result from the MongoDB driver](http://mongodb.github.io/node-mongodb-native/2.2/api/Collection.html#~insertWriteOpCallback) + * with a `mongoose` property that contains `validationErrors` if this is an unordered `insertMany`. */ insertMany(docs: any[], callback?: (error: any, docs: T[]) => void): Promise; + insertMany(docs: any[], options?: { ordered?: boolean, rawResult?: boolean }, callback?: (error: any, docs: T[]) => void): Promise; insertMany(doc: any, callback?: (error: any, doc: T) => void): Promise; - insertMany(...docsWithCallback: any[]): Promise; + insertMany(doc: any, options?: { ordered?: boolean, rawResult?: boolean }, callback?: (error: any, doc: T) => void): Promise; /** * Executes a mapReduce command. @@ -2626,9 +2734,9 @@ declare module "mongoose" { callback?: (err: any, res: T) => void): Promise; /** Removes documents from the collection. */ - remove(conditions: any, callback?: (err: any) => void): Query; - deleteOne(conditions: any, callback?: (err: any) => void): Query; - deleteMany(conditions: any, callback?: (err: any) => void): Query; + remove(conditions: any, callback?: (err: any) => void): Query; + deleteOne(conditions: any, callback?: (err: any) => void): Query; + deleteMany(conditions: any, callback?: (err: any) => void): Query; /** * Same as update(), except MongoDB replace the existing document with the given document (no atomic operators like $set). diff --git a/types/mongoose/mongoose-tests.ts b/types/mongoose/mongoose-tests.ts index bf2f61f4a3..a6fe9f406a 100644 --- a/types/mongoose/mongoose-tests.ts +++ b/types/mongoose/mongoose-tests.ts @@ -51,6 +51,7 @@ mongoose.model('Actor', new mongoose.Schema({ }), 'collectionName', true).find({}); mongoose.model('Actor').find({}); mongoose.modelNames()[0].toLowerCase(); +mongoose.models.Actor.findOne({}).exec(); new (new mongoose.Mongoose(9, 8, 7)).Mongoose(1, 2, 3).connect(''); mongoose.plugin(cb, {}).connect(''); mongoose.set('test', 'value'); @@ -65,6 +66,25 @@ mongoose.Types.ObjectId; mongoose.Types.Decimal128; mongoose.version.toLowerCase(); +const sslConnections: {[key: string]: mongoose.Connection} = { + basic: mongoose.createConnection(connectUri, {ssl: true}), + customCA: mongoose.createConnection( + connectUri, + { + ssl: true, + sslCA: [new Buffer('ca string')], + sslCRL: [new Buffer('crl buffer')], + sslCert: 'ssl cert', + sslKey: new Buffer('ssl private key'), + sslPass: 'ssl password', + servername: 'localhost', + checkServerIdentity: true, + ciphers: 'ciphers', + ecdhCurve: 'ecdhCurve', + } + ), +}; + /* * section collection.js * http://mongoosejs.com/docs/api.html#collection-js @@ -112,6 +132,7 @@ conn1.openSet('mongodb://localhost/test', 'db', { conn1.close().catch(function (err) {}); conn1.collection('name').$format(999); conn1.model('myModel', new mongoose.Schema({}), 'myCol').find(); +conn1.models.myModel.findOne().exec(); interface IStatics { staticMethod1: (a: number) => string; } @@ -260,6 +281,118 @@ schema.plugin(function (schema, opts) { } }).plugin(cb, {opts: true}); +/* `.pre` hook tests */ + +interface PreHookTestDocumentInterface extends mongoose.Document {} +interface PreHookTestQueryInterface extends mongoose.Query {} +interface PreHookTestAggregateInterface extends mongoose.Aggregate {} +interface PreHookTestModelInterface extends mongoose.Model {} + +// it is used to ensure that all testing cases return a value of mongoose.Schema type +const preHookTestSchemaArr: mongoose.Schema[] = []; + +// testing order: +// serial with default value and returning void +// serial with a type argument and returning a promise +// parallel with default value and returning void +// parallel with a type argument and returning a promise + +// Document +preHookTestSchemaArr.push( + schema.pre("init", function (next) { + const isDefaultType: mongoose.Document = this; + }, err => {}) +); +preHookTestSchemaArr.push( + schema.pre("init", function (next) { + const isSpecificType: PreHookTestDocumentInterface = this; + return Promise.resolve(""); + }, err => {}) +); +preHookTestSchemaArr.push( + schema.pre("init", true, function (next, done) { + const isDefaultType: mongoose.Document = this; + }, err => {}) +); +preHookTestSchemaArr.push( + schema.pre("init", true, function (next, done) { + const isSpecificType: PreHookTestDocumentInterface = this; + return Promise.resolve(""); + }, err => {}) +); + +// Query +preHookTestSchemaArr.push( + schema.pre("count", function (next) { + const isDefaultType: mongoose.Query = this; + }, err => {}) +); +preHookTestSchemaArr.push( + schema.pre>("count", function (next) { + const isSpecificType: PreHookTestQueryInterface = this; + return Promise.resolve(""); + }, err => {}) +); +preHookTestSchemaArr.push( + schema.pre("count", true, function (next, done) { + const isDefaultType: mongoose.Query = this; + }, err => {}) +); +preHookTestSchemaArr.push( + schema.pre>("count", true, function (next, done) { + const isSpecificType: PreHookTestQueryInterface = this; + return Promise.resolve(""); + }, err => {}) +); + +// Aggregate +preHookTestSchemaArr.push( + schema.pre("aggregate", function(next) { + const isDefaultType: mongoose.Aggregate = this; + }, err => {}) +); +preHookTestSchemaArr.push( + schema.pre>("aggregate", function(next) { + const isSpecificType: PreHookTestAggregateInterface = this; + return Promise.resolve("") + }, err => {}) +); +preHookTestSchemaArr.push( + schema.pre("aggregate", true, function(next, done) { + const isDefaultType: mongoose.Aggregate = this; + }, err => {}) +); +preHookTestSchemaArr.push( + schema.pre>("aggregate", true, function(next, done) { + const isSpecificType: PreHookTestAggregateInterface = this; + return Promise.resolve("") + }, err => {}) +); + +// Model +preHookTestSchemaArr.push( + schema.pre("insertMany", function(next) { + const isDefaultType: mongoose.Model = this; + }, err => {}) +); +preHookTestSchemaArr.push( + schema.pre>("insertMany", function(next) { + const isSpecificType: PreHookTestModelInterface = this; + return Promise.resolve("") + }, err => {}) +); +preHookTestSchemaArr.push( + schema.pre("insertMany", true, function(next, done) { + const isDefaultType: mongoose.Model = this; + }, err => {}) +); +preHookTestSchemaArr.push( + schema.pre>("insertMany", true, function(next, done) { + const isSpecificType: PreHookTestModelInterface = this; + return Promise.resolve("") + }, err => {}) +); + schema .post('save', function (error, doc, next) { error.stack; @@ -758,6 +891,7 @@ query.findOneAndUpdate({name: 'aa'}, {name: 'bb'}, { }, cb); query.findOneAndUpdate({name: 'aa'}, {name: 'bb'}, cb); query.findOneAndUpdate({name: 'aa'}, {name: 'bb'}); +query.findOneAndUpdate({}, {}, { upsert: true, new: true }); query.findOneAndUpdate({name: 'bb'}, cb); query.findOneAndUpdate({name: 'bb'}); query.findOneAndUpdate(cb); @@ -1387,6 +1521,7 @@ MongoModel.findByIdAndRemove(999); MongoModel.findByIdAndRemove(); MongoModel.findByIdAndUpdate(999, {}, {}, cb); MongoModel.findByIdAndUpdate(999, {}, {}); +MongoModel.findByIdAndUpdate(999, {}, { upsert: true, new: true }); MongoModel.findByIdAndUpdate(999, {}, cb); MongoModel.findByIdAndUpdate(999, {}); MongoModel.findByIdAndUpdate(); @@ -1415,6 +1550,7 @@ MongoModel.findOneAndRemove({}); MongoModel.findOneAndRemove(); MongoModel.findOneAndUpdate({}, {}, {}, cb); MongoModel.findOneAndUpdate({}, {}, {}); +MongoModel.findOneAndUpdate({}, {}, { upsert: true, new: true }); MongoModel.findOneAndUpdate({}, {}, cb); MongoModel.findOneAndUpdate({}, {}); MongoModel.findOneAndUpdate(); diff --git a/types/mongoose/v4/index.d.ts b/types/mongoose/v4/index.d.ts index 4a4b7d224e..c680f3c980 100644 --- a/types/mongoose/v4/index.d.ts +++ b/types/mongoose/v4/index.d.ts @@ -1600,9 +1600,12 @@ declare module "mongoose" { findOneAndUpdate(callback?: (err: any, doc: DocType | null) => void): DocumentQuery; findOneAndUpdate(update: any, callback?: (err: any, doc: DocType | null, res: any) => void): DocumentQuery; - findOneAndUpdate(query: any | Query, update: any, + findOneAndUpdate(query: any, update: any, callback?: (err: any, doc: DocType | null, res: any) => void): DocumentQuery; - findOneAndUpdate(query: any | Query, update: any, options: QueryFindOneAndUpdateOptions, + findOneAndUpdate(query: any, update: any, + options: { upsert: true, new: true } & QueryFindOneAndUpdateOptions, + callback?: (err: any, doc: DocType, res: any) => void): DocumentQuery; + findOneAndUpdate(query: any, update: any, options: QueryFindOneAndUpdateOptions, callback?: (err: any, doc: DocType | null, res: any) => void): DocumentQuery; /** @@ -2528,6 +2531,9 @@ declare module "mongoose" { findByIdAndUpdate(): DocumentQuery; findByIdAndUpdate(id: any | number | string, update: any, callback?: (err: any, res: T | null) => void): DocumentQuery; + findByIdAndUpdate(id: any | number | string, update: any, + options: { upsert: true, new: true } & ModelFindByIdAndUpdateOptions, + callback?: (err: any, res: T) => void): DocumentQuery; findByIdAndUpdate(id: any | number | string, update: any, options: ModelFindByIdAndUpdateOptions, callback?: (err: any, res: T | null) => void): DocumentQuery; @@ -2573,6 +2579,9 @@ declare module "mongoose" { findOneAndUpdate(): DocumentQuery; findOneAndUpdate(conditions: any, update: any, callback?: (err: any, doc: T | null, res: any) => void): DocumentQuery; + findOneAndUpdate(conditions: any, update: any, + options: { upsert: true, new: true } & ModelFindOneAndUpdateOptions, + callback?: (err: any, doc: T, res: any) => void): DocumentQuery; findOneAndUpdate(conditions: any, update: any, options: ModelFindOneAndUpdateOptions, callback?: (err: any, doc: T | null, res: any) => void): DocumentQuery; diff --git a/types/mongoose/v4/mongoose-tests.ts b/types/mongoose/v4/mongoose-tests.ts index 64214fe983..170a005b49 100644 --- a/types/mongoose/v4/mongoose-tests.ts +++ b/types/mongoose/v4/mongoose-tests.ts @@ -743,6 +743,8 @@ query.findOneAndUpdate({name: 'aa'}, {name: 'bb'}, { }, cb); query.findOneAndUpdate({name: 'aa'}, {name: 'bb'}, cb); query.findOneAndUpdate({name: 'aa'}, {name: 'bb'}); +query.findOneAndUpdate({name: 'aa'}, {name: 'bb'}, { }); +query.findOneAndUpdate({name: 'aa'}, {name: 'bb'}, { upsert: true, new: true }); query.findOneAndUpdate({name: 'bb'}, cb); query.findOneAndUpdate({name: 'bb'}); query.findOneAndUpdate(cb); @@ -1371,6 +1373,7 @@ MongoModel.findByIdAndRemove(999); MongoModel.findByIdAndRemove(); MongoModel.findByIdAndUpdate(999, {}, {}, cb); MongoModel.findByIdAndUpdate(999, {}, {}); +MongoModel.findByIdAndUpdate(999, {}, { new: true, upsert: true }, cb); MongoModel.findByIdAndUpdate(999, {}, cb); MongoModel.findByIdAndUpdate(999, {}); MongoModel.findByIdAndUpdate(); @@ -1399,6 +1402,7 @@ MongoModel.findOneAndRemove({}); MongoModel.findOneAndRemove(); MongoModel.findOneAndUpdate({}, {}, {}, cb); MongoModel.findOneAndUpdate({}, {}, {}); +MongoModel.findOneAndUpdate({}, {}, { upsert: true, new: true }); MongoModel.findOneAndUpdate({}, {}, cb); MongoModel.findOneAndUpdate({}, {}); MongoModel.findOneAndUpdate(); diff --git a/types/muicss/index.d.ts b/types/muicss/index.d.ts new file mode 100644 index 0000000000..f195ae5d23 --- /dev/null +++ b/types/muicss/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for muicss React bindings 0.9 +// Project: https://www.muicss.com/ +// Definitions by: Samuel Neff +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +// all definitions in react.d.ts and subdirs diff --git a/types/muicss/lib/react/appbar.d.ts b/types/muicss/lib/react/appbar.d.ts new file mode 100644 index 0000000000..3da725be31 --- /dev/null +++ b/types/muicss/lib/react/appbar.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +import * as P from '../../react'; + +export default class Appbar extends React.Component {} diff --git a/types/muicss/lib/react/button.d.ts b/types/muicss/lib/react/button.d.ts new file mode 100644 index 0000000000..df641cf4c4 --- /dev/null +++ b/types/muicss/lib/react/button.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +import * as P from '../../react'; + +export default class Button extends React.Component {} diff --git a/types/muicss/lib/react/checkbox.d.ts b/types/muicss/lib/react/checkbox.d.ts new file mode 100644 index 0000000000..dda10e0ade --- /dev/null +++ b/types/muicss/lib/react/checkbox.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +import * as P from '../../react'; + +export default class Checkbox extends React.Component {} diff --git a/types/muicss/lib/react/col.d.ts b/types/muicss/lib/react/col.d.ts new file mode 100644 index 0000000000..a052122a04 --- /dev/null +++ b/types/muicss/lib/react/col.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +import * as P from '../../react'; + +export default class Col extends React.Component {} diff --git a/types/muicss/lib/react/container.d.ts b/types/muicss/lib/react/container.d.ts new file mode 100644 index 0000000000..6845cd981b --- /dev/null +++ b/types/muicss/lib/react/container.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +import * as P from '../../react'; + +export default class Container extends React.Component {} diff --git a/types/muicss/lib/react/divider.d.ts b/types/muicss/lib/react/divider.d.ts new file mode 100644 index 0000000000..ce2ea1f3d6 --- /dev/null +++ b/types/muicss/lib/react/divider.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +import * as P from '../../react'; + +export default class Divider extends React.Component {} diff --git a/types/muicss/lib/react/dropdown-item.d.ts b/types/muicss/lib/react/dropdown-item.d.ts new file mode 100644 index 0000000000..07dbcd77b9 --- /dev/null +++ b/types/muicss/lib/react/dropdown-item.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +import * as P from '../../react'; + +export default class DropdownItem extends React.Component {} diff --git a/types/muicss/lib/react/dropdown.d.ts b/types/muicss/lib/react/dropdown.d.ts new file mode 100644 index 0000000000..c34154133e --- /dev/null +++ b/types/muicss/lib/react/dropdown.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +import * as P from '../../react'; + +export default class Dropdown extends React.Component {} diff --git a/types/muicss/lib/react/form.d.ts b/types/muicss/lib/react/form.d.ts new file mode 100644 index 0000000000..ca09da6102 --- /dev/null +++ b/types/muicss/lib/react/form.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +import * as P from '../../react'; + +export default class Form extends React.Component {} diff --git a/types/muicss/lib/react/input.d.ts b/types/muicss/lib/react/input.d.ts new file mode 100644 index 0000000000..2e8edfd7f7 --- /dev/null +++ b/types/muicss/lib/react/input.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +import * as P from '../../react'; + +export default class Input extends React.Component {} diff --git a/types/muicss/lib/react/option.d.ts b/types/muicss/lib/react/option.d.ts new file mode 100644 index 0000000000..59514c5cbc --- /dev/null +++ b/types/muicss/lib/react/option.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +import * as P from '../../react'; + +export default class Option extends React.Component {} diff --git a/types/muicss/lib/react/panel.d.ts b/types/muicss/lib/react/panel.d.ts new file mode 100644 index 0000000000..b92359f19e --- /dev/null +++ b/types/muicss/lib/react/panel.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +import * as P from '../../react'; + +export default class Panel extends React.Component {} diff --git a/types/muicss/lib/react/radio.d.ts b/types/muicss/lib/react/radio.d.ts new file mode 100644 index 0000000000..ab8f20cb37 --- /dev/null +++ b/types/muicss/lib/react/radio.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +import * as P from '../../react'; + +export default class Radio extends React.Component {} diff --git a/types/muicss/lib/react/row.d.ts b/types/muicss/lib/react/row.d.ts new file mode 100644 index 0000000000..6da3037efc --- /dev/null +++ b/types/muicss/lib/react/row.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +import * as P from '../../react'; + +export default class Row extends React.Component {} diff --git a/types/muicss/lib/react/select.d.ts b/types/muicss/lib/react/select.d.ts new file mode 100644 index 0000000000..4a5cefc75a --- /dev/null +++ b/types/muicss/lib/react/select.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +import * as P from '../../react'; + +export default class Select extends React.Component {} diff --git a/types/muicss/lib/react/tab.d.ts b/types/muicss/lib/react/tab.d.ts new file mode 100644 index 0000000000..6c93a45b09 --- /dev/null +++ b/types/muicss/lib/react/tab.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +import * as P from '../../react'; + +export default class Tab extends React.Component {} diff --git a/types/muicss/lib/react/tabs.d.ts b/types/muicss/lib/react/tabs.d.ts new file mode 100644 index 0000000000..e33ca34333 --- /dev/null +++ b/types/muicss/lib/react/tabs.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +import * as P from '../../react'; + +export default class Tabs extends React.Component {} diff --git a/types/muicss/lib/react/textarea.d.ts b/types/muicss/lib/react/textarea.d.ts new file mode 100644 index 0000000000..82acb645e0 --- /dev/null +++ b/types/muicss/lib/react/textarea.d.ts @@ -0,0 +1,4 @@ +import * as React from 'react'; +import * as P from '../../react'; + +export default class TextArea extends React.Component {} diff --git a/types/muicss/muicss-tests.tsx b/types/muicss/muicss-tests.tsx new file mode 100644 index 0000000000..000310918b --- /dev/null +++ b/types/muicss/muicss-tests.tsx @@ -0,0 +1,200 @@ +import * as React from 'react'; +import * as ReactDOM from 'react-dom'; + +import { + Appbar, + Button, + Checkbox, + Col, + Container, + Divider, + Dropdown, + DropdownItem, + Form, + Input, + Option, + Panel, + Radio, + Row, + Select, + Tab, + Tabs, + Textarea +} from 'muicss/react'; + +import Appbar2 from 'muicss/lib/react/appbar'; +import Button2 from 'muicss/lib/react/button'; +import Checkbox2 from 'muicss/lib/react/checkbox'; +import Col2 from 'muicss/lib/react/col'; +import Container2 from 'muicss/lib/react/container'; +import Divider2 from 'muicss/lib/react/divider'; +import Dropdown2 from 'muicss/lib/react/dropdown'; +import DropdownItem2 from 'muicss/lib/react/dropdown-item'; +import Form2 from 'muicss/lib/react/form'; +import Input2 from 'muicss/lib/react/input'; +import Option2 from 'muicss/lib/react/option'; +import Panel2 from 'muicss/lib/react/panel'; +import Radio2 from 'muicss/lib/react/radio'; +import Row2 from 'muicss/lib/react/row'; +import Select2 from 'muicss/lib/react/select'; +import Tab2 from 'muicss/lib/react/tab'; +import Tabs2 from 'muicss/lib/react/tabs'; +import Textarea2 from 'muicss/lib/react/textarea'; + +class Test extends React.Component { + render() { + return ( +
+ Test application + + + + Link + + Link + + + + +
+ Test form + + + +